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

Side by Side Diff: Source/modules/accessibility/AXInlineTextBox.cpp

Issue 1076453004: Show reasons why nodes are ignored in accessibility sidebar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 8 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 /* 1 /*
2 * Copyright (C) 2013, Google Inc. All rights reserved. 2 * Copyright (C) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 LayoutRect AXInlineTextBox::elementRect() const 71 LayoutRect AXInlineTextBox::elementRect() const
72 { 72 {
73 if (!m_inlineTextBox) 73 if (!m_inlineTextBox)
74 return LayoutRect(); 74 return LayoutRect();
75 75
76 return m_inlineTextBox->bounds(); 76 return m_inlineTextBox->bounds();
77 } 77 }
78 78
79 bool AXInlineTextBox::computeAccessibilityIsIgnored() const 79 bool AXInlineTextBox::computeAccessibilityIsIgnored(PassRefPtr<TypeBuilder::Arra y<TypeBuilder::Accessibility::AXProperty>> ignoredReasons) const
80 { 80 {
81 if (AXObject* parent = parentObject()) 81 AXObject* parent = parentObject();
82 return parent->accessibilityIsIgnored(); 82 if (!parent)
83 return false;
83 84
84 return false; 85 if (ignoredReasons)
86 return parent->computeAccessibilityIsIgnored(ignoredReasons);
87
88 return parent->accessibilityIsIgnored();
85 } 89 }
86 90
87 void AXInlineTextBox::textCharacterOffsets(Vector<int>& offsets) const 91 void AXInlineTextBox::textCharacterOffsets(Vector<int>& offsets) const
88 { 92 {
89 if (!m_inlineTextBox) 93 if (!m_inlineTextBox)
90 return; 94 return;
91 95
92 unsigned len = m_inlineTextBox->len(); 96 unsigned len = m_inlineTextBox->len();
93 Vector<FloatWillBeLayoutUnit> widths; 97 Vector<FloatWillBeLayoutUnit> widths;
94 m_inlineTextBox->characterWidths(widths); 98 m_inlineTextBox->characterWidths(widths);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 case AbstractInlineTextBox::TopToBottom: 148 case AbstractInlineTextBox::TopToBottom:
145 return AccessibilityTextDirectionTopToBottom; 149 return AccessibilityTextDirectionTopToBottom;
146 case AbstractInlineTextBox::BottomToTop: 150 case AbstractInlineTextBox::BottomToTop:
147 return AccessibilityTextDirectionBottomToTop; 151 return AccessibilityTextDirectionBottomToTop;
148 } 152 }
149 153
150 return AccessibilityTextDirectionLeftToRight; 154 return AccessibilityTextDirectionLeftToRight;
151 } 155 }
152 156
153 } // namespace blink 157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698