Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSTiming.cpp

Issue 2617103002: Use a new Supplement constructor for Supplement<Document> (Part 1) (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSTiming.h" 5 #include "core/css/CSSTiming.h"
6 6
7 #include "core/paint/PaintTiming.h" 7 #include "core/paint/PaintTiming.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 13 matching lines...) Expand all
24 if (!m_paintTiming->firstContentfulPaint()) 24 if (!m_paintTiming->firstContentfulPaint())
25 m_parseTimeBeforeFCP += seconds; 25 m_parseTimeBeforeFCP += seconds;
26 } 26 }
27 27
28 void CSSTiming::recordUpdateDuration(double seconds) { 28 void CSSTiming::recordUpdateDuration(double seconds) {
29 if (!m_paintTiming->firstContentfulPaint()) 29 if (!m_paintTiming->firstContentfulPaint())
30 m_updateTimeBeforeFCP += seconds; 30 m_updateTimeBeforeFCP += seconds;
31 } 31 }
32 32
33 DEFINE_TRACE(CSSTiming) { 33 DEFINE_TRACE(CSSTiming) {
34 visitor->trace(m_document);
35 visitor->trace(m_paintTiming); 34 visitor->trace(m_paintTiming);
36 Supplement<Document>::trace(visitor); 35 Supplement<Document>::trace(visitor);
37 } 36 }
38 37
39 CSSTiming::CSSTiming(Document& document) 38 CSSTiming::CSSTiming(Document& document)
40 : m_document(document), m_paintTiming(PaintTiming::from(document)) {} 39 : Supplement<Document>(document),
40 m_paintTiming(PaintTiming::from(document)) {}
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698