~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebCore/platform/blackberry/RenderThemeBlackBerry.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 */
 
18
 
 
19
#ifndef RenderThemeBlackBerry_h
 
20
#define RenderThemeBlackBerry_h
 
21
 
 
22
#include "RenderTheme.h"
 
23
 
 
24
namespace WebCore {
 
25
 
 
26
class RenderThemeBlackBerry : public RenderTheme {
 
27
public:
 
28
    static PassRefPtr<RenderTheme> create();
 
29
    virtual ~RenderThemeBlackBerry();
 
30
 
 
31
    virtual String extraDefaultStyleSheet();
 
32
 
 
33
#if ENABLE(VIDEO)
 
34
    virtual String extraMediaControlsStyleSheet();
 
35
    virtual String formatMediaControlsRemainingTime(float currentTime, float duration) const;
 
36
#endif
 
37
    virtual bool supportsHover(const RenderStyle*) const { return true; }
 
38
 
 
39
    virtual double caretBlinkInterval() const;
 
40
 
 
41
    virtual void systemFont(int cssValueId, FontDescription&) const;
 
42
    virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&);
 
43
    virtual void setCheckboxSize(RenderStyle*) const;
 
44
    virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&);
 
45
    virtual void setRadioSize(RenderStyle*) const;
 
46
    virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
 
47
    void calculateButtonSize(RenderStyle*) const;
 
48
    virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
 
49
    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
 
50
    virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
 
51
    virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
 
52
    virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
 
53
 
 
54
#if ENABLE(TOUCH_EVENTS)
 
55
    virtual Color platformTapHighlightColor() const;
 
56
#endif
 
57
 
 
58
    virtual Color platformFocusRingColor() const;
 
59
    virtual bool supportsFocusRing(const RenderStyle* style) const { return style->hasAppearance(); }
 
60
 
 
61
    virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
62
    virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
 
63
    virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
 
64
 
 
65
    virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
 
66
    virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
 
67
 
 
68
    virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
 
69
    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
70
    virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
 
71
    virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&);
 
72
 
 
73
    virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
74
    virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
 
75
 
 
76
    virtual void adjustMediaControlStyle(StyleResolver*, RenderStyle*, Element*) const;
 
77
    virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const;
 
78
    virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, const IntRect&);
 
79
    virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
 
80
    virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
 
81
    virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
 
82
    virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
 
83
    virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
 
84
    virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);
 
85
    virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&);
 
86
    virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const;
 
87
    virtual double animationDurationForProgressBar(RenderProgress*) const;
 
88
 
 
89
    virtual Color platformActiveSelectionBackgroundColor() const;
 
90
 
 
91
    // Highlighting colors for TextMatches.
 
92
    virtual Color platformActiveTextSearchHighlightColor() const;
 
93
    virtual Color platformInactiveTextSearchHighlightColor() const;
 
94
 
 
95
private:
 
96
    static const String& defaultGUIFont();
 
97
 
 
98
    // The default variable-width font size. We use this as the default font
 
99
    // size for the "system font", and as a base size (which we then shrink) for
 
100
    // form control fonts.
 
101
    static float defaultFontSize;
 
102
 
 
103
    RenderThemeBlackBerry();
 
104
    void setButtonStyle(RenderStyle*) const;
 
105
 
 
106
    bool paintTextFieldOrTextAreaOrSearchField(RenderObject*, const PaintInfo&, const IntRect&);
 
107
    bool paintSliderTrackRect(RenderObject*, const PaintInfo&, const IntRect&);
 
108
 
 
109
    bool paintSliderTrackRect(RenderObject*, const PaintInfo&, const IntRect&, Image*);
 
110
    IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObject* partRenderer, LayoutRect partRect, const IntRect& localOffset) const;
 
111
 
 
112
};
 
113
 
 
114
} // namespace WebCore
 
115
 
 
116
#endif // RenderThemeBlackBerry_h