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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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.h ('k') | Source/core/css/resolver/StyleResolverState.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 084047757776015def73b46e4927a6f3eac6534f..42d63e057099e4aadd792555c2314a79b96f0290 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -598,13 +598,13 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
// Once an element has a renderer, we don't try to destroy it, since otherwise the renderer
// will vanish if a style recalc happens during loading.
- if (sharingBehavior == AllowStyleSharing && !element->document()->haveStylesheetsLoaded() && !element->renderer()) {
+ if (sharingBehavior == AllowStyleSharing && !element->document().haveStylesheetsLoaded() && !element->renderer()) {
if (!s_styleNotYetAvailable) {
s_styleNotYetAvailable = RenderStyle::create().leakRef();
s_styleNotYetAvailable->setDisplay(NONE);
s_styleNotYetAvailable->font().update(m_fontSelector);
}
- element->document()->setHasNodesWithPlaceholderStyle();
+ element->document().setHasNodesWithPlaceholderStyle();
return s_styleNotYetAvailable;
}
@@ -1092,7 +1092,7 @@ PassRefPtr<CSSRuleList> StyleResolver::styleRulesForElement(Element* e, unsigned
PassRefPtr<CSSRuleList> StyleResolver::pseudoStyleRulesForElement(Element* e, PseudoId pseudoId, unsigned rulesToInclude)
{
- if (!e || !e->document()->haveStylesheetsLoaded())
+ if (!e || !e->document().haveStylesheetsLoaded())
return 0;
if (e == document()->documentElement())
@@ -1445,13 +1445,13 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
if (RuntimeEnabledFeatures::webAnimationsEnabled() && !applyInheritedOnly) {
calculateCSSAnimationUpdate(state);
// Apply animated properties, then reapply any rules marked important.
- if (applyAnimatedProperties<HighPriorityProperties>(state, element->document()->timeline())) {
+ if (applyAnimatedProperties<HighPriorityProperties>(state, element->document().timeline())) {
bool important = true;
applyMatchedProperties<HighPriorityProperties>(state, matchResult, important, matchResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedOnly);
applyMatchedProperties<HighPriorityProperties>(state, matchResult, important, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
applyMatchedProperties<HighPriorityProperties>(state, matchResult, important, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
}
- if (applyAnimatedProperties<LowPriorityProperties>(state, element->document()->timeline())) {
+ if (applyAnimatedProperties<LowPriorityProperties>(state, element->document().timeline())) {
bool important = true;
applyMatchedProperties<LowPriorityProperties>(state, matchResult, important, matchResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedOnly);
applyMatchedProperties<LowPriorityProperties>(state, matchResult, important, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698