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

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

Issue 2526133003: [CANCELED] Ensure clean style for hasEditableLevel when it doesn't break other stuff (Closed)
Patch Set: Fri Nov 25 14:48:44 JST 2016 Created 4 years 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/AXNodeObject.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (!m_layoutObject || !getNode()) 95 if (!m_layoutObject || !getNode())
96 return false; 96 return false;
97 97
98 // Do not consider it a data table if it has an ARIA role. 98 // Do not consider it a data table if it has an ARIA role.
99 if (hasARIARole()) 99 if (hasARIARole())
100 return false; 100 return false;
101 101
102 // When a section of the document is contentEditable, all tables should be 102 // When a section of the document is contentEditable, all tables should be
103 // treated as data tables, otherwise users may not be able to work with rich 103 // treated as data tables, otherwise users may not be able to work with rich
104 // text editors that allow creating and editing tables. 104 // text editors that allow creating and editing tables.
105 if (getNode() && hasEditableStyle(*getNode())) 105 {
106 return true; 106 AutoReset<bool> inAXScope(checkingEditableStyleFromAXIndicator(), true);
107 if (getNode() && hasEditableStyle(*getNode()))
108 return true;
109 }
107 110
108 // This employs a heuristic to determine if this table should appear. 111 // This employs a heuristic to determine if this table should appear.
109 // Only "data" tables should be exposed as tables. 112 // Only "data" tables should be exposed as tables.
110 // Unfortunately, there is no good way to determine the difference 113 // Unfortunately, there is no good way to determine the difference
111 // between a "layout" table and a "data" table. 114 // between a "layout" table and a "data" table.
112 115
113 LayoutTable* table = toLayoutTable(m_layoutObject); 116 LayoutTable* table = toLayoutTable(m_layoutObject);
114 Node* tableNode = table->node(); 117 Node* tableNode = table->node();
115 if (!isHTMLTableElement(tableNode)) 118 if (!isHTMLTableElement(tableNode))
116 return false; 119 return false;
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 } 566 }
564 567
565 DEFINE_TRACE(AXTable) { 568 DEFINE_TRACE(AXTable) {
566 visitor->trace(m_rows); 569 visitor->trace(m_rows);
567 visitor->trace(m_columns); 570 visitor->trace(m_columns);
568 visitor->trace(m_headerContainer); 571 visitor->trace(m_headerContainer);
569 AXLayoutObject::trace(visitor); 572 AXLayoutObject::trace(visitor);
570 } 573 }
571 574
572 } // namespace blink 575 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698