Remove unused Document::openSearchDescriptionURL().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jan 2014 11:44:48 +0000 (11:44 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jan 2014 11:44:48 +0000 (11:44 +0000)
<https://webkit.org/b/126419>

Reviewed by Antti Koivisto.

* dom/Document.h:
* dom/Document.cpp:

    Scrub leftovers from the defunct Chromium port.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h

index 2860fa75eede8e418d824d254fbab8d3b171bf27..70881e6f8ef8e90307989371f9296266920153d8 100644 (file)
@@ -1,3 +1,15 @@
+2014-01-03  Andreas Kling  <akling@apple.com>
+
+        Remove unused Document::openSearchDescriptionURL().
+        <https://webkit.org/b/126419>
+
+        Reviewed by Antti Koivisto.
+
+        * dom/Document.h:
+        * dom/Document.cpp:
+
+            Scrub leftovers from the defunct Chromium port.
+
 2014-01-03  Jinwoo Song  <jinwoo7.song@samsung.com>
 
         VibrationPattern should allocate an single vector instance for single integer input
index b1ea73465b80a595b6ed88a221681deffcf9a4d8..01a3932c19e254ba16bfd678b95aade6da813664 100644 (file)
@@ -4247,37 +4247,6 @@ String Document::queryCommandValue(const String& commandName)
     return command(this, commandName).value();
 }
 
-URL Document::openSearchDescriptionURL()
-{
-    static const char* const openSearchMIMEType = "application/opensearchdescription+xml";
-    static const char* const openSearchRelation = "search";
-
-    // FIXME: Why do only top-level frames have openSearchDescriptionURLs?
-    if (!frame() || frame()->tree().parent())
-        return URL();
-
-    // FIXME: Why do we need to wait for FrameStateComplete?
-    if (frame()->loader().state() != FrameStateComplete)
-        return URL();
-
-    if (!head())
-        return URL();
-
-    RefPtr<HTMLCollection> children = head()->children();
-    for (unsigned i = 0; Node* child = children->item(i); i++) {
-        if (!child->hasTagName(linkTag))
-            continue;
-        HTMLLinkElement* linkElement = toHTMLLinkElement(child);
-        if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equalIgnoringCase(linkElement->rel(), openSearchRelation))
-            continue;
-        if (linkElement->href().isEmpty())
-            continue;
-        return linkElement->href();
-    }
-
-    return URL();
-}
-
 void Document::pushCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript)
 {
     ASSERT(newCurrentScript);
index fe0e5e898ef4ac76673c6923185df3775aa09a03..4ba0c5c743ed21072bd70bce5721faf3999e2a5c 100644 (file)
@@ -897,8 +897,6 @@ public:
     bool queryCommandSupported(const String& command);
     String queryCommandValue(const String& command);
 
-    URL openSearchDescriptionURL();
-
     // designMode support
     enum InheritedBool { off = false, on = true, inherit };    
     void setDesignMode(InheritedBool value);