| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 | 255 |
| 256 blink::WebAXObject BlinkAXTreeSource::GetNull() const { | 256 blink::WebAXObject BlinkAXTreeSource::GetNull() const { |
| 257 return blink::WebAXObject(); | 257 return blink::WebAXObject(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, | 260 void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, |
| 261 AXContentNodeData* dst) const { | 261 AXContentNodeData* dst) const { |
| 262 dst->role = AXRoleFromBlink(src.role()); | 262 dst->role = AXRoleFromBlink(src.role()); |
| 263 dst->state = AXStateFromBlink(src); | 263 dst->state = AXStateFromBlink(src); |
| 264 dst->location = src.boundingBoxRect(); | 264 dst->location = gfx::RectF(src.boundingBoxRect()); |
| 265 dst->id = src.axID(); | 265 dst->id = src.axID(); |
| 266 | 266 |
| 267 blink::WebAXNameFrom nameFrom; | 267 blink::WebAXNameFrom nameFrom; |
| 268 blink::WebVector<blink::WebAXObject> nameObjects; | 268 blink::WebVector<blink::WebAXObject> nameObjects; |
| 269 blink::WebString web_name = src.name(nameFrom, nameObjects); | 269 blink::WebString web_name = src.name(nameFrom, nameObjects); |
| 270 if (!web_name.isEmpty()) { | 270 if (!web_name.isEmpty()) { |
| 271 dst->AddStringAttribute(ui::AX_ATTR_NAME, web_name.utf8()); | 271 dst->AddStringAttribute(ui::AX_ATTR_NAME, web_name.utf8()); |
| 272 dst->AddIntAttribute(ui::AX_ATTR_NAME_FROM, AXNameFromFromBlink(nameFrom)); | 272 dst->AddIntAttribute(ui::AX_ATTR_NAME_FROM, AXNameFromFromBlink(nameFrom)); |
| 273 AddIntListAttributeFromWebObjects( | 273 AddIntListAttributeFromWebObjects( |
| 274 ui::AX_ATTR_LABELLEDBY_IDS, nameObjects, dst); | 274 ui::AX_ATTR_LABELLEDBY_IDS, nameObjects, dst); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 } | 685 } |
| 686 | 686 |
| 687 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 687 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 688 if (render_frame_ && render_frame_->GetWebFrame()) | 688 if (render_frame_ && render_frame_->GetWebFrame()) |
| 689 return render_frame_->GetWebFrame()->document(); | 689 return render_frame_->GetWebFrame()->document(); |
| 690 return WebDocument(); | 690 return WebDocument(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 } // namespace content | 693 } // namespace content |
| OLD | NEW |