| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 711     } | 711     } | 
| 712 | 712 | 
| 713     // Spec: If the SVG fragment identifier addresses a ‘view’ element within an
      SVG document (e.g., MyDrawing.svg#MyView | 713     // Spec: If the SVG fragment identifier addresses a ‘view’ element within an
      SVG document (e.g., MyDrawing.svg#MyView | 
| 714     // or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor ‘svg’ 
     element is displayed in the viewport. | 714     // or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor ‘svg’ 
     element is displayed in the viewport. | 
| 715     // Any view specification attributes included on the given ‘view’ element ov
     erride the corresponding view specification | 715     // Any view specification attributes included on the given ‘view’ element ov
     erride the corresponding view specification | 
| 716     // attributes on the closest ancestor ‘svg’ element. | 716     // attributes on the closest ancestor ‘svg’ element. | 
| 717     if (anchorNode && anchorNode->hasTagName(SVGNames::viewTag)) { | 717     if (anchorNode && anchorNode->hasTagName(SVGNames::viewTag)) { | 
| 718         if (SVGViewElement* viewElement = anchorNode->hasTagName(SVGNames::viewT
     ag) ? static_cast<SVGViewElement*>(anchorNode) : 0) { | 718         if (SVGViewElement* viewElement = anchorNode->hasTagName(SVGNames::viewT
     ag) ? static_cast<SVGViewElement*>(anchorNode) : 0) { | 
| 719             SVGElement* element = SVGLocatable::nearestViewportElement(viewEleme
     nt); | 719             SVGElement* element = SVGLocatable::nearestViewportElement(viewEleme
     nt); | 
| 720             if (element->hasTagName(SVGNames::svgTag)) { | 720             if (element->hasTagName(SVGNames::svgTag)) { | 
| 721                 SVGSVGElement* svg = static_cast<SVGSVGElement*>(element); | 721                 SVGSVGElement* svg = toSVGSVGElement(element); | 
| 722                 svg->inheritViewAttributes(viewElement); | 722                 svg->inheritViewAttributes(viewElement); | 
| 723 | 723 | 
| 724                 if (RenderObject* renderer = svg->renderer()) | 724                 if (RenderObject* renderer = svg->renderer()) | 
| 725                     RenderSVGResource::markForLayoutAndParentResourceInvalidatio
     n(renderer); | 725                     RenderSVGResource::markForLayoutAndParentResourceInvalidatio
     n(renderer); | 
| 726             } | 726             } | 
| 727         } | 727         } | 
| 728         return; | 728         return; | 
| 729     } | 729     } | 
| 730 | 730 | 
| 731     // FIXME: We need to decide which <svg> to focus on, and zoom to it. | 731     // FIXME: We need to decide which <svg> to focus on, and zoom to it. | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 768             continue; | 768             continue; | 
| 769 | 769 | 
| 770         Element* element = toElement(node); | 770         Element* element = toElement(node); | 
| 771         if (element->getIdAttribute() == id) | 771         if (element->getIdAttribute() == id) | 
| 772             return element; | 772             return element; | 
| 773     } | 773     } | 
| 774     return 0; | 774     return 0; | 
| 775 } | 775 } | 
| 776 | 776 | 
| 777 } | 777 } | 
| OLD | NEW | 
|---|