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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 ScriptForbiddenScope forbidScript; | 224 ScriptForbiddenScope forbidScript; |
225 | 225 |
226 ASSERT(!isInPerformLayout()); | 226 ASSERT(!isInPerformLayout()); |
227 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout); | 227 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout); |
228 | 228 |
229 TemporaryChange<bool> changeInPerformLayout(m_inPerformLayout, true); | 229 TemporaryChange<bool> changeInPerformLayout(m_inPerformLayout, true); |
230 | 230 |
231 // performLayout is the actual guts of layout(). | 231 // performLayout is the actual guts of layout(). |
232 // FIXME: The 300 other lines in layout() probably belong in other helper fu
nctions | 232 // FIXME: The 300 other lines in layout() probably belong in other helper fu
nctions |
233 // so that a single human could understand what layout() is actually doing. | 233 // so that a single human could understand what layout() is actually doing. |
234 | |
235 LayoutState layoutState(*rootForThisLayout); | |
236 | |
237 // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. | |
238 rootForThisLayout->layout(); | 234 rootForThisLayout->layout(); |
239 | 235 |
240 lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout); | 236 lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout); |
241 } | 237 } |
242 | 238 |
243 void FrameView::scheduleOrPerformPostLayoutTasks() | 239 void FrameView::scheduleOrPerformPostLayoutTasks() |
244 { | 240 { |
245 if (m_postLayoutTasksTimer.isActive()) | 241 if (m_postLayoutTasksTimer.isActive()) |
246 return; | 242 return; |
247 | 243 |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 totalObjects = 0; | 785 totalObjects = 0; |
790 | 786 |
791 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { | 787 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { |
792 ++totalObjects; | 788 ++totalObjects; |
793 if (o->needsLayout()) | 789 if (o->needsLayout()) |
794 ++needsLayoutObjects; | 790 ++needsLayoutObjects; |
795 } | 791 } |
796 } | 792 } |
797 | 793 |
798 } // namespace blink | 794 } // namespace blink |
OLD | NEW |