Bug 1245424 Part 2 - Stop checking the existence of details frame before toggling. r=bz

MozReview-Commit-ID: 6Xgyu7DDquy
This commit is contained in:
Ting-Yu Lin
2016-03-24 15:05:29 +08:00
parent 53e6f51184
commit 8a6a995fd8
2 changed files with 6 additions and 8 deletions

View File

@@ -62,13 +62,11 @@ HTMLSummaryElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
// When dispatching a synthesized mouse click event to a details element
// with 'display: none', both Chrome and Safari do not toggle the 'open'
// attribute. We follow them by checking whether the details element has a
// frame or not.
if (details->GetPrimaryFrame(Flush_Frames)) {
details->ToggleOpen();
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
return NS_OK;
}
// attribute. We had tried to be compatible with this behavior, but found
// more inconsistency in test cases in bug 1245424. So we stop doing that.
details->ToggleOpen();
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
return NS_OK;
}
} // event->HasMouseEventMessage()