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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp

Issue 2393003002: reflow comments in modules/accessiblity (Closed)
Patch Set: Created 4 years, 2 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 AXListBoxOption* AXListBoxOption::create(LayoutObject* layoutObject, 46 AXListBoxOption* AXListBoxOption::create(LayoutObject* layoutObject,
47 AXObjectCacheImpl& axObjectCache) { 47 AXObjectCacheImpl& axObjectCache) {
48 return new AXListBoxOption(layoutObject, axObjectCache); 48 return new AXListBoxOption(layoutObject, axObjectCache);
49 } 49 }
50 50
51 AccessibilityRole AXListBoxOption::determineAccessibilityRole() { 51 AccessibilityRole AXListBoxOption::determineAccessibilityRole() {
52 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole) 52 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole)
53 return m_ariaRole; 53 return m_ariaRole;
54 54
55 // http://www.w3.org/TR/wai-aria/complete#presentation 55 // http://www.w3.org/TR/wai-aria/complete#presentation
56 // ARIA spec says that the presentation role causes a given element to be trea ted 56 // ARIA spec says that the presentation role causes a given element to be
57 // as having no role or to be removed from the accessibility tree, but does no t cause the 57 // treated as having no role or to be removed from the accessibility tree, but
58 // content contained within the element to be removed from the accessibility t ree. 58 // does not cause the content contained within the element to be removed from
59 // the accessibility tree.
59 if (isParentPresentationalRole()) 60 if (isParentPresentationalRole())
60 return StaticTextRole; 61 return StaticTextRole;
61 62
62 return ListBoxOptionRole; 63 return ListBoxOptionRole;
63 } 64 }
64 65
65 bool AXListBoxOption::isParentPresentationalRole() const { 66 bool AXListBoxOption::isParentPresentationalRole() const {
66 AXObject* parent = parentObject(); 67 AXObject* parent = parentObject();
67 if (!parent) 68 if (!parent)
68 return false; 69 return false;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 128
128 return true; 129 return true;
129 } 130 }
130 131
131 String AXListBoxOption::textAlternative(bool recursive, 132 String AXListBoxOption::textAlternative(bool recursive,
132 bool inAriaLabelledByTraversal, 133 bool inAriaLabelledByTraversal,
133 AXObjectSet& visited, 134 AXObjectSet& visited,
134 AXNameFrom& nameFrom, 135 AXNameFrom& nameFrom,
135 AXRelatedObjectVector* relatedObjects, 136 AXRelatedObjectVector* relatedObjects,
136 NameSources* nameSources) const { 137 NameSources* nameSources) const {
137 // If nameSources is non-null, relatedObjects is used in filling it in, so it must be non-null as well. 138 // If nameSources is non-null, relatedObjects is used in filling it in, so it
139 // must be non-null as well.
138 if (nameSources) 140 if (nameSources)
139 ASSERT(relatedObjects); 141 ASSERT(relatedObjects);
140 142
141 if (!getNode()) 143 if (!getNode())
142 return String(); 144 return String();
143 145
144 bool foundTextAlternative = false; 146 bool foundTextAlternative = false;
145 String textAlternative = ariaTextAlternative( 147 String textAlternative = ariaTextAlternative(
146 recursive, inAriaLabelledByTraversal, visited, nameFrom, relatedObjects, 148 recursive, inAriaLabelledByTraversal, visited, nameFrom, relatedObjects,
147 nameSources, &foundTextAlternative); 149 nameSources, &foundTextAlternative);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (!getNode()) 181 if (!getNode())
180 return 0; 182 return 0;
181 183
182 if (isHTMLOptionElement(getNode())) 184 if (isHTMLOptionElement(getNode()))
183 return toHTMLOptionElement(getNode())->ownerSelectElement(); 185 return toHTMLOptionElement(getNode())->ownerSelectElement();
184 186
185 return 0; 187 return 0;
186 } 188 }
187 189
188 } // namespace blink 190 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698