Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(992)

Unified Diff: Source/core/html/HTMLOptionElement.cpp

Issue 165433002: Recalc OPTION and OPTGROUP from recalcOwnStyle. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« Source/core/html/HTMLOptGroupElement.cpp ('K') | « Source/core/html/HTMLOptionElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698