Bug 1463605 - Check continuation or IB split sibling frames in nsDOMWindowUtils::CheckAndClearDisplayListState. r?mattwoodrow
MozReview-Commit-ID: 6PjC5INFyym
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2931,17 +2931,24 @@ nsDOMWindowUtils::CheckAndClearDisplayLi
nsIFrame* parentFrame = frame->GetParent();
if (parentFrame && parentFrame->GetContent() == aElement) {
frame = parentFrame;
} else {
break;
}
}
- *aResult = frame->CheckAndClearDisplayListState();
+ while (frame) {
+ if (!frame->CheckAndClearDisplayListState()) {
+ *aResult = false;
+ return NS_OK;
+ }
+ frame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(frame);
+ }
+ *aResult = true;
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::IsPartOfOpaqueLayer(Element* aElement, bool* aResult)
{
if (!aElement) {