[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:32:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d17a5a06d99245a0fb9d68790c0ad63e19fa3858
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 13 19:56:19 2010 +0000

    2010-12-13  David Holloway  <dhollowa at chromium.org>
    
            Reviewed by Eric Seidel.
    
            [chromium] Removes deprecated logic following the consolidation of AutoFill and
            Autocomplete popup menu handling (https://bugs.webkit.org/show_bug.cgi?id=41236).
            Filling of the form fields is now handled completely on the Chromium side, for
            both AutoFill and Autocomplete.
    
            https://bugs.webkit.org/show_bug.cgi?id=41822
    
            * public/WebView.h:
            * src/AutoFillPopupMenuClient.cpp:
            (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient):
            (WebKit::AutoFillPopupMenuClient::valueChanged):
            * src/AutoFillPopupMenuClient.h:
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::applyAutoFillSuggestions):
            * src/WebViewImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 431acb5..c64571d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-13  David Holloway  <dhollowa at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [chromium] Removes deprecated logic following the consolidation of AutoFill and
+        Autocomplete popup menu handling (https://bugs.webkit.org/show_bug.cgi?id=41236).
+        Filling of the form fields is now handled completely on the Chromium side, for
+        both AutoFill and Autocomplete.
+
+        https://bugs.webkit.org/show_bug.cgi?id=41822
+
+        * public/WebView.h:
+        * src/AutoFillPopupMenuClient.cpp:
+        (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient):
+        (WebKit::AutoFillPopupMenuClient::valueChanged):
+        * src/AutoFillPopupMenuClient.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::applyAutoFillSuggestions):
+        * src/WebViewImpl.h:
+
 2010-12-13  Yury Semikhatsky  <yurys at chromium.org>
 
         Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index d9d72c7..a18a64e 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -279,14 +279,6 @@ public:
 
     // AutoFill  -----------------------------------------------------------
 
-    // DEPRECATED.
-    virtual void applyAutoFillSuggestions(
-        const WebNode&,
-        const WebVector<WebString>& names,
-        const WebVector<WebString>& labels,
-        const WebVector<int>& uniqueIDs,
-        int separatorIndex) = 0;
-
     // Notifies the WebView that AutoFill suggestions are available for a node.
     // |uniqueIDs| is a vector of IDs that represent the unique ID of each
     // AutoFill profile in the suggestions popup.  If a unique ID is 0, then the
@@ -302,14 +294,6 @@ public:
         const WebVector<int>& uniqueIDs,
         int separatorIndex) = 0;
 
-    // Notifies the WebView that Autocomplete suggestions are available for a
-    // node.
-    // DEPRECATED: merging with applyAutoFillSuggestions.
-    virtual void applyAutocompleteSuggestions(
-        const WebNode&,
-        const WebVector<WebString>& suggestions,
-        int defaultSuggestionIndex) = 0;
-
     // Hides any popup (suggestions, selects...) that might be showing.
     virtual void hidePopups() = 0;
 
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 32abd6f..704ba69 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -51,7 +51,6 @@ AutoFillPopupMenuClient::AutoFillPopupMenuClient()
     : m_separatorIndex(-1)
     , m_selectedIndex(-1)
     , m_textField(0)
-    , m_AutocompleteModeEnabled(false)
 {
 }
 
@@ -123,36 +122,20 @@ bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
 
 void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
 {
-    // DEPRECATED: Will be removed once AutoFill and Autocomplete merge is
-    // completed.
-    if (m_AutocompleteModeEnabled) {
-        m_textField->setValue(getSuggestion(listIndex));
-
-        WebViewImpl* webView = getWebView();
-        if (!webView)
-            return;
-
-        EditorClientImpl* editor =
-            static_cast<EditorClientImpl*>(webView->page()->editorClient());
-        ASSERT(editor);
-        editor->onAutocompleteSuggestionAccepted(
-            static_cast<HTMLInputElement*>(m_textField.get()));
-    } else {
-      WebViewImpl* webView = getWebView();
-      if (!webView)
-          return;
-
-      if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
-          --listIndex;
-
-      ASSERT(listIndex < m_names.size());
-
-      webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
-                                                     m_names[listIndex],
-                                                     m_labels[listIndex],
-                                                     m_uniqueIDs[listIndex],
-                                                     listIndex);
-    }
+    WebViewImpl* webView = getWebView();
+    if (!webView)
+        return;
+
+    if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+        --listIndex;
+
+    ASSERT(listIndex < m_names.size());
+
+    webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
+                                                   m_names[listIndex],
+                                                   m_labels[listIndex],
+                                                   m_uniqueIDs[listIndex],
+                                                   listIndex);
 }
 
 void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h
index e3edfd3..0129a81 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.h
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h
@@ -114,10 +114,6 @@ public:
                         const WebVector<int>& uniqueIDs,
                         int separatorIndex);
 
-    // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
-    // complete.
-    void setAutocompleteMode(bool enabled) { m_AutocompleteModeEnabled = enabled; }
-
 private:
     // Convert the specified index from an index into the visible list (which might
     // include a separator entry) to an index to |m_names| and |m_labels|.
@@ -147,10 +143,6 @@ private:
     RefPtr<WebCore::HTMLInputElement> m_textField;
     OwnPtr<WebCore::PopupMenuStyle> m_regularStyle;
     OwnPtr<WebCore::PopupMenuStyle> m_warningStyle;
-
-    // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
-    // complete.
-    bool m_AutocompleteModeEnabled;
 };
 
 } // namespace WebKit
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 49a3d78..ac05dd2 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1921,17 +1921,6 @@ void WebViewImpl::applyAutoFillSuggestions(
     const WebNode& node,
     const WebVector<WebString>& names,
     const WebVector<WebString>& labels,
-    const WebVector<int>& uniqueIDs,
-    int separatorIndex)
-{
-    WebVector<WebString> icons(names.size());
-    applyAutoFillSuggestions(node, names, labels, icons, uniqueIDs, separatorIndex);
-}
-
-void WebViewImpl::applyAutoFillSuggestions(
-    const WebNode& node,
-    const WebVector<WebString>& names,
-    const WebVector<WebString>& labels,
     const WebVector<WebString>& icons,
     const WebVector<int>& uniqueIDs,
     int separatorIndex)
@@ -1977,30 +1966,6 @@ void WebViewImpl::applyAutoFillSuggestions(
         m_autoFillPopup->show(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
         m_autoFillPopupShowing = true;
     }
-
-    // DEPRECATED: This special mode will go away once AutoFill and Autocomplete
-    // merge is complete.
-    if (m_autoFillPopupClient)
-        m_autoFillPopupClient->setAutocompleteMode(false);
-}
-
-// DEPRECATED: replacing with applyAutoFillSuggestions.
-void WebViewImpl::applyAutocompleteSuggestions(
-    const WebNode& node,
-    const WebVector<WebString>& suggestions,
-    int defaultSuggestionIndex)
-{
-    WebVector<WebString> names(suggestions.size());
-    WebVector<WebString> labels(suggestions.size());
-    WebVector<WebString> icons(suggestions.size());
-    WebVector<int> uniqueIDs(suggestions.size());
-
-    for (size_t i = 0; i < suggestions.size(); ++i)
-        names[i] = suggestions[i];
-
-    applyAutoFillSuggestions(node, names, labels, icons, uniqueIDs, -1);
-    if (m_autoFillPopupClient)
-        m_autoFillPopupClient->setAutocompleteMode(true);
 }
 
 void WebViewImpl::hidePopups()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 759a463..6e8dcac 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -180,13 +180,6 @@ public:
                                      const WebString& value);
     virtual WebDevToolsAgent* devToolsAgent();
     virtual WebAccessibilityObject accessibilityObject();
-    // DEPRECATED.
-    virtual void applyAutoFillSuggestions(
-        const WebNode&,
-        const WebVector<WebString>& names,
-        const WebVector<WebString>& labels,
-        const WebVector<int>& uniqueIDs,
-        int separatorIndex);
     virtual void applyAutoFillSuggestions(
         const WebNode&,
         const WebVector<WebString>& names,
@@ -194,11 +187,6 @@ public:
         const WebVector<WebString>& icons,
         const WebVector<int>& uniqueIDs,
         int separatorIndex);
-    // DEPRECATED: replacing with applyAutoFillSuggestions.
-    virtual void applyAutocompleteSuggestions(
-        const WebNode&,
-        const WebVector<WebString>& suggestions,
-        int defaultSuggestionIndex);
     virtual void hidePopups();
     virtual void setScrollbarColors(unsigned inactiveColor,
                                     unsigned activeColor,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list