OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/layout/LayoutAnalyzer.h" | 6 #include "core/layout/LayoutAnalyzer.h" |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/layout/LayoutBlock.h" | 9 #include "core/layout/LayoutBlock.h" |
10 #include "core/layout/LayoutObject.h" | 10 #include "core/layout/LayoutObject.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 for (size_t i = 0; i < NumCounters; ++i) { | 111 for (size_t i = 0; i < NumCounters; ++i) { |
112 if (m_counters[i] > 0) | 112 if (m_counters[i] > 0) |
113 tracedValue->setInteger(nameForCounter(static_cast<Counter>(i)), m_c
ounters[i]); | 113 tracedValue->setInteger(nameForCounter(static_cast<Counter>(i)), m_c
ounters[i]); |
114 } | 114 } |
115 return tracedValue.release(); | 115 return tracedValue.release(); |
116 } | 116 } |
117 | 117 |
118 const char* LayoutAnalyzer::nameForCounter(Counter counter) const | 118 const char* LayoutAnalyzer::nameForCounter(Counter counter) const |
119 { | 119 { |
120 switch (counter) { | 120 switch (counter) { |
121 case LayoutBlockWidthChanged: return "LayoutBlockWidthChanged"; | 121 case LayoutBlockWidthChanged: return "width changed"; |
122 case LayoutBlockHeightChanged: return "LayoutBlockHeightChanged"; | 122 case LayoutBlockHeightChanged: return "height changed"; |
123 case LayoutBlockSizeChanged: return "LayoutBlockSizeChanged"; | 123 case LayoutBlockSizeChanged: return "size changed"; |
124 case LayoutBlockSizeDidNotChange: return "LayoutBlockSizeDidNotChange"; | 124 case LayoutBlockSizeDidNotChange: return "size same"; |
125 case LayoutObjectsThatSpecifyColumns: return "LayoutObjectsThatSpecifyColumn
s"; | 125 case LayoutObjectsThatSpecifyColumns: return "columns"; |
126 case LayoutAnalyzerStackMaximumDepth: return "LayoutAnalyzerStackMaximumDept
h"; | 126 case LayoutAnalyzerStackMaximumDepth: return "depth"; |
127 case LayoutObjectsThatAreFloating: return "LayoutObjectsThatAreFloating"; | 127 case LayoutObjectsThatAreFloating: return "floats"; |
128 case LayoutObjectsThatHaveALayer: return "LayoutObjectsThatHaveALayer"; | 128 case LayoutObjectsThatHaveALayer: return "layers"; |
129 case LayoutInlineObjectsThatAlwaysCreateLineBoxes: return "LayoutInlineObjec
tsThatAlwaysCreateLineBoxes"; | 129 case LayoutInlineObjectsThatAlwaysCreateLineBoxes: return "lineboxes"; |
130 case LayoutObjectsThatHadNeverHadLayout: return "LayoutObjectsThatHadNeverHa
dLayout"; | 130 case LayoutObjectsThatHadNeverHadLayout: return "new"; |
131 case LayoutObjectsThatAreOutOfFlowPositioned: return "LayoutObjectsThatAreOu
tOfFlowPositioned"; | 131 case LayoutObjectsThatAreOutOfFlowPositioned: return "positioned"; |
132 case LayoutObjectsThatNeedPositionedMovementLayout: return "LayoutObjectsTha
tNeedPositionedMovementLayout"; | 132 case LayoutObjectsThatNeedPositionedMovementLayout: return "positioned movem
ent"; |
133 case PerformLayoutRootLayoutObjects: return "PerformLayoutRootLayoutObjects"
; | 133 case PerformLayoutRootLayoutObjects: return "roots"; |
134 case LayoutObjectsThatNeedLayoutForThemselves: return "LayoutObjectsThatNeed
LayoutForThemselves"; | 134 case LayoutObjectsThatNeedLayoutForThemselves: return "needs"; |
135 case LayoutObjectsThatNeedSimplifiedLayout: return "LayoutObjectsThatNeedSim
plifiedLayout"; | 135 case LayoutObjectsThatNeedSimplifiedLayout: return "simplified"; |
136 case LayoutObjectsThatAreTableCells: return "LayoutObjectsThatAreTableCells"
; | 136 case LayoutObjectsThatAreTableCells: return "table cells"; |
137 case LayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath: return "Layo
utObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath"; | 137 case LayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath: return "comp
lex texts"; |
138 case CharactersInLayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath:
return "CharactersInLayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath"; | 138 case CharactersInLayoutObjectsThatAreTextAndCanNotUseTheSimpleFontCodePath:
return "complex chars"; |
139 case LayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath: return "LayoutO
bjectsThatAreTextAndCanUseTheSimpleFontCodePath"; | 139 case LayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath: return "simple
texts"; |
140 case CharactersInLayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath: ret
urn "CharactersInLayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath"; | 140 case CharactersInLayoutObjectsThatAreTextAndCanUseTheSimpleFontCodePath: ret
urn "simple chars"; |
141 case TotalLayoutObjectsThatWereLaidOut: return "TotalLayoutObjectsThatWereLa
idOut"; | 141 case TotalLayoutObjectsThatWereLaidOut: return "total"; |
142 } | 142 } |
143 ASSERT_NOT_REACHED(); | 143 ASSERT_NOT_REACHED(); |
144 return ""; | 144 return ""; |
145 } | 145 } |
146 | 146 |
147 } // namespace blink | 147 } // namespace blink |
OLD | NEW |