| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "platform/graphics/paint/DisplayItem.h" | |
| 7 | |
| 8 namespace blink { | |
| 9 | |
| 10 #ifndef NDEBUG | |
| 11 | |
| 12 WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) | |
| 13 { | |
| 14 switch (type) { | |
| 15 case DisplayItem::DrawingPaintPhaseBlockBackground: return "DrawingPaintPhas
eBlockBackground"; | |
| 16 case DisplayItem::DrawingPaintPhaseChildBlockBackground: return "DrawingPain
tPhaseChildBlockBackground"; | |
| 17 case DisplayItem::DrawingPaintPhaseChildBlockBackgrounds: return "DrawingPai
ntPhaseChildBlockBackgrounds"; | |
| 18 case DisplayItem::DrawingPaintPhaseFloat: return "DrawingPaintPhaseFloat"; | |
| 19 case DisplayItem::DrawingPaintPhaseForeground: return "DrawingPaintPhaseFore
ground"; | |
| 20 case DisplayItem::DrawingPaintPhaseOutline: return "DrawingPaintPhaseOutline
"; | |
| 21 case DisplayItem::DrawingPaintPhaseChildOutlines: return "DrawingPaintPhaseC
hildOutlines"; | |
| 22 case DisplayItem::DrawingPaintPhaseSelfOutline: return "DrawingPaintPhaseSel
fOutline"; | |
| 23 case DisplayItem::DrawingPaintPhaseSelection: return "DrawingPaintPhaseSelec
tion"; | |
| 24 case DisplayItem::DrawingPaintPhaseCollapsedTableBorders: return "DrawingPai
ntPhaseCollapsedTableBorders"; | |
| 25 case DisplayItem::DrawingPaintPhaseTextClip: return "DrawingPaintPhaseTextCl
ip"; | |
| 26 case DisplayItem::DrawingPaintPhaseMask: return "DrawingPaintPhaseMask"; | |
| 27 case DisplayItem::DrawingPaintPhaseClippingMask: return "DrawingPaintPhaseCl
ippingMask"; | |
| 28 case DisplayItem::ClipLayerOverflowControls: return "ClipLayerOverflowContro
ls"; | |
| 29 case DisplayItem::ClipLayerBackground: return "ClipLayerBackground"; | |
| 30 case DisplayItem::ClipLayerParent: return "ClipLayerParent"; | |
| 31 case DisplayItem::ClipLayerFilter: return "ClipLayerFilter"; | |
| 32 case DisplayItem::ClipLayerForeground: return "ClipLayerForeground"; | |
| 33 case DisplayItem::ClipLayerFragmentFloat: return "ClipLayerFragmentFloat"; | |
| 34 case DisplayItem::ClipLayerFragmentForeground: return "ClipLayerFragmentFore
ground"; | |
| 35 case DisplayItem::ClipLayerFragmentChildOutline: return "ClipLayerFragmentCh
ildOutline"; | |
| 36 case DisplayItem::ClipLayerFragmentOutline: return "ClipLayerFragmentOutline
"; | |
| 37 case DisplayItem::ClipLayerFragmentMask: return "ClipLayerFragmentMask"; | |
| 38 case DisplayItem::ClipLayerFragmentClippingMask: return "ClipLayerFragmentCl
ippingMask"; | |
| 39 case DisplayItem::ClipLayerFragmentParent: return "ClipLayerFragmentParent"; | |
| 40 case DisplayItem::ClipLayerFragmentSelection: return "ClipLayerFragmentSelec
tion"; | |
| 41 case DisplayItem::ClipLayerFragmentChildBlockBackgrounds: return "ClipLayerF
ragmentChildBlockBackgrounds"; | |
| 42 case DisplayItem::EndClip: return "EndClip"; | |
| 43 } | |
| 44 ASSERT_NOT_REACHED(); | |
| 45 return "Unknown"; | |
| 46 } | |
| 47 | |
| 48 WTF::String DisplayItem::asDebugString() const | |
| 49 { | |
| 50 return String::format("{%s, type: \"%s\"}", clientDebugString().utf8().data(
), typeAsDebugString(type()).utf8().data()); | |
| 51 } | |
| 52 | |
| 53 #endif | |
| 54 | |
| 55 } // namespace blink | |
| OLD | NEW |