<https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 06:35:44 +0000 (06:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 06:35:44 +0000 (06:35 +0000)
Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-08-19
Reviewed by Darin Adler.

Resolving code error.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::defaultValueForStepUp):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::defaultValueForStepUp):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154315 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/html/MonthInputType.cpp
Source/WebCore/html/TimeInputType.cpp

index ea6f7a82450093ea108aed786a5927aed902209d..ba215862c93937f4adad79390baf7d3476929d14 100644 (file)
@@ -1,3 +1,18 @@
+2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
+
+        <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
+
+        Reviewed by Darin Adler.
+
+        Resolving code error.
+
+        * html/BaseDateAndTimeInputType.cpp:
+        (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
+        * html/MonthInputType.cpp:
+        (WebCore::MonthInputType::defaultValueForStepUp):
+        * html/TimeInputType.cpp:
+        (WebCore::TimeInputType::defaultValueForStepUp):
+
 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
 
         <https://webkit.org/b/120049> Delete code for Snow Leopard
index 5c8878f14cd5ca888de13e3778f9840523375b4e..f14fedfff612a52a94decd6bc405c887be12fa6b 100644 (file)
@@ -84,9 +84,7 @@ bool BaseDateAndTimeInputType::typeMismatch() const
 Decimal BaseDateAndTimeInputType::defaultValueForStepUp() const
 {
     double ms = currentTimeMS();
-    double utcOffset = calculateUTCOffset();
-    double dstOffset = calculateDSTOffset(ms, utcOffset);
-    int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
+    int offset = calculateLocalTimeOffset(ms).offset / msPerMinute;
     return Decimal::fromDouble(ms + (offset * msPerMinute));
 }
 
index acaa329df650cb90ac0a795ec97a1b99c1b22f2b..a42e15533f484b817ffd18c69c0e62039f9a9926 100644 (file)
@@ -90,9 +90,7 @@ String MonthInputType::serializeWithMilliseconds(double value) const
 Decimal MonthInputType::defaultValueForStepUp() const
 {
     double current = currentTimeMS();
-    double utcOffset = calculateUTCOffset();
-    double dstOffset = calculateDSTOffset(current, utcOffset);
-    int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
+    int offset = calculateLocalTimeOffset(current).offset / msPerMinute;
     current += offset * msPerMinute;
 
     DateComponents date;
index 71db8ca109714dccd6fdd437c7cf11fd4d68e1fa..d75d51732974f0065fba26deba0c10fa8213f968 100644 (file)
@@ -77,9 +77,7 @@ DateComponents::Type TimeInputType::dateType() const
 Decimal TimeInputType::defaultValueForStepUp() const
 {
     double current = currentTimeMS();
-    double utcOffset = calculateUTCOffset();
-    double dstOffset = calculateDSTOffset(current, utcOffset);
-    int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
+    int offset = calculateLocalTimeOffset(current).offset / msPerMinute;
     current += offset * msPerMinute;
 
     DateComponents date;