AX: Performance: Certain Web site causes Safari to hang completely while entering...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Oct 2014 16:39:54 +0000 (16:39 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Oct 2014 16:39:54 +0000 (16:39 +0000)
commit265a3046b4f755d593416101cc8f01f6f459b030
treeee12918f1163732b48d3aa0158d93df8f85896cc
parent884f828d59da3f4b3712d219ec0388c0edde7e9e
AX: Performance: Certain Web site causes Safari to hang completely while entering form data
https://bugs.webkit.org/show_bug.cgi?id=137420

Reviewed by Mario Sanchez Prada.

If a website has multiple nested tables that are not "accessibility" tables, the performance of accessibility slows to a crawl because:
  1) We are re-computing accessibilityIsIgnored many times.
       As a solution, we can enable the isIgnoredCache when updating children.
  2) When asking if an object isTableCell, we'd go up the parent chain, asking each of those parents the same question, which exploded into calling this many times.
      As a solution, I've changed our determination of isTableCell to instead check if the parent is an accessibiltyTable which should be much faster.

No new functionality. Existing tests cover changes.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateChildrenIfNecessary):
(WebCore::AccessibilityObject::accessibilityIsIgnored):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::isTableCell):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityTableCell.cpp