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

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

Issue 165433002: Recalc OPTION and OPTGROUP from recalcOwnStyle. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed unnecessary branch. 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
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptGroupElement.cpp
diff --git a/Source/core/html/HTMLOptGroupElement.cpp b/Source/core/html/HTMLOptGroupElement.cpp
index 1f1a4130aa0caff817bf9eacb4a8fd9dc4c9d8dc..e45aacc493c0814d08b2ae59b2ee0deb9d33eea0 100644
--- a/Source/core/html/HTMLOptGroupElement.cpp
+++ b/Source/core/html/HTMLOptGroupElement.cpp
@@ -84,7 +84,10 @@ void HTMLOptGroupElement::recalcSelectOptions()
void HTMLOptGroupElement::attach(const AttachContext& context)
{
- updateNonRenderStyle();
+ if (context.resolvedStyle) {
+ ASSERT(!m_style || m_style == context.resolvedStyle);
+ m_style = context.resolvedStyle;
+ }
HTMLElement::attach(context);
}
@@ -106,15 +109,10 @@ RenderStyle* HTMLOptGroupElement::nonRendererStyle() const
PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer()
{
+ updateNonRenderStyle();
return m_style;
}
-void HTMLOptGroupElement::willRecalcStyle(StyleRecalcChange change)
-{
- if (!needsAttach() && (needsStyleRecalc() || change >= Inherit))
- updateNonRenderStyle();
-}
-
String HTMLOptGroupElement::groupLabelText() const
{
String itemText = getAttribute(labelAttr);
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698