Bug 71261 - PluginProxy shouldn't use window-relative coordinates
Summary: PluginProxy shouldn't use window-relative coordinates
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-31 18:08 PDT by Anders Carlsson
Modified: 2011-11-01 09:51 PDT (History)
0 users

See Also:


Attachments
Patch (4.22 KB, patch)
2011-10-31 18:10 PDT, Anders Carlsson
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-10-31 18:08:09 PDT
PluginProxy shouldn't use window-relative coordinates
Comment 1 Anders Carlsson 2011-10-31 18:10:30 PDT
Created attachment 113118 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-11-01 09:41:49 PDT
Comment on attachment 113118 [details]
Patch

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

> Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp:151
> -    IntRect dirtyRectInPluginCoordinates = dirtyRect;
> -    dirtyRectInPluginCoordinates.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
> -
> -    m_backingStore->paint(*graphicsContext, contentsScaleFactor(), dirtyRect.location(), dirtyRectInPluginCoordinates);
> +    m_backingStore->paint(*graphicsContext, contentsScaleFactor(), dirtyRect.location(), dirtyRect);

If I were just to read this code change on its own, I would think that you are now passing a dirtyRect in window coordinates to paint(), since you are no longer converting to plugin coordinates. Perhaps the ChangeLog should explain that dirtyRect is now already in plugin coordinates so no conversion is necessary.
Comment 3 Anders Carlsson 2011-11-01 09:51:22 PDT
Committed r98972: <http://trac.webkit.org/changeset/98972>