Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| index 791357a5c10127cf4a5ddeb6d07862c387acd5af..1382c243d0a2001456747a72c1d5b889f0734b6b 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -2057,93 +2057,6 @@ bool PaintLayer::hitTestClippedOutByClipPath(PaintLayer* rootLayer, const HitTes |
| return false; |
| } |
| -void PaintLayer::blockSelectionGapsBoundsChanged() |
| -{ |
| - if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| - return; |
| - |
| - setNeedsCompositingInputsUpdate(); |
| -} |
| - |
| -void PaintLayer::addBlockSelectionGapsBounds(const LayoutRect& bounds) |
| -{ |
| - if (RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()) |
| - return; |
| - if (!bounds.isEmpty()) |
| - ensureRareData().blockSelectionGapsBounds.unite(enclosingIntRect(bounds)); |
| - blockSelectionGapsBoundsChanged(); |
| -} |
| - |
| -void PaintLayer::clearBlockSelectionGapsBounds() |
| -{ |
| - if (RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()) |
| - return; |
| - if (m_rareData) |
| - m_rareData->blockSelectionGapsBounds = IntRect(); |
| - for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) |
| - child->clearBlockSelectionGapsBounds(); |
| - blockSelectionGapsBoundsChanged(); |
| -} |
| - |
| -void PaintLayer::invalidatePaintForBlockSelectionGaps() |
| -{ |
| - if (RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()) |
| - return; |
| - |
| - for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) { |
| - // FIXME: We should not allow paint invalidation out of paint invalidation state. crbug.com/457415 |
| - DisablePaintInvalidationStateAsserts disabler; |
| - child->invalidatePaintForBlockSelectionGaps(); |
| - } |
| - |
| - if (!m_rareData || m_rareData->blockSelectionGapsBounds.isEmpty()) |
|
chrishtr
2016/01/28 22:06:22
delete from m_rareData
wkorman
2016/01/28 22:54:32
Already done, see PaintLayer.h.
|
| - return; |
| - |
| - LayoutRect rect(m_rareData->blockSelectionGapsBounds); |
| - if (layoutObject()->hasOverflowClip()) { |
| - LayoutBox* box = layoutBox(); |
| - rect.move(-box->scrolledContentOffset()); |
| - if (!scrollableArea()->usesCompositedScrolling()) |
| - rect.intersect(box->overflowClipRect(LayoutPoint())); |
| - } |
| - if (layoutObject()->hasClip()) |
| - rect.intersect(toLayoutBox(layoutObject())->clipRect(LayoutPoint())); |
| - if (!rect.isEmpty()) { |
| - // FIXME: We should not allow paint invalidation out of paint invalidation state. crbug.com/457415 |
| - DisablePaintInvalidationStateAsserts disabler; |
| - layoutObject()->invalidatePaintRectangle(rect); |
| - } |
| -} |
| - |
| -IntRect PaintLayer::blockSelectionGapsBounds() const |
| -{ |
| - if (RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()) |
| - return IntRect(); |
| - |
| - if (!layoutObject()->isLayoutBlockFlow()) |
| - return IntRect(); |
| - |
| - LayoutBlockFlow* layoutBlockFlow = toLayoutBlockFlow(layoutObject()); |
| - LayoutRect gapRects = layoutBlockFlow->selectionGapRectsForPaintInvalidation(layoutBlockFlow); |
| - |
| - return pixelSnappedIntRect(gapRects); |
| -} |
| - |
| -bool PaintLayer::hasBlockSelectionGapBounds() const |
| -{ |
| - if (RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()) |
| - return false; |
| - |
| - // FIXME: it would be more accurate to return !blockSelectionGapsBounds().isEmpty(), but this is impossible |
| - // at the moment because it causes invalid queries to layout-dependent code (crbug.com/372802). |
| - // ASSERT(layoutObject()->document().lifecycle().state() >= DocumentLifecycle::LayoutClean); |
| - |
| - if (!layoutObject()->isLayoutBlock()) |
| - return false; |
| - |
| - return toLayoutBlock(layoutObject())->shouldPaintSelectionGaps(); |
| -} |
| - |
| bool PaintLayer::intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const LayoutPoint& offsetFromRoot) const |
| { |
| // Always examine the canvas and the root. |