| OLD | NEW |
| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 scrollAnimator->willRemoveHorizontalScrollbar(scrollbar); | 376 scrollAnimator->willRemoveHorizontalScrollbar(scrollbar); |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 | 379 |
| 380 void ScrollableArea::contentsResized() { | 380 void ScrollableArea::contentsResized() { |
| 381 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) | 381 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) |
| 382 scrollAnimator->contentsResized(); | 382 scrollAnimator->contentsResized(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 bool ScrollableArea::hasOverlayScrollbars() const { | 385 bool ScrollableArea::hasOverlayScrollbars() const { |
| 386 Scrollbar* vScrollbar = verticalScrollbar(); | 386 return (horizontalScrollbar() && |
| 387 if (vScrollbar && vScrollbar->isOverlayScrollbar()) | 387 horizontalScrollbar()->isOverlayScrollbar()) || |
| 388 return true; | 388 (verticalScrollbar() && verticalScrollbar()->isOverlayScrollbar()); |
| 389 Scrollbar* hScrollbar = horizontalScrollbar(); | |
| 390 return hScrollbar && hScrollbar->isOverlayScrollbar(); | |
| 391 } | 389 } |
| 392 | 390 |
| 393 void ScrollableArea::setScrollbarOverlayColorTheme( | 391 void ScrollableArea::setScrollbarOverlayColorTheme( |
| 394 ScrollbarOverlayColorTheme overlayTheme) { | 392 ScrollbarOverlayColorTheme overlayTheme) { |
| 395 m_scrollbarOverlayColorTheme = overlayTheme; | 393 m_scrollbarOverlayColorTheme = overlayTheme; |
| 396 | 394 |
| 397 if (Scrollbar* scrollbar = horizontalScrollbar()) { | 395 if (Scrollbar* scrollbar = horizontalScrollbar()) { |
| 398 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar); | 396 ScrollbarTheme::theme().updateScrollbarOverlayColorTheme(*scrollbar); |
| 399 scrollbar->setNeedsPaintInvalidation(AllParts); | 397 scrollbar->setNeedsPaintInvalidation(AllParts); |
| 400 } | 398 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), | 614 return IntSize(std::max(0, size.width() - verticalScrollbarWidth()), |
| 617 std::max(0, size.height() - horizontalScrollbarHeight())); | 615 std::max(0, size.height() - horizontalScrollbarHeight())); |
| 618 } | 616 } |
| 619 | 617 |
| 620 DEFINE_TRACE(ScrollableArea) { | 618 DEFINE_TRACE(ScrollableArea) { |
| 621 visitor->trace(m_scrollAnimator); | 619 visitor->trace(m_scrollAnimator); |
| 622 visitor->trace(m_programmaticScrollAnimator); | 620 visitor->trace(m_programmaticScrollAnimator); |
| 623 } | 621 } |
| 624 | 622 |
| 625 } // namespace blink | 623 } // namespace blink |
| OLD | NEW |