| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 659 |
| 660 if (isXHTMLDocument() || isHTMLDocument()) { | 660 if (isXHTMLDocument() || isHTMLDocument()) { |
| 661 // 2. If the context object is an HTML document, let localName be | 661 // 2. If the context object is an HTML document, let localName be |
| 662 // converted to ASCII lowercase. | 662 // converted to ASCII lowercase. |
| 663 AtomicString localName = convertLocalName(name); | 663 AtomicString localName = convertLocalName(name); |
| 664 if (CustomElement::shouldCreateCustomElement(localName)) { | 664 if (CustomElement::shouldCreateCustomElement(localName)) { |
| 665 return CustomElement::createCustomElementSync( | 665 return CustomElement::createCustomElementSync( |
| 666 *this, | 666 *this, |
| 667 QualifiedName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI)); | 667 QualifiedName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI)); |
| 668 } | 668 } |
| 669 return HTMLElementFactory::createHTMLElement(localName, *this, 0, | 669 return HTMLElementFactory::createHTMLElement(localName, *this, |
| 670 CreatedByCreateElement); | 670 CreatedByCreateElement); |
| 671 } | 671 } |
| 672 return Element::create(QualifiedName(nullAtom, name, nullAtom), this); | 672 return Element::create(QualifiedName(nullAtom, name, nullAtom), this); |
| 673 } | 673 } |
| 674 | 674 |
| 675 String getTypeExtension(Document* document, | 675 String getTypeExtension(Document* document, |
| 676 const StringOrDictionary& stringOrOptions, | 676 const StringOrDictionary& stringOrOptions, |
| 677 ExceptionState& exceptionState) { | 677 ExceptionState& exceptionState) { |
| 678 if (stringOrOptions.isNull()) | 678 if (stringOrOptions.isNull()) |
| 679 return emptyString(); | 679 return emptyString(); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 // FIXME: This should really be in a possible ElementFactory class | 1169 // FIXME: This should really be in a possible ElementFactory class |
| 1170 Element* Document::createElement(const QualifiedName& qName, | 1170 Element* Document::createElement(const QualifiedName& qName, |
| 1171 CreateElementFlags flags) { | 1171 CreateElementFlags flags) { |
| 1172 Element* e = nullptr; | 1172 Element* e = nullptr; |
| 1173 | 1173 |
| 1174 // FIXME: Use registered namespaces and look up in a hash to find the right | 1174 // FIXME: Use registered namespaces and look up in a hash to find the right |
| 1175 // factory. | 1175 // factory. |
| 1176 if (qName.namespaceURI() == xhtmlNamespaceURI) | 1176 if (qName.namespaceURI() == xhtmlNamespaceURI) |
| 1177 e = HTMLElementFactory::createHTMLElement(qName.localName(), *this, 0, | 1177 e = HTMLElementFactory::createHTMLElement(qName.localName(), *this, flags); |
| 1178 flags); | |
| 1179 else if (qName.namespaceURI() == SVGNames::svgNamespaceURI) | 1178 else if (qName.namespaceURI() == SVGNames::svgNamespaceURI) |
| 1180 e = SVGElementFactory::createSVGElement(qName.localName(), *this, flags); | 1179 e = SVGElementFactory::createSVGElement(qName.localName(), *this, flags); |
| 1181 | 1180 |
| 1182 if (e) | 1181 if (e) |
| 1183 m_sawElementsInKnownNamespaces = true; | 1182 m_sawElementsInKnownNamespaces = true; |
| 1184 else | 1183 else |
| 1185 e = Element::create(qName, this); | 1184 e = Element::create(qName, this); |
| 1186 | 1185 |
| 1187 if (e->prefix() != qName.prefix()) | 1186 if (e->prefix() != qName.prefix()) |
| 1188 e->setTagNameForCreateElementNS(qName); | 1187 e->setTagNameForCreateElementNS(qName); |
| (...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6589 } | 6588 } |
| 6590 | 6589 |
| 6591 void showLiveDocumentInstances() { | 6590 void showLiveDocumentInstances() { |
| 6592 WeakDocumentSet& set = liveDocumentSet(); | 6591 WeakDocumentSet& set = liveDocumentSet(); |
| 6593 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6592 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6594 for (Document* document : set) | 6593 for (Document* document : set) |
| 6595 fprintf(stderr, "- Document %p URL: %s\n", document, | 6594 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6596 document->url().getString().utf8().data()); | 6595 document->url().getString().utf8().data()); |
| 6597 } | 6596 } |
| 6598 #endif | 6597 #endif |
| OLD | NEW |