Index: Source/core/paint/BoxClipper.cpp |
diff --git a/Source/core/paint/BoxClipper.cpp b/Source/core/paint/BoxClipper.cpp |
index 2459899c7d3eb15a458fe708bfc0b83ba7dc6b5b..d40fe619f4cc663c4cb615a3b147833f5aceb882 100644 |
--- a/Source/core/paint/BoxClipper.cpp |
+++ b/Source/core/paint/BoxClipper.cpp |
@@ -63,38 +63,7 @@ BoxClipper::BoxClipper(RenderBox& box, PaintInfo& paintInfo, const LayoutPoint& |
DisplayItem::Type clipType = DisplayItem::ClipBoxForeground; |
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
- switch (m_paintInfo.phase) { |
- case PaintPhaseChildBlockBackgrounds: |
- clipType = DisplayItem::ClipBoxChildBlockBackgrounds; |
- break; |
- case PaintPhaseFloat: |
- clipType = DisplayItem::ClipBoxFloat; |
- break; |
- case PaintPhaseForeground: |
- clipType = DisplayItem::ClipBoxChildBlockBackgrounds; |
- break; |
- case PaintPhaseChildOutlines: |
- clipType = DisplayItem::ClipBoxChildOutlines; |
- break; |
- case PaintPhaseSelection: |
- clipType = DisplayItem::ClipBoxSelection; |
- break; |
- case PaintPhaseCollapsedTableBorders: |
- clipType = DisplayItem::ClipBoxCollapsedTableBorders; |
- break; |
- case PaintPhaseTextClip: |
- clipType = DisplayItem::ClipBoxTextClip; |
- break; |
- case PaintPhaseClippingMask: |
- clipType = DisplayItem::ClipBoxClippingMask; |
- break; |
- case PaintPhaseChildBlockBackground: |
- case PaintPhaseOutline: |
- case PaintPhaseBlockBackground: |
- case PaintPhaseSelfOutline: |
- case PaintPhaseMask: |
- ASSERT_NOT_REACHED(); |
- } |
+ clipType = DisplayItem::paintPhaseToClipType(m_paintInfo.phase); |
} |
OwnPtr<ClipDisplayItem> clipDisplayItem = adoptPtr(new ClipDisplayItem(&m_box, clipType, pixelSnappedIntRect(clipRect))); |