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

Unified Diff: ui/views/view_targeter_delegate.cc

Issue 2561253002: [ash-md] Adds support for Z-order iteration in views::View (Closed)
Patch Set: [ash-md] Adds support for Z-order iteration in views::View (using GetChildrenOrderedByVisualOrder) Created 4 years 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
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_targeter_delegate.cc
diff --git a/ui/views/view_targeter_delegate.cc b/ui/views/view_targeter_delegate.cc
index b20842f120074e04a98aa38af683193cd205e837..b33bbc65391f3c5a1cbc888b05e17ab25c63dfa3 100644
--- a/ui/views/view_targeter_delegate.cc
+++ b/ui/views/view_targeter_delegate.cc
@@ -42,9 +42,10 @@ View* ViewTargeterDelegate::TargetForRect(View* root, const gfx::Rect& rect) {
// from this function call if point-based targeting were used.
View* point_view = NULL;
- for (int i = root->child_count() - 1; i >= 0; --i) {
- View* child = root->child_at(i);
-
+ View::Views children = root->GetChildrenOrderedByVisualOrder();
+ DCHECK_EQ(root->child_count(), static_cast<int>(children.size()));
+ for (int i = children.size() - 1; i >= 0; --i) {
+ View* child = children[i];
if (!child->CanProcessEventsWithinSubtree())
continue;
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698