Changeset 105379 in webkit
- Timestamp:
- Jan 18, 2012 9:40:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r105378 r105379 1 2012-01-18 Eric Seidel <eric@webkit.org> 2 3 setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do 4 https://bugs.webkit.org/show_bug.cgi?id=76143 5 6 Reviewed by Adam Barth. 7 8 * fast/dom/Element/script-tests/setAttributeNS-namespace-err.js: Added. 9 (assert): 10 (stringForExceptionCode): 11 (assertEquals): 12 (sourceify): 13 (runNSTests): 14 * fast/dom/Element/setAttributeNS-namespace-err-expected.txt: Added. 15 * fast/dom/Element/setAttributeNS-namespace-err.html: Added. 16 1 17 2012-01-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r105378 r105379 1 2012-01-18 Eric Seidel <eric@webkit.org> 2 3 setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do 4 https://bugs.webkit.org/show_bug.cgi?id=76143 5 6 Reviewed by Adam Barth. 7 8 Test: fast/dom/Element/setAttributeNS-namespace-err.html 9 10 * dom/Element.cpp: 11 (WebCore::Element::setAttributeNS): 12 1 13 2012-01-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/WebCore/dom/Element.cpp
r104674 r105379 66 66 #include "WebKitMutationObserver.h" 67 67 #include "WebKitAnimationList.h" 68 #include "XMLNSNames.h" 68 69 #include "XMLNames.h" 69 70 #include "htmlediting.h" … … 1446 1447 return; 1447 1448 1448 if (namespaceURI.isNull() && !prefix.isNull()) { 1449 QualifiedName qName(prefix, localName, namespaceURI); 1450 1451 // Spec: DOM Level 2 Core: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElSetAttrNS 1452 if (qName.prefix().isEmpty() && qName.localName() == xmlnsAtom) { 1453 if (qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { 1454 ec = NAMESPACE_ERR; 1455 return; 1456 } 1457 // Note: The case of an "xmlns" qualified name with a namespace of 1458 // xmlnsNamespaceURI is specifically allowed (See 1459 // <http://www.w3.org/2000/xmlns/>). 1460 } else if (document()->hasPrefixNamespaceMismatch(qName)) { 1449 1461 ec = NAMESPACE_ERR; 1450 1462 return; 1451 1463 } 1452 1453 QualifiedName qName(prefix, localName, namespaceURI);1454 1464 1455 1465 if (scriptingPermission == FragmentScriptingNotAllowed && (isEventHandlerAttribute(qName) || isAttributeToRemove(qName, value)))
Note: See TracChangeset
for help on using the changeset viewer.