Bug 60210 - REGRESSION (WebKit2): Windowed plugins don't scroll at the same speed as the rest of the page
Summary: REGRESSION (WebKit2): Windowed plugins don't scroll at the same speed as the ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL: http://www.youtube.com/watch?v=CKJgcE...
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 46401
  Show dependency treegraph
 
Reported: 2011-05-04 14:21 PDT by Adam Roben (:aroben)
Modified: 2011-05-04 15:33 PDT (History)
2 users (show)

See Also:


Attachments
Clip and reposition windowed plugins when the UI process paints (16.45 KB, patch)
2011-05-04 15:04 PDT, Adam Roben (:aroben)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-05-04 14:21:40 PDT
To reproduce:

1. Go to http://www.youtube.com/watch?v=CKJgcEgvx4U&feature=topvideos_entertainment
2. Scroll the page quickly

The YouTube video doesn't scroll at the same speed as the rest of the page. This does not happen in WebKit1.
Comment 1 Adam Roben (:aroben) 2011-05-04 14:21:56 PDT
<rdar://problem/8483441>
Comment 2 Adam Roben (:aroben) 2011-05-04 15:04:10 PDT
Created attachment 92322 [details]
Clip and reposition windowed plugins when the UI process paints
Comment 3 Darin Adler 2011-05-04 15:19:07 PDT
Comment on attachment 92322 [details]
Clip and reposition windowed plugins when the UI process paints

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

> Source/WebKit2/UIProcess/win/WebView.cpp:1542
> +enum RedrawOrNot { DoNotRedraw, Redraw };
> +static void setWindowRegion(HWND window, PassOwnPtr<HRGN> popRegion, RedrawOrNot redrawOrNot)
> +{

Given this is only called in one place, why not always redraw? Do you have plans to use this elsewhere?
Comment 4 Anders Carlsson 2011-05-04 15:23:17 PDT
Comment on attachment 92322 [details]
Clip and reposition windowed plugins when the UI process paints

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

> Source/WebKit2/UIProcess/win/WebView.cpp:1560
> +    HashMap<HWND, ChildWindowGeometry>::const_iterator end = geometriesToUpdate.end();
> +    for (HashMap<HWND, ChildWindowGeometry>::const_iterator it = geometriesToUpdate.begin(); it != end; ++it) {

In WebKit2 we declare both iterators inside the for loop:

HashMap<HWND, ChildWindowGeometry>::const_iterator it = geometriesToUpdate.begin(), end = geometriesToUpdate.end();

> Source/WebKit2/WebProcess/Plugins/PluginController.h:93
> +    virtual void scheduleWindowedPluginGeometryUpdate(HWND, const WebCore::IntRect& newRectInParentClientCoordinates, const WebCore::IntRect& clipRectInPluginWindowCoordinates) = 0;

Please add a comment to indicate what this function does, like with nativeParentWindow().
Comment 5 Adam Roben (:aroben) 2011-05-04 15:26:06 PDT
Comment on attachment 92322 [details]
Clip and reposition windowed plugins when the UI process paints

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

>> Source/WebKit2/UIProcess/win/WebView.cpp:1542
>> +{
> 
> Given this is only called in one place, why not always redraw? Do you have plans to use this elsewhere?

I don't have any immediate plans, no. I'll remove it. (Though having the parameter does make the call to ::SetWindowRgn a little clearer.)

>> Source/WebKit2/UIProcess/win/WebView.cpp:1560
>> +    for (HashMap<HWND, ChildWindowGeometry>::const_iterator it = geometriesToUpdate.begin(); it != end; ++it) {
> 
> In WebKit2 we declare both iterators inside the for loop:
> 
> HashMap<HWND, ChildWindowGeometry>::const_iterator it = geometriesToUpdate.begin(), end = geometriesToUpdate.end();

Fixed.

>> Source/WebKit2/WebProcess/Plugins/PluginController.h:93
>> +    virtual void scheduleWindowedPluginGeometryUpdate(HWND, const WebCore::IntRect& newRectInParentClientCoordinates, const WebCore::IntRect& clipRectInPluginWindowCoordinates) = 0;
> 
> Please add a comment to indicate what this function does, like with nativeParentWindow().

Added this comment:

// Tells the controller that the given HWND needs to be positioned and clipped to the given coordinates sometime soon.
Comment 6 Adam Roben (:aroben) 2011-05-04 15:33:05 PDT
Committed r85795: <http://trac.webkit.org/changeset/85795>