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

Side by Side Diff: Source/WebCore/platform/ScrollView.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 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 | « Source/WebCore/page/FrameView.cpp ('k') | Source/WebCore/platform/Scrollbar.h » ('j') | 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); 92 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar);
93 addChild(m_horizontalScrollbar.get()); 93 addChild(m_horizontalScrollbar.get());
94 didAddHorizontalScrollbar(m_horizontalScrollbar.get()); 94 didAddHorizontalScrollbar(m_horizontalScrollbar.get());
95 m_horizontalScrollbar->styleChanged(); 95 m_horizontalScrollbar->styleChanged();
96 } else if (!hasBar && m_horizontalScrollbar) { 96 } else if (!hasBar && m_horizontalScrollbar) {
97 willRemoveHorizontalScrollbar(m_horizontalScrollbar.get()); 97 willRemoveHorizontalScrollbar(m_horizontalScrollbar.get());
98 removeChild(m_horizontalScrollbar.get()); 98 removeChild(m_horizontalScrollbar.get());
99 m_horizontalScrollbar = 0; 99 m_horizontalScrollbar = 0;
100 } 100 }
101 101
102 if (AXObjectCache* cache = axObjectCache()) 102 if (AXObjectCache::accessibilityEnabled() && axObjectCache())
103 cache->handleScrollbarUpdate(this); 103 axObjectCache()->handleScrollbarUpdate(this);
104 } 104 }
105 105
106 void ScrollView::setHasVerticalScrollbar(bool hasBar) 106 void ScrollView::setHasVerticalScrollbar(bool hasBar)
107 { 107 {
108 ASSERT(!hasBar || !avoidScrollbarCreation()); 108 ASSERT(!hasBar || !avoidScrollbarCreation());
109 if (hasBar && !m_verticalScrollbar) { 109 if (hasBar && !m_verticalScrollbar) {
110 m_verticalScrollbar = createScrollbar(VerticalScrollbar); 110 m_verticalScrollbar = createScrollbar(VerticalScrollbar);
111 addChild(m_verticalScrollbar.get()); 111 addChild(m_verticalScrollbar.get());
112 didAddVerticalScrollbar(m_verticalScrollbar.get()); 112 didAddVerticalScrollbar(m_verticalScrollbar.get());
113 m_verticalScrollbar->styleChanged(); 113 m_verticalScrollbar->styleChanged();
114 } else if (!hasBar && m_verticalScrollbar) { 114 } else if (!hasBar && m_verticalScrollbar) {
115 willRemoveVerticalScrollbar(m_verticalScrollbar.get()); 115 willRemoveVerticalScrollbar(m_verticalScrollbar.get());
116 removeChild(m_verticalScrollbar.get()); 116 removeChild(m_verticalScrollbar.get());
117 m_verticalScrollbar = 0; 117 m_verticalScrollbar = 0;
118 } 118 }
119 119
120 if (AXObjectCache* cache = axObjectCache()) 120 if (AXObjectCache::accessibilityEnabled() && axObjectCache())
121 cache->handleScrollbarUpdate(this); 121 axObjectCache()->handleScrollbarUpdate(this);
122 } 122 }
123 123
124 #if !PLATFORM(GTK) 124 #if !PLATFORM(GTK)
125 PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientati on) 125 PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientati on)
126 { 126 {
127 return Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar) ; 127 return Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar) ;
128 } 128 }
129 129
130 void ScrollView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode v erticalMode, 130 void ScrollView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode v erticalMode,
131 bool horizontalLock, bool verticalLock) 131 bool horizontalLock, bool verticalLock)
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 } 1428 }
1429 1429
1430 bool ScrollView::platformIsOffscreen() const 1430 bool ScrollView::platformIsOffscreen() const
1431 { 1431 {
1432 return false; 1432 return false;
1433 } 1433 }
1434 1434
1435 #endif 1435 #endif
1436 1436
1437 } 1437 }
OLDNEW
« no previous file with comments | « Source/WebCore/page/FrameView.cpp ('k') | Source/WebCore/platform/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698