Title: [126728] trunk
- Revision
- 126728
- Author
- [email protected]
- Date
- 2012-08-26 23:52:43 -0700 (Sun, 26 Aug 2012)
Log Message
[Forms] Focus style of millisecond field in multiple fields time input UI is different from other fields
https://bugs.webkit.org/show_bug.cgi?id=95046
Reviewed by Kent Tamura.
Source/WebCore:
This patch fixes typo for input::-webkit-datetime-edit-millisecond-field:focus
selector to make all fields of multiple fields time input UI have same
style on focus.
Test: fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html
* css/html.css: Fix typo for selector input::-webkit-datetime-edit-millisecond-field:focus
LayoutTests:
This patch adds a new test for checking focus style of all fields in
multiple fields time input UI.
We check appearance of focus field in fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic.html
* fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (126727 => 126728)
--- trunk/LayoutTests/ChangeLog 2012-08-27 06:50:30 UTC (rev 126727)
+++ trunk/LayoutTests/ChangeLog 2012-08-27 06:52:43 UTC (rev 126728)
@@ -1,3 +1,18 @@
+2012-08-26 Yoshifumi Inoue <[email protected]>
+
+ [Forms] Focus style of millisecond field in multiple fields time input UI is different from other fields
+ https://bugs.webkit.org/show_bug.cgi?id=95046
+
+ Reviewed by Kent Tamura.
+
+ This patch adds a new test for checking focus style of all fields in
+ multiple fields time input UI.
+
+ We check appearance of focus field in fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic.html
+
+ * fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt: Added.
+ * fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html: Added.
+
2012-08-26 Mark Lam <[email protected]>
Skipping http/tests/security/local-user-CSS-from-remote.html to green mac WK2 bots.
Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt (0 => 126728)
--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt 2012-08-27 06:52:43 UTC (rev 126728)
@@ -0,0 +1,20 @@
+Check focus style for multiple fields time input UI
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS "-webkit-datetime-edit-hour-field"; style.backgroundColor is highlight
+PASS "-webkit-datetime-edit-hour-field"; style.color is highlighttext
+PASS "-webkit-datetime-edit-minute-field"; style.backgroundColor is highlight
+PASS "-webkit-datetime-edit-minute-field"; style.color is highlighttext
+PASS "-webkit-datetime-edit-second-field"; style.backgroundColor is highlight
+PASS "-webkit-datetime-edit-second-field"; style.color is highlighttext
+PASS "-webkit-datetime-edit-millisecond-field"; style.backgroundColor is highlight
+PASS "-webkit-datetime-edit-millisecond-field"; style.color is highlighttext
+PASS "-webkit-datetime-edit-ampm-field"; style.backgroundColor is highlight
+PASS "-webkit-datetime-edit-ampm-field"; style.color is highlighttext
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Please run this test within DumpRenderTree.
Property changes on: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html (0 => 126728)
--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html 2012-08-27 06:52:43 UTC (rev 126728)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+Please run this test within DumpRenderTree.
+<script>
+function keyDown(key, modifiers)
+{
+ if (!window.eventSender)
+ return;
+ eventSender.keyDown(key, modifiers);
+}
+description('Check focus style for multiple fields time input UI');
+var testInput = document.createElement("input");
+testInput.setAttribute("type", "time");
+testInput.setAttribute("step", "0.001");
+document.body.appendChild(testInput);
+
+var sample = document.createElement("span");
+sample.style.backgroundColor = "highlight";
+sample.style.color = "highlighttext";
+document.body.appendChild(sample);
+var sampleStyle = getComputedStyle(sample);
+var highlighttext = sampleStyle.color;
+var highlight = sampleStyle.backgroundColor;
+
+testInput.focus();
+var shadowRoot = internals.oldestShadowRoot(testInput);
+var fields = shadowRoot.firstChild.childNodes;
+for (var index = 0; index < fields.length; ++index) {
+ var field = fields[index];
+ if (field.nodeType != 1)
+ continue;
+ var id = internals.shadowPseudoId(field);
+ if (id.indexOf('-field') < 0)
+ continue;
+ var style = getComputedStyle(field);
+ shouldBe('"' + id + '"; style.backgroundColor', 'highlight');
+ shouldBe('"' + id + '"; style.color', 'highlighttext');
+ keyDown('rightArrow');
+}
+debug('');
+testInput.parentElement.removeChild(testInput);
+sample.parentElement.removeChild(sample);
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (126727 => 126728)
--- trunk/Source/WebCore/ChangeLog 2012-08-27 06:50:30 UTC (rev 126727)
+++ trunk/Source/WebCore/ChangeLog 2012-08-27 06:52:43 UTC (rev 126728)
@@ -1,3 +1,18 @@
+2012-08-26 Yoshifumi Inoue <[email protected]>
+
+ [Forms] Focus style of millisecond field in multiple fields time input UI is different from other fields
+ https://bugs.webkit.org/show_bug.cgi?id=95046
+
+ Reviewed by Kent Tamura.
+
+ This patch fixes typo for input::-webkit-datetime-edit-millisecond-field:focus
+ selector to make all fields of multiple fields time input UI have same
+ style on focus.
+
+ Test: fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html
+
+ * css/html.css: Fix typo for selector input::-webkit-datetime-edit-millisecond-field:focus
+
2012-08-26 Nico Weber <[email protected]>
Initialized m_hasNonEmptyList to fix a valgrind uninitialized read
Modified: trunk/Source/WebCore/css/html.css (126727 => 126728)
--- trunk/Source/WebCore/css/html.css 2012-08-27 06:50:30 UTC (rev 126727)
+++ trunk/Source/WebCore/css/html.css 2012-08-27 06:52:43 UTC (rev 126728)
@@ -533,7 +533,7 @@
/* Remove focus ring from fields and use highlight color */
input::-webkit-datetime-edit-ampm-field:focus,
input::-webkit-datetime-edit-hour-field:focus,
-input::-webkit-datetime-edit-millisecond-fiel:focus,
+input::-webkit-datetime-edit-millisecond-field:focus,
input::-webkit-datetime-edit-minute-field:focus,
input::-webkit-datetime-edit-second-field:focus {
background-color: highlight;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes