Add keyboard support for color suggestion popup
Created attachment 156270 [details] Patch
Comment on attachment 156270 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156270&action=review > Source/WebCore/ChangeLog:11 > + No new tests. Can't send key events to page popup. Really? > Source/WebCore/Resources/colorSuggestionPicker.js:80 > +//function enclosingNodeOrSelfWithClass(node, className) > +//{ > +// for (var node = this; node && node !== this.ownerDocument; node = node.parentNode) { > +// if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains(className)) > +// return node; > +// } > +// return null; > +//} Do not leave unused code. > Source/WebCore/Resources/colorSuggestionPicker.js:223 > + switch (key) { > + case "Left": Please use the indentation same as our C++ style.
(In reply to comment #2) > (From update of attachment 156270 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=156270&action=review > > > Source/WebCore/ChangeLog:11 > > + No new tests. Can't send key events to page popup. > > Really? I've tried window.eventSender.keyDown and pickerWindow.eventSender.keyDown and I've tried focusing but it didn't work.
I was able to make it work.
Created attachment 156298 [details] Patch
Created attachment 156299 [details] Patch
Created attachment 156300 [details] Patch
Comment on attachment 156300 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156300&action=review > Source/WebCore/Resources/colorSuggestionPicker.js:204 > + if (key != "Left" && key != "Up" && key != "Right" && key != "Down") > + return; How to choose the focused color with the keyboard?
(In reply to comment #8) > (From update of attachment 156300 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=156300&action=review > > > Source/WebCore/Resources/colorSuggestionPicker.js:204 > > + if (key != "Left" && key != "Up" && key != "Right" && key != "Down") > > + return; > > How to choose the focused color with the keyboard? Alos, we should provide a key bind to close the popup.
Created attachment 156303 [details] Patch
Created attachment 156304 [details] Patch
Created attachment 156314 [details] Patch
Comment on attachment 156314 [details] Patch Looks ok, but purple EWS.
Created attachment 156320 [details] Patch
Comment on attachment 156320 [details] Patch Clearing flags on attachment: 156320 Committed r124605: <http://trac.webkit.org/changeset/124605>
All reviewed patches have been landed. Closing bug.