Changeset 262235 in webkit
- Timestamp:
- May 27, 2020 10:32:50 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r262234 r262235 1 2020-05-27 Noam Rosenthal <noam@webkit.org> 2 3 Implement AccessKeyLabel attribute. 4 https://bugs.webkit.org/show_bug.cgi?id=72715 5 6 Reviewed by Darin Adler. 7 8 * fast/forms/access-key-label-expected.txt: Added. 9 * fast/forms/access-key-label.html: Added. 10 Added a test to cover accessKeyLabel scenarios. 11 12 * js/dom/dom-static-property-for-in-iteration-expected.txt: 13 * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 14 * platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: 15 * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 16 * platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: 17 * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 18 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 19 * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: 20 * platform/win/js/dom/dom-static-property-for-in-iteration-expected.txt: 21 * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 22 * platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: 23 HTML elements now have an accessKeyLabel property, fix expected results. 24 1 25 2020-05-27 Lauro Moura <lmoura@igalia.com> 2 26 -
trunk/LayoutTests/imported/w3c/ChangeLog
r262188 r262235 1 2020-05-27 Noam Rosenthal <noam@webkit.org> 2 3 Implement AccessKeyLabel attribute. 4 https://bugs.webkit.org/show_bug.cgi?id=72715 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/html/dom/idlharness.https-expected.txt: 9 10 2020-05-27 Noam Rosenthal <noam@webkit.org> 11 12 Implement AccessKeyLabel attribute. 13 https://bugs.webkit.org/show_bug.cgi?id=72715 14 15 Reviewed by Darin Adler. 16 17 Mark previously failing test as passing. 18 19 * web-platform-tests/html/dom/idlharness.https-expected.txt: 20 1 21 2020-05-19 Sergio Villar Senin <svillar@igalia.com> 2 22 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 121 121 PASS HTMLElement interface: operation click() 122 122 PASS HTMLElement interface: attribute accessKey 123 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 123 PASS HTMLElement interface: attribute accessKeyLabel 124 124 PASS HTMLElement interface: attribute draggable 125 125 PASS HTMLElement interface: attribute spellcheck -
trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
r257707 r262235 39 39 PASS a["hidden"] is false 40 40 PASS a["accessKey"] is 41 PASS a["accessKeyLabel"] is 41 42 PASS a["draggable"] is true 42 43 PASS a["spellcheck"] is true … … 45 46 PASS a["isContentEditable"] is false 46 47 PASS a["offsetParent"] is [object HTMLBodyElement] 47 PASS a["offsetTop"] is 69948 PASS a["offsetTop"] is 714 48 49 PASS a["offsetLeft"] is 8 49 50 PASS a["offsetWidth"] is 40 -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 251 251 PASS HTMLElement interface: operation click() 252 252 PASS HTMLElement interface: attribute accessKey 253 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 253 PASS HTMLElement interface: attribute accessKeyLabel 254 254 PASS HTMLElement interface: attribute draggable 255 255 PASS HTMLElement interface: attribute spellcheck … … 342 342 PASS HTMLElement interface: document.createElement("noscript") must inherit property "click()" with the proper type 343 343 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKey" with the proper type 344 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type assert_inherits: property "accessKeyLabel" not found in prototype chain 344 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type 345 345 PASS HTMLElement interface: document.createElement("noscript") must inherit property "draggable" with the proper type 346 346 PASS HTMLElement interface: document.createElement("noscript") must inherit property "spellcheck" with the proper type -
trunk/LayoutTests/platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt
r257707 r262235 41 41 PASS a["hidden"] is false 42 42 PASS a["accessKey"] is 43 PASS a["accessKeyLabel"] is 43 44 PASS a["draggable"] is true 44 45 PASS a["spellcheck"] is true -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 251 251 PASS HTMLElement interface: operation click() 252 252 PASS HTMLElement interface: attribute accessKey 253 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 253 PASS HTMLElement interface: attribute accessKeyLabel 254 254 PASS HTMLElement interface: attribute draggable 255 255 PASS HTMLElement interface: attribute spellcheck … … 342 342 PASS HTMLElement interface: document.createElement("noscript") must inherit property "click()" with the proper type 343 343 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKey" with the proper type 344 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type assert_inherits: property "accessKeyLabel" not found in prototype chain 344 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type 345 345 PASS HTMLElement interface: document.createElement("noscript") must inherit property "draggable" with the proper type 346 346 PASS HTMLElement interface: document.createElement("noscript") must inherit property "spellcheck" with the proper type -
trunk/LayoutTests/platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt
r257707 r262235 41 41 PASS a["tabIndex"] is 0 42 42 PASS a["accessKey"] is 43 PASS a["accessKeyLabel"] is 43 44 PASS a["draggable"] is true 44 45 PASS a["spellcheck"] is true … … 47 48 PASS a["isContentEditable"] is false 48 49 PASS a["offsetParent"] is [object HTMLBodyElement] 49 PASS a["offsetTop"] is 7 2950 PASS a["offsetTop"] is 744 50 51 PASS a["offsetLeft"] is 8 51 52 PASS a["offsetWidth"] is 40 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 251 251 PASS HTMLElement interface: operation click() 252 252 PASS HTMLElement interface: attribute accessKey 253 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 253 PASS HTMLElement interface: attribute accessKeyLabel 254 254 PASS HTMLElement interface: attribute draggable 255 255 PASS HTMLElement interface: attribute spellcheck … … 342 342 PASS HTMLElement interface: document.createElement("noscript") must inherit property "click()" with the proper type 343 343 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKey" with the proper type 344 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type assert_inherits: property "accessKeyLabel" not found in prototype chain 344 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type 345 345 PASS HTMLElement interface: document.createElement("noscript") must inherit property "draggable" with the proper type 346 346 PASS HTMLElement interface: document.createElement("noscript") must inherit property "spellcheck" with the proper type -
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 251 251 PASS HTMLElement interface: operation click() 252 252 PASS HTMLElement interface: attribute accessKey 253 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 253 PASS HTMLElement interface: attribute accessKeyLabel 254 254 PASS HTMLElement interface: attribute draggable 255 255 PASS HTMLElement interface: attribute spellcheck … … 342 342 PASS HTMLElement interface: document.createElement("noscript") must inherit property "click()" with the proper type 343 343 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKey" with the proper type 344 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type assert_inherits: property "accessKeyLabel" not found in prototype chain 344 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type 345 345 PASS HTMLElement interface: document.createElement("noscript") must inherit property "draggable" with the proper type 346 346 PASS HTMLElement interface: document.createElement("noscript") must inherit property "spellcheck" with the proper type -
trunk/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt
r257707 r262235 41 41 PASS a["hidden"] is false 42 42 PASS a["accessKey"] is 43 PASS a["accessKeyLabel"] is 43 44 PASS a["draggable"] is true 44 45 PASS a["spellcheck"] is true … … 47 48 PASS a["isContentEditable"] is false 48 49 PASS a["offsetParent"] is [object HTMLBodyElement] 49 PASS a["offsetTop"] is 7 2950 PASS a["offsetTop"] is 744 50 51 PASS a["offsetLeft"] is 8 51 52 PASS a["offsetWidth"] is 40 -
trunk/LayoutTests/platform/win/js/dom/dom-static-property-for-in-iteration-expected.txt
r220870 r262235 43 43 PASS a["outerText"] is nerget 44 44 PASS a["accessKey"] is 45 PASS a["accessKeyLabel"] is 45 46 PASS a["children"] is [object HTMLCollection] 46 47 PASS a["isContentEditable"] is false … … 68 69 PASS a["offsetHeight"] is 18 69 70 PASS a["clientHeight"] is 0 70 PASS a["offsetTop"] is 10 5971 PASS a["offsetTop"] is 1074 71 72 PASS a["scrollTop"] is 0 72 73 PASS a["scrollHeight"] is 0 -
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r257707 r262235 251 251 PASS HTMLElement interface: operation click() 252 252 PASS HTMLElement interface: attribute accessKey 253 FAIL HTMLElement interface: attribute accessKeyLabel assert_true: The prototype object must have a property "accessKeyLabel" expected true got false 253 PASS HTMLElement interface: attribute accessKeyLabel 254 254 PASS HTMLElement interface: attribute draggable 255 255 PASS HTMLElement interface: attribute spellcheck … … 342 342 PASS HTMLElement interface: document.createElement("noscript") must inherit property "click()" with the proper type 343 343 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKey" with the proper type 344 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type assert_inherits: property "accessKeyLabel" not found in prototype chain 344 PASS HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type 345 345 PASS HTMLElement interface: document.createElement("noscript") must inherit property "draggable" with the proper type 346 346 PASS HTMLElement interface: document.createElement("noscript") must inherit property "spellcheck" with the proper type -
trunk/LayoutTests/platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt
r257707 r262235 40 40 PASS a["hidden"] is false 41 41 PASS a["accessKey"] is 42 PASS a["accessKeyLabel"] is 42 43 PASS a["draggable"] is true 43 44 PASS a["spellcheck"] is true … … 46 47 PASS a["isContentEditable"] is false 47 48 PASS a["offsetParent"] is [object HTMLBodyElement] 48 PASS a["offsetTop"] is 7 1449 PASS a["offsetTop"] is 729 49 50 PASS a["offsetLeft"] is 8 50 51 PASS a["offsetWidth"] is 39 -
trunk/Source/WTF/ChangeLog
r262223 r262235 1 2020-05-27 Noam Rosenthal <noam@webkit.org> 2 3 Implement AccessKeyLabel attribute. 4 https://bugs.webkit.org/show_bug.cgi?id=72715 5 6 Reviewed by Darin Adler. 7 8 Added character names for upArrow/option, as they're needed for accessKeyLabel. 9 10 * wtf/unicode/CharacterNames.h: 11 1 12 2020-05-27 Saam Barati <sbarati@apple.com> 2 13 -
trunk/Source/WTF/wtf/unicode/CharacterNames.h
r239822 r262235 74 74 const UChar noBreakSpace = 0x00A0; 75 75 const UChar objectReplacementCharacter = 0xFFFC; 76 const UChar optionKey = 0x2325; 76 77 const UChar popDirectionalFormatting = 0x202C; 77 78 const UChar popDirectionalIsolate = 0x2069; … … 92 93 const UChar tibetanMarkIntersyllabicTsheg = 0x0F0B; 93 94 const UChar32 ugariticWordDivider = 0x1039F; 95 const UChar upArrowhead = 0x2303; 94 96 const UChar whiteBullet = 0x25E6; 95 97 const UChar whiteCircle = 0x25CB; … … 159 161 using WTF::Unicode::tibetanMarkIntersyllabicTsheg; 160 162 using WTF::Unicode::ugariticWordDivider; 163 using WTF::Unicode::upArrowhead; 161 164 using WTF::Unicode::whiteBullet; 162 165 using WTF::Unicode::whiteCircle; -
trunk/Source/WebCore/ChangeLog
r262232 r262235 1 2020-05-27 Noam Rosenthal <noam@webkit.org> 2 3 Implement AccessKeyLabel attribute. 4 https://bugs.webkit.org/show_bug.cgi?id=72715 5 6 Spec: https://html.spec.whatwg.org/multipage/interaction.html#dom-accesskeylabel 7 8 As per spec, return the modifiers+accessKey when requesting the element accessKeyLabel. 9 10 Equivalent to the existing Firefox implementation and (pending) Chrome implementation. 11 12 Alt is the hardcoded modifier for any non-cocoa platform, so hardcode it also for the label. 13 Use modifier text for Mac/iOS as it can change (e.g. for voice-over). 14 15 Reviewed by Darin Adler. 16 17 Test: fast/forms/access-key-label.html 18 19 * html/HTMLElement.cpp: 20 (WebCore::HTMLElement::accessKeyLabel const): 21 * html/HTMLElement.h: 22 * html/HTMLElement.idl: 23 1 24 2020-05-27 Sam Weinig <weinig@apple.com> 2 25 -
trunk/Source/WebCore/html/HTMLElement.cpp
r262155 r262235 37 37 #include "EnterKeyHint.h" 38 38 #include "Event.h" 39 #include "EventHandler.h" 39 40 #include "EventListener.h" 40 41 #include "EventNames.h" … … 71 72 #include <wtf/StdLibExtras.h> 72 73 #include <wtf/text/CString.h> 74 #include <wtf/text/StringBuilder.h> 73 75 74 76 namespace WebCore { … … 724 726 } 725 727 728 String HTMLElement::accessKeyLabel() const 729 { 730 const auto& accessKey = attributeWithoutSynchronization(accesskeyAttr); 731 if (accessKey.isEmpty()) 732 return String(); 733 734 StringBuilder result; 735 736 #if PLATFORM(COCOA) 737 auto modifiers = EventHandler::accessKeyModifiers(); 738 if (modifiers.contains(PlatformEvent::Modifier::ControlKey)) 739 result.append(upArrowhead); 740 if (modifiers.contains(PlatformEvent::Modifier::AltKey)) 741 result.append(WTF::Unicode::optionKey); 742 #else 743 // Currently accessKeyModifier in non-cocoa platforms is hardcoded to Alt, so no reason to do extra work here. 744 // If this ever becomes configurable, make this code use EventHandler::accessKeyModifiers(). 745 result.append("Alt+"); 746 #endif 747 748 result.append(accessKey); 749 return result.toString(); 750 } 751 726 752 String HTMLElement::title() const 727 753 { -
trunk/Source/WebCore/html/HTMLElement.h
r259687 r262235 68 68 69 69 bool accessKeyAction(bool sendMouseEvents) override; 70 71 String accessKeyLabel() const; 70 72 71 73 RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override; -
trunk/Source/WebCore/html/HTMLElement.idl
r254121 r262235 35 35 void click(); 36 36 [CEReactions, Reflect] attribute DOMString accessKey; 37 // readonly attribute DOMString accessKeyLabel; // FIXME: Not supported.37 readonly attribute DOMString accessKeyLabel; 38 38 [CEReactions] attribute boolean draggable; 39 39 // [CEReactions] attribute HTMLMenuElement? contextMenu; // FIXME: Not supported.
Note: See TracChangeset
for help on using the changeset viewer.