2
* Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
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.
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.
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
19
#ifndef RenderThemeBlackBerry_h
20
#define RenderThemeBlackBerry_h
22
#include "RenderTheme.h"
26
class RenderThemeBlackBerry : public RenderTheme {
28
static PassRefPtr<RenderTheme> create();
29
virtual ~RenderThemeBlackBerry();
31
virtual String extraDefaultStyleSheet();
34
virtual String extraMediaControlsStyleSheet();
35
virtual String formatMediaControlsRemainingTime(float currentTime, float duration) const;
37
virtual bool supportsHover(const RenderStyle*) const { return true; }
39
virtual double caretBlinkInterval() const;
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&);
54
#if ENABLE(TOUCH_EVENTS)
55
virtual Color platformTapHighlightColor() const;
58
virtual Color platformFocusRingColor() const;
59
virtual bool supportsFocusRing(const RenderStyle* style) const { return style->hasAppearance(); }
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&);
65
virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
66
virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
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&);
73
virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
74
virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
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;
89
virtual Color platformActiveSelectionBackgroundColor() const;
91
// Highlighting colors for TextMatches.
92
virtual Color platformActiveTextSearchHighlightColor() const;
93
virtual Color platformInactiveTextSearchHighlightColor() const;
96
static const String& defaultGUIFont();
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;
103
RenderThemeBlackBerry();
104
void setButtonStyle(RenderStyle*) const;
106
bool paintTextFieldOrTextAreaOrSearchField(RenderObject*, const PaintInfo&, const IntRect&);
107
bool paintSliderTrackRect(RenderObject*, const PaintInfo&, const IntRect&);
109
bool paintSliderTrackRect(RenderObject*, const PaintInfo&, const IntRect&, Image*);
110
IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObject* partRenderer, LayoutRect partRect, const IntRect& localOffset) const;
114
} // namespace WebCore
116
#endif // RenderThemeBlackBerry_h