- Revision
- 157443
- Author
- [email protected]
- Date
- 2013-10-14 22:55:40 -0700 (Mon, 14 Oct 2013)
Log Message
Source/WebCore: in safari,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967
Patch by Santosh Mahto <[email protected]> on 2013-10-14
Reviewed by Ryosuke Niwa.
When input type=search is styled with css background property then
it does not change the background-color of field. Its happening becasue
search field is not counted as styled control. Thus theme ignores the
css background property. With this patch search field is also counted as
styled control so background property reflects on search field.
Test: fast/forms/search/search-field-background-color.html
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isControlStyled):Now search field is also
a styled control.
LayoutTests: in safari ,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967
Patch by Santosh Mahto <[email protected]> on 2013-10-14
Reviewed by Ryosuke Niwa.
Added testcase to verify the background color of search field when
search field is styled with css background property.
* fast/forms/search/search-field-background-color-expected.txt: Added.
* fast/forms/search/search-field-background-color.html: Added.
* platform/mac/fast/forms/search-styled-expected.txt: Rebaselined.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (157442 => 157443)
--- trunk/LayoutTests/ChangeLog 2013-10-15 05:06:10 UTC (rev 157442)
+++ trunk/LayoutTests/ChangeLog 2013-10-15 05:55:40 UTC (rev 157443)
@@ -1,3 +1,17 @@
+2013-10-14 Santosh Mahto <[email protected]>
+
+ in safari ,the background-color of input[type="search"] can't work
+ https://bugs.webkit.org/show_bug.cgi?id=119967
+
+ Reviewed by Ryosuke Niwa.
+
+ Added testcase to verify the background color of search field when
+ search field is styled with css background property.
+
+ * fast/forms/search/search-field-background-color-expected.txt: Added.
+ * fast/forms/search/search-field-background-color.html: Added.
+ * platform/mac/fast/forms/search-styled-expected.txt: Rebaselined.
+
2013-10-14 Zoltan Horvath <[email protected]>
[CSS Shapes] Move shape-inside floats tests into their own subdirectory
Added: trunk/LayoutTests/fast/forms/search/search-field-background-color-expected.txt (0 => 157443)
--- trunk/LayoutTests/fast/forms/search/search-field-background-color-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/search/search-field-background-color-expected.txt 2013-10-15 05:55:40 UTC (rev 157443)
@@ -0,0 +1,4 @@
+PASS getComputedStyle(test, null).getPropertyValue('background-color') is color
+The following search field should have red background.
+
+
Added: trunk/LayoutTests/fast/forms/search/search-field-background-color.html (0 => 157443)
--- trunk/LayoutTests/fast/forms/search/search-field-background-color.html (rev 0)
+++ trunk/LayoutTests/fast/forms/search/search-field-background-color.html 2013-10-15 05:55:40 UTC (rev 157443)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<style>
+ input { background: red; }
+</style>
+</head>
+
+<body>
+<p>The following search field should have red background.</p>
+<input type="search" id="test">
+
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText(true);
+
+ var test = document.getElementById("test");
+ var color = 'rgb(255, 0, 0)';
+ shouldBe("getComputedStyle(test, null).getPropertyValue('background-color')", "color");
+</script>
+
+</body>
+</html>
Added: trunk/LayoutTests/platform/efl/fast/forms/search/search-field-background-color-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/efl/fast/forms/search/search-field-background-color-expected.png
___________________________________________________________________
Added: svn:mime-type
Modified: trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt (157442 => 157443)
--- trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt 2013-10-15 05:06:10 UTC (rev 157442)
+++ trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt 2013-10-15 05:55:40 UTC (rev 157443)
@@ -1,17 +1,17 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x39
- RenderBlock {HTML} at (0,0) size 800x39
- RenderBody {BODY} at (8,8) size 784x23
- RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 152x13
+layer at (0,0) size 800x41
+ RenderBlock {HTML} at (0,0) size 800x41
+ RenderBody {BODY} at (8,8) size 784x25
+ RenderTextControl {INPUT} at (2,2) size 220x21 [bgcolor=#FFFFFF] [border: (1px solid #BDC7D8)]
+ RenderFlexibleBox {DIV} at (18,4) size 198x13
RenderBlock {DIV} at (0,1) size 22x11
- RenderBlock {DIV} at (22,0) size 117x13
- RenderBlock {DIV} at (139,1) size 13x11
+ RenderBlock {DIV} at (22,0) size 163x13
+ RenderBlock {DIV} at (185,1) size 13x11
RenderText {#text} at (0,0) size 0x0
-layer at (35,13) size 117x13
- RenderBlock {DIV} at (25,3) size 117x13 [color=#A9A9A9]
+layer at (50,14) size 163x13
+ RenderBlock {DIV} at (40,4) size 163x13 [color=#A9A9A9]
RenderText {#text} at (0,0) size 92x13
text run at (0,0) width 92: "Search for Events"
-layer at (35,13) size 117x13
- RenderBlock {DIV} at (0,0) size 117x13
+layer at (50,14) size 163x13
+ RenderBlock {DIV} at (0,0) size 163x13
Modified: trunk/Source/WebCore/ChangeLog (157442 => 157443)
--- trunk/Source/WebCore/ChangeLog 2013-10-15 05:06:10 UTC (rev 157442)
+++ trunk/Source/WebCore/ChangeLog 2013-10-15 05:55:40 UTC (rev 157443)
@@ -1,3 +1,22 @@
+2013-10-14 Santosh Mahto <[email protected]>
+
+ in safari,the background-color of input[type="search"] can't work
+ https://bugs.webkit.org/show_bug.cgi?id=119967
+
+ Reviewed by Ryosuke Niwa.
+
+ When input type=search is styled with css background property then
+ it does not change the background-color of field. Its happening becasue
+ search field is not counted as styled control. Thus theme ignores the
+ css background property. With this patch search field is also counted as
+ styled control so background property reflects on search field.
+
+ Test: fast/forms/search/search-field-background-color.html
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::isControlStyled):Now search field is also
+ a styled control.
+
2013-10-14 Ryosuke Niwa <[email protected]>
EventPath::updateTouchLists traverses through EventPath thrice
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (157442 => 157443)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2013-10-15 05:06:10 UTC (rev 157442)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2013-10-15 05:55:40 UTC (rev 157443)
@@ -668,8 +668,7 @@
case ContinuousCapacityLevelIndicatorPart:
case DiscreteCapacityLevelIndicatorPart:
case RatingLevelIndicatorPart:
- // FIXME: Uncomment this when making search fields style-able.
- // case SearchFieldPart:
+ case SearchFieldPart:
case TextFieldPart:
case TextAreaPart:
// Test the style to see if the UA border and background match.