Changeset 53801 in webkit


Ignore:
Timestamp:
Jan 25, 2010 6:20:56 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] Clean up code to determine palette from page client in RenderThemeQt
https://bugs.webkit.org/show_bug.cgi?id=34052

Patch by Simon Hausmann <Simon Hausmann> on 2010-01-25
Reviewed by Kenneth Christiansen.

Use the RenderTheme's associated page instead of going through the
render tree and the document.

  • platform/qt/RenderThemeQt.cpp:

(WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
(WebCore::RenderThemeQt::initializeCommonQStyleOptions):

  • platform/qt/RenderThemeQt.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53799 r53801  
     12010-01-25  Simon Hausmann  <hausmann@webkit.org>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] Clean up code to determine palette from page client in RenderThemeQt
     6        https://bugs.webkit.org/show_bug.cgi?id=34052
     7
     8        Use the RenderTheme's associated page instead of going through the
     9        render tree and the document.
     10
     11        * platform/qt/RenderThemeQt.cpp:
     12        (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
     13        (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
     14        * platform/qt/RenderThemeQt.h:
     15
    1162010-01-25  Janne Koskinen  <janne.p.koskinen@digia.com>
    217
  • trunk/WebCore/platform/qt/RenderThemeQt.cpp

    r53632 r53801  
    769769}
    770770
    771 static inline void setPaletteFromPageClientIfExists(QPalette &palette, const RenderObject *o)
     771void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
    772772{
    773773    // If the webview has a custom palette, use it
    774     Page* page = o->document()->page();
    775     if (!page)
     774    if (!m_page)
    776775        return;
    777     Chrome* chrome = page->chrome();
     776    Chrome* chrome = m_page->chrome();
    778777    if (!chrome)
    779778        return;
     
    804803        option.state |= QStyle::State_MouseOver;
    805804
    806     setPaletteFromPageClientIfExists(option.palette, o);
     805    setPaletteFromPageClientIfExists(option.palette);
    807806    RenderStyle* style = o->style();
    808807    if (!style)
  • trunk/WebCore/platform/qt/RenderThemeQt.h

    r52896 r53801  
    141141    void setPopupPadding(RenderStyle*) const;
    142142
     143    void setPaletteFromPageClientIfExists(QPalette&) const;
     144
    143145    QStyle* qStyle() const;
    144146    QStyle* fallbackStyle();
Note: See TracChangeset for help on using the changeset viewer.