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