| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 getShapeImageAndRect(shapeValue, &m_renderer, m_referenceBoxLogicalSize,
image, imageRect); | 128 getShapeImageAndRect(shapeValue, &m_renderer, m_referenceBoxLogicalSize,
image, imageRect); |
| 129 const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_ref
erenceBoxLogicalSize); | 129 const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_ref
erenceBoxLogicalSize); |
| 130 m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect
, marginRect, writingMode, margin); | 130 m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect
, marginRect, writingMode, margin); |
| 131 break; | 131 break; |
| 132 } | 132 } |
| 133 case ShapeValue::Box: { | 133 case ShapeValue::Box: { |
| 134 const RoundedRect& shapeRect = m_renderer.style()->getRoundedBorderFor(L
ayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), m_renderer.view()); | 134 const RoundedRect& shapeRect = m_renderer.style()->getRoundedBorderFor(L
ayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), m_renderer.view()); |
| 135 m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin); | 135 m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin); |
| 136 break; | 136 break; |
| 137 } | 137 } |
| 138 case ShapeValue::Outside: | |
| 139 // Outside should have already resolved to a different shape value. | |
| 140 ASSERT_NOT_REACHED(); | |
| 141 } | 138 } |
| 142 | 139 |
| 143 ASSERT(m_shape); | 140 ASSERT(m_shape); |
| 144 return *m_shape; | 141 return *m_shape; |
| 145 } | 142 } |
| 146 | 143 |
| 147 template<class RenderType> | 144 template<class RenderType> |
| 148 SegmentList ShapeInfo<RenderType>::computeSegmentsForLine(LayoutUnit lineTop, La
youtUnit lineHeight) const | 145 SegmentList ShapeInfo<RenderType>::computeSegmentsForLine(LayoutUnit lineTop, La
youtUnit lineHeight) const |
| 149 { | 146 { |
| 150 ASSERT(lineHeight >= 0); | 147 ASSERT(lineHeight >= 0); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 case BoxMissing: break; | 241 case BoxMissing: break; |
| 245 } | 242 } |
| 246 | 243 |
| 247 ASSERT_NOT_REACHED(); | 244 ASSERT_NOT_REACHED(); |
| 248 return LayoutUnit(); | 245 return LayoutUnit(); |
| 249 } | 246 } |
| 250 | 247 |
| 251 template class ShapeInfo<RenderBlock>; | 248 template class ShapeInfo<RenderBlock>; |
| 252 template class ShapeInfo<RenderBox>; | 249 template class ShapeInfo<RenderBox>; |
| 253 } | 250 } |
| OLD | NEW |