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

Unified Diff: ui/views/widget/root_view.cc

Issue 15922004: Rename Widget::CalculateOffsetToAncestorWithLayer() to Widget::GetLayer() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.cc
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index bbe11b85c5060a3fb2df783c956df072adb0af22..5393a2f5bcea406be0944991dea95fb8692971f6 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -590,8 +590,9 @@ void RootView::GetAccessibleState(ui::AccessibleViewState* state) {
state->role = widget_->widget_delegate()->GetAccessibleWindowRole();
}
-void RootView::ReorderChildLayers(ui::Layer* parent_layer) {
- View::ReorderChildLayers(parent_layer);
+void RootView::UpdateParentLayer() {
+ if (layer())
+ ReparentLayer(gfx::Vector2d(GetMirroredX(), y()), widget_->GetLayer());
}
////////////////////////////////////////////////////////////////////////////////
@@ -631,8 +632,8 @@ void RootView::OnPaint(gfx::Canvas* canvas) {
gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer(
ui::Layer** layer_parent) {
gfx::Vector2d offset(View::CalculateOffsetToAncestorWithLayer(layer_parent));
- if (!layer())
- offset += widget_->CalculateOffsetToAncestorWithLayer(layer_parent);
+ if (!layer() && layer_parent)
+ *layer_parent = widget_->GetLayer();
return offset;
}
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698