| 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 | 799 |
| 800 TRACE_EVENT0("blink", "FrameView::layout"); | 800 TRACE_EVENT0("blink", "FrameView::layout"); |
| 801 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "Layout"); | 801 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "Layout"); |
| 802 | 802 |
| 803 // Protect the view from being deleted during layout (in recalcStyle) | 803 // Protect the view from being deleted during layout (in recalcStyle) |
| 804 RefPtr<FrameView> protector(this); | 804 RefPtr<FrameView> protector(this); |
| 805 | 805 |
| 806 // Every scroll that happens during layout is programmatic. | 806 // Every scroll that happens during layout is programmatic. |
| 807 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); | 807 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); |
| 808 | 808 |
| 809 if (m_autoSizeInfo) |
| 810 m_autoSizeInfo->autoSizeIfNeeded(); |
| 811 |
| 809 m_hasPendingLayout = false; | 812 m_hasPendingLayout = false; |
| 810 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo
utClean); | 813 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo
utClean); |
| 811 | 814 |
| 812 RELEASE_ASSERT(!isPainting()); | 815 RELEASE_ASSERT(!isPainting()); |
| 813 | 816 |
| 814 TRACE_EVENT_BEGIN1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Layout",
"beginData", InspectorLayoutEvent::beginData(this)); | 817 TRACE_EVENT_BEGIN1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Layout",
"beginData", InspectorLayoutEvent::beginData(this)); |
| 815 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 818 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
| 816 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 819 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
| 817 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); | 820 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); |
| 818 | 821 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 849 if (body && body->renderer()) { | 852 if (body && body->renderer()) { |
| 850 if (isHTMLFrameSetElement(*body)) { | 853 if (isHTMLFrameSetElement(*body)) { |
| 851 body->renderer()->setChildNeedsLayout(); | 854 body->renderer()->setChildNeedsLayout(); |
| 852 } else if (isHTMLBodyElement(*body)) { | 855 } else if (isHTMLBodyElement(*body)) { |
| 853 if (!m_firstLayout && m_size.height() != layoutSize().height
() && body->renderer()->enclosingBox()->stretchesToViewport()) | 856 if (!m_firstLayout && m_size.height() != layoutSize().height
() && body->renderer()->enclosingBox()->stretchesToViewport()) |
| 854 body->renderer()->setChildNeedsLayout(); | 857 body->renderer()->setChildNeedsLayout(); |
| 855 } | 858 } |
| 856 } | 859 } |
| 857 } | 860 } |
| 858 updateCounters(); | 861 updateCounters(); |
| 859 if (m_autoSizeInfo) | |
| 860 m_autoSizeInfo->autoSizeIfNeeded(); | |
| 861 | 862 |
| 862 ScrollbarMode hMode; | 863 ScrollbarMode hMode; |
| 863 ScrollbarMode vMode; | 864 ScrollbarMode vMode; |
| 864 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); | 865 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); |
| 865 | 866 |
| 866 if (!inSubtreeLayout) { | 867 if (!inSubtreeLayout) { |
| 867 // Now set our scrollbar state for the layout. | 868 // Now set our scrollbar state for the layout. |
| 868 ScrollbarMode currentHMode = horizontalScrollbarMode(); | 869 ScrollbarMode currentHMode = horizontalScrollbarMode(); |
| 869 ScrollbarMode currentVMode = verticalScrollbarMode(); | 870 ScrollbarMode currentVMode = verticalScrollbarMode(); |
| 870 | 871 |
| (...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3022 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3023 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3023 { | 3024 { |
| 3024 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3025 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3025 if (AXObjectCache* cache = axObjectCache()) { | 3026 if (AXObjectCache* cache = axObjectCache()) { |
| 3026 cache->remove(scrollbar); | 3027 cache->remove(scrollbar); |
| 3027 cache->handleScrollbarUpdate(this); | 3028 cache->handleScrollbarUpdate(this); |
| 3028 } | 3029 } |
| 3029 } | 3030 } |
| 3030 | 3031 |
| 3031 } // namespace blink | 3032 } // namespace blink |
| OLD | NEW |