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

Unified Diff: Source/core/dom/Node.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/shadow/ComposedTreeTraversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 574745427d842db534640170fb002ebe0b69f0d0..2dc32050c08919b9376658e68b91add6afe3c7e4 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -47,7 +47,6 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/LiveNodeList.h"
#include "core/dom/NodeRareData.h"
-#include "core/dom/NodeRenderingTraversal.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/ProcessingInstruction.h"
#include "core/dom/Range.h"
@@ -795,7 +794,7 @@ bool Node::shouldHaveFocusAppearance() const
bool Node::isInert() const
{
const HTMLDialogElement* dialog = document().activeModalDialog();
- if (dialog && this != document() && !NodeRenderingTraversal::contains(*dialog, *this))
+ if (dialog && this != document() && canParticipateInComposedTree() && !ComposedTreeTraversal::contains(*dialog, *this))
kochi 2015/04/09 05:01:47 (Just a comment) This looks somewhat tricky as oth
hayato 2015/04/09 05:35:01 Acknowledged. canParticipateInComposedTree() is n
return true;
return document().ownerElement() && document().ownerElement()->isInert();
}
@@ -1820,7 +1819,7 @@ void Node::showTreeForThisAcrossFrame() const
Element* Node::enclosingLinkEventParentOrSelf()
{
- for (Node* node = this; node; node = NodeRenderingTraversal::parent(*node)) {
+ for (Node* node = this; node; node = ComposedTreeTraversal::parent(*node)) {
// For imagemaps, the enclosing link node is the associated area element not the image itself.
// So we don't let images be the enclosingLinkNode, even though isLink sometimes returns true
// for them.
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/shadow/ComposedTreeTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698