Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2566)

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 215473002: Remove WebFrame::findChildByExpression. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index 9c9c69c74eb53da0f71f9557d674702a995822d9..28791d319dbf5c6f8ceef15ce2b35ba6a7b42546 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -162,8 +162,6 @@
#include "core/rendering/RenderView.h"
#include "core/rendering/style/StyleInheritedData.h"
#include "core/timing/Performance.h"
-#include "core/xml/DocumentXPathEvaluator.h"
-#include "core/xml/XPathResult.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
#include "platform/clipboard/ClipboardUtilities.h"
@@ -713,24 +711,6 @@ WebFrame* WebFrameImpl::findChildByName(const WebString& name) const
return fromFrame(frame()->tree().child(name));
}
-WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const
-{
- if (xpath.isEmpty())
- return 0;
-
- Document* document = frame()->document();
- ASSERT(document);
-
- RefPtrWillBeRawPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evaluate(*document, xpath, document, nullptr, XPathResult::ORDERED_NODE_ITERATOR_TYPE, 0, IGNORE_EXCEPTION);
- if (!xpathResult)
- return 0;
-
- Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION);
- if (!node || !node->isFrameOwnerElement())
- return 0;
- return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(node)->contentFrame()));
-}
-
WebDocument WebFrameImpl::document() const
{
if (!frame() || !frame()->document())
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698