2008-10-01 Simon Fraser <simon.fraser@apple.com>

        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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 50e860fa
2008-10-01 Simon Fraser <simon.fraser@apple.com>
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):
2008-10-01 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
......
......@@ -1464,6 +1464,12 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
style->setOverflowY(OVISIBLE);
}
// Menulists should have visible overflow
if (style->appearance() == MenulistAppearance) {
style->setOverflowX(OVISIBLE);
style->setOverflowY(OVISIBLE);
}
// Cull out any useless layers and also repeat patterns into additional layers.
style->adjustBackgroundLayers();
style->adjustMaskLayers();
......
......@@ -378,6 +378,7 @@ input[type="hidden"], input[type="image"], input[type="file"] {
input[type="file"] {
-webkit-box-align: baseline;
text-align: start !important;
}
input:-webkit-autofill {
......
......@@ -146,11 +146,11 @@ RenderBlock::~RenderBlock()
}
}
void RenderBlock::setStyle(RenderStyle* _style)
void RenderBlock::setStyle(RenderStyle* newStyle)
{
setReplaced(_style->isDisplayReplacedType());
setReplaced(newStyle->isDisplayReplacedType());
RenderFlow::setStyle(_style);
RenderFlow::setStyle(newStyle);
// FIXME: We could save this call when the change only affected non-inherited properties
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
......
......@@ -73,12 +73,6 @@ RenderFileUploadControl::~RenderFileUploadControl()
void RenderFileUploadControl::setStyle(RenderStyle* newStyle)
{
// Force text-align to match the direction
if (newStyle->direction() == LTR)
newStyle->setTextAlign(LEFT);
else
newStyle->setTextAlign(RIGHT);
RenderBlock::setStyle(newStyle);
if (m_button)
m_button->renderer()->setStyle(createButtonStyle(newStyle));
......
......@@ -122,8 +122,8 @@ void RenderMenuList::setStyle(RenderStyle* newStyle)
bool fontChanged = !style() || style()->font() != newStyle->font();
// Don't allow overflow on menu lists.
newStyle->setOverflowX(OVISIBLE);
newStyle->setOverflowY(OVISIBLE);
ASSERT(newStyle->overflowX() == OVISIBLE);
ASSERT(newStyle->overflowY() == OVISIBLE);
RenderBlock::setStyle(newStyle);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment