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

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

Issue 2454913003: MainFrame scrollbars should work with RFV instead of FV (Closed)
Patch Set: Fix broken chromeos bot Created 4 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
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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } 382 }
383 } 383 }
384 384
385 void ScrollableArea::contentsResized() { 385 void ScrollableArea::contentsResized() {
386 showOverlayScrollbars(); 386 showOverlayScrollbars();
387 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 387 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
388 scrollAnimator->contentsResized(); 388 scrollAnimator->contentsResized();
389 } 389 }
390 390
391 bool ScrollableArea::hasOverlayScrollbars() const { 391 bool ScrollableArea::hasOverlayScrollbars() const {
392 Scrollbar* vScrollbar = verticalScrollbar(); 392 return (horizontalScrollbar() &&
393 if (vScrollbar && vScrollbar->isOverlayScrollbar()) 393 horizontalScrollbar()->isOverlayScrollbar()) ||
394 return true; 394 (verticalScrollbar() && verticalScrollbar()->isOverlayScrollbar());
395 Scrollbar* hScrollbar = horizontalScrollbar();
396 return hScrollbar && hScrollbar->isOverlayScrollbar();
397 } 395 }
398 396
399 void ScrollableArea::setScrollbarOverlayColorTheme( 397 void ScrollableArea::setScrollbarOverlayColorTheme(
400 ScrollbarOverlayColorTheme overlayTheme) { 398 ScrollbarOverlayColorTheme overlayTheme) {
401 m_scrollbarOverlayColorTheme = overlayTheme; 399 m_scrollbarOverlayColorTheme = overlayTheme;
402 400
403 if (Scrollbar* scrollbar = horizontalScrollbar()) { 401 if (Scrollbar* scrollbar = horizontalScrollbar()) {
404 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar); 402 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar);
405 scrollbar->setNeedsPaintInvalidation(AllParts); 403 scrollbar->setNeedsPaintInvalidation(AllParts);
406 } 404 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), 652 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()),
655 std::max(0, size.height() - horizontalScrollbarHeight())); 653 std::max(0, size.height() - horizontalScrollbarHeight()));
656 } 654 }
657 655
658 DEFINE_TRACE(ScrollableArea) { 656 DEFINE_TRACE(ScrollableArea) {
659 visitor->trace(m_scrollAnimator); 657 visitor->trace(m_scrollAnimator);
660 visitor->trace(m_programmaticScrollAnimator); 658 visitor->trace(m_programmaticScrollAnimator);
661 } 659 }
662 660
663 } // namespace blink 661 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | third_party/WebKit/Source/platform/scroll/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698