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

Unified Diff: Source/core/css/resolver/StyleResolver.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/StyleSheetContents.cpp ('k') | Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 7b4c743ab6f68652e704cd0cb597246e7608daa0..53348df162a2e4dbeb211c5f3735659ab860ba47 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -741,8 +741,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* element, const
StyleResolverState state(document(), element, parentStyle);
MatchResult result;
- if (keyframe->properties())
- result.addMatchedProperties(keyframe->properties());
+ result.addMatchedProperties(&keyframe->properties());
ASSERT(!state.style());
@@ -767,10 +766,8 @@ PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* element, const
// We don't need to bother with !important. Since there is only ever one
// decl, there's nothing to override. So just add the first properties.
bool inheritedOnly = false;
- if (keyframe->properties()) {
- applyMatchedProperties<AnimationProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
- applyMatchedProperties<HighPriorityProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
- }
+ applyMatchedProperties<AnimationProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
+ applyMatchedProperties<HighPriorityProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
// If our font got dirtied, go ahead and update it now.
updateFont(state);
@@ -780,8 +777,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* element, const
StyleBuilder::applyProperty(CSSPropertyLineHeight, state, state.lineHeightValue());
// Now do rest of the properties.
- if (keyframe->properties())
- applyMatchedProperties<LowPriorityProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
+ applyMatchedProperties<LowPriorityProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
// If our font got dirtied by one of the non-essential font props,
// go ahead and update it a second time.
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698