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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 noninherited_flags.affectedByFocus = false; 320 noninherited_flags.affectedByFocus = false;
321 noninherited_flags.affectedByHover = false; 321 noninherited_flags.affectedByHover = false;
322 noninherited_flags.affectedByActive = false; 322 noninherited_flags.affectedByActive = false;
323 noninherited_flags.affectedByDrag = false; 323 noninherited_flags.affectedByDrag = false;
324 noninherited_flags.isLink = false; 324 noninherited_flags.isLink = false;
325 } 325 }
326 326
327 private: 327 private:
328 ALWAYS_INLINE LayoutStyle(); 328 ALWAYS_INLINE LayoutStyle();
329 329
330 enum DefaultStyleTag { 330 enum InitialStyleTag {
331 DefaultStyle 331 InitialStyle
332 }; 332 };
333 ALWAYS_INLINE explicit LayoutStyle(DefaultStyleTag); 333 ALWAYS_INLINE explicit LayoutStyle(InitialStyleTag);
334 ALWAYS_INLINE LayoutStyle(const LayoutStyle&); 334 ALWAYS_INLINE LayoutStyle(const LayoutStyle&);
335 335
336 static PassRefPtr<LayoutStyle> createInitialStyle();
337 static inline LayoutStyle* initialStyle()
338 {
339 DEFINE_STATIC_REF(LayoutStyle, s_initialStyle, (LayoutStyle::createIniti alStyle()));
340 return s_initialStyle;
341 }
342
336 public: 343 public:
337 static PassRefPtr<LayoutStyle> create(); 344 static PassRefPtr<LayoutStyle> create();
338 static PassRefPtr<LayoutStyle> createDefaultStyle();
339 static PassRefPtr<LayoutStyle> createAnonymousStyleWithDisplay(const LayoutS tyle& parentStyle, EDisplay); 345 static PassRefPtr<LayoutStyle> createAnonymousStyleWithDisplay(const LayoutS tyle& parentStyle, EDisplay);
340 static PassRefPtr<LayoutStyle> clone(const LayoutStyle&); 346 static PassRefPtr<LayoutStyle> clone(const LayoutStyle&);
341 347
342 // Computes how the style change should be propagated down the tree. 348 // Computes how the style change should be propagated down the tree.
343 static StyleRecalcChange stylePropagationDiff(const LayoutStyle* oldStyle, c onst LayoutStyle* newStyle); 349 static StyleRecalcChange stylePropagationDiff(const LayoutStyle* oldStyle, c onst LayoutStyle* newStyle);
344 350
345 static ItemPosition resolveAlignment(const LayoutStyle& parentStyle, const L ayoutStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject); 351 static ItemPosition resolveAlignment(const LayoutStyle& parentStyle, const L ayoutStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject);
346 static ItemPosition resolveJustification(const LayoutStyle& parentStyle, con st LayoutStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject); 352 static ItemPosition resolveJustification(const LayoutStyle& parentStyle, con st LayoutStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject);
347 353
348 StyleDifference visualInvalidationDiff(const LayoutStyle&) const; 354 StyleDifference visualInvalidationDiff(const LayoutStyle&) const;
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 } 1869 }
1864 1870
1865 inline bool LayoutStyle::hasPseudoElementStyle() const 1871 inline bool LayoutStyle::hasPseudoElementStyle() const
1866 { 1872 {
1867 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1873 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1868 } 1874 }
1869 1875
1870 } // namespace blink 1876 } // namespace blink
1871 1877
1872 #endif // LayoutStyle_h 1878 #endif // LayoutStyle_h
OLDNEW
« 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