| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/platform/ScrollbarThemeClient.h" | 30 #include "core/platform/ScrollbarThemeClient.h" |
| 31 #include "core/platform/graphics/GraphicsContext.h" | 31 #include "core/platform/graphics/GraphicsContext.h" |
| 32 #include "core/platform/mock/ScrollbarThemeMock.h" | 32 #include "core/platform/mock/ScrollbarThemeMock.h" |
| 33 #include "core/platform/mock/ScrollbarThemeOverlayMock.h" | 33 #include "core/platform/mock/ScrollbarThemeOverlayMock.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 ScrollbarTheme* ScrollbarTheme::theme() | 37 ScrollbarTheme* ScrollbarTheme::theme() |
| 38 { | 38 { |
| 39 if (Settings::mockScrollbarsEnabled()) { | 39 if (Settings::mockScrollbarsEnabled()) { |
| 40 if (Settings::usesOverlayScrollbars()) { | 40 if (Settings::mockScrollbarsUseOverlay()) { |
| 41 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, overlayMockTheme, ())
; | 41 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, overlayMockTheme, ())
; |
| 42 return &overlayMockTheme; | 42 return &overlayMockTheme; |
| 43 } | 43 } |
| 44 | 44 |
| 45 DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mockTheme, ()); | 45 DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mockTheme, ()); |
| 46 return &mockTheme; | 46 return &mockTheme; |
| 47 } | 47 } |
| 48 return nativeTheme(); | 48 return nativeTheme(); |
| 49 } | 49 } |
| 50 | 50 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 void ScrollbarTheme::paintOverhangBackground(ScrollView*, GraphicsContext* conte
xt, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect,
const IntRect& dirtyRect) | 301 void ScrollbarTheme::paintOverhangBackground(ScrollView*, GraphicsContext* conte
xt, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect,
const IntRect& dirtyRect) |
| 302 { | 302 { |
| 303 context->setFillColor(Color::white); | 303 context->setFillColor(Color::white); |
| 304 if (!horizontalOverhangRect.isEmpty()) | 304 if (!horizontalOverhangRect.isEmpty()) |
| 305 context->fillRect(intersection(horizontalOverhangRect, dirtyRect)); | 305 context->fillRect(intersection(horizontalOverhangRect, dirtyRect)); |
| 306 if (!verticalOverhangRect.isEmpty()) | 306 if (!verticalOverhangRect.isEmpty()) |
| 307 context->fillRect(intersection(verticalOverhangRect, dirtyRect)); | 307 context->fillRect(intersection(verticalOverhangRect, dirtyRect)); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } | 310 } |
| OLD | NEW |