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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
792 // We should never layout a Document which is not in a LocalFrame. | 792 // We should never layout a Document which is not in a LocalFrame. |
793 ASSERT(m_frame); | 793 ASSERT(m_frame); |
794 ASSERT(m_frame->view() == this); | 794 ASSERT(m_frame->view() == this); |
795 ASSERT(m_frame->page()); | 795 ASSERT(m_frame->page()); |
796 | 796 |
797 ScriptForbiddenScope forbidScript; | 797 ScriptForbiddenScope forbidScript; |
798 | 798 |
799 if (isInPerformLayout() || !m_frame->document()->isActive()) | 799 if (isInPerformLayout() || !m_frame->document()->isActive()) |
800 return; | 800 return; |
801 | 801 |
802 autoSizeIfEnabled(); | |
rune
2014/08/14 20:53:41
Perhaps this should be done after the layout inste
| |
803 if (!needsLayout()) | |
804 return; | |
rune
2014/08/15 09:27:15
This caused regressions. needsLayout() might be fa
| |
805 | |
802 TRACE_EVENT0("blink", "FrameView::layout"); | 806 TRACE_EVENT0("blink", "FrameView::layout"); |
803 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "Layout"); | 807 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "Layout"); |
804 | 808 |
805 // Protect the view from being deleted during layout (in recalcStyle) | 809 // Protect the view from being deleted during layout (in recalcStyle) |
806 RefPtr<FrameView> protector(this); | 810 RefPtr<FrameView> protector(this); |
807 | 811 |
808 // Every scroll that happens during layout is programmatic. | 812 // Every scroll that happens during layout is programmatic. |
809 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); | 813 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); |
810 | 814 |
811 m_hasPendingLayout = false; | 815 m_hasPendingLayout = false; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
851 if (body && body->renderer()) { | 855 if (body && body->renderer()) { |
852 if (isHTMLFrameSetElement(*body)) { | 856 if (isHTMLFrameSetElement(*body)) { |
853 body->renderer()->setChildNeedsLayout(); | 857 body->renderer()->setChildNeedsLayout(); |
854 } else if (isHTMLBodyElement(*body)) { | 858 } else if (isHTMLBodyElement(*body)) { |
855 if (!m_firstLayout && m_size.height() != layoutSize().height () && body->renderer()->enclosingBox()->stretchesToViewport()) | 859 if (!m_firstLayout && m_size.height() != layoutSize().height () && body->renderer()->enclosingBox()->stretchesToViewport()) |
856 body->renderer()->setChildNeedsLayout(); | 860 body->renderer()->setChildNeedsLayout(); |
857 } | 861 } |
858 } | 862 } |
859 } | 863 } |
860 updateCounters(); | 864 updateCounters(); |
861 autoSizeIfEnabled(); | |
862 | 865 |
863 ScrollbarMode hMode; | 866 ScrollbarMode hMode; |
864 ScrollbarMode vMode; | 867 ScrollbarMode vMode; |
865 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); | 868 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); |
866 | 869 |
867 if (!inSubtreeLayout) { | 870 if (!inSubtreeLayout) { |
868 // Now set our scrollbar state for the layout. | 871 // Now set our scrollbar state for the layout. |
869 ScrollbarMode currentHMode = horizontalScrollbarMode(); | 872 ScrollbarMode currentHMode = horizontalScrollbarMode(); |
870 ScrollbarMode currentVMode = verticalScrollbarMode(); | 873 ScrollbarMode currentVMode = verticalScrollbarMode(); |
871 | 874 |
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3135 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) | 3138 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) |
3136 { | 3139 { |
3137 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3140 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3138 if (AXObjectCache* cache = axObjectCache()) { | 3141 if (AXObjectCache* cache = axObjectCache()) { |
3139 cache->remove(scrollbar); | 3142 cache->remove(scrollbar); |
3140 cache->handleScrollbarUpdate(this); | 3143 cache->handleScrollbarUpdate(this); |
3141 } | 3144 } |
3142 } | 3145 } |
3143 | 3146 |
3144 } // namespace blink | 3147 } // namespace blink |
OLD | NEW |