2010-12-31 Yi Shen <yi.4.shen@nokia.com>

        Reviewed by Eric Seidel.

        Make retrieving extraMediaControlsStyleSheet be page dependent.
        https://bugs.webkit.org/show_bug.cgi?id=51752

        Use themeForPage to retrieve extraMediaControlsStyleSheet for media
        controls.

        No new tests because no platform-specific theme implementation uses
        the passed page pointer yet.

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 37a1ceff
2010-12-31 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Eric Seidel.
Make retrieving extraMediaControlsStyleSheet be page dependent.
https://bugs.webkit.org/show_bug.cgi?id=51752
Use themeForPage to retrieve extraMediaControlsStyleSheet for media
controls.
No new tests because no platform-specific theme implementation uses
the passed page pointer yet.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForElement):
2010-12-31 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Pavel Feldman.
......
......@@ -1260,7 +1260,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
static bool loadedMediaStyleSheet;
if (!loadedMediaStyleSheet && (e->hasTagName(videoTag) || e->hasTagName(audioTag))) {
loadedMediaStyleSheet = true;
String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraMediaControlsStyleSheet();
String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + RenderTheme::themeForPage(e->document()->page())->extraMediaControlsStyleSheet();
CSSStyleSheet* mediaControlsSheet = parseUASheet(mediaRules);
defaultStyle->addRulesFromSheet(mediaControlsSheet, screenEval());
defaultPrintStyle->addRulesFromSheet(mediaControlsSheet, printEval());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment