| 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/renderer/accessibility/blink_ax_tree_source.h" | 5 #include "content/renderer/accessibility/blink_ax_tree_source.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 blink::WebAXObject BlinkAXTreeSource::GetNull() const { | 378 blink::WebAXObject BlinkAXTreeSource::GetNull() const { |
| 379 return blink::WebAXObject(); | 379 return blink::WebAXObject(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, | 382 void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, |
| 383 AXContentNodeData* dst) const { | 383 AXContentNodeData* dst) const { |
| 384 dst->role = AXRoleFromBlink(src.Role()); | 384 dst->role = AXRoleFromBlink(src.Role()); |
| 385 dst->state = AXStateFromBlink(src); | 385 dst->state = AXStateFromBlink(src); |
| 386 dst->id = src.AxID(); | 386 dst->id = src.AxID(); |
| 387 | 387 |
| 388 TRACE_EVENT1("accessibility", "BlinkAXTreeSource::SerializeNode", "role", |
| 389 ui::ToString(dst->role)); |
| 390 |
| 388 WebAXObject offset_container; | 391 WebAXObject offset_container; |
| 389 WebFloatRect bounds_in_container; | 392 WebFloatRect bounds_in_container; |
| 390 SkMatrix44 container_transform; | 393 SkMatrix44 container_transform; |
| 391 src.GetRelativeBounds(offset_container, bounds_in_container, | 394 src.GetRelativeBounds(offset_container, bounds_in_container, |
| 392 container_transform); | 395 container_transform); |
| 393 dst->location = bounds_in_container; | 396 dst->location = bounds_in_container; |
| 394 if (!container_transform.isIdentity()) | 397 if (!container_transform.isIdentity()) |
| 395 dst->transform = base::WrapUnique(new gfx::Transform(container_transform)); | 398 dst->transform = base::WrapUnique(new gfx::Transform(container_transform)); |
| 396 if (!offset_container.IsDetached()) | 399 if (!offset_container.IsDetached()) |
| 397 dst->offset_container_id = offset_container.AxID(); | 400 dst->offset_container_id = offset_container.AxID(); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 return WebAXObject(); | 885 return WebAXObject(); |
| 883 | 886 |
| 884 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); | 887 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); |
| 885 if (!document.IsNull()) | 888 if (!document.IsNull()) |
| 886 return document.AccessibilityObject(); | 889 return document.AccessibilityObject(); |
| 887 | 890 |
| 888 return WebAXObject(); | 891 return WebAXObject(); |
| 889 } | 892 } |
| 890 | 893 |
| 891 } // namespace content | 894 } // namespace content |
| OLD | NEW |