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

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

Issue 2490563002: Revert of DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: Created 4 years, 1 month 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/editing/RenderedPosition.h" 43 #include "core/editing/RenderedPosition.h"
44 #include "core/editing/markers/DocumentMarkerController.h" 44 #include "core/editing/markers/DocumentMarkerController.h"
45 #include "core/events/ErrorEvent.h" 45 #include "core/events/ErrorEvent.h"
46 #include "core/fetch/ResourceFetcher.h" 46 #include "core/fetch/ResourceFetcher.h"
47 #include "core/frame/BrowserControls.h" 47 #include "core/frame/BrowserControls.h"
48 #include "core/frame/EventHandlerRegistry.h" 48 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameHost.h" 49 #include "core/frame/FrameHost.h"
50 #include "core/frame/LocalFrame.h" 50 #include "core/frame/LocalFrame.h"
51 #include "core/frame/Location.h" 51 #include "core/frame/Location.h"
52 #include "core/frame/PageScaleConstraintsSet.h" 52 #include "core/frame/PageScaleConstraintsSet.h"
53 #include "core/frame/PerformanceMonitor.h"
54 #include "core/frame/Settings.h" 53 #include "core/frame/Settings.h"
55 #include "core/frame/VisualViewport.h" 54 #include "core/frame/VisualViewport.h"
56 #include "core/html/HTMLFrameElement.h" 55 #include "core/html/HTMLFrameElement.h"
57 #include "core/html/HTMLPlugInElement.h" 56 #include "core/html/HTMLPlugInElement.h"
58 #include "core/html/HTMLTextFormControlElement.h" 57 #include "core/html/HTMLTextFormControlElement.h"
59 #include "core/html/parser/TextResourceDecoder.h" 58 #include "core/html/parser/TextResourceDecoder.h"
60 #include "core/input/EventHandler.h" 59 #include "core/input/EventHandler.h"
61 #include "core/inspector/InspectorInstrumentation.h" 60 #include "core/inspector/InspectorInstrumentation.h"
62 #include "core/inspector/InspectorTraceEvents.h" 61 #include "core/inspector/InspectorTraceEvents.h"
63 #include "core/layout/LayoutAnalyzer.h" 62 #include "core/layout/LayoutAnalyzer.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1082
1084 TRACE_EVENT0("blink,benchmark", "FrameView::layout"); 1083 TRACE_EVENT0("blink,benchmark", "FrameView::layout");
1085 1084
1086 if (m_autoSizeInfo) 1085 if (m_autoSizeInfo)
1087 m_autoSizeInfo->autoSizeIfNeeded(); 1086 m_autoSizeInfo->autoSizeIfNeeded();
1088 1087
1089 m_hasPendingLayout = false; 1088 m_hasPendingLayout = false;
1090 DocumentLifecycle::Scope lifecycleScope(lifecycle(), 1089 DocumentLifecycle::Scope lifecycleScope(lifecycle(),
1091 DocumentLifecycle::LayoutClean); 1090 DocumentLifecycle::LayoutClean);
1092 1091
1093 Document* document = m_frame->document();
1094 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", 1092 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData",
1095 InspectorLayoutEvent::beginData(this)); 1093 InspectorLayoutEvent::beginData(this));
1096 PerformanceMonitor::willUpdateLayout(document);
1097 1094
1098 performPreLayoutTasks(); 1095 performPreLayoutTasks();
1099 1096
1097 Document* document = m_frame->document();
1098
1100 // TODO(crbug.com/460956): The notion of a single root for layout is no longer 1099 // TODO(crbug.com/460956): The notion of a single root for layout is no longer
1101 // applicable. Remove or update this code. 1100 // applicable. Remove or update this code.
1102 LayoutObject* rootForThisLayout = layoutView(); 1101 LayoutObject* rootForThisLayout = layoutView();
1103 1102
1104 FontCachePurgePreventer fontCachePurgePreventer; 1103 FontCachePurgePreventer fontCachePurgePreventer;
1105 { 1104 {
1106 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); 1105 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false);
1107 m_nestedLayoutCount++; 1106 m_nestedLayoutCount++;
1108 1107
1109 updateCounters(); 1108 updateCounters();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 checkDoesNotNeedLayout(); 1229 checkDoesNotNeedLayout();
1231 1230
1232 scheduleOrPerformPostLayoutTasks(); 1231 scheduleOrPerformPostLayoutTasks();
1233 checkDoesNotNeedLayout(); 1232 checkDoesNotNeedLayout();
1234 1233
1235 // FIXME: The notion of a single root for layout is no longer applicable. 1234 // FIXME: The notion of a single root for layout is no longer applicable.
1236 // Remove or update this code. crbug.com/460596 1235 // Remove or update this code. crbug.com/460596
1237 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", 1236 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData",
1238 InspectorLayoutEvent::endData(rootForThisLayout)); 1237 InspectorLayoutEvent::endData(rootForThisLayout));
1239 InspectorInstrumentation::didUpdateLayout(m_frame.get()); 1238 InspectorInstrumentation::didUpdateLayout(m_frame.get());
1240 PerformanceMonitor::didUpdateLayout(document);
1241 1239
1242 m_nestedLayoutCount--; 1240 m_nestedLayoutCount--;
1243 if (m_nestedLayoutCount) 1241 if (m_nestedLayoutCount)
1244 return; 1242 return;
1245 1243
1246 #if ENABLE(ASSERT) 1244 #if ENABLE(ASSERT)
1247 // Post-layout assert that nobody was re-marked as needing layout during 1245 // Post-layout assert that nobody was re-marked as needing layout during
1248 // layout. 1246 // layout.
1249 layoutView()->assertSubtreeIsLaidOut(); 1247 layoutView()->assertSubtreeIsLaidOut();
1250 #endif 1248 #endif
(...skipping 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after
4550 DCHECK(m_frame->isMainFrame()); 4548 DCHECK(m_frame->isMainFrame());
4551 return m_initialViewportSize.width(); 4549 return m_initialViewportSize.width();
4552 } 4550 }
4553 4551
4554 int FrameView::initialViewportHeight() const { 4552 int FrameView::initialViewportHeight() const {
4555 DCHECK(m_frame->isMainFrame()); 4553 DCHECK(m_frame->isMainFrame());
4556 return m_initialViewportSize.height(); 4554 return m_initialViewportSize.height();
4557 } 4555 }
4558 4556
4559 } // namespace blink 4557 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/frame/PerformanceMonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698