mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
bug 883708 - don't assert when parent of reorder event is shown later r=surkov
This commit is contained in:
parent
44c105bc52
commit
8c661b3531
@ -226,9 +226,7 @@ EventQueue::CoalesceReorderEvents(AccEvent* aTailEvent)
|
||||
|
||||
// If tailEvent contains thisEvent
|
||||
// then
|
||||
// if show of tailEvent contains a grand parent of thisEvent
|
||||
// then assert
|
||||
// else if hide of tailEvent contains a grand parent of thisEvent
|
||||
// if show or hide of tailEvent contains a grand parent of thisEvent
|
||||
// then ignore thisEvent and its show and hide events
|
||||
// otherwise ignore thisEvent but not its show and hide events
|
||||
Accessible* thisParent = thisEvent->mAccessible;
|
||||
@ -237,9 +235,12 @@ EventQueue::CoalesceReorderEvents(AccEvent* aTailEvent)
|
||||
AccReorderEvent* tailReorder = downcast_accEvent(aTailEvent);
|
||||
uint32_t eventType = tailReorder->IsShowHideEventTarget(thisParent);
|
||||
|
||||
if (eventType == nsIAccessibleEvent::EVENT_SHOW) {
|
||||
NS_ERROR("Accessible tree was created after it was modified! Huh?");
|
||||
} else if (eventType == nsIAccessibleEvent::EVENT_HIDE) {
|
||||
// Sometimes InvalidateChildren() and
|
||||
// DocAccessible::CacheChildrenInSubtree() can conspire to reparent an
|
||||
// accessible in this case no need for mutation events. Se bug 883708
|
||||
// for details.
|
||||
if (eventType == nsIAccessibleEvent::EVENT_SHOW ||
|
||||
eventType == nsIAccessibleEvent::EVENT_HIDE) {
|
||||
AccReorderEvent* thisReorder = downcast_accEvent(thisEvent);
|
||||
thisReorder->DoNotEmitAll();
|
||||
} else {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
[test_ariadialog.html]
|
||||
[test_bug852150.xhtml]
|
||||
[test_bug883708.xhtml]
|
||||
[test_bug895082.html]
|
||||
[test_canvas.html]
|
||||
[test_colorpicker.xul]
|
||||
|
33
accessible/tests/mochitest/treeupdate/test_bug883708.xhtml
Normal file
33
accessible/tests/mochitest/treeupdate/test_bug883708.xhtml
Normal file
@ -0,0 +1,33 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var newSpan = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
|
||||
c.insertBefore(newSpan, d);
|
||||
a.style.visibility = "visible";
|
||||
ok(true, "test didn't crash or assert");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();">
|
||||
<a target="_blank"
|
||||
title="test reparenting accessible subtree when inaccessible element becomes accessible"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=883708">
|
||||
Mozilla Bug 883708
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<div style="visibility: collapse;" id="a"><div style="float: right; visibility: visible;"><div id="c"><td id="d"></td></div></div></div></body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user