Closed Bug 1519917 Opened 4 years ago Closed 4 years ago

Consider <menulist> with sizetopopup unset equal to sizetopopup="pref"

Categories

(Core :: XUL, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: timdream, Assigned: timdream)

References

Details

Attachments

(1 file)

This was part of bug 1518932 but I figured this should be landed first so the bug can work on with artifact builds.

sizetopopup is set to "pref" by default by the menulist XBL binding, however
when converting the binding to custom element, it did not set the attribute value
at a time that is early enough.

This patch updates nsMenuPopupFrame and nsMenuFrame so that it considers
<menulist> with unset sizetopopup attribute as equal to "pref" to avoid
the problem above.

The problem can be detected by the reftest
layout/reftests/xul/menulist-shrinkwrap-2.xul
in which the parent box won't update its width even when <menulist>
reframes with the correct sizetopopup value.

The sizetopopup attribute is never meant to be set dynamically;
the fix here does not allow us to do so.
Attachment #9036381 - Attachment description: Bug 1518932 - Consider <menulist> with sizetopopup unset equal to sizetopopup="pref" → Bug 1519917 - Consider <menulist> with sizetopopup unset equal to sizetopopup="pref"
Pushed by tchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7484d3a99bfc
Consider <menulist> with sizetopopup unset equal to sizetopopup="pref" r=NeilDeakin
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Type: defect → task
You need to log in before you can comment on or make changes to this bug.