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

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

Issue 2191833003: Use text affinity to return correct accessible line boundaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in browser_accessibility_win.cc Created 4 years, 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_enum_conversion.h" 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 return ui::AX_DESCRIPTION_FROM_CONTENTS; 544 return ui::AX_DESCRIPTION_FROM_CONTENTS;
545 case blink::WebAXDescriptionFromPlaceholder: 545 case blink::WebAXDescriptionFromPlaceholder:
546 return ui::AX_DESCRIPTION_FROM_PLACEHOLDER; 546 return ui::AX_DESCRIPTION_FROM_PLACEHOLDER;
547 case blink::WebAXDescriptionFromRelatedElement: 547 case blink::WebAXDescriptionFromRelatedElement:
548 return ui::AX_DESCRIPTION_FROM_RELATED_ELEMENT; 548 return ui::AX_DESCRIPTION_FROM_RELATED_ELEMENT;
549 } 549 }
550 NOTREACHED(); 550 NOTREACHED();
551 return ui::AX_DESCRIPTION_FROM_NONE; 551 return ui::AX_DESCRIPTION_FROM_NONE;
552 } 552 }
553 553
554 ui::AXTextAffinity AXTextAffinityFromBlink(blink::WebAXTextAffinity affinity) {
555 switch (affinity) {
556 case blink::WebAXTextAffinityUpstream:
557 return ui::AX_TEXT_AFFINITY_UPSTREAM;
558 case blink::WebAXTextAffinityDownstream:
559 return ui::AX_TEXT_AFFINITY_DOWNSTREAM;
560 }
561 NOTREACHED();
562 return ui::AX_TEXT_AFFINITY_DOWNSTREAM;
563 }
564
554 } // namespace content. 565 } // namespace content.
OLDNEW
« no previous file with comments | « content/renderer/accessibility/blink_ax_enum_conversion.h ('k') | content/renderer/accessibility/blink_ax_tree_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698