Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 33d9832cf69ce6f50d356cc756e60ada57f9d7c9..4438f1d78be485220402c6c437e314bf9be7731e 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -777,8 +777,7 @@ void RenderWidgetHostViewWin::SelectionBoundsChanged(
text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD);
// Only update caret position if the input method is enabled.
if (is_enabled) {
- caret_rect_ = start_rect;
- caret_rect_.Union(end_rect);
+ caret_rect_ = gfx::UnionRects(start_rect, end_rect);
ime_input_.UpdateCaretRect(m_hWnd, caret_rect_);
}
}
@@ -1364,8 +1363,8 @@ void RenderWidgetHostViewWin::OnPaint(HDC unused_dc) {
}
for (DWORD i = 0; i < region_data->rdh.nCount; ++i) {
- gfx::Rect paint_rect = bitmap_rect;
- paint_rect.Intersect(gfx::Rect(region_rects[i]));
+ gfx::Rect paint_rect =
+ gfx::IntersectRects(bitmap_rect, gfx::Rect(region_rects[i]));
if (!paint_rect.IsEmpty()) {
BitBlt(paint_dc.m_hDC,
paint_rect.x(),
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698