Changeset 39180 in webkit
- Timestamp:
- Dec 10, 2008 11:18:58 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r39178 r39180 1 2008-12-09 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Eric Seidel. 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 - Removed setCreatedByParser from style and link elements. 9 10 - Removed XMLTokenizer::eventuallyMarkAsCreatedByParser. 11 12 * dom/XMLTokenizer.cpp: 13 * dom/XMLTokenizer.h: 14 * dom/XMLTokenizerLibxml2.cpp: 15 (WebCore::XMLTokenizer::startElementNs): 16 * dom/XMLTokenizerQt.cpp: 17 (WebCore::XMLTokenizer::parseStartElement): 18 * html/HTMLElementFactory.cpp: 19 (WebCore::linkConstructor): 20 (WebCore::styleConstructor): 21 * html/HTMLLinkElement.cpp: 22 (WebCore::HTMLLinkElement::HTMLLinkElement): 23 * html/HTMLLinkElement.h: 24 * html/HTMLStyleElement.cpp: 25 (WebCore::HTMLStyleElement::HTMLStyleElement): 26 * html/HTMLStyleElement.h: 27 * html/HTMLTagNames.in: 28 * svg/SVGStyleElement.cpp: 29 (WebCore::SVGStyleElement::SVGStyleElement): 30 * svg/SVGStyleElement.h: 31 * svg/svgtags.in: 32 1 33 2008-12-10 Brady Eidson <beidson@apple.com> 2 34 -
trunk/WebCore/dom/XMLTokenizer.cpp
r39111 r39180 133 133 } 134 134 135 void XMLTokenizer::eventuallyMarkAsParserCreated(Element* element)136 {137 if (element->hasTagName(HTMLNames::styleTag))138 static_cast<HTMLStyleElement*>(element)->setCreatedByParser(true);139 #if ENABLE(SVG)140 else if (element->hasTagName(SVGNames::styleTag))141 static_cast<SVGStyleElement*>(element)->setCreatedByParser(true);142 #endif143 else if (element->hasTagName(HTMLNames::linkTag))144 static_cast<HTMLLinkElement*>(element)->setCreatedByParser(true);145 }146 147 148 135 void XMLTokenizer::handleError(ErrorType type, const char* m, int lineNumber, int columnNumber) 149 136 { -
trunk/WebCore/dom/XMLTokenizer.h
r38577 r39180 119 119 friend bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent); 120 120 121 static void eventuallyMarkAsParserCreated(Element* element);122 121 void initializeParserContext(const char* chunk = 0); 123 122 void setCurrentNode(Node*); -
trunk/WebCore/dom/XMLTokenizerLibxml2.cpp
r38729 r39180 755 755 756 756 newElement->beginParsingChildren(); 757 eventuallyMarkAsParserCreated(newElement.get());758 757 759 758 if (isScriptElement(newElement.get())) -
trunk/WebCore/dom/XMLTokenizerQt.cpp
r38729 r39180 541 541 } 542 542 543 eventuallyMarkAsParserCreated(newElement.get());544 545 543 if (isScriptElement(newElement.get())) 546 544 m_scriptStartLine = lineNumber(); -
trunk/WebCore/html/HTMLElementFactory.cpp
r39111 r39180 116 116 static PassRefPtr<HTMLElement> linkConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser) 117 117 { 118 RefPtr<HTMLLinkElement> link = new HTMLLinkElement(linkTag, doc); 119 link->setCreatedByParser(createdByParser); 120 return link.release(); 118 return new HTMLLinkElement(linkTag, doc, createdByParser); 121 119 } 122 120 … … 128 126 static PassRefPtr<HTMLElement> styleConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser) 129 127 { 130 RefPtr<HTMLStyleElement> style = new HTMLStyleElement(styleTag, doc); 131 style->setCreatedByParser(createdByParser); 132 return style.release(); 128 return new HTMLStyleElement(styleTag, doc, createdByParser); 133 129 } 134 130 -
trunk/WebCore/html/HTMLLinkElement.cpp
r39065 r39180 43 43 using namespace HTMLNames; 44 44 45 HTMLLinkElement::HTMLLinkElement(const QualifiedName& qName, Document *doc )45 HTMLLinkElement::HTMLLinkElement(const QualifiedName& qName, Document *doc, bool createdByParser) 46 46 : HTMLElement(qName, doc) 47 47 , m_cachedSheet(0) … … 52 52 , m_isIcon(false) 53 53 , m_isDNSPrefetch(false) 54 , m_createdByParser( false)54 , m_createdByParser(createdByParser) 55 55 { 56 56 ASSERT(hasTagName(linkTag)); -
trunk/WebCore/html/HTMLLinkElement.h
r39065 r39180 36 36 class HTMLLinkElement : public HTMLElement, public CachedResourceClient { 37 37 public: 38 HTMLLinkElement(const QualifiedName&, Document* );38 HTMLLinkElement(const QualifiedName&, Document*, bool createdByParser); 39 39 ~HTMLLinkElement(); 40 40 … … 98 98 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 99 99 100 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; }101 100 virtual void finishParsingChildren(); 102 101 -
trunk/WebCore/html/HTMLStyleElement.cpp
r39065 r39180 31 31 using namespace HTMLNames; 32 32 33 HTMLStyleElement::HTMLStyleElement(const QualifiedName& tagName, Document* doc )33 HTMLStyleElement::HTMLStyleElement(const QualifiedName& tagName, Document* doc, bool createdByParser) 34 34 : HTMLElement(tagName, doc) 35 35 , m_loading(false) 36 , m_createdByParser( false)36 , m_createdByParser(createdByParser) 37 37 { 38 38 ASSERT(hasTagName(styleTag)); -
trunk/WebCore/html/HTMLStyleElement.h
r39065 r39180 1 1 /* 2 * This file is part of the DOM implementation for KDE.3 *4 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 5 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) … … 34 32 { 35 33 public: 36 HTMLStyleElement(const QualifiedName&, Document* );34 HTMLStyleElement(const QualifiedName&, Document*, bool createdByParser); 37 35 38 36 virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } … … 46 44 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 47 45 48 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; }49 46 virtual void finishParsingChildren(); 50 47 -
trunk/WebCore/html/HTMLTagNames.in
r39111 r39180 64 64 legend 65 65 li interfaceName=HTMLLIElement 66 link 66 link constructorNeedsCreatedByParser=1 67 67 listing JSInterfaceName=HTMLPreElement 68 68 map … … 95 95 strike JSInterfaceName=HTMLElement 96 96 strong JSInterfaceName=HTMLElement 97 style 97 style constructorNeedsCreatedByParser=1 98 98 sub JSInterfaceName=HTMLElement 99 99 sup JSInterfaceName=HTMLElement -
trunk/WebCore/svg/SVGStyleElement.cpp
r38418 r39180 37 37 using namespace HTMLNames; 38 38 39 SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc )39 SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc, bool createdByParser) 40 40 : SVGElement(tagName, doc) 41 , m_createdByParser( false)41 , m_createdByParser(createdByParser) 42 42 { 43 43 } -
trunk/WebCore/svg/SVGStyleElement.h
r30633 r39180 32 32 class SVGStyleElement : public SVGElement, public StyleElement { 33 33 public: 34 SVGStyleElement(const QualifiedName&, Document* );34 SVGStyleElement(const QualifiedName&, Document*, bool createdByParser); 35 35 36 36 // Derived from: 'Element' … … 40 40 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 41 41 42 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; }43 42 virtual void finishParsingChildren(); 44 43 -
trunk/WebCore/svg/svgtags.in
r39111 r39180 101 101 script constructorNeedsCreatedByParser=1 102 102 stop 103 style 103 style constructorNeedsCreatedByParser=1 104 104 svg interfaceName=SVGSVGElement 105 105 switch
Note: See TracChangeset
for help on using the changeset viewer.