Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1642223002: Delete selection gap code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Integrate feedback. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())
- 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.
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698