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

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

Issue 1466393003: Adjust windowRect of plugins for root frame scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years, 1 month 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/plugins/webview-plugin-scroll-expected.txt ('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 60ab35cf439ce584894150ffa595f198ca372518..33505ad2f21ee57e393179ca34817102d632a8e2 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -974,8 +974,9 @@ void WebPluginContainerImpl::computeClipRectsForPlugin(
LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace);
box->mapRectToPaintInvalidationBacking(rootView, unclippedAbsoluteRect, nullptr);
- // The frameRect is already in absolute space.
+ // The frameRect is already in absolute space, except for scrolling of the root frame.
windowRect = frameRect();
+ windowRect.moveBy(roundedIntPoint(-rootView->viewRect().location()));
clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect);
unclippedIntLocalRect = clippedLocalRect;
@@ -988,7 +989,7 @@ void WebPluginContainerImpl::computeClipRectsForPlugin(
void WebPluginContainerImpl::calculateGeometry(IntRect& windowRect, IntRect& clipRect, IntRect& unobscuredRect, Vector<IntRect>& cutOutRects)
{
- // document().layoutView() can be 0 when we receive messages from the
+ // document().layoutView() can be null when we receive messages from the
// plugins while we are destroying a frame.
// FIXME: Can we just check m_element->document().isActive() ?
if (m_element->layoutObject()->document().layoutView()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/plugins/webview-plugin-scroll-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698