| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 ASSERT(m_shape); | 181 ASSERT(m_shape); |
| 182 return *m_shape; | 182 return *m_shape; |
| 183 } | 183 } |
| 184 | 184 |
| 185 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, WritingM
ode writingMode) | 185 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, WritingM
ode writingMode) |
| 186 { | 186 { |
| 187 switch (writingMode) { | 187 switch (writingMode) { |
| 188 case TopToBottomWritingMode: return layoutBox.borderTop(); | 188 case TopToBottomWritingMode: return layoutBox.borderTop(); |
| 189 case BottomToTopWritingMode: return layoutBox.borderBottom(); | |
| 190 case LeftToRightWritingMode: return layoutBox.borderLeft(); | 189 case LeftToRightWritingMode: return layoutBox.borderLeft(); |
| 191 case RightToLeftWritingMode: return layoutBox.borderRight(); | 190 case RightToLeftWritingMode: return layoutBox.borderRight(); |
| 192 } | 191 } |
| 193 | 192 |
| 194 ASSERT_NOT_REACHED(); | 193 ASSERT_NOT_REACHED(); |
| 195 return layoutBox.borderBefore(); | 194 return layoutBox.borderBefore(); |
| 196 } | 195 } |
| 197 | 196 |
| 198 inline LayoutUnit borderAndPaddingBeforeInWritingMode(const LayoutBox& layoutBox
, WritingMode writingMode) | 197 inline LayoutUnit borderAndPaddingBeforeInWritingMode(const LayoutBox& layoutBox
, WritingMode writingMode) |
| 199 { | 198 { |
| 200 switch (writingMode) { | 199 switch (writingMode) { |
| 201 case TopToBottomWritingMode: return layoutBox.borderTop() + layoutBox.paddin
gTop(); | 200 case TopToBottomWritingMode: return layoutBox.borderTop() + layoutBox.paddin
gTop(); |
| 202 case BottomToTopWritingMode: return layoutBox.borderBottom() + layoutBox.pad
dingBottom(); | |
| 203 case LeftToRightWritingMode: return layoutBox.borderLeft() + layoutBox.paddi
ngLeft(); | 201 case LeftToRightWritingMode: return layoutBox.borderLeft() + layoutBox.paddi
ngLeft(); |
| 204 case RightToLeftWritingMode: return layoutBox.borderRight() + layoutBox.padd
ingRight(); | 202 case RightToLeftWritingMode: return layoutBox.borderRight() + layoutBox.padd
ingRight(); |
| 205 } | 203 } |
| 206 | 204 |
| 207 ASSERT_NOT_REACHED(); | 205 ASSERT_NOT_REACHED(); |
| 208 return layoutBox.borderAndPaddingBefore(); | 206 return layoutBox.borderAndPaddingBefore(); |
| 209 } | 207 } |
| 210 | 208 |
| 211 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const | 209 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const |
| 212 { | 210 { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 346 } |
| 349 | 347 |
| 350 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const | 348 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const |
| 351 { | 349 { |
| 352 if (!m_layoutBox.style()->isHorizontalWritingMode()) | 350 if (!m_layoutBox.style()->isHorizontalWritingMode()) |
| 353 return size.transposedSize(); | 351 return size.transposedSize(); |
| 354 return size; | 352 return size; |
| 355 } | 353 } |
| 356 | 354 |
| 357 } // namespace blink | 355 } // namespace blink |
| OLD | NEW |