| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 Frame* frame = m_page->mainFrame(); | 320 Frame* frame = m_page->mainFrame(); |
| 321 SVGSVGElement* rootElement = toSVGDocument(frame->document())->rootElement()
; | 321 SVGSVGElement* rootElement = toSVGDocument(frame->document())->rootElement()
; |
| 322 if (!rootElement) | 322 if (!rootElement) |
| 323 return; | 323 return; |
| 324 | 324 |
| 325 intrinsicWidth = rootElement->intrinsicWidth(); | 325 intrinsicWidth = rootElement->intrinsicWidth(); |
| 326 intrinsicHeight = rootElement->intrinsicHeight(); | 326 intrinsicHeight = rootElement->intrinsicHeight(); |
| 327 if (rootElement->preserveAspectRatioCurrentValue().align() == SVGPreserveAsp
ectRatio::SVG_PRESERVEASPECTRATIO_NONE) | 327 if (rootElement->preserveAspectRatioCurrentValue().align() == SVGPreserveAsp
ectRatio::SVG_PRESERVEASPECTRATIO_NONE) |
| 328 return; | 328 return; |
| 329 | 329 |
| 330 intrinsicRatio = rootElement->viewBoxCurrentValue().size(); | 330 intrinsicRatio = rootElement->viewBox()->currentValue()->value().size(); |
| 331 if (intrinsicRatio.isEmpty() && intrinsicWidth.isFixed() && intrinsicHeight.
isFixed()) | 331 if (intrinsicRatio.isEmpty() && intrinsicWidth.isFixed() && intrinsicHeight.
isFixed()) |
| 332 intrinsicRatio = FloatSize(floatValueForLength(intrinsicWidth, 0), float
ValueForLength(intrinsicHeight, 0)); | 332 intrinsicRatio = FloatSize(floatValueForLength(intrinsicWidth, 0), float
ValueForLength(intrinsicHeight, 0)); |
| 333 } | 333 } |
| 334 | 334 |
| 335 // FIXME: support catchUpIfNecessary. | 335 // FIXME: support catchUpIfNecessary. |
| 336 void SVGImage::startAnimation(bool /* catchUpIfNecessary */) | 336 void SVGImage::startAnimation(bool /* catchUpIfNecessary */) |
| 337 { | 337 { |
| 338 if (!m_page) | 338 if (!m_page) |
| 339 return; | 339 return; |
| 340 Frame* frame = m_page->mainFrame(); | 340 Frame* frame = m_page->mainFrame(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 406 |
| 407 return m_page; | 407 return m_page; |
| 408 } | 408 } |
| 409 | 409 |
| 410 String SVGImage::filenameExtension() const | 410 String SVGImage::filenameExtension() const |
| 411 { | 411 { |
| 412 return "svg"; | 412 return "svg"; |
| 413 } | 413 } |
| 414 | 414 |
| 415 } | 415 } |
| OLD | NEW |