| Index: Source/core/paint/BoxClipper.cpp
|
| diff --git a/Source/core/paint/BoxClipper.cpp b/Source/core/paint/BoxClipper.cpp
|
| index ce1de5652c9232df953bec572020b00fd471b139..28bc41222d34058a6f607677d24e23ad83fece89 100644
|
| --- a/Source/core/paint/BoxClipper.cpp
|
| +++ b/Source/core/paint/BoxClipper.cpp
|
| @@ -55,16 +55,16 @@ BoxClipper::BoxClipper(LayoutBox& box, const PaintInfo& paintInfo, const LayoutP
|
| if (RuntimeEnabledFeatures::slimmingPaintEnabled())
|
| m_clipType = m_paintInfo.displayItemTypeForClipping();
|
|
|
| - OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect));
|
| + ClipDisplayItem clipDisplayItem(m_box, m_clipType, pixelSnappedIntRect(clipRect));
|
| if (hasBorderRadius)
|
| - clipDisplayItem->roundedRectClips().append(clipRoundedRect);
|
| + clipDisplayItem.roundedRectClips().append(clipRoundedRect);
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
|
| ASSERT(m_paintInfo.context->displayItemList());
|
| if (!m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
|
| - m_paintInfo.context->displayItemList()->add(clipDisplayItem.release());
|
| + m_paintInfo.context->displayItemList()->add(clipDisplayItem);
|
| } else {
|
| - clipDisplayItem->replay(*paintInfo.context);
|
| + clipDisplayItem.replay(*paintInfo.context);
|
| }
|
|
|
| m_pushedClip = true;
|
| @@ -78,14 +78,13 @@ BoxClipper::~BoxClipper()
|
| ASSERT(m_box.hasControlClip() || (m_box.hasOverflowClip() && !m_box.layer()->isSelfPaintingLayer()));
|
|
|
| DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_clipType);
|
| + EndClipDisplayItem endClipDisplayItem(m_box, endType);
|
| if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
|
| if (m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
|
| return;
|
| - OwnPtr<EndClipDisplayItem> endClipDisplayItem = EndClipDisplayItem::create(m_box, endType);
|
| ASSERT(m_paintInfo.context->displayItemList());
|
| - m_paintInfo.context->displayItemList()->add(endClipDisplayItem.release());
|
| + m_paintInfo.context->displayItemList()->add(endClipDisplayItem);
|
| } else {
|
| - EndClipDisplayItem endClipDisplayItem(m_box, endType);
|
| endClipDisplayItem.replay(*m_paintInfo.context);
|
| }
|
| }
|
|
|