Commit 659784bf authored by shinyak@chromium.org's avatar shinyak@chromium.org

shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()

https://bugs.webkit.org/show_bug.cgi?id=107624

Reviewed by Dimitri Glazkov.

Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.

Source/WebCore:

No new tests, simple refactoring.

* WebCore.order:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* dom/Document.cpp:
(WebCore::Document::handleZeroPadding):
* dom/Node.cpp:
(WebCore::Node::deprecatedShadowAncestorNode):
* dom/Node.h:
(Node):
* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
* WebKitSupport/FatFingers.h:
(BlackBerry::WebKit::FatFingersResult::node):
* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):

Source/WebKit/qt:

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodEvent):
(QWebPageAdapter::inputMethodQuery):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6b5762c4
2013-01-23 Shinya Kawanaka <shinyak@chromium.org>
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624
Reviewed by Dimitri Glazkov.
Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
No new tests, simple refactoring.
* WebCore.order:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* dom/Document.cpp:
(WebCore::Document::handleZeroPadding):
* dom/Node.cpp:
(WebCore::Node::deprecatedShadowAncestorNode):
* dom/Node.h:
(Node):
* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
2013-01-22 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
......@@ -841,7 +841,7 @@ __ZN7WebCore11RenderLayer19insertOnlyThisLayerEv
__ZN7WebCore11RenderLayer34clearClipRectsIncludingDescendantsEv
__ZN7WebCore11RenderLayer12styleChangedENS_15StyleDifferenceEPKNS_11RenderStyleE
__ZN7WebCore11RenderLayer23updateScrollCornerStyleEv
__ZN7WebCore4Node18shadowAncestorNodeEv
__ZN7WebCore4Node28deprecatedShadowAncestorNodeEv
__ZNK7WebCore4Node15isSVGShadowRootEv
__ZN7WebCore11RenderLayer18updateResizerStyleEv
__ZN7WebCore11RenderLayer15updateTransformEv
......@@ -2194,7 +2194,7 @@ AccessibilityObject* AccessibilityRenderObject::accessibilityHitTest(const IntPo
layer->hitTest(request, hitTestResult);
if (!hitTestResult.innerNode())
return 0;
Node* node = hitTestResult.innerNode()->shadowAncestorNode();
Node* node = hitTestResult.innerNode()->deprecatedShadowAncestorNode();
if (node->hasTagName(areaTag))
return accessibilityImageMapHitTest(static_cast<HTMLAreaElement*>(node), point);
......
......@@ -1395,7 +1395,7 @@ PassRefPtr<NodeList> Document::handleZeroPadding(const HitTestRequest& request,
if (!node)
return 0;
node = node->shadowAncestorNode();
node = node->deprecatedShadowAncestorNode();
ListHashSet<RefPtr<Node> > list;
list.add(node);
return StaticHashSetNodeList::adopt(list);
......
......@@ -1229,7 +1229,7 @@ Element* Node::shadowHost() const
return 0;
}
Node* Node::shadowAncestorNode() const
Node* Node::deprecatedShadowAncestorNode() const
{
if (ShadowRoot* root = containingShadowRoot())
return root->host();
......
......@@ -267,7 +267,7 @@ public:
Element* shadowHost() const;
// If this node is in a shadow tree, returns its shadow host. Otherwise, returns this.
// Deprecated. Should use shadowHost() and check the return value.
Node* shadowAncestorNode() const;
Node* deprecatedShadowAncestorNode() const;
ShadowRoot* containingShadowRoot() const;
ShadowRoot* youngestShadowRoot() const;
......
......@@ -2709,9 +2709,9 @@ PassRefPtr<Range> Editor::rangeOfString(const String& target, Range* referenceRa
if (resultRange->collapsed() && shadowTreeRoot) {
searchRange = rangeOfContents(m_frame->document());
if (forward)
searchRange->setStartAfter(shadowTreeRoot->shadowAncestorNode());
searchRange->setStartAfter(shadowTreeRoot->deprecatedShadowAncestorNode());
else
searchRange->setEndBefore(shadowTreeRoot->shadowAncestorNode());
searchRange->setEndBefore(shadowTreeRoot->deprecatedShadowAncestorNode());
resultRange = findPlainText(searchRange.get(), target, options);
}
......@@ -2768,7 +2768,7 @@ unsigned Editor::countMatchesForText(const String& target, Range* range, FindOpt
if (!resultRange->startContainer()->isInShadowTree())
break;
searchRange->setStartAfter(resultRange->startContainer()->shadowAncestorNode(), exception);
searchRange->setStartAfter(resultRange->startContainer()->deprecatedShadowAncestorNode(), exception);
searchRange->setEnd(originalEndContainer, originalEndOffset, exception);
continue;
}
......
......@@ -156,7 +156,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
if (!editableRoot)
return;
Node* shadowAncestorNode = editableRoot->shadowAncestorNode();
Node* shadowAncestorNode = editableRoot->deprecatedShadowAncestorNode();
if (!editableRoot->getAttributeEventListener(eventNames().webkitBeforeTextInsertedEvent) &&
// FIXME: Remove these checks once textareas and textfields actually register an event handler.
......
......@@ -302,7 +302,7 @@ static Element* elementUnderMouse(Document* documentUnderMouse, const IntPoint&
while (n && !n->isElementNode())
n = n->parentNode();
if (n)
n = n->shadowAncestorNode();
n = n->deprecatedShadowAncestorNode();
return static_cast<Element*>(n);
}
......
......@@ -1817,8 +1817,8 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
Node* clickTarget = mev.targetNode();
if (clickTarget)
clickTarget = clickTarget->shadowAncestorNode();
Node* adjustedClickNode = m_clickNode ? m_clickNode->shadowAncestorNode() : 0;
clickTarget = clickTarget->deprecatedShadowAncestorNode();
Node* adjustedClickNode = m_clickNode ? m_clickNode->deprecatedShadowAncestorNode() : 0;
bool contextMenuEvent = mouseEvent.button() == RightButton;
#if PLATFORM(CHROMIUM) && OS(DARWIN)
......@@ -2723,7 +2723,7 @@ bool EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, c
// handle targetNode being a shadow DOM node.
bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get());
if (success && targetNode)
targetNode = targetNode->shadowAncestorNode();
targetNode = targetNode->deprecatedShadowAncestorNode();
return success;
}
......
......@@ -558,7 +558,7 @@ static void clearSelectionIfNeeded(Frame* oldFocusedFrame, Frame* newFocusedFram
return;
Node* selectionStartNode = s->selection().start().deprecatedNode();
if (selectionStartNode == newFocusedNode || selectionStartNode->isDescendantOf(newFocusedNode) || selectionStartNode->shadowAncestorNode() == newFocusedNode)
if (selectionStartNode == newFocusedNode || selectionStartNode->isDescendantOf(newFocusedNode) || selectionStartNode->deprecatedShadowAncestorNode() == newFocusedNode)
return;
if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode()) {
......@@ -568,7 +568,7 @@ static void clearSelectionIfNeeded(Frame* oldFocusedFrame, Frame* newFocusedFram
if (!root)
return;
if (Node* shadowAncestorNode = root->shadowAncestorNode()) {
if (Node* shadowAncestorNode = root->deprecatedShadowAncestorNode()) {
if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag))
return;
}
......
......@@ -441,7 +441,7 @@ IntRect RenderThemeBlackBerry::convertToPaintingRect(RenderObject* inputRenderer
bool RenderThemeBlackBerry::paintSearchFieldCancelButton(RenderObject* cancelButtonObject, const PaintInfo& paintInfo, const IntRect& r)
{
Node* input = cancelButtonObject->node()->shadowAncestorNode();
Node* input = cancelButtonObject->node()->deprecatedShadowAncestorNode();
if (!input->renderer()->isBox())
return false;
......
......@@ -257,11 +257,11 @@ void HitTestResult::setToNonShadowAncestor()
{
Node* node = innerNode();
if (node)
node = node->shadowAncestorNode();
node = node->deprecatedShadowAncestorNode();
setInnerNode(node);
node = innerNonSharedNode();
if (node)
node = node->shadowAncestorNode();
node = node->deprecatedShadowAncestorNode();
setInnerNonSharedNode(node);
}
......@@ -699,7 +699,7 @@ bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques
return true;
if (!request.allowsShadowContent())
node = node->shadowAncestorNode();
node = node->deprecatedShadowAncestorNode();
mutableRectBasedTestResult().add(node);
......@@ -719,7 +719,7 @@ bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques
return true;
if (!request.allowsShadowContent())
node = node->shadowAncestorNode();
node = node->deprecatedShadowAncestorNode();
mutableRectBasedTestResult().add(node);
......
......@@ -2346,7 +2346,7 @@ Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy
bool canStartSelection = node->canStartSelection();
if (node->isElementNode()) {
Element* element = static_cast<Element*>(node->shadowAncestorNode());
Element* element = static_cast<Element*>(node->deprecatedShadowAncestorNode());
if (DOMSupport::isTextBasedContentEditableElement(element)) {
if (!canStartSelection) {
......@@ -2381,7 +2381,7 @@ Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy
// Walk up the node tree looking for our custom webworks context attribute.
while (node) {
if (node->isElementNode()) {
Element* element = static_cast<Element*>(node->shadowAncestorNode());
Element* element = static_cast<Element*>(node->deprecatedShadowAncestorNode());
String webWorksContext(DOMSupport::webWorksContext(element));
if (!webWorksContext.stripWhiteSpace().isEmpty()) {
context.setFlag(Platform::WebContext::IsWebWorksContext);
......
2013-01-23 Shinya Kawanaka <shinyak@chromium.org>
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624
Reviewed by Dimitri Glazkov.
Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
* WebKitSupport/FatFingers.h:
(BlackBerry::WebKit::FatFingersResult::node):
* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
2013-01-22 Andrew Lo <anlo@rim.com>
[BlackBerry] GIF & RAF animations sometimes don't resume after zoom
......
......@@ -159,7 +159,7 @@ public:
// Shadow trees can be nested.
while (result->isInShadowTree())
result = toElement(result->shadowAncestorNode());
result = toElement(result->deprecatedShadowAncestorNode());
if (!shouldUseRootEditableElement || !result->isElementNode())
return result;
......
......@@ -313,7 +313,7 @@ void InPageSearchManager::scopeStringMatches(const String& text, bool reset, boo
if (resultRange->collapsed(ec)) {
if (!resultRange->startContainer()->isInShadowTree())
break;
searchRange->setStartAfter(resultRange->startContainer()->shadowAncestorNode(), ec);
searchRange->setStartAfter(resultRange->startContainer()->deprecatedShadowAncestorNode(), ec);
searchRange->setEnd(originalEndContainer, originalEndOffset, ec);
continue;
}
......
2013-01-23 Shinya Kawanaka <shinyak@chromium.org>
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624
Reviewed by Dimitri Glazkov.
Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
2013-01-22 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
......
......@@ -1682,7 +1682,7 @@ void WebFrameImpl::scopeStringMatches(int identifier, const WebString& searchTex
break;
searchRange->setStartAfter(
resultRange->startContainer()->shadowAncestorNode(), ec);
resultRange->startContainer()->deprecatedShadowAncestorNode(), ec);
searchRange->setEnd(originalEndContainer, originalEndOffset, ec);
continue;
}
......@@ -2336,7 +2336,7 @@ void WebFrameImpl::setFindEndstateFocusAndSelection()
// example, focus links if we have found text within the link.
Node* node = m_activeMatch->firstNode();
if (node && node->isInShadowTree()) {
Node* host = node->shadowAncestorNode();
Node* host = node->deprecatedShadowAncestorNode();
if (host->hasTagName(HTMLNames::inputTag) || host->hasTagName(HTMLNames::textareaTag))
node = host;
}
......
2013-01-23 Shinya Kawanaka <shinyak@chromium.org>
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624
Reviewed by Dimitri Glazkov.
Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodEvent):
(QWebPageAdapter::inputMethodQuery):
2013-01-22 Anders Carlsson <andersca@apple.com>
Use a platforom strategy for local storage
......
......@@ -647,7 +647,7 @@ void QWebPageAdapter::inputMethodEvent(QInputMethodEvent *ev)
Node* node = 0;
if (frame->selection()->rootEditableElement())
node = frame->selection()->rootEditableElement()->shadowAncestorNode();
node = frame->selection()->rootEditableElement()->deprecatedShadowAncestorNode();
Vector<CompositionUnderline> underlines;
bool hasSelection = false;
......@@ -727,7 +727,7 @@ QVariant QWebPageAdapter::inputMethodQuery(Qt::InputMethodQuery property) const
RenderTextControl* renderTextControl = 0;
if (frame->selection()->rootEditableElement())
renderer = frame->selection()->rootEditableElement()->shadowAncestorNode()->renderer();
renderer = frame->selection()->rootEditableElement()->deprecatedShadowAncestorNode()->renderer();
if (renderer && renderer->isTextControl())
renderTextControl = toRenderTextControl(renderer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment