Title: [122543] trunk/Source/WebCore
Revision
122543
Author
[email protected]
Date
2012-07-12 22:49:53 -0700 (Thu, 12 Jul 2012)

Log Message

REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
https://bugs.webkit.org/show_bug.cgi?id=91062

Reviewed by Kent Tamura.

This patch changes value of StepRange::acceptableError to zero for
integer restricted step value.

No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.

* html/StepRange.cpp:
(WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122542 => 122543)


--- trunk/Source/WebCore/ChangeLog	2012-07-13 05:39:31 UTC (rev 122542)
+++ trunk/Source/WebCore/ChangeLog	2012-07-13 05:49:53 UTC (rev 122543)
@@ -1,3 +1,18 @@
+2012-07-12  Yoshifumi Inoue  <[email protected]>
+
+        REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
+        https://bugs.webkit.org/show_bug.cgi?id=91062
+
+        Reviewed by Kent Tamura.
+
+        This patch changes value of StepRange::acceptableError to zero for
+        integer restricted step value.
+
+        No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
+
+        * html/StepRange.cpp:
+        (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
+
 2012-07-12  Dan Bernstein  <[email protected]>
 
         Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not

Modified: trunk/Source/WebCore/html/StepRange.cpp (122542 => 122543)


--- trunk/Source/WebCore/html/StepRange.cpp	2012-07-13 05:39:31 UTC (rev 122542)
+++ trunk/Source/WebCore/html/StepRange.cpp	2012-07-13 05:49:53 UTC (rev 122543)
@@ -69,7 +69,7 @@
 {
     // FIXME: We should use DBL_MANT_DIG instead of FLT_MANT_DIG regarding to HTML5 specification.
     DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfFloatMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << FLT_MANT_DIG));
-    return m_step / twoPowerOfFloatMantissaBits;
+    return m_stepDescription.stepValueShouldBe == StepValueShouldBeReal ? m_step / twoPowerOfFloatMantissaBits : Decimal(0);
 }
 
 Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to