Changeset 142572 in webkit


Ignore:
Timestamp:
Feb 11, 2013 8:24:54 PM (11 years ago)
Author:
keishi@webkit.org
Message:

REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
https://bugs.webkit.org/show_bug.cgi?id=109158

Reviewed by Kent Tamura.

Source/WebCore:

The calendar picker button's icon and position where wrong when rtl.

Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html

  • Resources/pagepopups/calendarPicker.css:

(.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
(.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
(.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.

  • Resources/pagepopups/calendarPicker.js:

(YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
(YearMonthController.prototype._attachRightButtonsTo): Ditto.

LayoutTests:

  • platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png: Added.
  • platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png:
  • platform/chromium/TestExpectations:
  • platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.txt: Added.
  • platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html: Added.
Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r142559 r142572  
     12013-02-11  Keishi Hattori  <keishi@webkit.org>
     2
     3        REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
     4        https://bugs.webkit.org/show_bug.cgi?id=109158
     5
     6        Reviewed by Kent Tamura.
     7
     8        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png: Added.
     9        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png:
     10        * platform/chromium/TestExpectations:
     11        * platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.txt: Added.
     12        * platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html: Added.
     13
    1142013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r142510 r142572  
    42434243webkit.org/b/109136 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html [ ImageOnlyFailure Pass Missing ]
    42444244webkit.org/b/109136 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html [ ImageOnlyFailure Pass Missing ]
     4245webkit.org/b/109158 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html [ ImageOnlyFailure Pass Missing ]
    42454246
    42464247# Rebaseline after currentPath
  • trunk/Source/WebCore/ChangeLog

    r142570 r142572  
     12013-02-11  Keishi Hattori  <keishi@webkit.org>
     2
     3        REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
     4        https://bugs.webkit.org/show_bug.cgi?id=109158
     5
     6        Reviewed by Kent Tamura.
     7
     8        The calendar picker button's icon and position where wrong when rtl.
     9
     10
     11        Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
     12
     13        * Resources/pagepopups/calendarPicker.css:
     14        (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
     15        (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
     16        (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
     17        * Resources/pagepopups/calendarPicker.js:
     18        (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
     19        (YearMonthController.prototype._attachRightButtonsTo): Ditto.
     20
    1212013-02-11  KwangYong Choi  <ky0.choi@samsung.com>
    222
  • trunk/Source/WebCore/Resources/pagepopups/calendarPicker.css

    r142198 r142572  
    142142
    143143.year-month-button-left .year-month-button {
    144     margin-right: 4px;
     144    -webkit-margin-end: 4px;
    145145}
    146146
     
    150150
    151151.year-month-button-right .year-month-button {
    152     margin-left: 4px;
     152    -webkit-margin-start: 4px;
    153153}
    154154
     
    273273
    274274.today-clear-area .today-button {
    275     margin-right: 8px;
     275    -webkit-margin-end: 8px;
    276276}
    277277
  • trunk/Source/WebCore/Resources/pagepopups/calendarPicker.js

    r142198 r142572  
    863863}
    864864
     865YearMonthController.LeftPointingTriangle = "<svg width='4' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /></svg>";
     866YearMonthController.LeftPointingDoubleTriangle = "<svg width='9' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /><polygon points='5,3.5 9,7 9,0' style='fill:#6e6e6e;' /></svg>";
     867YearMonthController.RightPointingTriangle = "<svg width='4' height='7'><polygon points='0,7 0,0, 4,3.5' style='fill:#6e6e6e;' /></svg>";
     868YearMonthController.RightPointingDoubleTriangle = "<svg width='9' height='7'><polygon points='4,3.5 0,7 0,0' style='fill:#6e6e6e;' /><polygon points='9,3.5 5,7 5,0' style='fill:#6e6e6e;' /></svg>";
     869
    865870/**
    866871 * @param {!Element} element
     
    937942
    938943    this._left2 = createElement("button", ClassNames.YearMonthButton);
    939     this._left2.innerHTML = "<svg width='9' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /><polygon points='5,3.5 9,7 9,0' style='fill:#6e6e6e;' /></svg>";
     944    this._left2.innerHTML = global.params.isLocaleRTL ? YearMonthController.RightPointingDoubleTriangle : YearMonthController.LeftPointingDoubleTriangle;
    940945    this._left2.addEventListener("click", this._handleButtonClick.bind(this), false);
    941946    container.appendChild(this._left2);
    942947
    943948    this._left1 = createElement("button", ClassNames.YearMonthButton);
    944     this._left1.innerHTML = "<svg width='4' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /></svg>";
     949    this._left1.innerHTML = global.params.isLocaleRTL ? YearMonthController.RightPointingTriangle : YearMonthController.LeftPointingTriangle;
    945950    this._left1.addEventListener("click", this._handleButtonClick.bind(this), false);
    946951    container.appendChild(this._left1);
     
    954959    parent.appendChild(container);
    955960    this._right1 = createElement("button", ClassNames.YearMonthButton);
    956     this._right1.innerHTML = "<svg width='4' height='7'><polygon points='0,7 0,0, 4,3.5' style='fill:#6e6e6e;' /></svg>";
     961    this._right1.innerHTML = global.params.isLocaleRTL ? YearMonthController.LeftPointingTriangle : YearMonthController.RightPointingTriangle;
    957962    this._right1.addEventListener("click", this._handleButtonClick.bind(this), false);
    958963    container.appendChild(this._right1);
    959964
    960965    this._right2 = createElement("button", ClassNames.YearMonthButton);
    961     this._right2.innerHTML = "<svg width='9' height='7'><polygon points='4,3.5 0,7 0,0' style='fill:#6e6e6e;' /><polygon points='9,3.5 5,7 5,0' style='fill:#6e6e6e;' /></svg>";
     966    this._right2.innerHTML = global.params.isLocaleRTL ? YearMonthController.LeftPointingDoubleTriangle : YearMonthController.RightPointingDoubleTriangle;
    962967    this._right2.addEventListener("click", this._handleButtonClick.bind(this), false);
    963968    container.appendChild(this._right2);
Note: See TracChangeset for help on using the changeset viewer.