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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 if (Shape* shape = m_shape.get()) | 146 if (Shape* shape = m_shape.get()) |
147 return *shape; | 147 return *shape; |
148 | 148 |
149 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true); | 149 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true); |
150 | 150 |
151 const ComputedStyle& style = *m_renderer.style(); | 151 const ComputedStyle& style = *m_renderer.style(); |
152 ASSERT(m_renderer.containingBlock()); | 152 ASSERT(m_renderer.containingBlock()); |
153 const ComputedStyle& containingBlockStyle = *m_renderer.containingBlock()->s tyle(); | 153 const ComputedStyle& containingBlockStyle = *m_renderer.containingBlock()->s tyle(); |
154 | 154 |
155 WritingMode writingMode = containingBlockStyle.writingMode(); | 155 WritingMode writingMode = containingBlockStyle.writingMode(); |
156 LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containi ngBlock()->contentWidth() : LayoutUnit(); | 156 LayoutUnit maximumValue; |
157 if (m_renderer.containingBlock() && m_renderer.containingBlock()->contentWid th() > 0) | |
leviw_travelin_and_unemployed
2015/04/14 21:12:31
The contentWidth() is negative? That doesn't seem
| |
158 maximumValue = m_renderer.containingBlock()->contentWidth(); | |
157 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat()); | 159 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat()); |
158 | 160 |
159 float shapeImageThreshold = style.shapeImageThreshold(); | 161 float shapeImageThreshold = style.shapeImageThreshold(); |
160 ASSERT(style.shapeOutside()); | 162 ASSERT(style.shapeOutside()); |
161 const ShapeValue& shapeValue = *style.shapeOutside(); | 163 const ShapeValue& shapeValue = *style.shapeOutside(); |
162 | 164 |
163 switch (shapeValue.type()) { | 165 switch (shapeValue.type()) { |
164 case ShapeValue::Shape: | 166 case ShapeValue::Shape: |
165 ASSERT(shapeValue.shape()); | 167 ASSERT(shapeValue.shape()); |
166 m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSi ze, writingMode, margin); | 168 m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSi ze, writingMode, margin); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
345 } | 347 } |
346 | 348 |
347 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const | 349 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const |
348 { | 350 { |
349 if (!m_renderer.style()->isHorizontalWritingMode()) | 351 if (!m_renderer.style()->isHorizontalWritingMode()) |
350 return size.transposedSize(); | 352 return size.transposedSize(); |
351 return size; | 353 return size; |
352 } | 354 } |
353 | 355 |
354 } // namespace blink | 356 } // namespace blink |
OLD | NEW |