RESOLVED FIXED51752
Make retrieving extraMediaControlsStyleSheet be page dependent
https://bugs.webkit.org/show_bug.cgi?id=51752
Summary Make retrieving extraMediaControlsStyleSheet be page dependent
Yi Shen
Reported 2010-12-30 08:52:01 PST
For media element, cssstyleselector loads the media controls style-sheet by using defaultTheme, which assumes the theme is needed in non-page dependent code. However, we may need to load a page dependent theme. For example, if the browser runs in a force-fullscreen-mode, (see https://bugs.webkit.org/show_bug.cgi?id=51133) then the theme of the media controls might be changed a bit. To change the theme, one possible solution is to load a different style sheet for the force-fullscreen-mode. Considering following code String RenderThemeQt::extraMediaControlsStyleSheet() { String result = String(mediaControlsQtUserAgentStyleSheet, sizeof(mediaControlsQtUserAgentStyleSheet)); if (m_page && m_page->chrome()->requiresFullscreenForVideoPlayback()) result += String(mediaControlsQtFullscreenUserAgentStyleSheet, sizeof(mediaControlsQtFullscreenUserAgentStyleSheet)); return result; } To make above code work, we have to use themeForPage (which passes a page pointer to the RenderThemeQt) to retrieve extraMediaControlsStyleSheet.
Attachments
first try (1.80 KB, patch)
2010-12-30 08:58 PST, Yi Shen
no flags
Yi Shen
Comment 1 2010-12-30 08:58:59 PST
Created attachment 77683 [details] first try
Eric Seidel (no email)
Comment 2 2010-12-31 09:08:44 PST
Comment on attachment 77683 [details] first try OK
WebKit Commit Bot
Comment 3 2010-12-31 09:58:48 PST
Comment on attachment 77683 [details] first try Clearing flags on attachment: 77683 Committed r74832: <http://trac.webkit.org/changeset/74832>
WebKit Commit Bot
Comment 4 2010-12-31 09:58:54 PST
All reviewed patches have been landed. Closing bug.
Ademar Reis
Comment 5 2011-01-03 05:40:19 PST
Revision r74832 cherry-picked into qtwebkit-2.2 with commit 5b7ebdc <http://gitorious.org/webkit/qtwebkit/commit/5b7ebdc>
Note You need to log in before you can comment on or make changes to this bug.