LayoutTests:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2006 00:55:34 +0000 (00:55 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2006 00:55:34 +0000 (00:55 +0000)
        Reviewed by Tim Omernick.

        Updated results for http://bugzilla.opendarwin.org/show_bug.cgi?id=6990
        Switch to use new text field implementation for <input type="password">

        * dom/html/level2/html/HTMLInputElement22-expected.txt:
        * dom/xhtml/level2/html/HTMLInputElement22-expected.txt:
        * fast/events/event-sender-mouse-click.html:
        * fast/forms/input-appearance-height-expected.checksum:
        * fast/forms/input-appearance-height-expected.txt:
        * fast/forms/input-type-change-in-onfocus-mouse-expected.txt:
        * fast/forms/input-value-expected.checksum:
        * fast/forms/input-value-expected.png:
        * fast/forms/input-value-expected.txt:
        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.checksum:
        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.png:
        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt:

        Updated from switch to style-able selects
        * fast/forms/option-strip-whitespace-expected.checksum:
        * fast/forms/option-strip-whitespace-expected.png:
        * fast/forms/option-strip-whitespace-expected.txt:

WebCore:

        Reviewed by Tim Omernick.

        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6990
        Switch to use new text field implementation for <input type="password">

        * css/html4.css: Give input[password] the same style properties as normal text fields.
        * html/HTMLInputElement.cpp: Removed checks for TextFieldAppearance.
        (WebCore::HTMLInputElement::selectionStart):
        (WebCore::HTMLInputElement::selectionEnd):
        (WebCore::HTMLInputElement::setSelectionStart):
        (WebCore::HTMLInputElement::setSelectionEnd):
        (WebCore::HTMLInputElement::select):
        (WebCore::HTMLInputElement::setSelectionRange):
        (WebCore::HTMLInputElement::createRenderer):
        * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isNonWidgetTextField):

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

20 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/html/level2/html/HTMLInputElement22-expected.txt
LayoutTests/dom/xhtml/level2/html/HTMLInputElement22-expected.txt
LayoutTests/fast/events/event-sender-mouse-click.html
LayoutTests/fast/forms/input-appearance-height-expected.checksum
LayoutTests/fast/forms/input-appearance-height-expected.txt
LayoutTests/fast/forms/input-type-change-in-onfocus-mouse-expected.txt
LayoutTests/fast/forms/input-value-expected.checksum
LayoutTests/fast/forms/input-value-expected.png
LayoutTests/fast/forms/input-value-expected.txt
LayoutTests/fast/forms/option-strip-whitespace-expected.checksum
LayoutTests/fast/forms/option-strip-whitespace-expected.png
LayoutTests/fast/forms/option-strip-whitespace-expected.txt
LayoutTests/tables/mozilla_expected_failures/bugs/bug92647-1-expected.checksum
LayoutTests/tables/mozilla_expected_failures/bugs/bug92647-1-expected.png
LayoutTests/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt
WebCore/ChangeLog
WebCore/css/html4.css
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLInputElement.h

index 8179a9b0d1b4520bb07a8c587719d251c4d32971..1838159c5372493ac6e8f676a5473ab21c545d9f 100644 (file)
@@ -1,3 +1,28 @@
+2006-09-01  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Tim Omernick.
+
+        Updated results for http://bugzilla.opendarwin.org/show_bug.cgi?id=6990
+        Switch to use new text field implementation for <input type="password">
+
+        * dom/html/level2/html/HTMLInputElement22-expected.txt:
+        * dom/xhtml/level2/html/HTMLInputElement22-expected.txt:
+        * fast/events/event-sender-mouse-click.html:
+        * fast/forms/input-appearance-height-expected.checksum:
+        * fast/forms/input-appearance-height-expected.txt:
+        * fast/forms/input-type-change-in-onfocus-mouse-expected.txt:
+        * fast/forms/input-value-expected.checksum:
+        * fast/forms/input-value-expected.png:
+        * fast/forms/input-value-expected.txt:
+        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.checksum:
+        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.png:
+        * tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt:
+
+        Updated from switch to style-able selects
+        * fast/forms/option-strip-whitespace-expected.checksum:
+        * fast/forms/option-strip-whitespace-expected.png:
+        * fast/forms/option-strip-whitespace-expected.txt:
+
 2006-09-01  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Darin.
index 48c1efce749e899746c98506860442235cd87c37..b09138b61d31838edae9b5173c5d6ffc2bba3d55 100644 (file)
@@ -1,2 +1,3 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement22
 Status:        Success
index bd8d3d199d27373d423e8e29bba08b0408be925f..d30f20e5151b2af7f71bfb9b554889ea7eaf6edc 100644 (file)
@@ -1,3 +1,4 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement22
 Status Success
 
index e937f759daa22c792f8328881642d24eebdc2e59..501746288c09c324b09f0d9526bdb501f85a9101 100644 (file)
@@ -1,7 +1,7 @@
 <script>
 var clicked = false;
 </script>
-<input type="password" onfocus="clicked = true;">
+<input type="search" onfocus="clicked = true;">
 <p>
     Test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7583">http://bugzilla.opendarwin.org/show_bug.cgi?id=7583</a>
     DRT hangs when doing eventSender.mouseDown on native widgets</i>. This tests eventSender.mouseClick().
index 6ec800d95496227ec166218b87bb2676b8835c01..9b41f59c0c33ae1a06ea82afaedfc52b4dd45ae9 100644 (file)
@@ -1 +1 @@
-6d2e542e50004fb1dc8c3cedbf9a1331
\ No newline at end of file
+501a822d9b54d20deb6e29ea0df63f8c
\ No newline at end of file
index 4badf3b5ee99eed4656899a1d6deaba7b8e8dc6e..197b2ff0b12180eb6c2515d5e492445afe84f4e0 100644 (file)
@@ -75,7 +75,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (205,202) size 0x0
         RenderText {#text} at (0,211) size 64x18
           text run at (0,211) width 64: "password "
-        RenderLineEdit {INPUT} at (66,211) size 148x19
+        RenderTextField {INPUT} at (66,211) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
         RenderText {#text} at (216,211) size 4x18
           text run at (216,211) width 4: " "
         RenderBR {BR} at (220,225) size 0x0
@@ -89,3 +89,5 @@ layer at (40,54) size 142x13
   RenderBlock {DIV} at (3,3) size 142x13
 layer at (62,217) size 142x13
   RenderBlock {DIV} at (3,3) size 142x13
+layer at (77,240) size 142x13
+  RenderBlock {DIV} at (3,3) size 142x13
index 9369272cbf53df3d0c841586bbd41a12994d064f..75b87c0ab07d44ad1633b9031178e857a7621781 100644 (file)
@@ -1,3 +1,5 @@
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV to 0 of DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 
 This tests that changing an input element's type in its onfocus handler does not cause its onblur handler to be called. If this test is successful, "SUCCESS" should be shown below.
 
index 56b4cef120b7917c29f10a45b2f018a0b9b5a694..30797fddfc3534b0617de1422aa347dae76e6504 100644 (file)
@@ -1 +1 @@
-a3ffebdab437333eb5841afe5bfe9ebf
\ No newline at end of file
+86827b79052ea53188592723f4f3fa93
\ No newline at end of file
index 8d139f58f2b5368165bfb01ddea5fdad44bbb448..2ee6bab9641918a5804b82450da04ed32bd2796d 100644 (file)
Binary files a/LayoutTests/fast/forms/input-value-expected.png and b/LayoutTests/fast/forms/input-value-expected.png differ
index b9195967f06341308e26387204d18ad1c85a6cab..1ed9d010a8bbea3405ff6280c73fc7a28012c824 100644 (file)
@@ -45,7 +45,7 @@ layer at (0,0) size 800x600
                 RenderText {#text} at (1,1) size 244x18
                   text run at (1,1) width 244: "password with value property changed"
               RenderTableCell {TD} at (389,29) size 236x25 [r=1 c=1 rs=1 cs=1]
-                RenderLineEdit {INPUT} at (3,3) size 148x19
+                RenderTextField {INPUT} at (3,3) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
               RenderTableCell {TD} at (627,31) size 62x20 [r=1 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x18
                   text run at (1,1) width 28: "after"
@@ -200,6 +200,10 @@ layer at (403,136) size 142x13
   RenderBlock {DIV} at (3,3) size 142x13
     RenderText {#text} at (1,0) size 35x13
       text run at (1,0) width 35: "before"
+layer at (403,163) size 142x13
+  RenderBlock {DIV} at (3,3) size 142x13
+    RenderText {#text} at (1,0) size 37x13
+      text run at (1,0) width 37: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
 layer at (403,305) size 142x13
   RenderBlock {DIV} at (3,3) size 142x13
     RenderText {#text} at (1,0) size 25x13
index f23b18b3dba95b9adccad268258752043bb19817..59bb687533cc82c041d38a87f32bdd9e12f33988 100644 (file)
@@ -1 +1 @@
-ad330aa9a5d9744539b9be79983c01fc
\ No newline at end of file
+a26974ff1cb0e2dc0d75248939318443
\ No newline at end of file
index c6ab4437c5b646acefc43f46344e24de79cf54d8..a7f3f68897e271bec353dfe41ff156ac0ceb2649 100644 (file)
Binary files a/LayoutTests/fast/forms/option-strip-whitespace-expected.png and b/LayoutTests/fast/forms/option-strip-whitespace-expected.png differ
index 26496542788585e2e3a53ed5019fe983eb419da9..80dc242bc56a829785380d4a2960829dd5222766 100644 (file)
@@ -19,7 +19,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (0,142) size 0x18
         RenderText {#text} at (0,161) size 298x18
           text run at (0,161) width 298: "Five Spaces (with leading/trailing whitespace): "
-        RenderMenuList {SELECT} at (300,162) size 92x18
+        RenderMenuList {SELECT} at (300,162) size 92x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (8,2) size 61x13
             RenderText at (0,0) size 61x13
               text run at (0,0) width 61: "Five Spaces"
@@ -27,7 +27,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (0,182) size 0x18
         RenderText {#text} at (0,201) size 285x18
           text run at (0,201) width 285: "Five Tabs (with leading/trailing whitespace): "
-        RenderMenuList {SELECT} at (287,202) size 81x18
+        RenderMenuList {SELECT} at (287,202) size 81x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (8,2) size 50x13
             RenderText at (0,0) size 50x13
               text run at (0,0) width 50: "Five Tabs"
@@ -35,7 +35,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (0,222) size 0x18
         RenderText {#text} at (0,241) size 126x18
           text run at (0,241) width 126: "Mixed Whitespace: "
-        RenderMenuList {SELECT} at (128,242) size 81x18
+        RenderMenuList {SELECT} at (128,242) size 81x18 [bgcolor=#FFFFFF]
           RenderBlock (anonymous) at (8,2) size 50x13
             RenderText at (0,0) size 50x13
               text run at (0,0) width 50: "Five Tabs"
index 91694175d3188d25861811ea81f11154d1b4fb09..7ecd48b44ccfff0012f70e78329fa84d4c768b36 100644 (file)
@@ -1 +1 @@
-fa0f3392736697ac7dae55b69f38bb62
\ No newline at end of file
+de7a1f38cb58d383cdc9920696c4797e
\ No newline at end of file
index a33e0e4896179208d45baf4eb38a23ae0841d153..480b8c0eb4ac858d4deaec2a4538c8c4c47291ba 100644 (file)
Binary files a/LayoutTests/tables/mozilla_expected_failures/bugs/bug92647-1-expected.png and b/LayoutTests/tables/mozilla_expected_failures/bugs/bug92647-1-expected.png differ
index 5171c41a6a354c7083a58756c896ad44b112dfa5..aa6ea5e3a6527f0b82c833cfbc58c2442ad053ea 100644 (file)
@@ -23,8 +23,10 @@ layer at (0,0) size 800x600
                         RenderText {#text} at (2,2) size 30x18
                           text run at (2,2) width 30: "PIN:"
                       RenderTableCell {TD} at (85,44) size 192x27 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
-                        RenderLineEdit {INPUT} at (4,4) size 148x19
+                        RenderTextField {INPUT} at (4,4) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
                         RenderText {#text} at (0,0) size 0x0
                       RenderTableCell {TD} at (279,55) size 4x4 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
 layer at (107,30) size 142x13
   RenderBlock {DIV} at (3,3) size 142x13
+layer at (107,66) size 142x13
+  RenderBlock {DIV} at (3,3) size 142x13
index 77cec8ec5a79aa016219486a9c59c50b20c18baa..9fa13bc15844a623d44af66e8d1153fb41341274 100644 (file)
@@ -1,3 +1,21 @@
+2006-09-01  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Tim Omernick.
+
+        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6990
+        Switch to use new text field implementation for <input type="password">
+
+        * css/html4.css: Give input[password] the same style properties as normal text fields.
+        * html/HTMLInputElement.cpp: Removed checks for TextFieldAppearance.
+        (WebCore::HTMLInputElement::selectionStart):
+        (WebCore::HTMLInputElement::selectionEnd):
+        (WebCore::HTMLInputElement::setSelectionStart):
+        (WebCore::HTMLInputElement::setSelectionEnd):
+        (WebCore::HTMLInputElement::select):
+        (WebCore::HTMLInputElement::setSelectionRange):
+        (WebCore::HTMLInputElement::createRenderer):
+        * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isNonWidgetTextField):
+
 2006-09-01  Brady Eidson  <beidson@apple.com>
 
         Reviewed by John (though Sarge review a previous patch of mine in an attempt to review this one)
index 9b9bfc0e1adcbb2d1fbf4b91399fdcc5d7446367..5280e2b42d316601b1102f6932009dd239916a29 100644 (file)
@@ -311,7 +311,7 @@ input[type="hidden"] {
     display: none
 }
 
-input, isindex {
+input, input[type="password"], isindex {
     -webkit-appearance: textfield;
     padding: 1px;
     background-color: white;
@@ -331,12 +331,6 @@ textarea {
 }
 
 input[type="password"] {
-    // FIXME: Remove these when switching over to the new implementation for password fields.    
-    -webkit-appearance:none;
-    background-color: initial;
-    border:initial;
-    padding:initial;
-
     -webkit-text-security: disc !important;
 }
 
index e2432d5d740ec28acef0d7551d18c06c087407a5..8067c799334862659b1f95f142ca30558138208f 100644 (file)
@@ -482,15 +482,11 @@ int HTMLInputElement::selectionStart() const
         case SEARCH:
             return static_cast<RenderLineEdit*>(renderer())->selectionStart();
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             if (document()->focusNode() != this && cachedSelStart >= 0)
                 return cachedSelStart;
             return static_cast<RenderTextControl*>(renderer())->selectionStart();
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                return static_cast<RenderTextControl*>(renderer())->selectionStart();
-            else
-                return static_cast<RenderLineEdit*>(renderer())->selectionStart();
     }
     return 0;
 }
@@ -514,15 +510,11 @@ int HTMLInputElement::selectionEnd() const
         case SEARCH:
             return static_cast<RenderLineEdit*>(renderer())->selectionEnd();
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             if (document()->focusNode() != this && cachedSelEnd >= 0)
                 return cachedSelEnd;
             return static_cast<RenderTextControl*>(renderer())->selectionEnd();
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                return static_cast<RenderTextControl*>(renderer())->selectionEnd();
-            else
-                return static_cast<RenderLineEdit*>(renderer())->selectionEnd();
     }
     return 0;
 }
@@ -547,15 +539,10 @@ void HTMLInputElement::setSelectionStart(int start)
             static_cast<RenderLineEdit*>(renderer())->setSelectionStart(start);
             break;
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             static_cast<RenderTextControl*>(renderer())->setSelectionStart(start);
             break;
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                static_cast<RenderTextControl*>(renderer())->setSelectionStart(start);
-            else
-                static_cast<RenderLineEdit*>(renderer())->setSelectionStart(start);
-            break;
     }
 }
 
@@ -579,15 +566,10 @@ void HTMLInputElement::setSelectionEnd(int end)
             static_cast<RenderLineEdit*>(renderer())->setSelectionEnd(end);
             break;
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             static_cast<RenderTextControl*>(renderer())->setSelectionEnd(end);
             break;
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                static_cast<RenderTextControl*>(renderer())->setSelectionEnd(end);
-            else
-                static_cast<RenderLineEdit*>(renderer())->setSelectionEnd(end);
-            break;
     }
 }
 
@@ -613,15 +595,10 @@ void HTMLInputElement::select()
             static_cast<RenderLineEdit*>(renderer())->select();
             break;
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             static_cast<RenderTextControl*>(renderer())->select();
             break;
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                static_cast<RenderTextControl*>(renderer())->select();
-            else
-                static_cast<RenderLineEdit*>(renderer())->select();
-            break;
     }
 }
 
@@ -645,15 +622,10 @@ void HTMLInputElement::setSelectionRange(int start, int end)
             static_cast<RenderLineEdit*>(renderer())->setSelectionRange(start, end);
             break;
         case ISINDEX:
+        case PASSWORD:
         case TEXT:
             static_cast<RenderTextControl*>(renderer())->setSelectionRange(start, end);
             break;
-        case PASSWORD:
-            if (renderer()->style()->appearance() == TextFieldAppearance)
-                static_cast<RenderTextControl*>(renderer())->setSelectionRange(start, end);
-            else
-                static_cast<RenderLineEdit*>(renderer())->setSelectionRange(start, end);
-            break;
     }
 }
 
@@ -874,13 +846,9 @@ RenderObject *HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle *
         case RANGE:
             return new (arena) DeprecatedSlider(this);
         case ISINDEX:
-        case TEXT:
-            return new (arena) RenderTextControl(this, false);
         case PASSWORD:
-            if (style->appearance() == TextFieldAppearance)
-                return new (arena) RenderTextControl(this, false);
-            else
-                return new (arena) RenderLineEdit(this);                
+        case TEXT:
+            return new (arena) RenderTextControl(this, false);             
     }
     assert(false);
     return 0;
index 5b6af10982ad862f8883d496aaa00d209d49c04f..0b731c53aa114aeb282847025f01da493b6f69b0 100644 (file)
@@ -85,8 +85,7 @@ public:
     bool isTextField() const { return m_type == TEXT || m_type == PASSWORD || m_type == SEARCH; }
     // FIXME: When other text fields switch to the non-NSView implementation, we should add them here.
     // Once all text fields switch over, we should merge this with isTextField.
-    bool isNonWidgetTextField() const { return m_type == TEXT || m_type == ISINDEX || (m_type == PASSWORD /* FIXME: Remove this style check when converting password */ 
-                                        && renderer() && renderer()->style()->appearance() == TextFieldAppearance); }
+    bool isNonWidgetTextField() const { return m_type == TEXT || m_type == ISINDEX || m_type == PASSWORD; }
 
     bool checked() const { return m_checked; }
     void setChecked(bool, bool sendChangeEvent = false);