[footer] Create files-ng select style control
Implements behavior of a <select> element using a <div> so that it can be styled for files-ng. Creates an absolutely positioned <div> to hold the <option> elements that would normally get inserted as children of <select>. Adds the styles needed for the files-ng case to apply to the <div> and its descendants. Points the initialization code that populates the <select> to use the <div> if files-ng is enabled. Adds event handling logic to mimic the behavior of <select> in regard to activation, keyboard events, etc. Fires a 'change' event on the <div> whenever an <option> is selected, that is needed so that the browser can match CSS :checked selectors that are targeting the emulated select (div) element. Sets the width of the <div> acting as host to the width of the absolutely positioned <div> hosting the <option> elements during selection to stop the host <div> changing width when different sized options are selected. Bug: 1002410 Change-Id: I5d7b227b561d96aaf61e88d9e206ac7de80d468e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2201336 Commit-Queue: Alex Danilo <adanilo@chromium.org> Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#772577}
Showing
Please register or sign in to comment