Changeset 39111 in webkit
- Timestamp:
- Dec 8, 2008 4:06:41 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r39109 r39111 1 2008-12-08 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it 6 https://bugs.webkit.org/show_bug.cgi?id=22665 7 8 Remove setCreatedByParser from the script elements (HTML and SVG). 9 10 * dom/XMLTokenizer.cpp: 11 (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): Removed 12 call to setCreatedByParser for the 2 elements. 13 14 * dom/make_names.pl: Modified to call the constructor with 15 the createByParser parameter if 'constructorNeedsCreatedByParser' 16 is set. 17 18 * html/HTMLElementFactory.cpp: 19 (WebCore::scriptConstructor): 20 * html/HTMLScriptElement.cpp: 21 (WebCore::HTMLScriptElement::HTMLScriptElement): 22 * html/HTMLScriptElement.h: 23 * html/HTMLTagNames.in: Added constructorNeedsCreatedByParser 24 to script. 25 * svg/SVGScriptElement.cpp: 26 (WebCore::SVGScriptElement::SVGScriptElement): 27 * svg/SVGScriptElement.h: 28 * svg/svgtags.in: Added constructorNeedsCreatedByParser 29 to script. 30 1 31 2008-12-08 David Kilzer <ddkilzer@apple.com> 2 32 -
trunk/WebCore/dom/XMLTokenizer.cpp
r38793 r39111 135 135 void XMLTokenizer::eventuallyMarkAsParserCreated(Element* element) 136 136 { 137 if (element->hasTagName(HTMLNames::scriptTag)) 138 static_cast<HTMLScriptElement*>(element)->setCreatedByParser(true); 139 #if ENABLE(SVG) 140 else if (element->hasTagName(SVGNames::scriptTag)) 141 static_cast<SVGScriptElement*>(element)->setCreatedByParser(true); 142 #endif 143 else if (element->hasTagName(HTMLNames::styleTag)) 137 if (element->hasTagName(HTMLNames::styleTag)) 144 138 static_cast<HTMLStyleElement*>(element)->setCreatedByParser(true); 145 139 #if ENABLE(SVG) -
trunk/WebCore/dom/make_names.pl
r38754 r39111 87 87 sub initializeTagPropertyHash 88 88 { 89 return ('exportString' => 0, 89 return ('constructorNeedsCreatedByParser' => 0, 90 'exportString' => 0, 90 91 'interfaceName' => defaultInterfaceName($_[0]), 91 92 # By default, the JSInterfaceName is the same as the interfaceName. … … 219 220 print F "static PassRefPtr<$parameters{'namespace'}Element> ${name}Constructor(Document* doc, bool createdByParser)\n"; 220 221 print F "{\n"; 221 print F " return new ${ucName}($parameters{'namespace'}Names::${name}Tag, doc);\n"; 222 if ($tags{$name}{'constructorNeedsCreatedByParser'}) { 223 print F " return new ${ucName}($parameters{'namespace'}Names::${name}Tag, doc, createdByParser);\n"; 224 } else { 225 print F " return new ${ucName}($parameters{'namespace'}Names::${name}Tag, doc);\n"; 226 } 222 227 print F "}\n\n"; 223 228 } -
trunk/WebCore/html/HTMLElementFactory.cpp
r39007 r39111 340 340 static PassRefPtr<HTMLElement> scriptConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser) 341 341 { 342 RefPtr<HTMLScriptElement> script = new HTMLScriptElement(scriptTag, doc); 343 script->setCreatedByParser(createdByParser); 344 return script.release(); 342 return new HTMLScriptElement(scriptTag, doc, createdByParser); 345 343 } 346 344 -
trunk/WebCore/html/HTMLScriptElement.cpp
r39065 r39111 33 33 using namespace HTMLNames; 34 34 35 HTMLScriptElement::HTMLScriptElement(const QualifiedName& tagName, Document* doc )35 HTMLScriptElement::HTMLScriptElement(const QualifiedName& tagName, Document* doc, bool createdByParser) 36 36 : HTMLElement(tagName, doc) 37 37 , m_data(this, this) 38 38 { 39 39 ASSERT(hasTagName(scriptTag)); 40 m_data.setCreatedByParser(createdByParser); 40 41 } 41 42 … … 47 48 { 48 49 return attr->name() == sourceAttributeValue(); 49 }50 51 void HTMLScriptElement::setCreatedByParser(bool createdByParser)52 {53 m_data.setCreatedByParser(createdByParser);54 50 } 55 51 -
trunk/WebCore/html/HTMLScriptElement.h
r39065 r39111 33 33 , public ScriptElement { 34 34 public: 35 HTMLScriptElement(const QualifiedName&, Document* );35 HTMLScriptElement(const QualifiedName&, Document*, bool createdByParser); 36 36 ~HTMLScriptElement(); 37 37 38 void setCreatedByParser(bool);39 38 bool shouldExecuteAsJavaScript() const; 40 39 virtual String scriptContent() const; -
trunk/WebCore/html/HTMLTagNames.in
r38670 r39111 86 86 s JSInterfaceName=HTMLElement 87 87 samp JSInterfaceName=HTMLElement 88 script 88 script constructorNeedsCreatedByParser=1 89 89 select 90 90 small JSInterfaceName=HTMLElement -
trunk/WebCore/svg/SVGScriptElement.cpp
r39065 r39111 32 32 namespace WebCore { 33 33 34 SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* doc )34 SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* doc, bool createdByParser) 35 35 : SVGElement(tagName, doc) 36 36 , SVGURIReference() … … 38 38 , m_data(this, this) 39 39 { 40 m_data.setCreatedByParser(createdByParser); 40 41 } 41 42 42 43 SVGScriptElement::~SVGScriptElement() 43 44 { 44 }45 46 void SVGScriptElement::setCreatedByParser(bool createdByParser)47 {48 m_data.setCreatedByParser(createdByParser);49 45 } 50 46 -
trunk/WebCore/svg/SVGScriptElement.h
r39065 r39111 37 37 , public ScriptElement { 38 38 public: 39 SVGScriptElement(const QualifiedName&, Document* );39 SVGScriptElement(const QualifiedName&, Document*, bool createdByParser); 40 40 virtual ~SVGScriptElement(); 41 41 42 void setCreatedByParser(bool);43 42 virtual String scriptContent() const; 44 43 -
trunk/WebCore/svg/svgtags.in
r38670 r39111 99 99 radialGradient 100 100 rect 101 script 101 script constructorNeedsCreatedByParser=1 102 102 stop 103 103 style
Note: See TracChangeset
for help on using the changeset viewer.