Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: Source/core/svg/SVGSVGElement.cpp

Issue 23063002: Add toSVGClipPathElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGClipPathElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGClipPathElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698