diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp b/chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp index 6daa8410d93..34126e33b82 100644 --- a/chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp +++ b/chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp @@ -34,7 +34,7 @@ namespace WebCore { -RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document& document, PassRefPtr<Element> element, CSSPropertyID property) +RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document& document, PassRefPtrWillBeRawPtr<Element> element, CSSPropertyID property) : SimpleEditCommand(document) , m_element(element) , m_property(property) @@ -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); @@ -63,4 +66,10 @@ void RemoveCSSPropertyCommand::doUnapply() m_element->style()->setPropertyInternal(m_property, m_oldValue, m_important, IGNORE_EXCEPTION); } +void RemoveCSSPropertyCommand::trace(Visitor* visitor) +{ + visitor->trace(m_element); + SimpleEditCommand::trace(visitor); +} + } // namespace WebCore |