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

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

Issue 197213011: Selectively disable rubber banding on mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 } 3105 }
3106 3106
3107 void FrameView::removeChild(Widget* widget) 3107 void FrameView::removeChild(Widget* widget)
3108 { 3108 {
3109 if (widget->isFrameView()) 3109 if (widget->isFrameView())
3110 removeScrollableArea(toFrameView(widget)); 3110 removeScrollableArea(toFrameView(widget));
3111 3111
3112 ScrollView::removeChild(widget); 3112 ScrollView::removeChild(widget);
3113 } 3113 }
3114 3114
3115 bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent) 3115 bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent, bool canRubberb andLeft, bool canRubberbandRight)
3116 { 3116 {
3117 // Note that to allow for rubber-band over-scroll behavior, even non-scrolla ble views 3117 // Note that to allow for rubber-band over-scroll behavior, even non-scrolla ble views
3118 // should handle wheel events. 3118 // should handle wheel events.
3119 #if !USE(RUBBER_BANDING) 3119 #if !USE(RUBBER_BANDING)
3120 if (!isScrollable()) 3120 if (!isScrollable())
3121 return false; 3121 return false;
3122 #endif 3122 #endif
3123 3123
3124 // We don't allow mouse wheeling to happen in a ScrollView that has had its scrollbars explicitly disabled. 3124 // We don't allow mouse wheeling to happen in a ScrollView that has had its scrollbars explicitly disabled.
3125 if (!canHaveScrollbars()) 3125 if (!canHaveScrollbars())
3126 return false; 3126 return false;
3127 3127
3128 return ScrollableArea::handleWheelEvent(wheelEvent); 3128 return ScrollableArea::handleWheelEvent(wheelEvent, canRubberbandLeft, canRu bberbandRight);
3129 } 3129 }
3130 3130
3131 bool FrameView::isVerticalDocument() const 3131 bool FrameView::isVerticalDocument() const
3132 { 3132 {
3133 RenderView* renderView = this->renderView(); 3133 RenderView* renderView = this->renderView();
3134 if (!renderView) 3134 if (!renderView)
3135 return true; 3135 return true;
3136 3136
3137 return renderView->style()->isHorizontalWritingMode(); 3137 return renderView->style()->isHorizontalWritingMode();
3138 } 3138 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3193 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3194 { 3194 {
3195 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3195 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3196 if (AXObjectCache* cache = axObjectCache()) { 3196 if (AXObjectCache* cache = axObjectCache()) {
3197 cache->remove(scrollbar); 3197 cache->remove(scrollbar);
3198 cache->handleScrollbarUpdate(this); 3198 cache->handleScrollbarUpdate(this);
3199 } 3199 }
3200 } 3200 }
3201 3201
3202 } // namespace WebCore 3202 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698