зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363650 - (intersection-observer) Use content area as the intersection rectangle for custom root with overflow clip. r=mattwoodrow
--HG-- extra : rebase_source : 28c2af53622e02a2e46f49cd0aed642522d86937
This commit is contained in:
Родитель
fe1128dd14
Коммит
cfab4c8f59
|
@ -268,17 +268,21 @@ 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);
|
||||
rootRect = nsLayoutUtils::TransformFrameRectToAncestor(
|
||||
rootFrame,
|
||||
rootFrame->GetContentRectRelativeToSelf(),
|
||||
scrollFrame->GetScrolledFrame());
|
||||
rootRectRelativeToRootFrame = scrollFrame->GetScrollPortRect();
|
||||
} else {
|
||||
rootRect = nsLayoutUtils::GetAllInFlowRectsUnion(rootFrame,
|
||||
nsLayoutUtils::GetContainingBlockForClientRect(rootFrame),
|
||||
nsLayoutUtils::RECTS_ACCOUNT_FOR_TRANSFORMS);
|
||||
// rootRectRelativeToRootFrame should be the content rect of rootFrame.
|
||||
rootRectRelativeToRootFrame = rootFrame->GetContentRectRelativeToSelf();
|
||||
}
|
||||
nsIFrame* containingBlock =
|
||||
nsLayoutUtils::GetContainingBlockForClientRect(rootFrame);
|
||||
rootRect =
|
||||
nsLayoutUtils::TransformFrameRectToAncestor(rootFrame,
|
||||
rootRectRelativeToRootFrame,
|
||||
containingBlock);
|
||||
}
|
||||
} else {
|
||||
nsCOMPtr<nsIPresShell> presShell = aDocument->GetShell();
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[containing-block.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1363650
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[remove-element.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1363650
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[same-document-root.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1363650
|
||||
|
|
Загрузка…
Ссылка в новой задаче