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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_win.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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
« no previous file with comments | « ui/app_list/search_result_view.cc ('k') | ui/views/controls/button/button_dropdown.cc » ('j') | 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 #include "ui/views/accessibility/native_view_accessibility_win.h" 5 #include "ui/views/accessibility/native_view_accessibility_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <UIAutomationClient.h> 9 #include <UIAutomationClient.h>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 LONG x_left, LONG y_top, VARIANT* child) { 53 LONG x_left, LONG y_top, VARIANT* child) {
54 if (!child) 54 if (!child)
55 return E_INVALIDARG; 55 return E_INVALIDARG;
56 56
57 if (!view_) 57 if (!view_)
58 return E_FAIL; 58 return E_FAIL;
59 59
60 gfx::Point point(x_left, y_top); 60 gfx::Point point(x_left, y_top);
61 views::View::ConvertPointToView(NULL, view_, &point); 61 views::View::ConvertPointToView(NULL, view_, &point);
62 62
63 if (!view_->HitTest(point)) { 63 if (!view_->HitTestPoint(point)) {
64 // If containing parent is not hit, return with failure. 64 // If containing parent is not hit, return with failure.
65 child->vt = VT_EMPTY; 65 child->vt = VT_EMPTY;
66 return S_FALSE; 66 return S_FALSE;
67 } 67 }
68 68
69 views::View* view = view_->GetEventHandlerForPoint(point); 69 views::View* view = view_->GetEventHandlerForPoint(point);
70 if (view == view_) { 70 if (view == view_) {
71 // No child hit, return parent id. 71 // No child hit, return parent id.
72 child->vt = VT_I4; 72 child->vt = VT_I4;
73 child->lVal = CHILDID_SELF; 73 child->lVal = CHILDID_SELF;
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 const string16& text, 1088 const string16& text,
1089 IA2TextBoundaryType ia2_boundary, 1089 IA2TextBoundaryType ia2_boundary,
1090 LONG start_offset, 1090 LONG start_offset,
1091 ui::TextBoundaryDirection direction) { 1091 ui::TextBoundaryDirection direction) {
1092 HandleSpecialTextOffset(text, &start_offset); 1092 HandleSpecialTextOffset(text, &start_offset);
1093 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1093 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1094 std::vector<int32> line_breaks; 1094 std::vector<int32> line_breaks;
1095 return ui::FindAccessibleTextBoundary( 1095 return ui::FindAccessibleTextBoundary(
1096 text, line_breaks, boundary, start_offset, direction); 1096 text, line_breaks, boundary, start_offset, direction);
1097 } 1097 }
OLDNEW
« no previous file with comments | « ui/app_list/search_result_view.cc ('k') | ui/views/controls/button/button_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698