<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2013 19:33:59 +0000 (19:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2013 19:33:59 +0000 (19:33 +0000)
commitc5fb67bd2eb9177f59d4576c43ae98fa5a092a27
treecf42c35f3a5bfd4b45636b2571aad2e267535786
parente8b5b887c551aa08f00422ebb41d5f97282c8701
<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore

Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.

* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::didWrite):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::elapsedTime):
(WebCore::Document::resetLastHandledUserGestureTimestamp):
* dom/Element.cpp:
(WebCore::Element::setActive):
* fileapi/FileReader.cpp:
(WebCore::FileReader::didReceiveData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::startProgressEventTimer):
(WebCore::HTMLMediaElement::progressEventTimerFired):
(WebCore::HTMLMediaElement::refreshCachedTime):
(WebCore::HTMLMediaElement::invalidateCachedTime):
(WebCore::HTMLMediaElement::currentTime):
(WebCore::HTMLMediaElement::startPlaybackProgressTimer):
(WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::documentHadRecentUserGesture):
* html/MediaController.cpp:
(MediaController::scheduleTimeupdateEvent):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::SelectorProfile):
(WebCore::SelectorProfile::totalMatchingTimeMs):
(WebCore::SelectorProfile::startSelector):
(WebCore::SelectorProfile::commitSelector):
(WebCore::SelectorProfile::commitSelectorTime):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::willProcessTask):
(WebCore::InspectorProfilerAgent::didProcessTask):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::timestamp):
* inspector/TimelineTraceEventProcessor.cpp:
(WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
* page/FrameView.cpp:
(WebCore::FrameView::adjustedDeferredRepaintDelay):
(WebCore::FrameView::paintContents):
* platform/ClockGeneric.cpp:
(ClockGeneric::now):
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::scroll):
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::flushContextIfNecessary):
(WebCore::ImageBuffer::flushContext):
(WebCore::ImageBuffer::copyNativeImage):

Source/WTF:

WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.

* wtf/CurrentTime.h:
(WTF::monotonicallyIncreasingTimeMS): Added mille second version of monotonic time API.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/CurrentTime.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/filesystem/FileWriter.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/fileapi/FileReader.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/parser/HTMLDocumentParser.cpp
Source/WebCore/html/parser/HTMLParserScheduler.h
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorProfilerAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/TimelineTraceEventProcessor.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/ClockGeneric.cpp
Source/WebCore/platform/ScrollAnimatorNone.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp