2009-03-12 David Levin <levin@chromium.org>
Reviewed by Darin Fisher.
Bug 24530: width100percent-searchfield.html should be fixed for chromium.
<https://bugs.webkit.org/show_bug.cgi?id=24530>
Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
* css/themeChromiumWin.css: Added.
Overrides the changes to start supporting input[type="search"] on Windows (since
Chromium doesn't do anything special for this).
* rendering/RenderThemeChromiumWin.cpp:
(WebCore::supportsFocus):
(WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
(WebCore::RenderThemeChromiumWin::determineState):
(WebCore::RenderThemeChromiumWin::getThemeData):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 73199ee..baadf07 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-03-12 David Levin <levin@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Bug 24530: width100percent-searchfield.html should be fixed for chromium.
+ <https://bugs.webkit.org/show_bug.cgi?id=24530>
+
+ Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
+
+ * css/themeChromiumWin.css: Added.
+ Overrides the changes to start supporting input[type="search"] on Windows (since
+ Chromium doesn't do anything special for this).
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::supportsFocus):
+ (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
+ (WebCore::RenderThemeChromiumWin::determineState):
+ (WebCore::RenderThemeChromiumWin::getThemeData):
+
2009-03-12 Greg Bolsinga <bolsinga@apple.com>
Reviewed by Antti Koivisto.
diff --git a/WebCore/css/themeChromiumWin.css b/WebCore/css/themeChromiumWin.css
new file mode 100644
index 0000000..e829373
--- /dev/null
+++ b/WebCore/css/themeChromiumWin.css
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* These styles override the default styling for HTML elements as defined in
+ WebCore/css/themeWin.css. */
+#include "themeWin.css"
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-results-decoration,
+input[type="search"]::-webkit-search-results-button {
+ margin: 0 0 0 0;
+}
diff --git a/WebCore/css/themeWin.css b/WebCore/css/themeWin.css
index 69ede1c..2fa3d460 100644
--- a/WebCore/css/themeWin.css
+++ b/WebCore/css/themeWin.css
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Google Inc. All rights reserved.
+ * Copyright (C) 2008 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/WebCore/css/themeWinQuirks.css b/WebCore/css/themeWinQuirks.css
index 688eabc..c69b74c 100644
--- a/WebCore/css/themeWinQuirks.css
+++ b/WebCore/css/themeWinQuirks.css
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Google Inc. All rights reserved.
+ * Copyright (C) 2008 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/WebCore/rendering/RenderThemeChromiumWin.cpp b/WebCore/rendering/RenderThemeChromiumWin.cpp
index b6b9c26..e81e3d3 100644
--- a/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -131,6 +131,7 @@
case PushButtonPart:
case ButtonPart:
case DefaultButtonPart:
+ case SearchFieldPart:
case TextFieldPart:
case TextAreaPart:
return true;
@@ -254,7 +255,7 @@
String RenderThemeChromiumWin::extraDefaultStyleSheet()
{
- return String(themeWinUserAgentStyleSheet, sizeof(themeWinUserAgentStyleSheet));
+ return String(themeChromiumWinUserAgentStyleSheet, sizeof(themeChromiumWinUserAgentStyleSheet));
}
String RenderThemeChromiumWin::extraQuirksStyleSheet()
@@ -556,7 +557,7 @@
ControlPart appearance = o->style()->appearance();
if (!isEnabled(o))
result = TS_DISABLED;
- else if (isReadOnlyControl(o) && (TextFieldPart == appearance || TextAreaPart == appearance))
+ else if (isReadOnlyControl(o) && (TextFieldPart == appearance || TextAreaPart == appearance || SearchFieldPart == appearance))
result = ETS_READONLY; // Readonly is supported on textfields.
else if (isPressed(o)) // Active overrides hover and focused.
result = TS_PRESSED;
@@ -602,6 +603,7 @@
break;
case ListboxPart:
case MenulistPart:
+ case SearchFieldPart:
case TextFieldPart:
case TextAreaPart:
result.m_part = ETS_NORMAL;