| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 IntRect tickmarkTrackRect = rect; | 156 IntRect tickmarkTrackRect = rect; |
| 157 tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1); | 157 tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1); |
| 158 tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 2); | 158 tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 2); |
| 159 paintGivenTickmarks(context->canvas(), scrollbar, tickmarkTrackRect, tickmar
ks); | 159 paintGivenTickmarks(context->canvas(), scrollbar, tickmarkTrackRect, tickmar
ks); |
| 160 } | 160 } |
| 161 | 161 |
| 162 ScrollbarThemeMacCommon::~ScrollbarThemeMacCommon() | 162 ScrollbarThemeMacCommon::~ScrollbarThemeMacCommon() |
| 163 { | 163 { |
| 164 } | 164 } |
| 165 | 165 |
| 166 void ScrollbarThemeMacCommon::preferencesChanged(float initialButtonDelay, float
autoscrollButtonDelay, NSScrollerStyle preferredScrollerStyle, bool redraw, boo
l scrollAnimationEnabled, const std::string& buttonPlacement) | 166 void ScrollbarThemeMacCommon::preferencesChanged(float initialButtonDelay, float
autoscrollButtonDelay, NSScrollerStyle preferredScrollerStyle, bool redraw, boo
l scrollAnimationEnabled, ScrollbarButtonsPlacement buttonPlacement) |
| 167 { | 167 { |
| 168 updateButtonPlacement(buttonPlacement); | 168 updateButtonPlacement(buttonPlacement); |
| 169 gInitialButtonDelay = initialButtonDelay; | 169 gInitialButtonDelay = initialButtonDelay; |
| 170 gAutoscrollButtonDelay = autoscrollButtonDelay; | 170 gAutoscrollButtonDelay = autoscrollButtonDelay; |
| 171 gScrollAnimationEnabledForSystem = scrollAnimationEnabled; | 171 gScrollAnimationEnabledForSystem = scrollAnimationEnabled; |
| 172 bool sendScrollerStyleNotification = gPreferredScrollerStyle != preferredScr
ollerStyle; | 172 bool sendScrollerStyleNotification = gPreferredScrollerStyle != preferredScr
ollerStyle; |
| 173 gPreferredScrollerStyle = preferredScrollerStyle; | 173 gPreferredScrollerStyle = preferredScrollerStyle; |
| 174 if (redraw && !scrollbarSet().isEmpty()) { | 174 if (redraw && !scrollbarSet().isEmpty()) { |
| 175 ScrollbarSet::iterator end = scrollbarSet().end(); | 175 ScrollbarSet::iterator end = scrollbarSet().end(); |
| 176 for (ScrollbarSet::iterator it = scrollbarSet().begin(); it != end; ++it
) { | 176 for (ScrollbarSet::iterator it = scrollbarSet().begin(); it != end; ++it
) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // static | 235 // static |
| 236 bool ScrollbarThemeMacCommon::isOverlayAPIAvailable() | 236 bool ScrollbarThemeMacCommon::isOverlayAPIAvailable() |
| 237 { | 237 { |
| 238 static bool apiAvailable = | 238 static bool apiAvailable = |
| 239 [NSClassFromString(@"NSScrollerImp") respondsToSelector:@selector(scroll
erImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] | 239 [NSClassFromString(@"NSScrollerImp") respondsToSelector:@selector(scroll
erImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] |
| 240 && [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@
selector(scrollerStyle)]; | 240 && [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@
selector(scrollerStyle)]; |
| 241 return apiAvailable; | 241 return apiAvailable; |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace blink | 244 } // namespace blink |
| OLD | NEW |