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

Side by Side Diff: components/test_runner/web_ax_object_proxy.cc

Issue 1308153012: Uses isEditable and isRichlyEditable to determine which attributes to expose on Mac and how to repr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/web_ax_object_proxy.h" 5 #include "components/test_runner/web_ax_object_proxy.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "gin/handle.h" 8 #include "gin/handle.h"
9 #include "third_party/WebKit/public/platform/WebPoint.h" 9 #include "third_party/WebKit/public/platform/WebPoint.h"
10 #include "third_party/WebKit/public/platform/WebRect.h" 10 #include "third_party/WebKit/public/platform/WebRect.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 .SetProperty("selectionFocusOffset", 501 .SetProperty("selectionFocusOffset",
502 &WebAXObjectProxy::SelectionFocusOffset) 502 &WebAXObjectProxy::SelectionFocusOffset)
503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) 503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart)
504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) 504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd)
505 .SetProperty("selectionStartLineNumber", 505 .SetProperty("selectionStartLineNumber",
506 &WebAXObjectProxy::SelectionStartLineNumber) 506 &WebAXObjectProxy::SelectionStartLineNumber)
507 .SetProperty("selectionEndLineNumber", 507 .SetProperty("selectionEndLineNumber",
508 &WebAXObjectProxy::SelectionEndLineNumber) 508 &WebAXObjectProxy::SelectionEndLineNumber)
509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) 509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled)
510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) 510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired)
511 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable)
511 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) 512 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable)
512 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) 513 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused)
513 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) 514 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable)
514 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) 515 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected)
515 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) 516 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable)
516 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) 517 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable)
517 .SetProperty("isSelectedOptionActive", 518 .SetProperty("isSelectedOptionActive",
518 &WebAXObjectProxy::IsSelectedOptionActive) 519 &WebAXObjectProxy::IsSelectedOptionActive)
519 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) 520 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded)
520 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) 521 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked)
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 bool WebAXObjectProxy::IsEnabled() { 827 bool WebAXObjectProxy::IsEnabled() {
827 accessibility_object_.updateLayoutAndCheckValidity(); 828 accessibility_object_.updateLayoutAndCheckValidity();
828 return accessibility_object_.isEnabled(); 829 return accessibility_object_.isEnabled();
829 } 830 }
830 831
831 bool WebAXObjectProxy::IsRequired() { 832 bool WebAXObjectProxy::IsRequired() {
832 accessibility_object_.updateLayoutAndCheckValidity(); 833 accessibility_object_.updateLayoutAndCheckValidity();
833 return accessibility_object_.isRequired(); 834 return accessibility_object_.isRequired();
834 } 835 }
835 836
837 bool WebAXObjectProxy::IsEditable() {
838 accessibility_object_.updateLayoutAndCheckValidity();
839 return accessibility_object_.isEditable();
840 }
841
836 bool WebAXObjectProxy::IsRichlyEditable() { 842 bool WebAXObjectProxy::IsRichlyEditable() {
837 accessibility_object_.updateLayoutAndCheckValidity(); 843 accessibility_object_.updateLayoutAndCheckValidity();
838 return accessibility_object_.isRichlyEditable(); 844 return accessibility_object_.isRichlyEditable();
839 } 845 }
840 846
841 bool WebAXObjectProxy::IsFocused() { 847 bool WebAXObjectProxy::IsFocused() {
842 accessibility_object_.updateLayoutAndCheckValidity(); 848 accessibility_object_.updateLayoutAndCheckValidity();
843 return accessibility_object_.isFocused(); 849 return accessibility_object_.isFocused();
844 } 850 }
845 851
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 v8::Local<v8::Value> value_handle = gin::CreateHandle( 1442 v8::Local<v8::Value> value_handle = gin::CreateHandle(
1437 isolate, new WebAXObjectProxy(object, this)).ToV8(); 1443 isolate, new WebAXObjectProxy(object, this)).ToV8();
1438 if (value_handle.IsEmpty()) 1444 if (value_handle.IsEmpty())
1439 return v8::Local<v8::Object>(); 1445 return v8::Local<v8::Object>();
1440 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); 1446 v8::Local<v8::Object> handle = value_handle->ToObject(isolate);
1441 elements_.Append(handle); 1447 elements_.Append(handle);
1442 return handle; 1448 return handle;
1443 } 1449 }
1444 1450
1445 } // namespace test_runner 1451 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698