| 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 "content/shell/renderer/test_runner/web_ax_object_proxy.h" | 5 #include "content/shell/renderer/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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 return accessibility_object_.isMultiSelectable(); | 749 return accessibility_object_.isMultiSelectable(); |
| 750 } | 750 } |
| 751 | 751 |
| 752 bool WebAXObjectProxy::IsSelectedOptionActive() { | 752 bool WebAXObjectProxy::IsSelectedOptionActive() { |
| 753 accessibility_object_.updateLayoutAndCheckValidity(); | 753 accessibility_object_.updateLayoutAndCheckValidity(); |
| 754 return accessibility_object_.isSelectedOptionActive(); | 754 return accessibility_object_.isSelectedOptionActive(); |
| 755 } | 755 } |
| 756 | 756 |
| 757 bool WebAXObjectProxy::IsExpanded() { | 757 bool WebAXObjectProxy::IsExpanded() { |
| 758 accessibility_object_.updateLayoutAndCheckValidity(); | 758 accessibility_object_.updateLayoutAndCheckValidity(); |
| 759 return !accessibility_object_.isCollapsed(); | 759 return accessibility_object_.isExpanded() == blink::WebAXExpandedExpanded; |
| 760 } | 760 } |
| 761 | 761 |
| 762 bool WebAXObjectProxy::IsChecked() { | 762 bool WebAXObjectProxy::IsChecked() { |
| 763 accessibility_object_.updateLayoutAndCheckValidity(); | 763 accessibility_object_.updateLayoutAndCheckValidity(); |
| 764 return accessibility_object_.isChecked(); | 764 return accessibility_object_.isChecked(); |
| 765 } | 765 } |
| 766 | 766 |
| 767 bool WebAXObjectProxy::IsCollapsed() { |
| 768 accessibility_object_.updateLayoutAndCheckValidity(); |
| 769 return accessibility_object_.isExpanded() == blink::WebAXExpandedCollapsed; |
| 770 } |
| 771 |
| 767 bool WebAXObjectProxy::IsVisible() { | 772 bool WebAXObjectProxy::IsVisible() { |
| 768 accessibility_object_.updateLayoutAndCheckValidity(); | 773 accessibility_object_.updateLayoutAndCheckValidity(); |
| 769 return accessibility_object_.isVisible(); | 774 return accessibility_object_.isVisible(); |
| 770 } | 775 } |
| 771 | 776 |
| 772 bool WebAXObjectProxy::IsOffScreen() { | 777 bool WebAXObjectProxy::IsOffScreen() { |
| 773 accessibility_object_.updateLayoutAndCheckValidity(); | 778 accessibility_object_.updateLayoutAndCheckValidity(); |
| 774 return accessibility_object_.isOffScreen(); | 779 return accessibility_object_.isOffScreen(); |
| 775 } | 780 } |
| 776 | 781 |
| 777 bool WebAXObjectProxy::IsCollapsed() { | |
| 778 accessibility_object_.updateLayoutAndCheckValidity(); | |
| 779 return accessibility_object_.isCollapsed(); | |
| 780 } | |
| 781 | |
| 782 bool WebAXObjectProxy::HasPopup() { | 782 bool WebAXObjectProxy::HasPopup() { |
| 783 accessibility_object_.updateLayoutAndCheckValidity(); | 783 accessibility_object_.updateLayoutAndCheckValidity(); |
| 784 return accessibility_object_.ariaHasPopup(); | 784 return accessibility_object_.ariaHasPopup(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 bool WebAXObjectProxy::IsValid() { | 787 bool WebAXObjectProxy::IsValid() { |
| 788 accessibility_object_.updateLayoutAndCheckValidity(); | 788 accessibility_object_.updateLayoutAndCheckValidity(); |
| 789 return !accessibility_object_.isDetached(); | 789 return !accessibility_object_.isDetached(); |
| 790 } | 790 } |
| 791 | 791 |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 v8::Handle<v8::Value> value_handle = gin::CreateHandle( | 1123 v8::Handle<v8::Value> value_handle = gin::CreateHandle( |
| 1124 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); | 1124 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); |
| 1125 if (value_handle.IsEmpty()) | 1125 if (value_handle.IsEmpty()) |
| 1126 return v8::Handle<v8::Object>(); | 1126 return v8::Handle<v8::Object>(); |
| 1127 v8::Handle<v8::Object> handle = value_handle->ToObject(); | 1127 v8::Handle<v8::Object> handle = value_handle->ToObject(); |
| 1128 elements_.Append(handle); | 1128 elements_.Append(handle); |
| 1129 return handle; | 1129 return handle; |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 } // namespace content | 1132 } // namespace content |
| OLD | NEW |