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

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

Issue 204843002: Reduce invalidation on children-needs-layout containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated after Levi's review. Created 6 years, 9 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 4118 matching lines...) Expand 10 before | Expand all | Expand 10 after
4129 { 4129 {
4130 ASSERT(!needsLayout()); 4130 ASSERT(!needsLayout());
4131 // If fragmentation height has changed, we need to lay out. No need to enter the renderer if it 4131 // If fragmentation height has changed, we need to lay out. No need to enter the renderer if it
4132 // is childless, though. 4132 // is childless, though.
4133 if (view()->layoutState()->pageLogicalHeightChanged() && firstChild()) 4133 if (view()->layoutState()->pageLogicalHeightChanged() && firstChild())
4134 layoutScope.setChildNeedsLayout(this); 4134 layoutScope.setChildNeedsLayout(this);
4135 } 4135 }
4136 4136
4137 void RenderBox::addVisualEffectOverflow() 4137 void RenderBox::addVisualEffectOverflow()
4138 { 4138 {
4139 if (!style()->boxShadow() && !style()->hasBorderImageOutsets() && !style()-> hasOutline()) 4139 if (!style()->hasVisualOverflowingEffect())
4140 return; 4140 return;
4141 4141
4142 bool isFlipped = style()->isFlippedBlocksWritingMode(); 4142 bool isFlipped = style()->isFlippedBlocksWritingMode();
4143 bool isHorizontal = isHorizontalWritingMode(); 4143 bool isHorizontal = isHorizontalWritingMode();
4144 4144
4145 LayoutRect borderBox = borderBoxRect(); 4145 LayoutRect borderBox = borderBoxRect();
4146 LayoutUnit overflowMinX = borderBox.x(); 4146 LayoutUnit overflowMinX = borderBox.x();
4147 LayoutUnit overflowMaxX = borderBox.maxX(); 4147 LayoutUnit overflowMaxX = borderBox.maxX();
4148 LayoutUnit overflowMinY = borderBox.y(); 4148 LayoutUnit overflowMinY = borderBox.y();
4149 LayoutUnit overflowMaxY = borderBox.maxY(); 4149 LayoutUnit overflowMaxY = borderBox.maxY();
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 return 0; 4690 return 0;
4691 4691
4692 if (!layoutState && !flowThreadContainingBlock()) 4692 if (!layoutState && !flowThreadContainingBlock())
4693 return 0; 4693 return 0;
4694 4694
4695 RenderBlock* containerBlock = containingBlock(); 4695 RenderBlock* containerBlock = containingBlock();
4696 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4696 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4697 } 4697 }
4698 4698
4699 } // namespace WebCore 4699 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698