Commit 94374e8b authored by dbates@webkit.org's avatar dbates@webkit.org

Rename {adjust, paint}SearchFieldDecoration, {adjust, paint}SearchFieldResultsDecoration

https://bugs.webkit.org/show_bug.cgi?id=125191

Reviewed by Joseph Pecoraro.

Towards upstreaming the iOS concept of render theme decorations, we should rename
RenderTheme::{adjust, paint}SearchFieldDecorationStyle and RenderTheme::{adjust, paint}SearchFieldResultsDecoration
to avoid ambiguity with the iOS concept.

* platform/efl/RenderThemeEfl.cpp:
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
* platform/gtk/RenderThemeGtk.h:
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
* rendering/RenderThemeSafari.cpp:
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
* rendering/RenderThemeWin.h:
* rendering/RenderThemeWinCE.cpp:
* rendering/RenderThemeWinCE.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 489ac072
2013-12-06 Daniel Bates <dabates@apple.com>
Rename {adjust, paint}SearchFieldDecoration, {adjust, paint}SearchFieldResultsDecoration
https://bugs.webkit.org/show_bug.cgi?id=125191
Reviewed by Joseph Pecoraro.
Towards upstreaming the iOS concept of render theme decorations, we should rename
RenderTheme::{adjust, paint}SearchFieldDecorationStyle and RenderTheme::{adjust, paint}SearchFieldResultsDecoration
to avoid ambiguity with the iOS concept.
* platform/efl/RenderThemeEfl.cpp:
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
* platform/gtk/RenderThemeGtk.h:
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
* rendering/RenderThemeSafari.cpp:
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
* rendering/RenderThemeWin.h:
* rendering/RenderThemeWinCE.cpp:
* rendering/RenderThemeWinCE.h:
2013-12-06 Andreas Kling <akling@apple.com>
Make remaining CSSValue constructors return PassRef.
......@@ -943,10 +943,10 @@ bool RenderThemeEfl::paintSearchFieldResultsButton(RenderObject* object, const P
return paintThemePart(object, SearchFieldResultsButton, info, rect);
}
void RenderThemeEfl::adjustSearchFieldResultsDecorationStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
void RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
{
if (!m_page && element && element->document().page()) {
static_cast<RenderThemeEfl*>(element->document().page()->theme())->adjustSearchFieldResultsDecorationStyle(styleResolver, style, element);
static_cast<RenderThemeEfl*>(element->document().page()->theme())->adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
return;
}
adjustSizeConstraints(style, SearchFieldResultsDecoration);
......@@ -960,7 +960,7 @@ void RenderThemeEfl::adjustSearchFieldResultsDecorationStyle(StyleResolver* styl
style->setHeight(Length(decorationSize, Fixed));
}
bool RenderThemeEfl::paintSearchFieldResultsDecoration(RenderObject* object, const PaintInfo& info, const IntRect& rect)
bool RenderThemeEfl::paintSearchFieldResultsDecorationPart(RenderObject* object, const PaintInfo& info, const IntRect& rect)
{
return paintThemePart(object, SearchFieldResultsDecoration, info, rect);
}
......
......@@ -143,8 +143,8 @@ public:
virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
......
......@@ -282,7 +282,7 @@ void RenderThemeGtk::adjustSearchFieldResultsButtonStyle(StyleResolver* styleRes
bool RenderThemeGtk::paintSearchFieldResultsButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
return paintSearchFieldResultsDecoration(o, i, rect);
return paintSearchFieldResultsDecorationPart(o, i, rect);
}
static void adjustSearchFieldIconStyle(RenderStyle* style)
......@@ -303,7 +303,7 @@ static void adjustSearchFieldIconStyle(RenderStyle* style)
style->setHeight(Length(height, Fixed));
}
void RenderThemeGtk::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
adjustSearchFieldIconStyle(style);
}
......@@ -328,7 +328,7 @@ static IntRect centerRectVerticallyInParentInputElement(RenderObject* renderObje
return scaledRect;
}
bool RenderThemeGtk::paintSearchFieldResultsDecoration(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
bool RenderThemeGtk::paintSearchFieldResultsDecorationPart(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
{
IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect);
if (iconRect.isEmpty())
......
......@@ -139,8 +139,8 @@ protected:
virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
......
......@@ -231,9 +231,9 @@ void RenderTheme::adjustStyle(StyleResolver* styleResolver, RenderStyle* style,
case SearchFieldCancelButtonPart:
return adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
case SearchFieldDecorationPart:
return adjustSearchFieldDecorationStyle(styleResolver, style, e);
return adjustSearchFieldDecorationPartStyle(styleResolver, style, e);
case SearchFieldResultsDecorationPart:
return adjustSearchFieldResultsDecorationStyle(styleResolver, style, e);
return adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, e);
case SearchFieldResultsButtonPart:
return adjustSearchFieldResultsButtonStyle(styleResolver, style, e);
#if ENABLE(PROGRESS_ELEMENT)
......@@ -374,9 +374,9 @@ bool RenderTheme::paint(RenderObject* o, const PaintInfo& paintInfo, const IntRe
case SearchFieldCancelButtonPart:
return paintSearchFieldCancelButton(o, paintInfo, r);
case SearchFieldDecorationPart:
return paintSearchFieldDecoration(o, paintInfo, r);
return paintSearchFieldDecorationPart(o, paintInfo, r);
case SearchFieldResultsDecorationPart:
return paintSearchFieldResultsDecoration(o, paintInfo, r);
return paintSearchFieldResultsDecorationPart(o, paintInfo, r);
case SearchFieldResultsButtonPart:
return paintSearchFieldResultsButton(o, paintInfo, r);
case SnapshottedPluginOverlayPart:
......@@ -1099,11 +1099,11 @@ void RenderTheme::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle
{
}
void RenderTheme::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const
void RenderTheme::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const
{
}
void RenderTheme::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const
void RenderTheme::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const
{
}
......
......@@ -310,11 +310,11 @@ protected:
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
......
......@@ -142,11 +142,11 @@ protected:
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&);
......
......@@ -1642,7 +1642,7 @@ const IntSize* RenderThemeMac::resultsButtonSizes() const
}
const int emptyResultsOffset = 9;
void RenderThemeMac::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeMac::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize size = sizeForSystemFont(style, resultsButtonSizes());
style->setWidth(Length(size.width() - emptyResultsOffset, Fixed));
......@@ -1650,12 +1650,12 @@ void RenderThemeMac::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyl
style->setBoxShadow(nullptr);
}
bool RenderThemeMac::paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&)
bool RenderThemeMac::paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&)
{
return false;
}
void RenderThemeMac::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize size = sizeForSystemFont(style, resultsButtonSizes());
style->setWidth(Length(size.width(), Fixed));
......@@ -1663,7 +1663,7 @@ void RenderThemeMac::adjustSearchFieldResultsDecorationStyle(StyleResolver*, Ren
style->setBoxShadow(nullptr);
}
bool RenderThemeMac::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
bool RenderThemeMac::paintSearchFieldResultsDecorationPart(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
Node* input = o->node()->shadowHost();
if (!input)
......
......@@ -1109,26 +1109,26 @@ const IntSize* RenderThemeSafari::resultsButtonSizes() const
}
const int emptyResultsOffset = 9;
void RenderThemeSafari::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeSafari::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize size = sizeForSystemFont(style, resultsButtonSizes());
style->setWidth(Length(size.width() - emptyResultsOffset, Fixed));
style->setHeight(Length(size.height(), Fixed));
}
bool RenderThemeSafari::paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&)
bool RenderThemeSafari::paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&)
{
return false;
}
void RenderThemeSafari::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize size = sizeForSystemFont(style, resultsButtonSizes());
style->setWidth(Length(size.width(), Fixed));
style->setHeight(Length(size.height(), Fixed));
}
bool RenderThemeSafari::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect&)
bool RenderThemeSafari::paintSearchFieldResultsDecorationPart(RenderObject* o, const PaintInfo& paintInfo, const IntRect&)
{
ASSERT(SafariThemeLibrary());
......
......@@ -117,11 +117,11 @@ protected:
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&);
......
......@@ -953,14 +953,14 @@ void RenderThemeWin::adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderSt
style->setHeight(Length(cancelButtonSize, Fixed));
}
void RenderThemeWin::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeWin::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize emptySize(1, 11);
style->setWidth(Length(emptySize.width(), Fixed));
style->setHeight(Length(emptySize.height(), Fixed));
}
void RenderThemeWin::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
// Scale the decoration size based on the font size
float fontScale = style->fontSize() / defaultControlFontPixelSize;
......@@ -970,7 +970,7 @@ void RenderThemeWin::adjustSearchFieldResultsDecorationStyle(StyleResolver*, Ren
style->setHeight(Length(magnifierSize, Fixed));
}
bool RenderThemeWin::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
bool RenderThemeWin::paintSearchFieldResultsDecorationPart(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
IntRect bounds = r;
ASSERT(o->parent());
......
......@@ -103,11 +103,11 @@ public:
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&) { return false; }
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&) { return false; }
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&);
......
......@@ -400,21 +400,21 @@ void RenderThemeWinCE::adjustSearchFieldCancelButtonStyle(StyleResolver*, Render
style->setHeight(Length(cancelSize.height(), Fixed));
}
void RenderThemeWinCE::adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeWinCE::adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize emptySize(1, 11);
style->setWidth(Length(emptySize.width(), Fixed));
style->setHeight(Length(emptySize.height(), Fixed));
}
void RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle* style, Element*) const
void RenderThemeWinCE::adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle* style, Element*) const
{
IntSize magnifierSize(15, 11);
style->setWidth(Length(magnifierSize.width(), Fixed));
style->setHeight(Length(magnifierSize.height(), Fixed));
}
bool RenderThemeWinCE::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
bool RenderThemeWinCE::paintSearchFieldResultsDecorationPart(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
notImplemented();
return false;
......@@ -429,7 +429,7 @@ void RenderThemeWinCE::adjustSearchFieldResultsButtonStyle(StyleResolver*, Rende
bool RenderThemeWinCE::paintSearchFieldResultsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
paintSearchFieldResultsDecoration(o, paintInfo, r);
paintSearchFieldResultsDecorationPart(o, paintInfo, r);
return false;
}
......
......@@ -99,11 +99,11 @@ namespace WebCore {
virtual void adjustSearchFieldCancelButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&) { return false; }
virtual void adjustSearchFieldDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecorationPart(RenderObject*, const PaintInfo&, const IntRect&) { return false; }
virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecorationPart(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment