Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "platform/graphics/paint/DisplayItem.h" | 6 #include "platform/graphics/paint/DisplayItem.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 #ifndef NDEBUG | 10 #ifndef NDEBUG |
| 11 | 11 |
| 12 WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) | 12 WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) |
| 13 { | 13 { |
| 14 switch (type) { | 14 switch (type) { |
| 15 case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhas eBlockBackground"; | 15 case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhas eBlockBackground"; |
| 16 case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPain tPhaseChildBlockBackground"; | 16 case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPain tPhaseChildBlockBackground"; |
| 17 case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPai ntPhaseChildBlockBackgrounds"; | 17 case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPai ntPhaseChildBlockBackgrounds"; |
| 18 case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat"; | 18 case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat"; |
| 19 case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseFore ground"; | 19 case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseFore ground"; |
| 20 case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline "; | 20 case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline "; |
| 21 case DisplayItem::DrawingPaintPhaseChildOutlines: return "DrawingPaintPhaseC hildOutlines"; | 21 case DisplayItem::DrawingPaintPhaseChildOutlines: return "DrawingPaintPhaseC hildOutlines"; |
| 22 case DisplayItem::DrawingPaintPhaseSelfOutline: return "DrawingPaintPhaseSel fOutline"; | 22 case DisplayItem::DrawingPaintPhaseSelfOutline: return "DrawingPaintPhaseSel fOutline"; |
| 23 case DisplayItem::DrawingPaintPhaseSelection: return "DrawingPaintPhaseSelec tion"; | 23 case DisplayItem::DrawingPaintPhaseSelection: return "DrawingPaintPhaseSelec tion"; |
| 24 case DisplayItem::DrawingPaintPhaseCollapsedTableBorders: return "DrawingPai ntPhaseCollapsedTableBorders"; | 24 case DisplayItem::DrawingPaintPhaseCollapsedTableBorders: return "DrawingPai ntPhaseCollapsedTableBorders"; |
| 25 case DisplayItem::DrawingPaintPhaseTextClip: return "DrawingPaintPhaseTextCl ip"; | 25 case DisplayItem::DrawingPaintPhaseTextClip: return "DrawingPaintPhaseTextCl ip"; |
| 26 case DisplayItem::DrawingPaintPhaseMask: return "DrawingPaintPhaseMask"; | 26 case DisplayItem::DrawingPaintPhaseMask: return "DrawingPaintPhaseMask"; |
| 27 case DisplayItem::DrawingPaintPhaseClippingMask: return "DrawingPaintPhaseCl ippingMask"; | 27 case DisplayItem::DrawingPaintPhaseClippingMask: return "DrawingPaintPhaseCl ippingMask"; |
| 28 case DrawingPaintPhaseCaret: return "DrawingPaintPhaseCaret"; | |
|
pdr.
2015/01/05 23:02:18
Don't you need DisplayItem:: here?
Xianzhu
2015/01/06 17:23:51
I think because we are in a DisplayItem method, we
| |
| 28 case DisplayItem::ClipLayerOverflowControls: return "ClipLayerOverflowContro ls"; | 29 case DisplayItem::ClipLayerOverflowControls: return "ClipLayerOverflowContro ls"; |
| 29 case DisplayItem::ClipLayerBackground: return "ClipLayerBackground"; | 30 case DisplayItem::ClipLayerBackground: return "ClipLayerBackground"; |
| 30 case DisplayItem::ClipLayerParent: return "ClipLayerParent"; | 31 case DisplayItem::ClipLayerParent: return "ClipLayerParent"; |
| 31 case DisplayItem::ClipLayerFilter: return "ClipLayerFilter"; | 32 case DisplayItem::ClipLayerFilter: return "ClipLayerFilter"; |
| 32 case DisplayItem::ClipLayerForeground: return "ClipLayerForeground"; | 33 case DisplayItem::ClipLayerForeground: return "ClipLayerForeground"; |
| 33 case DisplayItem::ClipLayerFragmentFloat: return "ClipLayerFragmentFloat"; | 34 case DisplayItem::ClipLayerFragmentFloat: return "ClipLayerFragmentFloat"; |
| 34 case DisplayItem::ClipLayerFragmentForeground: return "ClipLayerFragmentFore ground"; | 35 case DisplayItem::ClipLayerFragmentForeground: return "ClipLayerFragmentFore ground"; |
| 35 case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentCh ildOutline"; | 36 case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentCh ildOutline"; |
| 36 case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline "; | 37 case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline "; |
| 37 case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask"; | 38 case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask"; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 stringBuilder.append(", "); | 92 stringBuilder.append(", "); |
| 92 } | 93 } |
| 93 stringBuilder.append("type: \""); | 94 stringBuilder.append("type: \""); |
| 94 stringBuilder.append(typeAsDebugString(type())); | 95 stringBuilder.append(typeAsDebugString(type())); |
| 95 stringBuilder.append('"'); | 96 stringBuilder.append('"'); |
| 96 } | 97 } |
| 97 | 98 |
| 98 #endif | 99 #endif |
| 99 | 100 |
| 100 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |