Source/WebCore: Assert being hit in AccessibilityRenderObject::addChildren()
authorcommit-queue <commit-queue@webkit.org>
Fri, 9 Sep 2011 18:06:22 +0000 (18:06 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 12 Sep 2011 15:05:06 +0000 (12:05 -0300)
commit6c629627f9aa47edee530494df839759d7780932
treea79477920419fa14be000025504997e0cb321c46
parent226e912b0efbde3669ddc28e5493b47281acaeba
Source/WebCore: Assert being hit in AccessibilityRenderObject::addChildren()
https://bugs.webkit.org/show_bug.cgi?id=61805

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-09
Reviewed by Chris Fleizach.

Fix nextSibling and previousSibling to handle adjacent continuations
properly, otherwise nodes end up appearing in the accessibility
tree twice (or a debug assertion could be raised).

Test: accessibility/adjacent-continuations-cause-assertion-failure.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::previousSibling):
(WebCore::AccessibilityRenderObject::nextSibling):

LayoutTests: Add a test to catch a case where adjacent continuations were
causing nodes to get added to the accessibility tree twice, leading
to an assertion failure or a crash. The test expectations are
currently Mac-specific, so added the test to the Skipped file for
gtk and win.
https://bugs.webkit.org/show_bug.cgi?id=61805

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-09
Reviewed by Chris Fleizach.

* accessibility/adjacent-continuations-cause-assertion-failure.html: Added.
* platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp