⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 91345 in webkit


Ignore:
Timestamp:
Jul 20, 2011, 12:52:39 AM (15 years ago)
Author:
tkent@chromium.org
Message:

input type=number doesn't render correctly in rtl.
https://bugs.webkit.org/show_bug.cgi?id=59703

Source/WebCore:

Reviewed by Ryosuke Niwa.

Test: fast/forms/input-appearance-number-rtl.html

  • css/html.css:

(input[type="search"]::-webkit-textfield-decoration-container):
Set "direction: ltr;" only for type=search because we'd like to
respect text direction except type=search.
(input[x-webkit-speech][di=rtl]::-webkit-input-speech-button):
Remove a workaround.

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):
Support for RTL in the spin button location adjustment.

LayoutTests:

Patch by tkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> on 2011-07-20
Reviewed by Ryosuke Niwa.

  • fast/forms/input-appearance-number-rtl.html: Added.
  • platform/chromium/test_expectations.txt:
  • platform/gtk/test_expectations.txt:
  • platform/mac/fast/forms/input-appearance-number-rtl-expected.png: Added.
  • platform/mac/fast/forms/input-appearance-number-rtl-expected.txt: Added.
  • platform/qt/test_expectations.txt:
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91344 r91345  
     12011-07-20  tkent@chromium.org  <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
     2
     3        input type=number doesn't render correctly in rtl.
     4        https://bugs.webkit.org/show_bug.cgi?id=59703
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * fast/forms/input-appearance-number-rtl.html: Added.
     9        * platform/chromium/test_expectations.txt:
     10        * platform/gtk/test_expectations.txt:
     11        * platform/mac/fast/forms/input-appearance-number-rtl-expected.png: Added.
     12        * platform/mac/fast/forms/input-appearance-number-rtl-expected.txt: Added.
     13        * platform/qt/test_expectations.txt:
     14
    1152011-07-19  Gavin Barraclough  <barraclough@apple.com>
    216
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r91343 r91345  
    37443744BUGCR83652 : storage/indexeddb/database-quota.html = TEXT
    37453745
     3746// New test. Need platform-dependent baseline files.
     3747BUGWK59703 : fast/forms/input-appearance-number-rtl.html = FAIL
     3748
    37463749BUGCR88311 MAC DEBUG : fast/css/last-of-type-pseudo-class.html = TEXT
    37473750
  • trunk/LayoutTests/platform/gtk/test_expectations.txt

    r90971 r91345  
    1818BUGWK64253 : fast/forms/textarea-placeholder-set-attribute.html = FAIL
    1919BUGWK64253 : fast/forms/textarea-placeholder-wrapping.html = FAIL
     20
     21// New test. Need platform-dependent baseline files.
     22BUGWK59703 : fast/forms/input-appearance-number-rtl.html = FAIL
  • trunk/LayoutTests/platform/qt/test_expectations.txt

    r90995 r91345  
    22//
    33// See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
     4
     5// New test. Need platform-dependent baseline files.
     6BUGWK59703 : fast/forms/input-appearance-number-rtl.html = FAIL
    47
    58BUGWK64002 : http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm = TEXT PASS
  • trunk/Source/WebCore/ChangeLog

    r91337 r91345  
     12011-07-20  Kent Tamura  <tkent@chromium.org>
     2
     3        input type=number doesn't render correctly in rtl.
     4        https://bugs.webkit.org/show_bug.cgi?id=59703
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Test: fast/forms/input-appearance-number-rtl.html
     9
     10        * css/html.css:
     11        (input[type="search"]::-webkit-textfield-decoration-container):
     12        Set "direction: ltr;" only for type=search because we'd like to
     13        respect text direction except type=search.
     14        (input[x-webkit-speech][di=rtl]::-webkit-input-speech-button):
     15        Remove a workaround.
     16        * rendering/RenderTextControlSingleLine.cpp:
     17        (WebCore::RenderTextControlSingleLine::layout):
     18        Support for RTL in the spin button location adjustment.
     19
    1202011-07-19  Steve Lacey  <sjl@chromium.org>
    221
  • trunk/Source/WebCore/css/html.css

    r91249 r91345  
    421421
    422422input::-webkit-textfield-decoration-container {
    423     direction: ltr;
    424423    display: -webkit-box;
    425424    -webkit-box-align: center;
     425}
     426
     427input[type="search"]::-webkit-textfield-decoration-container {
     428    direction: ltr;
    426429}
    427430
     
    473476    vertical-align: top;
    474477    -webkit-box-flex: 0;
    475 }
    476 
    477 input[x-webkit-speech][dir=rtl]::-webkit-textfield-decoration-container {
    478     direction: rtl;
    479478}
    480479#endif
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r91014 r91345  
    277277    if (RenderBox* innerSpinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0) {
    278278        RenderBox* parentBox = innerSpinBox->parentBox();
    279         innerSpinBox->setLocation(LayoutPoint(parentBox->width() - innerSpinBox->width() + paddingRight(), -paddingTop()));
     279        if (containerRenderer && !containerRenderer->style()->isLeftToRightDirection())
     280            innerSpinBox->setLocation(LayoutPoint(-paddingLeft(), -paddingTop()));
     281        else
     282            innerSpinBox->setLocation(LayoutPoint(parentBox->width() - innerSpinBox->width() + paddingRight(), -paddingTop()));
    280283        innerSpinBox->setHeight(height() - borderTop() - borderBottom());
    281284    }
Note: See TracChangeset for help on using the changeset viewer.