Changeset 141524 in webkit
- Timestamp:
- Jan 31, 2013 7:17:19 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r141523 r141524 1 2013-01-31 Changhun Kang <temoochin@company100.net> 2 3 Rename from parentOrHost* to parentOrShadowHost* in Node.h. 4 https://bugs.webkit.org/show_bug.cgi?id=108308 5 6 Reviewed by Dimitri Glazkov. 7 8 No new tests. No change in behavior. 9 1 10 2013-01-31 Alec Flett <alecflett@chromium.org> 2 11 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r140194 r141524 219 219 return node->document(); 220 220 221 while (node->parentOr HostNode())222 node = node->parentOr HostNode();221 while (node->parentOrShadowHostNode()) 222 node = node->parentOrShadowHostNode(); 223 223 return node; 224 224 } -
trunk/Source/WebCore/bindings/v8/V8GCController.cpp
r141390 r141524 173 173 } 174 174 175 while (Node* parent = node->parentOr HostNode())175 while (Node* parent = node->parentOrShadowHostNode()) 176 176 node = parent; 177 177 -
trunk/Source/WebCore/css/SelectorFilter.cpp
r140371 r141524 54 54 { 55 55 ASSERT(m_ancestorIdentifierFilter); 56 ASSERT(m_parentStack.isEmpty() || m_parentStack.last().element == parent->parentOr HostElement());57 ASSERT(!m_parentStack.isEmpty() || !parent->parentOr HostElement());56 ASSERT(m_parentStack.isEmpty() || m_parentStack.last().element == parent->parentOrShadowHostElement()); 57 ASSERT(!m_parentStack.isEmpty() || !parent->parentOrShadowHostElement()); 58 58 m_parentStack.append(ParentStackFrame(parent)); 59 59 ParentStackFrame& parentFrame = m_parentStack.last(); … … 88 88 m_ancestorIdentifierFilter = adoptPtr(new BloomFilter<bloomFilterKeyBits>); 89 89 // Fast version if parent is a root element: 90 if (!parent->parentOr HostNode()) {90 if (!parent->parentOrShadowHostNode()) { 91 91 pushParentStackFrame(parent); 92 92 return; … … 94 94 // Otherwise climb up the tree. 95 95 Vector<Element*, 30> ancestors; 96 for (Element* ancestor = parent; ancestor; ancestor = ancestor->parentOr HostElement())96 for (Element* ancestor = parent; ancestor; ancestor = ancestor->parentOrShadowHostElement()) 97 97 ancestors.append(ancestor); 98 98 for (size_t n = ancestors.size(); n; --n) … … 105 105 // We may get invoked for some random elements in some wacky cases during style resolve. 106 106 // Pause maintaining the stack in this case. 107 if (m_parentStack.last().element != parent->parentOr HostElement())107 if (m_parentStack.last().element != parent->parentOrShadowHostElement()) 108 108 return; 109 109 pushParentStackFrame(parent); -
trunk/Source/WebCore/css/StyleResolver.cpp
r141480 r141524 408 408 void StyleResolver::pushParentElement(Element* parent) 409 409 { 410 const ContainerNode* parentsParent = parent->parentOr HostElement();410 const ContainerNode* parentsParent = parent->parentOrShadowHostElement(); 411 411 412 412 // We are not always invoked consistently. For example, script execution can cause us to enter … … 421 421 // Note: We mustn't skip ShadowRoot nodes for the scope stack. 422 422 if (m_scopeResolver) 423 m_scopeResolver->push(parent, parent->parentOr HostNode());423 m_scopeResolver->push(parent, parent->parentOrShadowHostNode()); 424 424 } 425 425 -
trunk/Source/WebCore/css/StyleScopeResolver.cpp
r139590 r141524 102 102 m_stack.shrink(0); 103 103 int authorStyleBoundsIndex = 0; 104 for (const ContainerNode* scope = parent; scope; scope = scope->parentOr HostNode()) {104 for (const ContainerNode* scope = parent; scope; scope = scope->parentOrShadowHostNode()) { 105 105 RuleSet* ruleSet = ruleSetFor(scope); 106 106 if (ruleSet) … … 148 148 if (scope->isShadowRoot() && !toShadowRoot(scope)->applyAuthorStyles()) 149 149 --m_stackParentBoundsIndex; 150 m_stackParent = scope->parentOr HostNode();150 m_stackParent = scope->parentOrShadowHostNode(); 151 151 } 152 152 } -
trunk/Source/WebCore/dom/Attr.cpp
r134322 r141524 82 82 // This does everything appendChild() would do in this situation (assuming m_ignoreChildrenChanged was set), 83 83 // but much more efficiently. 84 textNode->setParentOr HostNode(this);84 textNode->setParentOrShadowHostNode(this); 85 85 setFirstChild(textNode.get()); 86 86 setLastChild(textNode.get()); -
trunk/Source/WebCore/dom/ComposedShadowTreeWalker.cpp
r139325 r141524 227 227 { 228 228 if (node->isPseudoElement()) 229 return node->parentOr HostNode();229 return node->parentOrShadowHostNode(); 230 230 231 231 if (!canCrossUpperBoundary() && node->isShadowRoot()) { -
trunk/Source/WebCore/dom/ContainerNode.cpp
r141327 r141524 237 237 // Check that this node is not "floating". 238 238 // If it is, it can be deleted as a side effect of sending mutation events. 239 ASSERT(refCount() || parentOr HostNode());239 ASSERT(refCount() || parentOrShadowHostNode()); 240 240 241 241 RefPtr<Node> protect(this); … … 320 320 m_firstChild = newChild; 321 321 } 322 newChild->setParentOr HostNode(this);322 newChild->setParentOrShadowHostNode(this); 323 323 newChild->setPreviousSibling(prev); 324 324 newChild->setNextSibling(nextChild); … … 353 353 // Check that this node is not "floating". 354 354 // If it is, it can be deleted as a side effect of sending mutation events. 355 ASSERT(refCount() || parentOr HostNode());355 ASSERT(refCount() || parentOrShadowHostNode()); 356 356 357 357 RefPtr<Node> protect(this); … … 475 475 // Check that this node is not "floating". 476 476 // If it is, it can be deleted as a side effect of sending mutation events. 477 ASSERT(refCount() || parentOr HostNode());477 ASSERT(refCount() || parentOrShadowHostNode()); 478 478 479 479 RefPtr<Node> protect(this); … … 552 552 oldChild->setPreviousSibling(0); 553 553 oldChild->setNextSibling(0); 554 oldChild->setParentOr HostNode(0);554 oldChild->setParentOrShadowHostNode(0); 555 555 556 556 document()->adoptIfNeeded(oldChild); … … 609 609 n->setPreviousSibling(0); 610 610 n->setNextSibling(0); 611 n->setParentOr HostNode(0);611 n->setParentOrShadowHostNode(0); 612 612 document()->adoptIfNeeded(n.get()); 613 613 … … 646 646 // Check that this node is not "floating". 647 647 // If it is, it can be deleted as a side effect of sending mutation events. 648 ASSERT(refCount() || parentOr HostNode());648 ASSERT(refCount() || parentOrShadowHostNode()); 649 649 650 650 ec = 0; -
trunk/Source/WebCore/dom/ContainerNode.h
r141516 r141524 267 267 if (getFlag(NeedsShadowTreeWalkerFlag)) 268 268 return true; 269 ContainerNode* parent = parentOr HostNode();269 ContainerNode* parent = parentOrShadowHostNode(); 270 270 return parent && parent->getFlag(NeedsShadowTreeWalkerFlag); 271 271 } -
trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h
r140856 r141524 109 109 inline void appendChildToContainer(GenericNode* child, GenericNodeContainer* container) 110 110 { 111 child->setParentOr HostNode(container);111 child->setParentOrShadowHostNode(container); 112 112 113 113 GenericNode* lastChild = container->lastChild(); … … 165 165 n->setPreviousSibling(0); 166 166 n->setNextSibling(0); 167 n->setParentOr HostNode(0);167 n->setParentOrShadowHostNode(0); 168 168 169 169 if (!n->refCount()) { -
trunk/Source/WebCore/dom/Document.cpp
r141418 r141524 5853 5853 Node* newHoverNode = innerElementInDocument; 5854 5854 while (newHoverNode && !newHoverNode->renderer()) 5855 newHoverNode = newHoverNode->parentOr HostNode();5855 newHoverNode = newHoverNode->parentOrShadowHostNode(); 5856 5856 5857 5857 // Update our current hover node. -
trunk/Source/WebCore/dom/Document.h
r141418 r141524 1593 1593 inline Node::Node(Document* document, ConstructionType type) 1594 1594 : m_nodeFlags(type) 1595 , m_parentOr HostNode(0)1595 , m_parentOrShadowHostNode(0) 1596 1596 , m_treeScope(document) 1597 1597 , m_previous(0) -
trunk/Source/WebCore/dom/Element.cpp
r141292 r141524 2461 2461 bool Element::isSpellCheckingEnabled() const 2462 2462 { 2463 for (const Element* element = this; element; element = element->parentOr HostElement()) {2463 for (const Element* element = this; element; element = element->parentOrShadowHostElement()) { 2464 2464 switch (element->spellcheckAttributeState()) { 2465 2465 case SpellcheckAttributeTrue: -
trunk/Source/WebCore/dom/Element.h
r141516 r141524 860 860 if (insertionPoint->inDocument()) 861 861 setFlag(InDocumentFlag); 862 if (parentOr HostNode()->isInShadowTree())862 if (parentOrShadowHostNode()->isInShadowTree()) 863 863 setFlag(IsInShadowTreeFlag); 864 864 return InsertionDone; -
trunk/Source/WebCore/dom/ElementRareData.h
r141132 r141524 257 257 ASSERT(!element->previousSibling()); 258 258 259 element->setParentOr HostNode(0);259 element->setParentOrShadowHostNode(0); 260 260 } 261 261 -
trunk/Source/WebCore/dom/ElementShadow.cpp
r141313 r141524 37 37 RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost->document(), type); 38 38 39 shadowRoot->setParentOr HostNode(shadowHost);39 shadowRoot->setParentOrShadowHostNode(shadowHost); 40 40 shadowRoot->setParentTreeScope(shadowHost->treeScope()); 41 41 m_shadowRoots.push(shadowRoot.get()); … … 70 70 71 71 m_shadowRoots.removeHead(); 72 oldRoot->setParentOr HostNode(0);72 oldRoot->setParentOrShadowHostNode(0); 73 73 oldRoot->setParentTreeScope(shadowHost->document()); 74 74 oldRoot->setPrev(0); -
trunk/Source/WebCore/dom/Node.cpp
r140807 r141524 811 811 inline void Node::markAncestorsWithChildNeedsStyleRecalc() 812 812 { 813 for (ContainerNode* p = parentOr HostNode(); p && !p->childNeedsStyleRecalc(); p = p->parentOrHostNode())813 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRecalc(); p = p->parentOrShadowHostNode()) 814 814 p->setChildNeedsStyleRecalc(); 815 815 … … 1036 1036 bool Node::containsIncludingShadowDOM(const Node* node) const 1037 1037 { 1038 for (; node; node = node->parentOr HostNode()) {1038 for (; node; node = node->parentOrShadowHostNode()) { 1039 1039 if (node == this) 1040 1040 return true; … … 1052 1052 node = static_cast<const TemplateContentDocumentFragment*>(node)->host(); 1053 1053 else 1054 node = node->parentOr HostNode();1054 node = node->parentOrShadowHostNode(); 1055 1055 } 1056 1056 return false; … … 1197 1197 RenderStyle* Node::virtualComputedStyle(PseudoId pseudoElementSpecifier) 1198 1198 { 1199 return parentOr HostNode() ? parentOrHostNode()->computedStyle(pseudoElementSpecifier) : 0;1199 return parentOrShadowHostNode() ? parentOrShadowHostNode()->computedStyle(pseudoElementSpecifier) : 0; 1200 1200 } 1201 1201 … … 1220 1220 return false; 1221 1221 } 1222 return parentOr HostNode() ? parentOrHostNode()->canStartSelection() : true;1222 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelection() : true; 1223 1223 } 1224 1224 … … 1265 1265 } 1266 1266 1267 Element* Node::parentOr HostElement() const1268 { 1269 ContainerNode* parent = parentOr HostNode();1267 Element* Node::parentOrShadowHostElement() const 1268 { 1269 ContainerNode* parent = parentOrShadowHostNode(); 1270 1270 if (!parent) 1271 1271 return 0; … … 1902 1902 Vector<const Node*, 16> chain; 1903 1903 const Node* node = this; 1904 while (node->parentOr HostNode()) {1904 while (node->parentOrShadowHostNode()) { 1905 1905 chain.append(node); 1906 node = node->parentOr HostNode();1906 node = node->parentOrShadowHostNode(); 1907 1907 } 1908 1908 for (unsigned index = chain.size(); index > 0; --index) { … … 1959 1959 StringBuilder indent; 1960 1960 indent.append(baseIndent); 1961 for (const Node* tmpNode = node; tmpNode && tmpNode != rootNode; tmpNode = tmpNode->parentOr HostNode())1961 for (const Node* tmpNode = node; tmpNode && tmpNode != rootNode; tmpNode = tmpNode->parentOrShadowHostNode()) 1962 1962 indent.append('\t'); 1963 1963 fprintf(stderr, "%s", indent.toString().utf8().data()); … … 1976 1976 const Node* rootNode; 1977 1977 const Node* node = this; 1978 while (node->parentOr HostNode() && !node->hasTagName(bodyTag))1979 node = node->parentOr HostNode();1978 while (node->parentOrShadowHostNode() && !node->hasTagName(bodyTag)) 1979 node = node->parentOrShadowHostNode(); 1980 1980 rootNode = node; 1981 1981 … … 1998 1998 } 1999 1999 2000 static ContainerNode* parentOr HostOrFrameOwner(const Node* node)2001 { 2002 ContainerNode* parent = node->parentOr HostNode();2000 static ContainerNode* parentOrShadowHostOrFrameOwner(const Node* node) 2001 { 2002 ContainerNode* parent = node->parentOrShadowHostNode(); 2003 2003 if (!parent && node->document() && node->document()->frame()) 2004 2004 parent = node->document()->frame()->ownerElement(); … … 2028 2028 { 2029 2029 Node* rootNode = const_cast<Node*>(this); 2030 while (parentOr HostOrFrameOwner(rootNode))2031 rootNode = parentOr HostOrFrameOwner(rootNode);2030 while (parentOrShadowHostOrFrameOwner(rootNode)) 2031 rootNode = parentOrShadowHostOrFrameOwner(rootNode); 2032 2032 showSubTreeAcrossFrame(rootNode, this, ""); 2033 2033 } … … 2062 2062 Node* Node::enclosingLinkEventParentOrSelf() 2063 2063 { 2064 for (Node* node = this; node; node = node->parentOr HostNode()) {2064 for (Node* node = this; node; node = node->parentOrShadowHostNode()) { 2065 2065 // For imagemaps, the enclosing link node is the associated area element not the image itself. 2066 2066 // So we don't let images be the enclosingLinkNode, even though isLink sometimes returns true … … 2491 2491 Node* startNode = this; 2492 2492 while (startNode && !startNode->renderer()) 2493 startNode = startNode->parentOr HostNode();2493 startNode = startNode->parentOrShadowHostNode(); 2494 2494 2495 2495 if (startNode && startNode->renderer()) … … 2584 2584 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); 2585 2585 ScriptWrappable::reportMemoryUsage(memoryObjectInfo); 2586 info.addMember(m_parentOr HostNode);2586 info.addMember(m_parentOrShadowHostNode); 2587 2587 info.addMember(m_treeScope); 2588 2588 info.addMember(m_next); … … 2628 2628 return; 2629 2629 2630 for (Node* node = parentOr HostNode(); node; node = node->parentOrHostNode())2630 for (Node* node = parentOrShadowHostNode(); node; node = node->parentOrShadowHostNode()) 2631 2631 node->decrementConnectedSubframeCount(count); 2632 2632 } … … 2639 2639 return; 2640 2640 2641 for (Node* node = parentOr HostNode(); node; node = node->parentOrHostNode())2641 for (Node* node = parentOrShadowHostNode(); node; node = node->parentOrShadowHostNode()) 2642 2642 node->incrementConnectedSubframeCount(count); 2643 2643 } -
trunk/Source/WebCore/dom/Node.h
r140807 r141524 276 276 277 277 // Node's parent, shadow tree host. 278 // FIXME: These methods should be renamed parentOrShadowHost* 279 ContainerNode* parentOrHostNode() const; 280 Element* parentOrHostElement() const; 281 void setParentOrHostNode(ContainerNode*); 278 ContainerNode* parentOrShadowHostNode() const; 279 Element* parentOrShadowHostElement() const; 280 void setParentOrShadowHostNode(ContainerNode*); 282 281 Node* highestAncestor() const; 283 282 … … 779 778 780 779 void removedLastRef(); 781 bool hasTreeSharedParent() const { return !!parentOr HostNode(); }780 bool hasTreeSharedParent() const { return !!parentOrShadowHostNode(); } 782 781 783 782 enum EditableLevel { Editable, RichlyEditable }; … … 813 812 814 813 mutable uint32_t m_nodeFlags; 815 ContainerNode* m_parentOr HostNode;814 ContainerNode* m_parentOrShadowHostNode; 816 815 TreeScope* m_treeScope; 817 816 Node* m_previous; … … 849 848 } 850 849 851 inline void Node::setParentOr HostNode(ContainerNode* parent)850 inline void Node::setParentOrShadowHostNode(ContainerNode* parent) 852 851 { 853 852 ASSERT(isMainThread()); 854 m_parentOr HostNode = parent;853 m_parentOrShadowHostNode = parent; 855 854 } 856 855 857 inline ContainerNode* Node::parentOr HostNode() const856 inline ContainerNode* Node::parentOrShadowHostNode() const 858 857 { 859 858 ASSERT(isMainThreadOrGCThread()); 860 return m_parentOr HostNode;859 return m_parentOrShadowHostNode; 861 860 } 862 861 863 862 inline ContainerNode* Node::parentNode() const 864 863 { 865 return isShadowRoot() ? 0 : parentOr HostNode();864 return isShadowRoot() ? 0 : parentOrShadowHostNode(); 866 865 } 867 866 … … 869 868 { 870 869 ASSERT(!isShadowRoot()); 871 return parentOr HostNode();870 return parentOrShadowHostNode(); 872 871 } 873 872 -
trunk/Source/WebCore/dom/PseudoElement.cpp
r141119 r141524 59 59 { 60 60 ASSERT(pseudoId != NOPSEUDO); 61 setParentOr HostNode(parent);61 setParentOrShadowHostNode(parent); 62 62 setHasCustomCallbacks(); 63 63 } … … 65 65 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer() 66 66 { 67 return parentOr HostElement()->renderer()->getCachedPseudoStyle(m_pseudoId);67 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseudoId); 68 68 } 69 69 -
trunk/Source/WebCore/dom/ShadowRoot.h
r141516 r141524 65 65 void setResetStyleInheritance(bool); 66 66 67 Element* host() const { return toElement(parentOr HostNode()); }67 Element* host() const { return toElement(parentOrShadowHostNode()); } 68 68 ElementShadow* owner() const { return host() ? host()->shadow() : 0; } 69 69 -
trunk/Source/WebCore/dom/Text.cpp
r137715 r141524 254 254 static bool isSVGText(Text* text) 255 255 { 256 Node* parentOr HostNode = text->parentOrHostNode();257 return parentOr HostNode->isSVGElement() && !parentOrHostNode->hasTagName(SVGNames::foreignObjectTag);256 Node* parentOrShadowHostNode = text->parentOrShadowHostNode(); 257 return parentOrShadowHostNode->isSVGElement() && !parentOrShadowHostNode->hasTagName(SVGNames::foreignObjectTag); 258 258 } 259 259 #endif -
trunk/Source/WebCore/editing/FrameSelection.cpp
r141243 r141524 1886 1886 return; 1887 1887 } 1888 target = target->parentOr HostNode();1888 target = target->parentOrShadowHostNode(); 1889 1889 } 1890 1890 m_frame->document()->setFocusedNode(0); -
trunk/Source/WebCore/editing/TextIterator.cpp
r141196 r141524 178 178 { 179 179 unsigned depth = 0; 180 for (Node* parent = node->parentOr HostNode(); parent; parent = parent->parentOrHostNode())180 for (Node* parent = node->parentOrShadowHostNode(); parent; parent = parent->parentOrShadowHostNode()) 181 181 ++depth; 182 182 return depth; … … 194 194 return next; 195 195 } 196 for (Node* node = rangeEndContainer; node; node = node->parentOr HostNode()) {196 for (Node* node = rangeEndContainer; node; node = node->parentOrShadowHostNode()) { 197 197 if (Node* next = node->nextSibling()) 198 198 return next; … … 232 232 // Put the nodes in a vector so we can iterate in reverse order. 233 233 Vector<Node*, 100> ancestry; 234 for (Node* parent = node->parentOr HostNode(); parent; parent = parent->parentOrHostNode())234 for (Node* parent = node->parentOrShadowHostNode(); parent; parent = parent->parentOrShadowHostNode()) 235 235 ancestry.append(parent); 236 236 … … 428 428 if (!next) { 429 429 bool pastEnd = NodeTraversal::next(m_node) == m_pastEndNode; 430 Node* parentNode = m_node->parentOr HostNode();430 Node* parentNode = m_node->parentOrShadowHostNode(); 431 431 while (!next && parentNode) { 432 432 if ((pastEnd && parentNode == m_endContainer) || m_endContainer->isDescendantOf(parentNode)) … … 435 435 m_node = parentNode; 436 436 m_fullyClippedStack.pop(); 437 parentNode = m_node->parentOr HostNode();437 parentNode = m_node->parentOrShadowHostNode(); 438 438 if (haveRenderer) 439 439 exitNode(); … … 1236 1236 // Exit all other containers. 1237 1237 while (!m_node->previousSibling()) { 1238 if (!advanceRespectingRange(m_node->parentOr HostNode()))1238 if (!advanceRespectingRange(m_node->parentOrShadowHostNode())) 1239 1239 break; 1240 1240 m_fullyClippedStack.pop(); -
trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp
r140807 r141524 59 59 m_contentFrame = frame; 60 60 61 for (ContainerNode* node = this; node; node = node->parentOr HostNode())61 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()) 62 62 node->incrementConnectedSubframeCount(); 63 63 } … … 70 70 m_contentFrame = 0; 71 71 72 for (ContainerNode* node = this; node; node = node->parentOr HostNode())72 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()) 73 73 node->decrementConnectedSubframeCount(); 74 74 } -
trunk/Source/WebCore/html/HTMLFrameOwnerElement.h
r141516 r141524 94 94 static bool canLoadFrame(HTMLFrameOwnerElement* owner) 95 95 { 96 for (Node* node = owner; node; node = node->parentOr HostNode()) {96 for (Node* node = owner; node; node = node->parentOrShadowHostNode()) { 97 97 if (disabledSubtreeRoots().contains(node)) 98 98 return false; -
trunk/Source/WebCore/html/HTMLStyleElement.cpp
r137708 r141524 239 239 // As written, such a stylesheet could style the host element, as well as children of the host. 240 240 // OTOH, this paves the way for a :bound-element implementation. 241 ContainerNode* parentOr Host = parentOrHostNode();242 if (!parentOr Host || !parentOrHost->isElementNode())241 ContainerNode* parentOrShadowHost = parentOrShadowHostNode(); 242 if (!parentOrShadowHost || !parentOrShadowHost->isElementNode()) 243 243 return 0; 244 244 245 return toElement(parentOr Host);245 return toElement(parentOrShadowHost); 246 246 } 247 247 -
trunk/Source/WebCore/html/MediaDocument.cpp
r138285 r141524 154 154 { 155 155 while (node && !node->hasTagName(videoTag)) 156 node = node->parentOr HostNode();156 node = node->parentOrShadowHostNode(); 157 157 158 158 return static_cast<HTMLVideoElement*>(node); -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r141436 r141524 803 803 ancestors.append(node); 804 804 if (includeAncestors) { 805 for (ContainerNode* ancestor = node->parentOr HostNode(); ancestor; ancestor = ancestor->parentOrHostNode())805 for (ContainerNode* ancestor = node->parentOrShadowHostNode(); ancestor; ancestor = ancestor->parentOrShadowHostNode()) 806 806 ancestors.append(ancestor); 807 807 } -
trunk/Source/WebCore/page/EventHandler.cpp
r141394 r141524 2269 2269 break; 2270 2270 } 2271 node = node->parentOr HostNode();2271 node = node->parentOrShadowHostNode(); 2272 2272 } 2273 2273 -
trunk/Source/WebCore/page/TouchAdjustment.cpp
r136001 r141524 239 239 Vector<Node*> visitedNodes; 240 240 Node* respondingNode = 0; 241 for (Node* visitedNode = node; visitedNode; visitedNode = visitedNode->parentOr HostNode()) {241 for (Node* visitedNode = node; visitedNode; visitedNode = visitedNode->parentOrShadowHostNode()) { 242 242 // Check if we already have a result for a common ancestor from another candidate. 243 243 respondingNode = responderMap.get(visitedNode); … … 249 249 respondingNode = visitedNode; 250 250 // Continue the iteration to collect the ancestors of the responder, which we will need later. 251 for (visitedNode = visitedNode->parentOr HostNode(); visitedNode; visitedNode = visitedNode->parentOrHostNode()) {251 for (visitedNode = visitedNode->parentOrShadowHostNode(); visitedNode; visitedNode = visitedNode->parentOrShadowHostNode()) { 252 252 HashSet<Node*>::AddResult addResult = ancestorsToRespondersSet.add(visitedNode); 253 253 if (!addResult.isNewEntry) … … 282 282 if (candidate->isContentEditable()) { 283 283 Node* replacement = candidate; 284 Node* parent = candidate->parentOr HostNode();284 Node* parent = candidate->parentOrShadowHostNode(); 285 285 while (parent && parent->isContentEditable()) { 286 286 replacement = parent; … … 290 290 } 291 291 editableAncestors.add(replacement); 292 parent = parent->parentOr HostNode();292 parent = parent->parentOrShadowHostNode(); 293 293 } 294 294 candidate = replacement; -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r140541 r141524 269 269 { 270 270 if (n && n->isPseudoElement()) 271 n = n->parentOr HostNode();271 n = n->parentOrShadowHostNode(); 272 272 m_innerNode = n; 273 273 } … … 276 276 { 277 277 if (n && n->isPseudoElement()) 278 n = n->parentOr HostNode();278 n = n->parentOrShadowHostNode(); 279 279 m_innerNonSharedNode = n; 280 280 } -
trunk/Source/WebCore/rendering/RenderObject.h
r140506 r141524 612 612 // This is the same as node() except for renderers of :before and :after 613 613 // pseudo elements for which their parent node is returned. 614 Node* generatingNode() const { return isPseudoElement() ? node()->parentOr HostNode() : node(); }614 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrShadowHostNode() : node(); } 615 615 616 616 Document* document() const { return m_node->document(); } -
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
r138909 r141524 792 792 Node* parent; 793 793 for (Node* n = node; n; n = parent) { 794 parent = n->parentOr HostNode();794 parent = n->parentOrShadowHostNode(); 795 795 if (n != node) 796 796 result.appendLiteral(" of "); -
trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
r137847 r141524 141 141 break; 142 142 143 current = current->parentOr HostNode();143 current = current->parentOrShadowHostNode(); 144 144 } 145 145 } -
trunk/Source/WebCore/svg/SVGElement.cpp
r138823 r141524 122 122 // for a <symbol> element or a cloned <svg> element in the referenced tree. In that case 123 123 // we're always an inner <svg> element. 124 if (isInShadowTree() && parentOr HostElement() && parentOrHostElement()->isSVGElement())124 if (isInShadowTree() && parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElement()) 125 125 return false; 126 126 … … 188 188 SVGSVGElement* SVGElement::ownerSVGElement() const 189 189 { 190 ContainerNode* n = parentOr HostNode();190 ContainerNode* n = parentOrShadowHostNode(); 191 191 while (n) { 192 192 if (n->hasTagName(SVGNames::svgTag)) 193 193 return static_cast<SVGSVGElement*>(n); 194 194 195 n = n->parentOr HostNode();195 n = n->parentOrShadowHostNode(); 196 196 } 197 197 … … 203 203 // This function needs shadow tree support - as RenderSVGContainer uses this function 204 204 // to determine the "overflow" property. <use> on <symbol> wouldn't work otherwhise. 205 ContainerNode* n = parentOr HostNode();205 ContainerNode* n = parentOrShadowHostNode(); 206 206 while (n) { 207 207 if (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::imageTag) || n->hasTagName(SVGNames::symbolTag)) 208 208 return static_cast<SVGElement*>(n); 209 209 210 n = n->parentOr HostNode();210 n = n->parentOrShadowHostNode(); 211 211 } 212 212 … … 442 442 return true; 443 443 444 for (element = element->parentOr HostElement(); element; element = element->parentOrHostElement()) {444 for (element = element->parentOrShadowHostElement(); element; element = element->parentOrShadowHostElement()) { 445 445 const EventListenerVector& entry = element->getEventListeners(eventNames().loadEvent); 446 446 for (size_t i = 0; i < entry.size(); ++i) { … … 459 459 RefPtr<Element> parent; 460 460 if (sendParentLoadEvents) 461 parent = currentTarget->parentOr HostElement(); // save the next parent to dispatch too incase dispatching the event changes the tree461 parent = currentTarget->parentOrShadowHostElement(); // save the next parent to dispatch too incase dispatching the event changes the tree 462 462 if (hasLoadListener(currentTarget.get())) 463 463 currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); … … 586 586 587 587 RenderStyle* style = 0; 588 if (Element* parent = parentOr HostElement()) {588 if (Element* parent = parentOrShadowHostElement()) { 589 589 if (RenderObject* renderer = parent->renderer()) 590 590 style = renderer->style(); … … 618 618 619 619 RenderStyle* parentStyle = 0; 620 if (Element* parent = parentOr HostElement()) {620 if (Element* parent = parentOrShadowHostElement()) { 621 621 if (RenderObject* renderer = parent->renderer()) 622 622 parentStyle = renderer->style(); -
trunk/Source/WebCore/svg/SVGElementInstance.h
r140784 r141524 48 48 virtual ~SVGElementInstance(); 49 49 50 void setParentOr HostNode(SVGElementInstance* instance) { m_parentInstance = instance; }50 void setParentOrShadowHostNode(SVGElementInstance* instance) { m_parentInstance = instance; } 51 51 52 52 virtual const AtomicString& interfaceName() const; -
trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp
r135069 r141524 154 154 // Note that we currently do not support foreignObject instantiation via <use>, hence it is safe 155 155 // to use parentElement() here. If that changes, this method should be updated to use 156 // parentOr HostElement() instead.156 // parentOrShadowHostElement() instead. 157 157 Element* ancestor = parentElement(); 158 158 while (ancestor && ancestor->isSVGElement()) { -
trunk/Source/WebCore/svg/SVGGElement.cpp
r135069 r141524 113 113 // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, even if 114 114 // display is set to 'none' - which is special to SVG <g> container elements. 115 return parentOr HostElement() && parentOrHostElement()->isSVGElement();115 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElement(); 116 116 } 117 117 -
trunk/Source/WebCore/svg/SVGLocatable.cpp
r109097 r141524 44 44 { 45 45 ASSERT(element); 46 for (Element* current = element->parentOr HostElement(); current; current = current->parentOrHostElement()) {46 for (Element* current = element->parentOrShadowHostElement(); current; current = current->parentOrShadowHostElement()) { 47 47 if (isViewportElement(current)) 48 48 return static_cast<SVGElement*>(current); … … 56 56 ASSERT(element); 57 57 SVGElement* farthest = 0; 58 for (Element* current = element->parentOr HostElement(); current; current = current->parentOrHostElement()) {58 for (Element* current = element->parentOrShadowHostElement(); current; current = current->parentOrShadowHostElement()) { 59 59 if (isViewportElement(current)) 60 60 farthest = static_cast<SVGElement*>(current); … … 85 85 86 86 SVGElement* stopAtElement = mode == NearestViewportScope ? nearestViewportElement(element) : 0; 87 for (Element* currentElement = element; currentElement; currentElement = currentElement->parentOr HostElement()) {87 for (Element* currentElement = element; currentElement; currentElement = currentElement->parentOrShadowHostElement()) { 88 88 if (!currentElement->isSVGElement()) 89 89 break; -
trunk/Source/WebCore/svg/SVGStyledElement.cpp
r139457 r141524 123 123 // with the SVG content. In general, the SVG user agent will include the unknown 124 124 // elements in the DOM but will otherwise ignore unknown elements. 125 if (!parentOr HostElement() || parentOrHostElement()->isSVGElement())125 if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement()) 126 126 return StyledElement::rendererIsNeeded(context); 127 127 -
trunk/Source/WebKit2/ChangeLog
r141510 r141524 1 2013-01-31 Changhun Kang <temoochin@company100.net> 2 3 Rename from parentOrHost* to parentOrShadowHost* in Node.h. 4 https://bugs.webkit.org/show_bug.cgi?id=108308 5 6 Reviewed by Dimitri Glazkov. 7 1 8 2013-01-31 Anders Carlsson <andersca@apple.com> 2 9 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r141486 r141524 1769 1769 // Find the node to highlight. This is not the same as the node responding the tap gesture, because many 1770 1770 // pages has a global click handler and we do not want to highlight the body. 1771 for (Node* node = adjustedNode; node; node = node->parentOr HostNode()) {1771 for (Node* node = adjustedNode; node; node = node->parentOrShadowHostNode()) { 1772 1772 if (node->isDocumentNode() || node->isFrameOwnerElement()) 1773 1773 break;
Note: See TracChangeset
for help on using the changeset viewer.