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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 ScrollbarMode vMode; | 919 ScrollbarMode vMode; |
920 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); | 920 calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); |
921 | 921 |
922 shouldDoFullLayout = !inSubtreeLayout && !isPartialLayout && (m_firstLay
out || toRenderView(rootForThisLayout)->document().printing()); | 922 shouldDoFullLayout = !inSubtreeLayout && !isPartialLayout && (m_firstLay
out || toRenderView(rootForThisLayout)->document().printing()); |
923 | 923 |
924 if (!inSubtreeLayout && !isPartialLayout) { | 924 if (!inSubtreeLayout && !isPartialLayout) { |
925 // Now set our scrollbar state for the layout. | 925 // Now set our scrollbar state for the layout. |
926 ScrollbarMode currentHMode = horizontalScrollbarMode(); | 926 ScrollbarMode currentHMode = horizontalScrollbarMode(); |
927 ScrollbarMode currentVMode = verticalScrollbarMode(); | 927 ScrollbarMode currentVMode = verticalScrollbarMode(); |
928 | 928 |
929 if (m_firstLayout || (hMode != currentHMode || vMode != currentVMode
)) { | 929 if (m_firstLayout) { |
930 if (m_firstLayout) { | 930 setScrollbarsSuppressed(true); |
931 setScrollbarsSuppressed(true); | |
932 | 931 |
933 m_firstLayout = false; | 932 m_firstLayout = false; |
934 m_firstLayoutCallbackPending = true; | 933 m_firstLayoutCallbackPending = true; |
935 m_lastViewportSize = layoutSize(IncludeScrollbars); | 934 m_lastViewportSize = layoutSize(IncludeScrollbars); |
936 m_lastZoomFactor = rootForThisLayout->style()->zoom(); | 935 m_lastZoomFactor = rootForThisLayout->style()->zoom(); |
937 | 936 |
938 // Set the initial vMode to AlwaysOn if we're auto. | 937 // Set the initial vMode to AlwaysOn if we're auto. |
939 if (vMode == ScrollbarAuto) | 938 if (vMode == ScrollbarAuto) |
940 setVerticalScrollbarMode(ScrollbarAlwaysOn); // This cau
ses a vertical scrollbar to appear. | 939 setVerticalScrollbarMode(ScrollbarAlwaysOn); // This causes
a vertical scrollbar to appear. |
941 // Set the initial hMode to AlwaysOff if we're auto. | 940 // Set the initial hMode to AlwaysOff if we're auto. |
942 if (hMode == ScrollbarAuto) | 941 if (hMode == ScrollbarAuto) |
943 setHorizontalScrollbarMode(ScrollbarAlwaysOff); // This
causes a horizontal scrollbar to disappear. | 942 setHorizontalScrollbarMode(ScrollbarAlwaysOff); // This caus
es a horizontal scrollbar to disappear. |
944 | 943 |
945 setScrollbarModes(hMode, vMode); | 944 setScrollbarModes(hMode, vMode); |
946 setScrollbarsSuppressed(false, true); | 945 setScrollbarsSuppressed(false, true); |
947 } else | 946 } else if (hMode != currentHMode || vMode != currentVMode) { |
948 setScrollbarModes(hMode, vMode); | 947 setScrollbarModes(hMode, vMode); |
949 } | 948 } |
950 | 949 |
951 LayoutSize oldSize = m_size; | 950 LayoutSize oldSize = m_size; |
952 | 951 |
953 m_size = LayoutSize(layoutSize().width(), layoutSize().height()); | 952 m_size = LayoutSize(layoutSize().width(), layoutSize().height()); |
954 | 953 |
955 if (oldSize != m_size) { | 954 if (oldSize != m_size) { |
956 shouldDoFullLayout = true; | 955 shouldDoFullLayout = true; |
957 if (!m_firstLayout) { | 956 if (!m_firstLayout) { |
958 RenderBox* rootRenderer = document->documentElement() ? docu
ment->documentElement()->renderBox() : 0; | 957 RenderBox* rootRenderer = document->documentElement() ? docu
ment->documentElement()->renderBox() : 0; |
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3181 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3180 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3182 { | 3181 { |
3183 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3182 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3184 if (AXObjectCache* cache = axObjectCache()) { | 3183 if (AXObjectCache* cache = axObjectCache()) { |
3185 cache->remove(scrollbar); | 3184 cache->remove(scrollbar); |
3186 cache->handleScrollbarUpdate(this); | 3185 cache->handleScrollbarUpdate(this); |
3187 } | 3186 } |
3188 } | 3187 } |
3189 | 3188 |
3190 } // namespace WebCore | 3189 } // namespace WebCore |
OLD | NEW |