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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 #include "platform/graphics/GraphicsLayer.h" | 100 #include "platform/graphics/GraphicsLayer.h" |
101 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 101 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
102 #include "platform/graphics/paint/CullRect.h" | 102 #include "platform/graphics/paint/CullRect.h" |
103 #include "platform/graphics/paint/PaintController.h" | 103 #include "platform/graphics/paint/PaintController.h" |
104 #include "platform/scheduler/CancellableTaskFactory.h" | 104 #include "platform/scheduler/CancellableTaskFactory.h" |
105 #include "platform/scroll/ScrollAnimatorBase.h" | 105 #include "platform/scroll/ScrollAnimatorBase.h" |
106 #include "platform/scroll/ScrollbarTheme.h" | 106 #include "platform/scroll/ScrollbarTheme.h" |
107 #include "platform/text/TextStream.h" | 107 #include "platform/text/TextStream.h" |
108 #include "public/platform/WebDisplayItemList.h" | 108 #include "public/platform/WebDisplayItemList.h" |
109 #include "public/platform/WebFrameScheduler.h" | 109 #include "public/platform/WebFrameScheduler.h" |
110 #include "public/web/WebLocalFrame.h" | |
111 #include "web/WebLocalFrameImpl.h" | |
110 #include "wtf/CurrentTime.h" | 112 #include "wtf/CurrentTime.h" |
111 #include "wtf/StdLibExtras.h" | 113 #include "wtf/StdLibExtras.h" |
112 #include "wtf/TemporaryChange.h" | 114 #include "wtf/TemporaryChange.h" |
113 | 115 |
114 namespace blink { | 116 namespace blink { |
115 | 117 |
116 using namespace HTMLNames; | 118 using namespace HTMLNames; |
117 | 119 |
118 // The maximum number of updateWidgets iterations that should be done before ret urning. | 120 // The maximum number of updateWidgets iterations that should be done before ret urning. |
119 static const unsigned maxUpdateWidgetsIterations = 2; | 121 static const unsigned maxUpdateWidgetsIterations = 2; |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
955 bool inSubtreeLayout = isSubtreeLayout(); | 957 bool inSubtreeLayout = isSubtreeLayout(); |
956 | 958 |
957 // FIXME: The notion of a single root for layout is no longer applicable. Re move or update this code. crbug.com/460596 | 959 // FIXME: The notion of a single root for layout is no longer applicable. Re move or update this code. crbug.com/460596 |
958 LayoutItem rootForThisLayout(inSubtreeLayout ? m_layoutSubtreeRootList.rando mRoot() : layoutView()); | 960 LayoutItem rootForThisLayout(inSubtreeLayout ? m_layoutSubtreeRootList.rando mRoot() : layoutView()); |
959 if (!rootForThisLayout) { | 961 if (!rootForThisLayout) { |
960 // FIXME: Do we need to set m_size here? | 962 // FIXME: Do we need to set m_size here? |
961 ASSERT_NOT_REACHED(); | 963 ASSERT_NOT_REACHED(); |
962 return; | 964 return; |
963 } | 965 } |
964 | 966 |
967 WebLocalFrame* wlframe = WebLocalFrameImpl::fromFrame(frame()); | |
968 | |
965 FontCachePurgePreventer fontCachePurgePreventer; | 969 FontCachePurgePreventer fontCachePurgePreventer; |
966 { | 970 { |
967 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false); | 971 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false); |
968 | 972 |
969 m_nestedLayoutCount++; | 973 m_nestedLayoutCount++; |
970 if (!inSubtreeLayout) { | 974 if (!inSubtreeLayout) { |
971 clearLayoutSubtreeRootsAndMarkContainingBlocks(); | 975 clearLayoutSubtreeRootsAndMarkContainingBlocks(); |
972 Node* body = document->body(); | 976 Node* body = document->body(); |
973 if (body && body->layoutObject()) { | 977 if (body && body->layoutObject()) { |
974 if (isHTMLFrameSetElement(*body)) { | 978 if (isHTMLFrameSetElement(*body)) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1024 bodyLayoutObject->setChildNeedsLayout(); | 1028 bodyLayoutObject->setChildNeedsLayout(); |
1025 else if (rootLayoutObject && rootLayoutObject->stretchesToViewpo rt()) | 1029 else if (rootLayoutObject && rootLayoutObject->stretchesToViewpo rt()) |
1026 rootLayoutObject->setChildNeedsLayout(); | 1030 rootLayoutObject->setChildNeedsLayout(); |
1027 } | 1031 } |
1028 | 1032 |
1029 // We need to set m_doFullPaintInvalidation before triggering layout as LayoutObject::checkForPaintInvalidation | 1033 // We need to set m_doFullPaintInvalidation before triggering layout as LayoutObject::checkForPaintInvalidation |
1030 // checks the boolean to disable local paint invalidations. | 1034 // checks the boolean to disable local paint invalidations. |
1031 m_doFullPaintInvalidation |= layoutView()->shouldDoFullPaintInvalida tionForNextLayout(); | 1035 m_doFullPaintInvalidation |= layoutView()->shouldDoFullPaintInvalida tionForNextLayout(); |
1032 } | 1036 } |
1033 | 1037 |
1034 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.deb ug.layout"), "LayoutTree", | 1038 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.deb ug.layout"), "LayoutTree", |
benjhayden
2016/06/03 18:12:28
comment out for puf
| |
1035 this, TracedLayoutObject::create(*layoutView(), false)); | 1039 TRACE_ID_WITH_SCOPE("LayoutTree", wlframe), |
1040 TracedLayoutObject::create(*layoutView(), false)); | |
1036 | 1041 |
1037 performLayout(inSubtreeLayout); | 1042 performLayout(inSubtreeLayout); |
1038 | 1043 |
1039 ASSERT(m_layoutSubtreeRootList.isEmpty()); | 1044 ASSERT(m_layoutSubtreeRootList.isEmpty()); |
1040 } // Reset m_layoutSchedulingEnabled to its previous value. | 1045 } // Reset m_layoutSchedulingEnabled to its previous value. |
1041 | 1046 |
1042 if (!inSubtreeLayout && !document->printing()) | 1047 if (!inSubtreeLayout && !document->printing()) |
1043 adjustViewSize(); | 1048 adjustViewSize(); |
1044 | 1049 |
1045 m_frameTimingRequestsDirty = true; | 1050 m_frameTimingRequestsDirty = true; |
1046 | 1051 |
1047 // FIXME: Could find the common ancestor layer of all dirty subtrees and mar k from there. crbug.com/462719 | 1052 // FIXME: Could find the common ancestor layer of all dirty subtrees and mar k from there. crbug.com/462719 |
1048 layoutView()->enclosingLayer()->updateLayerPositionsAfterLayout(); | 1053 layoutView()->enclosingLayer()->updateLayerPositionsAfterLayout(); |
1049 | 1054 |
1050 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.debug.l ayout"), "LayoutTree", | 1055 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.debug.l ayout"), "LayoutTree", |
1051 this, TracedLayoutObject::create(*layoutView(), true)); | 1056 TRACE_ID_WITH_SCOPE("LayoutTree", wlframe), |
1057 TracedLayoutObject::create(*layoutView(), true)); | |
1052 | 1058 |
1053 layoutViewItem().compositor()->didLayout(); | 1059 layoutViewItem().compositor()->didLayout(); |
1054 | 1060 |
1055 m_layoutCount++; | 1061 m_layoutCount++; |
1056 | 1062 |
1057 if (AXObjectCache* cache = document->axObjectCache()) { | 1063 if (AXObjectCache* cache = document->axObjectCache()) { |
1058 const KURL& url = document->url(); | 1064 const KURL& url = document->url(); |
1059 if (url.isValid() && !url.isAboutBlankURL()) | 1065 if (url.isValid() && !url.isAboutBlankURL()) |
1060 cache->handleLayoutComplete(document); | 1066 cache->handleLayoutComplete(document); |
1061 } | 1067 } |
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4105 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4111 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
4106 } | 4112 } |
4107 | 4113 |
4108 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4114 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4109 { | 4115 { |
4110 ASSERT(layoutView()); | 4116 ASSERT(layoutView()); |
4111 return *layoutView(); | 4117 return *layoutView(); |
4112 } | 4118 } |
4113 | 4119 |
4114 } // namespace blink | 4120 } // namespace blink |
OLD | NEW |