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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (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
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.h ('k') | Source/core/rendering/RenderFlowThread.h » ('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) 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int RenderFlexibleBox::inlineBlockBaseline(LineDirectionMode direction) const 190 int RenderFlexibleBox::inlineBlockBaseline(LineDirectionMode direction) const
191 { 191 {
192 int baseline = firstLineBoxBaseline(); 192 int baseline = firstLineBoxBaseline();
193 if (baseline != -1) 193 if (baseline != -1)
194 return baseline; 194 return baseline;
195 195
196 int marginAscent = direction == HorizontalLine ? marginTop() : marginRight() ; 196 int marginAscent = direction == HorizontalLine ? marginTop() : marginRight() ;
197 return synthesizedBaselineFromContentBox(*this, direction) + marginAscent; 197 return synthesizedBaselineFromContentBox(*this, direction) + marginAscent;
198 } 198 }
199 199
200 void RenderFlexibleBox::removeChild(RenderObject* child) 200 void RenderFlexibleBox::removeChild(LayoutObject* child)
201 { 201 {
202 RenderBlock::removeChild(child); 202 RenderBlock::removeChild(child);
203 m_intrinsicSizeAlongMainAxis.remove(child); 203 m_intrinsicSizeAlongMainAxis.remove(child);
204 } 204 }
205 205
206 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 206 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
207 { 207 {
208 RenderBlock::styleDidChange(diff, oldStyle); 208 RenderBlock::styleDidChange(diff, oldStyle);
209 209
210 if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff.needsF ullLayout()) { 210 if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff.needsF ullLayout()) {
(...skipping 1190 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/RenderFlexibleBox.h ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698