Changeset 21541 in webkit


Ignore:
Timestamp:
May 17, 2007 2:42:21 PM (17 years ago)
Author:
adele
Message:

LayoutTests:

Reviewed by Mitz.

Test for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s

  • fast/text/international/bidi-menulist-expected.checksum: Added.
  • fast/text/international/bidi-menulist-expected.png: Added.
  • fast/text/international/bidi-menulist-expected.txt: Added.
  • fast/text/international/bidi-menulist.html: Added.

WebCore:

Reviewed by Mitz.

Fix for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s

Test: fast/text/international/bidi-menulist.html

  • rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Set the inner block style to direction: ltr, and text-align: left. This means that we will ignore those settings in the button to match the way the text is displayed in the popup menu. (WebCore::RenderMenuList::createInnerBlock): Call adjustInnerStyle. (WebCore::RenderMenuList::setStyle): ditto.
  • rendering/RenderMenuList.h: Added adjustInnerStyle.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21539 r21541  
     12007-05-17  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Mitz.
     4
     5        Test for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s
     6
     7        * fast/text/international/bidi-menulist-expected.checksum: Added.
     8        * fast/text/international/bidi-menulist-expected.png: Added.
     9        * fast/text/international/bidi-menulist-expected.txt: Added.
     10        * fast/text/international/bidi-menulist.html: Added.
     11
    1122007-05-17  Justin Garcia  <justin.garcia@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r21539 r21541  
     12007-05-17  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Mitz.
     4
     5        Fix for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s
     6
     7        Test: fast/text/international/bidi-menulist.html
     8
     9        * rendering/RenderMenuList.cpp:
     10        (WebCore::RenderMenuList::adjustInnerStyle): Set the inner block style to direction: ltr, and text-align: left.  This means that
     11         we will ignore those settings in the button to match the way the text is displayed in the popup menu.
     12        (WebCore::RenderMenuList::createInnerBlock): Call adjustInnerStyle.
     13        (WebCore::RenderMenuList::setStyle): ditto.
     14        * rendering/RenderMenuList.h: Added adjustInnerStyle.
     15
    1162007-05-17  Justin Garcia  <justin.garcia@apple.com>
    217
  • trunk/WebCore/rendering/RenderMenuList.cpp

    r21079 r21541  
    7373    ASSERT(!firstChild());
    7474    m_innerBlock = createAnonymousBlock();
     75    adjustInnerStyle();
     76    RenderFlexibleBox::addChild(m_innerBlock);
     77}
     78
     79void RenderMenuList::adjustInnerStyle()
     80{
    7581    m_innerBlock->style()->setBoxFlex(1.0f);
    76     RenderFlexibleBox::addChild(m_innerBlock);
     82    m_innerBlock->style()->setDirection(LTR);
     83    m_innerBlock->style()->setTextAlign(LEFT);
    7784}
    7885
     
    101108        m_buttonText->setStyle(newStyle);
    102109    if (m_innerBlock) // RenderBlock handled updating the anonymous block's style.
    103         m_innerBlock->style()->setBoxFlex(1.0f);
     110        adjustInnerStyle();
    104111    setReplaced(isInline());
    105112    if (fontChanged)
  • trunk/WebCore/rendering/RenderMenuList.h

    r21079 r21541  
    9090
    9191    void createInnerBlock();
     92    void adjustInnerStyle();
    9293    void setText(const String&);
    9394    void setTextFromOption(int optionIndex);
Note: See TracChangeset for help on using the changeset viewer.