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

Unified Diff: Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 119533003: Clear mutable inline style when it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed typo. Created 7 years 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/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/VariablesIterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
index b185e1fada5379f63bdc60cdaecd50dba5d02c42..694f8afac4759f27a37ecaf2fd759731254ab585 100644
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
@@ -27,7 +27,9 @@
#include "bindings/v8/ExceptionState.h"
#include "core/css/CSSParser.h"
#include "core/css/CSSStyleSheet.h"
+#include "core/css/InlineVariablesIterator.h"
#include "core/css/StylePropertySet.h"
+#include "core/css/VariablesIterator.h"
#include "core/dom/Element.h"
#include "core/dom/MutationObserverInterestGroup.h"
#include "core/dom/MutationRecord.h"
@@ -426,6 +428,7 @@ void InlineCSSStyleDeclaration::didMutate(MutationType type)
if (!m_parentElement)
return;
+ m_parentElement->clearMutableInlineStyleIfEmpty();
m_parentElement->setNeedsStyleRecalc(LocalStyleChange);
m_parentElement->invalidateStyleAttribute();
StyleAttributeMutationScope(this).didInvalidateStyleAttr();
@@ -446,5 +449,10 @@ void InlineCSSStyleDeclaration::deref()
m_parentElement->deref();
}
+PassRefPtr<CSSVariablesIterator> InlineCSSStyleDeclaration::variablesIterator() const
+{
+ return InlineVariablesIterator::create(m_parentElement);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/VariablesIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698