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

Unified Diff: Source/core/rendering/InlineFlowBox.cpp

Issue 685963002: We need to account for culled inline parents of the hit-tested nodes.(Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
Index: Source/core/rendering/InlineFlowBox.cpp
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp
index f4f36b70c970b2aba636d880191c06a67edce16c..30cdb8bc30ed510de5d06947477511c23475070c 100644
--- a/Source/core/rendering/InlineFlowBox.cpp
+++ b/Source/core/rendering/InlineFlowBox.cpp
@@ -1029,17 +1029,14 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
return false;
// Check children first.
- // We need to account for culled inline parents of the hit-tested nodes, so that they may also get included in area-based hit-tests.
+ // We need to account for culled inline parents of the hit-tested nodes, so that they may also get included in not only area-based hit-tests but also point-based ones.
RenderObject* culledParent = 0;
for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) {
if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) {
RenderObject* newParent = 0;
- // Culled parents are only relevant for area-based hit-tests, so ignore it in point-based ones.
- if (locationInContainer.isRectBasedTest()) {
- newParent = curr->renderer().parent();
- if (newParent == renderer())
- newParent = 0;
- }
+ newParent = curr->renderer().parent();
+ if (newParent == renderer())
+ newParent = 0;
// Check the culled parent after all its children have been checked, to do this we wait until
// we are about to test an element with a different parent.
if (newParent != culledParent) {

Powered by Google App Engine
This is Rietveld 408576698