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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 1203903003: AXScrollbar should not be recreated right after removal (Closed) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index a0b1ca42fd2e2c67c177dd25d6beba3eb333583f..1f62c385bc7cfc1b6b139a88ca1c9a952b33ec34 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -3014,15 +3014,6 @@ void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
cache->handleScrollbarUpdate(this);
}
-void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
-{
- ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
- if (AXObjectCache* cache = axObjectCache()) {
- cache->remove(scrollbar);
- cache->handleScrollbarUpdate(this);
- }
-}
-
void FrameView::setTopControlsViewportAdjustment(float adjustment)
{
m_topControlsViewportAdjustment = adjustment;
@@ -3065,12 +3056,16 @@ void FrameView::setHasHorizontalScrollbar(bool hasBar)
m_horizontalScrollbar->styleChanged();
} else {
willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar);
+ if (AXObjectCache* cache = axObjectCache())
+ cache->remove(m_horizontalScrollbar.get());
// If the scrollbar has been marked as overlapping the window resizer,
// then its removal should reduce the count.
if (m_horizontalScrollbar->overlapsResizer())
adjustScrollbarsAvoidingResizerCount(-1);
removeChild(m_horizontalScrollbar.get());
m_horizontalScrollbar = nullptr;
+ if (AXObjectCache* cache = axObjectCache())
+ cache->handleScrollbarUpdate(this);
}
if (RuntimeEnabledFeatures::slimmingPaintEnabled())
@@ -3089,12 +3084,16 @@ void FrameView::setHasVerticalScrollbar(bool hasBar)
m_verticalScrollbar->styleChanged();
} else {
willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar);
+ if (AXObjectCache* cache = axObjectCache())
+ cache->remove(m_verticalScrollbar.get());
// If the scrollbar has been marked as overlapping the window resizer,
// then its removal should reduce the count.
if (m_verticalScrollbar->overlapsResizer())
adjustScrollbarsAvoidingResizerCount(-1);
removeChild(m_verticalScrollbar.get());
m_verticalScrollbar = nullptr;
+ if (AXObjectCache* cache = axObjectCache())
+ cache->handleScrollbarUpdate(this);
}
if (RuntimeEnabledFeatures::slimmingPaintEnabled())
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698