summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 21:32:28 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 21:32:28 +0000
commit6d15caab249096abecd889bf68c3c51ba2bab785 (patch)
tree855c641d9328c88439c5826fb570155b1278ce4f /webkit/port
parent9f8b5ff58bbb0ab9535a19d532da372bd6bf4159 (diff)
downloadchromium_src-6d15caab249096abecd889bf68c3c51ba2bab785.zip
chromium_src-6d15caab249096abecd889bf68c3c51ba2bab785.tar.gz
chromium_src-6d15caab249096abecd889bf68c3c51ba2bab785.tar.bz2
Make RenderThemeWin and RenderThemeGtk a bit closer to each other. This is just a baby step in getting RenderThemeGtk to be more like RenderThemeWin.
- Remove some cosmetic differences from prototypes. - Remove the unused systemFont(X, X) from GTK. - Make supportsFocus have internal linkage, there is no RenderTheme::supportsFocus. This matches GTK. Review URL: http://codereview.chromium.org/11591 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/platform/chromium/RenderThemeGtk.cpp6
-rw-r--r--webkit/port/platform/chromium/RenderThemeGtk.h8
-rw-r--r--webkit/port/rendering/RenderThemeWin.cpp2
-rw-r--r--webkit/port/rendering/RenderThemeWin.h3
4 files changed, 6 insertions, 13 deletions
diff --git a/webkit/port/platform/chromium/RenderThemeGtk.cpp b/webkit/port/platform/chromium/RenderThemeGtk.cpp
index e05e9c5..ac5408d 100644
--- a/webkit/port/platform/chromium/RenderThemeGtk.cpp
+++ b/webkit/port/platform/chromium/RenderThemeGtk.cpp
@@ -426,12 +426,6 @@ double RenderThemeGtk::caretBlinkFrequency() const
return time / 2000.;
}
-void RenderThemeGtk::systemFont(int, FontDescription&) const
-{
- // If you remove this notImplemented(), replace it with an comment that explains why.
- notImplemented();
-}
-
void RenderThemeGtk::systemFont(int propId, Document*, FontDescription& fontDescription) const
{
switch (propId) {
diff --git a/webkit/port/platform/chromium/RenderThemeGtk.h b/webkit/port/platform/chromium/RenderThemeGtk.h
index 3606b6e..39247b3 100644
--- a/webkit/port/platform/chromium/RenderThemeGtk.h
+++ b/webkit/port/platform/chromium/RenderThemeGtk.h
@@ -39,7 +39,7 @@ public:
RenderThemeGtk();
// A method asking if the theme's controls actually care about redrawing when hovered.
- virtual bool supportsHover(const RenderStyle* style) const { return true; }
+ virtual bool supportsHover(const RenderStyle*) const { return true; }
// A method asking if the theme is able to draw the focus ring.
virtual bool supportsFocusRing(const RenderStyle*) const;
@@ -70,10 +70,8 @@ public:
virtual double caretBlinkFrequency() const;
// System fonts.
- virtual void systemFont(int propId, FontDescription&) const;
- virtual void systemFont(int, Document*, FontDescription&) const;
+ virtual void systemFont(int propId, Document*, FontDescription&) const;
-protected:
virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
virtual void setCheckboxSize(RenderStyle* style) const;
@@ -89,7 +87,7 @@ protected:
virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
- virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
diff --git a/webkit/port/rendering/RenderThemeWin.cpp b/webkit/port/rendering/RenderThemeWin.cpp
index 591a965..7176f75 100644
--- a/webkit/port/rendering/RenderThemeWin.cpp
+++ b/webkit/port/rendering/RenderThemeWin.cpp
@@ -391,7 +391,7 @@ void RenderThemeWin::systemFont(int propId, Document* document, FontDescription&
fontDescription = *cachedDesc;
}
-bool RenderThemeWin::supportsFocus(ControlPart appearance)
+static bool supportsFocus(ControlPart appearance)
{
switch (appearance) {
case PushButtonPart:
diff --git a/webkit/port/rendering/RenderThemeWin.h b/webkit/port/rendering/RenderThemeWin.h
index 0c50ee8..5304677 100644
--- a/webkit/port/rendering/RenderThemeWin.h
+++ b/webkit/port/rendering/RenderThemeWin.h
@@ -49,8 +49,10 @@ public:
// A method asking if the theme's controls actually care about redrawing when hovered.
virtual bool supportsHover(const RenderStyle*) const { return true; }
+ // A method asking if the theme is able to draw the focus ring.
virtual bool supportsFocusRing(const RenderStyle*) const;
+ // The platform selection color.
virtual Color platformActiveSelectionBackgroundColor() const;
virtual Color platformInactiveSelectionBackgroundColor() const;
virtual Color platformActiveSelectionForegroundColor() const;
@@ -121,7 +123,6 @@ private:
unsigned determineState(RenderObject*);
unsigned determineClassicState(RenderObject*);
- bool supportsFocus(ControlPart);
ThemeData getThemeData(RenderObject*);