| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 RefPtr<Image> image = styleImage->image(const_cast<RenderBox*>(&m_renderer),
imageSize); | 135 RefPtr<Image> image = styleImage->image(const_cast<RenderBox*>(&m_renderer),
imageSize); |
| 136 | 136 |
| 137 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect,
marginRect, writingMode, margin); | 137 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect,
marginRect, writingMode, margin); |
| 138 } | 138 } |
| 139 | 139 |
| 140 const Shape& ShapeOutsideInfo::computedShape() const | 140 const Shape& ShapeOutsideInfo::computedShape() const |
| 141 { | 141 { |
| 142 if (Shape* shape = m_shape.get()) | 142 if (Shape* shape = m_shape.get()) |
| 143 return *shape; | 143 return *shape; |
| 144 | 144 |
| 145 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true); |
| 146 |
| 145 const RenderStyle& style = *m_renderer.style(); | 147 const RenderStyle& style = *m_renderer.style(); |
| 146 ASSERT(m_renderer.containingBlock()); | 148 ASSERT(m_renderer.containingBlock()); |
| 147 const RenderStyle& containingBlockStyle = *m_renderer.containingBlock()->sty
le(); | 149 const RenderStyle& containingBlockStyle = *m_renderer.containingBlock()->sty
le(); |
| 148 | 150 |
| 149 WritingMode writingMode = containingBlockStyle.writingMode(); | 151 WritingMode writingMode = containingBlockStyle.writingMode(); |
| 150 LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containi
ngBlock()->contentWidth() : LayoutUnit(); | 152 LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containi
ngBlock()->contentWidth() : LayoutUnit(); |
| 151 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu
mValue.toFloat()); | 153 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu
mValue.toFloat()); |
| 152 | 154 |
| 153 float shapeImageThreshold = style.shapeImageThreshold(); | 155 float shapeImageThreshold = style.shapeImageThreshold(); |
| 154 ASSERT(style.shapeOutside()); | 156 ASSERT(style.shapeOutside()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 341 } |
| 340 | 342 |
| 341 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const | 343 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const |
| 342 { | 344 { |
| 343 if (!m_renderer.style()->isHorizontalWritingMode()) | 345 if (!m_renderer.style()->isHorizontalWritingMode()) |
| 344 return size.transposedSize(); | 346 return size.transposedSize(); |
| 345 return size; | 347 return size; |
| 346 } | 348 } |
| 347 | 349 |
| 348 } // namespace blink | 350 } // namespace blink |
| OLD | NEW |