summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index f505d0cb8f..501a28b9a7 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -44,6 +44,8 @@
#include "Page.h"
#include "RenderBox.h"
#include "RenderTheme.h"
+#include "UserAgentStyleSheets.h"
+#include "QWebPageClient.h"
#include "qwebpage.h"
#include <QApplication>
@@ -756,12 +758,13 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
if (result == RadioPart || result == CheckboxPart)
option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);
- // If the webview has a custom palette, use it
+ // If the owner widget has a custom palette, use it
Page* page = o->document()->page();
if (page) {
- QWidget* view = static_cast<ChromeClientQt*>(page->chrome()->client())->m_webPage->view();
- if (view)
- option.palette = view->palette();
+ ChromeClient* client = page->chrome()->client();
+ QWebPageClient* pageClient = client->platformPageClient();
+ if (pageClient)
+ option.palette = pageClient->palette();
}
return result;
@@ -771,13 +774,7 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
String RenderThemeQt::extraMediaControlsStyleSheet()
{
- QFile platformStyleSheet(QLatin1String(":/webcore/css/mediaControls-extras.css"));
- if (platformStyleSheet.open(QFile::ReadOnly)) {
- QByteArray sheetData = platformStyleSheet.readAll();
- return QString::fromUtf8(sheetData.constData(), sheetData.length());
- }
-
- return String();
+ return String(mediaControlsQtUserAgentStyleSheet, sizeof(mediaControlsQtUserAgentStyleSheet));
}
// Helper class to transform the painter's world matrix to the object's content area, scaled to 0,0,100,100