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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1064483002: ui/views: Remove redundant Save/Restore in LocationBarView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedcanvas: . Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 518050f7c4c0603c9e3ee425c688e48986ceb5c4..0df91c50890cf0fbaced7059db20dfe64618db42 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1219,23 +1219,10 @@ void LocationBarView::OnPaint(gfx::Canvas* canvas) {
}
void LocationBarView::PaintChildren(const ui::PaintContext& context) {
- // Paint all the children except for the omnibox itself, which may need to be
- // clipped if it's animating in.
- for (int i = 0, count = child_count(); i < count; ++i) {
- views::View* child = child_at(i);
- if (!child->layer() && (child != omnibox_view_))
- child->Paint(context);
- }
+ View::PaintChildren(context);
gfx::Canvas* canvas = context.canvas();
- {
- // TODO(danakj): Paint already scopes its use of canvas, so this is
- // redundant?
- gfx::ScopedCanvas scoped_canvas(canvas);
- omnibox_view_->Paint(context);
- }
-
// For non-InstantExtendedAPI cases, if necessary, show focus rect. As we need
// the focus rect to appear on top of children we paint here rather than
// OnPaint().
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698