Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1506013006: Re-add scrolling of the root frame for plugin windowRects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index 64ee6a63899d6412e41b9b5584ab37e14c270921..03872f2667a22c6f76e8d07f150e6b6140b046ae 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -951,9 +951,12 @@ void WebPluginContainerImpl::computeClipRectsForPlugin(
LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace);
box->mapRectToPaintInvalidationBacking(rootView, unclippedAbsoluteRect, nullptr);
- // The frameRect is already in absolute space, except for scrolling of the root frame.
+ // The frameRect is already in absolute space of the local frame to the plugin.
windowRect = frameRect();
+ // Map up to the root frame.
windowRect = enclosingIntRect(m_element->document().view()->layoutView()->localToAbsoluteQuad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries).boundingBox());
+ // Finally, adjust for scrolling of the root frame, which the above does not take into account.
+ windowRect.moveBy(roundedIntPoint(-rootView->viewRect().location()));
clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect);
unclippedIntLocalRect = clippedLocalRect;
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698