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

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

Issue 1567623007: Traverse into subdocuments when mapping plugin rects from absolute to local space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
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 4b35fb59ee4b01c10cbd2398f3532bf82bd80c48..c119dbf769d24a367abace5bbfedb66c5dc8caa2 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -927,7 +927,7 @@ void WebPluginContainerImpl::computeClipRectsForPlugin(
LayoutBox* box = toLayoutBox(ownerElement->layoutObject());
- // Plugin frameRects are in absolute screen space.
+ // Plugin frameRects are in absolute space within their frame.
IntRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(frameRect()), UseTransforms).enclosingBoundingBox();
LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace);
@@ -945,8 +945,8 @@ void WebPluginContainerImpl::computeClipRectsForPlugin(
clippedLocalRect.intersect(rootView->frameView()->visibleContentRect());
// TODO(chrishtr): intentionally ignore transform, because the positioning of frameRect() does also. This is probably wrong.
- unclippedIntLocalRect = box->absoluteToLocalQuad(FloatRect(unclippedIntLocalRect)).enclosingBoundingBox();
- clippedLocalRect = box->absoluteToLocalQuad(FloatRect(clippedLocalRect)).enclosingBoundingBox();
+ unclippedIntLocalRect = box->absoluteToLocalQuad(FloatRect(unclippedIntLocalRect), TraverseDocumentBoundaries).enclosingBoundingBox();
+ clippedLocalRect = box->absoluteToLocalQuad(FloatRect(clippedLocalRect), TraverseDocumentBoundaries).enclosingBoundingBox();
}
void WebPluginContainerImpl::calculateGeometry(IntRect& windowRect, IntRect& clipRect, IntRect& unobscuredRect, Vector<IntRect>& cutOutRects)
@@ -965,4 +965,4 @@ void WebPluginContainerImpl::calculateGeometry(IntRect& windowRect, IntRect& cli
cutOutRects[i].move(-frameRect().x(), -frameRect().y());
}
-} // namespace blinkf
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698