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

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

Issue 276583002: Fix const correctness of containerForRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix LayoutRepainter 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
« no previous file with comments | « Source/core/rendering/LayoutRepainter.h ('k') | Source/core/rendering/RenderFrameSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()) 1561 if (!shouldCheckForInvalidationAfterLayout())
1562 return; 1562 return;
1563 1563
1564 const LayoutRect oldRepaintRect = previousRepaintRect(); 1564 const LayoutRect oldRepaintRect = previousRepaintRect();
1565 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa intContainer(); 1565 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa intContainer();
1566 RenderLayerModelObject* repaintContainer = containerForRepaint(); 1566 const RenderLayerModelObject* repaintContainer = containerForRepaint();
1567 setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer)); 1567 setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer));
1568 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaint Container)); 1568 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaint Container));
1569 1569
1570 // 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
1571 // invalidated. We can then skip issuing of invalidations for the child 1571 // invalidated. We can then skip issuing of invalidations for the child
1572 // renderers as they'll be covered by the RenderView. 1572 // renderers as they'll be covered by the RenderView.
1573 if (view()->doingFullRepaint() && this != view()) { 1573 if (view()->doingFullRepaint() && this != view()) {
1574 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l ocationOffset()); 1574 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l ocationOffset());
1575 RenderObject::repaintTreeAfterLayout(); 1575 RenderObject::repaintTreeAfterLayout();
1576 return; 1576 return;
(...skipping 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 return 0; 4669 return 0;
4670 4670
4671 if (!layoutState && !flowThreadContainingBlock()) 4671 if (!layoutState && !flowThreadContainingBlock())
4672 return 0; 4672 return 0;
4673 4673
4674 RenderBlock* containerBlock = containingBlock(); 4674 RenderBlock* containerBlock = containingBlock();
4675 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4675 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4676 } 4676 }
4677 4677
4678 } // namespace WebCore 4678 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/LayoutRepainter.h ('k') | Source/core/rendering/RenderFrameSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698