[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

commit-queue at webkit.org commit-queue at webkit.org
Mon Feb 21 00:30:00 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 4dd6a70200449f6b70916a2dda2cd83ca8fa4a4e
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 1 08:54:25 2011 +0000

    2011-02-01  Naoki Takano  <takano.naoki at gmail.com>
    
            Reviewed by Darin Fisher.
    
            [Chromium] Autofill should work with HTML5 form elements
            https://bugs.webkit.org/show_bug.cgi?id=51809
            http://crbug.com/65654
    
            No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
    
            * html/InputType.h: Insert comment for canSetSuggestedValue().
            * html/TextFieldInputType.cpp:
            (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed.
            * html/TextFieldInputType.h: Declare canSetSuggestedValue().
            * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore.
            * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore.
    2011-02-01  Naoki Takano  <takano.naoki at gmail.com>
    
            Reviewed by Darin Fisher.
    
            [Chromium] Autofill should work with HTML5 form elements
            https://bugs.webkit.org/show_bug.cgi?id=51809
            http://crbug.com/65654
    
            No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
    
            * public/WebInputElement.h: Added toWebInputElement() declarations and implemented const version of toWebInputElement().
            * src/WebInputElement.cpp:
            (WebKit::WebInputElement::toWebInputElement): Implemented a convert function to cast no-const WebElement* to no-const WebInputElement*. Because Chrome needs safe cast for autofill completion.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 4ef2de8..8d1750f 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2011-02-01  Naoki Takano  <takano.naoki at gmail.com>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] Autofill should work with HTML5 form elements
+        https://bugs.webkit.org/show_bug.cgi?id=51809
+        http://crbug.com/65654
+
+        No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
+
+        * html/InputType.h: Insert comment for canSetSuggestedValue().
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed.
+        * html/TextFieldInputType.h: Declare canSetSuggestedValue().
+        * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore.
+        * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore.
+
 2011-02-01  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dan Bernstein.
diff --git a/Source/WebCore/html/InputType.h b/Source/WebCore/html/InputType.h
index fef7ea4..3def693 100644
--- a/Source/WebCore/html/InputType.h
+++ b/Source/WebCore/html/InputType.h
@@ -192,6 +192,7 @@ public:
     virtual void willMoveToNewOwnerDocument();
     virtual bool shouldRespectAlignAttribute();
     virtual FileList* files();
+    // Should return true if the corresponding renderer for a type can display a suggested value.
     virtual bool canSetSuggestedValue();
     virtual bool shouldSendChangeEventAfterCheckedChanged();
     virtual bool canSetValue(const String&);
diff --git a/Source/WebCore/html/TextFieldInputType.cpp b/Source/WebCore/html/TextFieldInputType.cpp
index 0220a64..1d06be3 100644
--- a/Source/WebCore/html/TextFieldInputType.cpp
+++ b/Source/WebCore/html/TextFieldInputType.cpp
@@ -52,6 +52,11 @@ bool TextFieldInputType::valueMissing(const String& value) const
     return value.isEmpty();
 }
 
+bool TextFieldInputType::canSetSuggestedValue()
+{
+    return true;
+}
+
 void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event)
 {
     if (!element()->focused())
diff --git a/Source/WebCore/html/TextFieldInputType.h b/Source/WebCore/html/TextFieldInputType.h
index e882c82..86ad0ef 100644
--- a/Source/WebCore/html/TextFieldInputType.h
+++ b/Source/WebCore/html/TextFieldInputType.h
@@ -40,6 +40,7 @@ namespace WebCore {
 class TextFieldInputType : public InputType {
 protected:
     TextFieldInputType(HTMLInputElement* element) : InputType(element) { }
+    virtual bool canSetSuggestedValue();
     virtual void handleKeydownEvent(KeyboardEvent*);
     void handleKeydownEventForSpinButton(KeyboardEvent*);
     void handleWheelEventForSpinButton(WheelEvent*);
diff --git a/Source/WebCore/html/TextInputType.cpp b/Source/WebCore/html/TextInputType.cpp
index c37263a..a369976 100644
--- a/Source/WebCore/html/TextInputType.cpp
+++ b/Source/WebCore/html/TextInputType.cpp
@@ -45,12 +45,6 @@ const AtomicString& TextInputType::formControlType() const
     return InputTypeNames::text();
 }
 
-bool TextInputType::canSetSuggestedValue()
-{
-    // FIXME: Should this really be restricted to plain text? What about search, for example?
-    return true;
-}
-
 bool TextInputType::shouldRespectSpeechAttribute()
 {
     return true;
diff --git a/Source/WebCore/html/TextInputType.h b/Source/WebCore/html/TextInputType.h
index 3b6810e..243f656 100644
--- a/Source/WebCore/html/TextInputType.h
+++ b/Source/WebCore/html/TextInputType.h
@@ -42,7 +42,6 @@ public:
 private:
     TextInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
     virtual const AtomicString& formControlType() const;
-    virtual bool canSetSuggestedValue();
     virtual bool shouldRespectSpeechAttribute();
 };
 
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index c3c5bba..7c18bd6 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2011-02-01  Naoki Takano  <takano.naoki at gmail.com>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] Autofill should work with HTML5 form elements
+        https://bugs.webkit.org/show_bug.cgi?id=51809
+        http://crbug.com/65654
+
+        No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
+
+        * public/WebInputElement.h: Added toWebInputElement() declarations and implemented const version of toWebInputElement().
+        * src/WebInputElement.cpp:
+        (WebKit::WebInputElement::toWebInputElement): Implemented a convert function to cast no-const WebElement* to no-const WebInputElement*. Because Chrome needs safe cast for autofill completion.
+
 2011-01-31  Chris Rogers  <crogers at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/Source/WebKit/chromium/public/WebInputElement.h b/Source/WebKit/chromium/public/WebInputElement.h
index 60499c1..13c07d8 100644
--- a/Source/WebKit/chromium/public/WebInputElement.h
+++ b/Source/WebKit/chromium/public/WebInputElement.h
@@ -89,6 +89,13 @@ namespace WebKit {
 #endif
     };
 
+    WEBKIT_API WebInputElement* toWebInputElement(WebElement*);
+
+    inline const WebInputElement* toWebInputElement(const WebElement* element)
+    {
+        return toWebInputElement(const_cast<WebElement*>(element));
+    }
+
 } // namespace WebKit
 
 #endif
diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp
index 697c096..0509e77 100644
--- a/Source/WebKit/chromium/src/WebInputElement.cpp
+++ b/Source/WebKit/chromium/src/WebInputElement.cpp
@@ -173,4 +173,15 @@ WebInputElement::operator PassRefPtr<HTMLInputElement>() const
     return static_cast<HTMLInputElement*>(m_private.get());
 }
 
+WebInputElement* toWebInputElement(WebElement* webElement)
+{
+    InputElement* inputElement = toInputElement(webElement->unwrap<Element>());
+    if (!inputElement)
+        return 0;
+
+    ASSERT(inputElement->isHTMLElement());
+
+    return static_cast<WebInputElement*>(webElement);
+}
+
 } // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list