Bug 57644 - [GTK] Flash in divs with overflow: auto is not positioned and clipped properly
Summary: [GTK] Flash in divs with overflow: auto is not positioned and clipped properly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-04-01 11:01 PDT by Martin Robinson
Modified: 2011-04-26 17:23 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.79 KB, patch)
2011-04-01 11:14 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch with fixes for GTK+ 3.x (8.09 KB, patch)
2011-04-04 14:01 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch with Carlos' suggestions (8.01 KB, patch)
2011-04-05 10:34 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2011-04-01 11:01:00 PDT
It appears that Flash in divs that have scrollbars is not positioned or clipped properly. This can be seen by scrolling the div itself. You'll notice that the Flash window does not move and isn't clipped to the size of the div.
Comment 1 Martin Robinson 2011-04-01 11:14:45 PDT
Created attachment 87882 [details]
Patch
Comment 2 Carlos Garcia Campos 2011-04-03 23:31:20 PDT
Comment on attachment 87882 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87882&action=review

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:553
> +        GdkRectangle clipRect = m_clipRect;
> +        GdkRegion* clipRegion = gdk_region_rectangle(&clipRect);
> +        gdk_window_shape_combine_region(gtk_widget_get_window(widget), clipRegion, 0, 0);
> +        gdk_region_destroy(clipRegion);

you need a #ifdef here since there's no GdkRegion in GTK+3
Comment 3 Martin Robinson 2011-04-04 14:01:02 PDT
Created attachment 88121 [details]
Patch with fixes for GTK+ 3.x
Comment 4 Carlos Garcia Campos 2011-04-04 23:41:50 PDT
Comment on attachment 88121 [details]
Patch with fixes for GTK+ 3.x

View in context: https://bugs.webkit.org/attachment.cgi?id=88121&action=review

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:497
> +    if (!m_clipRect.width() || !m_clipRect.height()) {

maybe if (m_clipRect.isEmpty()) is more clear here.

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:556
> +        cairo_rectangle_int_t clipRect = m_clipRect;

GdkRectangle is cairo_rectangle_int_t, so you can move GdkRectangle clipRect = m_clipRect; out of the #ifdef block and use it for both gtk2 and gtk3
Comment 5 Martin Robinson 2011-04-05 10:34:19 PDT
Created attachment 88273 [details]
Patch with Carlos' suggestions
Comment 6 Dirk Schulze 2011-04-26 16:30:20 PDT
Comment on attachment 88273 [details]
Patch with Carlos' suggestions

View in context: https://bugs.webkit.org/attachment.cgi?id=88273&action=review

LGTM. r=me

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:495
> +    // If the width or height are null, set the clipRect to null, indicating that

s/the width/width/
Comment 7 Martin Robinson 2011-04-26 16:35:37 PDT
Committed r84979: <http://trac.webkit.org/changeset/84979>
Comment 8 WebKit Review Bot 2011-04-26 17:23:52 PDT
http://trac.webkit.org/changeset/84979 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
accessibility/anchor-linked-anonymous-block-crash.html
accessibility/aria-activedescendant-crash.html
accessibility/aria-checkbox-checked.html
accessibility/aria-checkbox-text.html
accessibility/aria-combobox.html
accessibility/aria-controls-with-tabs.html
accessibility/aria-describedby-on-input.html
accessibility/aria-disabled.html
accessibility/aria-help.html
accessibility/aria-hidden-update.html
accessibility/aria-hidden-with-elements.html
accessibility/aria-hidden.html
accessibility/aria-label.html
accessibility/aria-labelledby-on-input.html
accessibility/aria-labelledby-overrides-label.html
accessibility/aria-labelledby-stay-within.html
accessibility/aria-link-supports-press.html
accessibility/aria-list-and-listitem.html
accessibility/aria-option-role.html
accessibility/aria-presentational-role.html