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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 if (m_autoSizeInfo) | 1170 if (m_autoSizeInfo) |
1171 m_autoSizeInfo->autoSizeIfNeeded(); | 1171 m_autoSizeInfo->autoSizeIfNeeded(); |
1172 | 1172 |
1173 m_hasPendingLayout = false; | 1173 m_hasPendingLayout = false; |
1174 DocumentLifecycle::Scope lifecycleScope(lifecycle(), | 1174 DocumentLifecycle::Scope lifecycleScope(lifecycle(), |
1175 DocumentLifecycle::LayoutClean); | 1175 DocumentLifecycle::LayoutClean); |
1176 | 1176 |
1177 Document* document = m_frame->document(); | 1177 Document* document = m_frame->document(); |
1178 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", | 1178 TRACE_EVENT_BEGIN1("devtools.timeline", "Layout", "beginData", |
1179 InspectorLayoutEvent::beginData(this)); | 1179 InspectorLayoutEvent::beginData(this)); |
1180 probe::willUpdateLayout(document); | 1180 probe::UpdateLayout probe(document); |
1181 | 1181 |
1182 performPreLayoutTasks(); | 1182 performPreLayoutTasks(); |
1183 | 1183 |
1184 // TODO(crbug.com/460956): The notion of a single root for layout is no longer | 1184 // TODO(crbug.com/460956): The notion of a single root for layout is no longer |
1185 // applicable. Remove or update this code. | 1185 // applicable. Remove or update this code. |
1186 LayoutObject* rootForThisLayout = layoutView(); | 1186 LayoutObject* rootForThisLayout = layoutView(); |
1187 | 1187 |
1188 FontCachePurgePreventer fontCachePurgePreventer; | 1188 FontCachePurgePreventer fontCachePurgePreventer; |
1189 { | 1189 { |
1190 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); | 1190 AutoReset<bool> changeSchedulingEnabled(&m_layoutSchedulingEnabled, false); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 updateDocumentAnnotatedRegions(); | 1313 updateDocumentAnnotatedRegions(); |
1314 checkDoesNotNeedLayout(); | 1314 checkDoesNotNeedLayout(); |
1315 | 1315 |
1316 scheduleOrPerformPostLayoutTasks(); | 1316 scheduleOrPerformPostLayoutTasks(); |
1317 checkDoesNotNeedLayout(); | 1317 checkDoesNotNeedLayout(); |
1318 | 1318 |
1319 // FIXME: The notion of a single root for layout is no longer applicable. | 1319 // FIXME: The notion of a single root for layout is no longer applicable. |
1320 // Remove or update this code. crbug.com/460596 | 1320 // Remove or update this code. crbug.com/460596 |
1321 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", | 1321 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", |
1322 InspectorLayoutEvent::endData(rootForThisLayout)); | 1322 InspectorLayoutEvent::endData(rootForThisLayout)); |
1323 probe::didUpdateLayout(m_frame.get()); | 1323 probe::didChangeViewport(m_frame.get()); |
1324 | 1324 |
1325 m_nestedLayoutCount--; | 1325 m_nestedLayoutCount--; |
1326 if (m_nestedLayoutCount) | 1326 if (m_nestedLayoutCount) |
1327 return; | 1327 return; |
1328 | 1328 |
1329 #if DCHECK_IS_ON() | 1329 #if DCHECK_IS_ON() |
1330 // Post-layout assert that nobody was re-marked as needing layout during | 1330 // Post-layout assert that nobody was re-marked as needing layout during |
1331 // layout. | 1331 // layout. |
1332 layoutView()->assertSubtreeIsLaidOut(); | 1332 layoutView()->assertSubtreeIsLaidOut(); |
1333 #endif | 1333 #endif |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 } | 1761 } |
1762 | 1762 |
1763 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) { | 1763 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) { |
1764 if (!contentsInCompositedLayer()) | 1764 if (!contentsInCompositedLayer()) |
1765 return false; | 1765 return false; |
1766 | 1766 |
1767 invalidateBackgroundAttachmentFixedObjects(); | 1767 invalidateBackgroundAttachmentFixedObjects(); |
1768 | 1768 |
1769 if (!m_viewportConstrainedObjects || | 1769 if (!m_viewportConstrainedObjects || |
1770 m_viewportConstrainedObjects->isEmpty()) { | 1770 m_viewportConstrainedObjects->isEmpty()) { |
1771 probe::didUpdateLayout(m_frame.get()); | 1771 probe::didChangeViewport(m_frame.get()); |
1772 return true; | 1772 return true; |
1773 } | 1773 } |
1774 | 1774 |
1775 if (!invalidateViewportConstrainedObjects()) | 1775 if (!invalidateViewportConstrainedObjects()) |
1776 return false; | 1776 return false; |
1777 | 1777 |
1778 probe::didUpdateLayout(m_frame.get()); | 1778 probe::didChangeViewport(m_frame.get()); |
1779 return true; | 1779 return true; |
1780 } | 1780 } |
1781 | 1781 |
1782 void FrameView::scrollContentsSlowPath() { | 1782 void FrameView::scrollContentsSlowPath() { |
1783 TRACE_EVENT0("blink", "FrameView::scrollContentsSlowPath"); | 1783 TRACE_EVENT0("blink", "FrameView::scrollContentsSlowPath"); |
1784 // We need full invalidation during slow scrolling. For slimming paint, full | 1784 // We need full invalidation during slow scrolling. For slimming paint, full |
1785 // invalidation of the LayoutView is not enough. We also need to invalidate | 1785 // invalidation of the LayoutView is not enough. We also need to invalidate |
1786 // all of the objects. | 1786 // all of the objects. |
1787 // FIXME: Find out what are enough to invalidate in slow path scrolling. | 1787 // FIXME: Find out what are enough to invalidate in slow path scrolling. |
1788 // crbug.com/451090#9. | 1788 // crbug.com/451090#9. |
(...skipping 3460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5249 void FrameView::setAnimationHost( | 5249 void FrameView::setAnimationHost( |
5250 std::unique_ptr<CompositorAnimationHost> host) { | 5250 std::unique_ptr<CompositorAnimationHost> host) { |
5251 m_animationHost = std::move(host); | 5251 m_animationHost = std::move(host); |
5252 } | 5252 } |
5253 | 5253 |
5254 LayoutUnit FrameView::caretWidth() const { | 5254 LayoutUnit FrameView::caretWidth() const { |
5255 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5255 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
5256 } | 5256 } |
5257 | 5257 |
5258 } // namespace blink | 5258 } // namespace blink |
OLD | NEW |