<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208982] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208982">208982</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-11-26 18:27:55 -0800 (Sat, 26 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>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 -&gt; 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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreruntimeAtomicsObjectcpp">trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfAutomaticThreadcpp">trunk/Source/WTF/wtf/AutomaticThread.cpp</a></li>
<li><a href="#trunkSourceWTFwtfSecondsh">trunk/Source/WTF/wtf/Seconds.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingscpp">trunk/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsh">trunk/Source/WebCore/page/Settings.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleScopecpp">trunk/Source/WebCore/style/StyleScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerRunLoopcpp">trunk/Source/WebCore/workers/WorkerRunLoop.cpp</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessChildProcessProxyh">trunk/Source/WebKit2/UIProcess/ChildProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFConditioncpp">trunk/Tools/TestWebKitAPI/Tests/WTF/Condition.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreruntimeAtomicsObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">     // exec-&gt;argument(3) returns undefined if it's not provided and ToNumber(undefined) returns NaN,
</span><span class="cx">     // so NaN is the only special case.
</span><span class="cx">     if (timeout == timeout)
</span><del>-        timeout = std::max(Seconds(0), timeout);
</del><ins>+        timeout = std::max(0_s, timeout);
</ins><span class="cx">     else
</span><span class="cx">         timeout = Seconds::infinity();
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WTF/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        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.
+
+        Add Seconds::zero() as a nicer way to express Seconds(0). 
+
+        * wtf/Seconds.h:
+        (WTF::Seconds::zero):
+
+2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
</ins><span class="cx">         Add literals for various time units
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=165074
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtfAutomaticThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/AutomaticThread.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/AutomaticThread.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WTF/wtf/AutomaticThread.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">                         RELEASE_ASSERT(result == PollResult::Wait);
</span><span class="cx">                         // Shut the thread down after one second.
</span><span class="cx">                         bool awokenByNotify =
</span><del>-                            m_condition-&gt;m_condition.waitFor(*m_lock, Seconds(1));
</del><ins>+                            m_condition-&gt;m_condition.waitFor(*m_lock, 1_s);
</ins><span class="cx">                         if (!awokenByNotify) {
</span><span class="cx">                             if (verbose)
</span><span class="cx">                                 dataLog(RawPointer(this), &quot;: Going to sleep!\n&quot;);
</span></span></pre></div>
<a id="trunkSourceWTFwtfSecondsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Seconds.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Seconds.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WTF/wtf/Seconds.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -201,6 +201,8 @@
</span><span class="cx">     double m_value { 0 };
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+inline namespace seconds_literals {
+
</ins><span class="cx"> constexpr Seconds operator&quot;&quot; _min(long double minutes)
</span><span class="cx"> {
</span><span class="cx">     return Seconds::fromMinutes(minutes);
</span><span class="lines">@@ -251,10 +253,13 @@
</span><span class="cx">     return Seconds::fromNanoseconds(nanoseconds);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+} // inline seconds_literals
+
</ins><span class="cx"> WTF_EXPORT_PRIVATE void sleep(Seconds);
</span><span class="cx"> 
</span><del>-} // namespae WTF
</del><ins>+} // namespace WTF
</ins><span class="cx"> 
</span><ins>+using namespace WTF::seconds_literals;
</ins><span class="cx"> using WTF::Seconds;
</span><span class="cx"> 
</span><span class="cx"> #endif // WTF_Seconds_h
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -1,5 +1,43 @@
</span><span class="cx"> 2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        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.
+
+        std::chrono::milliseconds -&gt; 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):
+
+2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
</ins><span class="cx">         Composited negative z-index elements are hidden behind the body sometimes
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=165080
</span><span class="cx">         rdar://problem/22260229
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -468,7 +468,7 @@
</span><span class="cx">     , m_cssTarget(nullptr)
</span><span class="cx">     , m_processingLoadEvent(false)
</span><span class="cx">     , m_loadEventFinished(false)
</span><del>-    , m_startTime(std::chrono::steady_clock::now())
</del><ins>+    , m_documentCreationTime(MonotonicTime::now())
</ins><span class="cx">     , m_overMinimumLayoutThreshold(false)
</span><span class="cx">     , m_scriptRunner(std::make_unique&lt;ScriptRunner&gt;(*this))
</span><span class="cx">     , m_moduleLoader(std::make_unique&lt;ScriptModuleLoader&gt;(*this))
</span><span class="lines">@@ -2696,7 +2696,7 @@
</span><span class="cx">     // fires. This will improve onload scores, and other browsers do it.
</span><span class="cx">     // If they wanna cheat, we can too. -dwh
</span><span class="cx"> 
</span><del>-    if (frame()-&gt;navigationScheduler().locationChangePending() &amp;&amp; elapsedTime() &lt; settings()-&gt;layoutInterval()) {
</del><ins>+    if (frame()-&gt;navigationScheduler().locationChangePending() &amp;&amp; timeSinceDocumentCreation() &lt; settings()-&gt;layoutInterval()) {
</ins><span class="cx">         // Just bail out. Before or during the onload we were shifted to another page.
</span><span class="cx">         // The old i-Bench suite does this. When this happens don't bother painting or laying out.        
</span><span class="cx">         m_processingLoadEvent = false;
</span><span class="lines">@@ -2770,26 +2770,24 @@
</span><span class="cx">     
</span><span class="cx"> bool Document::isLayoutTimerActive()
</span><span class="cx"> {
</span><del>-    return view() &amp;&amp; view()-&gt;layoutPending() &amp;&amp; !minimumLayoutDelay().count();
</del><ins>+    return view() &amp;&amp; view()-&gt;layoutPending() &amp;&amp; !minimumLayoutDelay();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::chrono::milliseconds Document::minimumLayoutDelay()
</del><ins>+Seconds Document::minimumLayoutDelay()
</ins><span class="cx"> {
</span><span class="cx">     if (m_overMinimumLayoutThreshold)
</span><del>-        return 0ms;
</del><ins>+        return 0_s;
</ins><span class="cx">     
</span><del>-    auto elapsed = elapsedTime();
</del><ins>+    auto elapsed = timeSinceDocumentCreation();
</ins><span class="cx">     m_overMinimumLayoutThreshold = elapsed &gt; settings()-&gt;layoutInterval();
</span><span class="cx"> 
</span><span class="cx">     // We'll want to schedule the timer to fire at the minimum layout threshold.
</span><del>-    return std::max(0ms, settings()-&gt;layoutInterval() - elapsed);
</del><ins>+    return std::max(0_s, settings()-&gt;layoutInterval() - elapsed);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::chrono::milliseconds Document::elapsedTime() const
</del><ins>+Seconds Document::timeSinceDocumentCreation() const
</ins><span class="cx"> {
</span><del>-    auto elapsedTime = std::chrono::steady_clock::now() - m_startTime;
-
-    return std::chrono::duration_cast&lt;std::chrono::milliseconds&gt;(elapsedTime);
</del><ins>+    return MonotonicTime::now() - m_documentCreationTime;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::write(const SegmentedString&amp; text, Document* ownerDocument)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/dom/Document.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -671,11 +671,11 @@
</span><span class="cx">     void setReadyState(ReadyState);
</span><span class="cx">     void setParsing(bool);
</span><span class="cx">     bool parsing() const { return m_bParsing; }
</span><del>-    std::chrono::milliseconds minimumLayoutDelay();
</del><ins>+    Seconds minimumLayoutDelay();
</ins><span class="cx"> 
</span><span class="cx">     bool shouldScheduleLayout();
</span><span class="cx">     bool isLayoutTimerActive();
</span><del>-    std::chrono::milliseconds elapsedTime() const;
</del><ins>+    Seconds timeSinceDocumentCreation() const;
</ins><span class="cx">     
</span><span class="cx">     void setTextColor(const Color&amp; color) { m_textColor = color; }
</span><span class="cx">     const Color&amp; textColor() const { return m_textColor; }
</span><span class="lines">@@ -1527,7 +1527,7 @@
</span><span class="cx">     bool m_loadEventFinished;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SerializedScriptValue&gt; m_pendingStateObject;
</span><del>-    std::chrono::steady_clock::time_point m_startTime;
</del><ins>+    MonotonicTime m_documentCreationTime;
</ins><span class="cx">     bool m_overMinimumLayoutThreshold;
</span><span class="cx">     
</span><span class="cx">     std::unique_ptr&lt;ScriptRunner&gt; m_scriptRunner;
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/page/ChromeClient.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx">     virtual void didPreventDefaultForEvent() = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    virtual Seconds eventThrottlingDelay() { return Seconds(0); };
</del><ins>+    virtual Seconds eventThrottlingDelay() { return 0_s; };
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     virtual void didReceiveMobileDocType(bool) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -1398,9 +1398,9 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
</del><ins>+#if !LOG_DISABLED
</ins><span class="cx">             if (m_firstLayout &amp;&amp; !frame().ownerElement())
</span><del>-                printf(&quot;Elapsed time before first layout: %lld\n&quot;, document.elapsedTime().count());
</del><ins>+                LOG(Layout, &quot;FrameView %p elapsed time before first layout: %.3fs\n&quot;, this, document.timeSinceDocumentCreation().value());
</ins><span class="cx"> #endif
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2437,9 +2437,9 @@
</span><span class="cx"> void FrameView::scrollPositionChanged(const ScrollPosition&amp; oldPosition, const ScrollPosition&amp; newPosition)
</span><span class="cx"> {
</span><span class="cx">     Page* page = frame().page();
</span><del>-    Seconds throttlingDelay = page ? page-&gt;chrome().client().eventThrottlingDelay() : Seconds(0);
</del><ins>+    Seconds throttlingDelay = page ? page-&gt;chrome().client().eventThrottlingDelay() : 0_s;
</ins><span class="cx"> 
</span><del>-    if (throttlingDelay == Seconds(0)) {
</del><ins>+    if (throttlingDelay == 0_s) {
</ins><span class="cx">         m_delayedScrollEventTimer.stop();
</span><span class="cx">         sendScrollEvent();
</span><span class="cx">     } else if (!m_delayedScrollEventTimer.isActive())
</span><span class="lines">@@ -2874,9 +2874,9 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::layoutTimerFired()
</span><span class="cx"> {
</span><del>-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
</del><ins>+#if !LOG_DISABLED
</ins><span class="cx">     if (!frame().document()-&gt;ownerElement())
</span><del>-        printf(&quot;Layout timer fired at %lld\n&quot;, frame().document()-&gt;elapsedTime().count());
</del><ins>+        LOG(Layout, &quot;FrameView %p layout timer fired at %.3fs&quot;, this, frame().document()-&gt;timeSinceDocumentCreation().value());
</ins><span class="cx"> #endif
</span><span class="cx">     layout();
</span><span class="cx"> }
</span><span class="lines">@@ -2901,17 +2901,18 @@
</span><span class="cx">     if (frame().ownerRenderer() &amp;&amp; isInChildFrameWithFrameFlattening())
</span><span class="cx">         frame().ownerRenderer()-&gt;setNeedsLayout(MarkContainingBlockChain);
</span><span class="cx"> 
</span><del>-    std::chrono::milliseconds delay = frame().document()-&gt;minimumLayoutDelay();
-    if (m_layoutTimer.isActive() &amp;&amp; m_delayedLayout &amp;&amp; !delay.count())
</del><ins>+    Seconds delay = frame().document()-&gt;minimumLayoutDelay();
+    if (m_layoutTimer.isActive() &amp;&amp; m_delayedLayout &amp;&amp; !delay)
</ins><span class="cx">         unscheduleRelayout();
</span><ins>+
</ins><span class="cx">     if (m_layoutTimer.isActive())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_delayedLayout = delay.count();
</del><ins>+    m_delayedLayout = delay.value();
</ins><span class="cx"> 
</span><del>-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
</del><ins>+#if !LOG_DISABLED
</ins><span class="cx">     if (!frame().document()-&gt;ownerElement())
</span><del>-        printf(&quot;Scheduling layout for %d\n&quot;, delay);
</del><ins>+        LOG(Layout, &quot;FrameView %p scheduling layout for %.3fs&quot;, this, delay.value());
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     m_layoutTimer.startOneShot(delay);
</span><span class="lines">@@ -2944,11 +2945,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!layoutPending() &amp;&amp; m_layoutSchedulingEnabled) {
</span><del>-        std::chrono::milliseconds delay = renderView.document().minimumLayoutDelay();
</del><ins>+        Seconds delay = renderView.document().minimumLayoutDelay();
</ins><span class="cx">         ASSERT(!newRelayoutRoot.container() || is&lt;RenderView&gt;(newRelayoutRoot.container()) || !newRelayoutRoot.container()-&gt;needsLayout());
</span><span class="cx">         m_layoutRoot = &amp;newRelayoutRoot;
</span><span class="cx">         InspectorInstrumentation::didInvalidateLayout(frame());
</span><del>-        m_delayedLayout = delay.count();
</del><ins>+        m_delayedLayout = delay.value();
</ins><span class="cx">         m_layoutTimer.startOneShot(delay);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -3041,9 +3042,9 @@
</span><span class="cx">     if (!m_layoutTimer.isActive())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
</del><ins>+#if !LOG_DISABLED
</ins><span class="cx">     if (!frame().document()-&gt;ownerElement())
</span><del>-        printf(&quot;Layout timer unscheduled at %d\n&quot;, frame().document()-&gt;elapsedTime());
</del><ins>+        LOG(Layout, &quot;FrameView %p layout timer unscheduled at %.3fs&quot;, this, frame().document()-&gt;timeSinceDocumentCreation().value());
</ins><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx">     m_layoutTimer.stop();
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/page/Settings.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx"> // This amount of time must have elapsed before we will even consider scheduling a layout without a delay.
</span><span class="cx"> // FIXME: For faster machines this value can really be lowered to 200. 250 is adequate, but a little high
</span><span class="cx"> // for dual G5s. :)
</span><del>-static const auto layoutScheduleThreshold = 250ms;
</del><ins>+static const Seconds layoutScheduleThreshold = 250_ms;
</ins><span class="cx"> 
</span><span class="cx"> Settings::Settings(Page* page)
</span><span class="cx">     : m_page(nullptr)
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Settings::setLayoutInterval(std::chrono::milliseconds layoutInterval)
</del><ins>+void Settings::setLayoutInterval(Seconds layoutInterval)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: It seems weird that this function may disregard the specified layout interval.
</span><span class="cx">     // We should either expose layoutScheduleThreshold or better communicate this invariant.
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/page/Settings.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -172,8 +172,8 @@
</span><span class="cx">     WEBCORE_EXPORT void setMinimumDOMTimerInterval(std::chrono::milliseconds); // Initialized to DOMTimer::defaultMinimumInterval().
</span><span class="cx">     std::chrono::milliseconds minimumDOMTimerInterval() const { return m_minimumDOMTimerInterval; }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void setLayoutInterval(std::chrono::milliseconds);
-    std::chrono::milliseconds layoutInterval() const { return m_layoutInterval; }
</del><ins>+    WEBCORE_EXPORT void setLayoutInterval(Seconds);
+    Seconds layoutInterval() const { return m_layoutInterval; }
</ins><span class="cx"> 
</span><span class="cx">     bool hiddenPageDOMTimerThrottlingEnabled() const { return m_hiddenPageDOMTimerThrottlingEnabled; }
</span><span class="cx">     WEBCORE_EXPORT void setHiddenPageDOMTimerThrottlingEnabled(bool);
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx">     URL m_userStyleSheetLocation;
</span><span class="cx">     const std::unique_ptr&lt;FontGenericFamilies&gt; m_fontGenericFamilies;
</span><span class="cx">     SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy;
</span><del>-    std::chrono::milliseconds m_layoutInterval;
</del><ins>+    Seconds m_layoutInterval;
</ins><span class="cx">     std::chrono::milliseconds m_minimumDOMTimerInterval;
</span><span class="cx"> 
</span><span class="cx">     SETTINGS_MEMBER_VARIABLES
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleScope.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleScope.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/style/StyleScope.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -149,12 +149,6 @@
</span><span class="cx">     ASSERT(m_pendingStyleSheetCount &gt; 0);
</span><span class="cx"> 
</span><span class="cx">     m_pendingStyleSheetCount--;
</span><del>-    
-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
-    if (!ownerElement())
-        printf(&quot;Stylesheet loaded at time %d. %d stylesheets still remain.\n&quot;, elapsedTime(), m_pendingStylesheets);
-#endif
-
</del><span class="cx">     if (m_pendingStyleSheetCount)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerRunLoopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerRunLoop.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerRunLoop.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -163,8 +163,7 @@
</span><span class="cx"> #if USE(CF)
</span><span class="cx">     CFAbsoluteTime nextCFRunLoopTimerFireDate = CFRunLoopGetNextTimerFireDate(CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
</span><span class="cx">     double timeUntilNextCFRunLoopTimerInSeconds = nextCFRunLoopTimerFireDate - CFAbsoluteTimeGetCurrent();
</span><del>-    deadline = WallTime::now() + std::max(
-        Seconds(0), Seconds(timeUntilNextCFRunLoopTimerInSeconds));
</del><ins>+    deadline = WallTime::now() + std::max(0_s, Seconds(timeUntilNextCFRunLoopTimerInSeconds));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WallTime absoluteTime;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -339,8 +339,8 @@
</span><span class="cx"> - (BOOL)_alwaysRequestGeolocationPermission;
</span><span class="cx"> - (void)_setAlwaysUseAcceleratedOverflowScroll:(BOOL)flag;
</span><span class="cx"> - (BOOL)_alwaysUseAcceleratedOverflowScroll;
</span><del>-- (void)_setLayoutInterval:(int)l;
-- (int)_layoutInterval;
</del><ins>+- (void)_setLayoutInterval:(int)milliseconds;
+- (int)_layoutInterval; // Milliseonds.
</ins><span class="cx"> - (void)_setMaxParseDuration:(float)d;
</span><span class="cx"> - (float)_maxParseDuration;
</span><span class="cx"> - (void)_setInterpolationQuality:(int)quality;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -2736,7 +2736,7 @@
</span><span class="cx">     settings.setStandalone([preferences _standalone]);
</span><span class="cx">     settings.setTelephoneNumberParsingEnabled([preferences _telephoneNumberParsingEnabled]);
</span><span class="cx">     settings.setAllowMultiElementImplicitSubmission([preferences _allowMultiElementImplicitFormSubmission]);
</span><del>-    settings.setLayoutInterval(std::chrono::milliseconds([preferences _layoutInterval]));
</del><ins>+    settings.setLayoutInterval(Seconds::fromMilliseconds([preferences _layoutInterval]));
</ins><span class="cx">     settings.setMaxParseDuration([preferences _maxParseDuration]);
</span><span class="cx">     settings.setAlwaysUseAcceleratedOverflowScroll([preferences _alwaysUseAcceleratedOverflowScroll]);
</span><span class="cx">     settings.setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        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.
+        
+        No more ugly conversion from seconds to milliseconds.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::eventThrottlingDelay):
+
</ins><span class="cx"> 2016-11-25  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Follow-up fixes to r208974
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessChildProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ChildProcessProxy.h (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ChildProcessProxy.h        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/UIProcess/ChildProcessProxy.h        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     void terminate();
</span><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt; bool send(T&amp;&amp; message, uint64_t destinationID, OptionSet&lt;IPC::SendOption&gt; sendOptions = { });
</span><del>-    template&lt;typename T&gt; bool sendSync(T&amp;&amp; message, typename T::Reply&amp;&amp;, uint64_t destinationID, Seconds timeout = Seconds(1), OptionSet&lt;IPC::SendSyncOption&gt; sendSyncOptions = { });
</del><ins>+    template&lt;typename T&gt; bool sendSync(T&amp;&amp; message, typename T::Reply&amp;&amp;, uint64_t destinationID, Seconds timeout = 1_s, OptionSet&lt;IPC::SendSyncOption&gt; sendSyncOptions = { });
</ins><span class="cx"> 
</span><span class="cx">     IPC::Connection* connection() const
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     bool handled = false;
</span><del>-    sendSync(Messages::NetworkProcess::ProcessWillSuspendImminently(), Messages::NetworkProcess::ProcessWillSuspendImminently::Reply(handled), 0, Seconds(1));
</del><ins>+    sendSync(Messages::NetworkProcess::ProcessWillSuspendImminently(), Messages::NetworkProcess::ProcessWillSuspendImminently::Reply(handled), 0, 1_s);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void NetworkProcessProxy::sendPrepareToSuspend()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -900,7 +900,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     bool handled = false;
</span><del>-    sendSync(Messages::WebProcess::ProcessWillSuspendImminently(), Messages::WebProcess::ProcessWillSuspendImminently::Reply(handled), 0, Seconds(1));
</del><ins>+    sendSync(Messages::WebProcess::ProcessWillSuspendImminently(), Messages::WebProcess::ProcessWillSuspendImminently::Reply(handled), 0, 1_s);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::sendPrepareToSuspend()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -313,7 +313,7 @@
</span><span class="cx">         double newScale;
</span><span class="cx">         FloatPoint newScrollPosition;
</span><span class="cx">         uint64_t nextValidLayerTreeTransactionID;
</span><del>-        if (m_process-&gt;sendSync(Messages::WebPage::SynchronizeDynamicViewportUpdate(), Messages::WebPage::SynchronizeDynamicViewportUpdate::Reply(newScale, newScrollPosition, nextValidLayerTreeTransactionID), m_pageID, Seconds(2))) {
</del><ins>+        if (m_process-&gt;sendSync(Messages::WebPage::SynchronizeDynamicViewportUpdate(), Messages::WebPage::SynchronizeDynamicViewportUpdate::Reply(newScale, newScrollPosition, nextValidLayerTreeTransactionID), m_pageID, 2_s)) {
</ins><span class="cx">             m_dynamicViewportSizeUpdateWaitingForTarget = false;
</span><span class="cx">             m_dynamicViewportSizeUpdateLayerTreeTransactionID = nextValidLayerTreeTransactionID;
</span><span class="cx">             m_pageClient.dynamicViewportUpdateChangedTarget(newScale, newScrollPosition, nextValidLayerTreeTransactionID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -3112,7 +3112,7 @@
</span><span class="cx">     settings.setPasswordEchoEnabled(store.getBoolValueForKey(WebPreferencesKey::passwordEchoEnabledKey()));
</span><span class="cx">     settings.setPasswordEchoDurationInSeconds(store.getDoubleValueForKey(WebPreferencesKey::passwordEchoDurationKey()));
</span><span class="cx">     
</span><del>-    settings.setLayoutInterval(std::chrono::duration_cast&lt;std::chrono::milliseconds&gt;(std::chrono::duration&lt;double&gt;(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey()))));
</del><ins>+    settings.setLayoutInterval(Seconds(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey())));
</ins><span class="cx">     settings.setMaxParseDuration(store.getDoubleValueForKey(WebPreferencesKey::maxParseDurationKey()));
</span><span class="cx"> 
</span><span class="cx">     settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -2128,16 +2128,16 @@
</span><span class="cx">     if (behaviorOverride) {
</span><span class="cx">         switch (behaviorOverride.value()) {
</span><span class="cx">         case EventThrottlingBehavior::Responsive:
</span><del>-            return Seconds(0);
</del><ins>+            return 0_s;
</ins><span class="cx">         case EventThrottlingBehavior::Unresponsive:
</span><del>-            return Seconds(1);
</del><ins>+            return 1_s;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_isInStableState || m_estimatedLatency &lt;= Seconds(1.0 / 60))
</span><del>-        return Seconds(0);
</del><ins>+        return 0_s;
</ins><span class="cx"> 
</span><del>-    return Seconds(std::min&lt;double&gt;(m_estimatedLatency.value() * 2, 1));
</del><ins>+    return std::min(m_estimatedLatency.value() * 2, 1_s);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::syncApplyAutocorrection(const String&amp; correction, const String&amp; originalText, bool&amp; correctionApplied)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Tools/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        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.
+        
+        Use Seconds::zero().
+
+        * TestWebKitAPI/Tests/WTF/Condition.cpp:
+
+2016-11-26  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
</ins><span class="cx">         Add literals for various time units
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=165074
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFConditioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/Condition.cpp (208981 => 208982)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/Condition.cpp        2016-11-27 02:06:59 UTC (rev 208981)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Condition.cpp        2016-11-27 02:27:55 UTC (rev 208982)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">     unsigned numMessagesPerProducer,
</span><span class="cx">     NotifyStyle notifyStyle,
</span><span class="cx">     Seconds timeout = Seconds::infinity(),
</span><del>-    Seconds delay = Seconds(0))
</del><ins>+    Seconds delay = 0_s)
</ins><span class="cx"> {
</span><span class="cx">     Deque&lt;unsigned&gt; queue;
</span><span class="cx">     bool shouldContinue = true;
</span></span></pre>
</div>
</div>

</body>
</html>