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

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 2518183002: Moved action verbs out of Blink. (Closed)
Patch Set: Created 4 years, 1 month 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 "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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 word_ends.push_back(src_word_ends[i]); 421 word_ends.push_back(src_word_ends[i]);
422 } 422 }
423 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts); 423 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts);
424 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends); 424 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends);
425 } 425 }
426 426
427 if (src.accessKey().length()) { 427 if (src.accessKey().length()) {
428 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, src.accessKey().utf8()); 428 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, src.accessKey().utf8());
429 } 429 }
430 430
431 if (src.actionVerb().length()) { 431 if (src.action() != blink::WebAXSupportedAction::NONE) {
432 dst->AddStringAttribute(ui::AX_ATTR_ACTION, src.actionVerb().utf8()); 432 dst->AddIntAttribute(ui::AX_ATTR_ACTION,
433 AXSupportedActionFromBlink(src.action()));
433 } 434 }
434 435
435 if (src.ariaAutoComplete().length()) { 436 if (src.ariaAutoComplete().length()) {
436 dst->AddStringAttribute( 437 dst->AddStringAttribute(
437 ui::AX_ATTR_AUTO_COMPLETE, 438 ui::AX_ATTR_AUTO_COMPLETE,
438 src.ariaAutoComplete().utf8()); 439 src.ariaAutoComplete().utf8());
439 } 440 }
440 441
441 if (src.isAriaReadOnly()) 442 if (src.isAriaReadOnly())
442 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true); 443 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 return WebAXObject(); 740 return WebAXObject();
740 741
741 WebDocument document = render_frame_->GetWebFrame()->document(); 742 WebDocument document = render_frame_->GetWebFrame()->document();
742 if (!document.isNull()) 743 if (!document.isNull())
743 return document.accessibilityObject(); 744 return document.accessibilityObject();
744 745
745 return WebAXObject(); 746 return WebAXObject();
746 } 747 }
747 748
748 } // namespace content 749 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698