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

Side by Side Diff: third_party/WebKit/Source/web/tests/sim/SimWebViewClient.cpp

Issue 1596573002: Remove extra calls of didMeaningfulLayout() during the same navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimWebViewClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "web/tests/sim/SimWebViewClient.h" 5 #include "web/tests/sim/SimWebViewClient.h"
6 6
7 #include "public/platform/WebLayerTreeView.h" 7 #include "public/platform/WebLayerTreeView.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 SimWebViewClient::SimWebViewClient(WebLayerTreeView& layerTreeView) 11 SimWebViewClient::SimWebViewClient(WebLayerTreeView& layerTreeView)
12 : m_hadVisuallyNonEmptyLayout(false) 12 : m_visuallyNonEmptyLayoutCount(0)
13 , m_hadFinishedParsingLayout(false) 13 , m_finishedParsingLayoutCount(0)
14 , m_hadFinishedLoadingLayout(false) 14 , m_finishedLoadingLayoutCount(0)
15 , m_layerTreeView(&layerTreeView) 15 , m_layerTreeView(&layerTreeView)
16 { 16 {
17 } 17 }
18 18
19 void SimWebViewClient::didMeaningfulLayout(WebMeaningfulLayout meaningfulLayout) 19 void SimWebViewClient::didMeaningfulLayout(WebMeaningfulLayout meaningfulLayout)
20 { 20 {
21 switch (meaningfulLayout) { 21 switch (meaningfulLayout) {
22 case WebMeaningfulLayout::VisuallyNonEmpty: 22 case WebMeaningfulLayout::VisuallyNonEmpty:
23 m_hadVisuallyNonEmptyLayout = true; 23 m_visuallyNonEmptyLayoutCount++;
24 break; 24 break;
25 case WebMeaningfulLayout::FinishedParsing: 25 case WebMeaningfulLayout::FinishedParsing:
26 m_hadFinishedParsingLayout = true; 26 m_finishedParsingLayoutCount++;
27 break; 27 break;
28 case WebMeaningfulLayout::FinishedLoading: 28 case WebMeaningfulLayout::FinishedLoading:
29 m_hadFinishedLoadingLayout = true; 29 m_finishedLoadingLayoutCount++;
30 break; 30 break;
31 } 31 }
32 } 32 }
33 33
34 } // namespace blink 34 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimWebViewClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698