Bug 168170 - REGRESSION: Update volume and scrubbing slider to match HI designs
Summary: REGRESSION: Update volume and scrubbing slider to match HI designs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2017-02-11 08:15 PST by mitz
Modified: 2017-02-14 00:13 PST (History)
3 users (show)

See Also:


Attachments
Volume slider (38.84 KB, image/png)
2017-02-11 08:15 PST, mitz
no flags Details
Patch (139.79 KB, patch)
2017-02-13 15:29 PST, Antoine Quint
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2017-02-11 08:15:32 PST
The black border around the thumb in the volume slider is clipped out at the top. See screenshot.
Comment 1 mitz 2017-02-11 08:15:58 PST
Created attachment 301257 [details]
Volume slider
Comment 2 Antoine Quint 2017-02-13 02:14:12 PST
<rdar://problem/28095266>
Comment 3 Antoine Quint 2017-02-13 02:15:40 PST
We have a radar for bringing the blending and rendering of the controls bar, volume slider and track menu up to spec. We'll use this Bugzilla bug to track this as well.
Comment 4 Antoine Quint 2017-02-13 09:18:54 PST
I have the code ready for this but there are a lot of tests to rebaseline, currently there are 31 broken tests due to the source changes.
Comment 5 Antoine Quint 2017-02-13 15:29:23 PST
Created attachment 301400 [details]
Patch
Comment 6 Dean Jackson 2017-02-13 17:24:49 PST
Comment on attachment 301400 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301400&action=review

> Source/WebCore/ChangeLog:27
> +        On macOS, we draw the whole slider with a <canvas> element with "mix-blend-mode"
> +        set to "plus-lighter". On iOS, we draw the track as a <div> with "mix-blend-mode"
> +        set to "plus-darker" and draw the fill (up to the thumb) in the <canvas> with
> +        no blend mode to obtain a pure white color, finally the thumb is rendered by the
> +        <input> element. We couldn't draw the pure white color with the track in the
> +        same <canvas> due to the "plus-darker" blend mode.

Why are iOS and macOS different designs here? I thought you'd want the loaded bar in macOS too.

> Source/WebCore/Modules/modern-media-controls/controls/airplay-button.css:28
> +    mix-blend-mode: normal !important;

Why?
Comment 7 Antoine Quint 2017-02-14 00:00:18 PST
(In reply to comment #6)
> Comment on attachment 301400 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301400&action=review
> 
> > Source/WebCore/ChangeLog:27
> > +        On macOS, we draw the whole slider with a <canvas> element with "mix-blend-mode"
> > +        set to "plus-lighter". On iOS, we draw the track as a <div> with "mix-blend-mode"
> > +        set to "plus-darker" and draw the fill (up to the thumb) in the <canvas> with
> > +        no blend mode to obtain a pure white color, finally the thumb is rendered by the
> > +        <input> element. We couldn't draw the pure white color with the track in the
> > +        same <canvas> due to the "plus-darker" blend mode.
> 
> Why are iOS and macOS different designs here? I thought you'd want the
> loaded bar in macOS too.

We do, it's just drawn in the same <canvas> as everything else because the colours used agree with the blend mode, unlike for iOS.

> > Source/WebCore/Modules/modern-media-controls/controls/airplay-button.css:28
> > +    mix-blend-mode: normal !important;
> 
> Why?

Because the selector setting the blend mode for inline controls on macOS is more specific.
Comment 8 Antoine Quint 2017-02-14 00:13:26 PST
Committed r212280: <http://trac.webkit.org/changeset/212280>