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

Side by Side Diff: Source/core/layout/HitTestResult.cpp

Issue 1071863002: Prefer ComposedTreeTraversal to NodeRenderingTraversal. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 // Update the HitTestResult as if the supplied node had been hit in normal p oint-based hit-test. 469 // Update the HitTestResult as if the supplied node had been hit in normal p oint-based hit-test.
470 // Note that we don't know the local point after a rect-based hit-test, but we never use 470 // Note that we don't know the local point after a rect-based hit-test, but we never use
471 // it so shouldn't bother with the cost of computing it. 471 // it so shouldn't bother with the cost of computing it.
472 resolvedInnerNode->layoutObject()->updateHitTestResult(*this, LayoutPoint()) ; 472 resolvedInnerNode->layoutObject()->updateHitTestResult(*this, LayoutPoint()) ;
473 ASSERT(!isRectBasedTest()); 473 ASSERT(!isRectBasedTest());
474 } 474 }
475 475
476 Element* HitTestResult::innerElement() const 476 Element* HitTestResult::innerElement() const
477 { 477 {
478 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(*node)) { 478 for (Node* node = m_innerNode.get(); node; node = ComposedTreeTraversal::par ent(*node)) {
479 if (node->isElementNode()) 479 if (node->isElementNode())
480 return toElement(node); 480 return toElement(node);
481 } 481 }
482 482
483 return 0; 483 return 0;
484 } 484 }
485 485
486 } // namespace blink 486 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698