| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 ASSERT(m_shape); | 222 ASSERT(m_shape); |
| 223 return *m_shape; | 223 return *m_shape; |
| 224 } | 224 } |
| 225 | 225 |
| 226 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, | 226 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, |
| 227 WritingMode writingMode) { | 227 WritingMode writingMode) { |
| 228 switch (writingMode) { | 228 switch (writingMode) { |
| 229 case TopToBottomWritingMode: | 229 case WritingMode::HorizontalTb: |
| 230 return LayoutUnit(layoutBox.borderTop()); | 230 return LayoutUnit(layoutBox.borderTop()); |
| 231 case LeftToRightWritingMode: | 231 case WritingMode::VerticalLr: |
| 232 return LayoutUnit(layoutBox.borderLeft()); | 232 return LayoutUnit(layoutBox.borderLeft()); |
| 233 case RightToLeftWritingMode: | 233 case WritingMode::VerticalRl: |
| 234 return LayoutUnit(layoutBox.borderRight()); | 234 return LayoutUnit(layoutBox.borderRight()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 ASSERT_NOT_REACHED(); | 237 ASSERT_NOT_REACHED(); |
| 238 return LayoutUnit(layoutBox.borderBefore()); | 238 return LayoutUnit(layoutBox.borderBefore()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 inline LayoutUnit borderAndPaddingBeforeInWritingMode( | 241 inline LayoutUnit borderAndPaddingBeforeInWritingMode( |
| 242 const LayoutBox& layoutBox, | 242 const LayoutBox& layoutBox, |
| 243 WritingMode writingMode) { | 243 WritingMode writingMode) { |
| 244 switch (writingMode) { | 244 switch (writingMode) { |
| 245 case TopToBottomWritingMode: | 245 case WritingMode::HorizontalTb: |
| 246 return layoutBox.borderTop() + layoutBox.paddingTop(); | 246 return layoutBox.borderTop() + layoutBox.paddingTop(); |
| 247 case LeftToRightWritingMode: | 247 case WritingMode::VerticalLr: |
| 248 return layoutBox.borderLeft() + layoutBox.paddingLeft(); | 248 return layoutBox.borderLeft() + layoutBox.paddingLeft(); |
| 249 case RightToLeftWritingMode: | 249 case WritingMode::VerticalRl: |
| 250 return layoutBox.borderRight() + layoutBox.paddingRight(); | 250 return layoutBox.borderRight() + layoutBox.paddingRight(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 ASSERT_NOT_REACHED(); | 253 ASSERT_NOT_REACHED(); |
| 254 return layoutBox.borderAndPaddingBefore(); | 254 return layoutBox.borderAndPaddingBefore(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const { | 257 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const { |
| 258 switch (referenceBox(*m_layoutBox.style()->shapeOutside())) { | 258 switch (referenceBox(*m_layoutBox.style()->shapeOutside())) { |
| 259 case MarginBox: | 259 case MarginBox: |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 return result; | 434 return result; |
| 435 } | 435 } |
| 436 | 436 |
| 437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const { | 437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const { |
| 438 if (!m_layoutBox.style()->isHorizontalWritingMode()) | 438 if (!m_layoutBox.style()->isHorizontalWritingMode()) |
| 439 return size.transposedSize(); | 439 return size.transposedSize(); |
| 440 return size; | 440 return size; |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace blink | 443 } // namespace blink |
| OLD | NEW |