Commit 5f8fc8a0 authored by chrishtr's avatar chrishtr Committed by Commit bot

Re-add scrolling of the root frame for plugin windowRects.

This was mistakenly removed in https://codereview.chromium.org/1510083002.
https://codereview.chromium.org/1508363002 makes this clear also.

BUG=555381
TBR=wangxianzhu@chromium.org

Review URL: https://codereview.chromium.org/1506013006

Cr-Commit-Position: refs/heads/master@{#364447}
parent ccc4ffa1
......@@ -1302,7 +1302,9 @@ crbug.com/564109 [ Win7 XP ] http/tests/webfont/font-display.html [ Pass Timeou
crbug.com/558574 [ Win7 ] fast/forms/text/text-font-height-mismatch.html [ Failure ]
crbug.com/558574 [ Win7 ] fast/text/emphasis.html [ Failure ]
crbug.com/561595 [ XP ] plugins/webview-plugin-scroll.html [ Failure ]
crbug.com/555381 plugins/webview-plugin-scroll.html [ NeedsRebaseline ]
#crbug.com/561595 [ XP ] plugins/webview-plugin-scroll.html [ Failure ]
crbug.com/561595 [ XP ] plugins/webview-plugin-nested-iframe-scroll.html [ Failure ]
crbug.com/568157 [ XP ] virtual/syncpaint/fast/repaint/details-open-repaint.html [ Failure ]
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment