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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 2838513003: ScrollAnimatorMac should post contentAreaScrolled only for explicit scrolls. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h ('k') | 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 // Tell the scrollbars to update their thumb postions. 277 // Tell the scrollbars to update their thumb postions.
278 // If the scrollbar does not have its own layer, it must always be 278 // If the scrollbar does not have its own layer, it must always be
279 // invalidated to reflect the new thumb offset, even if the theme did not 279 // invalidated to reflect the new thumb offset, even if the theme did not
280 // invalidate any individual part. 280 // invalidate any individual part.
281 if (Scrollbar* horizontal_scrollbar = this->HorizontalScrollbar()) 281 if (Scrollbar* horizontal_scrollbar = this->HorizontalScrollbar())
282 horizontal_scrollbar->OffsetDidChange(); 282 horizontal_scrollbar->OffsetDidChange();
283 if (Scrollbar* vertical_scrollbar = this->VerticalScrollbar()) 283 if (Scrollbar* vertical_scrollbar = this->VerticalScrollbar())
284 vertical_scrollbar->OffsetDidChange(); 284 vertical_scrollbar->OffsetDidChange();
285 285
286 if (GetScrollOffset() != old_offset) 286 if (GetScrollOffset() != old_offset) {
287 GetScrollAnimator().NotifyContentAreaScrolled(GetScrollOffset() - 287 GetScrollAnimator().NotifyContentAreaScrolled(
288 old_offset); 288 GetScrollOffset() - old_offset, scroll_type);
289 }
289 290
290 GetScrollAnimator().SetCurrentOffset(offset); 291 GetScrollAnimator().SetCurrentOffset(offset);
291 } 292 }
292 293
293 bool ScrollableArea::ScrollBehaviorFromString(const String& behavior_string, 294 bool ScrollableArea::ScrollBehaviorFromString(const String& behavior_string,
294 ScrollBehavior& behavior) { 295 ScrollBehavior& behavior) {
295 if (behavior_string == "auto") 296 if (behavior_string == "auto")
296 behavior = kScrollBehaviorAuto; 297 behavior = kScrollBehaviorAuto;
297 else if (behavior_string == "instant") 298 else if (behavior_string == "instant")
298 behavior = kScrollBehaviorInstant; 299 behavior = kScrollBehaviorInstant;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 offset.y() - ScrollOrigin().Y()); 671 offset.y() - ScrollOrigin().Y());
671 SetScrollOffset(new_offset, kCompositorScroll); 672 SetScrollOffset(new_offset, kCompositorScroll);
672 } 673 }
673 674
674 DEFINE_TRACE(ScrollableArea) { 675 DEFINE_TRACE(ScrollableArea) {
675 visitor->Trace(scroll_animator_); 676 visitor->Trace(scroll_animator_);
676 visitor->Trace(programmatic_scroll_animator_); 677 visitor->Trace(programmatic_scroll_animator_);
677 } 678 }
678 679
679 } // namespace blink 680 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698