OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 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 29 matching lines...) Expand all Loading... |
40 #include "core/page/FrameView.h" | 40 #include "core/page/FrameView.h" |
41 #include "core/platform/Cursor.h" | 41 #include "core/platform/Cursor.h" |
42 #include "core/platform/NotImplemented.h" | 42 #include "core/platform/NotImplemented.h" |
43 #include "core/platform/PlatformGestureEvent.h" | 43 #include "core/platform/PlatformGestureEvent.h" |
44 #include "core/platform/PlatformKeyboardEvent.h" | 44 #include "core/platform/PlatformKeyboardEvent.h" |
45 #include "core/platform/PlatformMouseEvent.h" | 45 #include "core/platform/PlatformMouseEvent.h" |
46 #include "core/platform/PlatformWheelEvent.h" | 46 #include "core/platform/PlatformWheelEvent.h" |
47 #include "core/platform/chromium/FramelessScrollView.h" | 47 #include "core/platform/chromium/FramelessScrollView.h" |
48 #include "core/platform/chromium/PopupContainer.h" | 48 #include "core/platform/chromium/PopupContainer.h" |
49 #include "core/platform/chromium/PopupMenuChromium.h" | 49 #include "core/platform/chromium/PopupMenuChromium.h" |
| 50 #include "core/platform/graphics/GraphicsContext.h" |
50 #include "core/platform/graphics/IntRect.h" | 51 #include "core/platform/graphics/IntRect.h" |
51 #include "core/platform/graphics/skia/SkiaUtils.h" | 52 #include "core/platform/graphics/skia/SkiaUtils.h" |
52 #include "painting/GraphicsContextBuilder.h" | |
53 #include <public/WebRect.h> | 53 #include <public/WebRect.h> |
54 | 54 |
55 using namespace WebCore; | 55 using namespace WebCore; |
56 | 56 |
57 namespace WebKit { | 57 namespace WebKit { |
58 | 58 |
59 // WebPopupMenu --------------------------------------------------------------- | 59 // WebPopupMenu --------------------------------------------------------------- |
60 | 60 |
61 WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) | 61 WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) |
62 { | 62 { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 void WebPopupMenuImpl::layout() | 187 void WebPopupMenuImpl::layout() |
188 { | 188 { |
189 } | 189 } |
190 | 190 |
191 void WebPopupMenuImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOption
s) | 191 void WebPopupMenuImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOption
s) |
192 { | 192 { |
193 if (!m_widget) | 193 if (!m_widget) |
194 return; | 194 return; |
195 | 195 |
196 if (!rect.isEmpty()) { | 196 if (!rect.isEmpty()) { |
197 GraphicsContextBuilder builder(canvas); | 197 GraphicsContext context(canvas); |
198 GraphicsContext& context = builder.context(); | |
199 context.applyDeviceScaleFactor(m_client->deviceScaleFactor()); | 198 context.applyDeviceScaleFactor(m_client->deviceScaleFactor()); |
200 m_widget->paint(&context, rect); | 199 m_widget->paint(&context, rect); |
201 } | 200 } |
202 } | 201 } |
203 | 202 |
204 void WebPopupMenuImpl::themeChanged() | 203 void WebPopupMenuImpl::themeChanged() |
205 { | 204 { |
206 notImplemented(); | 205 notImplemented(); |
207 } | 206 } |
208 | 207 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 ASSERT(widget == m_widget); | 400 ASSERT(widget == m_widget); |
402 if (m_widget) { | 401 if (m_widget) { |
403 m_widget->setClient(0); | 402 m_widget->setClient(0); |
404 m_widget = 0; | 403 m_widget = 0; |
405 } | 404 } |
406 if (m_client) | 405 if (m_client) |
407 m_client->closeWidgetSoon(); | 406 m_client->closeWidgetSoon(); |
408 } | 407 } |
409 | 408 |
410 } // namespace WebKit | 409 } // namespace WebKit |
OLD | NEW |