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

Unified Diff: sky/engine/core/rendering/RenderView.cpp

Issue 847303003: Delete selection 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/rendering/RenderView.cpp
diff --git a/sky/engine/core/rendering/RenderView.cpp b/sky/engine/core/rendering/RenderView.cpp
index 4caeb5bddbae20b848ed4e74780571817aaa3db5..4c590adca7eb01499f0b86aaae537a848c22e501 100644
--- a/sky/engine/core/rendering/RenderView.cpp
+++ b/sky/engine/core/rendering/RenderView.cpp
@@ -248,13 +248,6 @@ void RenderView::paintBoxDecorationBackground(PaintInfo& paintInfo, const Layout
}
}
-void RenderView::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* state) const
-{
- // Apply our transform if we have one (because of full page zooming).
- if (!paintInvalidationContainer && layer() && layer()->transform())
- rect = layer()->transform()->mapRect(rect);
-}
-
void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size()));
@@ -274,42 +267,6 @@ static RenderObject* rendererAfterPosition(RenderObject* object, unsigned offset
return child ? child : object->nextInPreOrderAfterChildren();
}
-IntRect RenderView::selectionBounds() const
-{
- HashSet<RenderObject*> selectedObjects;
-
- RenderObject* os = m_selectionStart;
- RenderObject* stop = rendererAfterPosition(m_selectionEnd, m_selectionEndPos);
- while (os && os != stop) {
- if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
- // Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
- selectedObjects.add(os);
- RenderBlock* cb = os->containingBlock();
- while (cb && !cb->isRenderView()) {
- if (!selectedObjects.add(cb).isNewEntry)
- break;
- cb = cb->containingBlock();
- }
- }
-
- os = os->nextInPreOrder();
- }
-
- // Now create a single bounding box rect that encloses the whole selection.
- LayoutRect selRect;
-
- for (auto& renderer : selectedObjects) {
- const RenderLayerModelObject* paintInvalidationContainer = renderer->containerForPaintInvalidation();
- ASSERT(paintInvalidationContainer);
- // selectionRectForPaintInvalidation is in the coordinates of the paintInvalidationContainer, so map to page coordinates.
- bool clipToVisibleContent = false;
- LayoutRect rect = renderer->selectionRectForPaintInvalidation(paintInvalidationContainer, clipToVisibleContent);
- FloatQuad absQuad = paintInvalidationContainer->localToAbsoluteQuad(FloatRect(rect));
- selRect.unite(absQuad.enclosingBoundingBox());
- }
- return pixelSnappedIntRect(selRect);
-}
-
// When exploring the RenderTree looking for the nodes involved in the Selection, sometimes it's
// required to change the traversing direction because the "start" position is below the "end" one.
static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const RenderObject* o, const RenderObject* stop, bool& continueExploring, bool& exploringBackwards)
« sky/engine/core/editing/FrameSelection.cpp ('K') | « sky/engine/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698