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

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

Issue 2502803002: Restrict scope attribute on table cells (Closed)
Patch Set: Created 4 years, 1 month 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // If the first column is comprised of all <th> tags, assume it is a data 225 // If the first column is comprised of all <th> tags, assume it is a data
226 // table. 226 // table.
227 if (!col && isTHCell) 227 if (!col && isTHCell)
228 headersInFirstColumnCount++; 228 headersInFirstColumnCount++;
229 229
230 // In this case, the developer explicitly assigned a "data" table 230 // In this case, the developer explicitly assigned a "data" table
231 // attribute. 231 // attribute.
232 if (isHTMLTableCellElement(*cellNode)) { 232 if (isHTMLTableCellElement(*cellNode)) {
233 HTMLTableCellElement& cellElement = toHTMLTableCellElement(*cellNode); 233 HTMLTableCellElement& cellElement = toHTMLTableCellElement(*cellNode);
234 if (!cellElement.headers().isEmpty() || !cellElement.abbr().isEmpty() || 234 if (!cellElement.headers().isEmpty() || !cellElement.abbr().isEmpty() ||
235 !cellElement.axis().isEmpty() || !cellElement.scope().isEmpty()) 235 !cellElement.axis().isEmpty() ||
236 !cellElement.getAttribute(scopeAttr).isEmpty())
tkent 2016/11/17 21:59:17 getAttribute -> fastGetAttribute
236 return true; 237 return true;
237 } 238 }
238 239
239 const ComputedStyle* computedStyle = cell->style(); 240 const ComputedStyle* computedStyle = cell->style();
240 if (!computedStyle) 241 if (!computedStyle)
241 continue; 242 continue;
242 243
243 // If the empty-cells style is set, we'll call it a data table. 244 // If the empty-cells style is set, we'll call it a data table.
244 if (computedStyle->emptyCells() == EEmptyCells::Hide) 245 if (computedStyle->emptyCells() == EEmptyCells::Hide)
245 return true; 246 return true;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 563 }
563 564
564 DEFINE_TRACE(AXTable) { 565 DEFINE_TRACE(AXTable) {
565 visitor->trace(m_rows); 566 visitor->trace(m_rows);
566 visitor->trace(m_columns); 567 visitor->trace(m_columns);
567 visitor->trace(m_headerContainer); 568 visitor->trace(m_headerContainer);
568 AXLayoutObject::trace(visitor); 569 AXLayoutObject::trace(visitor);
569 } 570 }
570 571
571 } // namespace blink 572 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698