| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 if (!IsValidRasterShapeRect(margin_rect) || | 163 if (!IsValidRasterShapeRect(margin_rect) || |
| 164 !IsValidRasterShapeRect(image_rect)) { | 164 !IsValidRasterShapeRect(image_rect)) { |
| 165 layout_box_.GetDocument().AddConsoleMessage( | 165 layout_box_.GetDocument().AddConsoleMessage( |
| 166 ConsoleMessage::Create(kRenderingMessageSource, kErrorMessageLevel, | 166 ConsoleMessage::Create(kRenderingMessageSource, kErrorMessageLevel, |
| 167 "The shape-outside image is too large.")); | 167 "The shape-outside image is too large.")); |
| 168 return Shape::CreateEmptyRasterShape(writing_mode, margin); | 168 return Shape::CreateEmptyRasterShape(writing_mode, margin); |
| 169 } | 169 } |
| 170 | 170 |
| 171 DCHECK(!style_image->IsPendingImage()); | 171 DCHECK(!style_image->IsPendingImage()); |
| 172 RefPtr<Image> image = | 172 RefPtr<Image> image = |
| 173 style_image->GetImage(layout_box_, FlooredIntSize(image_size), | 173 style_image->GetImage(layout_box_, FlooredIntSize(image_size)); |
| 174 layout_box_.Style()->EffectiveZoom()); | |
| 175 | 174 |
| 176 return Shape::CreateRasterShape(image.Get(), shape_image_threshold, | 175 return Shape::CreateRasterShape(image.Get(), shape_image_threshold, |
| 177 image_rect, margin_rect, writing_mode, | 176 image_rect, margin_rect, writing_mode, |
| 178 margin); | 177 margin); |
| 179 } | 178 } |
| 180 | 179 |
| 181 const Shape& ShapeOutsideInfo::ComputedShape() const { | 180 const Shape& ShapeOutsideInfo::ComputedShape() const { |
| 182 if (Shape* shape = shape_.get()) | 181 if (Shape* shape = shape_.get()) |
| 183 return *shape; | 182 return *shape; |
| 184 | 183 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 return result; | 443 return result; |
| 445 } | 444 } |
| 446 | 445 |
| 447 FloatSize ShapeOutsideInfo::ShapeToLayoutObjectSize(FloatSize size) const { | 446 FloatSize ShapeOutsideInfo::ShapeToLayoutObjectSize(FloatSize size) const { |
| 448 if (!layout_box_.Style()->IsHorizontalWritingMode()) | 447 if (!layout_box_.Style()->IsHorizontalWritingMode()) |
| 449 return size.TransposedSize(); | 448 return size.TransposedSize(); |
| 450 return size; | 449 return size; |
| 451 } | 450 } |
| 452 | 451 |
| 453 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |