| OLD | NEW |
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 row_range.first += row_offset; | 206 row_range.first += row_offset; |
| 207 } | 207 } |
| 208 | 208 |
| 209 void AXTableCell::ColumnIndexRange( | 209 void AXTableCell::ColumnIndexRange( |
| 210 std::pair<unsigned, unsigned>& column_range) { | 210 std::pair<unsigned, unsigned>& column_range) { |
| 211 if (!layout_object_ || !layout_object_->IsTableCell()) | 211 if (!layout_object_ || !layout_object_->IsTableCell()) |
| 212 return; | 212 return; |
| 213 | 213 |
| 214 LayoutTableCell* cell = ToLayoutTableCell(layout_object_); | 214 LayoutTableCell* cell = ToLayoutTableCell(layout_object_); |
| 215 column_range.first = cell->Table()->AbsoluteColumnToEffectiveColumn( | 215 column_range.first = cell->EffectiveColumnIndex(); |
| 216 cell->AbsoluteColumnIndex()); | 216 column_range.second = |
| 217 column_range.second = cell->Table()->AbsoluteColumnToEffectiveColumn( | 217 cell->EffectiveColumnIndexOfCellAfter() - column_range.first; |
| 218 cell->AbsoluteColumnIndex() + cell->ColSpan()) - | |
| 219 column_range.first; | |
| 220 } | 218 } |
| 221 | 219 |
| 222 SortDirection AXTableCell::GetSortDirection() const { | 220 SortDirection AXTableCell::GetSortDirection() const { |
| 223 if (RoleValue() != kRowHeaderRole && RoleValue() != kColumnHeaderRole) | 221 if (RoleValue() != kRowHeaderRole && RoleValue() != kColumnHeaderRole) |
| 224 return kSortDirectionUndefined; | 222 return kSortDirectionUndefined; |
| 225 | 223 |
| 226 const AtomicString& aria_sort = | 224 const AtomicString& aria_sort = |
| 227 GetAOMPropertyOrARIAAttribute(AOMStringProperty::kSort); | 225 GetAOMPropertyOrARIAAttribute(AOMStringProperty::kSort); |
| 228 if (aria_sort.IsEmpty()) | 226 if (aria_sort.IsEmpty()) |
| 229 return kSortDirectionUndefined; | 227 return kSortDirectionUndefined; |
| 230 if (EqualIgnoringASCIICase(aria_sort, "none")) | 228 if (EqualIgnoringASCIICase(aria_sort, "none")) |
| 231 return kSortDirectionNone; | 229 return kSortDirectionNone; |
| 232 if (EqualIgnoringASCIICase(aria_sort, "ascending")) | 230 if (EqualIgnoringASCIICase(aria_sort, "ascending")) |
| 233 return kSortDirectionAscending; | 231 return kSortDirectionAscending; |
| 234 if (EqualIgnoringASCIICase(aria_sort, "descending")) | 232 if (EqualIgnoringASCIICase(aria_sort, "descending")) |
| 235 return kSortDirectionDescending; | 233 return kSortDirectionDescending; |
| 236 if (EqualIgnoringASCIICase(aria_sort, "other")) | 234 if (EqualIgnoringASCIICase(aria_sort, "other")) |
| 237 return kSortDirectionOther; | 235 return kSortDirectionOther; |
| 238 return kSortDirectionUndefined; | 236 return kSortDirectionUndefined; |
| 239 } | 237 } |
| 240 | 238 |
| 241 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |