| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 Scrollbar* hScrollbar = horizontalScrollbar(); | 394 Scrollbar* hScrollbar = horizontalScrollbar(); |
| 395 return hScrollbar && hScrollbar->isOverlayScrollbar(); | 395 return hScrollbar && hScrollbar->isOverlayScrollbar(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void ScrollableArea::setScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle
) | 398 void ScrollableArea::setScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle
) |
| 399 { | 399 { |
| 400 m_scrollbarOverlayStyle = overlayStyle; | 400 m_scrollbarOverlayStyle = overlayStyle; |
| 401 | 401 |
| 402 if (Scrollbar* scrollbar = horizontalScrollbar()) { | 402 if (Scrollbar* scrollbar = horizontalScrollbar()) { |
| 403 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); | 403 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); |
| 404 setScrollbarNeedsPaintInvalidation(HorizontalScrollbar); | 404 scrollbar->setNeedsPaintInvalidation(AllParts); |
| 405 } | 405 } |
| 406 | 406 |
| 407 if (Scrollbar* scrollbar = verticalScrollbar()) { | 407 if (Scrollbar* scrollbar = verticalScrollbar()) { |
| 408 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); | 408 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); |
| 409 setScrollbarNeedsPaintInvalidation(VerticalScrollbar); | 409 scrollbar->setNeedsPaintInvalidation(AllParts); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 void ScrollableArea::setScrollbarNeedsPaintInvalidation(ScrollbarOrientation ori
entation) | 413 void ScrollableArea::setScrollbarNeedsPaintInvalidation(ScrollbarOrientation ori
entation) |
| 414 { | 414 { |
| 415 if (orientation == HorizontalScrollbar) { | 415 if (orientation == HorizontalScrollbar) { |
| 416 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { | 416 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { |
| 417 graphicsLayer->setNeedsDisplay(); | 417 graphicsLayer->setNeedsDisplay(); |
| 418 graphicsLayer->setContentsNeedsDisplay(); | 418 graphicsLayer->setContentsNeedsDisplay(); |
| 419 } | 419 } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 std::max(0, size.height() - horizontalScrollbarHeight)); | 609 std::max(0, size.height() - horizontalScrollbarHeight)); |
| 610 } | 610 } |
| 611 | 611 |
| 612 DEFINE_TRACE(ScrollableArea) | 612 DEFINE_TRACE(ScrollableArea) |
| 613 { | 613 { |
| 614 visitor->trace(m_scrollAnimator); | 614 visitor->trace(m_scrollAnimator); |
| 615 visitor->trace(m_programmaticScrollAnimator); | 615 visitor->trace(m_programmaticScrollAnimator); |
| 616 } | 616 } |
| 617 | 617 |
| 618 } // namespace blink | 618 } // namespace blink |
| OLD | NEW |