OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 void Scrollbar::setScrollbarsHidden(bool hidden) { | 524 void Scrollbar::setScrollbarsHidden(bool hidden) { |
525 if (m_scrollableArea) | 525 if (m_scrollableArea) |
526 m_scrollableArea->setScrollbarsHidden(hidden); | 526 m_scrollableArea->setScrollbarsHidden(hidden); |
527 } | 527 } |
528 | 528 |
529 void Scrollbar::setEnabled(bool e) { | 529 void Scrollbar::setEnabled(bool e) { |
530 if (m_enabled == e) | 530 if (m_enabled == e) |
531 return; | 531 return; |
532 m_enabled = e; | 532 m_enabled = e; |
533 theme().updateEnabledState(*this); | 533 theme().updateEnabledState(*this); |
534 setNeedsPaintInvalidation(AllParts); | 534 |
| 535 ScrollbarPart invalidParts = theme().invalidateOnEnabledChange(); |
| 536 setNeedsPaintInvalidation(invalidParts); |
535 } | 537 } |
536 | 538 |
537 int Scrollbar::scrollbarThickness() const { | 539 int Scrollbar::scrollbarThickness() const { |
538 int thickness = orientation() == HorizontalScrollbar ? height() : width(); | 540 int thickness = orientation() == HorizontalScrollbar ? height() : width(); |
539 if (!thickness || !m_hostWindow) | 541 if (!thickness || !m_hostWindow) |
540 return thickness; | 542 return thickness; |
541 return m_hostWindow->windowToViewportScalar(m_themeScrollbarThickness); | 543 return m_hostWindow->windowToViewportScalar(m_themeScrollbarThickness); |
542 } | 544 } |
543 | 545 |
544 bool Scrollbar::isOverlayScrollbar() const { | 546 bool Scrollbar::isOverlayScrollbar() const { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 invalidParts = AllParts; | 629 invalidParts = AllParts; |
628 if (invalidParts & ~ThumbPart) | 630 if (invalidParts & ~ThumbPart) |
629 m_trackNeedsRepaint = true; | 631 m_trackNeedsRepaint = true; |
630 if (invalidParts & ThumbPart) | 632 if (invalidParts & ThumbPart) |
631 m_thumbNeedsRepaint = true; | 633 m_thumbNeedsRepaint = true; |
632 if (m_scrollableArea) | 634 if (m_scrollableArea) |
633 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); | 635 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); |
634 } | 636 } |
635 | 637 |
636 } // namespace blink | 638 } // namespace blink |
OLD | NEW |