| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 FloatSize SVGImage::concreteObjectSize(const FloatSize& defaultObjectSize) const | 171 FloatSize SVGImage::concreteObjectSize(const FloatSize& defaultObjectSize) const |
| 172 { | 172 { |
| 173 SVGSVGElement* svg = svgRootElement(m_page.get()); | 173 SVGSVGElement* svg = svgRootElement(m_page.get()); |
| 174 if (!svg) | 174 if (!svg) |
| 175 return FloatSize(); | 175 return FloatSize(); |
| 176 | 176 |
| 177 LayoutSVGRoot* layoutObject = toLayoutSVGRoot(svg->layoutObject()); | 177 LayoutSVGRoot* layoutObject = toLayoutSVGRoot(svg->layoutObject()); |
| 178 if (!layoutObject) | 178 if (!layoutObject) |
| 179 return FloatSize(); | 179 return FloatSize(); |
| 180 | 180 |
| 181 LayoutBox::IntrinsicSizingInfo intrinsicSizingInfo; | 181 LayoutReplaced::IntrinsicSizingInfo intrinsicSizingInfo; |
| 182 layoutObject->computeIntrinsicSizingInfo(intrinsicSizingInfo); | 182 layoutObject->computeIntrinsicSizingInfo(intrinsicSizingInfo); |
| 183 | 183 |
| 184 // https://www.w3.org/TR/css3-images/#default-sizing | 184 // https://www.w3.org/TR/css3-images/#default-sizing |
| 185 | 185 |
| 186 if (intrinsicSizingInfo.hasWidth && intrinsicSizingInfo.hasHeight) | 186 if (intrinsicSizingInfo.hasWidth && intrinsicSizingInfo.hasHeight) |
| 187 return intrinsicSizingInfo.size; | 187 return intrinsicSizingInfo.size; |
| 188 | 188 |
| 189 if (svg->preserveAspectRatio()->currentValue()->align() == SVGPreserveAspect
Ratio::SVG_PRESERVEASPECTRATIO_NONE) { | 189 if (svg->preserveAspectRatio()->currentValue()->align() == SVGPreserveAspect
Ratio::SVG_PRESERVEASPECTRATIO_NONE) { |
| 190 // TODO(davve): The intrinsic aspect ratio is not used to resolve a miss
ing intrinsic width | 190 // TODO(davve): The intrinsic aspect ratio is not used to resolve a miss
ing intrinsic width |
| 191 // or height when preserveAspectRatio is none. It's unclear whether this
is correct. See | 191 // or height when preserveAspectRatio is none. It's unclear whether this
is correct. See |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 539 |
| 540 return m_page; | 540 return m_page; |
| 541 } | 541 } |
| 542 | 542 |
| 543 String SVGImage::filenameExtension() const | 543 String SVGImage::filenameExtension() const |
| 544 { | 544 { |
| 545 return "svg"; | 545 return "svg"; |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace blink | 548 } // namespace blink |
| OLD | NEW |