| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
| 10 | 10 |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); | 1506 DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); |
| 1507 if (whiteout_start_time_.is_null()) | 1507 if (whiteout_start_time_.is_null()) |
| 1508 whiteout_start_time_ = TimeTicks::Now(); | 1508 whiteout_start_time_ = TimeTicks::Now(); |
| 1509 } | 1509 } |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, | 1512 void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, |
| 1513 CPaintDC* dc) { | 1513 CPaintDC* dc) { |
| 1514 if (!background_.empty()) { | 1514 if (!background_.empty()) { |
| 1515 gfx::Rect dirty_area(dirty_rect); | 1515 gfx::Rect dirty_area(dirty_rect); |
| 1516 gfx::Canvas canvas(dirty_area.size(), true); | 1516 gfx::Canvas canvas(dirty_area.size(), ui::SCALE_FACTOR_100P, true); |
| 1517 canvas.Translate(gfx::Point().Subtract(dirty_area.origin())); | 1517 canvas.Translate(gfx::Point().Subtract(dirty_area.origin())); |
| 1518 | 1518 |
| 1519 gfx::Rect dc_rect(dc->m_ps.rcPaint); | 1519 gfx::Rect dc_rect(dc->m_ps.rcPaint); |
| 1520 canvas.TileImageInt(background_, 0, 0, dc_rect.width(), dc_rect.height()); | 1520 canvas.TileImageInt(background_, 0, 0, dc_rect.width(), dc_rect.height()); |
| 1521 | 1521 |
| 1522 skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), | 1522 skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), |
| 1523 dirty_area.y(), NULL); | 1523 dirty_area.y(), NULL); |
| 1524 } else { | 1524 } else { |
| 1525 HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); | 1525 HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); |
| 1526 dc->FillRect(&dirty_rect, white_brush); | 1526 dc->FillRect(&dirty_rect, white_brush); |
| (...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3148 void RenderWidgetHostViewWin::ResetPointerDownContext() { | 3148 void RenderWidgetHostViewWin::ResetPointerDownContext() { |
| 3149 // If the default focus on the page is on an edit field and we did not | 3149 // If the default focus on the page is on an edit field and we did not |
| 3150 // receive a focus change in the context of a pointer down message, it means | 3150 // receive a focus change in the context of a pointer down message, it means |
| 3151 // that the pointer down message occurred on the edit field and we should | 3151 // that the pointer down message occurred on the edit field and we should |
| 3152 // display the on screen keyboard | 3152 // display the on screen keyboard |
| 3153 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3153 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
| 3154 DisplayOnScreenKeyboardIfNeeded(); | 3154 DisplayOnScreenKeyboardIfNeeded(); |
| 3155 received_focus_change_after_pointer_down_ = false; | 3155 received_focus_change_after_pointer_down_ = false; |
| 3156 pointer_down_context_ = false; | 3156 pointer_down_context_ = false; |
| 3157 } | 3157 } |
| OLD | NEW |