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

Unified Diff: Source/core/css/resolver/ViewportStyleResolver.cpp

Issue 181783005: Have Element::ensureMutableInlineStyle() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ViewportStyleResolver.cpp
diff --git a/Source/core/css/resolver/ViewportStyleResolver.cpp b/Source/core/css/resolver/ViewportStyleResolver.cpp
index eccd48957df59c36e71addd034dc80a10c4fdf24..372df90473444e3ce10283d051a4c33e12860654 100644
--- a/Source/core/css/resolver/ViewportStyleResolver.cpp
+++ b/Source/core/css/resolver/ViewportStyleResolver.cpp
@@ -64,9 +64,9 @@ void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin)
void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule, Origin origin)
{
- StylePropertySet* propertySet = viewportRule->mutableProperties();
+ StylePropertySet& propertySet = viewportRule->mutableProperties();
- unsigned propertyCount = propertySet->propertyCount();
+ unsigned propertyCount = propertySet.propertyCount();
if (!propertyCount)
return;
@@ -74,14 +74,14 @@ void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule, Ori
m_hasAuthorStyle = true;
if (!m_propertySet) {
- m_propertySet = propertySet->mutableCopy();
+ m_propertySet = propertySet.mutableCopy();
return;
}
// We cannot use mergeAndOverrideOnConflict() here because it doesn't
// respect the !important declaration (but addParsedProperty() does).
for (unsigned i = 0; i < propertyCount; ++i)
- m_propertySet->addParsedProperty(propertySet->propertyAt(i).toCSSProperty());
+ m_propertySet->addParsedProperty(propertySet.propertyAt(i).toCSSProperty());
}
void ViewportStyleResolver::clearDocument()
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698