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

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

Issue 1001833002: Rename default -> initial style and use singletons. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/layout/LayoutFullScreen.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 9608e73c3383553d8695135462280587633c8705..18f24cd3106a9c5b289a808505503dfbce5b75ff 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -569,14 +569,14 @@ PassRefPtr<LayoutStyle> StyleResolver::styleForElement(Element* element, LayoutS
if (baseLayoutStyle) {
state.setStyle(LayoutStyle::clone(*baseLayoutStyle));
if (!state.parentStyle())
- state.setParentStyle(defaultStyleForElement());
+ state.setParentStyle(initialStyleForElement());
} else {
if (state.parentStyle()) {
RefPtr<LayoutStyle> style = LayoutStyle::create();
style->inheritFrom(*state.parentStyle(), isAtShadowBoundary(element) ? LayoutStyle::AtShadowBoundary : LayoutStyle::NotAtShadowBoundary);
state.setStyle(style.release());
} else {
- state.setStyle(defaultStyleForElement());
+ state.setStyle(initialStyleForElement());
state.setParentStyle(LayoutStyle::clone(*state.style()));
}
}
@@ -782,7 +782,7 @@ bool StyleResolver::pseudoStyleForElementInternal(Element& element, const Pseudo
style->inheritFrom(*state.parentStyle());
state.setStyle(style.release());
} else {
- state.setStyle(defaultStyleForElement());
+ state.setStyle(initialStyleForElement());
state.setParentStyle(LayoutStyle::clone(*state.style()));
}
@@ -886,7 +886,7 @@ PassRefPtr<LayoutStyle> StyleResolver::styleForPage(int pageIndex)
return state.takeStyle();
}
-PassRefPtr<LayoutStyle> StyleResolver::defaultStyleForElement()
+PassRefPtr<LayoutStyle> StyleResolver::initialStyleForElement()
{
RefPtr<LayoutStyle> style = LayoutStyle::create();
FontBuilder fontBuilder(document());
@@ -901,7 +901,7 @@ PassRefPtr<LayoutStyle> StyleResolver::styleForText(Text* textNode)
Node* parentNode = NodeRenderingTraversal::parent(*textNode);
if (!parentNode || !parentNode->layoutStyle())
- return defaultStyleForElement();
+ return initialStyleForElement();
return parentNode->layoutStyle();
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/layout/LayoutFullScreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698