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

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

Issue 233653007: Remove contentStyleType and contentScriptType from SVGSVGElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Also remove contentScriptType Created 6 years, 8 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
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 * 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (m_viewSpec) 96 if (m_viewSpec)
97 m_viewSpec->detachContextElement(); 97 m_viewSpec->detachContextElement();
98 98
99 // There are cases where removedFromDocument() is not called. 99 // There are cases where removedFromDocument() is not called.
100 // see ContainerNode::removeAllChildren, called by its destructor. 100 // see ContainerNode::removeAllChildren, called by its destructor.
101 document().accessSVGExtensions().removeTimeContainer(this); 101 document().accessSVGExtensions().removeTimeContainer(this);
102 102
103 ASSERT(inDocument() || !accessDocumentSVGExtensions().isSVGRootWithRelativeL engthDescendents(this)); 103 ASSERT(inDocument() || !accessDocumentSVGExtensions().isSVGRootWithRelativeL engthDescendents(this));
104 } 104 }
105 105
106 const AtomicString& SVGSVGElement::contentScriptType() const
107 {
108 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript", At omicString::ConstructFromLiteral));
109 const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr);
110 return n.isNull() ? defaultValue : n;
111 }
112
113 void SVGSVGElement::setContentScriptType(const AtomicString& type)
114 {
115 setAttribute(SVGNames::contentScriptTypeAttr, type);
116 }
117
118 const AtomicString& SVGSVGElement::contentStyleType() const
119 {
120 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css", AtomicStr ing::ConstructFromLiteral));
121 const AtomicString& n = fastGetAttribute(SVGNames::contentStyleTypeAttr);
122 return n.isNull() ? defaultValue : n;
123 }
124
125 void SVGSVGElement::setContentStyleType(const AtomicString& type)
126 {
127 setAttribute(SVGNames::contentStyleTypeAttr, type);
128 }
129
130 PassRefPtr<SVGRectTearOff> SVGSVGElement::viewport() const 106 PassRefPtr<SVGRectTearOff> SVGSVGElement::viewport() const
131 { 107 {
132 // FIXME: This method doesn't follow the spec and is basically untested. Par ent documents are not considered here. 108 // FIXME: This method doesn't follow the spec and is basically untested. Par ent documents are not considered here.
133 // As we have no test coverage for this, we're going to disable it completly for now. 109 // As we have no test coverage for this, we're going to disable it completly for now.
134 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal); 110 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal);
135 } 111 }
136 112
137 float SVGSVGElement::pixelUnitToMillimeterX() const 113 float SVGSVGElement::pixelUnitToMillimeterX() const
138 { 114 {
139 return 1 / cssPixelsPerMillimeter; 115 return 1 / cssPixelsPerMillimeter;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // Fall back to traversing our subtree. Duplicate ids are allowed, the first found will 800 // Fall back to traversing our subtree. Duplicate ids are allowed, the first found will
825 // be returned. 801 // be returned.
826 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme nt = ElementTraversal::next(*element, this)) { 802 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme nt = ElementTraversal::next(*element, this)) {
827 if (element->getIdAttribute() == id) 803 if (element->getIdAttribute() == id)
828 return element; 804 return element;
829 } 805 }
830 return 0; 806 return 0;
831 } 807 }
832 808
833 } 809 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698