OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |