[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:36:31 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 78873c9b28a45d353db0458cf77995e3920d99c2
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 9 04:14:36 2010 +0000
2010-11-08 John Knottenbelt <jknotten at chromium.org>
Reviewed by Steve Block.
Convert to and from DOMTimeStamp with converter functions.
This is a refactoring only, covered by existing layout tests.
https://bugs.webkit.org/show_bug.cgi?id=49066
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMTimeStamp.h: Added.
(WebCore::convertSecondsToDOMTimeStamp):
(WebCore::convertDOMTimeStampToSeconds):
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/Event.h:
* page/Geolocation.cpp:
(WebCore::Geolocation::haveSuitableCachedPosition):
* platform/android/GeolocationServiceAndroid.cpp:
(WebCore::GeolocationServiceAndroid::isPositionMoreTimely):
2010-11-08 John Knottenbelt <jknotten at chromium.org>
Reviewed by Steve Block.
Convert to and from DOMTimeStamp with converter functions
https://bugs.webkit.org/show_bug.cgi?id=49066
* src/WebDataSourceImpl.cpp:
(WebKit::WebDataSourceImpl::triggeringEventTime):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 81d70fd..11c9b3f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-11-08 John Knottenbelt <jknotten at chromium.org>
+
+ Reviewed by Steve Block.
+
+ Convert to and from DOMTimeStamp with converter functions.
+ This is a refactoring only, covered by existing layout tests.
+ https://bugs.webkit.org/show_bug.cgi?id=49066
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/DOMTimeStamp.h: Added.
+ (WebCore::convertSecondsToDOMTimeStamp):
+ (WebCore::convertDOMTimeStampToSeconds):
+ * dom/Event.cpp:
+ (WebCore::Event::Event):
+ * dom/Event.h:
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::haveSuitableCachedPosition):
+ * platform/android/GeolocationServiceAndroid.cpp:
+ (WebCore::GeolocationServiceAndroid::isPositionMoreTimely):
+
2010-11-08 Ryosuke Niwa <rniwa at webkit.org>
Unreviewed build fix for Chromium Mac for r71590.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 53d2fb4..0b9af14 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1121,6 +1121,7 @@ webcore_sources += \
WebCore/dom/DOMStringList.h \
WebCore/dom/DOMStringMap.cpp \
WebCore/dom/DOMStringMap.h \
+ WebCore/dom/DOMTimeStamp.h \
WebCore/dom/DynamicNodeList.cpp \
WebCore/dom/DynamicNodeList.h \
WebCore/dom/EditingText.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 1b6fb51..f8fa624 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1157,6 +1157,7 @@
'dom/DOMStringList.h',
'dom/DOMStringMap.cpp',
'dom/DOMStringMap.h',
+ 'dom/DOMTimeStamp.h',
'dom/DatasetDOMStringMap.cpp',
'dom/DatasetDOMStringMap.h',
'dom/DecodedDataDocumentParser.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 459e4fb..7495be7 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1622,6 +1622,7 @@ HEADERS += \
dom/DOMImplementation.h \
dom/DOMStringList.h \
dom/DOMStringMap.h \
+ dom/DOMTimeStamp.h \
dom/DatasetDOMStringMap.h \
dom/DynamicNodeList.h \
dom/EditingText.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 868a5d6..9e487e9 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -41932,6 +41932,10 @@
>
</File>
<File
+ RelativePath="..\dom\DOMTimeStamp.h"
+ >
+ </File>
+ <File
RelativePath="..\dom\DynamicNodeList.cpp"
>
<FileConfiguration
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 61e9de3..403ba69 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -36,6 +36,7 @@
0014628A103CD1DE000B20DB /* OriginAccessEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00146288103CD1DE000B20DB /* OriginAccessEntry.cpp */; };
0014628B103CD1DE000B20DB /* OriginAccessEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 00146289103CD1DE000B20DB /* OriginAccessEntry.h */; };
003F1FEA11E6AB43008258D9 /* UserContentTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 003F1FE911E6AB43008258D9 /* UserContentTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */; settings = {ATTRIBUTES = (Private, ); }; };
06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */; };
062287840B4DB322000C34DF /* FocusDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 062287830B4DB322000C34DF /* FocusDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6079,6 +6080,7 @@
00146288103CD1DE000B20DB /* OriginAccessEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OriginAccessEntry.cpp; sourceTree = "<group>"; };
00146289103CD1DE000B20DB /* OriginAccessEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OriginAccessEntry.h; sourceTree = "<group>"; };
003F1FE911E6AB43008258D9 /* UserContentTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserContentTypes.h; sourceTree = "<group>"; };
+ 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMTimeStamp.h; sourceTree = "<group>"; };
06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContextMenuItem.h; sourceTree = "<group>"; };
06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ContextMenuItemMac.mm; sourceTree = "<group>"; };
062287830B4DB322000C34DF /* FocusDirection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FocusDirection.h; sourceTree = "<group>"; };
@@ -18221,6 +18223,7 @@
BC64640711D7F304006455B0 /* DOMStringMap.cpp */,
BC64640811D7F304006455B0 /* DOMStringMap.h */,
BC64647911D800CD006455B0 /* DOMStringMap.idl */,
+ 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */,
BC7FA61E0D1F0CBD00DB22A9 /* DynamicNodeList.cpp */,
BC7FA61F0D1F0CBD00DB22A9 /* DynamicNodeList.h */,
6550B699099DF0270090D781 /* EditingText.cpp */,
@@ -19500,6 +19503,7 @@
DDE63ED50B7D45A800226998 /* DOMTextEvent.h in Headers */,
85E711D90AC5D5350053270F /* DOMTextInternal.h in Headers */,
188604B40F2E654A000B6443 /* DOMTimer.h in Headers */,
+ 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */,
76FC2B0C12370DA0006A991A /* DOMTokenList.h in Headers */,
BC1A37BE097C715F0019F3D8 /* DOMTraversal.h in Headers */,
85526CD20AB0B7D9000302EA /* DOMTreeWalker.h in Headers */,
diff --git a/WebCore/dom/DOMTimeStamp.h b/WebCore/dom/DOMTimeStamp.h
new file mode 100644
index 0000000..ff61520
--- /dev/null
+++ b/WebCore/dom/DOMTimeStamp.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DOMTimeStamp_h
+#define DOMTimeStamp_h
+
+namespace WebCore {
+
+typedef unsigned long long DOMTimeStamp;
+
+inline DOMTimeStamp convertSecondsToDOMTimeStamp(double seconds)
+{
+ return static_cast<DOMTimeStamp>(seconds * 1000.0);
+}
+
+inline double convertDOMTimeStampToSeconds(DOMTimeStamp milliseconds)
+{
+ return milliseconds / 1000.0;
+}
+
+} // namespace WebCore
+
+#endif // DOMTimeStamp_h
diff --git a/WebCore/dom/Event.cpp b/WebCore/dom/Event.cpp
index 9293a9a..0515fe7 100644
--- a/WebCore/dom/Event.cpp
+++ b/WebCore/dom/Event.cpp
@@ -39,7 +39,7 @@ Event::Event()
, m_cancelBubble(false)
, m_eventPhase(0)
, m_currentTarget(0)
- , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
+ , m_createTime(convertSecondsToDOMTimeStamp(currentTime()))
{
}
@@ -54,7 +54,7 @@ Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
, m_cancelBubble(false)
, m_eventPhase(0)
, m_currentTarget(0)
- , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
+ , m_createTime(convertSecondsToDOMTimeStamp(currentTime()))
{
}
diff --git a/WebCore/dom/Event.h b/WebCore/dom/Event.h
index 82ac8ec..c8fd21e 100644
--- a/WebCore/dom/Event.h
+++ b/WebCore/dom/Event.h
@@ -24,6 +24,7 @@
#ifndef Event_h
#define Event_h
+#include "DOMTimeStamp.h"
#include "EventTarget.h"
#include <wtf/RefCounted.h>
#include <wtf/text/AtomicString.h>
@@ -32,9 +33,6 @@ namespace WebCore {
class Clipboard;
- // FIXME: this should probably defined elsewhere.
- typedef unsigned long long DOMTimeStamp;
-
class Event : public RefCounted<Event> {
public:
enum PhaseType {
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index d5277e0..bed8fb4 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -390,7 +390,7 @@ bool Geolocation::haveSuitableCachedPosition(PositionOptions* options)
return true;
if (!options->maximumAge())
return false;
- DOMTimeStamp currentTimeMillis = currentTime() * 1000.0;
+ DOMTimeStamp currentTimeMillis = convertSecondsToDOMTimeStamp(currentTime());
return m_positionCache->cachedPosition()->timestamp() > currentTimeMillis - options->maximumAge();
}
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index d44b3f0..b6dfe81 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -171,9 +171,9 @@ bool GeolocationServiceAndroid::isPositionMoreAccurate(Geoposition* position1, G
bool GeolocationServiceAndroid::isPositionMoreTimely(Geoposition* position1, Geoposition* position2)
{
ASSERT(position1 && position2);
- DOMTimeStamp currentTimeMillis = WTF::currentTime() * 1000.0;
- DOMTimeStamp maximumAgeMillis = 10 * 60 * 1000; // 10 minutes
- return currentTimeMillis - position1->timestamp() > maximumAgeMillis;
+ DOMTimeStamp currentTime = convertSecondsToDOMTimeStamp(WTF::currentTime());
+ DOMTimeStamp maximumAge = convertSecondsToDOMTimeStamp(10 * 60); // 10 minutes
+ return currentTime - position1->timestamp() > maximumAge;
}
} // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 5228533..f376626 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-08 John Knottenbelt <jknotten at chromium.org>
+
+ Reviewed by Steve Block.
+
+ Convert to and from DOMTimeStamp with converter functions
+ https://bugs.webkit.org/show_bug.cgi?id=49066
+
+ * src/WebDataSourceImpl.cpp:
+ (WebKit::WebDataSourceImpl::triggeringEventTime):
+
+
2010-11-08 Pierre-Antoine LaFayette <pierre.lafayette at gmail.com>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp
index d5b1d79..65147fa 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.cpp
+++ b/WebKit/chromium/src/WebDataSourceImpl.cpp
@@ -96,7 +96,7 @@ double WebDataSourceImpl::triggeringEventTime() const
return 0.0;
// DOMTimeStamp uses units of milliseconds.
- return triggeringAction().event()->timeStamp() / 1000.0;
+ return convertDOMTimeStampToSeconds(triggeringAction().event()->timeStamp());
}
WebDataSource::ExtraData* WebDataSourceImpl::extraData() const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list