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

Unified Diff: Source/core/layout/style/LayoutStyle.h

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/layout/LayoutFullScreen.cpp ('k') | Source/core/layout/style/LayoutStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/LayoutStyle.h
diff --git a/Source/core/layout/style/LayoutStyle.h b/Source/core/layout/style/LayoutStyle.h
index 0c2ef2cd51e7ca244f9f3b36105df4e25ef6a311..1f26235066dd98e2b5cd10dda8aa68262917607b 100644
--- a/Source/core/layout/style/LayoutStyle.h
+++ b/Source/core/layout/style/LayoutStyle.h
@@ -327,15 +327,21 @@ protected:
private:
ALWAYS_INLINE LayoutStyle();
- enum DefaultStyleTag {
- DefaultStyle
+ enum InitialStyleTag {
+ InitialStyle
};
- ALWAYS_INLINE explicit LayoutStyle(DefaultStyleTag);
+ ALWAYS_INLINE explicit LayoutStyle(InitialStyleTag);
ALWAYS_INLINE LayoutStyle(const LayoutStyle&);
+ static PassRefPtr<LayoutStyle> createInitialStyle();
+ static inline LayoutStyle* initialStyle()
+ {
+ DEFINE_STATIC_REF(LayoutStyle, s_initialStyle, (LayoutStyle::createInitialStyle()));
+ return s_initialStyle;
+ }
+
public:
static PassRefPtr<LayoutStyle> create();
- static PassRefPtr<LayoutStyle> createDefaultStyle();
static PassRefPtr<LayoutStyle> createAnonymousStyleWithDisplay(const LayoutStyle& parentStyle, EDisplay);
static PassRefPtr<LayoutStyle> clone(const LayoutStyle&);
« no previous file with comments | « Source/core/layout/LayoutFullScreen.cpp ('k') | Source/core/layout/style/LayoutStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698