| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 FrameView::~FrameView() | 150 FrameView::~FrameView() |
| 151 { | 151 { |
| 152 if (m_postLayoutTasksTimer.isActive()) | 152 if (m_postLayoutTasksTimer.isActive()) |
| 153 m_postLayoutTasksTimer.stop(); | 153 m_postLayoutTasksTimer.stop(); |
| 154 | 154 |
| 155 if (m_didScrollTimer.isActive()) | 155 if (m_didScrollTimer.isActive()) |
| 156 m_didScrollTimer.stop(); | 156 m_didScrollTimer.stop(); |
| 157 | 157 |
| 158 removeFromAXObjectCache(); | 158 removeFromAXObjectCache(); |
| 159 resetScrollbars(); |
| 159 | 160 |
| 160 // Custom scrollbars should already be destroyed at this point | 161 // Custom scrollbars should already be destroyed at this point |
| 161 ASSERT(!horizontalScrollbar() || !horizontalScrollbar()->isCustomScrollbar()
); | 162 ASSERT(!horizontalScrollbar() || !horizontalScrollbar()->isCustomScrollbar()
); |
| 162 ASSERT(!verticalScrollbar() || !verticalScrollbar()->isCustomScrollbar()); | 163 ASSERT(!verticalScrollbar() || !verticalScrollbar()->isCustomScrollbar()); |
| 163 | 164 |
| 164 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we
lose the connection to the HostWindow. | 165 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we
lose the connection to the HostWindow. |
| 165 setHasVerticalScrollbar(false); | 166 setHasVerticalScrollbar(false); |
| 166 | 167 |
| 167 ASSERT(!m_scrollCorner); | 168 ASSERT(!m_scrollCorner); |
| 168 | 169 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 m_maintainScrollPositionAnchor = nullptr; | 206 m_maintainScrollPositionAnchor = nullptr; |
| 206 m_viewportConstrainedObjects.clear(); | 207 m_viewportConstrainedObjects.clear(); |
| 207 } | 208 } |
| 208 | 209 |
| 209 void FrameView::removeFromAXObjectCache() | 210 void FrameView::removeFromAXObjectCache() |
| 210 { | 211 { |
| 211 if (AXObjectCache* cache = axObjectCache()) | 212 if (AXObjectCache* cache = axObjectCache()) |
| 212 cache->remove(this); | 213 cache->remove(this); |
| 213 } | 214 } |
| 214 | 215 |
| 216 void FrameView::resetScrollbars() |
| 217 { |
| 218 // Reset the document's scrollbars back to our defaults before we yield the
floor. |
| 219 m_firstLayout = true; |
| 220 setScrollbarsSuppressed(true); |
| 221 if (m_canHaveScrollbars) |
| 222 setScrollbarModes(ScrollbarAuto, ScrollbarAuto); |
| 223 else |
| 224 setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff); |
| 225 setScrollbarsSuppressed(false); |
| 226 } |
| 227 |
| 215 void FrameView::init() | 228 void FrameView::init() |
| 216 { | 229 { |
| 217 reset(); | 230 reset(); |
| 218 | 231 |
| 219 m_size = LayoutSize(); | 232 m_size = LayoutSize(); |
| 220 | 233 |
| 221 // Propagate the marginwidth/height and scrolling modes to the view. | 234 // Propagate the marginwidth/height and scrolling modes to the view. |
| 222 // FIXME: Do we need to do this for OOPI? | 235 // FIXME: Do we need to do this for OOPI? |
| 223 Element* ownerElement = m_frame->deprecatedLocalOwner(); | 236 Element* ownerElement = m_frame->deprecatedLocalOwner(); |
| 224 if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElemen
t(*ownerElement))) { | 237 if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElemen
t(*ownerElement))) { |
| (...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3000 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3013 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3001 { | 3014 { |
| 3002 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3015 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3003 if (AXObjectCache* cache = axObjectCache()) { | 3016 if (AXObjectCache* cache = axObjectCache()) { |
| 3004 cache->remove(scrollbar); | 3017 cache->remove(scrollbar); |
| 3005 cache->handleScrollbarUpdate(this); | 3018 cache->handleScrollbarUpdate(this); |
| 3006 } | 3019 } |
| 3007 } | 3020 } |
| 3008 | 3021 |
| 3009 } // namespace blink | 3022 } // namespace blink |
| OLD | NEW |