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

Unified Diff: Source/core/editing/RemoveCSSPropertyCommand.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/editing/ApplyStyleCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/RemoveCSSPropertyCommand.cpp
diff --git a/Source/core/editing/RemoveCSSPropertyCommand.cpp b/Source/core/editing/RemoveCSSPropertyCommand.cpp
index 6daa8410d93f0426dfa1a4951a6f3949d513f31c..f7d463aa3c244d638a464b406da16d997ca56acf 100644
--- a/Source/core/editing/RemoveCSSPropertyCommand.cpp
+++ b/Source/core/editing/RemoveCSSPropertyCommand.cpp
@@ -50,6 +50,9 @@ RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand()
void RemoveCSSPropertyCommand::doApply()
{
const StylePropertySet* style = m_element->inlineStyle();
+ if (!style)
+ return;
+
m_oldValue = style->getPropertyValue(m_property);
m_important = style->propertyIsImportant(m_property);
« no previous file with comments | « Source/core/editing/ApplyStyleCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698