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

Side by Side Diff: Source/core/platform/ScrollableArea.cpp

Issue 65573002: Remove Scrollbar dependency on AXObjectCache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/core/platform/ScrollableArea.h ('k') | Source/core/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) 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 268 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
269 scrollAnimator->contentAreaDidHide(); 269 scrollAnimator->contentAreaDidHide();
270 } 270 }
271 271
272 void ScrollableArea::finishCurrentScrollAnimations() const 272 void ScrollableArea::finishCurrentScrollAnimations() const
273 { 273 {
274 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 274 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
275 scrollAnimator->finishCurrentScrollAnimations(); 275 scrollAnimator->finishCurrentScrollAnimations();
276 } 276 }
277 277
278 void ScrollableArea::didAddVerticalScrollbar(Scrollbar* scrollbar) 278 void ScrollableArea::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
279 { 279 {
280 scrollAnimator()->didAddVerticalScrollbar(scrollbar); 280 if (orientation == VerticalScrollbar)
281 scrollAnimator()->didAddVerticalScrollbar(scrollbar);
282 else
283 scrollAnimator()->didAddHorizontalScrollbar(scrollbar);
281 284
282 // <rdar://problem/9797253> AppKit resets the scrollbar's style when you att ach a scrollbar 285 // <rdar://problem/9797253> AppKit resets the scrollbar's style when you att ach a scrollbar
283 setScrollbarOverlayStyle(scrollbarOverlayStyle()); 286 setScrollbarOverlayStyle(scrollbarOverlayStyle());
284 } 287 }
285 288
286 void ScrollableArea::willRemoveVerticalScrollbar(Scrollbar* scrollbar) 289 void ScrollableArea::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientat ion orientation)
287 { 290 {
288 scrollAnimator()->willRemoveVerticalScrollbar(scrollbar); 291 if (orientation == VerticalScrollbar)
289 } 292 scrollAnimator()->willRemoveVerticalScrollbar(scrollbar);
290 293 else
291 void ScrollableArea::didAddHorizontalScrollbar(Scrollbar* scrollbar) 294 scrollAnimator()->willRemoveHorizontalScrollbar(scrollbar);
292 {
293 scrollAnimator()->didAddHorizontalScrollbar(scrollbar);
294
295 // <rdar://problem/9797253> AppKit resets the scrollbar's style when you att ach a scrollbar
296 setScrollbarOverlayStyle(scrollbarOverlayStyle());
297 }
298
299 void ScrollableArea::willRemoveHorizontalScrollbar(Scrollbar* scrollbar)
300 {
301 scrollAnimator()->willRemoveHorizontalScrollbar(scrollbar);
302 } 295 }
303 296
304 void ScrollableArea::contentsResized() 297 void ScrollableArea::contentsResized()
305 { 298 {
306 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 299 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
307 scrollAnimator->contentsResized(); 300 scrollAnimator->contentsResized();
308 } 301 }
309 302
310 bool ScrollableArea::hasOverlayScrollbars() const 303 bool ScrollableArea::hasOverlayScrollbars() const
311 { 304 {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 { 401 {
409 return scrollSize(orientation); 402 return scrollSize(orientation);
410 } 403 }
411 404
412 float ScrollableArea::pixelStep(ScrollbarOrientation) const 405 float ScrollableArea::pixelStep(ScrollbarOrientation) const
413 { 406 {
414 return 1; 407 return 1;
415 } 408 }
416 409
417 } // namespace WebCore 410 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698