зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1699302 part 1: Use "InProcess" version of GetCrossDocParentFrame(), when propagating invalidation up the ancestor chain, in nsIFrame.cpp. r=hiro
This patch doesn't change behavior; it's just switching us between two functions that do the same thing. (One is literally a trivial wrapper for the other.) We're using the new "InProcess" version of this API as a way of annotating callsites that have been vetted as behaving properly in out-of-process iframes. This patch is focusing on some callsites where we've got a frame that needs a repaint, and we're propagate that information up its ancestor chain. It's OK for these notifications to stop when we hit the edge of of an out-of-process iframe, because painting/compositing at that granularity is handled separately. Differential Revision: https://phabricator.services.mozilla.com/D108877
This commit is contained in:
Родитель
1b1db8ad9c
Коммит
ad62a2c0e8
|
@ -7011,7 +7011,7 @@ static void InvalidateRenderingObservers(nsIFrame* aDisplayRoot,
|
|||
SVGObserverUtils::InvalidateDirectRenderingObservers(aFrame);
|
||||
nsIFrame* parent = aFrame;
|
||||
while (parent != aDisplayRoot &&
|
||||
(parent = nsLayoutUtils::GetCrossDocParentFrame(parent)) &&
|
||||
(parent = nsLayoutUtils::GetCrossDocParentFrameInProcess(parent)) &&
|
||||
!parent->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
|
||||
SVGObserverUtils::InvalidateDirectRenderingObservers(parent);
|
||||
}
|
||||
|
@ -7066,7 +7066,7 @@ static void InvalidateFrameInternal(nsIFrame* aFrame, bool aHasDisplayItem,
|
|||
if (nsLayoutUtils::IsPopup(aFrame)) {
|
||||
needsSchedulePaint = true;
|
||||
} else {
|
||||
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(aFrame);
|
||||
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrameInProcess(aFrame);
|
||||
while (parent &&
|
||||
!parent->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
|
||||
if (aHasDisplayItem && !parent->HasAnyStateBits(NS_FRAME_IS_NONDISPLAY)) {
|
||||
|
@ -7081,7 +7081,7 @@ static void InvalidateFrameInternal(nsIFrame* aFrame, bool aHasDisplayItem,
|
|||
needsSchedulePaint = true;
|
||||
break;
|
||||
}
|
||||
parent = nsLayoutUtils::GetCrossDocParentFrame(parent);
|
||||
parent = nsLayoutUtils::GetCrossDocParentFrameInProcess(parent);
|
||||
}
|
||||
if (!parent) {
|
||||
needsSchedulePaint = true;
|
||||
|
@ -10853,7 +10853,7 @@ void nsIFrame::SetParent(nsContainerFrame* aParent) {
|
|||
for (nsIFrame* f = aParent;
|
||||
f && !f->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT |
|
||||
NS_FRAME_IS_NONDISPLAY);
|
||||
f = nsLayoutUtils::GetCrossDocParentFrame(f)) {
|
||||
f = nsLayoutUtils::GetCrossDocParentFrameInProcess(f)) {
|
||||
f->AddStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче