Changeset 34315 in webkit
- Timestamp:
- Jun 2, 2008 12:51:32 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r34312 r34315 1 2008-06-02 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Darin. 4 5 Bug 18066: REGRESSION: createAttribute throws NAMESPACE_ERR exception 6 https://bugs.webkit.org/show_bug.cgi?id=18066 7 8 * fast/dom/createAttribute-exception-expected.txt: Added. 9 * fast/dom/createAttribute-exception.html: Added. 10 1 11 2008-06-02 Darin Adler <darin@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r34312 r34315 1 2008-06-02 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Reviewed by Darin. 4 5 Bug 18066: REGRESSION: createAttribute throws NAMESPACE_ERR exception 6 https://bugs.webkit.org/show_bug.cgi?id=18066 7 8 Test: fast/dom/createAttribute-exception.html 9 10 * dom/Document.cpp: 11 (WebCore::Document::createAttributeNS): 12 * dom/Document.h: Add a bool parameter shouldIgnoreNamespaceChecks 13 to createNamespaceNS() used by createAttribute() to bypass namespace 14 checking. 15 1 16 2008-06-02 Darin Adler <darin@apple.com> 2 17 -
trunk/WebCore/dom/Document.cpp
r33577 r34315 3609 3609 } 3610 3610 3611 PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode& ec )3611 PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode& ec, bool shouldIgnoreNamespaceChecks) 3612 3612 { 3613 3613 String prefix, localName; … … 3616 3616 3617 3617 QualifiedName qName(prefix, localName, namespaceURI); 3618 if ( hasPrefixNamespaceMismatch(qName)) {3618 if (!shouldIgnoreNamespaceChecks && hasPrefixNamespaceMismatch(qName)) { 3619 3619 ec = NAMESPACE_ERR; 3620 3620 return 0; … … 3622 3622 3623 3623 // Spec: DOM Level 2 Core: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-DocCrAttrNS 3624 if ( qName.localName() == "xmlns" && qName.namespaceURI() != "http://www.w3.org/2000/xmlns/") {3624 if (!shouldIgnoreNamespaceChecks && qName.localName() == "xmlns" && qName.namespaceURI() != "http://www.w3.org/2000/xmlns/") { 3625 3625 ec = NAMESPACE_ERR; 3626 3626 return 0; -
trunk/WebCore/dom/Document.h
r33577 r34315 210 210 PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionCode&); 211 211 PassRefPtr<ProcessingInstruction> createProcessingInstruction(const String& target, const String& data, ExceptionCode&); 212 PassRefPtr<Attr> createAttribute(const String& name, ExceptionCode& ec) { return createAttributeNS(String(), name, ec ); }213 PassRefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode& );212 PassRefPtr<Attr> createAttribute(const String& name, ExceptionCode& ec) { return createAttributeNS(String(), name, ec, true); } 213 PassRefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&, bool shouldIgnoreNamespaceChecks = false); 214 214 PassRefPtr<EntityReference> createEntityReference(const String& name, ExceptionCode&); 215 215 PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionCode&);
Note: See TracChangeset
for help on using the changeset viewer.