⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249141 in webkit


Ignore:
Timestamp:
Aug 27, 2019, 8:23:46 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

webkitpresentationmodechanged is fired twice when exiting picture in picture
https://bugs.webkit.org/show_bug.cgi?id=193765

Patch by Peng Liu <Peng Liu> on 2019-08-27
Reviewed by Jer Noble.

Source/WebCore:

This patch removes the extra "webkitpresentationmodechanged" event when the browser switches from
picture-in-picture or fullscreen to inline.

The bug was introduced by the fix for bug
https://bugs.webkit.org/show_bug.cgi?id=181095
But now we are using modern media controls and the fix is not necessary.
Reverting that fix can fix the issue.

Also, this patch gets rid of the unnecessary try to call a JavaScript function which is not available
in the modern media controls.

Test: media/presentationmodechanged-fired-once.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):

LayoutTests:

  • media/presentationmodechanged-fired-once-expected.txt: Added.
  • media/presentationmodechanged-fired-once.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249135 r249141  
     12019-08-27  Peng Liu  <peng.liu6@apple.com>
     2
     3        webkitpresentationmodechanged is fired twice when exiting picture in picture
     4        https://bugs.webkit.org/show_bug.cgi?id=193765
     5
     6        Reviewed by Jer Noble.
     7
     8        * media/presentationmodechanged-fired-once-expected.txt: Added.
     9        * media/presentationmodechanged-fired-once.html: Added.
     10
    1112019-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r249140 r249141  
     12019-08-27  Peng Liu  <peng.liu6@apple.com>
     2
     3        webkitpresentationmodechanged is fired twice when exiting picture in picture
     4        https://bugs.webkit.org/show_bug.cgi?id=193765
     5
     6        Reviewed by Jer Noble.
     7
     8        This patch removes the extra "webkitpresentationmodechanged" event when the browser switches from
     9        picture-in-picture or fullscreen to inline.
     10
     11        The bug was introduced by the fix for bug
     12        https://bugs.webkit.org/show_bug.cgi?id=181095
     13        But now we are using modern media controls and the fix is not necessary.
     14        Reverting that fix can fix the issue.
     15
     16        Also, this patch gets rid of the unnecessary try to call a JavaScript function which is not available
     17        in the modern media controls.
     18
     19        Test: media/presentationmodechanged-fired-once.html
     20
     21        * html/HTMLMediaElement.cpp:
     22        (WebCore::HTMLMediaElement::exitFullscreen):
     23        (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
     24
    1252019-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
    226
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r248846 r249141  
    61226122            document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this));
    61236123        scheduleEvent(eventNames().webkitendfullscreenEvent);
    6124         scheduleEvent(eventNames().webkitpresentationmodechangedEvent);
    61256124    }
    61266125}
     
    74347433    // stopped/suspended the object.
    74357434    if (!m_mediaControlsHost || document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())
     7435        return;
     7436
     7437    if (RuntimeEnabledFeatures::sharedFeatures().modernMediaControlsEnabled())
    74367438        return;
    74377439
Note: See TracChangeset for help on using the changeset viewer.