Win32 theme work. Bug 8162. r=anders
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index 647e828..9b1088b 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -133,14 +133,13 @@
switch (style->appearance()) {
case PushButtonAppearance:
case SquareButtonAppearance:
- case ButtonAppearance: {
+ case ButtonAppearance:
+ case TextFieldAppearance: {
// Test the style to see if the UA border and background match.
return (style->border() != border ||
*style->backgroundLayers() != background ||
style->backgroundColor() != backgroundColor);
}
- case TextFieldAppearance:
- return style->border() != border;
default:
return false;
}
@@ -156,7 +155,7 @@
bool RenderTheme::stateChanged(RenderObject* o, ControlState state) const
{
// Default implementation assumes the controls dont respond to changes in :hover state
- if (state == HoverState)
+ if (state == HoverState && !supportsHover(o->style()))
return false;
// Assume pressed state is only responded to if the control is enabled.
@@ -203,6 +202,20 @@
return o->element()->active();
}
+bool RenderTheme::isReadOnly(const RenderObject* o) const
+{
+ if (!o->element())
+ return false;
+ return o->element()->isReadOnly();
+}
+
+bool RenderTheme::isHovered(const RenderObject* o) const
+{
+ if (!o->element())
+ return false;
+ return o->element()->hovered();
+}
+
void RenderTheme::adjustCheckboxStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
{
// A summary of the rules for checkbox designed to match WinIE: