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 = m_renderer.containingBlock() ? m_renderer.containi ngBlock()->contentWidthExcludingScrollbar() : LayoutUnit(); |
leviw_travelin_and_unemployed
2015/04/22 01:02:16
Will this still yield the right answer when we hav
| |
157 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat()); | 157 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat()); |
158 | 158 |
159 float shapeImageThreshold = style.shapeImageThreshold(); | 159 float shapeImageThreshold = style.shapeImageThreshold(); |
160 ASSERT(style.shapeOutside()); | 160 ASSERT(style.shapeOutside()); |
161 const ShapeValue& shapeValue = *style.shapeOutside(); | 161 const ShapeValue& shapeValue = *style.shapeOutside(); |
162 | 162 |
163 switch (shapeValue.type()) { | 163 switch (shapeValue.type()) { |
164 case ShapeValue::Shape: | 164 case ShapeValue::Shape: |
165 ASSERT(shapeValue.shape()); | 165 ASSERT(shapeValue.shape()); |
166 m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSi ze, writingMode, margin); | 166 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 } | 345 } |
346 | 346 |
347 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const | 347 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const |
348 { | 348 { |
349 if (!m_renderer.style()->isHorizontalWritingMode()) | 349 if (!m_renderer.style()->isHorizontalWritingMode()) |
350 return size.transposedSize(); | 350 return size.transposedSize(); |
351 return size; | 351 return size; |
352 } | 352 } |
353 | 353 |
354 } // namespace blink | 354 } // namespace blink |
OLD | NEW |