| OLD | NEW |
| 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 Loading... |
| 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" |
| 53 #include "core/frame/Settings.h" | 54 #include "core/frame/Settings.h" |
| 54 #include "core/frame/VisualViewport.h" | 55 #include "core/frame/VisualViewport.h" |
| 55 #include "core/html/HTMLFrameElement.h" | 56 #include "core/html/HTMLFrameElement.h" |
| 56 #include "core/html/HTMLPlugInElement.h" | 57 #include "core/html/HTMLPlugInElement.h" |
| 57 #include "core/html/HTMLTextFormControlElement.h" | 58 #include "core/html/HTMLTextFormControlElement.h" |
| 58 #include "core/html/parser/TextResourceDecoder.h" | 59 #include "core/html/parser/TextResourceDecoder.h" |
| 59 #include "core/input/EventHandler.h" | 60 #include "core/input/EventHandler.h" |
| 60 #include "core/inspector/InspectorInstrumentation.h" | 61 #include "core/inspector/InspectorInstrumentation.h" |
| 61 #include "core/inspector/InspectorTraceEvents.h" | 62 #include "core/inspector/InspectorTraceEvents.h" |
| 62 #include "core/layout/LayoutAnalyzer.h" | 63 #include "core/layout/LayoutAnalyzer.h" |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 | 1083 |
| 1083 TRACE_EVENT0("blink,benchmark", "FrameView::layout"); | 1084 TRACE_EVENT0("blink,benchmark", "FrameView::layout"); |
| 1084 | 1085 |
| 1085 if (m_autoSizeInfo) | 1086 if (m_autoSizeInfo) |
| 1086 m_autoSizeInfo->autoSizeIfNeeded(); | 1087 m_autoSizeInfo->autoSizeIfNeeded(); |
| 1087 | 1088 |
| 1088 m_hasPendingLayout = false; | 1089 m_hasPendingLayout = false; |
| 1089 DocumentLifecycle::Scope lifecycleScope(lifecycle(), | 1090 DocumentLifecycle::Scope lifecycleScope(lifecycle(), |
| 1090 DocumentLifecycle::LayoutClean); | 1091 DocumentLifecycle::LayoutClean); |
| 1091 | 1092 |
| 1093 Document* document = m_frame->document(); |
| 1092 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", | 1094 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", |
| 1093 InspectorLayoutEvent::beginData(this)); | 1095 InspectorLayoutEvent::beginData(this)); |
| 1096 PerformanceMonitor::willUpdateLayout(document); |
| 1094 | 1097 |
| 1095 performPreLayoutTasks(); | 1098 performPreLayoutTasks(); |
| 1096 | 1099 |
| 1097 Document* document = m_frame->document(); | |
| 1098 | |
| 1099 // TODO(crbug.com/460956): The notion of a single root for layout is no longer | 1100 // TODO(crbug.com/460956): The notion of a single root for layout is no longer |
| 1100 // applicable. Remove or update this code. | 1101 // applicable. Remove or update this code. |
| 1101 LayoutObject* rootForThisLayout = layoutView(); | 1102 LayoutObject* rootForThisLayout = layoutView(); |
| 1102 | 1103 |
| 1103 FontCachePurgePreventer fontCachePurgePreventer; | 1104 FontCachePurgePreventer fontCachePurgePreventer; |
| 1104 { | 1105 { |
| 1105 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); | 1106 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); |
| 1106 m_nestedLayoutCount++; | 1107 m_nestedLayoutCount++; |
| 1107 | 1108 |
| 1108 updateCounters(); | 1109 updateCounters(); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 checkDoesNotNeedLayout(); | 1230 checkDoesNotNeedLayout(); |
| 1230 | 1231 |
| 1231 scheduleOrPerformPostLayoutTasks(); | 1232 scheduleOrPerformPostLayoutTasks(); |
| 1232 checkDoesNotNeedLayout(); | 1233 checkDoesNotNeedLayout(); |
| 1233 | 1234 |
| 1234 // FIXME: The notion of a single root for layout is no longer applicable. | 1235 // FIXME: The notion of a single root for layout is no longer applicable. |
| 1235 // Remove or update this code. crbug.com/460596 | 1236 // Remove or update this code. crbug.com/460596 |
| 1236 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", | 1237 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", |
| 1237 InspectorLayoutEvent::endData(rootForThisLayout)); | 1238 InspectorLayoutEvent::endData(rootForThisLayout)); |
| 1238 InspectorInstrumentation::didUpdateLayout(m_frame.get()); | 1239 InspectorInstrumentation::didUpdateLayout(m_frame.get()); |
| 1240 PerformanceMonitor::didUpdateLayout(document); |
| 1239 | 1241 |
| 1240 m_nestedLayoutCount--; | 1242 m_nestedLayoutCount--; |
| 1241 if (m_nestedLayoutCount) | 1243 if (m_nestedLayoutCount) |
| 1242 return; | 1244 return; |
| 1243 | 1245 |
| 1244 #if ENABLE(ASSERT) | 1246 #if ENABLE(ASSERT) |
| 1245 // Post-layout assert that nobody was re-marked as needing layout during | 1247 // Post-layout assert that nobody was re-marked as needing layout during |
| 1246 // layout. | 1248 // layout. |
| 1247 layoutView()->assertSubtreeIsLaidOut(); | 1249 layoutView()->assertSubtreeIsLaidOut(); |
| 1248 #endif | 1250 #endif |
| (...skipping 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4548 DCHECK(m_frame->isMainFrame()); | 4550 DCHECK(m_frame->isMainFrame()); |
| 4549 return m_initialViewportSize.width(); | 4551 return m_initialViewportSize.width(); |
| 4550 } | 4552 } |
| 4551 | 4553 |
| 4552 int FrameView::initialViewportHeight() const { | 4554 int FrameView::initialViewportHeight() const { |
| 4553 DCHECK(m_frame->isMainFrame()); | 4555 DCHECK(m_frame->isMainFrame()); |
| 4554 return m_initialViewportSize.height(); | 4556 return m_initialViewportSize.height(); |
| 4555 } | 4557 } |
| 4556 | 4558 |
| 4557 } // namespace blink | 4559 } // namespace blink |
| OLD | NEW |