Index: third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp b/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp |
index e7d5ca50180f063557d4ce741594ea60331cf081..63365ad28843436035473cd92dda4da727ede84b 100644 |
--- a/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp |
@@ -41,45 +41,4 @@ void BlockFlowPainter::paintFloats(const PaintInfo& paintInfo, const LayoutPoint |
} |
} |
-void BlockFlowPainter::paintSelection(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
-{ |
- ASSERT(paintInfo.phase == PaintPhaseForeground); |
- if (!m_layoutBlockFlow.shouldPaintSelectionGaps()) |
- return; |
- |
- LayoutUnit lastTop = 0; |
- LayoutUnit lastLeft = m_layoutBlockFlow.logicalLeftSelectionOffset(&m_layoutBlockFlow, lastTop); |
- LayoutUnit lastRight = m_layoutBlockFlow.logicalRightSelectionOffset(&m_layoutBlockFlow, lastTop); |
- |
- LayoutRect bounds = m_layoutBlockFlow.visualOverflowRect(); |
- bounds.moveBy(paintOffset); |
- |
- // Only create a DrawingRecorder and ClipScope if skipRecording is false. This logic is needed |
- // because selectionGaps(...) needs to be called even when we do not record. |
- bool skipRecording = LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, paintOffset); |
- Optional<LayoutObjectDrawingRecorder> drawingRecorder; |
- Optional<ClipScope> clipScope; |
- if (!skipRecording) { |
- drawingRecorder.emplace(paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, FloatRect(bounds), paintOffset); |
- clipScope.emplace(paintInfo.context); |
- } |
- |
- LayoutRect gapRectsBounds = m_layoutBlockFlow.selectionGaps(&m_layoutBlockFlow, paintOffset, LayoutSize(), lastTop, lastLeft, lastRight, |
- skipRecording ? nullptr : &paintInfo, |
- skipRecording ? nullptr : &(*clipScope)); |
- // TODO(wkorman): Rework below to process paint invalidation rects during layout rather than paint. |
- if (!gapRectsBounds.isEmpty()) { |
- PaintLayer* layer = m_layoutBlockFlow.enclosingLayer(); |
- gapRectsBounds.moveBy(-paintOffset); |
- if (!m_layoutBlockFlow.hasLayer()) { |
- LayoutRect localBounds(gapRectsBounds); |
- m_layoutBlockFlow.flipForWritingMode(localBounds); |
- gapRectsBounds = LayoutRect(m_layoutBlockFlow.localToAncestorQuad(FloatRect(localBounds), layer->layoutObject()).enclosingBoundingBox()); |
- if (layer->layoutObject()->hasOverflowClip()) |
- gapRectsBounds.move(layer->layoutBox()->scrolledContentOffset()); |
- } |
- layer->addBlockSelectionGapsBounds(gapRectsBounds); |
- } |
-} |
- |
} // namespace blink |