Closed Bug 1414926 Opened 7 years ago Closed 7 years ago

Select inputs move around the screen when scrolling through values

Categories

(Toolkit :: UI Widgets, defect)

58 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla58
Tracking Status
firefox-esr52 --- unaffected
firefox56 --- unaffected
firefox57 --- unaffected
firefox58 - verified

People

(Reporter: agibson, Assigned: mstange)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image select-input.gif
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0"

STR:

1.) Visit https://www.mozilla.org/en-US/newsletter/
2.) Click on the <select> input to choose your country.
3.) Scroll to either the top or bottom of the range of <options> (arrow keys work well to reproduce)

Expected results:

The <select> input should stay put when you reach the end of an <options> list.

Actual results:

The <select> input moves around the screen in an amusing way.

Note: this same bug reproduces for me on any website with a <select> input.

I've attached a .gif of what happens.
Version: unspecified → 58 Branch
Component: General → Layout: Form Controls
Product: Firefox → Core
I couldn't reproduce.
FYI: Happened to me on https://bugzilla.mozilla.org/form.recruiting in the 'cost center' select field when scrolling down the list.
i can reproduce this issue easily by clicking on a select then holding the down arrow key until the selected option is the bottom-most visible item.  it only appears to be a problem on selects that require scrolling to view all options.

mozregression says:

Last good revision: 849017ffe2976f7721c20c3625d8fafeb3cce8dd
First bad revision: bccbe51cd7ca58204fd0ea96fe45b9e4b684efc3
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=849017ffe2976f7721c20c3625d8fafeb3cce8dd&tochange=bccbe51cd7ca58204fd0ea96fe45b9e4b684efc3

which points at: Bug 1414147 - Move -moz-font-smoothing-background-color style struct storage from nsStyleUserInterface to nsStyleFont / nsFont
The regression range seems to be correct. I couldn't believe it so I double-checked.
This is the funniest and most bizarre regression I've ever caused.
Oh, and I think I know what caused it: Dynamic changes to the -moz-font-smoothing-background-color property now trigger a reflow and not just a repaint. It looks like reflowing the popup causes it to be repositioned. This seems really brittle.
Blocks: 1414147
Component: Layout: Form Controls → XUL Widgets
Keywords: regression
Product: Core → Toolkit
This patch returns to the previous behavior of not triggering reflows. I did not fix the underlying XUL <select> positioning bug.
Comment on attachment 8926231 [details]
Bug 1414926 - Make -moz-font-smoothing-background-color changes only cause repaints, not reflows.

https://reviewboard.mozilla.org/r/197486/#review202702


C/C++ static analysis found 0 defects in this patch.

You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
Attachment #8926231 - Flags: review?(xidorn+moz) → review?(emilio)
Comment on attachment 8926231 [details]
Bug 1414926 - Make -moz-font-smoothing-background-color changes only cause repaints, not reflows.

https://reviewboard.mozilla.org/r/197486/#review202908

Huh, bizarre indeed... Any chance to write a test for this? Also, if there are good STR, maybe worth filing a bug for the XUL bug?

::: gfx/src/nsFont.h:146
(Diff revision 1)
>  
>    bool Equals(const nsFont& aOther) const;
>  
>    nsFont& operator=(const nsFont& aOther);
>  
> +  enum class MaxDifference : uint8_t {

nit: Maybe `StyleDifference`? Not a big deal. Other thing this could do is just returning `nsChangeHint`, or something like that. Anyway, this looks good.
Attachment #8926231 - Flags: review?(emilio) → review+
Thanks for the review!

I prefer the name MaxDifference because it makes it clear that the enum variants are ordered, and that changes that affect layout are always visual changes as well, so the variants don't need to be combined.
I didn't want to leak nsChangeHint into nsFont because the different nsChangeHint values have very precise meanings which nsFont probably shouldn't be expected to know about.
Depends on: 1415627
I've filed bug 1415627 about the underlying popup positioning bug.
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/7279b117245b
Make -moz-font-smoothing-background-color changes only cause repaints, not reflows. r=emilio
Assignee: nobody → mstange
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/7279b117245b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Flags: qe-verify+
I verified this issue using Latest Nightly 58.0a1 with Build ID 20171113100232 on Mac OS X 10.12.
I will mark this as verified fixed.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Track 58- as it's verified.
Depends on: 1461180
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: