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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 851593002: Delete RenderSelectionInfo and other selection rect paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 if (!result.isRectBasedTest()) 1634 if (!result.isRectBasedTest())
1635 result = tempResult; 1635 result = tempResult;
1636 if (!depthSortDescendants) 1636 if (!depthSortDescendants)
1637 break; 1637 break;
1638 } 1638 }
1639 } 1639 }
1640 1640
1641 return resultLayer; 1641 return resultLayer;
1642 } 1642 }
1643 1643
1644 void RenderLayer::addBlockSelectionGapsBounds(const LayoutRect& bounds)
1645 {
1646 m_blockSelectionGapsBounds.unite(enclosingIntRect(bounds));
1647 }
1648
1649 void RenderLayer::clearBlockSelectionGapsBounds()
1650 {
1651 m_blockSelectionGapsBounds = IntRect();
1652 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
1653 child->clearBlockSelectionGapsBounds();
1654 }
1655
1656 IntRect RenderLayer::blockSelectionGapsBounds() const
1657 {
1658 if (!renderer()->isRenderBlock())
1659 return IntRect();
1660
1661 RenderBlock* renderBlock = toRenderBlock(renderer());
1662 LayoutRect gapRects = renderBlock->selectionGapRectsForPaintInvalidation(ren derBlock);
1663
1664 return pixelSnappedIntRect(gapRects);
1665 }
1666
1667 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR oot) const 1644 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR oot) const
1668 { 1645 {
1669 // Always examine the canvas and the root. 1646 // Always examine the canvas and the root.
1670 // FIXME: Could eliminate the isDocumentElement() check if we fix background painting so that the RenderView 1647 // FIXME: Could eliminate the isDocumentElement() check if we fix background painting so that the RenderView
1671 // paints the root's background. 1648 // paints the root's background.
1672 if (isRootLayer() || renderer()->isDocumentElement()) 1649 if (isRootLayer() || renderer()->isDocumentElement())
1673 return true; 1650 return true;
1674 1651
1675 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we 1652 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
1676 // can go ahead and return true. 1653 // can go ahead and return true.
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 } 1993 }
2017 } 1994 }
2018 1995
2019 void showLayerTree(const blink::RenderObject* renderer) 1996 void showLayerTree(const blink::RenderObject* renderer)
2020 { 1997 {
2021 if (!renderer) 1998 if (!renderer)
2022 return; 1999 return;
2023 showLayerTree(renderer->enclosingLayer()); 2000 showLayerTree(renderer->enclosingLayer());
2024 } 2001 }
2025 #endif 2002 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698