summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/RemoveCSSPropertyCommand.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/editing/RemoveCSSPropertyCommand.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/editing/RemoveCSSPropertyCommand.cpp')
-rw-r--r--WebCore/editing/RemoveCSSPropertyCommand.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/WebCore/editing/RemoveCSSPropertyCommand.cpp b/WebCore/editing/RemoveCSSPropertyCommand.cpp
index d4afed0..17870a7 100644
--- a/WebCore/editing/RemoveCSSPropertyCommand.cpp
+++ b/WebCore/editing/RemoveCSSPropertyCommand.cpp
@@ -31,32 +31,25 @@
namespace WebCore {
-RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document* document, CSSStyleDeclaration* decl, int property)
+RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document* document, PassRefPtr<CSSMutableStyleDeclaration> style, CSSPropertyID property)
: SimpleEditCommand(document)
- , m_decl(decl->makeMutable())
+ , m_style(style)
, m_property(property)
, m_important(false)
{
- ASSERT(m_decl);
+ ASSERT(m_style);
}
void RemoveCSSPropertyCommand::doApply()
{
- ASSERT(m_decl);
-
- m_oldValue = m_decl->getPropertyValue(m_property);
- ASSERT(!m_oldValue.isNull());
-
- m_important = m_decl->getPropertyPriority(m_property);
- m_decl->removeProperty(m_property);
+ m_oldValue = m_style->getPropertyValue(m_property);
+ m_important = m_style->getPropertyPriority(m_property);
+ m_style->removeProperty(m_property);
}
void RemoveCSSPropertyCommand::doUnapply()
{
- ASSERT(m_decl);
- ASSERT(!m_oldValue.isNull());
-
- m_decl->setProperty(m_property, m_oldValue, m_important);
+ m_style->setProperty(m_property, m_oldValue, m_important);
}
} // namespace WebCore