Backed out changeset eeb0a65afa6d (bug 1363650) for wpt failures in intersection-observer/bounding-box.html and intersection-observer/unclipped-root.html
MozReview-Commit-ID: HycwX8lA9sw
This commit is contained in:
@@ -268,21 +268,17 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
|
||||
root = mRoot;
|
||||
rootFrame = root->GetPrimaryFrame();
|
||||
if (rootFrame) {
|
||||
nsRect rootRectRelativeToRootFrame;
|
||||
if (rootFrame->IsScrollFrame()) {
|
||||
// rootRectRelativeToRootFrame should be the content rect of rootFrame, not including the scrollbars.
|
||||
nsIScrollableFrame* scrollFrame = do_QueryFrame(rootFrame);
|
||||
rootRectRelativeToRootFrame = scrollFrame->GetScrollPortRect();
|
||||
rootRect = nsLayoutUtils::TransformFrameRectToAncestor(
|
||||
rootFrame,
|
||||
rootFrame->GetContentRectRelativeToSelf(),
|
||||
scrollFrame->GetScrolledFrame());
|
||||
} else {
|
||||
// rootRectRelativeToRootFrame should be the content rect of rootFrame.
|
||||
rootRectRelativeToRootFrame = rootFrame->GetContentRectRelativeToSelf();
|
||||
rootRect = nsLayoutUtils::GetAllInFlowRectsUnion(rootFrame,
|
||||
nsLayoutUtils::GetContainingBlockForClientRect(rootFrame),
|
||||
nsLayoutUtils::RECTS_ACCOUNT_FOR_TRANSFORMS);
|
||||
}
|
||||
nsIFrame* containingBlock =
|
||||
nsLayoutUtils::GetContainingBlockForClientRect(rootFrame);
|
||||
rootRect =
|
||||
nsLayoutUtils::TransformFrameRectToAncestor(rootFrame,
|
||||
rootRectRelativeToRootFrame,
|
||||
containingBlock);
|
||||
}
|
||||
} else {
|
||||
nsCOMPtr<nsIPresShell> presShell = aDocument->GetShell();
|
||||
|
||||
Reference in New Issue
Block a user