Bug 267857

Summary: Remove unused functions in RenderTheme.h in relation to 'Media Controls'
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: annevk, bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Ahmad Saleem
Reported 2024-01-22 08:04:07 PST
Hi Team, We have following 'media controls' related virtual functions, which we can clean-up due to following changes: 1) Modern Media Controls are enabled since long 2) We only have just single 'mediaControls.css' (UA Stylesheet) rather than two before Anne did awesome work to remove it. I think removing and cleaning up will be ideal time now. WebKit Source: https://searchfox.org/wubkat/rev/519c7ed4ac755138208e8daf71057c4ac8a2f810/Source/WebCore/rendering/RenderTheme.h#99 Just raising so we can track it. Thanks!
Attachments
Ahmad Saleem
Comment 1 2024-01-24 09:58:12 PST
Removed in RenderTheme.h virtual String extraMediaControlsStyleSheet() { return String(); } and then in 'Source/WebCore/style/UserAgentStyle.cpp': Change in function 'ensureDefaultStyleSheetsForElement' -> if (!mediaControlsStyleSheet) { String mediaRules = RenderTheme::singleton().mediaControlsStyleSheet(); if (mediaRules.isEmpty()) mediaRules = String(StringImpl::createWithoutCopying(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet))) + RenderTheme::singleton().extraMediaControlsStyleSheet(); mediaControlsStyleSheet = parseUASheet(mediaRules); addToDefaultStyle(*mediaControlsStyleSheet); to: if (!mediaControlsStyleSheet) { String mediaRules = RenderTheme::singleton().mediaControlsStyleSheet(); if (mediaRules.isEmpty()) mediaRules = String(StringImpl::createWithoutCopying(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet))); mediaControlsStyleSheet = parseUASheet(mediaRules); addToDefaultStyle(*mediaControlsStyleSheet); ___ This compiles and work.
Radar WebKit Bug Importer
Comment 2 2024-01-29 08:05:14 PST
Note You need to log in before you can comment on or make changes to this bug.