Changeset 207295 in webkit


Ignore:
Timestamp:
Oct 13, 2016 11:45:10 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[Modern Media Controls] TimeControl and TimeLabel
https://bugs.webkit.org/show_bug.cgi?id=163356
<rdar://problem/28741376>

Patch by Antoine Quint <Antoine Quint> on 2016-10-13
Reviewed by Dean Jackson.

Source/WebCore:

We introduce the TimeControl and TimeLabel classes. A TimeControl object
provides two TimeLabels, one for the elapsed time, one for the remaining
time, and a Scrubber in between them. Depending on a TimeControl's width,
it will adjust its layout such that the scrubber takes all the available
space between the labels, and can indicate whether it's large enough to
meet the minimal required width to show the scrubber, such that a container
node may decide not to show the TimeControl at all.

TimeLabel nodes simply show an integer time value in miliseconds in a
nicely formatted way.

Tests: media/modern-media-controls/time-control/time-control.html

media/modern-media-controls/time-label/time-label.html

  • Modules/modern-media-controls/controls/time-control.js: Added.

(TimeControl.prototype.get width):
(TimeControl.prototype.set width):
(TimeControl.prototype.get isSufficientlyWide):

  • Modules/modern-media-controls/controls/time-label.css: Added.

(.time-label):

  • Modules/modern-media-controls/controls/time-label.js: Added.

(TimeLabel.prototype.get value):
(TimeLabel.prototype.set value):
(TimeLabel.prototype.commitProperty):
(TimeLabel.prototype._formattedTime):

LayoutTests:

Adding tests for the new TimeControl and TimeLabel classes.

  • media/modern-media-controls/time-control/time-control-expected.txt: Added.
  • media/modern-media-controls/time-control/time-control.html: Added.
  • media/modern-media-controls/time-label/time-label-expected.txt: Added.
  • media/modern-media-controls/time-label/time-label.html: Added.
Location:
trunk
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207294 r207295  
     12016-10-13  Antoine Quint  <graouts@apple.com>
     2
     3        [Modern Media Controls] TimeControl and TimeLabel
     4        https://bugs.webkit.org/show_bug.cgi?id=163356
     5        <rdar://problem/28741376>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Adding tests for the new TimeControl and TimeLabel classes.
     10
     11        * media/modern-media-controls/time-control/time-control-expected.txt: Added.
     12        * media/modern-media-controls/time-control/time-control.html: Added.
     13        * media/modern-media-controls/time-label/time-label-expected.txt: Added.
     14        * media/modern-media-controls/time-label/time-label.html: Added.
     15
    1162016-10-13  Jer Noble  <jer.noble@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r207294 r207295  
     12016-10-13  Antoine Quint  <graouts@apple.com>
     2
     3        [Modern Media Controls] TimeControl and TimeLabel
     4        https://bugs.webkit.org/show_bug.cgi?id=163356
     5        <rdar://problem/28741376>
     6
     7        Reviewed by Dean Jackson.
     8
     9        We introduce the TimeControl and TimeLabel classes. A TimeControl object
     10        provides two TimeLabels, one for the elapsed time, one for the remaining
     11        time, and a Scrubber in between them. Depending on a TimeControl's width,
     12        it will adjust its layout such that the scrubber takes all the available
     13        space between the labels, and can indicate whether it's large enough to
     14        meet the minimal required width to show the scrubber, such that a container
     15        node may decide not to show the TimeControl at all.
     16
     17        TimeLabel nodes simply show an integer time value in miliseconds in a
     18        nicely formatted way.
     19
     20        Tests: media/modern-media-controls/time-control/time-control.html
     21               media/modern-media-controls/time-label/time-label.html
     22
     23        * Modules/modern-media-controls/controls/time-control.js: Added.
     24        (TimeControl.prototype.get width):
     25        (TimeControl.prototype.set width):
     26        (TimeControl.prototype.get isSufficientlyWide):
     27        * Modules/modern-media-controls/controls/time-label.css: Added.
     28        (.time-label):
     29        * Modules/modern-media-controls/controls/time-label.js: Added.
     30        (TimeLabel.prototype.get value):
     31        (TimeLabel.prototype.set value):
     32        (TimeLabel.prototype.commitProperty):
     33        (TimeLabel.prototype._formattedTime):
     34
    1352016-10-13  Jer Noble  <jer.noble@apple.com>
    236
Note: See TracChangeset for help on using the changeset viewer.