Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 10b3e30fc7f7d57ab315b5c0017e86b3bfaa4d0f
      
https://github.com/WebKit/WebKit/commit/10b3e30fc7f7d57ab315b5c0017e86b3bfaa4d0f
  Author: Jer Noble <[email protected]>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/html/HTMLVideoElement.cpp

  Log Message:
  -----------
  [iOS] Restoring Fullscreen from PiP on YouTube results in wrongly sized video
rdar://180962053
https://bugs.webkit.org/show_bug.cgi?id=318490

Reviewed by Eric Carlson.

When PiP is exited, we immediately call setVideoFullscreenMode() with 
VideoFullscreenModeNone,
and when computeAcceleratedRenderingStateAndUpdateMediaPlayer() is subsequently 
called, it
believes the element is not visible, even though the exit pip animation has 
only just started.

Mark the element as visible if the fullscreen mode is changing, which requires 
a recalculation
when that state changes. Since many things can now contribute to the visibility 
state changing,
do so in the next run loop to coalesce requests that all occur at once.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didDetachRenderers):
(WebCore::HTMLMediaElement::scheduleUpdateAcceleratedRenderingState):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::didBecomeFullscreenElement):
(WebCore::HTMLMediaElement::didStopBeingFullscreenElement):
(WebCore::HTMLMediaElement::setFullscreenMode):
(WebCore::HTMLMediaElement::setChangingVideoFullscreenMode):
* Source/WebCore/html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::setChangingVideoFullscreenMode): Deleted.
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::acceleratedRenderingStateChanged):
(WebCore::HTMLVideoElement::mediaPlayerRenderingModeChanged):
(WebCore::HTMLVideoElement::computeAcceleratedRenderingStateAndUpdateMediaPlayer):
(WebCore::HTMLVideoElement::viewportIntersectionChanged):

Canonical link: https://commits.webkit.org/316575@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to