OLD | NEW |
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 #include "ui/aura/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 if (!IsVisible()) | 599 if (!IsVisible()) |
600 return NULL; | 600 return NULL; |
601 | 601 |
602 if ((for_event_handling && !HitTest(local_point)) || | 602 if ((for_event_handling && !HitTest(local_point)) || |
603 (!for_event_handling && !ContainsPoint(local_point))) | 603 (!for_event_handling && !ContainsPoint(local_point))) |
604 return NULL; | 604 return NULL; |
605 | 605 |
606 if (!return_tightest && delegate_) | 606 if (!return_tightest && delegate_) |
607 return this; | 607 return this; |
608 | 608 |
609 for (Windows::const_reverse_iterator it = children_.rbegin(); | 609 for (Windows::const_reverse_iterator it = children_.rbegin(), |
610 it != children_.rend(); ++it) { | 610 rend = children_.rend(); |
| 611 it != rend; ++it) { |
611 Window* child = *it; | 612 Window* child = *it; |
612 if (!child->IsVisible() || (for_event_handling && child->ignore_events_)) | 613 if (!child->IsVisible() || (for_event_handling && child->ignore_events_)) |
613 continue; | 614 continue; |
614 | 615 |
615 gfx::Point point_in_child_coords(local_point); | 616 gfx::Point point_in_child_coords(local_point); |
616 Window::ConvertPointToWindow(this, child, &point_in_child_coords); | 617 Window::ConvertPointToWindow(this, child, &point_in_child_coords); |
617 Window* match = child->GetWindowForPoint(point_in_child_coords, | 618 Window* match = child->GetWindowForPoint(point_in_child_coords, |
618 return_tightest, | 619 return_tightest, |
619 for_event_handling); | 620 for_event_handling); |
620 if (match) | 621 if (match) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 parent_->children().end(), | 664 parent_->children().end(), |
664 this); | 665 this); |
665 for (++i; i != parent_->children().end(); ++i) { | 666 for (++i; i != parent_->children().end(); ++i) { |
666 if ((*i)->StopsEventPropagation()) | 667 if ((*i)->StopsEventPropagation()) |
667 return true; | 668 return true; |
668 } | 669 } |
669 return false; | 670 return false; |
670 } | 671 } |
671 | 672 |
672 } // namespace aura | 673 } // namespace aura |
OLD | NEW |