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

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

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/rendering/RenderFlexibleBox.h" 32 #include "core/rendering/RenderFlexibleBox.h"
33 33
34 #include "core/frame/UseCounter.h" 34 #include "core/frame/UseCounter.h"
35 #include "core/layout/Layer.h"
35 #include "core/paint/BlockPainter.h" 36 #include "core/paint/BlockPainter.h"
36 #include "core/rendering/RenderLayer.h"
37 #include "core/rendering/RenderView.h" 37 #include "core/rendering/RenderView.h"
38 #include "core/rendering/TextAutosizer.h" 38 #include "core/rendering/TextAutosizer.h"
39 #include "core/rendering/style/RenderStyle.h" 39 #include "core/rendering/style/RenderStyle.h"
40 #include "platform/LengthFunctions.h" 40 #include "platform/LengthFunctions.h"
41 #include "wtf/MathExtras.h" 41 #include "wtf/MathExtras.h"
42 #include <limits> 42 #include <limits>
43 43
44 namespace blink { 44 namespace blink {
45 45
46 struct RenderFlexibleBox::LineContext { 46 struct RenderFlexibleBox::LineContext {
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 if (hasOrthogonalFlow(child)) 983 if (hasOrthogonalFlow(child))
984 child.setOverrideLogicalContentHeight(childPreferredSize - child.borderA ndPaddingLogicalHeight()); 984 child.setOverrideLogicalContentHeight(childPreferredSize - child.borderA ndPaddingLogicalHeight());
985 else 985 else
986 child.setOverrideLogicalContentWidth(childPreferredSize - child.borderAn dPaddingLogicalWidth()); 986 child.setOverrideLogicalContentWidth(childPreferredSize - child.borderAn dPaddingLogicalWidth());
987 } 987 }
988 988
989 void RenderFlexibleBox::prepareChildForPositionedLayout(RenderBox& child, Layout Unit mainAxisOffset, LayoutUnit crossAxisOffset, PositionedLayoutMode layoutMode ) 989 void RenderFlexibleBox::prepareChildForPositionedLayout(RenderBox& child, Layout Unit mainAxisOffset, LayoutUnit crossAxisOffset, PositionedLayoutMode layoutMode )
990 { 990 {
991 ASSERT(child.isOutOfFlowPositioned()); 991 ASSERT(child.isOutOfFlowPositioned());
992 child.containingBlock()->insertPositionedObject(&child); 992 child.containingBlock()->insertPositionedObject(&child);
993 RenderLayer* childLayer = child.layer(); 993 Layer* childLayer = child.layer();
994 LayoutUnit inlinePosition = isColumnFlow() ? crossAxisOffset : mainAxisOffse t; 994 LayoutUnit inlinePosition = isColumnFlow() ? crossAxisOffset : mainAxisOffse t;
995 if (layoutMode == FlipForRowReverse && style()->flexDirection() == FlowRowRe verse) 995 if (layoutMode == FlipForRowReverse && style()->flexDirection() == FlowRowRe verse)
996 inlinePosition = mainAxisExtent() - mainAxisOffset; 996 inlinePosition = mainAxisExtent() - mainAxisOffset;
997 childLayer->setStaticInlinePosition(inlinePosition); 997 childLayer->setStaticInlinePosition(inlinePosition);
998 998
999 LayoutUnit staticBlockPosition = isColumnFlow() ? mainAxisOffset : crossAxis Offset; 999 LayoutUnit staticBlockPosition = isColumnFlow() ? mainAxisOffset : crossAxis Offset;
1000 if (childLayer->staticBlockPosition() != staticBlockPosition) { 1000 if (childLayer->staticBlockPosition() != staticBlockPosition) {
1001 childLayer->setStaticBlockPosition(staticBlockPosition); 1001 childLayer->setStaticBlockPosition(staticBlockPosition);
1002 if (child.style()->hasStaticBlockPosition(style()->isHorizontalWritingMo de())) 1002 if (child.style()->hasStaticBlockPosition(style()->isHorizontalWritingMo de()))
1003 child.setChildNeedsLayout(MarkOnlyThis); 1003 child.setChildNeedsLayout(MarkOnlyThis);
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 ASSERT(child); 1401 ASSERT(child);
1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1405 adjustAlignmentForChild(*child, newOffset - originalOffset); 1405 adjustAlignmentForChild(*child, newOffset - originalOffset);
1406 } 1406 }
1407 } 1407 }
1408 } 1408 }
1409 1409
1410 } 1410 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderEmbeddedObject.cpp ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698