Changeset 222790 in webkit
- Timestamp:
- Oct 3, 2017 11:24:44 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r222788 r222790 1 2017-10-03 Zalan Bujtas <zalan@apple.com> 2 3 [AX] Do not trigger redundant layout on tables. 4 https://bugs.webkit.org/show_bug.cgi?id=177781 5 <rdar://problem/34777030> 6 7 Reviewed by Antti Koivisto. 8 9 * TestExpectations: see webkit.org/b/177799 10 1 11 2017-10-03 Daniel Bates <dabates@apple.com> 2 12 -
trunk/LayoutTests/TestExpectations
r222778 r222790 1509 1509 imported/w3c/web-platform-tests/css/css-pseudo-4/first-letter-002.html [ ImageOnlyFailure ] 1510 1510 imported/w3c/web-platform-tests/css/css-pseudo-4/first-letter-003.html [ ImageOnlyFailure ] 1511 1512 webkit.org/b/177799 accessibility/table-detection.html [ Pass Failure ] -
trunk/Source/WebCore/ChangeLog
r222788 r222790 1 2017-10-03 Zalan Bujtas <zalan@apple.com> 2 3 [AX] Do not trigger redundant layout on tables. 4 https://bugs.webkit.org/show_bug.cgi?id=177781 5 <rdar://problem/34777030> 6 7 Reviewed by Antti Koivisto. 8 9 RenderTable::forceSectionsRecalc() marks the RenderTable dirty and schedules a layout. 10 Every time AccessibilityTable asks for the table element (including during construction), 11 we end up triggering a layout. This call was added (r191357) to ensure RenderTable's m_firstBody is always 12 up-to-date (in case of anonymous wrapper table renderer). Instead of relying on the m_firstBody, 13 let's just use the first child to find the table element. The first child always points to a valid 14 renderer (or nullptr), while m_firstBody is the result of section computation. 15 16 Covered by existing tests. 17 18 * accessibility/AccessibilityTable.cpp: 19 (WebCore::AccessibilityTable::tableElement const): 20 1 21 2017-10-03 Daniel Bates <dabates@apple.com> 2 22 -
trunk/Source/WebCore/accessibility/AccessibilityTable.cpp
r216123 r222790 101 101 if (is<HTMLTableElement>(table.element())) 102 102 return downcast<HTMLTableElement>(table.element()); 103 104 table.forceSectionsRecalc(); 105 106 // If the table has a display:table-row-group, then the RenderTable does not have a pointer to it's HTMLTableElement. 107 // We can instead find it by asking the firstSection for its parent. 108 RenderTableSection* firstBody = table.firstBody(); 109 if (!firstBody || !firstBody->element()) 103 // Try to find the table element, when the AccessibilityTable is mapped to an anonymous table renderer. 104 auto* firstChild = table.firstChild(); 105 if (!firstChild || !firstChild->node()) 110 106 return nullptr; 111 112 return ancestorsOfType<HTMLTableElement>(*(firstBody->element())).first(); 107 if (is<HTMLTableElement>(*firstChild->node())) 108 return downcast<HTMLTableElement>(firstChild->node()); 109 // FIXME: This might find an unrelated parent table element. 110 return ancestorsOfType<HTMLTableElement>(*(firstChild->node())).first(); 113 111 } 114 112
Note: See TracChangeset
for help on using the changeset viewer.