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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 924273003: Remove HitTestAction. (Closed) Base URL: git@github.com:domokit/mojo.git@hittestfilter
Patch Set: Created 5 years, 10 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 | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 6230c0108cbbac167277422662f34f6b93e2f397..6510e9a3b411a37aa0272f261f4155693175b77a 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -1024,7 +1024,7 @@ LayoutUnit RenderBlock::textIndentOffset() const
return minimumValueForLength(style()->textIndent(), cw);
}
-bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
+bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset)
{
LayoutPoint adjustedLocation(accumulatedOffset + location());
LayoutSize localOffset = toLayoutSize(adjustedLocation);
@@ -1063,7 +1063,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
checkChildren = locationInContainer.intersects(clipRect);
}
if (checkChildren) {
- if (hitTestContents(request, result, locationInContainer, toLayoutPoint(localOffset), hitTestAction)) {
+ if (hitTestContents(request, result, locationInContainer, toLayoutPoint(localOffset))) {
updateHitTestResult(result, locationInContainer.point() - localOffset);
return true;
}
@@ -1079,22 +1079,20 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
}
// Now hit test our background
- if (hitTestAction == HitTestBlockBackground) {
- LayoutRect boundsRect(adjustedLocation, size());
- if (visibleToHitTestRequest(request) && locationInContainer.intersects(boundsRect)) {
- updateHitTestResult(result, locationInContainer.point() - localOffset);
- if (!result.addNodeToRectBasedTestResult(node(), request, locationInContainer, boundsRect))
- return true;
- }
+ LayoutRect boundsRect(adjustedLocation, size());
+ if (visibleToHitTestRequest(request) && locationInContainer.intersects(boundsRect)) {
+ updateHitTestResult(result, locationInContainer.point() - localOffset);
+ if (!result.addNodeToRectBasedTestResult(node(), request, locationInContainer, boundsRect))
+ return true;
}
return false;
}
-bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
+bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset)
{
for (RenderBox* child = lastChildBox(); child; child = child->previousSiblingBox()) {
- if (!child->hasSelfPaintingLayer() && child->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, hitTestAction))
+ if (!child->hasSelfPaintingLayer() && child->nodeAtPoint(request, result, locationInContainer, accumulatedOffset))
return true;
}
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698