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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "DocumentStatisticsCollector.h" 5 #include "DocumentStatisticsCollector.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/InputTypeNames.h" 8 #include "core/InputTypeNames.h"
9 #include "core/dom/ElementTraversal.h" 9 #include "core/dom/ElementTraversal.h"
10 #include "core/dom/NodeComputedStyle.h" 10 #include "core/dom/NodeComputedStyle.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 HTMLElement* head = document.head(); 228 HTMLElement* head = document.head();
229 229
230 if (!body || !head) 230 if (!body || !head)
231 return features; 231 return features;
232 232
233 features.isMobileFriendly = isMobileFriendly(document); 233 features.isMobileFriendly = isMobileFriendly(document);
234 234
235 double startTime = monotonicallyIncreasingTime(); 235 double startTime = monotonicallyIncreasingTime();
236 236
237 // This should be cheap since collectStatistics is only called right after l ayout. 237 // This should be cheap since collectStatistics is only called right after l ayout.
238 document.updateLayoutTree(); 238 document.updateStyleAndLayoutTree();
239 239
240 // Traverse the DOM tree and collect statistics. 240 // Traverse the DOM tree and collect statistics.
241 collectFeatures(*body, features); 241 collectFeatures(*body, features);
242 features.openGraph = hasOpenGraphArticle(*head); 242 features.openGraph = hasOpenGraphArticle(*head);
243 243
244 double elapsedTime = monotonicallyIncreasingTime() - startTime; 244 double elapsedTime = monotonicallyIncreasingTime() - startTime;
245 245
246 DEFINE_STATIC_LOCAL(CustomCountHistogram, distillabilityHistogram, ("WebCore .DistillabilityUs", 1, 1000000, 50)); 246 DEFINE_STATIC_LOCAL(CustomCountHistogram, distillabilityHistogram, ("WebCore .DistillabilityUs", 1, 1000000, 50));
247 distillabilityHistogram.count(static_cast<int>(1e6 * elapsedTime)); 247 distillabilityHistogram.count(static_cast<int>(1e6 * elapsedTime));
248 248
249 return features; 249 return features;
250 } 250 }
251 251
252 } // namespace blink 252 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698