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

Unified Diff: Source/core/layout/line/InlineFlowBox.cpp

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments 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/layout/line/InlineFlowBox.h ('k') | Source/core/layout/line/InlineTextBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 7b7e327557bc7a448cc40f8e2f65a039fa650e31..6bfe765519aaa9bcd5359b2e0d8d7be9866e6497 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -967,7 +967,7 @@ void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO
setVisualOverflow(visualOverflow, frameBox);
}
-bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
+bool InlineFlowBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
{
LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
flipForWritingMode(overflowRect);
@@ -992,14 +992,14 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
if (newParent != culledParent) {
if (!newParent || !newParent->isDescendantOf(culledParent)) {
while (culledParent && culledParent != layoutObject() && culledParent != newParent) {
- if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitTestCulledInline(request, result, locationInContainer, accumulatedOffset))
+ if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitTestCulledInline(result, locationInContainer, accumulatedOffset))
return true;
culledParent = culledParent->parent();
}
}
culledParent = newParent;
}
- if (curr->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, lineTop, lineBottom)) {
+ if (curr->nodeAtPoint(result, locationInContainer, accumulatedOffset, lineTop, lineBottom)) {
layoutObject().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset));
return true;
}
@@ -1007,7 +1007,7 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
}
// Check any culled ancestor of the final children tested.
while (culledParent && culledParent != layoutObject()) {
- if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitTestCulledInline(request, result, locationInContainer, accumulatedOffset))
+ if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitTestCulledInline(result, locationInContainer, accumulatedOffset))
return true;
culledParent = culledParent->parent();
}
@@ -1035,9 +1035,9 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
flipForWritingMode(rect);
rect.moveBy(accumulatedOffset);
- if (visibleToHitTestRequest(request) && locationInContainer.intersects(rect)) {
+ if (visibleToHitTestRequest(result.hitTestRequest()) && locationInContainer.intersects(rect)) {
layoutObject().updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(accumulatedOffset))); // Don't add in m_x or m_y here, we want coords in the containing block's space.
- if (!result.addNodeToListBasedTestResult(layoutObject().node(), request, locationInContainer, rect))
+ if (!result.addNodeToListBasedTestResult(layoutObject().node(), locationInContainer, rect))
return true;
}
« no previous file with comments | « Source/core/layout/line/InlineFlowBox.h ('k') | Source/core/layout/line/InlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698