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

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… Created 7 years, 5 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/rendering/RenderView.h ('k') | Source/core/rendering/svg/RenderSVGModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 22e2250ec140247464cb550bb924b517aa295554..89e7169c5c08d83d5b18c51f9839b8b1b81cc380 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -301,9 +301,6 @@ void RenderView::layout()
void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const
{
- // If a container was specified, and was not 0 or the RenderView,
- // then we should have found it by now.
- ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this);
ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == (mode & IsFixed));
if (!repaintContainer && mode & UseTransforms && shouldUseTransformFromContainer(0)) {
@@ -314,6 +311,23 @@ void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContai
if (mode & IsFixed && m_frameView)
transformState.move(m_frameView->scrollOffsetForFixedPosition());
+
+ if (repaintContainer == this)
+ return;
+
+ if (mode & TraverseDocumentBoundaries) {
+ if (RenderObject* parentDocRenderer = frame()->ownerRenderer()) {
+ transformState.move(-frame()->view()->scrollOffset());
+ if (parentDocRenderer->isBox())
+ transformState.move(toLayoutSize(toRenderBox(parentDocRenderer)->contentBoxRect().location()));
+ parentDocRenderer->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
+ return;
+ }
+ }
+
+ // If a container was specified, and was not 0 or the RenderView,
+ // then we should have found it by now.
+ ASSERT_ARG(repaintContainer, !repaintContainer);
}
const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
@@ -349,6 +363,14 @@ void RenderView::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformStat
}
}
+void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutPoint&) const
+{
+ // Record the entire size of the contents of the frame. Note that we don't just
+ // use the viewport size (containing block) here because we want to ensure this includes
+ // all children (so we can avoid walking them explicitly).
+ rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize()));
+}
+
bool RenderView::requiresColumns(int desiredColumnCount) const
{
if (m_frameView)
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/svg/RenderSVGModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698