[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 15:09:35 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 54439938aed8d355f25f2ed7e2d71c4795339d20
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 7 23:48:52 2011 +0000
2011-01-07 Rafael Weinstein <rafaelw at chromium.org>
Reviewed by Eric Seidel.
Cleanup: Fold shadowParentNode into shadowHost
https://bugs.webkit.org/show_bug.cgi?id=51059
Replaces all uses of shadowParentNode.
No new tests because no behavior has changed.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForStyleResolve):
* dom/Node.cpp:
(WebCore::Node::shadowHost):
(WebCore::Node::shadowAncestorNode):
(WebCore::eventTargetRespectingSVGTargetRules):
(WebCore::Node::getEventAncestors):
* dom/Node.h:
* editing/Editor.cpp:
(WebCore::Editor::findString):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::instanceAssociatedWithShadowTreeElement):
(WebCore::EventHandler::dispatchMouseEvent):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderSVGShadowTreeRootContainer.cpp:
(WebCore::RenderSVGShadowTreeRootContainer::updateFromElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 742c3ce..c1e3094 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,37 @@
+2011-01-07 Rafael Weinstein <rafaelw at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Cleanup: Fold shadowParentNode into shadowHost
+ https://bugs.webkit.org/show_bug.cgi?id=51059
+
+ Replaces all uses of shadowParentNode.
+
+ No new tests because no behavior has changed.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::initForStyleResolve):
+ * dom/Node.cpp:
+ (WebCore::Node::shadowHost):
+ (WebCore::Node::shadowAncestorNode):
+ (WebCore::eventTargetRespectingSVGTargetRules):
+ (WebCore::Node::getEventAncestors):
+ * dom/Node.h:
+ * editing/Editor.cpp:
+ (WebCore::Editor::findString):
+ * page/DragController.cpp:
+ (WebCore::asFileInput):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::instanceAssociatedWithShadowTreeElement):
+ (WebCore::EventHandler::dispatchMouseEvent):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::hasLineIfEmpty):
+ * rendering/RenderSVGShadowTreeRootContainer.cpp:
+ (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement):
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::title):
+
2011-01-07 Chris Marrin <cmarrin at apple.com>
Unreviewed.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index fd9da77..96da74c 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -820,7 +820,7 @@ inline void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* paren
#if ENABLE(SVG)
if (!m_parentNode && e && e->isSVGElement() && e->isShadowRoot())
- m_parentNode = e->shadowParentNode();
+ m_parentNode = e->shadowHost();
#endif
if (parentStyle)
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index db36e5e..a589282 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -487,7 +487,7 @@ NodeRareData* Node::createRareData()
Element* Node::shadowHost() const
{
- return toElement(shadowParentNode());
+ return toElement(getFlag(IsShadowRootFlag) ? parent() : 0);
}
void Node::setShadowHost(Element* host)
@@ -1467,7 +1467,7 @@ Node* Node::shadowAncestorNode()
Node* root = shadowTreeRootNode();
if (root)
- return root->shadowParentNode();
+ return root->shadowHost();
return this;
}
@@ -2543,7 +2543,7 @@ static inline EventTarget* eventTargetRespectingSVGTargetRules(Node* referenceNo
if (!n->isShadowRoot() || !n->isSVGElement())
continue;
- ContainerNode* shadowTreeParentElement = n->shadowParentNode();
+ Element* shadowTreeParentElement = n->shadowHost();
ASSERT(shadowTreeParentElement->hasTagName(SVGNames::useTag));
if (SVGElementInstance* instance = static_cast<SVGUseElement*>(shadowTreeParentElement)->instanceForShadowTreeElement(referenceNode))
@@ -2566,7 +2566,7 @@ void Node::getEventAncestors(Vector<EventContext>& ancestors, EventTarget* origi
if (ancestor->isShadowRoot()) {
if (behavior == StayInsideShadowDOM)
return;
- ancestor = ancestor->shadowParentNode();
+ ancestor = ancestor->shadowHost();
if (!shouldSkipNextAncestor)
target = ancestor;
} else
diff --git a/WebCore/dom/Node.h b/WebCore/dom/Node.h
index 46b7424..92ba9d3 100644
--- a/WebCore/dom/Node.h
+++ b/WebCore/dom/Node.h
@@ -206,14 +206,12 @@ public:
virtual bool isCharacterDataNode() const { return false; }
bool isDocumentNode() const;
bool isShadowRoot() const { return getFlag(IsShadowRootFlag); }
- // FIXME: Eliminate all uses, fold into shadowHost.
- ContainerNode* shadowParentNode() const;
Node* shadowAncestorNode();
Node* shadowTreeRootNode();
bool isInShadowTree();
// Node's parent or shadow tree host.
ContainerNode* parentOrHostNode() const;
- // Use when it's guaranteed to that shadowParentNode is 0.
+ // Use when it's guaranteed to that shadowHost is 0.
ContainerNode* parentNodeGuaranteedHostFree() const;
Element* shadowHost() const;
@@ -728,11 +726,6 @@ inline ContainerNode* Node::parentNodeGuaranteedHostFree() const
return parentOrHostNode();
}
-inline ContainerNode* Node::shadowParentNode() const
-{
- return getFlag(IsShadowRootFlag) ? parent() : 0;
-}
-
} //namespace
#ifndef NDEBUG
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 4433b45..a24e7c6 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -3309,9 +3309,9 @@ bool Editor::findString(const String& target, FindOptions options)
if (resultRange->collapsed(exception) && shadowTreeRoot) {
searchRange = rangeOfContents(m_frame->document());
if (forward)
- searchRange->setStartAfter(shadowTreeRoot->shadowParentNode(), exception);
+ searchRange->setStartAfter(shadowTreeRoot->shadowHost(), exception);
else
- searchRange->setEndBefore(shadowTreeRoot->shadowParentNode(), exception);
+ searchRange->setEndBefore(shadowTreeRoot->shadowHost(), exception);
resultRange = findPlainText(searchRange.get(), target, options);
}
diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp
index 8ee5a8d..d0e9a8c 100644
--- a/WebCore/page/DragController.cpp
+++ b/WebCore/page/DragController.cpp
@@ -256,7 +256,7 @@ static HTMLInputElement* asFileInput(Node* node)
// 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->isShadowRoot() && !static_cast<HTMLInputElement*>(node)->isFileUpload())
- node = node->shadowParentNode();
+ node = node->shadowHost();
if (!node || !node->hasTagName(HTMLNames::inputTag))
return 0;
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 0c5071e..048a3cc 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()->isShadowRoot() && mev.targetNode()->shadowParentNode()->hasTagName(inputTag)) {
+ if (mev.targetNode()->isShadowRoot() && mev.targetNode()->shadowHost()->hasTagName(inputTag)) {
HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent);
}
@@ -1795,7 +1795,7 @@ static inline SVGElementInstance* instanceAssociatedWithShadowTreeElement(Node*
if (!shadowTreeElement)
return 0;
- Node* shadowTreeParentElement = shadowTreeElement->shadowParentNode();
+ Element* shadowTreeParentElement = shadowTreeElement->shadowHost();
if (!shadowTreeParentElement)
return 0;
@@ -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->isShadowRoot() ? node->shadowParentNode() : node;
+ Node* n = node->isShadowRoot() ? node->shadowHost() : 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 8895c68..7eba470 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -4927,7 +4927,7 @@ bool RenderBlock::hasLineIfEmpty() const
if (node()->isContentEditable() && node()->rootEditableElement() == node())
return true;
- if (node()->isShadowRoot() && (node()->shadowParentNode()->hasTagName(inputTag)))
+ if (node()->isShadowRoot() && (node()->shadowHost()->hasTagName(inputTag)))
return true;
return false;
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
index c5430ed..11b398a 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
@@ -59,7 +59,7 @@ void RenderSVGShadowTreeRootContainer::updateFromElement()
useElement->buildPendingResource();
}
- ASSERT(m_shadowRoot->shadowParentNode() == useElement);
+ ASSERT(m_shadowRoot->shadowHost() == useElement);
bool shouldRecreateTree = m_recreateTree;
if (m_recreateTree) {
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index a9fadb6..58248d8 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -86,7 +86,7 @@ String SVGStyledElement::title() const
}
// Get the <use> element.
- ContainerNode* shadowParent = parent->shadowParentNode();
+ Element* shadowParent = parent->shadowHost();
if (shadowParent && shadowParent->isSVGElement() && shadowParent->hasTagName(SVGNames::useTag)) {
SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowParent);
// If the <use> title is not empty we found the title to use.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list