Bug 267857
| Summary: | Remove unused functions in RenderTheme.h in relation to 'Media Controls' | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
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
<rdar://problem/121854876>