Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Nov 2016 02:27:55 +0000 (02:27 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Nov 2016 02:27:55 +0000 (02:27 +0000)
commitc730db92ac424fcf4c4413348648148c8077cf53
treea12c2b9c5f4bd64ff49fa3719b27c0363d0a0c73
parent7a8d0891f730d09269f5c19c2829752e8049e60c
Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
https://bugs.webkit.org/show_bug.cgi?id=164992

Reviewed by Darin Adler.
Source/WebCore:

std::chrono::milliseconds -> Seconds.

Rename Document::elapsedTime() to timeSinceDocumentCreation() which is more explicit.

Replace INSTRUMENT_LAYOUT_SCHEDULING with LOG(Layout...).

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::implicitClose):
(WebCore::Document::isLayoutTimerActive):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::timeSinceDocumentCreation):
(WebCore::Document::elapsedTime): Deleted.
* dom/Document.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::unscheduleRelayout):
* page/Settings.cpp:
(WebCore::Settings::setLayoutInterval):
* page/Settings.h:
(WebCore::Settings::layoutInterval):
* style/StyleScope.cpp:
(WebCore::Style::Scope::removePendingSheet):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):

Source/WebKit2:

No more ugly conversion from seconds to milliseconds.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::eventThrottlingDelay):

Source/WTF:

Add Seconds::zero() as a nicer way to express Seconds(0).

* wtf/Seconds.h:
(WTF::Seconds::zero):

Tools:

Use Seconds::zero().

* TestWebKitAPI/Tests/WTF/Condition.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/JavaScriptCore/runtime/AtomicsObject.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/AutomaticThread.cpp
Source/WTF/wtf/Seconds.h
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/style/StyleScope.cpp
Source/WebCore/workers/WorkerRunLoop.cpp
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ChildProcessProxy.h
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/Condition.cpp