Changeset 212193 in webkit
- Timestamp:
- Feb 11, 2017 7:14:47 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212191 r212193 1 2017-02-11 Chris Dumez <cdumez@apple.com> 2 3 Implement URL's toJSON() 4 https://bugs.webkit.org/show_bug.cgi?id=167979 5 6 Reviewed by Sam Weinig. 7 8 Extend test coverage. 9 10 * fast/url/url-tojson-expected.txt: Added. 11 * fast/url/url-tojson.html: Added. 12 1 13 2017-02-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/LayoutTests/imported/w3c/ChangeLog
r212181 r212193 1 2017-02-11 Chris Dumez <cdumez@apple.com> 2 3 Implement URL's toJSON() 4 https://bugs.webkit.org/show_bug.cgi?id=167979 5 6 Reviewed by Sam Weinig. 7 8 Re-sync URL tests from upstream to gain test coverage for 9 URL's toJSON(). 10 11 * web-platform-tests/url/interfaces-expected.txt: 12 * web-platform-tests/url/interfaces.html: 13 * web-platform-tests/url/url-tojson-expected.txt: Added. 14 * web-platform-tests/url/url-tojson.html: Added. 15 * web-platform-tests/url/w3c-import.log: 16 1 17 2017-02-10 Sam Weinig <sam@webkit.org> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt
r211930 r212193 8 8 PASS URL interface: existence and properties of interface prototype object's "constructor" property 9 9 PASS URL interface: attribute href 10 FAIL URL interface: stringifier assert_true: property is not enumerable expected true got false 10 PASS URL interface: stringifier 11 11 PASS URL interface: attribute origin 12 12 PASS URL interface: attribute protocol … … 20 20 PASS URL interface: attribute searchParams 21 21 PASS URL interface: attribute hash 22 PASS URL interface: operation toJSON() 22 23 PASS URL must be primary interface of new URL("http://foo") 23 24 PASS Stringification of new URL("http://foo") … … 34 35 PASS URL interface: new URL("http://foo") must inherit property "searchParams" with the proper type (10) 35 36 PASS URL interface: new URL("http://foo") must inherit property "hash" with the proper type (11) 37 PASS URL interface: new URL("http://foo") must inherit property "toJSON" with the proper type (12) 36 38 PASS URLSearchParams interface: existence and properties of interface object 37 39 PASS URLSearchParams interface object length -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html
r209861 r212193 25 25 readonly attribute URLSearchParams searchParams; 26 26 attribute USVString hash; 27 28 USVString toJSON(); 27 29 }; 28 30 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/w3c-import.log
r209861 r212193 31 31 /LayoutTests/imported/w3c/web-platform-tests/url/url-origin.html 32 32 /LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html 33 /LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html 33 34 /LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html 34 35 /LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html -
trunk/Source/WebCore/CMakeLists.txt
r211962 r212193 565 565 html/TimeRanges.idl 566 566 html/URLSearchParams.idl 567 html/URLUtils.idl568 567 html/ValidityState.idl 569 568 html/VoidCallback.idl -
trunk/Source/WebCore/ChangeLog
r212192 r212193 1 2017-02-11 Chris Dumez <cdumez@apple.com> 2 3 Implement URL's toJSON() 4 https://bugs.webkit.org/show_bug.cgi?id=167979 5 6 Reviewed by Sam Weinig. 7 8 Implement URL's toJSON() as per: 9 - https://url.spec.whatwg.org/#dom-url-tojson 10 11 This is already supported by Firefox. 12 13 Also, drop URLUtils.idl as it is no longer in the specification. 14 Merge its content to DOMURL.idl as per the URL specification. 15 16 Finally, mark href attribute as stringifier and drop the toString() 17 operation to match the specification. This fixes a bug where our 18 toString property was not enumerable but should have been. 19 20 Tests: fast/url/url-tojson.html 21 imported/w3c/web-platform-tests/url/url-tojson.html 22 23 * CMakeLists.txt: 24 * DerivedSources.make: 25 * WebCore.xcodeproj/project.pbxproj: 26 * html/DOMURL.idl: 27 * html/URLUtils.h: 28 (WebCore::URLUtils<T>::toJSON): 29 * html/URLUtils.idl: Removed. 30 1 31 2017-02-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 32 -
trunk/Source/WebCore/DerivedSources.cpp
r211962 r212193 616 616 #include "JSUIEvent.cpp" 617 617 #include "JSUIEventInit.cpp" 618 #include "JSURLUtils.cpp"619 618 #if ENABLE(USER_MESSAGE_HANDLERS) 620 619 #include "JSUserMessageHandler.cpp" -
trunk/Source/WebCore/DerivedSources.make
r211962 r212193 496 496 $(WebCore)/html/TimeRanges.idl \ 497 497 $(WebCore)/html/URLSearchParams.idl \ 498 $(WebCore)/html/URLUtils.idl \499 498 $(WebCore)/html/ValidityState.idl \ 500 499 $(WebCore)/html/VoidCallback.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r212144 r212193 9813 9813 5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTShaderTextureLOD.cpp; sourceTree = "<group>"; }; 9814 9814 5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTShaderTextureLOD.h; sourceTree = "<group>"; }; 9815 5C5381AE1D8791CA00E2EBE6 /* URLUtils.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URLUtils.idl; sourceTree = "<group>"; };9816 9815 5C5381AF1D8793E000E2EBE6 /* URLSearchParams.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URLSearchParams.idl; sourceTree = "<group>"; }; 9817 9816 5C5381B01D87D45700E2EBE6 /* URLSearchParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLSearchParams.cpp; sourceTree = "<group>"; }; … … 19520 19519 5C5381AF1D8793E000E2EBE6 /* URLSearchParams.idl */, 19521 19520 656B9DCA189DE10000BB842C /* URLUtils.h */, 19522 5C5381AE1D8791CA00E2EBE6 /* URLUtils.idl */,19523 19521 F5A154251279534D00D0B0C0 /* ValidationMessage.cpp */, 19524 19522 F5A154261279534D00D0B0C0 /* ValidationMessage.h */, -
trunk/Source/WebCore/html/DOMURL.idl
r208096 r212193 37 37 ExportMacro=WEBCORE_EXPORT, 38 38 ] interface DOMURL { 39 [SetterMayThrowException, URL] stringifier attribute USVString href; 40 readonly attribute USVString origin; 41 attribute USVString protocol; 42 attribute USVString username; 43 attribute USVString password; 44 attribute USVString host; 45 attribute USVString hostname; 46 attribute USVString port; 47 attribute USVString pathname; 48 attribute USVString hash; 49 attribute USVString search; 50 [CachedAttribute] readonly attribute URLSearchParams searchParams; 51 52 USVString toJSON(); 53 54 // https://w3c.github.io/FileAPI/#creating-revoking. 39 55 [CallWith=ScriptExecutionContext] static DOMString createObjectURL(Blob blob); 40 56 [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url); 41 57 }; 42 43 DOMURL implements URLUtils; -
trunk/Source/WebCore/html/URLUtils.h
r211636 r212193 37 37 38 38 String toString() const; 39 String toJSON() const; 39 40 40 41 String origin() const; … … 70 71 template <typename T> 71 72 String URLUtils<T>::toString() const 73 { 74 return href().string(); 75 } 76 77 template <typename T> 78 String URLUtils<T>::toJSON() const 72 79 { 73 80 return href().string();
Note: See TracChangeset
for help on using the changeset viewer.