Closed Bug 1524573 Opened 5 years ago Closed 5 years ago

input type="range" rendering issues on macOS

Categories

(Core :: Layout: Form Controls, defect)

Unspecified
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- unaffected
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: mikokm, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: regression, testcase)

Attachments

(5 files, 1 obsolete file)

The changes in bug 1317870 and/or bug 1481593 regressed <input type="range"> rendering on macOS: the slider thumb is clipped incorrectly.
If ::-moz-range-thumb is set1, the slider track disappears altogether.

Attached image nightly.png
Attached image beta.png

Mats, could you please have a look?

Flags: needinfo?(mats)

I'll take a look...

Assignee: nobody → mats
Flags: needinfo?(mats)
Attached patch fix+reftest (obsolete) — Splinter Review
Attachment #9041062 - Flags: review?(jwatt)
Comment on attachment 9041062 [details] [diff] [review]
fix+reftest

Review of attachment 9041062 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/forms/nsRangeFrame.cpp
@@ +718,5 @@
>  
>    return nsContainerFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
>  }
>  
> +nscoord nsRangeFrame::AutoCrossSize(nscoord aEm) {

Please comment this function to state what it returns.

@@ +727,5 @@
> +    nsPresContext* pc = PresContext();
> +    pc->GetTheme()->GetMinimumWidgetSize(pc, this,
> +                                         StyleAppearance::RangeThumb,
> +                                         &size, &unused);
> +    minCrossSize = pc->DevPixelsToAppUnits(size.height);

On Windows the bounds of the themed thumb is not a square, and depends on whether the range is vertical or horizontal. I think you'll need to check the orientation here.
Attached patch fix+reftestSplinter Review

(In reply to Jonathan Watt [:jwatt] from comment #9)

+nscoord nsRangeFrame::AutoCrossSize(nscoord aEm) {

Please comment this function to state what it returns.

There's a comment in the header file.

On Windows the bounds of the themed thumb is not a square, and depends on
whether the range is vertical or horizontal. I think you'll need to check
the orientation here.

OK, fixed.

Attachment #9041062 - Attachment is obsolete: true
Attachment #9041062 - Flags: review?(jwatt)
Attachment #9042752 - Flags: review?(jwatt)
Comment on attachment 9042752 [details] [diff] [review]
fix+reftest

Review of attachment 9042752 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/forms/nsRangeFrame.h
@@ +142,5 @@
>     */
>    void UpdateForValueChange();
>  
>   private:
> +  // Return our preferred size in the cross-axis.

Can you tag on the end "(the axis perpendicular to the direction of movement of the thumb)", or something like that.
Attachment #9042752 - Flags: review?(jwatt) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a2965532d7b
Ensure that an auto-sized <input type=range> is at least large enough to contain the thumb.  r=jwatt
Flags: in-testsuite+
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Is this something which should be considered for Beta approval or can it ride the trains?

Flags: needinfo?(mats)

I think it's OK to let this ride with 67. Mats if you feel strongly it will be easy and fine in late beta then do request uplift. Otherwise, 67.

Flags: needinfo?(mats)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: