Bug 89499 - [GTK] Scroll offset is applied in the wrong direction for plugins on Windows
Summary: [GTK] Scroll offset is applied in the wrong direction for plugins on Windows
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on: 54531
  Show dependency treegraph
Reported: 2012-06-19 12:46 PDT by Kalev Lember
Modified: 2012-06-28 11:01 PDT (History)
1 user (show)

See Also:

Patch (2.64 KB, patch)
2012-06-19 12:49 PDT, Kalev Lember
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kalev Lember 2012-06-19 12:46:30 PDT
With the reworked Windows plugin support in bug #54531, the target rectangle calculation is off when the frame is scrolled. I've split this fix off to a separate patch as I'd like some more scrutiny for this.

The issue seems to be caused by PluginViewWin.cpp's PluginView::paint() trying to draw using a wrong coordinate system: the target rect coordinates are converted to window coordinates using FrameView::contentsToWindow(), but this will cause the target rect to move to the opposite direction when scrolling. Apparently the backing store for the GTK+ port uses a different coordinate system than the Windows port (Frame coordinate system? Not sure how to call this.)

I've fixed this with #ifdefs in PluginViewWin.cpp, but I'm not sure if this is the right place for applying the fix.
Comment 1 Kalev Lember 2012-06-19 12:49:13 PDT
Created attachment 148393 [details]
Comment 2 Brent Fulgham 2012-06-28 10:19:03 PDT
Comment on attachment 148393 [details]

This seems fine to me, and has no possibility of harming the standard Windows build.  I don't see an easy way to bundle the implementation differently that would provide any advantage in legibility or maintainability.
Comment 3 WebKit Review Bot 2012-06-28 11:00:56 PDT
Comment on attachment 148393 [details]

Clearing flags on attachment: 148393

Committed r121441: <http://trac.webkit.org/changeset/121441>
Comment 4 WebKit Review Bot 2012-06-28 11:01:01 PDT
All reviewed patches have been landed.  Closing bug.