Changeset 215951 in webkit


Ignore:
Timestamp:
Apr 28, 2017 3:33:28 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

ARGUMENT BAD: time, time >= 0
https://bugs.webkit.org/show_bug.cgi?id=164336
rdar://problem/29314891

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-04-28
Reviewed by Eric Carlson.

Source/WebCore:

Handle invalid duration and current time when calculating remaining time.

Test media/modern-media-controls/pip-support/pip-support-click.html now works without a workaround
in media/modern-media-controls/pip-support/pip-support-enabled.html

  • platform/mac/WebVideoFullscreenHUDWindowController.mm:

(-[WebVideoFullscreenHUDWindowController remainingTimeText]):

LayoutTests:

Remove workaround that affected other tests.

  • media/modern-media-controls/pip-support/pip-support-click.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r215946 r215951  
     12017-04-28  Jeremy Jones  <jeremyj@apple.com>
     2
     3        ARGUMENT BAD: time, time >= 0
     4        https://bugs.webkit.org/show_bug.cgi?id=164336
     5        rdar://problem/29314891
     6
     7        Reviewed by Eric Carlson.
     8
     9        Remove workaround that affected other tests.
     10
     11        * media/modern-media-controls/pip-support/pip-support-click.html:
     12
    1132017-04-28  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html

    r213291 r215951  
    3232    shouldBeEqualToString("media.webkitPresentationMode", "picture-in-picture");
    3333
    34     // FIXME: We exit PiP so we leave things in a clean state, otherwise the following
    35     // test pip-support-enabled.html may crash, see webkit.org/b/164336.
    36     media.webkitSetPresentationMode("inline");
    37 
    3834    container.remove();
    3935    media.remove();
  • trunk/Source/WebCore/ChangeLog

    r215949 r215951  
     12017-04-28  Jeremy Jones  <jeremyj@apple.com>
     2
     3        ARGUMENT BAD: time, time >= 0
     4        https://bugs.webkit.org/show_bug.cgi?id=164336
     5        rdar://problem/29314891
     6
     7        Reviewed by Eric Carlson.
     8
     9        Handle invalid duration and current time when calculating remaining time.
     10
     11        Test media/modern-media-controls/pip-support/pip-support-click.html now works without a workaround
     12        in media/modern-media-controls/pip-support/pip-support-enabled.html
     13
     14        * platform/mac/WebVideoFullscreenHUDWindowController.mm:
     15        (-[WebVideoFullscreenHUDWindowController remainingTimeText]):
     16
    1172017-04-28  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm

    r208658 r215951  
    560560        return @"";
    561561
    562     return [@"-" stringByAppendingString:timeToString(videoElement->duration() - videoElement->currentTime())];
     562    double remainingTime = 0;
     563
     564    if (std::isfinite(videoElement->duration()) && std::isfinite(videoElement->currentTime()))
     565        remainingTime = videoElement->duration() - videoElement->currentTime();
     566
     567    return [@"-" stringByAppendingString:timeToString(remainingTime)];
    563568}
    564569
Note: See TracChangeset for help on using the changeset viewer.