Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5033ebb318e52dbc35184d414ba0a1947803fca0
https://github.com/WebKit/WebKit/commit/5033ebb318e52dbc35184d414ba0a1947803fca0
Author: Jer Noble <[email protected]>
Date: 2025-11-03 (Mon, 03 Nov 2025)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Modules/WebGPU/GPUDevice.cpp
M Source/WebCore/Modules/WebGPU/GPUDevice.h
M Source/WebCore/Modules/WebGPU/GPUQueue.h
M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
M Source/WebCore/Modules/mediasource/MediaSource.h
M
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl
A
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.cpp
A
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.h
M Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h
M Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp
M Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h
M Source/WebCore/Modules/webxr/WebXRHitTestSource.cpp
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/DocumentFullscreen.cpp
M Source/WebCore/dom/DocumentFullscreen.h
M Source/WebCore/dom/ShadowRoot.cpp
M Source/WebCore/dom/ShadowRoot.h
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/html/HTMLMediaElementEnums.h
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebCore/html/HTMLVideoElement.h
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.cpp
M Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
M Source/WebCore/page/DeprecatedGlobalSettings.cpp
M Source/WebCore/page/DiagnosticLoggingKeys.cpp
M Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
M Source/WebCore/rendering/RenderMedia.cpp
M Source/WebCore/rendering/RenderMedia.h
A Source/WebCore/rendering/RenderMediaInlines.h
M Source/WebCore/rendering/RenderVideo.cpp
M Source/WebCore/rendering/RenderVideo.h
A Source/WebCore/rendering/RenderVideoInlines.h
M Source/WebCore/style/UserAgentStyle.cpp
M Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
M Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm
Log Message:
-----------
[Build Speed] Reduce includes of HTMLMediaElement.h and HTMLVideoElement.h
rdar://163794224
https://bugs.webkit.org/show_bug.cgi?id=301755
Reviewed by Anne van Kesteren.
Reduce the number of times HTMLMediaElement.h and HTMLVideoElement.h are
included during a build,
mostly by removing those includes from other headers. Sometimes the include can
be replaced with a
simple forward declaration, sometimes it can be replaced by redeclaring an enum
type, and sometimes
the include was necessary for an inlined function. In the latter cases, the
inlined function was
moved into the implementation file when there was no benefit from inlining the
function, or
an -Inlines.h header was made and the inlined functions were moved there. In
one case, Document.h
was including HTMLMediaElement.h because the bindings specified a function
would return an Element,
and the function in Document.h was returning a HTMLVideoElement, forcing the
caller to cast. Since
the caller was a generated source, there was no way to move the include there;
instead an explicit
mixin class DocumentOrShadowRootPictureInPicture.
Before these changes, HTMLMediaElement.h and HTMLVideoElement.h were included
102 and 65 times
respectively, taking 58s of CPU time to parse during the WebCore build.
After these changes, HTMLMediaElement.h and HTMLVideoElement.h were included 75
and 53 times
respectively, taking 44s of CPU time to parse during the WebCore build.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
* Source/WebCore/Modules/WebGPU/GPUDevice.h:
* Source/WebCore/Modules/WebGPU/GPUQueue.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/Modules/mediasource/MediaSource.h:
*
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl:
*
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.cpp:
Copied from Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h.
(WebCore::DocumentOrShadowRootFullscreen::pictureInPictureElement):
*
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.h:
Copied from
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl.
* Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.cpp:
(WebCore::DocumentPictureInPicture::exitPictureInPicture):
* Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h:
* Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp:
* Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AXObjectCache.cpp:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMediaObject const):
* Source/WebCore/accessibility/AccessibilityRenderObject.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::pictureInPictureElement const):
* Source/WebCore/dom/DocumentFullscreen.cpp:
* Source/WebCore/dom/DocumentFullscreen.h:
* Source/WebCore/dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::pictureInPictureElement const): Deleted.
* Source/WebCore/dom/ShadowRoot.h:
* Source/WebCore/html/HTMLElement.cpp:
* Source/WebCore/html/HTMLMediaElement.cpp:
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/html/HTMLMediaElementEnums.h:
* Source/WebCore/html/HTMLVideoElement.cpp:
* Source/WebCore/html/HTMLVideoElement.h:
* Source/WebCore/html/MediaElementSession.cpp:
* Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.cpp:
* Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:
* Source/WebCore/page/DeprecatedGlobalSettings.cpp:
* Source/WebCore/page/DiagnosticLoggingKeys.cpp:
* Source/WebCore/rendering/RenderMedia.cpp:
* Source/WebCore/rendering/RenderMedia.h:
(WebCore::RenderMedia::mediaElement const): Deleted.
(WebCore::RenderMedia::protectedMediaElement const): Deleted.
(WebCore::HTMLMediaElement::hasRenderer const): Deleted.
(WebCore::HTMLMediaElement::renderer const): Deleted.
* Source/WebCore/rendering/RenderMediaInlines.h: Copied from
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl.
(WebCore::HTMLMediaElement::hasRenderer const):
(WebCore::HTMLMediaElement::renderer const):
(WebCore::RenderMedia::mediaElement const):
(WebCore::RenderMedia::protectedMediaElement const):
* Source/WebCore/rendering/RenderVideo.cpp:
* Source/WebCore/rendering/RenderVideo.h:
(WebCore::HTMLVideoElement::renderer const): Deleted.
* Source/WebCore/rendering/RenderVideoInlines.h: Copied from
Source/WebCore/Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl.
(WebCore::HTMLVideoElement::renderer const):
* Source/WebCore/style/UserAgentStyle.cpp:
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
* Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
Canonical link: https://commits.webkit.org/302498@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications