Chromium Code Reviews| Index: Source/core/paint/ViewDisplayList.cpp |
| diff --git a/Source/core/paint/ViewDisplayList.cpp b/Source/core/paint/ViewDisplayList.cpp |
| index 79de5be850f6466f2ca08201ac805baecd2dfc4d..a531565a5f2e227b364fba9d22a88d4064208c78 100644 |
| --- a/Source/core/paint/ViewDisplayList.cpp |
| +++ b/Source/core/paint/ViewDisplayList.cpp |
| @@ -114,6 +114,44 @@ void ViewDisplayList::updatePaintList() |
| m_paintListRenderers.swap(updatedRenderers); |
| } |
| +DisplayItem::Type DisplayItem::paintPhaseToClipType(PaintPhase paintPhase) |
|
chrishtr
2014/11/25 00:29:58
IT's weird that this is in ViewDisplayList.cpp.
|
| +{ |
| + switch (paintPhase) { |
| + case PaintPhaseChildBlockBackgrounds: |
| + return DisplayItem::ClipBoxChildBlockBackgrounds; |
| + break; |
| + case PaintPhaseFloat: |
| + return DisplayItem::ClipBoxFloat; |
| + break; |
| + case PaintPhaseForeground: |
| + return DisplayItem::ClipBoxChildBlockBackgrounds; |
| + break; |
| + case PaintPhaseChildOutlines: |
| + return DisplayItem::ClipBoxChildOutlines; |
| + break; |
| + case PaintPhaseSelection: |
| + return DisplayItem::ClipBoxSelection; |
| + break; |
| + case PaintPhaseCollapsedTableBorders: |
| + return DisplayItem::ClipBoxCollapsedTableBorders; |
| + break; |
| + case PaintPhaseTextClip: |
| + return DisplayItem::ClipBoxTextClip; |
| + break; |
| + case PaintPhaseClippingMask: |
| + return DisplayItem::ClipBoxClippingMask; |
| + break; |
| + case PaintPhaseChildBlockBackground: |
| + case PaintPhaseOutline: |
| + case PaintPhaseBlockBackground: |
| + case PaintPhaseSelfOutline: |
| + case PaintPhaseMask: |
| + ASSERT_NOT_REACHED(); |
| + } |
| + // This should never happen. |
| + return ClipBoxForeground; |
| +} |
| + |
| #ifndef NDEBUG |
| WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) |
| { |
| @@ -148,6 +186,7 @@ WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) |
| case DisplayItem::EndClip: return "EndClip"; |
| case DisplayItem::BeginFilter: return "BeginFilter"; |
| case DisplayItem::EndFilter: return "EndFilter"; |
| + case DisplayItem::TransparencyClip: return "TransparencyClip"; |
| case DisplayItem::BeginTransparency: return "BeginTransparency"; |
| case DisplayItem::EndTransparency: return "EndTransparency"; |
| case ClipBoxChildBlockBackgrounds: return "ClipBoxChildBlockBackgrounds"; |