| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return FloatSize(); | 179 return FloatSize(); |
| 180 | 180 |
| 181 LayoutReplaced::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::kSvgPreserveaspectratioNone) { |
| 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 |
| 192 // crbug.com/584172. | 192 // crbug.com/584172. |
| 193 return defaultObjectSize; | 193 return defaultObjectSize; |
| 194 } | 194 } |
| 195 | 195 |
| 196 if (intrinsicSizingInfo.hasWidth) { | 196 if (intrinsicSizingInfo.hasWidth) { |
| 197 if (intrinsicSizingInfo.aspectRatio.isEmpty()) | 197 if (intrinsicSizingInfo.aspectRatio.isEmpty()) |
| 198 return FloatSize(intrinsicSizingInfo.size.width(), defaultObjectSize
.height()); | 198 return FloatSize(intrinsicSizingInfo.size.width(), defaultObjectSize
.height()); |
| 199 | 199 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 561 |
| 562 return m_page ? SizeAvailable : SizeUnavailable; | 562 return m_page ? SizeAvailable : SizeUnavailable; |
| 563 } | 563 } |
| 564 | 564 |
| 565 String SVGImage::filenameExtension() const | 565 String SVGImage::filenameExtension() const |
| 566 { | 566 { |
| 567 return "svg"; | 567 return "svg"; |
| 568 } | 568 } |
| 569 | 569 |
| 570 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |