Changeset 53802 in webkit


Ignore:
Timestamp:
Jan 25, 2010 6:42:28 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-25 Simon Hausmann <Simon Hausmann>

Reviewed by Kenneth Rohde Christiansen.

[Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
https://bugs.webkit.org/show_bug.cgi?id=34053

  • platform/qt/QWebPageClient.h: Add function to return the style.
  • platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::qStyle): Determine the style from the page client instead of the page's view.

2010-01-25 Simon Hausmann <Simon Hausmann>

Reviewed by Kenneth Rohde Christiansen.

[Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
https://bugs.webkit.org/show_bug.cgi?id=34053

  • Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics widget's style.
  • Api/qwebpage.cpp: (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53801 r53802  
     12010-01-25  Simon Hausmann  <hausmann@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
     6        https://bugs.webkit.org/show_bug.cgi?id=34053
     7
     8        * platform/qt/QWebPageClient.h: Add function to return the style.
     9        * platform/qt/RenderThemeQt.cpp:
     10        (WebCore::RenderThemeQt::qStyle): Determine the style from the page client instead of the page's view.
     11
    1122010-01-25  Simon Hausmann  <hausmann@webkit.org>
    213
  • trunk/WebCore/platform/qt/QWebPageClient.h

    r53618 r53802  
    3232
    3333#include <QRect>
     34
     35QT_BEGIN_NAMESPACE
    3436class QGraphicsItem;
     37class QStyle;
     38QT_END_NAMESPACE
    3539
    3640class QWebPageClient {
     
    8084    virtual QObject* pluginParent() const = 0;
    8185
     86    virtual QStyle* style() const = 0;
     87
    8288protected:
    8389#ifndef QT_NO_CURSOR
  • trunk/WebCore/platform/qt/RenderThemeQt.cpp

    r53801 r53802  
    161161{
    162162    if (m_page) {
    163         ChromeClientQt* client = static_cast<ChromeClientQt*>(m_page->chrome()->client());
    164 
    165         if (!client->m_webPage)
    166             return QApplication::style();
    167 
    168         if (QWidget* view = client->m_webPage->view())
    169             return view->style();
     163        QWebPageClient* pageClient = m_page->chrome()->client()->platformPageClient();
     164
     165        if (pageClient)
     166            return pageClient->style();
    170167    }
    171168
  • trunk/WebKit/qt/Api/qgraphicswebview.cpp

    r53618 r53802  
    109109    virtual QObject* pluginParent() const;
    110110
     111    virtual QStyle* style() const;
     112
    111113#if USE(ACCELERATED_COMPOSITING)
    112114    virtual void setRootGraphicsLayer(QGraphicsItem* layer);
     
    290292{
    291293    return q;
     294}
     295
     296QStyle* QGraphicsWebViewPrivate::style() const
     297{
     298    return q->style();
    292299}
    293300
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r53218 r53802  
    173173    virtual QObject* pluginParent() const;
    174174
     175    virtual QStyle* style() const;
     176
    175177    QWidget* view;
    176178};
     
    240242{
    241243    return view;
     244}
     245
     246QStyle* QWebPageWidgetClient::style() const
     247{
     248    return view->style();
    242249}
    243250
  • trunk/WebKit/qt/ChangeLog

    r53799 r53802  
     12010-01-25  Simon Hausmann  <hausmann@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
     6        https://bugs.webkit.org/show_bug.cgi?id=34053
     7
     8        * Api/qgraphicswebview.cpp:
     9        (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics
     10        widget's style.
     11        * Api/qwebpage.cpp:
     12        (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style.
     13
    1142010-01-25  Janne Koskinen  <janne.p.koskinen@digia.com>
    215
Note: See TracChangeset for help on using the changeset viewer.