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

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

Issue 2501493002: Revert "MainFrame scrollbars should work with RFV instead of FV" (Closed)
Patch Set: 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 return (horizontalScrollbar() && 392 Scrollbar* vScrollbar = verticalScrollbar();
393 horizontalScrollbar()->isOverlayScrollbar()) || 393 if (vScrollbar && vScrollbar->isOverlayScrollbar())
394 (verticalScrollbar() && verticalScrollbar()->isOverlayScrollbar()); 394 return true;
395 Scrollbar* hScrollbar = horizontalScrollbar();
396 return hScrollbar && hScrollbar->isOverlayScrollbar();
395 } 397 }
396 398
397 void ScrollableArea::setScrollbarOverlayColorTheme( 399 void ScrollableArea::setScrollbarOverlayColorTheme(
398 ScrollbarOverlayColorTheme overlayTheme) { 400 ScrollbarOverlayColorTheme overlayTheme) {
399 m_scrollbarOverlayColorTheme = overlayTheme; 401 m_scrollbarOverlayColorTheme = overlayTheme;
400 402
401 if (Scrollbar* scrollbar = horizontalScrollbar()) { 403 if (Scrollbar* scrollbar = horizontalScrollbar()) {
402 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar); 404 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar);
403 scrollbar->setNeedsPaintInvalidation(AllParts); 405 scrollbar->setNeedsPaintInvalidation(AllParts);
404 } 406 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), 654 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()),
653 std::max(0, size.height() - horizontalScrollbarHeight())); 655 std::max(0, size.height() - horizontalScrollbarHeight()));
654 } 656 }
655 657
656 DEFINE_TRACE(ScrollableArea) { 658 DEFINE_TRACE(ScrollableArea) {
657 visitor->trace(m_scrollAnimator); 659 visitor->trace(m_scrollAnimator);
658 visitor->trace(m_programmaticScrollAnimator); 660 visitor->trace(m_programmaticScrollAnimator);
659 } 661 }
660 662
661 } // namespace blink 663 } // 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