| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 } else { | 289 } else { |
| 290 thumbRect = IntRect(trackRect.x(), trackRect.y() + thumbPos, scrollbar.w
idth(), thumbLength(scrollbar)); | 290 thumbRect = IntRect(trackRect.x(), trackRect.y() + thumbPos, scrollbar.w
idth(), thumbLength(scrollbar)); |
| 291 beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), trackRect.width(
), thumbPos + thumbRect.height() / 2); | 291 beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), trackRect.width(
), thumbPos + thumbRect.height() / 2); |
| 292 afterThumbRect = IntRect(trackRect.x(), trackRect.y() + beforeThumbRect.
height(), trackRect.width(), trackRect.maxY() - beforeThumbRect.maxY()); | 292 afterThumbRect = IntRect(trackRect.x(), trackRect.y() + beforeThumbRect.
height(), trackRect.width(), trackRect.maxY() - beforeThumbRect.maxY()); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 ScrollbarTheme& ScrollbarTheme::theme() | 296 ScrollbarTheme& ScrollbarTheme::theme() |
| 297 { | 297 { |
| 298 if (ScrollbarTheme::mockScrollbarsEnabled()) { | 298 if (ScrollbarTheme::mockScrollbarsEnabled()) { |
| 299 if (RuntimeEnabledFeatures::hideScrollbarsEnabled()) { |
| 300 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, hiddenMockTheme, (/*
hidden */ true)); |
| 301 return hiddenMockTheme; |
| 302 } |
| 299 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) { | 303 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) { |
| 300 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, overlayMockTheme, ())
; | 304 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, overlayMockTheme, ())
; |
| 301 return overlayMockTheme; | 305 return overlayMockTheme; |
| 302 } | 306 } |
| 303 | 307 |
| 304 DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mockTheme, ()); | 308 DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mockTheme, ()); |
| 305 return mockTheme; | 309 return mockTheme; |
| 306 } | 310 } |
| 307 return nativeTheme(); | 311 return nativeTheme(); |
| 308 } | 312 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 return DisplayItem::ScrollbarBackTrack; | 345 return DisplayItem::ScrollbarBackTrack; |
| 342 case ForwardTrackPart: | 346 case ForwardTrackPart: |
| 343 return DisplayItem::ScrollbarForwardTrack; | 347 return DisplayItem::ScrollbarForwardTrack; |
| 344 default: | 348 default: |
| 345 ASSERT_NOT_REACHED(); | 349 ASSERT_NOT_REACHED(); |
| 346 return DisplayItem::ScrollbarBackTrack; | 350 return DisplayItem::ScrollbarBackTrack; |
| 347 } | 351 } |
| 348 } | 352 } |
| 349 | 353 |
| 350 } // namespace blink | 354 } // namespace blink |
| OLD | NEW |