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

morrita at google.com morrita at google.com
Wed Dec 22 16:36:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 852610d8f5fc0b94708f1be3fa5a969748965a59
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 29 01:06:54 2010 +0000

    2010-11-23  MORITA Hajime  <morrita at google.com>
    
            Reviewed by Kent Tamura.
    
            REGRESSION: Text on <input type="search"> is not spellchecked.
            https://bugs.webkit.org/show_bug.cgi?id=49651
    
            * editing/spelling/spellcheck-attribute.html: Added <input type="search"> cases.
            * editing/spelling/spellcheck-attribute-expected.txt:
    2010-11-23  MORITA Hajime  <morrita at google.com>
    
            Reviewed by Kent Tamura.
    
            REGRESSION: Text on <input type="search"> is not spellchecked.
            https://bugs.webkit.org/show_bug.cgi?id=49651
    
            TextControlInnerElement::isSpellCheckingEnabled() didn't consider
            non-root shadow elelements and always went false for <input type="search>.
            This change unifies shadow and host handling into Element::isSpellCheckingEnabled().
    
            Test: editing/spelling/spellcheck-attribute.html
    
            * dom/Element.cpp:
            (WebCore::Element::isSpellCheckingEnabled):
            * rendering/TextControlInnerElements.cpp:
            * rendering/TextControlInnerElements.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72782 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a0c1b5a..c0ce6fb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-23  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by Kent Tamura.
+
+        REGRESSION: Text on <input type="search"> is not spellchecked.
+        https://bugs.webkit.org/show_bug.cgi?id=49651
+
+        * editing/spelling/spellcheck-attribute.html: Added <input type="search"> cases.
+        * editing/spelling/spellcheck-attribute-expected.txt:
+
 2010-11-27  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt b/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
index 4fa331d..bd7b9c5 100644
--- a/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
+++ b/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
@@ -12,4 +12,16 @@ PASS:test2_3
 PASS:test2_4
 PASS:test2_5
 PASS:test2_6
+PASS:test3_1
+PASS:test3_2
+PASS:test3_3
+PASS:test3_4
+PASS:test3_5
+PASS:test3_6
+PASS:test4_1
+PASS:test4_2
+PASS:test4_3
+PASS:test4_4
+PASS:test4_5
+PASS:test4_6
 
diff --git a/LayoutTests/editing/spelling/spellcheck-attribute.html b/LayoutTests/editing/spelling/spellcheck-attribute.html
index 0e5a07e..0715993 100644
--- a/LayoutTests/editing/spelling/spellcheck-attribute.html
+++ b/LayoutTests/editing/spelling/spellcheck-attribute.html
@@ -6,6 +6,7 @@
 <body>
 <p>This tests if the "spellcheck" attribute is implemented as written in its specification. If this test succeeds, you can see six forms filled with an invalid word 'zz '. Nevertheless, the 'zz ' only in the line 1.1, 1.2, and 2.2 are marked as misspelled.</p>
 <div id="testRoot">
+
 <div spellcheck="true">
 <label>1.1.</label><input id="test1_1" type="text"></input><br/>
 <label>1.2.</label><input id="test1_2" type="text" spellcheck="true"></input><br/>
@@ -22,6 +23,24 @@
 <label>2.5.</label><input id="test2_5" type="text" spellcheck></input><br/>
 <label>2.6.</label><input id="test2_6" type="text"></input><br/>
 </div>
+
+<div spellcheck="true">
+<label>3.1.</label><input id="test3_1" type="search"></input><br/>
+<label>3.2.</label><input id="test3_2" type="search" spellcheck="true"></input><br/>
+<label>3.3.</label><input id="test3_3" type="search" spellcheck="false"></input><br/>
+<label>3.4.</label><input id="test3_4" type="search" spellcheck="InvalidValue"></input><br/>
+<label>3.5.</label><input id="test3_5" type="search" spellcheck></input><br/>
+<label>3.6.</label><input id="test3_6" type="search"></input><br/>
+</div>
+<div spellcheck="false">
+<label>4.1.</label><input id="test4_1" type="search"></input><br/>
+<label>4.2.</label><input id="test4_2" type="search" spellcheck="true"></input><br/>
+<label>4.3.</label><input id="test4_3" type="search" spellcheck="false"></input><br/>
+<label>4.4.</label><input id="test4_4" type="search" spellcheck="InvalidValue"></input><br/>
+<label>4.5.</label><input id="test4_5" type="search" spellcheck></input><br/>
+<label>4.6.</label><input id="test4_6" type="search"></input><br/>
+</div>
+
 </div>
 <pre id="console"></pre>
 <script>
@@ -40,6 +59,7 @@ function testTypingInvalidWord(id, shouldBeMarked) {
         log("FAIL:" + id);
 }
 
+// For type="text".
 testTypingInvalidWord('test1_1', true);
 testTypingInvalidWord('test1_2', true);
 testTypingInvalidWord('test1_3', false);
@@ -53,6 +73,20 @@ testTypingInvalidWord('test2_4', false);
 testTypingInvalidWord('test2_5', true);
 testTypingInvalidWord('test2_6', false);
 
+// For type="search".
+testTypingInvalidWord('test3_1', true);
+testTypingInvalidWord('test3_2', true);
+testTypingInvalidWord('test3_3', false);
+testTypingInvalidWord('test3_4', true);
+testTypingInvalidWord('test3_5', true);
+testTypingInvalidWord('test3_6', true);
+testTypingInvalidWord('test4_1', false);
+testTypingInvalidWord('test4_2', true);
+testTypingInvalidWord('test4_3', false);
+testTypingInvalidWord('test4_4', false);
+testTypingInvalidWord('test4_5', true);
+testTypingInvalidWord('test4_6', false);
+
 if (window.layoutTestController) {
     layoutTestController.dumpAsText();
     // Cleaning up for expeation text if running on DRT.
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 98604f6..fb55bd0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-23  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by Kent Tamura.
+
+        REGRESSION: Text on <input type="search"> is not spellchecked.
+        https://bugs.webkit.org/show_bug.cgi?id=49651
+
+        TextControlInnerElement::isSpellCheckingEnabled() didn't consider 
+        non-root shadow elelements and always went false for <input type="search>.
+        This change unifies shadow and host handling into Element::isSpellCheckingEnabled().
+        
+        Test: editing/spelling/spellcheck-attribute.html
+        
+        * dom/Element.cpp:
+        (WebCore::Element::isSpellCheckingEnabled):
+        * rendering/TextControlInnerElements.cpp:
+        * rendering/TextControlInnerElements.h:
+
 2010-11-28  Antonio Gomes  <agomes at rim.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index 2137f8d..1f2e6c2 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -1741,7 +1741,8 @@ bool Element::isSpellCheckingEnabled() const
             break;
         }
 
-        element = element->parentElement();
+        ContainerNode* parent = const_cast<Element*>(element)->parentOrHostNode();
+        element = (parent && parent->isElementNode()) ? toElement(parent) : 0;
     }
 
     return true;
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp
index ba4c7bb..3068a78 100644
--- a/WebCore/rendering/TextControlInnerElements.cpp
+++ b/WebCore/rendering/TextControlInnerElements.cpp
@@ -113,11 +113,6 @@ void TextControlInnerElement::attachInnerElement(Node* parent, PassRefPtr<Render
         parent->renderer()->addChild(renderer);
 }
 
-bool TextControlInnerElement::isSpellCheckingEnabled() const
-{
-    return m_shadowParent && m_shadowParent->isSpellCheckingEnabled();
-}
-
 // ----------------------------
 
 inline TextControlInnerTextElement::TextControlInnerTextElement(Document* document, HTMLElement* shadowParent)
diff --git a/WebCore/rendering/TextControlInnerElements.h b/WebCore/rendering/TextControlInnerElements.h
index 51c9aff..5af98ed 100644
--- a/WebCore/rendering/TextControlInnerElements.h
+++ b/WebCore/rendering/TextControlInnerElements.h
@@ -49,7 +49,6 @@ private:
     virtual bool isMouseFocusable() const { return false; } 
     virtual bool isShadowNode() const { return m_shadowParent.get(); }
     virtual ContainerNode* shadowParentNode() { return m_shadowParent.get(); }
-    virtual bool isSpellCheckingEnabled() const;
     void setShadowParentNode(HTMLElement* shadowParent) { m_shadowParent = shadowParent; }
 
     RefPtr<HTMLElement> m_shadowParent;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list