Bug 88623 - Update range slider rendering for volume and playback position of new Chrome video controls
Summary: Update range slider rendering for volume and playback position of new Chrome ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Silvia Pfeiffer
URL:
Keywords:
Depends on: 87683 87835 88297
Blocks: 84672 88724 88743 88818 89050
  Show dependency treegraph
 
Reported: 2012-06-07 22:45 PDT by Silvia Pfeiffer
Modified: 2012-06-19 17:23 PDT (History)
17 users (show)

See Also:


Attachments
Full patch for layout tests (62.33 KB, patch)
2012-06-08 06:39 PDT, Silvia Pfeiffer
no flags Details | Formatted Diff | Diff
Use this for review (13.91 KB, patch)
2012-06-08 06:45 PDT, Silvia Pfeiffer
no flags Details | Formatted Diff | Diff
Full patch for layout tests - incl Eric's comments (63.35 KB, patch)
2012-06-09 07:19 PDT, Silvia Pfeiffer
no flags Details | Formatted Diff | Diff
Patch for review with accessor functions (15.17 KB, patch)
2012-06-09 07:20 PDT, Silvia Pfeiffer
no flags Details | Formatted Diff | Diff
Patch for cq (15.63 KB, patch)
2012-06-13 01:57 PDT, Silvia Pfeiffer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Silvia Pfeiffer 2012-06-07 22:45:36 PDT
This is the fourth patch for the introduction of the new Chromium video controls, see https://bugs.webkit.org/show_bug.cgi?id=84672 .

This patch updates the rendering of the range sliders for the new Chrome video controls. This includes the creation of a shadowPseudoId to be able to style the range sliders via CSS, and the rendering of the background and highlighted ranges.
Comment 1 Silvia Pfeiffer 2012-06-08 06:39:32 PDT
Created attachment 146556 [details]
Full patch for layout tests
Comment 2 Silvia Pfeiffer 2012-06-08 06:45:13 PDT
Created attachment 146557 [details]
Use this for review

This the difference to the previous patch. It will not pass the test - refer to the full patch for that.
Comment 3 Eric Carlson 2012-06-08 11:53:15 PDT
Comment on attachment 146557 [details]
Use this for review

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

> Source/WebCore/html/shadow/SliderThumbElement.cpp:375
>      DEFINE_STATIC_LOCAL(AtomicString, sliderThumb, ("-webkit-slider-thumb"));
> -    return sliderThumb;
> +    DEFINE_STATIC_LOCAL(AtomicString, mediaSliderThumb, ("-webkit-media-slider-thumb"));

These strings shouldn't be defined in both functions (even though -webkit-slider-thumb already was), can you define each in an accessor function instead?

static const AtomicString& sliderThumbShadowPseudoId()
{
    DEFINE_STATIC_LOCAL(const AtomicString, sliderThumb, ("-webkit-slider-thumb"));
    return sliderThumb;
}

etc.

> Source/WebCore/rendering/RenderMediaControlsChromium.cpp:251
> +    float thumbWidth = 12.0;

This magic value should be a named const.
Comment 4 Silvia Pfeiffer 2012-06-09 05:38:09 PDT
(In reply to comment #3)
> (From update of attachment 146557 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146557&action=review
> 
> > Source/WebCore/html/shadow/SliderThumbElement.cpp:375
> >      DEFINE_STATIC_LOCAL(AtomicString, sliderThumb, ("-webkit-slider-thumb"));
> > -    return sliderThumb;
> > +    DEFINE_STATIC_LOCAL(AtomicString, mediaSliderThumb, ("-webkit-media-slider-thumb"));
> 
> These strings shouldn't be defined in both functions (even though -webkit-slider-thumb already was), can you define each in an accessor function instead?
> 
> static const AtomicString& sliderThumbShadowPseudoId()
> {
>     DEFINE_STATIC_LOCAL(const AtomicString, sliderThumb, ("-webkit-slider-thumb"));
>     return sliderThumb;
> }
> 
> etc.

Sure, no problem.

> > Source/WebCore/rendering/RenderMediaControlsChromium.cpp:251
> > +    float thumbWidth = 12.0;
> 
> This magic value should be a named const.

OK.
Comment 5 Silvia Pfeiffer 2012-06-09 07:19:14 PDT
Created attachment 146700 [details]
Full patch for layout tests - incl Eric's comments
Comment 6 Silvia Pfeiffer 2012-06-09 07:20:26 PDT
Created attachment 146701 [details]
Patch for review with accessor functions

Patch for review with accessor functions
Comment 7 Silvia Pfeiffer 2012-06-13 01:57:10 PDT
Created attachment 147263 [details]
Patch for cq
Comment 8 WebKit Review Bot 2012-06-13 14:01:35 PDT
Comment on attachment 147263 [details]
Patch for cq

Clearing flags on attachment: 147263

Committed r120246: <http://trac.webkit.org/changeset/120246>
Comment 9 Silvia Pfeiffer 2012-06-13 14:06:38 PDT
patch landed
Comment 10 Chris Dumez 2012-06-13 21:06:35 PDT
It seems that 14 media tests need rebaselining for GTK and EFL ports after this patch.

The diffs look like:
-          RenderBlock {DIV} at (0,4) size 137x12
-          RenderBlock {DIV} at (137,4) size 12x12
+          RenderBlock {DIV} at (0,0) size 137x20
+            RenderBlock {DIV} at (0,0) size 12x12
+          RenderBlock {DIV} at (137,0) size 12x12
Comment 11 Silvia Pfeiffer 2012-06-14 04:08:10 PDT
(In reply to comment #10)
> It seems that 14 media tests need rebaselining for GTK and EFL ports after this patch.
> 
> The diffs look like:
> -          RenderBlock {DIV} at (0,4) size 137x12
> -          RenderBlock {DIV} at (137,4) size 12x12
> +          RenderBlock {DIV} at (0,0) size 137x20
> +            RenderBlock {DIV} at (0,0) size 12x12
> +          RenderBlock {DIV} at (137,0) size 12x12

It's more likely cause by the patches landed in bugs 87683 and 87835. Do the controls still look right?

I have more patches coming for the Chromium video controls and didn't think they influenced the GTK or EFL ports video rendering. For Chromium I have turned these tests off in TestExpectations to be rebased after my patching is finished.

Is there a way for me to see the layout test results on the GTK and EFL platforms?
Comment 12 Tim Horton 2012-06-15 21:38:53 PDT
This patch completely broke rendering of the sliders on the Mac port. I'm going to look into it for a bit, but if I can't sort it out, I will likely roll it out.
Comment 13 Silvia Pfeiffer 2012-06-15 23:27:18 PDT
Do you have an example? A bug number?
Comment 14 Silvia Pfeiffer 2012-06-16 01:03:09 PDT
(In reply to comment #12)
> This patch completely broke rendering of the sliders on the Mac port. I'm going to look into it for a bit, but if I can't sort it out, I will likely roll it out.

I just built the MiniBrowser on the Mac and I used this page for testing: http://www.html5tutorial.info/html5-range.php . It rendered ok for me.
Comment 15 Tim Horton 2012-06-16 01:06:24 PDT
(In reply to comment #14)
> (In reply to comment #12)
> > This patch completely broke rendering of the sliders on the Mac port. I'm going to look into it for a bit, but if I can't sort it out, I will likely roll it out.
> 
> I just built the MiniBrowser on the Mac and I used this page for testing: http://www.html5tutorial.info/html5-range.php . It rendered ok for me.

That one looks fine to me, too. Check out media/video-controls.html. I'll post screenshots tomorrow if need be.
Comment 16 Silvia Pfeiffer 2012-06-16 01:11:24 PDT
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #12)
> > > This patch completely broke rendering of the sliders on the Mac port. I'm going to look into it for a bit, but if I can't sort it out, I will likely roll it out.
> > 
> > I just built the MiniBrowser on the Mac and I used this page for testing: http://www.html5tutorial.info/html5-range.php . It rendered ok for me.
> 
> That one looks fine to me, too. Check out media/video-controls.html. I'll post screenshots tomorrow if need be.

Hmm, works for me with MiniBrowser. Do send screenshots. If it's the CSS, I think I have a better solution now that Bug 62218 is fixed.
Comment 17 Tim Horton 2012-06-16 02:25:45 PDT
(In reply to comment #16)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > (In reply to comment #12)
> > > > This patch completely broke rendering of the sliders on the Mac port. I'm going to look into it for a bit, but if I can't sort it out, I will likely roll it out.
> > > 
> > > I just built the MiniBrowser on the Mac and I used this page for testing: http://www.html5tutorial.info/html5-range.php . It rendered ok for me.
> > 
> > That one looks fine to me, too. Check out media/video-controls.html. I'll post screenshots tomorrow if need be.
> 
> Hmm, works for me with MiniBrowser. Do send screenshots. If it's the CSS, I think I have a better solution now that Bug 62218 is fixed.

Bug with screenshots in https://bugs.webkit.org/show_bug.cgi?id=89280
Comment 18 Silvia Pfeiffer 2012-06-19 17:23:30 PDT
The FIXME added in this patch will be properly addressed in https://bugs.webkit.org/show_bug.cgi?id=89090