Chromium Code Reviews| Index: Source/core/html/HTMLOptionElement.cpp |
| diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp |
| index 7b5bc1ff0043e6e5f1a0c07259eb15684654972e..9fcd4ce9dea9c9485c1fc05bc7003269dcc287ff 100644 |
| --- a/Source/core/html/HTMLOptionElement.cpp |
| +++ b/Source/core/html/HTMLOptionElement.cpp |
| @@ -296,19 +296,17 @@ RenderStyle* HTMLOptionElement::nonRendererStyle() const |
| PassRefPtr<RenderStyle> HTMLOptionElement::customStyleForRenderer() |
| { |
| + if (!needsAttach()) |
| + updateNonRenderStyle(); |
|
rune
2014/02/13 23:57:35
Possibly, updateNonRenderStyle can be called uncon
esprehn
2014/02/14 00:46:20
I'm inclined to say we do that. This has been a so
rune
2014/02/14 09:42:08
Done.
|
| return m_style; |
| } |
| -void HTMLOptionElement::willRecalcStyle(StyleRecalcChange change) |
| +void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change) |
| { |
| - if (!needsAttach() && (needsStyleRecalc() || change >= Inherit)) |
| - updateNonRenderStyle(); |
| -} |
| + if (change == NoChange) |
| + return; |
| -void HTMLOptionElement::didRecalcStyle(StyleRecalcChange) |
| -{ |
| - // FIXME: This is nasty, we ask our owner select to repaint even if the new |
| - // style is exactly the same. |
| + // FIXME: We ask our owner select to repaint regardless of which property changed. |
| if (HTMLSelectElement* select = ownerSelectElement()) { |
| if (RenderObject* renderer = select->renderer()) |
| renderer->repaint(); |