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

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

Issue 15932003: Make RecreateLayer() order the old layer above the new layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | no next file » | 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) 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 DestroyLayer(); 528 DestroyLayer();
529 } 529 }
530 } 530 }
531 531
532 ui::Layer* View::RecreateLayer() { 532 ui::Layer* View::RecreateLayer() {
533 ui::Layer* layer = AcquireLayer(); 533 ui::Layer* layer = AcquireLayer();
534 if (!layer) 534 if (!layer)
535 return NULL; 535 return NULL;
536 536
537 CreateLayer(); 537 CreateLayer();
538
539 // TODO(pkotwicz): Remove this once ReorderLayers() stacks layers not attached
540 // to a view above layers attached to a view.
541 if (layer->parent())
542 layer->parent()->StackAtTop(layer);
543
538 layer_->set_scale_content(layer->scale_content()); 544 layer_->set_scale_content(layer->scale_content());
539 return layer; 545 return layer;
540 } 546 }
541 547
542 // RTL positioning ------------------------------------------------------------- 548 // RTL positioning -------------------------------------------------------------
543 549
544 gfx::Rect View::GetMirroredBounds() const { 550 gfx::Rect View::GetMirroredBounds() const {
545 gfx::Rect bounds(bounds_); 551 gfx::Rect bounds(bounds_);
546 bounds.set_x(GetMirroredX()); 552 bounds.set_x(GetMirroredX());
547 return bounds; 553 return bounds;
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 ConvertPointToWidget(this, &widget_location); 2299 ConvertPointToWidget(this, &widget_location);
2294 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, 2300 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations,
2295 source); 2301 source);
2296 return true; 2302 return true;
2297 #else 2303 #else
2298 return false; 2304 return false;
2299 #endif // !defined(OS_MACOSX) 2305 #endif // !defined(OS_MACOSX)
2300 } 2306 }
2301 2307
2302 } // namespace views 2308 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698