| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 if (!toRenderSVGRoot(renderer())->isEmbeddedThroughSVGImage()) | 560 if (!toRenderSVGRoot(renderer())->isEmbeddedThroughSVGImage()) |
| 561 return SVGRect(); | 561 return SVGRect(); |
| 562 | 562 |
| 563 Length intrinsicWidth = this->intrinsicWidth(); | 563 Length intrinsicWidth = this->intrinsicWidth(); |
| 564 Length intrinsicHeight = this->intrinsicHeight(); | 564 Length intrinsicHeight = this->intrinsicHeight(); |
| 565 if (!intrinsicWidth.isFixed() || !intrinsicHeight.isFixed()) | 565 if (!intrinsicWidth.isFixed() || !intrinsicHeight.isFixed()) |
| 566 return SVGRect(); | 566 return SVGRect(); |
| 567 | 567 |
| 568 // If no viewBox is specified but non-relative width/height values, then we | 568 // If no viewBox is specified but non-relative width/height values, then we |
| 569 // should always synthesize a viewBox if we're embedded through a SVGImage. | 569 // should always synthesize a viewBox if we're embedded through a SVGImage. |
| 570 return SVGRect(FloatPoint(), FloatSize(floatValueForLength(intrinsicWidth, 0
, 0), floatValueForLength(intrinsicHeight, 0, 0))); | 570 return SVGRect(FloatPoint(), FloatSize(floatValueForLength(intrinsicWidth, 0
), floatValueForLength(intrinsicHeight, 0))); |
| 571 } | 571 } |
| 572 | 572 |
| 573 FloatSize SVGSVGElement::currentViewportSize() const | 573 FloatSize SVGSVGElement::currentViewportSize() const |
| 574 { | 574 { |
| 575 Length intrinsicWidth = this->intrinsicWidth(); | 575 Length intrinsicWidth = this->intrinsicWidth(); |
| 576 Length intrinsicHeight = this->intrinsicHeight(); | 576 Length intrinsicHeight = this->intrinsicHeight(); |
| 577 if (intrinsicWidth.isFixed() && intrinsicHeight.isFixed()) | 577 if (intrinsicWidth.isFixed() && intrinsicHeight.isFixed()) |
| 578 return FloatSize(floatValueForLength(intrinsicWidth, 0), floatValueForLe
ngth(intrinsicHeight, 0)); | 578 return FloatSize(floatValueForLength(intrinsicWidth, 0), floatValueForLe
ngth(intrinsicHeight, 0)); |
| 579 | 579 |
| 580 if (!renderer()) | 580 if (!renderer()) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 continue; | 770 continue; |
| 771 | 771 |
| 772 Element* element = toElement(node); | 772 Element* element = toElement(node); |
| 773 if (element->getIdAttribute() == id) | 773 if (element->getIdAttribute() == id) |
| 774 return element; | 774 return element; |
| 775 } | 775 } |
| 776 return 0; | 776 return 0; |
| 777 } | 777 } |
| 778 | 778 |
| 779 } | 779 } |
| OLD | NEW |