зеркало из https://github.com/mozilla/gecko-dev.git
a8d469a8d0
With this patch on its own we get some a11y tests failures, but those are fixed on a later patch. Combobox select no longer creates frames for its <options>, nor an nsListControlFrame. Instead, it computes its right intrinsic size using the largest size of the options. This is better, because we render the option text using the select style so if the select and option styles are mismatched it'd cause changes in the size of the select when text changes. See the following in a build without the patch, for example: <select> <option>ABC</option> <option style="font-size: 1px">Something long</option> </select> This seems like a rather obscure case, but it's important to get it right, see bug 1741888. With this patch we use the same setup in content and parent processes (this needs bug 1596852 and bug 1744152). This means we can remove a bunch of the native view and popup code in nsListControlFrame. A couple browser_* tests are affected by this change and have been tweaked appropriately (the changes there are trivial). Not creating an nsListControlFrame for dropdown select means that we need to move a bunch of the event handling code from nsListControlFrame to a common place that nsComboboxControlFrame can also use. That place is HTMLSelectEventListener, and I think the setup is much nicer than having the code intertwined with nsListControlFrame. It should be relatively straight-forward to review, mostly moving code from one part to another. Another thing that we need to do in HTMLSelectEventListener that we didn't use to do is listening for DOM mutations on the dropdown. Before, we were relying on changes like text mutations triggering a reflow of the listcontrolframe, which also triggered a reflow of the comboboxcontrolframe, which in turn updated the text of the anonymous content. Now we need to trigger that reflow manually. There are some further simplifications that can be done after this lands (cleanup naming of openInParentProcess and so on, among others), but I'd rather land this first (after the merge of course) and work on them separately. Differential Revision: https://phabricator.services.mozilla.com/D132719 |
||
---|---|---|
.. | ||
actors | ||
app | ||
base | ||
branding | ||
components | ||
config | ||
docs | ||
extensions | ||
fonts | ||
fxr | ||
installer | ||
locales | ||
modules | ||
themes | ||
tools/mozscreenshots | ||
.eslintrc.js | ||
LICENSE | ||
Makefile.in | ||
app.mozbuild | ||
build.mk | ||
confvars.sh | ||
defs.mk | ||
l10n-registry.manifest | ||
moz.build | ||
moz.configure |