Title: [156154] trunk/Source
- Revision
- 156154
- Author
- par...@webkit.org
- Date
- 2013-09-20 04:56:30 -0700 (Fri, 20 Sep 2013)
Log Message
Remove duplicated secondsPerDay variables
https://bugs.webkit.org/show_bug.cgi?id=121601
Reviewed by Andreas Kling.
Source/WebCore:
Use secondsPerDay from DateMath.h instead of defining it again.
* history/HistoryItem.cpp:
(WebCore::timeToDay):
Source/WebKit/win:
Use secondsPerDay from DateMath.h instead of defining it again.
* MarshallingHelpers.cpp:
Source/WTF:
Move secondsPerDay from the source into the header file
to make it accessible by other code too.
* wtf/DateMath.cpp:
* wtf/DateMath.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (156153 => 156154)
--- trunk/Source/WTF/ChangeLog 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WTF/ChangeLog 2013-09-20 11:56:30 UTC (rev 156154)
@@ -1,3 +1,16 @@
+2013-09-20 Patrick Gansterer <par...@webkit.org>
+
+ Remove duplicated secondsPerDay variables
+ https://bugs.webkit.org/show_bug.cgi?id=121601
+
+ Reviewed by Andreas Kling.
+
+ Move secondsPerDay from the source into the header file
+ to make it accessible by other code too.
+
+ * wtf/DateMath.cpp:
+ * wtf/DateMath.h:
+
2013-09-19 Joseph Pecoraro <pecor...@apple.com>
ASSERTs in isMainThread after USE(WEB_THREAD) MainThread changes
Modified: trunk/Source/WTF/wtf/DateMath.cpp (156153 => 156154)
--- trunk/Source/WTF/wtf/DateMath.cpp 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WTF/wtf/DateMath.cpp 2013-09-20 11:56:30 UTC (rev 156154)
@@ -114,7 +114,6 @@
/* Constants */
static const double minutesPerDay = 24.0 * 60.0;
-static const double secondsPerDay = 24.0 * 60.0 * 60.0;
static const double secondsPerYear = 24.0 * 60.0 * 60.0 * 365.0;
static const double usecPerSec = 1000000.0;
Modified: trunk/Source/WTF/wtf/DateMath.h (156153 => 156154)
--- trunk/Source/WTF/wtf/DateMath.h 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WTF/wtf/DateMath.h 2013-09-20 11:56:30 UTC (rev 156154)
@@ -103,13 +103,14 @@
const double hoursPerDay = 24.0;
const double minutesPerHour = 60.0;
-const double secondsPerHour = 60.0 * 60.0;
const double secondsPerMinute = 60.0;
const double msPerSecond = 1000.0;
-const double msPerMinute = 60.0 * 1000.0;
-const double msPerHour = 60.0 * 60.0 * 1000.0;
-const double msPerDay = 24.0 * 60.0 * 60.0 * 1000.0;
const double msPerMonth = 2592000000.0;
+const double secondsPerHour = secondsPerMinute * minutesPerHour;
+const double secondsPerDay = secondsPerHour * hoursPerDay;
+const double msPerMinute = msPerSecond * secondsPerMinute;
+const double msPerHour = msPerSecond * secondsPerHour;
+const double msPerDay = msPerSecond * secondsPerDay;
WTF_EXPORT_PRIVATE bool isLeapYear(int year);
@@ -143,6 +144,7 @@
using WTF::msToDays;
using WTF::msToMinutes;
using WTF::msToHours;
+using WTF::secondsPerDay;
using WTF::secondsPerMinute;
using WTF::parseDateFromNullTerminatedCharacters;
using WTF::makeRFC2822DateString;
Modified: trunk/Source/WebCore/ChangeLog (156153 => 156154)
--- trunk/Source/WebCore/ChangeLog 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WebCore/ChangeLog 2013-09-20 11:56:30 UTC (rev 156154)
@@ -1,5 +1,17 @@
2013-09-20 Patrick Gansterer <par...@webkit.org>
+ Remove duplicated secondsPerDay variables
+ https://bugs.webkit.org/show_bug.cgi?id=121601
+
+ Reviewed by Andreas Kling.
+
+ Use secondsPerDay from DateMath.h instead of defining it again.
+
+ * history/HistoryItem.cpp:
+ (WebCore::timeToDay):
+
+2013-09-20 Patrick Gansterer <par...@webkit.org>
+
Fix duplicated loop variable names after r155743
https://bugs.webkit.org/show_bug.cgi?id=121667
Modified: trunk/Source/WebCore/history/HistoryItem.cpp (156153 => 156154)
--- trunk/Source/WebCore/history/HistoryItem.cpp 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WebCore/history/HistoryItem.cpp 2013-09-20 11:56:30 UTC (rev 156154)
@@ -35,6 +35,7 @@
#include "SharedBuffer.h"
#include <stdio.h>
#include <wtf/CurrentTime.h>
+#include <wtf/DateMath.h>
#include <wtf/Decoder.h>
#include <wtf/Encoder.h>
#include <wtf/text/CString.h>
@@ -319,7 +320,6 @@
static inline int timeToDay(double time)
{
- static const double secondsPerDay = 60 * 60 * 24;
return static_cast<int>(ceil(time / secondsPerDay));
}
Modified: trunk/Source/WebKit/win/ChangeLog (156153 => 156154)
--- trunk/Source/WebKit/win/ChangeLog 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WebKit/win/ChangeLog 2013-09-20 11:56:30 UTC (rev 156154)
@@ -1,3 +1,14 @@
+2013-09-20 Patrick Gansterer <par...@webkit.org>
+
+ Remove duplicated secondsPerDay variables
+ https://bugs.webkit.org/show_bug.cgi?id=121601
+
+ Reviewed by Andreas Kling.
+
+ Use secondsPerDay from DateMath.h instead of defining it again.
+
+ * MarshallingHelpers.cpp:
+
2013-09-20 Csaba Osztrogonác <o...@webkit.org>
Add covariant RenderElement* Element::renderer()
Modified: trunk/Source/WebKit/win/MarshallingHelpers.cpp (156153 => 156154)
--- trunk/Source/WebKit/win/MarshallingHelpers.cpp 2013-09-20 11:54:46 UTC (rev 156153)
+++ trunk/Source/WebKit/win/MarshallingHelpers.cpp 2013-09-20 11:56:30 UTC (rev 156154)
@@ -30,13 +30,12 @@
#include <WebCore/BString.h>
#include <WebCore/IntRect.h>
#include <WebCore/KURL.h>
+#include <wtf/DateMath.h>
#include <wtf/MathExtras.h>
#include <wtf/text/WTFString.h>
using namespace WebCore;
-static const double secondsPerDay = 60 * 60 * 24;
-
CFArrayCallBacks MarshallingHelpers::kIUnknownArrayCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
CFDictionaryValueCallBacks MarshallingHelpers::kIUnknownDictionaryValueCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes