| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |