Changeset 207021 in webkit
- Timestamp:
- Oct 10, 2016 2:01:39 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207016 r207021 1 2016-10-10 Chris Dumez <cdumez@apple.com> 2 3 Add support for Navigator.languages attribute 4 https://bugs.webkit.org/show_bug.cgi?id=163220 5 6 Reviewed by Darin Adler. 7 8 Rebase existing test to reflect change. 9 10 * fast/dom/navigator-detached-no-crash-expected.txt: 11 * platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt: 12 1 13 2016-10-10 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt
r169017 r207021 9 9 navigator.javaEnabled() is OK 10 10 navigator.language is OK 11 navigator.languages is OK 11 12 navigator.mimeTypes is OK 12 13 navigator.onLine is OK … … 26 27 navigator.javaEnabled() is OK 27 28 navigator.language is OK 29 navigator.languages is OK 28 30 navigator.mimeTypes is OK 29 31 navigator.onLine is OK -
trunk/LayoutTests/imported/w3c/ChangeLog
r206999 r207021 1 2016-10-10 Chris Dumez <cdumez@apple.com> 2 3 Add support for Navigator.languages attribute 4 https://bugs.webkit.org/show_bug.cgi?id=163220 5 6 Reviewed by Darin Adler. 7 8 Rebaseline W3C tests now that more checks are passing. 9 10 * web-platform-tests/html/dom/interfaces-expected.txt: 11 * web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigatorlanguage-expected.txt: 12 1 13 2016-10-10 Youenn Fablet <youennf@gmail.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r206634 r207021 5383 5383 PASS Navigator interface: attribute vendorSub 5384 5384 PASS Navigator interface: attribute language 5385 FAIL Navigator interface: attribute languages assert_true: The prototype object must have a property "languages" expected true got false 5385 PASS Navigator interface: attribute languages 5386 5386 PASS Navigator interface: attribute onLine 5387 5387 FAIL Navigator interface: operation registerProtocolHandler(DOMString,USVString,DOMString) assert_own_property: interface prototype object missing non-static operation expected property "registerProtocolHandler" missing … … 5408 5408 PASS Navigator interface: window.navigator must inherit property "vendorSub" with the proper type (8) 5409 5409 PASS Navigator interface: window.navigator must inherit property "language" with the proper type (9) 5410 FAIL Navigator interface: window.navigator must inherit property "languages" with the proper type (10) assert_inherits: property "languages" not found in prototype chain5410 FAIL Navigator interface: window.navigator must inherit property "languages" with the proper type (10) Unrecognized type [object Object] 5411 5411 PASS Navigator interface: window.navigator must inherit property "onLine" with the proper type (11) 5412 5412 FAIL Navigator interface: window.navigator must inherit property "registerProtocolHandler" with the proper type (12) assert_inherits: property "registerProtocolHandler" not found in prototype chain -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigatorlanguage-expected.txt
r206874 r207021 1 1 2 FAIL NavigatorLanguage: the most preferred language is the one returned by navigator.language assert_true: expected true got false 2 PASS NavigatorLanguage: the most preferred language is the one returned by navigator.language 3 3 -
trunk/LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
r204853 r207021 10 10 navigator.javaEnabled() is OK 11 11 navigator.language is OK 12 navigator.languages is OK 12 13 navigator.mimeTypes is OK 13 14 navigator.onLine is OK … … 28 29 navigator.javaEnabled() is OK 29 30 navigator.language is OK 31 navigator.languages is OK 30 32 navigator.mimeTypes is OK 31 33 navigator.onLine is OK -
trunk/Source/WebCore/ChangeLog
r207020 r207021 1 2016-10-10 Chris Dumez <cdumez@apple.com> 2 3 Add support for Navigator.languages attribute 4 https://bugs.webkit.org/show_bug.cgi?id=163220 5 6 Reviewed by Darin Adler. 7 8 Add support for Navigator.languages attribute: 9 - https://html.spec.whatwg.org/#navigatorlanguage 10 11 Firefox and Chrome already support this. 12 13 Currently, we always return a single language for privacy reasons so 14 this API does not actually bring anything new besides interoperability 15 with other browsers and compliance with the HTML specification. 16 17 No new tests, rebaselined existing tests. 18 19 * page/NavigatorBase.cpp: 20 (WebCore::NavigatorBase::languages): 21 * page/NavigatorBase.h: 22 * page/NavigatorLanguage.idl: 23 1 24 2016-10-10 Brent Fulgham <bfulgham@apple.com> 2 25 -
trunk/Source/WebCore/page/NavigatorBase.cpp
r201970 r207021 140 140 } 141 141 142 Vector<String> NavigatorBase::languages() 143 { 144 // We intentionally expose only the primary language for privacy reasons. 145 return { defaultLanguage() }; 146 } 147 142 148 #if ENABLE(NAVIGATOR_HWCONCURRENCY) 143 149 -
trunk/Source/WebCore/page/NavigatorBase.h
r201970 r207021 28 28 29 29 #include <wtf/Forward.h> 30 #include <wtf/Vector.h> 30 31 31 32 namespace WebCore { … … 47 48 48 49 static String language(); 50 static Vector<String> languages(); 49 51 50 52 #if ENABLE(NAVIGATOR_HWCONCURRENCY) -
trunk/Source/WebCore/page/NavigatorLanguage.idl
r201970 r207021 31 31 ] interface NavigatorLanguage { 32 32 [Nondeterministic] readonly attribute DOMString language; 33 //readonly attribute FrozenArray<DOMString> languages;33 readonly attribute FrozenArray<DOMString> languages; 34 34 };
Note: See TracChangeset
for help on using the changeset viewer.