Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 #include "core/dom/Document.h" | 40 #include "core/dom/Document.h" |
| 41 #include "core/dom/DocumentFragment.h" | 41 #include "core/dom/DocumentFragment.h" |
| 42 #include "core/dom/DocumentMarkerController.h" | 42 #include "core/dom/DocumentMarkerController.h" |
| 43 #include "core/dom/DocumentType.h" | 43 #include "core/dom/DocumentType.h" |
| 44 #include "core/dom/Element.h" | 44 #include "core/dom/Element.h" |
| 45 #include "core/dom/ElementRareData.h" | 45 #include "core/dom/ElementRareData.h" |
| 46 #include "core/dom/ElementTraversal.h" | 46 #include "core/dom/ElementTraversal.h" |
| 47 #include "core/dom/ExceptionCode.h" | 47 #include "core/dom/ExceptionCode.h" |
| 48 #include "core/dom/LiveNodeList.h" | 48 #include "core/dom/LiveNodeList.h" |
| 49 #include "core/dom/NodeRareData.h" | 49 #include "core/dom/NodeRareData.h" |
| 50 #include "core/dom/NodeRenderingTraversal.h" | |
| 51 #include "core/dom/NodeTraversal.h" | 50 #include "core/dom/NodeTraversal.h" |
| 52 #include "core/dom/ProcessingInstruction.h" | 51 #include "core/dom/ProcessingInstruction.h" |
| 53 #include "core/dom/Range.h" | 52 #include "core/dom/Range.h" |
| 54 #include "core/dom/StaticNodeList.h" | 53 #include "core/dom/StaticNodeList.h" |
| 55 #include "core/dom/TemplateContentDocumentFragment.h" | 54 #include "core/dom/TemplateContentDocumentFragment.h" |
| 56 #include "core/dom/Text.h" | 55 #include "core/dom/Text.h" |
| 57 #include "core/dom/TreeScopeAdopter.h" | 56 #include "core/dom/TreeScopeAdopter.h" |
| 58 #include "core/dom/UserActionElementSet.h" | 57 #include "core/dom/UserActionElementSet.h" |
| 59 #include "core/dom/WeakNodeMap.h" | 58 #include "core/dom/WeakNodeMap.h" |
| 60 #include "core/dom/shadow/ComposedTreeTraversal.h" | 59 #include "core/dom/shadow/ComposedTreeTraversal.h" |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 788 | 787 |
| 789 bool Node::shouldHaveFocusAppearance() const | 788 bool Node::shouldHaveFocusAppearance() const |
| 790 { | 789 { |
| 791 ASSERT(focused()); | 790 ASSERT(focused()); |
| 792 return true; | 791 return true; |
| 793 } | 792 } |
| 794 | 793 |
| 795 bool Node::isInert() const | 794 bool Node::isInert() const |
| 796 { | 795 { |
| 797 const HTMLDialogElement* dialog = document().activeModalDialog(); | 796 const HTMLDialogElement* dialog = document().activeModalDialog(); |
| 798 if (dialog && this != document() && !NodeRenderingTraversal::contains(*dialo g, *this)) | 797 if (dialog && this != document() && canParticipateInComposedTree() && !Compo sedTreeTraversal::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
| |
| 799 return true; | 798 return true; |
| 800 return document().ownerElement() && document().ownerElement()->isInert(); | 799 return document().ownerElement() && document().ownerElement()->isInert(); |
| 801 } | 800 } |
| 802 | 801 |
| 803 unsigned Node::nodeIndex() const | 802 unsigned Node::nodeIndex() const |
| 804 { | 803 { |
| 805 Node *_tempNode = previousSibling(); | 804 Node *_tempNode = previousSibling(); |
| 806 unsigned count = 0; | 805 unsigned count = 0; |
| 807 for (count = 0; _tempNode; count++) | 806 for (count = 0; _tempNode; count++) |
| 808 _tempNode = _tempNode->previousSibling(); | 807 _tempNode = _tempNode->previousSibling(); |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1813 rootNode = parentOrShadowHostOrFrameOwner(rootNode); | 1812 rootNode = parentOrShadowHostOrFrameOwner(rootNode); |
| 1814 showSubTreeAcrossFrame(rootNode, this, ""); | 1813 showSubTreeAcrossFrame(rootNode, this, ""); |
| 1815 } | 1814 } |
| 1816 | 1815 |
| 1817 #endif | 1816 #endif |
| 1818 | 1817 |
| 1819 // -------- | 1818 // -------- |
| 1820 | 1819 |
| 1821 Element* Node::enclosingLinkEventParentOrSelf() | 1820 Element* Node::enclosingLinkEventParentOrSelf() |
| 1822 { | 1821 { |
| 1823 for (Node* node = this; node; node = NodeRenderingTraversal::parent(*node)) { | 1822 for (Node* node = this; node; node = ComposedTreeTraversal::parent(*node)) { |
| 1824 // For imagemaps, the enclosing link node is the associated area element not the image itself. | 1823 // For imagemaps, the enclosing link node is the associated area element not the image itself. |
| 1825 // So we don't let images be the enclosingLinkNode, even though isLink s ometimes returns true | 1824 // So we don't let images be the enclosingLinkNode, even though isLink s ometimes returns true |
| 1826 // for them. | 1825 // for them. |
| 1827 if (node->isLink() && !isHTMLImageElement(*node)) { | 1826 if (node->isLink() && !isHTMLImageElement(*node)) { |
| 1828 // Casting to Element is safe because only HTMLAnchorElement, HTMLIm ageElement and | 1827 // Casting to Element is safe because only HTMLAnchorElement, HTMLIm ageElement and |
| 1829 // SVGAElement can return true for isLink(). | 1828 // SVGAElement can return true for isLink(). |
| 1830 return toElement(node); | 1829 return toElement(node); |
| 1831 } | 1830 } |
| 1832 } | 1831 } |
| 1833 | 1832 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2506 node->showTreeForThis(); | 2505 node->showTreeForThis(); |
| 2507 } | 2506 } |
| 2508 | 2507 |
| 2509 void showNodePath(const blink::Node* node) | 2508 void showNodePath(const blink::Node* node) |
| 2510 { | 2509 { |
| 2511 if (node) | 2510 if (node) |
| 2512 node->showNodePathForThis(); | 2511 node->showNodePathForThis(); |
| 2513 } | 2512 } |
| 2514 | 2513 |
| 2515 #endif | 2514 #endif |
| OLD | NEW |