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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutCounter.h

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 27 matching lines...) Expand all
38 // CounterNodes is where the logic for knowing the value of a counter is. 38 // CounterNodes is where the logic for knowing the value of a counter is.
39 // LayoutCounter makes sure the CounterNodes tree is consistent with the 39 // LayoutCounter makes sure the CounterNodes tree is consistent with the
40 // style. It then just queries CounterNodes for their values. 40 // style. It then just queries CounterNodes for their values.
41 // 41 //
42 // CounterNodes are rare so they are stored in a map instead of growing 42 // CounterNodes are rare so they are stored in a map instead of growing
43 // LayoutObject. counterMaps() (in LayoutCounter.cpp) keeps the association 43 // LayoutObject. counterMaps() (in LayoutCounter.cpp) keeps the association
44 // between LayoutObject and CounterNodes. To avoid unneeded hash-lookups in the 44 // between LayoutObject and CounterNodes. To avoid unneeded hash-lookups in the
45 // common case where there is no CounterNode, LayoutObject also keeps track of 45 // common case where there is no CounterNode, LayoutObject also keeps track of
46 // whether it has at least one CounterNode in the hasCounterNodeMap bit. 46 // whether it has at least one CounterNode in the hasCounterNodeMap bit.
47 // 47 //
48 // Keeping the map up-to-date is the reason why LayoutObjects need to call into 48 // Keeping the map up to date is the reason why LayoutObjects need to call into
49 // LayoutCounter during their lifetime (see the static functions below). 49 // LayoutCounter during their lifetime (see the static functions below).
50 class LayoutCounter final : public LayoutText { 50 class LayoutCounter final : public LayoutText {
51 public: 51 public:
52 LayoutCounter(Document*, const CounterContent&); 52 LayoutCounter(Document*, const CounterContent&);
53 ~LayoutCounter() override; 53 ~LayoutCounter() override;
54 54
55 // These functions are static so that any LayoutObject can call them. 55 // These functions are static so that any LayoutObject can call them.
56 // The reason is that any LayoutObject in the tree can have a CounterNode 56 // The reason is that any LayoutObject in the tree can have a CounterNode
57 // without a LayoutCounter (e.g. by specifying 'counter-increment' without 57 // without a LayoutCounter (e.g. by specifying 'counter-increment' without
58 // a "content: counter(a)" directive)). 58 // a "content: counter(a)" directive)).
(...skipping 27 matching lines...) Expand all
86 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutCounter, isCounter()); 86 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutCounter, isCounter());
87 87
88 } // namespace blink 88 } // namespace blink
89 89
90 #ifndef NDEBUG 90 #ifndef NDEBUG
91 // Outside the WebCore namespace for ease of invocation from gdb. 91 // Outside the WebCore namespace for ease of invocation from gdb.
92 void showCounterLayoutTree(const blink::LayoutObject*, const char* counterName = nullptr); 92 void showCounterLayoutTree(const blink::LayoutObject*, const char* counterName = nullptr);
93 #endif 93 #endif
94 94
95 #endif // LayoutCounter_h 95 #endif // LayoutCounter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/track/TextTrack.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698