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

Unified Diff: Source/core/dom/StyledElement.cpp

Issue 16339006: Make sure to use CSSValueID and CSSPropertyID rather than integers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « Source/core/dom/StyledElement.h ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyledElement.cpp
diff --git a/Source/core/dom/StyledElement.cpp b/Source/core/dom/StyledElement.cpp
index 28cdec99e5e9e06f3c849693f03ee88244e8d0aa..f6ecb91ffac361a19498b1d2b212ce78fb0121b9 100644
--- a/Source/core/dom/StyledElement.cpp
+++ b/Source/core/dom/StyledElement.cpp
@@ -227,7 +227,14 @@ void StyledElement::inlineStyleChanged()
InspectorInstrumentation::didInvalidateStyleAttr(document(), this);
}
-bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, int identifier, bool important)
+bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identifier, bool important)
+{
+ ensureMutableInlineStyle()->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
+ inlineStyleChanged();
+ return true;
+}
+
+bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, CSSPropertyID identifier, bool important)
{
ensureMutableInlineStyle()->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
inlineStyleChanged();
@@ -366,7 +373,7 @@ void StyledElement::rebuildPresentationAttributeStyle()
cacheIterator->value = newEntry.release();
}
-void StyledElement::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* style, CSSPropertyID propertyID, int identifier)
+void StyledElement::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* style, CSSPropertyID propertyID, CSSValueID identifier)
{
style->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier));
}
« no previous file with comments | « Source/core/dom/StyledElement.h ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698