Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 1171963003: Fix AXScrollbar from being recreated right after removal Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3002 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien tation) 3013 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien tation)
3014 { 3014 {
3015 ScrollableArea::didAddScrollbar(scrollbar, orientation); 3015 ScrollableArea::didAddScrollbar(scrollbar, orientation);
3016 if (AXObjectCache* cache = axObjectCache()) 3016 if (AXObjectCache* cache = axObjectCache())
3017 cache->handleScrollbarUpdate(this); 3017 cache->handleScrollbarUpdate(this);
3018 } 3018 }
3019 3019
3020 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3020 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3021 { 3021 {
3022 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3022 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3023 if (AXObjectCache* cache = axObjectCache()) { 3023 if (AXObjectCache* cache = axObjectCache())
3024 cache->remove(scrollbar); 3024 cache->remove(scrollbar);
3025 cache->handleScrollbarUpdate(this);
3026 }
3027 } 3025 }
3028 3026
3029 void FrameView::setTopControlsViewportAdjustment(float adjustment) 3027 void FrameView::setTopControlsViewportAdjustment(float adjustment)
3030 { 3028 {
3031 m_topControlsViewportAdjustment = adjustment; 3029 m_topControlsViewportAdjustment = adjustment;
3032 } 3030 }
3033 3031
3034 IntPoint FrameView::maximumScrollPosition() const 3032 IntPoint FrameView::maximumScrollPosition() const
3035 { 3033 {
3036 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() 3034 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset()
(...skipping 30 matching lines...) Expand all
3067 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); 3065 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar);
3068 m_horizontalScrollbar->styleChanged(); 3066 m_horizontalScrollbar->styleChanged();
3069 } else { 3067 } else {
3070 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); 3068 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar);
3071 // If the scrollbar has been marked as overlapping the window resizer, 3069 // If the scrollbar has been marked as overlapping the window resizer,
3072 // then its removal should reduce the count. 3070 // then its removal should reduce the count.
3073 if (m_horizontalScrollbar->overlapsResizer()) 3071 if (m_horizontalScrollbar->overlapsResizer())
3074 adjustScrollbarsAvoidingResizerCount(-1); 3072 adjustScrollbarsAvoidingResizerCount(-1);
3075 removeChild(m_horizontalScrollbar.get()); 3073 removeChild(m_horizontalScrollbar.get());
3076 m_horizontalScrollbar = nullptr; 3074 m_horizontalScrollbar = nullptr;
3075 if (AXObjectCache* cache = axObjectCache())
3076 cache->handleScrollbarUpdate(this);
3077 } 3077 }
3078 3078
3079 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) 3079 if (RuntimeEnabledFeatures::slimmingPaintEnabled())
3080 invalidateScrollCorner(scrollCornerRect()); 3080 invalidateScrollCorner(scrollCornerRect());
3081 } 3081 }
3082 3082
3083 void FrameView::setHasVerticalScrollbar(bool hasBar) 3083 void FrameView::setHasVerticalScrollbar(bool hasBar)
3084 { 3084 {
3085 if (hasBar == !!m_verticalScrollbar) 3085 if (hasBar == !!m_verticalScrollbar)
3086 return; 3086 return;
3087 3087
3088 if (hasBar) { 3088 if (hasBar) {
3089 m_verticalScrollbar = createScrollbar(VerticalScrollbar); 3089 m_verticalScrollbar = createScrollbar(VerticalScrollbar);
3090 addChild(m_verticalScrollbar.get()); 3090 addChild(m_verticalScrollbar.get());
3091 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); 3091 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar);
3092 m_verticalScrollbar->styleChanged(); 3092 m_verticalScrollbar->styleChanged();
3093 } else { 3093 } else {
3094 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); 3094 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar);
3095 // If the scrollbar has been marked as overlapping the window resizer, 3095 // If the scrollbar has been marked as overlapping the window resizer,
3096 // then its removal should reduce the count. 3096 // then its removal should reduce the count.
3097 if (m_verticalScrollbar->overlapsResizer()) 3097 if (m_verticalScrollbar->overlapsResizer())
3098 adjustScrollbarsAvoidingResizerCount(-1); 3098 adjustScrollbarsAvoidingResizerCount(-1);
3099 removeChild(m_verticalScrollbar.get()); 3099 removeChild(m_verticalScrollbar.get());
3100 m_verticalScrollbar = nullptr; 3100 m_verticalScrollbar = nullptr;
3101 if (AXObjectCache* cache = axObjectCache())
3102 cache->handleScrollbarUpdate(this);
3101 } 3103 }
3102 3104
3103 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) 3105 if (RuntimeEnabledFeatures::slimmingPaintEnabled())
3104 invalidateScrollCorner(scrollCornerRect()); 3106 invalidateScrollCorner(scrollCornerRect());
3105 } 3107 }
3106 3108
3107 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve rticalMode, 3109 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve rticalMode,
3108 bool horizontalLock, bool verticalLock) 3110 bool horizontalLock, bool verticalLock)
3109 { 3111 {
3110 bool needsUpdate = false; 3112 bool needsUpdate = false;
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
4006 4008
4007 if (!graphicsLayer) 4009 if (!graphicsLayer)
4008 return; 4010 return;
4009 4011
4010 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 4012 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
4011 4013
4012 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 4014 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
4013 } 4015 }
4014 4016
4015 } // namespace blink 4017 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698