| 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 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 contentsResized(); | 3007 contentsResized(); |
| 3008 } | 3008 } |
| 3009 | 3009 |
| 3010 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) | 3010 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) |
| 3011 { | 3011 { |
| 3012 ScrollableArea::didAddScrollbar(scrollbar, orientation); | 3012 ScrollableArea::didAddScrollbar(scrollbar, orientation); |
| 3013 if (AXObjectCache* cache = axObjectCache()) | 3013 if (AXObjectCache* cache = axObjectCache()) |
| 3014 cache->handleScrollbarUpdate(this); | 3014 cache->handleScrollbarUpdate(this); |
| 3015 } | 3015 } |
| 3016 | 3016 |
| 3017 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | |
| 3018 { | |
| 3019 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | |
| 3020 if (AXObjectCache* cache = axObjectCache()) { | |
| 3021 cache->remove(scrollbar); | |
| 3022 cache->handleScrollbarUpdate(this); | |
| 3023 } | |
| 3024 } | |
| 3025 | |
| 3026 void FrameView::setTopControlsViewportAdjustment(float adjustment) | 3017 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
| 3027 { | 3018 { |
| 3028 m_topControlsViewportAdjustment = adjustment; | 3019 m_topControlsViewportAdjustment = adjustment; |
| 3029 } | 3020 } |
| 3030 | 3021 |
| 3031 IntPoint FrameView::maximumScrollPosition() const | 3022 IntPoint FrameView::maximumScrollPosition() const |
| 3032 { | 3023 { |
| 3033 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() | 3024 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() |
| 3034 // FIXME: We probably shouldn't be storing the bounds in a float. crbug.com/
422331. | 3025 // FIXME: We probably shouldn't be storing the bounds in a float. crbug.com/
422331. |
| 3035 FloatSize visibleSize = visibleContentSize(ExcludeScrollbars); | 3026 FloatSize visibleSize = visibleContentSize(ExcludeScrollbars); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3058 if (hasBar == !!m_horizontalScrollbar) | 3049 if (hasBar == !!m_horizontalScrollbar) |
| 3059 return; | 3050 return; |
| 3060 | 3051 |
| 3061 if (hasBar) { | 3052 if (hasBar) { |
| 3062 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); | 3053 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); |
| 3063 addChild(m_horizontalScrollbar.get()); | 3054 addChild(m_horizontalScrollbar.get()); |
| 3064 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 3055 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
| 3065 m_horizontalScrollbar->styleChanged(); | 3056 m_horizontalScrollbar->styleChanged(); |
| 3066 } else { | 3057 } else { |
| 3067 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 3058 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
| 3059 if (AXObjectCache* cache = axObjectCache()) |
| 3060 cache->remove(m_horizontalScrollbar.get()); |
| 3068 // If the scrollbar has been marked as overlapping the window resizer, | 3061 // If the scrollbar has been marked as overlapping the window resizer, |
| 3069 // then its removal should reduce the count. | 3062 // then its removal should reduce the count. |
| 3070 if (m_horizontalScrollbar->overlapsResizer()) | 3063 if (m_horizontalScrollbar->overlapsResizer()) |
| 3071 adjustScrollbarsAvoidingResizerCount(-1); | 3064 adjustScrollbarsAvoidingResizerCount(-1); |
| 3072 removeChild(m_horizontalScrollbar.get()); | 3065 removeChild(m_horizontalScrollbar.get()); |
| 3073 m_horizontalScrollbar = nullptr; | 3066 m_horizontalScrollbar = nullptr; |
| 3067 if (AXObjectCache* cache = axObjectCache()) |
| 3068 cache->handleScrollbarUpdate(this); |
| 3074 } | 3069 } |
| 3075 | 3070 |
| 3076 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 3071 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 3077 invalidateScrollCorner(scrollCornerRect()); | 3072 invalidateScrollCorner(scrollCornerRect()); |
| 3078 } | 3073 } |
| 3079 | 3074 |
| 3080 void FrameView::setHasVerticalScrollbar(bool hasBar) | 3075 void FrameView::setHasVerticalScrollbar(bool hasBar) |
| 3081 { | 3076 { |
| 3082 if (hasBar == !!m_verticalScrollbar) | 3077 if (hasBar == !!m_verticalScrollbar) |
| 3083 return; | 3078 return; |
| 3084 | 3079 |
| 3085 if (hasBar) { | 3080 if (hasBar) { |
| 3086 m_verticalScrollbar = createScrollbar(VerticalScrollbar); | 3081 m_verticalScrollbar = createScrollbar(VerticalScrollbar); |
| 3087 addChild(m_verticalScrollbar.get()); | 3082 addChild(m_verticalScrollbar.get()); |
| 3088 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3083 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
| 3089 m_verticalScrollbar->styleChanged(); | 3084 m_verticalScrollbar->styleChanged(); |
| 3090 } else { | 3085 } else { |
| 3091 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3086 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
| 3087 if (AXObjectCache* cache = axObjectCache()) |
| 3088 cache->remove(m_verticalScrollbar.get()); |
| 3092 // If the scrollbar has been marked as overlapping the window resizer, | 3089 // If the scrollbar has been marked as overlapping the window resizer, |
| 3093 // then its removal should reduce the count. | 3090 // then its removal should reduce the count. |
| 3094 if (m_verticalScrollbar->overlapsResizer()) | 3091 if (m_verticalScrollbar->overlapsResizer()) |
| 3095 adjustScrollbarsAvoidingResizerCount(-1); | 3092 adjustScrollbarsAvoidingResizerCount(-1); |
| 3096 removeChild(m_verticalScrollbar.get()); | 3093 removeChild(m_verticalScrollbar.get()); |
| 3097 m_verticalScrollbar = nullptr; | 3094 m_verticalScrollbar = nullptr; |
| 3095 if (AXObjectCache* cache = axObjectCache()) |
| 3096 cache->handleScrollbarUpdate(this); |
| 3098 } | 3097 } |
| 3099 | 3098 |
| 3100 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 3099 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 3101 invalidateScrollCorner(scrollCornerRect()); | 3100 invalidateScrollCorner(scrollCornerRect()); |
| 3102 } | 3101 } |
| 3103 | 3102 |
| 3104 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, | 3103 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, |
| 3105 bool horizontalLock, bool verticalLock) | 3104 bool horizontalLock, bool verticalLock) |
| 3106 { | 3105 { |
| 3107 bool needsUpdate = false; | 3106 bool needsUpdate = false; |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3975 | 3974 |
| 3976 if (!graphicsLayer) | 3975 if (!graphicsLayer) |
| 3977 return; | 3976 return; |
| 3978 | 3977 |
| 3979 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3978 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
| 3980 | 3979 |
| 3981 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3980 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3982 } | 3981 } |
| 3983 | 3982 |
| 3984 } // namespace blink | 3983 } // namespace blink |
| OLD | NEW |