| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // 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 are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include <windows.h> | 32 #include <windows.h> |
| 33 #include <vsstyle.h> | 33 #include <vsstyle.h> |
| 34 #include "FrameView.h" | 34 #include "FrameView.h" |
| 35 #include "GraphicsContext.h" | 35 #include "GraphicsContext.h" |
| 36 #include "IntRect.h" | 36 #include "IntRect.h" |
| 37 #include "NativeImageSkia.h" | 37 #include "NativeImageSkia.h" |
| 38 #include "PlatformMouseEvent.h" | 38 #include "PlatformMouseEvent.h" |
| 39 #include "PlatformScrollBar.h" | 39 #include "PlatformScrollBar.h" |
| 40 #include "Range.h" | 40 #include "Range.h" |
| 41 #include "ScrollView.h" | 41 #include "ScrollView.h" |
| 42 #include "WidgetClientWin.h" | 42 #include "WidgetClientChromium.h" |
| 43 | 43 |
| 44 #include "graphics/SkiaUtils.h" | 44 #include "graphics/SkiaUtils.h" |
| 45 | 45 |
| 46 #undef LOG | 46 #undef LOG |
| 47 #include "base/gfx/native_theme.h" | 47 #include "base/gfx/native_theme.h" |
| 48 #include "base/gfx/platform_canvas_win.h" | 48 #include "base/gfx/platform_canvas_win.h" |
| 49 #include "base/win_util.h" | 49 #include "base/win_util.h" |
| 50 #include "webkit/glue/webframe_impl.h" | 50 #include "webkit/glue/webframe_impl.h" |
| 51 #include "webkit/glue/webkit_glue.h" | 51 #include "webkit/glue/webkit_glue.h" |
| 52 | 52 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 134 } |
| 135 | 135 |
| 136 void PlatformScrollbar::DrawTickmarks(GraphicsContext* context) const | 136 void PlatformScrollbar::DrawTickmarks(GraphicsContext* context) const |
| 137 { | 137 { |
| 138 // We don't draw on the horizontal scrollbar. It is too confusing | 138 // We don't draw on the horizontal scrollbar. It is too confusing |
| 139 // to have the tickmarks appear on both scrollbars. | 139 // to have the tickmarks appear on both scrollbars. |
| 140 const bool horz = orientation() == HorizontalScrollbar; | 140 const bool horz = orientation() == HorizontalScrollbar; |
| 141 if (horz) | 141 if (horz) |
| 142 return; | 142 return; |
| 143 | 143 |
| 144 // We need to as the WidgetClientWin for the bitmap to use to draw. | 144 // We need to as the WidgetClientChromium for the bitmap to use to draw. |
| 145 WidgetClientWin* widget_client = static_cast<WidgetClientWin*>( | 145 WidgetClientChromium* widget_client = static_cast<WidgetClientChromium*>( |
| 146 WebCore::Widget::client()); | 146 WebCore::Widget::client()); |
| 147 if (!widget_client) | 147 if (!widget_client) |
| 148 return; // Cannot draw without access to the bitmap. | 148 return; // Cannot draw without access to the bitmap. |
| 149 | 149 |
| 150 // Get the frame view this scroll bar belongs to. | 150 // Get the frame view this scroll bar belongs to. |
| 151 FrameView* view = reinterpret_cast<FrameView*>(parent()); | 151 FrameView* view = reinterpret_cast<FrameView*>(parent()); |
| 152 ASSERT(view); | 152 ASSERT(view); |
| 153 | 153 |
| 154 // A frame can be null if this function is called for the scroll views | 154 // A frame can be null if this function is called for the scroll views |
| 155 // used when drawing drop-down boxes. We don't need to draw anything in | 155 // used when drawing drop-down boxes. We don't need to draw anything in |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 if (!m_enabled) | 787 if (!m_enabled) |
| 788 return DFCS_INACTIVE; | 788 return DFCS_INACTIVE; |
| 789 if ((m_mouseOver != target) || (target == Track)) | 789 if ((m_mouseOver != target) || (target == Track)) |
| 790 return 0; | 790 return 0; |
| 791 if (m_captureStart == None) | 791 if (m_captureStart == None) |
| 792 return DFCS_HOT; | 792 return DFCS_HOT; |
| 793 return (m_captureStart == target) ? (DFCS_PUSHED | DFCS_FLAT) : 0; | 793 return (m_captureStart == target) ? (DFCS_PUSHED | DFCS_FLAT) : 0; |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // namespace WebCore | 796 } // namespace WebCore |
| OLD | NEW |