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

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

Issue 874893003: Handles aria-dropeffect after getting its value from blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 10 months 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 <set> 7 #include <set>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 WebVector<WebAXObject> controls; 567 WebVector<WebAXObject> controls;
568 if (src.ariaControls(controls)) 568 if (src.ariaControls(controls))
569 AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, controls, dst); 569 AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, controls, dst);
570 570
571 WebVector<WebAXObject> describedby; 571 WebVector<WebAXObject> describedby;
572 if (src.ariaDescribedby(describedby)) { 572 if (src.ariaDescribedby(describedby)) {
573 AddIntListAttributeFromWebObjects( 573 AddIntListAttributeFromWebObjects(
574 ui::AX_ATTR_DESCRIBEDBY_IDS, describedby, dst); 574 ui::AX_ATTR_DESCRIBEDBY_IDS, describedby, dst);
575 } 575 }
576 576
577 if (src.ariaDropEffect().length()) {
578 dst->AddStringAttribute(ui::AX_ATTR_DROPEFFECT,
579 UTF16ToUTF8(src.ariaDropEffect()));
580 }
581
577 WebVector<WebAXObject> flowTo; 582 WebVector<WebAXObject> flowTo;
578 if (src.ariaFlowTo(flowTo)) 583 if (src.ariaFlowTo(flowTo))
579 AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, flowTo, dst); 584 AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, flowTo, dst);
580 585
581 WebVector<WebAXObject> labelledby; 586 WebVector<WebAXObject> labelledby;
582 if (src.ariaLabelledby(labelledby)) { 587 if (src.ariaLabelledby(labelledby)) {
583 AddIntListAttributeFromWebObjects( 588 AddIntListAttributeFromWebObjects(
584 ui::AX_ATTR_LABELLEDBY_IDS, labelledby, dst); 589 ui::AX_ATTR_LABELLEDBY_IDS, labelledby, dst);
585 } 590 }
586 591
587 WebVector<WebAXObject> owns; 592 WebVector<WebAXObject> owns;
588 if (src.ariaOwns(owns)) 593 if (src.ariaOwns(owns))
589 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); 594 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst);
590 } 595 }
591 596
592 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 597 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
593 if (render_frame_ && render_frame_->GetWebFrame()) 598 if (render_frame_ && render_frame_->GetWebFrame())
594 return render_frame_->GetWebFrame()->document(); 599 return render_frame_->GetWebFrame()->document();
595 return WebDocument(); 600 return WebDocument();
596 } 601 }
597 602
598 } // namespace content 603 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698