Changeset 189802 in webkit
- Timestamp:
- Sep 15, 2015 1:37:17 AM (9 years ago)
- Location:
- releases/WebKitGTK/webkit-2.10
- Files:
-
- 2 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog
r189793 r189802 1 2015-09-13 Chris Dumez <cdumez@apple.com> 2 3 Node.baseURI should not return null for detached nodes 4 https://bugs.webkit.org/show_bug.cgi?id=149104 5 <rdar://problem/22559535> 6 7 Reviewed by Sam Weinig. 8 9 * dom/xhtml/level3/core/nodegetbaseuri03-expected.txt: 10 Rebaseline outdated DOM3 test. 11 12 * svg/custom/image-base-uri-expected.txt: Removed. 13 * svg/custom/image-base-uri.svg: Removed. 14 Drop outdated SVG test. SVG2 no longer support xml:base. 15 1 16 2015-09-10 David Hyatt <hyatt@apple.com> 2 17 -
releases/WebKitGTK/webkit-2.10/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03-expected.txt
r21687 r189802 1 1 Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri03 2 Status Success 2 Status failure 3 Message nodegetbaseuri03: assertTrue failed -
releases/WebKitGTK/webkit-2.10/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.js
r41145 r189802 100 100 baseURI = docType.baseURI; 101 101 102 assert Null("nodegetbaseuri03",baseURI);102 assertTrue("nodegetbaseuri03", baseURI == null); 103 103 104 104 } -
releases/WebKitGTK/webkit-2.10/LayoutTests/imported/w3c/ChangeLog
r189787 r189802 1 2015-09-13 Chris Dumez <cdumez@apple.com> 2 3 Node.baseURI should not return null for detached nodes 4 https://bugs.webkit.org/show_bug.cgi?id=149104 5 <rdar://problem/22559535> 6 7 Reviewed by Sam Weinig. 8 9 Rebaseline W3C test now that more checks are passing. 10 11 * web-platform-tests/dom/nodes/Node-baseURI-expected.txt: 12 1 13 2015-09-09 Chris Dumez <cdumez@apple.com> 2 14 -
releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog
r189793 r189802 1 2015-09-13 Chris Dumez <cdumez@apple.com> 2 3 Node.baseURI should not return null for detached nodes 4 https://bugs.webkit.org/show_bug.cgi?id=149104 5 <rdar://problem/22559535> 6 7 Reviewed by Sam Weinig. 8 9 Node.baseURI should not return null for detached nodes. It should return 10 the node document's base URL. The node document is set when the node is 11 created so it is valid even if the node is detached [1]: 12 https://dom.spec.whatwg.org/#dom-node-baseuri 13 14 WebKit was traversing the ancestors to find the base URL, which only 15 works if the node is attached. Also, WebKit was taking into account 16 the xml:base attribute when computing the baseURI. 17 18 Both Chrome and Firefox already dropped support for xml:base: 19 https://code.google.com/p/chromium/issues/detail?id=341854 20 https://bugzilla.mozilla.org/show_bug.cgi?id=903372 21 22 Firefox complies with the specification. Chrome's baseURI still only 23 works for attached Nodes as their implementation still traverses the 24 DOM tree, despite dropping support for xml:base. 25 26 This patch drops support xml:base when computing Node.baseURI, as 27 Firefox, Chrome and the latest DOM specification do. It also makes 28 Node.baseURI work for detached Nodes by returning the base URL of the 29 node Document. This means we no longer have to traverse the Node's 30 ancestors in the DOM tree. This is consistent with the behavior of 31 Firefox and the latest DOM specification. 32 33 This patch does not drop the SVGElement.xmlbase attribute yet. However, 34 we should probably consider making this change as well given that: 35 - The SVG2 specification dropped it 36 - Chrome dropped it. 37 - It no longers impacts Node.baseURI 38 39 [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976 40 41 No new tests, already covered by existing test. 42 43 * dom/Document.cpp: 44 (WebCore::Document::setContent): Deleted. 45 * dom/Document.h: 46 (WebCore::Document::inputCursor): Deleted. 47 * dom/DocumentType.cpp: 48 (WebCore::DocumentType::nodeName): Deleted. 49 * dom/DocumentType.h: 50 * dom/Element.cpp: 51 (WebCore::Element::imageSourceURL): Deleted. 52 (WebCore::Element::rendererIsNeeded): Deleted. 53 (WebCore::Element::createElementRenderer): Deleted. 54 (WebCore::Element::insertedInto): Deleted. 55 * dom/Element.h: 56 * dom/Node.cpp: 57 (WebCore::Node::baseURI): 58 * dom/Node.h: 59 * svg/SVGElement.idl: 60 1 61 2015-09-10 David Hyatt <hyatt@apple.com> 2 62 -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Document.cpp
r189787 r189802 1310 1310 } 1311 1311 1312 URL Document::baseURI() const1313 {1314 return m_baseURL;1315 }1316 1317 1312 void Document::setContent(const String& content) 1318 1313 { -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Document.h
r189782 r189802 435 435 void setDocumentURI(const String&); 436 436 437 virtual URL baseURI() const override final;438 439 437 #if ENABLE(WEB_REPLAY) 440 438 JSC::InputCursor& inputCursor() const { return *m_inputCursor; } -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/DocumentType.cpp
r177372 r189802 37 37 } 38 38 39 URL DocumentType::baseURI() const40 {41 return URL();42 }43 44 39 String DocumentType::nodeName() const 45 40 { -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/DocumentType.h
r177559 r189802 50 50 DocumentType(Document&, const String& name, const String& publicId, const String& systemId); 51 51 52 virtual URL baseURI() const override;53 52 virtual String nodeName() const override; 54 53 virtual NodeType nodeType() const override; -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Element.cpp
r186398 r189802 1466 1466 } 1467 1467 1468 URL Element::baseURI() const1469 {1470 const AtomicString& baseAttribute = getAttribute(baseAttr);1471 URL base(URL(), baseAttribute);1472 if (!base.protocol().isEmpty())1473 return base;1474 1475 ContainerNode* parent = parentNode();1476 if (!parent)1477 return base;1478 1479 const URL& parentBase = parent->baseURI();1480 if (parentBase.isNull())1481 return base;1482 1483 return URL(parentBase, baseAttribute);1484 }1485 1486 1468 const AtomicString& Element::imageSourceURL() const 1487 1469 { -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Element.h
r186398 r189802 198 198 virtual const AtomicString& namespaceURI() const override final { return m_tagName.namespaceURI(); } 199 199 200 virtual URL baseURI() const override final;201 202 200 virtual String nodeName() const override; 203 201 -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Node.cpp
r186803 r189802 1159 1159 URL Node::baseURI() const 1160 1160 { 1161 return parentNode() ? parentNode()->baseURI() :URL();1161 return document().baseURL(); 1162 1162 } 1163 1163 -
releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Node.h
r186803 r189802 183 183 Node* pseudoAwareLastChild() const; 184 184 185 virtualURL baseURI() const;185 URL baseURI() const; 186 186 187 187 void getSubresourceURLs(ListHashSet<URL>&) const; -
releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/SVGElement.idl
r168313 r189802 24 24 JSGenerateToNativeObject, 25 25 ] interface SVGElement : Element { 26 // FIXME: the xmlbase attribute is no longer part of SVG2 and Chrome already dropped it. 26 27 [TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlbase; 28 27 29 readonly attribute SVGSVGElement ownerSVGElement; 28 30 readonly attribute SVGElement viewportElement;
Note: See TracChangeset
for help on using the changeset viewer.