[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
commit-queue at webkit.org
commit-queue at webkit.org
Mon Dec 27 16:27:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3fa5e11c31eae1f8f6d0f57dcfbfe7d5da0885f7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 21 09:55:53 2010 +0000
2010-12-21 Dominic Cooney <dominicc at google.com>
Reviewed by Adam Barth.
Rename Node::isShadowNode to isShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=51060
The method gets whether the node is the root of a shadow tree;
renamed to reflect intent.
A simple rename--no new tests needed.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForStyleResolve):
(WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
* dom/Node.cpp:
(WebCore::Node::shadowTreeRootNode):
(WebCore::Node::isInShadowTree):
(WebCore::eventTargetRespectingSVGTargetRules):
(WebCore::Node::getEventAncestors):
* dom/Node.h:
(WebCore::Node::isShadowRoot):
* dom/Range.cpp:
(WebCore::Range::checkNodeBA):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::dispatchMouseEvent):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::attachInnerElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
* svg/SVGUseElement.cpp:
(WebCore::ShadowTreeUpdateBlocker::while):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedIntoDocument):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4727a6b..4547891 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,43 @@
+2010-12-21 Dominic Cooney <dominicc at google.com>
+
+ Reviewed by Adam Barth.
+
+ Rename Node::isShadowNode to isShadowRoot
+ https://bugs.webkit.org/show_bug.cgi?id=51060
+
+ The method gets whether the node is the root of a shadow tree;
+ renamed to reflect intent.
+
+ A simple rename--no new tests needed.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::initForStyleResolve):
+ (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
+ * dom/Node.cpp:
+ (WebCore::Node::shadowTreeRootNode):
+ (WebCore::Node::isInShadowTree):
+ (WebCore::eventTargetRespectingSVGTargetRules):
+ (WebCore::Node::getEventAncestors):
+ * dom/Node.h:
+ (WebCore::Node::isShadowRoot):
+ * dom/Range.cpp:
+ (WebCore::Range::checkNodeBA):
+ * page/DragController.cpp:
+ (WebCore::asFileInput):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::dispatchMouseEvent):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::hasLineIfEmpty):
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::TextControlInnerElement::attachInnerElement):
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::title):
+ * svg/SVGUseElement.cpp:
+ (WebCore::ShadowTreeUpdateBlocker::while):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::insertedIntoDocument):
+
2010-12-20 Mahesh Kulkarni <mahesh.kulkarni at nokia.com>
Reviewed by Andreas Kling.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index f0848f4..fc1cecf 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -761,7 +761,7 @@ inline void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* paren
m_parentNode = e ? e->parentNode() : 0;
#if ENABLE(SVG)
- if (!m_parentNode && e && e->isSVGElement() && e->isShadowNode())
+ if (!m_parentNode && e && e->isSVGElement() && e->isShadowRoot())
m_parentNode = e->shadowParentNode();
#endif
@@ -1892,7 +1892,7 @@ CSSStyleSelector::SelectorMatch CSSStyleSelector::SelectorChecker::checkSelector
#if ENABLE(SVG)
// Spec: CSS2 selectors cannot be applied to the (conceptually) cloned DOM tree
// because its contents are not part of the formal document structure.
- if (e->isSVGElement() && e->isShadowNode())
+ if (e->isSVGElement() && e->isShadowRoot())
return SelectorFailsCompletely;
#endif
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index 81a642b..c0d47e4 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -1457,7 +1457,7 @@ Node* Node::shadowTreeRootNode()
{
Node* root = this;
while (root) {
- if (root->isShadowNode())
+ if (root->isShadowRoot())
return root;
root = root->parentNodeGuaranteedHostFree();
}
@@ -1467,7 +1467,7 @@ Node* Node::shadowTreeRootNode()
bool Node::isInShadowTree()
{
for (Node* n = this; n; n = n->parentNode())
- if (n->isShadowNode())
+ if (n->isShadowRoot())
return true;
return false;
}
@@ -2522,7 +2522,7 @@ static inline EventTarget* eventTargetRespectingSVGTargetRules(Node* referenceNo
// Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included
// as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects
for (Node* n = referenceNode; n; n = n->parentNode()) {
- if (!n->isShadowNode() || !n->isSVGElement())
+ if (!n->isShadowRoot() || !n->isSVGElement())
continue;
ContainerNode* shadowTreeParentElement = n->shadowParentNode();
@@ -2545,7 +2545,7 @@ void Node::getEventAncestors(Vector<EventContext>& ancestors, EventTarget* origi
Node* ancestor = this;
bool shouldSkipNextAncestor = false;
while (true) {
- if (ancestor->isShadowNode()) {
+ if (ancestor->isShadowRoot()) {
if (behavior == StayInsideShadowDOM)
return;
ancestor = ancestor->shadowParentNode();
@@ -2559,7 +2559,7 @@ void Node::getEventAncestors(Vector<EventContext>& ancestors, EventTarget* origi
#if ENABLE(SVG)
// Skip SVGShadowTreeRootElement.
- shouldSkipNextAncestor = ancestor->isSVGElement() && ancestor->isShadowNode();
+ shouldSkipNextAncestor = ancestor->isSVGElement() && ancestor->isShadowRoot();
if (shouldSkipNextAncestor)
continue;
#endif
diff --git a/WebCore/dom/Node.h b/WebCore/dom/Node.h
index 0881f08..9709688 100644
--- a/WebCore/dom/Node.h
+++ b/WebCore/dom/Node.h
@@ -205,7 +205,7 @@ public:
bool isCommentNode() const { return getFlag(IsCommentFlag); }
virtual bool isCharacterDataNode() const { return false; }
bool isDocumentNode() const;
- bool isShadowNode() const { return getFlag(IsShadowRootFlag); }
+ bool isShadowRoot() const { return getFlag(IsShadowRootFlag); }
// FIXME: Eliminate all uses, fold into shadowHost.
ContainerNode* shadowParentNode() const;
Node* shadowAncestorNode();
diff --git a/WebCore/dom/Range.cpp b/WebCore/dom/Range.cpp
index 8b5ac56..1f15f26 100644
--- a/WebCore/dom/Range.cpp
+++ b/WebCore/dom/Range.cpp
@@ -1188,7 +1188,7 @@ void Range::checkNodeBA(Node* n, ExceptionCode& ec) const
case Node::PROCESSING_INSTRUCTION_NODE:
case Node::TEXT_NODE:
case Node::XPATH_NAMESPACE_NODE:
- if (root->isShadowNode())
+ if (root->isShadowRoot())
break;
ec = RangeException::INVALID_NODE_TYPE_ERR;
return;
diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp
index 3b0dd31..8ee5a8d 100644
--- a/WebCore/page/DragController.cpp
+++ b/WebCore/page/DragController.cpp
@@ -255,7 +255,7 @@ static HTMLInputElement* asFileInput(Node* node)
// The button for a FILE input is a sub element with no set input type
// In order to get around this problem we assume any non-FILE input element
// is this internal button, and try querying the shadow parent node.
- if (node->hasTagName(HTMLNames::inputTag) && node->isShadowNode() && !static_cast<HTMLInputElement*>(node)->isFileUpload())
+ if (node->hasTagName(HTMLNames::inputTag) && node->isShadowRoot() && !static_cast<HTMLInputElement*>(node)->isFileUpload())
node = node->shadowParentNode();
if (!node || !node->hasTagName(HTMLNames::inputTag))
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 281498a..9cc3b16 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -1383,7 +1383,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
// If a mouse event handler changes the input element type to one that has a widget associated,
// we'd like to EventHandler::handleMousePressEvent to pass the event to the widget and thus the
// event target node can't still be the shadow node.
- if (mev.targetNode()->isShadowNode() && mev.targetNode()->shadowParentNode()->hasTagName(inputTag)) {
+ if (mev.targetNode()->isShadowRoot() && mev.targetNode()->shadowParentNode()->hasTagName(inputTag)) {
HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent);
}
@@ -1913,7 +1913,7 @@ bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
// focused if the user does a mouseup over it, however, because the mouseup
// will set a selection inside it, which will call setFocuseNodeIfNeeded.
ExceptionCode ec = 0;
- Node* n = node->isShadowNode() ? node->shadowParentNode() : node;
+ Node* n = node->isShadowRoot() ? node->shadowParentNode() : node;
if (m_frame->selection()->isRange()
&& m_frame->selection()->toNormalizedRange()->compareNode(n, ec) == Range::NODE_INSIDE
&& n->isDescendantOf(m_frame->document()->focusedNode()))
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 146f427..7760503 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -4901,7 +4901,7 @@ bool RenderBlock::hasLineIfEmpty() const
if (node()->isContentEditable() && node()->rootEditableElement() == node())
return true;
- if (node()->isShadowNode() && (node()->shadowParentNode()->hasTagName(inputTag)))
+ if (node()->isShadowRoot() && (node()->shadowParentNode()->hasTagName(inputTag)))
return true;
return false;
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp
index 9c21542..d6fc7aa 100644
--- a/WebCore/rendering/TextControlInnerElements.cpp
+++ b/WebCore/rendering/TextControlInnerElements.cpp
@@ -104,7 +104,7 @@ void TextControlInnerElement::attachInnerElement(Node* parent, PassRefPtr<Render
setInDocument();
// For elements not yet in shadow DOM, add the node to the DOM normally.
- if (!isShadowNode()) {
+ if (!isShadowRoot()) {
// FIXME: This code seems very wrong. Why are we magically adding |this| to the DOM here?
// We shouldn't be calling parser API methods outside of the parser!
parent->deprecatedParserAddChild(this);
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index bed2b65..a9fadb6 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -80,7 +80,7 @@ String SVGStyledElement::title() const
// Walk up the tree, to find out whether we're inside a <use> shadow tree, to find the right title.
Node* parent = const_cast<SVGStyledElement*>(this);
while (parent) {
- if (!parent->isShadowNode()) {
+ if (!parent->isShadowRoot()) {
parent = parent->parentNodeGuaranteedHostFree();
continue;
}
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index ec3d542..9ec604e 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -493,12 +493,12 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGShadowTreeRootElement* shadowR
// The will be expanded soon anyway - see expandUseElementsInShadowTree().
ContainerNode* parent = parentNode();
while (parent) {
- if (parent->isShadowNode())
+ if (parent->isShadowRoot())
return;
parent = parent->parentNodeGuaranteedHostFree();
}
-
+
SVGElement* target = 0;
if (targetElement && targetElement->isSVGElement())
target = static_cast<SVGElement*>(targetElement);
diff --git a/WebCore/svg/animation/SVGSMILElement.cpp b/WebCore/svg/animation/SVGSMILElement.cpp
index 441cfc3..a6aa6a7 100644
--- a/WebCore/svg/animation/SVGSMILElement.cpp
+++ b/WebCore/svg/animation/SVGSMILElement.cpp
@@ -148,7 +148,7 @@ void SVGSMILElement::insertedIntoDocument()
#ifndef NDEBUG
// Verify we are not in <use> instance tree.
for (ContainerNode* n = this; n; n = n->parentNode())
- ASSERT(!n->isShadowNode());
+ ASSERT(!n->isShadowRoot());
#endif
SVGSVGElement* owner = ownerSVGElement();
if (!owner)
@@ -961,4 +961,3 @@ void SVGSMILElement::beginByLinkActivation()
}
#endif
-
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list