| 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 const LayoutRect& imageRect = (m_layoutBox.isLayoutImage()) | 128 const LayoutRect& imageRect = (m_layoutBox.isLayoutImage()) |
| 129 ? toLayoutImage(m_layoutBox).replacedContentRect() | 129 ? toLayoutImage(m_layoutBox).replacedContentRect() |
| 130 : LayoutRect(LayoutPoint(), imageSize); | 130 : LayoutRect(LayoutPoint(), imageSize); |
| 131 | 131 |
| 132 if (!isValidRasterShapeRect(marginRect) || !isValidRasterShapeRect(imageRect
)) { | 132 if (!isValidRasterShapeRect(marginRect) || !isValidRasterShapeRect(imageRect
)) { |
| 133 m_layoutBox.document().addConsoleMessage(ConsoleMessage::create(Renderin
gMessageSource, ErrorMessageLevel, "The shape-outside image is too large.")); | 133 m_layoutBox.document().addConsoleMessage(ConsoleMessage::create(Renderin
gMessageSource, ErrorMessageLevel, "The shape-outside image is too large.")); |
| 134 return Shape::createEmptyRasterShape(writingMode, margin); | 134 return Shape::createEmptyRasterShape(writingMode, margin); |
| 135 } | 135 } |
| 136 | 136 |
| 137 ASSERT(!styleImage->isPendingImage()); | 137 ASSERT(!styleImage->isPendingImage()); |
| 138 RefPtr<Image> image = styleImage->image(const_cast<LayoutBox*>(&m_layoutBox)
, flooredIntSize(imageSize), m_layoutBox.style()->effectiveZoom()); | 138 RefPtr<Image> image = styleImage->image(const_cast<LayoutBox*>(&m_layoutBox)
, imageSize, m_layoutBox.style()->effectiveZoom()); |
| 139 | 139 |
| 140 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect,
marginRect, writingMode, margin); | 140 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect,
marginRect, writingMode, margin); |
| 141 } | 141 } |
| 142 | 142 |
| 143 const Shape& ShapeOutsideInfo::computedShape() const | 143 const Shape& ShapeOutsideInfo::computedShape() const |
| 144 { | 144 { |
| 145 if (Shape* shape = m_shape.get()) | 145 if (Shape* shape = m_shape.get()) |
| 146 return *shape; | 146 return *shape; |
| 147 | 147 |
| 148 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true); | 148 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 } | 345 } |
| 346 | 346 |
| 347 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const | 347 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const |
| 348 { | 348 { |
| 349 if (!m_layoutBox.style()->isHorizontalWritingMode()) | 349 if (!m_layoutBox.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 |