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

Unified Diff: views/border.cc

Issue 2959014: Implement initial ClipRect.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « gfx/canvas_skia.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/border.cc
===================================================================
--- views/border.cc (revision 53197)
+++ views/border.cc (working copy)
@@ -34,30 +34,16 @@
}
void SolidBorder::Paint(const View& view, gfx::Canvas* canvas) const {
- gfx::Rect clip_rect;
- if (!canvas->GetClipRect(&clip_rect))
- return; // Empty clip rectangle, nothing to paint.
-
// Top border.
- gfx::Rect border_bounds(0, 0, view.width(), insets_.top());
- if (clip_rect.Intersects(border_bounds))
- canvas->FillRectInt(color_, 0, 0, view.width(), insets_.top());
+ canvas->FillRectInt(color_, 0, 0, view.width(), insets_.top());
// Left border.
- border_bounds.SetRect(0, 0, insets_.left(), view.height());
- if (clip_rect.Intersects(border_bounds))
- canvas->FillRectInt(color_, 0, 0, insets_.left(), view.height());
+ canvas->FillRectInt(color_, 0, 0, insets_.left(), view.height());
// Bottom border.
- border_bounds.SetRect(0, view.height() - insets_.bottom(),
- view.width(), insets_.bottom());
- if (clip_rect.Intersects(border_bounds))
- canvas->FillRectInt(color_, 0, view.height() - insets_.bottom(),
- view.width(), insets_.bottom());
+ canvas->FillRectInt(color_, 0, view.height() - insets_.bottom(),
+ view.width(), insets_.bottom());
// Right border.
- border_bounds.SetRect(view.width() - insets_.right(), 0,
- insets_.right(), view.height());
- if (clip_rect.Intersects(border_bounds))
- canvas->FillRectInt(color_, view.width() - insets_.right(), 0,
- insets_.right(), view.height());
+ canvas->FillRectInt(color_, view.width() - insets_.right(), 0,
+ insets_.right(), view.height());
}
void SolidBorder::GetInsets(gfx::Insets* insets) const {
« no previous file with comments | « gfx/canvas_skia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698