Title: [137100] branches/chromium/1312
Revision
137100
Author
[email protected]
Date
2012-12-09 17:11:17 -0800 (Sun, 09 Dec 2012)

Log Message

Merge 136803

> Source/WebCore: INPUT_MULTIPLE_FIELDS_UI: The hour, am/pm, millisecond fields should support read-only state correctly
> https://bugs.webkit.org/show_bug.cgi?id=104210
> 
> Reviewed by Kentaro Hara.
> 
> 1. The hour, am/pm, and millisecond fields should have CSS rules for
>    [readonly]. They should be gray when they are read-only.
> 2. The am/pm field should reject to set an empty value like other
>    numeric fields do.
> 
> Tests: Add test cases to fast/forms/time/time-appearance-basic.html.
> 
> * css/html.css: merge existing readonly rules, and add ampm, hour, and
> millisecond pseudo classes.
> * html/shadow/DateTimeSymbolicFieldElement.cpp:
> (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
> Reject to set empty value if it is read-only.
> 
> LayoutTests: INPUT_MULTIPLE_FIELDS_UI: The hour field and the am/pm field should support read-only state correctly
> https://bugs.webkit.org/show_bug.cgi?id=104210
> 
> Reviewed by Kentaro Hara.
> 
> * fast/forms/time/time-appearance-basic.html:
> Add test cases for step=86400 (24 hours)
> * platform/chromium-mac/fast/forms/time/time-appearance-basic-expected.png:
> * platform/chromium/TestExpectations:
> 

[email protected]
Review URL: https://codereview.chromium.org/11503003

Modified Paths

Diff

Modified: branches/chromium/1312/LayoutTests/platform/chromium/TestExpectations (137099 => 137100)


--- branches/chromium/1312/LayoutTests/platform/chromium/TestExpectations	2012-12-10 01:09:32 UTC (rev 137099)
+++ branches/chromium/1312/LayoutTests/platform/chromium/TestExpectations	2012-12-10 01:11:17 UTC (rev 137100)
@@ -2795,6 +2795,7 @@
 webkit.org/b/103350 fast/forms/month/month-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ]
 webkit.org/b/103350 fast/forms/time/time-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ]
 webkit.org/b/103350 fast/forms/week/week-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ]
+webkit.org/b/104210 fast/forms/time/time-appearance-basic.html [ Pass ImageOnlyFailure ]
 
 # New test added in r87324
 crbug.com/83994 [ Win ] platform/win/plugins/call-_javascript_-that-destroys-plugin.html [ Failure ]

Modified: branches/chromium/1312/Source/WebCore/css/html.css (137099 => 137100)


--- branches/chromium/1312/Source/WebCore/css/html.css	2012-12-10 01:09:32 UTC (rev 137099)
+++ branches/chromium/1312/Source/WebCore/css/html.css	2012-12-10 01:11:17 UTC (rev 137100)
@@ -571,12 +571,10 @@
     outline: none;
 }
 
-/* This selector is used when step >= 3600 second but format contains minute field. */
-input::-webkit-datetime-edit-minute-field[readonly] {
-    color: GrayText;
-}
-
-/* This selector is used when step >= 60 second but format contains second field. */
+input::-webkit-datetime-edit-ampm-field[readonly],
+input::-webkit-datetime-edit-hour-field[readonly],
+input::-webkit-datetime-edit-millisecond-field[readonly],
+input::-webkit-datetime-edit-minute-field[readonly],
 input::-webkit-datetime-edit-second-field[readonly] {
     color: GrayText;
 }

Modified: branches/chromium/1312/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp (137099 => 137100)


--- branches/chromium/1312/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp	2012-12-10 01:09:32 UTC (rev 137099)
+++ branches/chromium/1312/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp	2012-12-10 01:11:17 UTC (rev 137100)
@@ -107,6 +107,8 @@
 
 void DateTimeSymbolicFieldElement::setEmptyValue(EventBehavior eventBehavior)
 {
+    if (isReadOnly())
+        return;
     m_selectedIndex = invalidIndex;
     updateVisibleValue(eventBehavior);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to