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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 1033603007: Blink: Pass 'unobscured' rect to WebPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index acbd858b0686fc46ed2174cae7756cc06d1dec6b..760b99b9ed43b1b4de8ff18c3e56c28d935f7a2f 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2202,6 +2202,30 @@ IntRect FrameView::windowClipRectForFrameOwner(const HTMLFrameOwnerElement* owne
return intersection(clipRect, windowClipRect());
}
+IntRect FrameView::unobscuredRectForFrameOwner(const HTMLFrameOwnerElement* ownerElement) const
Julien - ping for review 2015/03/26 20:41:51 This looks awfully close to windowClipRectForFrame
tommycli 2015/03/27 19:39:00 Done.
+{
+ if (!ownerElement->layoutObject())
+ return IntRect();
+
+ const DeprecatedPaintLayer* enclosingLayer = ownerElement->layoutObject()->enclosingLayer();
+ if (!enclosingLayer)
+ return IntRect();
+
+ // FIXME: childrenClipRect relies on compositingState, which is not necessarily up to date.
+ // https://code.google.com/p/chromium/issues/detail?id=343769
+ DisableCompositingQueryAsserts disabler;
Julien - ping for review 2015/03/26 20:41:51 We shouldn't be adding more of these :(
tommycli 2015/03/27 19:39:00 Done.
+
+ // Apply the clip from the layer.
+ IntRect clipRect = contentsToRootFrame(pixelSnappedIntRect(enclosingLayer->clipper().childrenClipRect()));
+
+ // If element is not in root frame, clip to the local frame.
+ // FIXME: Do we need to do this for remote frames?
+ if (m_frame->deprecatedLocalOwner())
+ clipRect.intersect(contentsToRootFrame(visibleContentRect()));
+
+ return clipRect;
+}
+
bool FrameView::shouldUseIntegerScrollOffset() const
{
if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextEnabled())
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698