Changeset 74406 in webkit
- Timestamp:
- Dec 21, 2010 1:55:53 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74404 r74406 1 2010-12-21 Dominic Cooney <dominicc@google.com> 2 3 Reviewed by Adam Barth. 4 5 Rename Node::isShadowNode to isShadowRoot 6 https://bugs.webkit.org/show_bug.cgi?id=51060 7 8 The method gets whether the node is the root of a shadow tree; 9 renamed to reflect intent. 10 11 A simple rename--no new tests needed. 12 13 * css/CSSStyleSelector.cpp: 14 (WebCore::CSSStyleSelector::initForStyleResolve): 15 (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): 16 * dom/Node.cpp: 17 (WebCore::Node::shadowTreeRootNode): 18 (WebCore::Node::isInShadowTree): 19 (WebCore::eventTargetRespectingSVGTargetRules): 20 (WebCore::Node::getEventAncestors): 21 * dom/Node.h: 22 (WebCore::Node::isShadowRoot): 23 * dom/Range.cpp: 24 (WebCore::Range::checkNodeBA): 25 * page/DragController.cpp: 26 (WebCore::asFileInput): 27 * page/EventHandler.cpp: 28 (WebCore::EventHandler::handleMousePressEvent): 29 (WebCore::EventHandler::dispatchMouseEvent): 30 * rendering/RenderBlock.cpp: 31 (WebCore::RenderBlock::hasLineIfEmpty): 32 * rendering/TextControlInnerElements.cpp: 33 (WebCore::TextControlInnerElement::attachInnerElement): 34 * svg/SVGStyledElement.cpp: 35 (WebCore::SVGStyledElement::title): 36 * svg/SVGUseElement.cpp: 37 (WebCore::ShadowTreeUpdateBlocker::while): 38 * svg/animation/SVGSMILElement.cpp: 39 (WebCore::SVGSMILElement::insertedIntoDocument): 40 1 41 2010-12-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 42 -
trunk/WebCore/css/CSSStyleSelector.cpp
r74049 r74406 762 762 763 763 #if ENABLE(SVG) 764 if (!m_parentNode && e && e->isSVGElement() && e->isShadow Node())764 if (!m_parentNode && e && e->isSVGElement() && e->isShadowRoot()) 765 765 m_parentNode = e->shadowParentNode(); 766 766 #endif … … 1893 1893 // Spec: CSS2 selectors cannot be applied to the (conceptually) cloned DOM tree 1894 1894 // because its contents are not part of the formal document structure. 1895 if (e->isSVGElement() && e->isShadow Node())1895 if (e->isSVGElement() && e->isShadowRoot()) 1896 1896 return SelectorFailsCompletely; 1897 1897 #endif -
trunk/WebCore/dom/Node.cpp
r73690 r74406 1458 1458 Node* root = this; 1459 1459 while (root) { 1460 if (root->isShadow Node())1460 if (root->isShadowRoot()) 1461 1461 return root; 1462 1462 root = root->parentNodeGuaranteedHostFree(); … … 1468 1468 { 1469 1469 for (Node* n = this; n; n = n->parentNode()) 1470 if (n->isShadow Node())1470 if (n->isShadowRoot()) 1471 1471 return true; 1472 1472 return false; … … 2523 2523 // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects 2524 2524 for (Node* n = referenceNode; n; n = n->parentNode()) { 2525 if (!n->isShadow Node() || !n->isSVGElement())2525 if (!n->isShadowRoot() || !n->isSVGElement()) 2526 2526 continue; 2527 2527 … … 2546 2546 bool shouldSkipNextAncestor = false; 2547 2547 while (true) { 2548 if (ancestor->isShadow Node()) {2548 if (ancestor->isShadowRoot()) { 2549 2549 if (behavior == StayInsideShadowDOM) 2550 2550 return; … … 2560 2560 #if ENABLE(SVG) 2561 2561 // Skip SVGShadowTreeRootElement. 2562 shouldSkipNextAncestor = ancestor->isSVGElement() && ancestor->isShadow Node();2562 shouldSkipNextAncestor = ancestor->isSVGElement() && ancestor->isShadowRoot(); 2563 2563 if (shouldSkipNextAncestor) 2564 2564 continue; -
trunk/WebCore/dom/Node.h
r73690 r74406 206 206 virtual bool isCharacterDataNode() const { return false; } 207 207 bool isDocumentNode() const; 208 bool isShadow Node() const { return getFlag(IsShadowRootFlag); }208 bool isShadowRoot() const { return getFlag(IsShadowRootFlag); } 209 209 // FIXME: Eliminate all uses, fold into shadowHost. 210 210 ContainerNode* shadowParentNode() const; -
trunk/WebCore/dom/Range.cpp
r73818 r74406 1189 1189 case Node::TEXT_NODE: 1190 1190 case Node::XPATH_NAMESPACE_NODE: 1191 if (root->isShadow Node())1191 if (root->isShadowRoot()) 1192 1192 break; 1193 1193 ec = RangeException::INVALID_NODE_TYPE_ERR; -
trunk/WebCore/page/DragController.cpp
r73276 r74406 256 256 // In order to get around this problem we assume any non-FILE input element 257 257 // is this internal button, and try querying the shadow parent node. 258 if (node->hasTagName(HTMLNames::inputTag) && node->isShadow Node() && !static_cast<HTMLInputElement*>(node)->isFileUpload())258 if (node->hasTagName(HTMLNames::inputTag) && node->isShadowRoot() && !static_cast<HTMLInputElement*>(node)->isFileUpload()) 259 259 node = node->shadowParentNode(); 260 260 -
trunk/WebCore/page/EventHandler.cpp
r73952 r74406 1384 1384 // we'd like to EventHandler::handleMousePressEvent to pass the event to the widget and thus the 1385 1385 // event target node can't still be the shadow node. 1386 if (mev.targetNode()->isShadow Node() && mev.targetNode()->shadowParentNode()->hasTagName(inputTag)) {1386 if (mev.targetNode()->isShadowRoot() && mev.targetNode()->shadowParentNode()->hasTagName(inputTag)) { 1387 1387 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); 1388 1388 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent); … … 1914 1914 // will set a selection inside it, which will call setFocuseNodeIfNeeded. 1915 1915 ExceptionCode ec = 0; 1916 Node* n = node->isShadow Node() ? node->shadowParentNode() : node;1916 Node* n = node->isShadowRoot() ? node->shadowParentNode() : node; 1917 1917 if (m_frame->selection()->isRange() 1918 1918 && m_frame->selection()->toNormalizedRange()->compareNode(n, ec) == Range::NODE_INSIDE -
trunk/WebCore/rendering/RenderBlock.cpp
r74121 r74406 4902 4902 return true; 4903 4903 4904 if (node()->isShadow Node() && (node()->shadowParentNode()->hasTagName(inputTag)))4904 if (node()->isShadowRoot() && (node()->shadowParentNode()->hasTagName(inputTag))) 4905 4905 return true; 4906 4906 -
trunk/WebCore/rendering/TextControlInnerElements.cpp
r73618 r74406 105 105 106 106 // For elements not yet in shadow DOM, add the node to the DOM normally. 107 if (!isShadow Node()) {107 if (!isShadowRoot()) { 108 108 // FIXME: This code seems very wrong. Why are we magically adding |this| to the DOM here? 109 109 // We shouldn't be calling parser API methods outside of the parser! -
trunk/WebCore/svg/SVGStyledElement.cpp
r73618 r74406 81 81 Node* parent = const_cast<SVGStyledElement*>(this); 82 82 while (parent) { 83 if (!parent->isShadow Node()) {83 if (!parent->isShadowRoot()) { 84 84 parent = parent->parentNodeGuaranteedHostFree(); 85 85 continue; -
trunk/WebCore/svg/SVGUseElement.cpp
r73618 r74406 494 494 ContainerNode* parent = parentNode(); 495 495 while (parent) { 496 if (parent->isShadow Node())496 if (parent->isShadowRoot()) 497 497 return; 498 498 499 499 parent = parent->parentNodeGuaranteedHostFree(); 500 500 } 501 501 502 502 SVGElement* target = 0; 503 503 if (targetElement && targetElement->isSVGElement()) -
trunk/WebCore/svg/animation/SVGSMILElement.cpp
r72259 r74406 149 149 // Verify we are not in <use> instance tree. 150 150 for (ContainerNode* n = this; n; n = n->parentNode()) 151 ASSERT(!n->isShadow Node());151 ASSERT(!n->isShadowRoot()); 152 152 #endif 153 153 SVGSVGElement* owner = ownerSVGElement(); … … 962 962 963 963 #endif 964
Note: See TracChangeset
for help on using the changeset viewer.