| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2011 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 ScrollbarPart ScrollbarThemeMac::invalidateOnThumbPositionChange( | 198 ScrollbarPart ScrollbarThemeMac::invalidateOnThumbPositionChange( |
| 199 const ScrollbarThemeClient& scrollbar, | 199 const ScrollbarThemeClient& scrollbar, |
| 200 float oldPosition, | 200 float oldPosition, |
| 201 float newPosition) const { | 201 float newPosition) const { |
| 202 // ScrollAnimatorMac will invalidate scrollbar parts if necessary. | 202 // ScrollAnimatorMac will invalidate scrollbar parts if necessary. |
| 203 return NoPart; | 203 return NoPart; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void ScrollbarThemeMac::registerScrollbar(ScrollbarThemeClient& scrollbar) { | 206 void ScrollbarThemeMac::registerScrollbar(ScrollbarThemeClient& scrollbar) { |
| 207 scrollbarSet().add(&scrollbar); | 207 scrollbarSet().insert(&scrollbar); |
| 208 | 208 |
| 209 bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar; | 209 bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar; |
| 210 RetainPtr<ScrollbarPainter> scrollbarPainter( | 210 RetainPtr<ScrollbarPainter> scrollbarPainter( |
| 211 AdoptNS, [[NSClassFromString(@"NSScrollerImp") | 211 AdoptNS, [[NSClassFromString(@"NSScrollerImp") |
| 212 scrollerImpWithStyle:recommendedScrollerStyle() | 212 scrollerImpWithStyle:recommendedScrollerStyle() |
| 213 controlSize:(NSControlSize)scrollbar.controlSize() | 213 controlSize:(NSControlSize)scrollbar.controlSize() |
| 214 horizontal:isHorizontal | 214 horizontal:isHorizontal |
| 215 replacingScrollerImp:nil] retain]); | 215 replacingScrollerImp:nil] retain]); |
| 216 RetainPtr<BlinkScrollbarObserver> observer( | 216 RetainPtr<BlinkScrollbarObserver> observer( |
| 217 AdoptNS, | 217 AdoptNS, |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 409 } |
| 410 | 410 |
| 411 // static | 411 // static |
| 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { | 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { |
| 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) | 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) |
| 414 return NSScrollerStyleOverlay; | 414 return NSScrollerStyleOverlay; |
| 415 return gPreferredScrollerStyle; | 415 return gPreferredScrollerStyle; |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |