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

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

Issue 2095973002: Don't create m_style for option element in display:none subtree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/fast/forms/select/option-display-none-computed-style.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
index 6c8e8420a37d57dcfaea0030fa9d2a20b106a2be..3f85a53534bdc75a37565030ea4201e165bcdc38 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
@@ -94,7 +94,7 @@ void HTMLOptionElement::attach(const AttachContext& context)
if (context.resolvedStyle) {
ASSERT(!m_style || m_style == context.resolvedStyle);
m_style = context.resolvedStyle;
- } else {
+ } else if (parentComputedStyle()) {
updateNonComputedStyle();
optionContext.resolvedStyle = m_style.get();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select/option-display-none-computed-style.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698