Node.baseURI should not be nullable
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Aug 2016 02:47:59 +0000 (02:47 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Aug 2016 02:47:59 +0000 (02:47 +0000)
commit38cb4d17f2a99f0647e9bb687a7558f34d70f13c
treef73c98f0ad637a187136cc643196723297f1fe4d
parentff53f4a497d87910f6bd8b4a49b41218f0d97b5a
Node.baseURI should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=160649

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/dom/interfaces-expected.txt:
Rebaseline now that one more check is passing.

* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
Rebaseline now that the baseURI is "about:blank" instead of null. The check
is still failing. We are falling back to using the document's URL, as expected.
However, the document's URL should not be "about:blank" in this case, which is
why we are failing the previous check.

Source/WebCore:

Node.baseURI should not be nullable as per the latest DOM specification:
- https://dom.spec.whatwg.org/#dom-node-baseuri

It is not nullable in Firefox. It is supposed to fallback to using the
document's URL. The document's URL is "about:blank" by default so
baseURI() now returns "about:blank" in the internal URL is null,
similarly to what we do for Document.URL (c.g. urlForBindings()).

No new tests, rebaselined existing test.

* dom/Node.cpp:
(WebCore::Node::baseURI):
* dom/Node.h:
* dom/Node.idl:

LayoutTests:

Drop outdated DOM test.

* dom/xhtml/level3/core/nodegetbaseuri02-expected.txt: Removed.
* dom/xhtml/level3/core/nodegetbaseuri02.js: Removed.
* dom/xhtml/level3/core/nodegetbaseuri02.xhtml: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02-expected.txt [deleted file]
LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.js [deleted file]
LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.xhtml [deleted file]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/Node.idl
Source/WebCore/svg/SVGImageLoader.cpp
Source/WebCore/svg/SVGURIReference.cpp