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

Unified Diff: Source/core/rendering/RenderInline.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/RenderInline.h ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index 81a8bdc8c24e4c956c7f3216b8e9951949481428..7e342c8a0bb742bd46b1976631704887a0fdadd1 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -1383,6 +1383,33 @@ void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
}
}
+namespace {
+
+class AbsoluteLayoutRectsGeneratorContext {
+public:
+ AbsoluteLayoutRectsGeneratorContext(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+ : m_rects(rects)
+ , m_accumulatedOffset(accumulatedOffset) { }
+
+ void operator()(const FloatRect& rect)
+ {
+ LayoutRect layoutRect(rect);
+ layoutRect.move(m_accumulatedOffset.x(), m_accumulatedOffset.y());
+ m_rects.append(layoutRect);
+ }
+private:
+ Vector<LayoutRect>& m_rects;
+ const LayoutPoint& m_accumulatedOffset;
+};
+
+}
+
+void RenderInline::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutPoint& layerOffset) const
+{
+ AbsoluteLayoutRectsGeneratorContext context(rects, layerOffset);
+ generateLineBoxRects(context);
+}
+
void RenderInline::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
if (!hasOutline())
« no previous file with comments | « Source/core/rendering/RenderInline.h ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698