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

tkent at chromium.org tkent at chromium.org
Sun Feb 20 23:46:44 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2134a7cb76678e0bbd037421d2c69dd31e2b22bd
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 25 04:38:29 2011 +0000

    2011-01-24  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            [Windows] Textfield <input>s have different widths.
            https://bugs.webkit.org/show_bug.cgi?id=48405
    
            * fast/forms/input-widths-expected.txt: Added.
            * fast/forms/input-widths.html: Added.
    2011-01-24  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            [Windows] Textfield <input>s have different widths.
            https://bugs.webkit.org/show_bug.cgi?id=48405
    
            - Apply the padding override for type=text to other textfield types too.
            - Reset margin value of outer spin button, which is not used in Windows.
            - Don't add inner spin button width to the preferred text field width.
              Text fields should have the identical widths regardless of the
              existence of spin buttons.
    
            Test: fast/forms/input-widths.html
    
            * css/themeWin.css:
            (input[type="week"]):
            (input[type="week"]:disabled):
            (input[type="search"]::-webkit-search-cancel-button):
            (input::-webkit-outer-spin-button):
            * rendering/RenderTextControlSingleLine.cpp:
            (WebCore::RenderTextControlSingleLine::preferredContentWidth):
            Don't add inner spin button width to the preferred width.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 37b42de..24d478d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,16 @@
 
         Reviewed by Dimitri Glazkov.
 
+        [Windows] Textfield <input>s have different widths.
+        https://bugs.webkit.org/show_bug.cgi?id=48405
+
+        * fast/forms/input-widths-expected.txt: Added.
+        * fast/forms/input-widths.html: Added.
+
+2011-01-24  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
         Some bugs of search cancel button and spin button about state change in
         an event handler.
         https://bugs.webkit.org/show_bug.cgi?id=46950
diff --git a/LayoutTests/fast/forms/input-widths-expected.txt b/LayoutTests/fast/forms/input-widths-expected.txt
new file mode 100644
index 0000000..34731fa
--- /dev/null
+++ b/LayoutTests/fast/forms/input-widths-expected.txt
@@ -0,0 +1,18 @@
+Text field types should have the same default widths.
+
+PASS document.getElementById("email").offsetWidth is baseWidth
+PASS document.getElementById("number").offsetWidth is baseWidth
+PASS document.getElementById("password").offsetWidth is baseWidth
+PASS document.getElementById("tel").offsetWidth is baseWidth
+PASS document.getElementById("url").offsetWidth is baseWidth
+PASS document.getElementById("color").offsetWidth is baseWidth
+PASS document.getElementById("date").offsetWidth is baseWidth
+PASS document.getElementById("datetime").offsetWidth is baseWidth
+PASS document.getElementById("datetimelocal").offsetWidth is baseWidth
+PASS document.getElementById("month").offsetWidth is baseWidth
+PASS document.getElementById("time").offsetWidth is baseWidth
+PASS document.getElementById("week").offsetWidth is baseWidth
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/input-widths.html b/LayoutTests/fast/forms/input-widths.html
new file mode 100644
index 0000000..f9efbf6
--- /dev/null
+++ b/LayoutTests/fast/forms/input-widths.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description">Text field types should have the same default widths.</p>
+<div id="console"></div>
+
+<div id=parent>
+<input type=text id=text>
+
+<input type=email id=email>
+<input type=number id=number>
+<input type=password id=password>
+<input type=tel id=tel>
+<input type=url id=url>
+
+<input type=color id=color>
+<input type=date id=date>
+<input type=datetime id=datetime>
+<input type=datetime-local id=datetimelocal>
+<input type=month id=month>
+<input type=time id=time>
+<input type=week id=week>
+</div>
+
+<script>
+var baseWidth = document.getElementById('text').offsetWidth;
+
+shouldBe('document.getElementById("email").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("number").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("password").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("tel").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("url").offsetWidth', 'baseWidth');
+
+// type=search is not tested intentionally.
+
+// The folloiwng types should be removed when dedicated UIs are implemented.
+shouldBe('document.getElementById("color").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("date").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("datetime").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("datetimelocal").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("month").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("time").offsetWidth', 'baseWidth');
+shouldBe('document.getElementById("week").offsetWidth', 'baseWidth');
+
+document.getElementById('parent').innerHTML = '';
+
+var successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 577e68d..6f16628 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -2,6 +2,30 @@
 
         Reviewed by Dimitri Glazkov.
 
+        [Windows] Textfield <input>s have different widths.
+        https://bugs.webkit.org/show_bug.cgi?id=48405
+
+        - Apply the padding override for type=text to other textfield types too.
+        - Reset margin value of outer spin button, which is not used in Windows.
+        - Don't add inner spin button width to the preferred text field width.
+          Text fields should have the identical widths regardless of the
+          existence of spin buttons.
+
+        Test: fast/forms/input-widths.html
+
+        * css/themeWin.css:
+        (input[type="week"]):
+        (input[type="week"]:disabled):
+        (input[type="search"]::-webkit-search-cancel-button):
+        (input::-webkit-outer-spin-button):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::preferredContentWidth):
+        Don't add inner spin button width to the preferred width.
+
+2011-01-24  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
         Some bugs of search cancel button and spin button about state change in
         an event handler.
         https://bugs.webkit.org/show_bug.cgi?id=46950
diff --git a/Source/WebCore/css/themeWin.css b/Source/WebCore/css/themeWin.css
index f2ad669..0838b11 100644
--- a/Source/WebCore/css/themeWin.css
+++ b/Source/WebCore/css/themeWin.css
@@ -33,8 +33,19 @@
    making our form elements match Firefox's. */
 
 input:not([type]), 
+input[type="color"],
+input[type="date"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="email"],
+input[type="month"],
+input[type="number"],
+input[type="password"],
+input[type="tel"],
 input[type="text"],
-input[type="password"] {
+input[type="time"],
+input[type="url"],
+input[type="week"] {
     padding:1px 0;
 }
 
@@ -59,14 +70,25 @@ input[type="radio"] {
 */
 textarea:disabled,
 input:not([type]):disabled, 
-input[type="text"]:disabled,
+input[type="color"]:disabled,
+input[type="date"]:disabled,
+input[type="datetime"]:disabled,
+input[type="datetime-local"]:disabled,
+input[type="email"]:disabled,
+input[type="month"]:disabled,
 input[type="password"]:disabled,
-input[type="search"]:disabled {
+input[type="number"]:disabled,
+input[type="search"]:disabled,
+input[type="tel"]:disabled,
+input[type="text"]:disabled,
+input[type="time"]:disabled,
+input[type="url"]:disabled,
+input[type="week"]:disabled {
     background-color: #EBEBE4; 
 }
 
 input[type="search"]::-webkit-search-cancel-button {
-   margin-right: 3px; 
+    margin-right: 3px;
 }
 
 input[type="search"]::-webkit-search-results-decoration {
@@ -77,6 +99,10 @@ input[type="search"]::-webkit-search-results-button {
     margin: 0 3px 0 2px;
 }
 
+input::-webkit-outer-spin-button {
+    margin: 0;
+}
+
 input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button {
     padding: 1px 6px;
 }
diff --git a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
index 603e74b..e60d48b 100644
--- a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -560,9 +560,6 @@ int RenderTextControlSingleLine::preferredContentWidth(float charWidth) const
         result += cancelRenderer->borderLeft() + cancelRenderer->borderRight() +
                   cancelRenderer->paddingLeft() + cancelRenderer->paddingRight();
 
-    if (RenderBox* spinRenderer = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0)
-        result += spinRenderer->minPreferredLogicalWidth();
-
 #if ENABLE(INPUT_SPEECH)
     if (RenderBox* speechRenderer = m_speechButton ? m_speechButton->renderBox() : 0) {
         result += speechRenderer->borderLeft() + speechRenderer->borderRight() +

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list