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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 399 |
400 if (Scrollbar* scrollbar = verticalScrollbar()) { | 400 if (Scrollbar* scrollbar = verticalScrollbar()) { |
401 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(scrollbar); | 401 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(scrollbar); |
402 setScrollbarNeedsPaintInvalidation(scrollbar); | 402 setScrollbarNeedsPaintInvalidation(scrollbar); |
403 } | 403 } |
404 } | 404 } |
405 | 405 |
406 void ScrollableArea::setScrollbarNeedsPaintInvalidation(Scrollbar* scrollbar) | 406 void ScrollableArea::setScrollbarNeedsPaintInvalidation(Scrollbar* scrollbar) |
407 { | 407 { |
408 if (scrollbar == horizontalScrollbar()) { | 408 if (scrollbar == horizontalScrollbar()) { |
| 409 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { |
| 410 graphicsLayer->setNeedsDisplay(); |
| 411 graphicsLayer->setContentsNeedsDisplay(); |
| 412 return; |
| 413 } |
409 m_horizontalScrollbarNeedsPaintInvalidation = true; | 414 m_horizontalScrollbarNeedsPaintInvalidation = true; |
410 scrollControlWasSetNeedsPaintInvalidation(); | 415 scrollControlWasSetNeedsPaintInvalidation(); |
411 return; | 416 return; |
412 } | 417 } |
413 if (scrollbar == verticalScrollbar()) { | 418 if (scrollbar == verticalScrollbar()) { |
| 419 if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) { |
| 420 graphicsLayer->setNeedsDisplay(); |
| 421 graphicsLayer->setContentsNeedsDisplay(); |
| 422 return; |
| 423 } |
414 m_verticalScrollbarNeedsPaintInvalidation = true; | 424 m_verticalScrollbarNeedsPaintInvalidation = true; |
415 scrollControlWasSetNeedsPaintInvalidation(); | 425 scrollControlWasSetNeedsPaintInvalidation(); |
416 return; | 426 return; |
417 } | 427 } |
418 // Otherwise the scrollbar is just created and has not been set as either | 428 // Otherwise the scrollbar is just created and has not been set as either |
419 // horizontalScrollbar() or verticalScrollbar(). | 429 // horizontalScrollbar() or verticalScrollbar(). |
420 } | 430 } |
421 | 431 |
422 void ScrollableArea::setScrollCornerNeedsPaintInvalidation() | 432 void ScrollableArea::setScrollCornerNeedsPaintInvalidation() |
423 { | 433 { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 583 |
574 } | 584 } |
575 | 585 |
576 DEFINE_TRACE(ScrollableArea) | 586 DEFINE_TRACE(ScrollableArea) |
577 { | 587 { |
578 visitor->trace(m_scrollAnimator); | 588 visitor->trace(m_scrollAnimator); |
579 visitor->trace(m_programmaticScrollAnimator); | 589 visitor->trace(m_programmaticScrollAnimator); |
580 } | 590 } |
581 | 591 |
582 } // namespace blink | 592 } // namespace blink |
OLD | NEW |