Location.toString() should be enumerable
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Aug 2016 03:06:50 +0000 (03:06 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Aug 2016 03:06:50 +0000 (03:06 +0000)
commitaae71b7e4faf14f288cb0ec1260a3a75e19d8e92
tree5f431ff1d1a7ed11186dcf94443ffa6247fa02aa
parent6bad7bafe043bea9446c58ecce4ae5ea67eeb8f6
Location.toString() should be enumerable
https://bugs.webkit.org/show_bug.cgi?id=161179

Reviewed by Geoffrey Garen.

Source/WebCore:

Location.toString() should be enumerable as per:
- https://html.spec.whatwg.org/#location
- http://heycam.github.io/webidl/#es-stringifier

This patch stops hard-coding the toString() operation on the Location
interface and makes the 'href' attribute a stringifier attribute instead,
as per the specification. The generated toString() has the same behavior
as it used to but it is now enumerable, as it should.

No new tests, updated existing test.

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::toStringFunction): Deleted.
* page/Location.idl:

LayoutTests:

Update existing tests and add layout test coverage.

* fast/dom/Window/window-appendages-cleared-expected.txt:
* fast/dom/toString_attributes-expected.txt:
* fast/dom/toString_attributes.html:
* js/dom/toString-dontEnum-expected.txt:
* js/dom/toString-dontEnum.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-appendages-cleared-expected.txt
LayoutTests/fast/dom/toString_attributes-expected.txt
LayoutTests/fast/dom/toString_attributes.html
LayoutTests/js/dom/toString-dontEnum-expected.txt
LayoutTests/js/dom/toString-dontEnum.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSLocationCustom.cpp
Source/WebCore/page/Location.idl