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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With expectations. Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 // FIXME: Currently only using this logic for RenderBox and its ilk. Ideally , RenderBlockFlows with 1551 // FIXME: Currently only using this logic for RenderBox and its ilk. Ideally , RenderBlockFlows with
1552 // inline children should track a dirty rect in local coordinates for dirty lines instead of repainting 1552 // inline children should track a dirty rect in local coordinates for dirty lines instead of repainting
1553 // the world. 1553 // the world.
1554 // FIXME: We should still be recursing through inline's children, as they ca n have boxes, but we don't 1554 // FIXME: We should still be recursing through inline's children, as they ca n have boxes, but we don't
1555 // appear to have tests for this? 1555 // appear to have tests for this?
1556 // FIXME: SVG should probably also go through this unified repaint system. 1556 // FIXME: SVG should probably also go through this unified repaint system.
1557 1557
1558 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); 1558 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled());
1559 ASSERT(!needsLayout()); 1559 ASSERT(!needsLayout());
1560 1560
1561 if (!shouldCheckForInvalidationAfterLayout())
1562 return;
1563
1561 const LayoutRect oldRepaintRect = previousRepaintRect(); 1564 const LayoutRect oldRepaintRect = previousRepaintRect();
1562 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa intContainer(); 1565 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa intContainer();
1563 RenderLayerModelObject* repaintContainer = containerForRepaint(); 1566 RenderLayerModelObject* repaintContainer = containerForRepaint();
1564 setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer)); 1567 setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer));
1565 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaint Container)); 1568 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaint Container));
1566 1569
1567 // If we are set to do a full repaint that means the RenderView will be 1570 // If we are set to do a full repaint that means the RenderView will be
1568 // invalidated. We can then skip issuing of invalidations for the child 1571 // invalidated. We can then skip issuing of invalidations for the child
1569 // renderers as they'll be covered by the RenderView. 1572 // renderers as they'll be covered by the RenderView.
1570 if (view()->doingFullRepaint() && this != view()) { 1573 if (view()->doingFullRepaint() && this != view()) {
(...skipping 3095 matching lines...) Expand 10 before | Expand all | Expand 10 after
4666 return 0; 4669 return 0;
4667 4670
4668 if (!layoutState && !flowThreadContainingBlock()) 4671 if (!layoutState && !flowThreadContainingBlock())
4669 return 0; 4672 return 0;
4670 4673
4671 RenderBlock* containerBlock = containingBlock(); 4674 RenderBlock* containerBlock = containingBlock();
4672 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4675 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4673 } 4676 }
4674 4677
4675 } // namespace WebCore 4678 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderDeprecatedFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698