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

Unified Diff: Source/core/layout/line/EllipsisBox.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/EllipsisBox.h ('k') | Source/core/layout/line/InlineBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/EllipsisBox.cpp
diff --git a/Source/core/layout/line/EllipsisBox.cpp b/Source/core/layout/line/EllipsisBox.cpp
index 2aab9bd8a8a0f6a2cee809c3a9bc193ce85092b3..f392fcc2f11d7ec2bb03b08f8ce91ef597e353ab 100644
--- a/Source/core/layout/line/EllipsisBox.cpp
+++ b/Source/core/layout/line/EllipsisBox.cpp
@@ -64,7 +64,7 @@ IntRect EllipsisBox::selectionRect()
return enclosingIntRect(font.selectionRectForText(constructTextRun(&layoutObject(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop() + root().selectionTopAdjustedForPrecedingBlock()), root().selectionHeightAdjustedForPrecedingBlock()));
}
-bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
+bool EllipsisBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
{
// FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once
// the transition to LayoutUnit-based types is complete (crbug.com/321237)
@@ -75,7 +75,7 @@ bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - markupBox->x();
LayoutUnit mty = adjustedLocation.y() + style.fontMetrics().ascent() - (markupBox->y() + markupBox->layoutObject().style(isFirstLineStyle())->fontMetrics().ascent());
- if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom)) {
+ if (markupBox->nodeAtPoint(result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom)) {
layoutObject().updateHitTestResult(result, locationInContainer.point() - LayoutSize(mtx, mty));
return true;
}
@@ -84,11 +84,11 @@ bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
FloatPointWillBeLayoutPoint boxOrigin = locationIncludingFlipping();
boxOrigin.moveBy(accumulatedOffset);
FloatRectWillBeLayoutRect boundsRect(boxOrigin, size());
- if (visibleToHitTestRequest(request) && boundsRect.intersects(FloatRectWillBeLayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) {
+ if (visibleToHitTestRequest(result.hitTestRequest()) && boundsRect.intersects(FloatRectWillBeLayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) {
layoutObject().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
// FIXME: the call to rawValue() below is temporary and should be removed once the transition
// to LayoutUnit-based types is complete (crbug.com/321237)
- if (!result.addNodeToListBasedTestResult(layoutObject().node(), request, locationInContainer, boundsRect.rawValue()))
+ if (!result.addNodeToListBasedTestResult(layoutObject().node(), locationInContainer, boundsRect.rawValue()))
return true;
}
« no previous file with comments | « Source/core/layout/line/EllipsisBox.h ('k') | Source/core/layout/line/InlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698