@@ -1398,9 +1398,9 @@ void FrameView::layout(bool allowSubtree)
1398
1398
}
1399
1399
}
1400
1400
1401
- #ifdef INSTRUMENT_LAYOUT_SCHEDULING
1401
+ #if !LOG_DISABLED
1402
1402
if (m_firstLayout && !frame ().ownerElement ())
1403
- printf ( " Elapsed time before first layout: %lld \n " , document.elapsedTime ().count ());
1403
+ LOG (Layout, " FrameView %p elapsed time before first layout: %.3fs \n " , this , document.timeSinceDocumentCreation ().value ());
1404
1404
#endif
1405
1405
}
1406
1406
@@ -2437,9 +2437,9 @@ void FrameView::scrollOffsetChangedViaPlatformWidgetImpl(const ScrollOffset& old
2437
2437
void FrameView::scrollPositionChanged (const ScrollPosition& oldPosition, const ScrollPosition& newPosition)
2438
2438
{
2439
2439
Page* page = frame ().page ();
2440
- Seconds throttlingDelay = page ? page->chrome ().client ().eventThrottlingDelay () : Seconds ( 0 ) ;
2440
+ Seconds throttlingDelay = page ? page->chrome ().client ().eventThrottlingDelay () : 0_s ;
2441
2441
2442
- if (throttlingDelay == Seconds ( 0 ) ) {
2442
+ if (throttlingDelay == 0_s ) {
2443
2443
m_delayedScrollEventTimer.stop ();
2444
2444
sendScrollEvent ();
2445
2445
} else if (!m_delayedScrollEventTimer.isActive ())
@@ -2874,9 +2874,9 @@ void FrameView::convertSubtreeLayoutToFullLayout()
2874
2874
2875
2875
void FrameView::layoutTimerFired ()
2876
2876
{
2877
- #ifdef INSTRUMENT_LAYOUT_SCHEDULING
2877
+ #if !LOG_DISABLED
2878
2878
if (!frame ().document ()->ownerElement ())
2879
- printf ( " Layout timer fired at %lld \n " , frame ().document ()->elapsedTime ().count ());
2879
+ LOG ( Layout, " FrameView %p layout timer fired at %.3fs " , this , frame ().document ()->timeSinceDocumentCreation ().value ());
2880
2880
#endif
2881
2881
layout ();
2882
2882
}
@@ -2901,17 +2901,18 @@ void FrameView::scheduleRelayout()
2901
2901
if (frame ().ownerRenderer () && isInChildFrameWithFrameFlattening ())
2902
2902
frame ().ownerRenderer ()->setNeedsLayout (MarkContainingBlockChain);
2903
2903
2904
- std::chrono::milliseconds delay = frame ().document ()->minimumLayoutDelay ();
2905
- if (m_layoutTimer.isActive () && m_delayedLayout && !delay. count () )
2904
+ Seconds delay = frame ().document ()->minimumLayoutDelay ();
2905
+ if (m_layoutTimer.isActive () && m_delayedLayout && !delay)
2906
2906
unscheduleRelayout ();
2907
+
2907
2908
if (m_layoutTimer.isActive ())
2908
2909
return ;
2909
2910
2910
- m_delayedLayout = delay.count ();
2911
+ m_delayedLayout = delay.value ();
2911
2912
2912
- #ifdef INSTRUMENT_LAYOUT_SCHEDULING
2913
+ #if !LOG_DISABLED
2913
2914
if (!frame ().document ()->ownerElement ())
2914
- printf ( " Scheduling layout for %d \n " , delay);
2915
+ LOG (Layout, " FrameView %p scheduling layout for %.3fs " , this , delay. value () );
2915
2916
#endif
2916
2917
2917
2918
m_layoutTimer.startOneShot (delay);
@@ -2944,11 +2945,11 @@ void FrameView::scheduleRelayoutOfSubtree(RenderElement& newRelayoutRoot)
2944
2945
}
2945
2946
2946
2947
if (!layoutPending () && m_layoutSchedulingEnabled) {
2947
- std::chrono::milliseconds delay = renderView.document ().minimumLayoutDelay ();
2948
+ Seconds delay = renderView.document ().minimumLayoutDelay ();
2948
2949
ASSERT (!newRelayoutRoot.container () || is<RenderView>(newRelayoutRoot.container ()) || !newRelayoutRoot.container ()->needsLayout ());
2949
2950
m_layoutRoot = &newRelayoutRoot;
2950
2951
InspectorInstrumentation::didInvalidateLayout (frame ());
2951
- m_delayedLayout = delay.count ();
2952
+ m_delayedLayout = delay.value ();
2952
2953
m_layoutTimer.startOneShot (delay);
2953
2954
return ;
2954
2955
}
@@ -3041,9 +3042,9 @@ void FrameView::unscheduleRelayout()
3041
3042
if (!m_layoutTimer.isActive ())
3042
3043
return ;
3043
3044
3044
- #ifdef INSTRUMENT_LAYOUT_SCHEDULING
3045
+ #if !LOG_DISABLED
3045
3046
if (!frame ().document ()->ownerElement ())
3046
- printf ( " Layout timer unscheduled at %d \n " , frame ().document ()->elapsedTime ());
3047
+ LOG ( Layout, " FrameView %p layout timer unscheduled at %.3fs " , this , frame ().document ()->timeSinceDocumentCreation (). value ());
3047
3048
#endif
3048
3049
3049
3050
m_layoutTimer.stop ();
0 commit comments