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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2386553002: Hit test floats in visual painting order (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/hittesting/hittest-overlapping-floats.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 9b1fd9666610e3aa0ecb8e143da56f00f8698a41..9ae0a42acb25ff463fc8e1f6e37d19a55b9e131d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -3270,6 +3270,10 @@ Node* LayoutBlockFlow::nodeForHitTest() const
bool LayoutBlockFlow::hitTestChildren(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
{
LayoutPoint scrolledOffset(hasOverflowClip() ? accumulatedOffset - scrolledContentOffset() : accumulatedOffset);
+
+ if (hitTestAction == HitTestFloat && hitTestFloats(result, locationInContainer, scrolledOffset))
+ return true;
+
if (childrenInline()) {
if (m_lineBoxes.hitTest(LineLayoutBoxModel(this), result, locationInContainer, scrolledOffset, hitTestAction)) {
updateHitTestResult(result, flipForWritingMode(toLayoutPoint(locationInContainer.point() - accumulatedOffset)));
@@ -3279,9 +3283,6 @@ bool LayoutBlockFlow::hitTestChildren(HitTestResult& result, const HitTestLocati
return true;
}
- if (hitTestAction == HitTestFloat && hitTestFloats(result, locationInContainer, scrolledOffset))
- return true;
-
return false;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/hittesting/hittest-overlapping-floats.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698