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

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

Issue 2788523002: Finish all string attributes for Accessibility Object Model Phase 1. (Closed)
Patch Set: notifyAttributeChanged 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
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "modules/accessibility/AXTableCell.h" 29 #include "modules/accessibility/AXTableCell.h"
30 30
31 #include "core/dom/AccessibleNode.h"
31 #include "core/layout/LayoutTableCell.h" 32 #include "core/layout/LayoutTableCell.h"
32 #include "modules/accessibility/AXObjectCacheImpl.h" 33 #include "modules/accessibility/AXObjectCacheImpl.h"
33 #include "modules/accessibility/AXTableRow.h" 34 #include "modules/accessibility/AXTableRow.h"
34 35
35 namespace blink { 36 namespace blink {
36 37
37 using namespace HTMLNames; 38 using namespace HTMLNames;
38 39
39 AXTableCell::AXTableCell(LayoutObject* layoutObject, 40 AXTableCell::AXTableCell(LayoutObject* layoutObject,
40 AXObjectCacheImpl& axObjectCache) 41 AXObjectCacheImpl& axObjectCache)
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 cell->absoluteColumnIndex()); 214 cell->absoluteColumnIndex());
214 columnRange.second = cell->table()->absoluteColumnToEffectiveColumn( 215 columnRange.second = cell->table()->absoluteColumnToEffectiveColumn(
215 cell->absoluteColumnIndex() + cell->colSpan()) - 216 cell->absoluteColumnIndex() + cell->colSpan()) -
216 columnRange.first; 217 columnRange.first;
217 } 218 }
218 219
219 SortDirection AXTableCell::getSortDirection() const { 220 SortDirection AXTableCell::getSortDirection() const {
220 if (roleValue() != RowHeaderRole && roleValue() != ColumnHeaderRole) 221 if (roleValue() != RowHeaderRole && roleValue() != ColumnHeaderRole)
221 return SortDirectionUndefined; 222 return SortDirectionUndefined;
222 223
223 const AtomicString& ariaSort = getAttribute(aria_sortAttr); 224 const AtomicString& ariaSort =
225 getAOMPropertyOrARIAAttribute(AOMStringProperty::kSort);
224 if (ariaSort.isEmpty()) 226 if (ariaSort.isEmpty())
225 return SortDirectionUndefined; 227 return SortDirectionUndefined;
226 if (equalIgnoringCase(ariaSort, "none")) 228 if (equalIgnoringCase(ariaSort, "none"))
227 return SortDirectionNone; 229 return SortDirectionNone;
228 if (equalIgnoringCase(ariaSort, "ascending")) 230 if (equalIgnoringCase(ariaSort, "ascending"))
229 return SortDirectionAscending; 231 return SortDirectionAscending;
230 if (equalIgnoringCase(ariaSort, "descending")) 232 if (equalIgnoringCase(ariaSort, "descending"))
231 return SortDirectionDescending; 233 return SortDirectionDescending;
232 if (equalIgnoringCase(ariaSort, "other")) 234 if (equalIgnoringCase(ariaSort, "other"))
233 return SortDirectionOther; 235 return SortDirectionOther;
234 return SortDirectionUndefined; 236 return SortDirectionUndefined;
235 } 237 }
236 238
237 } // namespace blink 239 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698