Changeset 37220 in webkit


Ignore:
Timestamp:
Oct 2, 2008 5:43:39 PM (16 years ago)
Author:
Simon Fraser
Message:

2008-10-01 Simon Fraser <Simon Fraser>

Reviewed by Dave Hyatt

Fix RenderFileUploadControl::setStyle() and
RenderMenuList::setStyle() to not touch the style; replace
with html4.css and CSSStyleSelector changes.

https://bugs.webkit.org/show_bug.cgi?id=21287

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle):
  • css/html4.css:
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::setStyle):
  • rendering/RenderFileUploadControl.cpp:
  • rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::setStyle):
Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r37219 r37220  
     12008-10-01  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dave Hyatt
     4
     5        Fix RenderFileUploadControl::setStyle() and
     6        RenderMenuList::setStyle() to not touch the style; replace
     7        with html4.css and CSSStyleSelector changes.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=21287
     10
     11        * css/CSSStyleSelector.cpp:
     12        (WebCore::CSSStyleSelector::adjustRenderStyle):
     13        * css/html4.css:
     14        * rendering/RenderBlock.cpp:
     15        (WebCore::RenderBlock::setStyle):
     16        * rendering/RenderFileUploadControl.cpp:
     17        * rendering/RenderMenuList.cpp:
     18        (WebCore::RenderMenuList::setStyle):
     19
    1202008-10-01  Simon Fraser  <simon.fraser@apple.com>
    221
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r37219 r37220  
    14631463        if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN)
    14641464            style->setOverflowY(OVISIBLE);
     1465    }
     1466
     1467    // Menulists should have visible overflow
     1468    if (style->appearance() == MenulistAppearance) {
     1469        style->setOverflowX(OVISIBLE);
     1470        style->setOverflowY(OVISIBLE);
    14651471    }
    14661472
  • trunk/WebCore/css/html4.css

    r37217 r37220  
    379379input[type="file"] {
    380380    -webkit-box-align: baseline;
     381    text-align: start !important;
    381382}
    382383
  • trunk/WebCore/rendering/RenderBlock.cpp

    r37037 r37220  
    147147}
    148148
    149 void RenderBlock::setStyle(RenderStyle* _style)
    150 {
    151     setReplaced(_style->isDisplayReplacedType());
    152 
    153     RenderFlow::setStyle(_style);
     149void RenderBlock::setStyle(RenderStyle* newStyle)
     150{
     151    setReplaced(newStyle->isDisplayReplacedType());
     152
     153    RenderFlow::setStyle(newStyle);
    154154
    155155    // FIXME: We could save this call when the change only affected non-inherited properties
  • trunk/WebCore/rendering/RenderFileUploadControl.cpp

    r32958 r37220  
    7474void RenderFileUploadControl::setStyle(RenderStyle* newStyle)
    7575{
    76     // Force text-align to match the direction
    77     if (newStyle->direction() == LTR)
    78         newStyle->setTextAlign(LEFT);
    79     else
    80         newStyle->setTextAlign(RIGHT);
    81 
    8276    RenderBlock::setStyle(newStyle);
    8377    if (m_button)
  • trunk/WebCore/rendering/RenderMenuList.cpp

    r36339 r37220  
    123123   
    124124    // Don't allow overflow on menu lists.
    125     newStyle->setOverflowX(OVISIBLE);
    126     newStyle->setOverflowY(OVISIBLE);
     125    ASSERT(newStyle->overflowX() == OVISIBLE);
     126    ASSERT(newStyle->overflowY() == OVISIBLE);
    127127   
    128128    RenderBlock::setStyle(newStyle);
Note: See TracChangeset for help on using the changeset viewer.