| 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 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 view->preserveAspectRatio()->baseValue()->setAlign(preserveAspectRatio()
->currentValue()->align()); | 762 view->preserveAspectRatio()->baseValue()->setAlign(preserveAspectRatio()
->currentValue()->align()); |
| 763 view->preserveAspectRatio()->baseValue()->setMeetOrSlice(preserveAspectR
atio()->currentValue()->meetOrSlice()); | 763 view->preserveAspectRatio()->baseValue()->setMeetOrSlice(preserveAspectR
atio()->currentValue()->meetOrSlice()); |
| 764 } | 764 } |
| 765 | 765 |
| 766 if (viewElement->hasAttribute(SVGNames::zoomAndPanAttr)) | 766 if (viewElement->hasAttribute(SVGNames::zoomAndPanAttr)) |
| 767 view->setZoomAndPan(viewElement->zoomAndPan()); | 767 view->setZoomAndPan(viewElement->zoomAndPan()); |
| 768 else | 768 else |
| 769 view->setZoomAndPan(zoomAndPan()); | 769 view->setZoomAndPan(zoomAndPan()); |
| 770 } | 770 } |
| 771 | 771 |
| 772 // getElementById on SVGSVGElement is restricted to only the child subtree defin
ed by the <svg> element. | |
| 773 // See http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGSVGElement | |
| 774 Element* SVGSVGElement::getElementById(const AtomicString& id) const | |
| 775 { | |
| 776 Element* element = treeScope().getElementById(id); | |
| 777 if (element && element->isDescendantOf(this)) | |
| 778 return element; | |
| 779 | |
| 780 // Fall back to traversing our subtree. Duplicate ids are allowed, the first
found will | |
| 781 // be returned. | |
| 782 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { | |
| 783 if (element->getIdAttribute() == id) | |
| 784 return element; | |
| 785 } | |
| 786 return 0; | |
| 787 } | 772 } |
| 788 | |
| 789 } | |
| OLD | NEW |