| 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 24 matching lines...) Expand all Loading... |
| 35 // TODO(ellyjones): remove this when Snow Leopard support is gone. | 35 // TODO(ellyjones): remove this when Snow Leopard support is gone. |
| 36 #if OS(MACOSX) | 36 #if OS(MACOSX) |
| 37 #include "platform/mac/VersionUtilMac.h" | 37 #include "platform/mac/VersionUtilMac.h" |
| 38 #endif | 38 #endif |
| 39 #include "platform/scroll/ScrollAnimatorBase.h" | 39 #include "platform/scroll/ScrollAnimatorBase.h" |
| 40 #include "platform/scroll/ScrollableArea.h" | 40 #include "platform/scroll/ScrollableArea.h" |
| 41 #include "platform/scroll/ScrollbarTheme.h" | 41 #include "platform/scroll/ScrollbarTheme.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 PassRefPtrWillBeRawPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableAr
ea, ScrollbarOrientation orientation, ScrollbarControlSize size, HostWindow* hos
tWindow) | 45 RawPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, ScrollbarOri
entation orientation, ScrollbarControlSize size, HostWindow* hostWindow) |
| 46 { | 46 { |
| 47 return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size, h
ostWindow)); | 47 return (new Scrollbar(scrollableArea, orientation, size, hostWindow)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 PassRefPtrWillBeRawPtr<Scrollbar> Scrollbar::createForTesting(ScrollableArea* sc
rollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size, Scrol
lbarTheme* theme) | 50 RawPtr<Scrollbar> Scrollbar::createForTesting(ScrollableArea* scrollableArea, Sc
rollbarOrientation orientation, ScrollbarControlSize size, ScrollbarTheme* theme
) |
| 51 { | 51 { |
| 52 return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size, n
ullptr, theme)); | 52 return (new Scrollbar(scrollableArea, orientation, size, nullptr, theme)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, HostWindow* hostWindow, ScrollbarTheme*
theme) | 55 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, HostWindow* hostWindow, ScrollbarTheme*
theme) |
| 56 : m_scrollableArea(scrollableArea) | 56 : m_scrollableArea(scrollableArea) |
| 57 , m_orientation(orientation) | 57 , m_orientation(orientation) |
| 58 , m_controlSize(controlSize) | 58 , m_controlSize(controlSize) |
| 59 , m_theme(theme ? *theme : ScrollbarTheme::theme()) | 59 , m_theme(theme ? *theme : ScrollbarTheme::theme()) |
| 60 , m_hostWindow(hostWindow) | 60 , m_hostWindow(hostWindow) |
| 61 , m_visibleSize(0) | 61 , m_visibleSize(0) |
| 62 , m_totalSize(0) | 62 , m_totalSize(0) |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 invalidParts = AllParts; | 580 invalidParts = AllParts; |
| 581 if (invalidParts & ~ThumbPart) | 581 if (invalidParts & ~ThumbPart) |
| 582 m_trackNeedsRepaint = true; | 582 m_trackNeedsRepaint = true; |
| 583 if (invalidParts & ThumbPart) | 583 if (invalidParts & ThumbPart) |
| 584 m_thumbNeedsRepaint = true; | 584 m_thumbNeedsRepaint = true; |
| 585 if (m_scrollableArea) | 585 if (m_scrollableArea) |
| 586 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); | 586 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); |
| 587 } | 587 } |
| 588 | 588 |
| 589 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |