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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2713553010: Migrate performance monitor to inspector instrumentation. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 9 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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/editing/FrameSelection.h" 46 #include "core/editing/FrameSelection.h"
47 #include "core/editing/RenderedPosition.h" 47 #include "core/editing/RenderedPosition.h"
48 #include "core/editing/markers/DocumentMarkerController.h" 48 #include "core/editing/markers/DocumentMarkerController.h"
49 #include "core/events/ErrorEvent.h" 49 #include "core/events/ErrorEvent.h"
50 #include "core/frame/BrowserControls.h" 50 #include "core/frame/BrowserControls.h"
51 #include "core/frame/EventHandlerRegistry.h" 51 #include "core/frame/EventHandlerRegistry.h"
52 #include "core/frame/FrameHost.h" 52 #include "core/frame/FrameHost.h"
53 #include "core/frame/LocalFrame.h" 53 #include "core/frame/LocalFrame.h"
54 #include "core/frame/Location.h" 54 #include "core/frame/Location.h"
55 #include "core/frame/PageScaleConstraintsSet.h" 55 #include "core/frame/PageScaleConstraintsSet.h"
56 #include "core/frame/PerformanceMonitor.h"
57 #include "core/frame/RemoteFrame.h" 56 #include "core/frame/RemoteFrame.h"
58 #include "core/frame/RemoteFrameView.h" 57 #include "core/frame/RemoteFrameView.h"
59 #include "core/frame/Settings.h" 58 #include "core/frame/Settings.h"
60 #include "core/frame/VisualViewport.h" 59 #include "core/frame/VisualViewport.h"
61 #include "core/html/HTMLFrameElement.h" 60 #include "core/html/HTMLFrameElement.h"
62 #include "core/html/HTMLPlugInElement.h" 61 #include "core/html/HTMLPlugInElement.h"
63 #include "core/html/TextControlElement.h" 62 #include "core/html/TextControlElement.h"
64 #include "core/html/parser/TextResourceDecoder.h" 63 #include "core/html/parser/TextResourceDecoder.h"
65 #include "core/input/EventHandler.h" 64 #include "core/input/EventHandler.h"
66 #include "core/inspector/InspectorInstrumentation.h" 65 #include "core/inspector/InspectorInstrumentation.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 if (m_autoSizeInfo) 1164 if (m_autoSizeInfo)
1166 m_autoSizeInfo->autoSizeIfNeeded(); 1165 m_autoSizeInfo->autoSizeIfNeeded();
1167 1166
1168 m_hasPendingLayout = false; 1167 m_hasPendingLayout = false;
1169 DocumentLifecycle::Scope lifecycleScope(lifecycle(), 1168 DocumentLifecycle::Scope lifecycleScope(lifecycle(),
1170 DocumentLifecycle::LayoutClean); 1169 DocumentLifecycle::LayoutClean);
1171 1170
1172 Document* document = m_frame->document(); 1171 Document* document = m_frame->document();
1173 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", 1172 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData",
1174 InspectorLayoutEvent::beginData(this)); 1173 InspectorLayoutEvent::beginData(this));
1175 PerformanceMonitor::willUpdateLayout(document); 1174 InspectorInstrumentation::willUpdateLayout(document);
1176 1175
1177 performPreLayoutTasks(); 1176 performPreLayoutTasks();
1178 1177
1179 // TODO(crbug.com/460956): The notion of a single root for layout is no longer 1178 // TODO(crbug.com/460956): The notion of a single root for layout is no longer
1180 // applicable. Remove or update this code. 1179 // applicable. Remove or update this code.
1181 LayoutObject* rootForThisLayout = layoutView(); 1180 LayoutObject* rootForThisLayout = layoutView();
1182 1181
1183 FontCachePurgePreventer fontCachePurgePreventer; 1182 FontCachePurgePreventer fontCachePurgePreventer;
1184 { 1183 {
1185 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); 1184 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 checkDoesNotNeedLayout(); 1308 checkDoesNotNeedLayout();
1310 1309
1311 scheduleOrPerformPostLayoutTasks(); 1310 scheduleOrPerformPostLayoutTasks();
1312 checkDoesNotNeedLayout(); 1311 checkDoesNotNeedLayout();
1313 1312
1314 // FIXME: The notion of a single root for layout is no longer applicable. 1313 // FIXME: The notion of a single root for layout is no longer applicable.
1315 // Remove or update this code. crbug.com/460596 1314 // Remove or update this code. crbug.com/460596
1316 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", 1315 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData",
1317 InspectorLayoutEvent::endData(rootForThisLayout)); 1316 InspectorLayoutEvent::endData(rootForThisLayout));
1318 InspectorInstrumentation::didUpdateLayout(m_frame.get()); 1317 InspectorInstrumentation::didUpdateLayout(m_frame.get());
1319 PerformanceMonitor::didUpdateLayout(document);
1320 1318
1321 m_nestedLayoutCount--; 1319 m_nestedLayoutCount--;
1322 if (m_nestedLayoutCount) 1320 if (m_nestedLayoutCount)
1323 return; 1321 return;
1324 1322
1325 #if DCHECK_IS_ON() 1323 #if DCHECK_IS_ON()
1326 // Post-layout assert that nobody was re-marked as needing layout during 1324 // Post-layout assert that nobody was re-marked as needing layout during
1327 // layout. 1325 // layout.
1328 layoutView()->assertSubtreeIsLaidOut(); 1326 layoutView()->assertSubtreeIsLaidOut();
1329 #endif 1327 #endif
(...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after
5203 void FrameView::setAnimationHost( 5201 void FrameView::setAnimationHost(
5204 std::unique_ptr<CompositorAnimationHost> host) { 5202 std::unique_ptr<CompositorAnimationHost> host) {
5205 m_animationHost = std::move(host); 5203 m_animationHost = std::move(host);
5206 } 5204 }
5207 5205
5208 LayoutUnit FrameView::caretWidth() const { 5206 LayoutUnit FrameView::caretWidth() const {
5209 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5207 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5210 } 5208 }
5211 5209
5212 } // namespace blink 5210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698