Changeset 38769 in webkit
- Timestamp:
- Nov 25, 2008 4:33:56 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r38768 r38769 1 2008-11-25 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory 6 https://bugs.webkit.org/show_bug.cgi?id=22441 7 8 Element's other than HTML ones take a QualifiedName in their constructors. 9 To make HTMLElementFactory closer to the other ElementFactory, we need 10 to make them take the same arguments. 11 This patch only makes the 5 first one in HTMLElementFactory abide by that. The others 12 will go into the next patch. 13 14 * dom/Document.cpp: 15 (WebCore::Document::implicitClose): 16 * html/HTMLBaseElement.cpp: 17 (WebCore::HTMLBaseElement::HTMLBaseElement): 18 * html/HTMLBaseElement.h: 19 * html/HTMLBodyElement.cpp: 20 (WebCore::HTMLBodyElement::HTMLBodyElement): 21 * html/HTMLBodyElement.h: 22 * html/HTMLElementFactory.cpp: 23 (WebCore::htmlConstructor): 24 (WebCore::headConstructor): 25 (WebCore::bodyConstructor): 26 (WebCore::baseConstructor): 27 (WebCore::linkConstructor): 28 (WebCore::metaConstructor): 29 * html/HTMLHeadElement.cpp: 30 (WebCore::HTMLHeadElement::HTMLHeadElement): 31 * html/HTMLHeadElement.h: 32 * html/HTMLHtmlElement.cpp: 33 (WebCore::HTMLHtmlElement::HTMLHtmlElement): 34 * html/HTMLHtmlElement.h: 35 * html/HTMLLinkElement.cpp: 36 (WebCore::HTMLLinkElement::HTMLLinkElement): 37 * html/HTMLLinkElement.h: 38 * html/HTMLMetaElement.cpp: 39 (WebCore::HTMLMetaElement::HTMLMetaElement): 40 * html/HTMLMetaElement.h: 41 * html/HTMLParser.cpp: 42 (WebCore::HTMLParser::handleError): 43 (WebCore::HTMLParser::headCreateErrorCheck): 44 (WebCore::HTMLParser::createHead): 45 (WebCore::HTMLParser::finished): 46 * html/HTMLViewSourceDocument.cpp: 47 (WebCore::HTMLViewSourceDocument::createContainingTable): 48 1 49 2008-11-25 Chris Marrin <cmarrin@apple.com> 2 50 -
trunk/WebCore/dom/Document.cpp
r38714 r38769 1539 1539 if (Node* documentElement = this->documentElement()) { 1540 1540 ExceptionCode ec = 0; 1541 documentElement->appendChild(new HTMLBodyElement( this), ec);1541 documentElement->appendChild(new HTMLBodyElement(bodyTag, this), ec); 1542 1542 ASSERT(!ec); 1543 1543 } -
trunk/WebCore/html/HTMLBaseElement.cpp
r34583 r38769 35 35 using namespace HTMLNames; 36 36 37 HTMLBaseElement::HTMLBaseElement( Document* doc)38 : HTMLElement( baseTag, doc)37 HTMLBaseElement::HTMLBaseElement(const QualifiedName& qName, Document* doc) 38 : HTMLElement(qName, doc) 39 39 { 40 40 } -
trunk/WebCore/html/HTMLBaseElement.h
r25754 r38769 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) … … 32 30 { 33 31 public: 34 HTMLBaseElement( Document*);32 HTMLBaseElement(const QualifiedName&, Document*); 35 33 ~HTMLBaseElement(); 36 34 -
trunk/WebCore/html/HTMLBodyElement.cpp
r38094 r38769 41 41 using namespace HTMLNames; 42 42 43 HTMLBodyElement::HTMLBodyElement( Document* doc)44 : HTMLElement( bodyTag, doc)43 HTMLBodyElement::HTMLBodyElement(const QualifiedName& qName, Document* doc) 44 : HTMLElement(qName, doc) 45 45 { 46 46 } -
trunk/WebCore/html/HTMLBodyElement.h
r31357 r38769 34 34 { 35 35 public: 36 HTMLBodyElement( Document*);36 HTMLBodyElement(const QualifiedName&, Document*); 37 37 ~HTMLBodyElement(); 38 38 -
trunk/WebCore/html/HTMLElementFactory.cpp
r38714 r38769 96 96 static PassRefPtr<HTMLElement> htmlConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool) 97 97 { 98 return new HTMLHtmlElement( doc);98 return new HTMLHtmlElement(htmlTag, doc); 99 99 } 100 100 101 101 static PassRefPtr<HTMLElement> headConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool) 102 102 { 103 return new HTMLHeadElement( doc);103 return new HTMLHeadElement(headTag, doc); 104 104 } 105 105 106 106 static PassRefPtr<HTMLElement> bodyConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool) 107 107 { 108 return new HTMLBodyElement( doc);108 return new HTMLBodyElement(bodyTag, doc); 109 109 } 110 110 111 111 static PassRefPtr<HTMLElement> baseConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool) 112 112 { 113 return new HTMLBaseElement( doc);113 return new HTMLBaseElement(baseTag, doc); 114 114 } 115 115 116 116 static PassRefPtr<HTMLElement> linkConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser) 117 117 { 118 RefPtr<HTMLLinkElement> link = new HTMLLinkElement( doc);118 RefPtr<HTMLLinkElement> link = new HTMLLinkElement(linkTag, doc); 119 119 link->setCreatedByParser(createdByParser); 120 120 return link.release(); … … 123 123 static PassRefPtr<HTMLElement> metaConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool) 124 124 { 125 return new HTMLMetaElement( doc);125 return new HTMLMetaElement(metaTag, doc); 126 126 } 127 127 -
trunk/WebCore/html/HTMLHeadElement.cpp
r25754 r38769 33 33 using namespace HTMLNames; 34 34 35 HTMLHeadElement::HTMLHeadElement( Document* doc)36 : HTMLElement( headTag, doc)35 HTMLHeadElement::HTMLHeadElement(const QualifiedName& qName, Document* doc) 36 : HTMLElement(qName, doc) 37 37 { 38 38 } -
trunk/WebCore/html/HTMLHeadElement.h
r25754 r38769 34 34 { 35 35 public: 36 HTMLHeadElement( Document*);36 HTMLHeadElement(const QualifiedName&, Document*); 37 37 ~HTMLHeadElement(); 38 38 -
trunk/WebCore/html/HTMLHtmlElement.cpp
r32364 r38769 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 using namespace HTMLNames; 35 33 36 HTMLHtmlElement::HTMLHtmlElement( Document* doc)37 : HTMLElement( htmlTag, doc)34 HTMLHtmlElement::HTMLHtmlElement(const QualifiedName& qName, Document* doc) 35 : HTMLElement(qName, doc) 38 36 { 39 37 } -
trunk/WebCore/html/HTMLHtmlElement.h
r32351 r38769 34 34 { 35 35 public: 36 HTMLHtmlElement( Document*);36 HTMLHtmlElement(const QualifiedName&, Document*); 37 37 ~HTMLHtmlElement(); 38 38 -
trunk/WebCore/html/HTMLLinkElement.cpp
r36650 r38769 43 43 using namespace HTMLNames; 44 44 45 HTMLLinkElement::HTMLLinkElement( Document *doc)46 : HTMLElement( linkTag, doc)45 HTMLLinkElement::HTMLLinkElement(const QualifiedName& qName, Document *doc) 46 : HTMLElement(qName, doc) 47 47 , m_cachedSheet(0) 48 48 , m_disabledState(0) -
trunk/WebCore/html/HTMLLinkElement.h
r36650 r38769 36 36 class HTMLLinkElement : public HTMLElement, public CachedResourceClient { 37 37 public: 38 HTMLLinkElement( Document*);38 HTMLLinkElement(const QualifiedName&, Document*); 39 39 ~HTMLLinkElement(); 40 40 -
trunk/WebCore/html/HTMLMetaElement.cpp
r25754 r38769 32 32 using namespace HTMLNames; 33 33 34 HTMLMetaElement::HTMLMetaElement( Document* doc)35 : HTMLElement( metaTag, doc)34 HTMLMetaElement::HTMLMetaElement(const QualifiedName& qName, Document* doc) 35 : HTMLElement(qName, doc) 36 36 { 37 37 } -
trunk/WebCore/html/HTMLMetaElement.h
r25754 r38769 32 32 { 33 33 public: 34 HTMLMetaElement( Document*);34 HTMLMetaElement(const QualifiedName&, Document*); 35 35 ~HTMLMetaElement(); 36 36 -
trunk/WebCore/html/HTMLParser.cpp
r38714 r38769 489 489 elt->hasLocalName(baseTag))) { 490 490 if (!head) { 491 head = new HTMLHeadElement( document);491 head = new HTMLHeadElement(headTag, document); 492 492 e = head; 493 493 insertNode(e); … … 501 501 } 502 502 if (!haveFrameSet) { 503 e = new HTMLBodyElement( document);503 e = new HTMLBodyElement(bodyTag, document); 504 504 startBody(); 505 505 insertNode(e); … … 515 515 if (!haveFrameSet) { 516 516 popBlock(currentTagName); 517 e = new HTMLBodyElement( document);517 e = new HTMLBodyElement(bodyTag, document); 518 518 startBody(); 519 519 insertNode(e); … … 639 639 640 640 if (!document->documentElement()) { 641 e = new HTMLHtmlElement( document);641 e = new HTMLHtmlElement(htmlTag, document); 642 642 insertNode(e); 643 643 handled = true; … … 671 671 { 672 672 if (!head || current->localName() == htmlTag) { 673 head = new HTMLHeadElement( document);673 head = new HTMLHeadElement(headTag, document); 674 674 result = head; 675 675 } else … … 1490 1490 return; 1491 1491 1492 head = new HTMLHeadElement( document);1492 head = new HTMLHeadElement(headTag, document); 1493 1493 HTMLElement* body = document->body(); 1494 1494 ExceptionCode ec = 0; … … 1546 1546 // In the case of a completely empty document, here's the place to create the HTML element. 1547 1547 if (current && current->isDocumentNode() && !document->documentElement()) 1548 insertNode(new HTMLHtmlElement( document));1548 insertNode(new HTMLHtmlElement(htmlTag, document)); 1549 1549 1550 1550 // This ensures that "current" is not left pointing to a node when the document is destroyed. -
trunk/WebCore/html/HTMLViewSourceDocument.cpp
r37846 r38769 62 62 void HTMLViewSourceDocument::createContainingTable() 63 63 { 64 RefPtr<Element> html = new HTMLHtmlElement( this);64 RefPtr<Element> html = new HTMLHtmlElement(htmlTag, this); 65 65 addChild(html); 66 66 html->attach(); 67 RefPtr<Element> body = new HTMLBodyElement( this);67 RefPtr<Element> body = new HTMLBodyElement(bodyTag, this); 68 68 html->addChild(body); 69 69 body->attach();
Note: See TracChangeset
for help on using the changeset viewer.