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

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

Issue 1563303005: Traverse into subdocuments when mapping plugin rects from absolute to local space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
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 e538e06542a233670651655abc3d820f9481fd8b..6ab87d38dd6b85bb5562f8cbc8c30f254da37d83 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -968,7 +968,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);
@@ -986,8 +986,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)
@@ -1006,4 +1006,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