Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 980c70c85a474a9dfa0404174ee002ca75ba3b3c
      
https://github.com/WebKit/WebKit/commit/980c70c85a474a9dfa0404174ee002ca75ba3b3c
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    M 
Source/WebCore/Modules/modern-media-controls/media/spatial-video-support.js
    M Source/WebCore/dom/EventNames.json
    M Source/WebCore/html/HTMLAttributeNames.in
    M Source/WebCore/html/HTMLVideoElement.cpp
    M Source/WebCore/html/HTMLVideoElement.idl

  Log Message:
  -----------
  Changing the projection attribute on a playing video does not update the 
spatial video renderer (experimental)
https://bugs.webkit.org/show_bug.cgi?id=321703
rdar://184845771

Reviewed by Jer Noble.

x-webkit-projection was read with getAttribute() and was not a registered 
attribute, so nothing
notified the renderer when it changed. Setting it on a video that was
already rendering did nothing
until the next loadedmetadata or resize, and there was no reflected IDL 
attribute, so the
projection could only be declared in markup and never read back.

Register the attribute so it generates webkitprojectionAttr, reflect it on 
HTMLVideoElement as
projection behind SpatialVideoRenderingEnabled, and schedule a 
webkitprojectionchanged event when
its value changes. SpatialVideoSupport listens for that event and re-resolves 
the projection.

Resolving while active no longer requires tearing down the WebGL context: 
_buildMesh() producesthe
mesh and the feather amount, and the draw loop binds the mesh each frame, so a 
changed projection
only needs the mesh rebuilt. An unchanged result is a no-op, and a projection 
that resolves to
nothing tears the renderer down so the video returns to being presented as-is.

* Source/WebCore/Modules/modern-media-controls/media/spatial-video-support.js:
(SpatialVideoSupport.prototype.get
mediaEvents):
(SpatialVideoSupport.prototype._maybeEnable):
* Source/WebCore/dom/EventNames.json:
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::attributeChanged):
* Source/WebCore/html/HTMLVideoElement.idl:

Canonical link: 
https://flagged.apple.com:443/proxy?t2=DP1E8X4Br4&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE5MzgzQG1haW4=&emid=f53752df-ae78-4a4e-b443-e82f77a7e537&c=11



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

Reply via email to