| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ASSERT(mode == PositionOnContainingLine); | 135 ASSERT(mode == PositionOnContainingLine); |
| 136 int baseline = firstLineBoxBaseline(); | 136 int baseline = firstLineBoxBaseline(); |
| 137 if (baseline == -1) | 137 if (baseline == -1) |
| 138 baseline = synthesizedBaselineFromContentBox(this, direction); | 138 baseline = synthesizedBaselineFromContentBox(this, direction); |
| 139 | 139 |
| 140 return beforeMarginInLineDirection(direction) + baseline; | 140 return beforeMarginInLineDirection(direction) + baseline; |
| 141 } | 141 } |
| 142 | 142 |
| 143 int RenderFlexibleBox::firstLineBoxBaseline() const | 143 int RenderFlexibleBox::firstLineBoxBaseline() const |
| 144 { | 144 { |
| 145 if (isWritingModeRoot() || m_numberOfInFlowChildrenOnFirstLine <= 0) | 145 if (m_numberOfInFlowChildrenOnFirstLine <= 0) |
| 146 return -1; | 146 return -1; |
| 147 RenderBox* baselineChild = 0; | 147 RenderBox* baselineChild = 0; |
| 148 int childNumber = 0; | 148 int childNumber = 0; |
| 149 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { | 149 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { |
| 150 if (child->isOutOfFlowPositioned()) | 150 if (child->isOutOfFlowPositioned()) |
| 151 continue; | 151 continue; |
| 152 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI
nCrossAxis(child)) { | 152 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI
nCrossAxis(child)) { |
| 153 baselineChild = child; | 153 baselineChild = child; |
| 154 break; | 154 break; |
| 155 } | 155 } |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 ASSERT(child); | 1320 ASSERT(child); |
| 1321 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1321 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1322 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1322 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1323 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1323 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1324 adjustAlignmentForChild(child, newOffset - originalOffset); | 1324 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1325 } | 1325 } |
| 1326 } | 1326 } |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 } | 1329 } |
| OLD | NEW |