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

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

Issue 2793913007: Switch to equalIgnoringASCIICase throughout modules/accessibility (Closed)
Patch Set: Created 3 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) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 AXObjectCacheImpl& axObjectCache) { 47 AXObjectCacheImpl& axObjectCache) {
48 return new AXTableCell(layoutObject, axObjectCache); 48 return new AXTableCell(layoutObject, axObjectCache);
49 } 49 }
50 50
51 bool AXTableCell::isTableHeaderCell() const { 51 bool AXTableCell::isTableHeaderCell() const {
52 return getNode() && getNode()->hasTagName(thTag); 52 return getNode() && getNode()->hasTagName(thTag);
53 } 53 }
54 54
55 bool AXTableCell::isRowHeaderCell() const { 55 bool AXTableCell::isRowHeaderCell() const {
56 const AtomicString& scope = getAttribute(scopeAttr); 56 const AtomicString& scope = getAttribute(scopeAttr);
57 return equalIgnoringCase(scope, "row") || 57 return equalIgnoringASCIICase(scope, "row") ||
58 equalIgnoringCase(scope, "rowgroup"); 58 equalIgnoringASCIICase(scope, "rowgroup");
59 } 59 }
60 60
61 bool AXTableCell::isColumnHeaderCell() const { 61 bool AXTableCell::isColumnHeaderCell() const {
62 const AtomicString& scope = getAttribute(scopeAttr); 62 const AtomicString& scope = getAttribute(scopeAttr);
63 return equalIgnoringCase(scope, "col") || 63 return equalIgnoringASCIICase(scope, "col") ||
64 equalIgnoringCase(scope, "colgroup"); 64 equalIgnoringASCIICase(scope, "colgroup");
65 } 65 }
66 66
67 bool AXTableCell::computeAccessibilityIsIgnored( 67 bool AXTableCell::computeAccessibilityIsIgnored(
68 IgnoredReasons* ignoredReasons) const { 68 IgnoredReasons* ignoredReasons) const {
69 AXObjectInclusion decision = defaultObjectInclusion(ignoredReasons); 69 AXObjectInclusion decision = defaultObjectInclusion(ignoredReasons);
70 if (decision == IncludeObject) 70 if (decision == IncludeObject)
71 return false; 71 return false;
72 if (decision == IgnoreObject) 72 if (decision == IgnoreObject)
73 return true; 73 return true;
74 74
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 SortDirection AXTableCell::getSortDirection() const { 220 SortDirection AXTableCell::getSortDirection() const {
221 if (roleValue() != RowHeaderRole && roleValue() != ColumnHeaderRole) 221 if (roleValue() != RowHeaderRole && roleValue() != ColumnHeaderRole)
222 return SortDirectionUndefined; 222 return SortDirectionUndefined;
223 223
224 const AtomicString& ariaSort = 224 const AtomicString& ariaSort =
225 getAOMPropertyOrARIAAttribute(AOMStringProperty::kSort); 225 getAOMPropertyOrARIAAttribute(AOMStringProperty::kSort);
226 if (ariaSort.isEmpty()) 226 if (ariaSort.isEmpty())
227 return SortDirectionUndefined; 227 return SortDirectionUndefined;
228 if (equalIgnoringCase(ariaSort, "none")) 228 if (equalIgnoringASCIICase(ariaSort, "none"))
229 return SortDirectionNone; 229 return SortDirectionNone;
230 if (equalIgnoringCase(ariaSort, "ascending")) 230 if (equalIgnoringASCIICase(ariaSort, "ascending"))
231 return SortDirectionAscending; 231 return SortDirectionAscending;
232 if (equalIgnoringCase(ariaSort, "descending")) 232 if (equalIgnoringASCIICase(ariaSort, "descending"))
233 return SortDirectionDescending; 233 return SortDirectionDescending;
234 if (equalIgnoringCase(ariaSort, "other")) 234 if (equalIgnoringASCIICase(ariaSort, "other"))
235 return SortDirectionOther; 235 return SortDirectionOther;
236 return SortDirectionUndefined; 236 return SortDirectionUndefined;
237 } 237 }
238 238
239 } // namespace blink 239 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698