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

Side by Side Diff: ui/views/view.cc

Issue 8383028: ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/view.h" 5 #include "ui/views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "ui/base/dragdrop/drag_drop_types.h" 10 #include "ui/base/dragdrop/drag_drop_types.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 545 }
546 546
547 // Painting -------------------------------------------------------------------- 547 // Painting --------------------------------------------------------------------
548 548
549 void View::Paint(gfx::Canvas* canvas) { 549 void View::Paint(gfx::Canvas* canvas) {
550 // Invisible views are not painted. 550 // Invisible views are not painted.
551 if (!visible_) 551 if (!visible_)
552 return; 552 return;
553 553
554 ScopedCanvasState canvas_state(canvas); 554 ScopedCanvasState canvas_state(canvas);
555 if (canvas->ClipRectInt(x(), y(), width(), height())) { 555 if (canvas->ClipRectInt(bounds_)) {
556 canvas->TranslateInt(x(), y()); 556 canvas->TranslateInt(x(), y());
557 // TODO(beng): RTL 557 // TODO(beng): RTL
558 ScopedCanvasState canvas_state(canvas); 558 ScopedCanvasState canvas_state(canvas);
559 OnPaint(canvas); 559 OnPaint(canvas);
560 PaintChildren(canvas); 560 PaintChildren(canvas);
561 } 561 }
562 } 562 }
563 563
564 // Input ----------------------------------------------------------------------- 564 // Input -----------------------------------------------------------------------
565 565
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 void View::WriteDragData(const gfx::Point& point, OSExchangeData* data) { 655 void View::WriteDragData(const gfx::Point& point, OSExchangeData* data) {
656 drag_controller_->WriteDragData(this, point, data); 656 drag_controller_->WriteDragData(this, point, data);
657 } 657 }
658 658
659 void View::StartShellDrag(const MouseEvent& event, 659 void View::StartShellDrag(const MouseEvent& event,
660 const gfx::Point& press_point) { 660 const gfx::Point& press_point) {
661 // TODO(beng): system stuff. 661 // TODO(beng): system stuff.
662 } 662 }
663 663
664 } // namespace ui 664 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698