mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
This commit is contained in:
parent
2265d4509e
commit
1c2b8c222e
@ -697,7 +697,7 @@ nsAccessibilityService::UpdateListBullet(nsIPresShell* aPresShell,
|
||||
void
|
||||
nsAccessibilityService::UpdateImageMap(nsImageFrame* aImageFrame)
|
||||
{
|
||||
nsIPresShell* presShell = aImageFrame->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = aImageFrame->PresShell();
|
||||
DocAccessible* document = GetDocAccessible(presShell);
|
||||
if (document) {
|
||||
Accessible* accessible =
|
||||
|
@ -8860,7 +8860,7 @@ nsDocShell::RestoreFromHistory()
|
||||
if (rootViewSibling) {
|
||||
nsIFrame* frame = rootViewSibling->GetFrame();
|
||||
sibling =
|
||||
frame ? frame->PresContext()->PresShell()->GetDocument() : nullptr;
|
||||
frame ? frame->PresShell()->GetDocument() : nullptr;
|
||||
}
|
||||
|
||||
// Transfer ownership to mContentViewer. By ensuring that either the
|
||||
|
@ -3030,16 +3030,16 @@ nsFrameLoader::SetClipSubdocument(bool aClip)
|
||||
nsIFrame* frame = GetPrimaryFrameOfOwningContent();
|
||||
if (frame) {
|
||||
frame->InvalidateFrame();
|
||||
frame->PresContext()->PresShell()->
|
||||
frame->PresShell()->
|
||||
FrameNeedsReflow(frame, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
nsSubDocumentFrame* subdocFrame = do_QueryFrame(frame);
|
||||
if (subdocFrame) {
|
||||
nsIFrame* subdocRootFrame = subdocFrame->GetSubdocumentRootFrame();
|
||||
if (subdocRootFrame) {
|
||||
nsIFrame* subdocRootScrollFrame = subdocRootFrame->PresContext()->PresShell()->
|
||||
nsIFrame* subdocRootScrollFrame = subdocRootFrame->PresShell()->
|
||||
GetRootScrollFrame();
|
||||
if (subdocRootScrollFrame) {
|
||||
frame->PresContext()->PresShell()->
|
||||
frame->PresShell()->
|
||||
FrameNeedsReflow(frame, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
@ -3067,7 +3067,7 @@ nsFrameLoader::SetClampScrollPosition(bool aClamp)
|
||||
if (subdocFrame) {
|
||||
nsIFrame* subdocRootFrame = subdocFrame->GetSubdocumentRootFrame();
|
||||
if (subdocRootFrame) {
|
||||
nsIScrollableFrame* subdocRootScrollFrame = subdocRootFrame->PresContext()->PresShell()->
|
||||
nsIScrollableFrame* subdocRootScrollFrame = subdocRootFrame->PresShell()->
|
||||
GetRootScrollFrameAsScrollable();
|
||||
if (subdocRootScrollFrame) {
|
||||
subdocRootScrollFrame->ScrollTo(subdocRootScrollFrame->GetScrollPosition(), nsIScrollableFrame::INSTANT);
|
||||
|
@ -3250,7 +3250,7 @@ ContentEventHandler::FrameRelativeRect::RectRelativeTo(
|
||||
return mRect;
|
||||
}
|
||||
|
||||
nsIFrame* rootFrame = mBaseFrame->PresContext()->PresShell()->GetRootFrame();
|
||||
nsIFrame* rootFrame = mBaseFrame->PresShell()->GetRootFrame();
|
||||
nsRect baseFrameRectInRootFrame =
|
||||
nsLayoutUtils::TransformFrameRectToAncestor(mBaseFrame, nsRect(),
|
||||
rootFrame);
|
||||
|
@ -3310,7 +3310,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||
ScrollbarsForWheel::SetActiveScrollTarget(scrollTarget);
|
||||
|
||||
nsIFrame* rootScrollFrame = !mCurrentTarget ? nullptr :
|
||||
mCurrentTarget->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
mCurrentTarget->PresShell()->GetRootScrollFrame();
|
||||
nsIScrollableFrame* rootScrollableFrame = nullptr;
|
||||
if (rootScrollFrame) {
|
||||
rootScrollableFrame = do_QueryFrame(rootScrollFrame);
|
||||
|
@ -4132,7 +4132,7 @@ void HTMLMediaElement::SetPlayedOrSeeked(bool aValue)
|
||||
if (!frame) {
|
||||
return;
|
||||
}
|
||||
frame->PresContext()->PresShell()->FrameNeedsReflow(frame,
|
||||
frame->PresShell()->FrameNeedsReflow(frame,
|
||||
nsIPresShell::eTreeChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ UpdateRootFrameForTouchTargetDocument(nsIFrame* aRootFrame)
|
||||
// Re-target so that the hit test is performed relative to the frame for the
|
||||
// Root Content Document instead of the Root Document which are different in
|
||||
// Android. See bug 1229752 comment 16 for an explanation of why this is necessary.
|
||||
if (nsIDocument* doc = aRootFrame->PresContext()->PresShell()->GetPrimaryContentDocument()) {
|
||||
if (nsIDocument* doc = aRootFrame->PresShell()->GetPrimaryContentDocument()) {
|
||||
if (nsIPresShell* shell = doc->GetShell()) {
|
||||
if (nsIFrame* frame = shell->GetRootFrame()) {
|
||||
return frame;
|
||||
@ -648,7 +648,7 @@ PrepareForSetTargetAPZCNotification(nsIWidget* aWidget,
|
||||
nsLayoutUtils::GetFrameForPoint(aRootFrame, point, flags);
|
||||
nsIScrollableFrame* scrollAncestor = target
|
||||
? nsLayoutUtils::GetAsyncScrollableAncestorFrame(target)
|
||||
: aRootFrame->PresContext()->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
: aRootFrame->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
|
||||
// Assuming that if there's no scrollAncestor, there's already a displayPort.
|
||||
nsCOMPtr<dom::Element> dpElement = scrollAncestor
|
||||
@ -685,7 +685,7 @@ PrepareForSetTargetAPZCNotification(nsIWidget* aWidget,
|
||||
// element again and bail out on this operation.
|
||||
APZCCH_LOG("Widget %p's document element %p didn't have a displayport\n",
|
||||
aWidget, dpElement.get());
|
||||
APZCCallbackHelper::InitializeRootDisplayport(aRootFrame->PresContext()->PresShell());
|
||||
APZCCallbackHelper::InitializeRootDisplayport(aRootFrame->PresShell());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ WebRenderCommandBuilder::BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder
|
||||
mLayerScrollData.emplace_back();
|
||||
mLayerScrollData.back().InitializeRoot(mLayerScrollData.size() - 1);
|
||||
if (aDisplayListBuilder->IsBuildingLayerEventRegions()) {
|
||||
nsIPresShell* shell = aDisplayListBuilder->RootReferenceFrame()->PresContext()->PresShell();
|
||||
nsIPresShell* shell = aDisplayListBuilder->RootReferenceFrame()->PresShell();
|
||||
if (nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(shell)) {
|
||||
mLayerScrollData.back().SetEventRegionsOverride(EventRegionsOverride::ForceDispatchToContent);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ protected:
|
||||
|
||||
if (mHonoringInvalidations && !mDocWrapper->ShouldIgnoreInvalidation()) {
|
||||
nsIFrame* frame = elem->GetPrimaryFrame();
|
||||
if (!frame || frame->PresContext()->PresShell()->IsDestroying()) {
|
||||
if (!frame || frame->PresShell()->IsDestroying()) {
|
||||
// We're being destroyed. Bail out.
|
||||
return;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ AccessibleCaret::RemoveCaretElement(nsIDocument* aDocument)
|
||||
frame = frame->GetPlaceholderFrame();
|
||||
}
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
nsCSSFrameConstructor* fc = frame->PresContext()->PresShell()->FrameConstructor();
|
||||
nsCSSFrameConstructor* fc = frame->PresShell()->FrameConstructor();
|
||||
fc->BeginUpdate();
|
||||
frame->GetParent()->RemoveFrame(nsIFrame::kPrincipalList, frame);
|
||||
fc->EndUpdate();
|
||||
|
@ -584,7 +584,7 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent,
|
||||
// never be targeted --- something nsSubDocumentFrame in an ancestor document
|
||||
// would be targeted instead.
|
||||
nsIFrame* restrictToDescendants = target ?
|
||||
target->PresContext()->PresShell()->GetRootFrame() : aRootFrame;
|
||||
target->PresShell()->GetRootFrame() : aRootFrame;
|
||||
|
||||
nsRect targetRect = GetTargetRect(aRootFrame, aPointRelativeToRootFrame,
|
||||
restrictToDescendants, prefs, aFlags);
|
||||
|
@ -5277,7 +5277,7 @@ PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
||||
bool addedScrollingBackgroundColor = (aFlags & APPEND_UNSCROLLED_ONLY);
|
||||
if (!aFrame->GetParent() && !addedScrollingBackgroundColor) {
|
||||
nsIScrollableFrame* sf =
|
||||
aFrame->PresContext()->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
aFrame->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
if (sf) {
|
||||
nsCanvasFrame* canvasFrame = do_QueryFrame(sf->GetScrolledFrame());
|
||||
if (canvasFrame && canvasFrame->IsVisibleForPainting(&aBuilder)) {
|
||||
@ -5566,7 +5566,7 @@ static nsView* FindFloatingViewContaining(nsView* aView, nsPoint aPt)
|
||||
nsIFrame* frame = aView->GetFrame();
|
||||
if (frame) {
|
||||
if (!frame->IsVisibleConsideringAncestors(nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY) ||
|
||||
!frame->PresContext()->PresShell()->IsActive()) {
|
||||
!frame->PresShell()->IsActive()) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@ -5603,7 +5603,7 @@ static nsView* FindViewContaining(nsView* aView, nsPoint aPt)
|
||||
nsIFrame* frame = aView->GetFrame();
|
||||
if (frame) {
|
||||
if (!frame->IsVisibleConsideringAncestors(nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY) ||
|
||||
!frame->PresContext()->PresShell()->IsActive()) {
|
||||
!frame->PresShell()->IsActive()) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@ -5785,7 +5785,7 @@ PresShell::MarkFramesInListApproximatelyVisible(const nsDisplayList& aList,
|
||||
}
|
||||
|
||||
// Use the presshell containing the frame.
|
||||
auto* presShell = static_cast<PresShell*>(frame->PresContext()->PresShell());
|
||||
auto* presShell = static_cast<PresShell*>(frame->PresShell());
|
||||
MOZ_ASSERT(!presShell->AssumeAllFramesVisible());
|
||||
if (presShell->mApproximatelyVisibleFrames.EnsureInserted(frame)) {
|
||||
// The frame was added to mApproximatelyVisibleFrames, so increment its visible count.
|
||||
@ -5919,7 +5919,7 @@ PresShell::MarkFramesInSubtreeApproximatelyVisible(nsIFrame* aFrame,
|
||||
Maybe<VisibleRegions>& aVisibleRegions,
|
||||
bool aRemoveOnly /* = false */)
|
||||
{
|
||||
MOZ_ASSERT(aFrame->PresContext()->PresShell() == this, "wrong presshell");
|
||||
MOZ_ASSERT(aFrame->PresShell() == this, "wrong presshell");
|
||||
|
||||
if (aFrame->TrackingVisibility() &&
|
||||
aFrame->StyleVisibility()->IsVisible() &&
|
||||
@ -7267,7 +7267,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
PresShell* shell =
|
||||
static_cast<PresShell*>(frame->PresContext()->PresShell());
|
||||
static_cast<PresShell*>(frame->PresShell());
|
||||
switch (aEvent->mMessage) {
|
||||
case eTouchMove:
|
||||
case eTouchCancel:
|
||||
@ -7297,7 +7297,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
shell = static_cast<PresShell*>(
|
||||
contentFrame->PresContext()->PresShell());
|
||||
contentFrame->PresShell());
|
||||
if (shell) {
|
||||
break;
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ RecomputePosition(nsIFrame* aFrame)
|
||||
// doesn't need to change, we can simply update the frame position. Otherwise
|
||||
// we fall back to a reflow.
|
||||
RefPtr<gfxContext> rc =
|
||||
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
aFrame->PresShell()->CreateReferenceRenderingContext();
|
||||
|
||||
// Construct a bogus parent reflow state so that there's a usable
|
||||
// containing block reflow state.
|
||||
@ -1245,7 +1245,7 @@ StyleChangeReflow(nsIFrame* aFrame, nsChangeHint aHint)
|
||||
}
|
||||
|
||||
do {
|
||||
aFrame->PresContext()->PresShell()->FrameNeedsReflow(
|
||||
aFrame->PresShell()->FrameNeedsReflow(
|
||||
aFrame, dirtyType, dirtyBits, rootHandling);
|
||||
aFrame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(aFrame);
|
||||
} while (aFrame);
|
||||
|
@ -855,7 +855,7 @@ GetScrollFrameFromContent(nsIContent* aContent)
|
||||
{
|
||||
nsIFrame* frame = aContent->GetPrimaryFrame();
|
||||
if (aContent->OwnerDoc()->GetRootElement() == aContent) {
|
||||
nsIPresShell* presShell = frame ? frame->PresContext()->PresShell() : nullptr;
|
||||
nsIPresShell* presShell = frame ? frame->PresShell() : nullptr;
|
||||
if (!presShell) {
|
||||
presShell = aContent->OwnerDoc()->GetShell();
|
||||
}
|
||||
@ -2176,7 +2176,7 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags)
|
||||
}
|
||||
}
|
||||
if (aFlags & SCROLLABLE_ALWAYS_MATCH_ROOT) {
|
||||
nsIPresShell* ps = f->PresContext()->PresShell();
|
||||
nsIPresShell* ps = f->PresShell();
|
||||
if (ps->GetRootScrollFrame() == f &&
|
||||
ps->GetDocument() && ps->GetDocument()->IsRootDisplayDocument()) {
|
||||
return scrollableFrame;
|
||||
@ -2186,7 +2186,7 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags)
|
||||
if ((aFlags & SCROLLABLE_FIXEDPOS_FINDS_ROOT) &&
|
||||
f->StyleDisplay()->mPosition == NS_STYLE_POSITION_FIXED &&
|
||||
nsLayoutUtils::IsReallyFixedPos(f)) {
|
||||
return f->PresContext()->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
return f->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
@ -2376,7 +2376,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(nsIWidget* aWidget,
|
||||
int32_t rootAPD = rootFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
int32_t localAPD = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
widgetToView = widgetToView.ScaleToOtherAppUnits(rootAPD, localAPD);
|
||||
nsIPresShell* shell = aFrame->PresContext()->PresShell();
|
||||
nsIPresShell* shell = aFrame->PresShell();
|
||||
|
||||
// XXX Bug 1224748 - Update nsLayoutUtils functions to correctly handle nsPresShell resolution
|
||||
widgetToView = widgetToView.RemoveResolution(GetCurrentAPZResolutionScale(shell));
|
||||
@ -2777,7 +2777,7 @@ nsLayoutUtils::FindNearestCommonAncestorFrame(nsIFrame* aFrame1, nsIFrame* aFram
|
||||
AutoTArray<nsIFrame*,100> ancestors2;
|
||||
nsIFrame* commonAncestor = nullptr;
|
||||
if (aFrame1->PresContext() == aFrame2->PresContext()) {
|
||||
commonAncestor = aFrame1->PresContext()->PresShell()->GetRootFrame();
|
||||
commonAncestor = aFrame1->PresShell()->GetRootFrame();
|
||||
}
|
||||
for (nsIFrame* f = aFrame1; f != commonAncestor;
|
||||
f = nsLayoutUtils::GetCrossDocParentFrame(f)) {
|
||||
@ -3279,7 +3279,7 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
||||
|
||||
if (aFlags & IGNORE_ROOT_SCROLL_FRAME) {
|
||||
nsIFrame* rootScrollFrame =
|
||||
aFrame->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
aFrame->PresShell()->GetRootScrollFrame();
|
||||
if (rootScrollFrame) {
|
||||
builder.SetIgnoreScrollFrame(rootScrollFrame);
|
||||
}
|
||||
@ -3460,11 +3460,11 @@ nsLayoutUtils::SetZeroMarginDisplayPortOnAsyncScrollableAncestors(nsIFrame* aFra
|
||||
frame = do_QueryFrame(scrollAncestor);
|
||||
MOZ_ASSERT(frame);
|
||||
MOZ_ASSERT(scrollAncestor->WantAsyncScroll() ||
|
||||
frame->PresContext()->PresShell()->GetRootScrollFrame() == frame);
|
||||
frame->PresShell()->GetRootScrollFrame() == frame);
|
||||
if (nsLayoutUtils::AsyncPanZoomEnabled(frame) &&
|
||||
!nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
|
||||
nsLayoutUtils::SetDisplayPortMargins(
|
||||
frame->GetContent(), frame->PresContext()->PresShell(), ScreenMargin(), 0,
|
||||
frame->GetContent(), frame->PresShell(), ScreenMargin(), 0,
|
||||
aRepaintMode);
|
||||
}
|
||||
}
|
||||
@ -3533,7 +3533,7 @@ nsLayoutUtils::ExpireDisplayPortOnAsyncScrollableAncestor(nsIFrame* aFrame)
|
||||
break;
|
||||
}
|
||||
MOZ_ASSERT(scrollAncestor->WantAsyncScroll() ||
|
||||
frame->PresContext()->PresShell()->GetRootScrollFrame() == frame);
|
||||
frame->PresShell()->GetRootScrollFrame() == frame);
|
||||
if (nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
|
||||
scrollAncestor->TriggerDisplayPortExpiration();
|
||||
// Stop after the first trigger. If it failed, there's no point in
|
||||
@ -4283,7 +4283,7 @@ void nsLayoutUtils::RectListBuilder::AddRect(const nsRect& aRect) {
|
||||
|
||||
nsIFrame* nsLayoutUtils::GetContainingBlockForClientRect(nsIFrame* aFrame)
|
||||
{
|
||||
return aFrame->PresContext()->PresShell()->GetRootFrame();
|
||||
return aFrame->PresShell()->GetRootFrame();
|
||||
}
|
||||
|
||||
nsRect
|
||||
@ -4764,7 +4764,7 @@ nsLayoutUtils::IsViewportScrollbarFrame(nsIFrame* aFrame)
|
||||
return false;
|
||||
|
||||
nsIFrame* rootScrollFrame =
|
||||
aFrame->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
aFrame->PresShell()->GetRootScrollFrame();
|
||||
if (!rootScrollFrame)
|
||||
return false;
|
||||
|
||||
@ -6489,7 +6489,7 @@ nsLayoutUtils::GetClosestLayer(nsIFrame* aFrame)
|
||||
}
|
||||
if (layer)
|
||||
return layer;
|
||||
return aFrame->PresContext()->PresShell()->FrameManager()->GetRootFrame();
|
||||
return aFrame->PresShell()->FrameManager()->GetRootFrame();
|
||||
}
|
||||
|
||||
SamplingFilter
|
||||
@ -8834,13 +8834,13 @@ nsLayoutUtils::CalculateExpandedScrollableRect(nsIFrame* aFrame)
|
||||
{
|
||||
nsRect scrollableRect =
|
||||
CalculateScrollableRectForFrame(aFrame->GetScrollTargetFrame(),
|
||||
aFrame->PresContext()->PresShell()->GetRootFrame());
|
||||
aFrame->PresShell()->GetRootFrame());
|
||||
nsSize compSize = CalculateCompositionSizeForFrame(aFrame);
|
||||
|
||||
if (aFrame == aFrame->PresContext()->PresShell()->GetRootScrollFrame()) {
|
||||
if (aFrame == aFrame->PresShell()->GetRootScrollFrame()) {
|
||||
// the composition size for the root scroll frame does not include the
|
||||
// local resolution, so we adjust.
|
||||
float res = aFrame->PresContext()->PresShell()->GetResolution();
|
||||
float res = aFrame->PresShell()->GetResolution();
|
||||
compSize.width = NSToCoordRound(compSize.width / res);
|
||||
compSize.height = NSToCoordRound(compSize.height / res);
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ public:
|
||||
static_cast<nsComboboxControlFrame*>(mFrame.GetFrame());
|
||||
static_cast<nsListControlFrame*>(combo->mDropdownFrame)->
|
||||
SetSuppressScrollbarUpdate(true);
|
||||
nsCOMPtr<nsIPresShell> shell = mFrame->PresContext()->PresShell();
|
||||
nsCOMPtr<nsIPresShell> shell = mFrame->PresShell();
|
||||
shell->FrameNeedsReflow(combo->mDropdownFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
shell->FlushPendingNotifications(FlushType::Layout);
|
||||
@ -1046,7 +1046,7 @@ nsComboboxControlFrame::HandleRedisplayTextEvent()
|
||||
|
||||
ActuallyDisplayText(true);
|
||||
// XXXbz This should perhaps be eResize. Check.
|
||||
PresContext()->PresShell()->FrameNeedsReflow(mDisplayFrame,
|
||||
PresShell()->FrameNeedsReflow(mDisplayFrame,
|
||||
nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
|
||||
@ -1364,7 +1364,7 @@ nsComboboxControlFrame::CreateFrameForDisplayNode()
|
||||
MOZ_ASSERT(mDisplayContent);
|
||||
|
||||
// Get PresShell
|
||||
nsIPresShell *shell = PresContext()->PresShell();
|
||||
nsIPresShell *shell = PresShell();
|
||||
StyleSetHandle styleSet = shell->StyleSet();
|
||||
|
||||
// create the style contexts for the anonymous block frame and text frame
|
||||
|
@ -1984,7 +1984,7 @@ nsListControlFrame::ScrollToFrame(dom::HTMLOptionElement& aOptElement)
|
||||
// otherwise we find the content's frame and scroll to it
|
||||
nsIFrame* childFrame = aOptElement.GetPrimaryFrame();
|
||||
if (childFrame) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
ScrollFrameRectIntoView(childFrame,
|
||||
nsRect(nsPoint(0, 0), childFrame->GetSize()),
|
||||
nsIPresShell::ScrollAxis(), nsIPresShell::ScrollAxis(),
|
||||
|
@ -200,7 +200,7 @@ nsMeterFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
aAttribute == nsGkAtoms::min )) {
|
||||
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
|
||||
NS_ASSERTION(barFrame, "The meter frame should have a child with a frame!");
|
||||
PresContext()->PresShell()->FrameNeedsReflow(barFrame,
|
||||
PresShell()->FrameNeedsReflow(barFrame,
|
||||
nsIPresShell::eResize,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
InvalidateFrame();
|
||||
|
@ -212,7 +212,7 @@ nsProgressFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
|
||||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
(aAttribute == nsGkAtoms::value || aAttribute == nsGkAtoms::max)) {
|
||||
auto shell = PresContext()->PresShell();
|
||||
auto shell = PresShell();
|
||||
for (auto childFrame : PrincipalChildList()) {
|
||||
shell->FrameNeedsReflow(childFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
|
@ -630,7 +630,7 @@ nsRangeFrame::UpdateForValueChange()
|
||||
#ifdef ACCESSIBILITY
|
||||
nsAccessibilityService* accService = nsIPresShell::AccService();
|
||||
if (accService) {
|
||||
accService->RangeValueChanged(PresContext()->PresShell(), mContent);
|
||||
accService->RangeValueChanged(PresShell(), mContent);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -760,7 +760,7 @@ nsRangeFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
UpdateForValueChange();
|
||||
}
|
||||
} else if (aAttribute == nsGkAtoms::orient) {
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eResize,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eResize,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
virtual already_AddRefed<DrawTarget> GetRefDrawTarget() override
|
||||
{
|
||||
RefPtr<gfxContext> ctx =
|
||||
mFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
mFrame->PresShell()->CreateReferenceRenderingContext();
|
||||
RefPtr<DrawTarget> dt = ctx->GetDrawTarget();
|
||||
return dt.forget();
|
||||
}
|
||||
@ -822,7 +822,7 @@ TextOverflow::CanHaveTextOverflow(nsIFrame* aBlockFrame)
|
||||
}
|
||||
|
||||
// Inhibit the markers if a descendant content owns the caret.
|
||||
RefPtr<nsCaret> caret = aBlockFrame->PresContext()->PresShell()->GetCaret();
|
||||
RefPtr<nsCaret> caret = aBlockFrame->PresShell()->GetCaret();
|
||||
if (caret && caret->IsVisible()) {
|
||||
nsCOMPtr<nsISelection> domSelection = caret->GetSelection();
|
||||
if (domSelection) {
|
||||
@ -896,7 +896,7 @@ TextOverflow::Marker::SetupString(nsIFrame* aFrame)
|
||||
}
|
||||
} else {
|
||||
RefPtr<gfxContext> rc =
|
||||
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
aFrame->PresShell()->CreateReferenceRenderingContext();
|
||||
RefPtr<nsFontMetrics> fm =
|
||||
nsLayoutUtils::GetInflatedFontMetricsForFrame(aFrame);
|
||||
mISize = nsLayoutUtils::AppUnitWidthOfStringBidi(mStyle->mString, aFrame,
|
||||
|
@ -178,7 +178,7 @@ ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
}
|
||||
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
if (nsCanvasFrame* canvasFrame = shell->GetCanvasFrame()) {
|
||||
if (Element* container = canvasFrame->GetCustomContentContainer()) {
|
||||
if (nsIFrame* frame = container->GetPrimaryFrame()) {
|
||||
@ -279,7 +279,7 @@ ViewportFrame::AdjustReflowInputAsContainingBlock(ReflowInput* aReflowInput) con
|
||||
// If a scroll position clamping scroll-port size has been set, layout
|
||||
// fixed position elements to this size instead of the computed size.
|
||||
nsRect rect(0, 0, aReflowInput->ComputedWidth(), aReflowInput->ComputedHeight());
|
||||
nsIPresShell* ps = PresContext()->PresShell();
|
||||
nsIPresShell* ps = PresShell();
|
||||
if (ps->IsScrollPositionClampingScrollPortSizeSet()) {
|
||||
rect.SizeTo(ps->GetScrollPositionClampingScrollPortSize());
|
||||
}
|
||||
@ -399,7 +399,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsSubDocumentFrame* container = static_cast<nsSubDocumentFrame*>
|
||||
(nsLayoutUtils::GetCrossDocParentFrame(this));
|
||||
if (container && !container->ShouldClipSubdocument()) {
|
||||
container->PresContext()->PresShell()->
|
||||
container->PresShell()->
|
||||
FrameNeedsReflow(container, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
@ -412,7 +412,7 @@ bool
|
||||
ViewportFrame::ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas)
|
||||
{
|
||||
nsIScrollableFrame* rootScrollFrame =
|
||||
PresContext()->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
PresShell()->GetRootScrollFrameAsScrollable();
|
||||
if (rootScrollFrame && !rootScrollFrame->IsIgnoringViewportClipping()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
|
||||
|
||||
// no damage to intrinsic widths, since absolutely positioned frames can't
|
||||
// change them
|
||||
aDelegatingFrame->PresContext()->PresShell()->
|
||||
aDelegatingFrame->PresShell()->
|
||||
FrameNeedsReflow(aDelegatingFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -92,7 +92,7 @@ nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
|
||||
|
||||
// no damage to intrinsic widths, since absolutely positioned frames can't
|
||||
// change them
|
||||
aDelegatingFrame->PresContext()->PresShell()->
|
||||
aDelegatingFrame->PresShell()->
|
||||
FrameNeedsReflow(aDelegatingFrame, nsIPresShell::eResize,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
@ -3044,7 +3044,7 @@ nsBlockFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
if (ancestor) {
|
||||
// XXX Not sure if this is necessary anymore
|
||||
if (ancestor->RenumberList()) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(ancestor, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -5103,7 +5103,7 @@ nsBlockFrame::SetOverflowOutOfFlows(const nsFrameList& aList,
|
||||
nsFrameList* list = RemovePropTableFrames(OverflowOutOfFlowsProperty());
|
||||
NS_ASSERTION(aPropValue == list, "prop value mismatch");
|
||||
list->Clear();
|
||||
list->Delete(PresContext()->PresShell());
|
||||
list->Delete(PresShell());
|
||||
RemoveStateBits(NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS);
|
||||
}
|
||||
else if (GetStateBits() & NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS) {
|
||||
@ -5112,7 +5112,7 @@ nsBlockFrame::SetOverflowOutOfFlows(const nsFrameList& aList,
|
||||
*aPropValue = aList;
|
||||
}
|
||||
else {
|
||||
SetPropTableFrames(new (PresContext()->PresShell()) nsFrameList(aList),
|
||||
SetPropTableFrames(new (PresShell()) nsFrameList(aList),
|
||||
OverflowOutOfFlowsProperty());
|
||||
AddStateBits(NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS);
|
||||
}
|
||||
@ -5170,7 +5170,7 @@ nsBlockFrame::EnsurePushedFloats()
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
result = new (PresContext()->PresShell()) nsFrameList;
|
||||
result = new (PresShell()) nsFrameList;
|
||||
SetProperty(PushedFloatProperty(), result);
|
||||
AddStateBits(NS_BLOCK_HAS_PUSHED_FLOATS);
|
||||
|
||||
@ -5234,7 +5234,7 @@ nsBlockFrame::AppendFrames(ChildListID aListID,
|
||||
|
||||
AddFrames(aFrameList, lastKid);
|
||||
if (aListID != kNoReflowPrincipalList) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN); // XXX sufficient?
|
||||
}
|
||||
@ -5270,7 +5270,7 @@ nsBlockFrame::InsertFrames(ChildListID aListID,
|
||||
|
||||
AddFrames(aFrameList, aPrevFrame);
|
||||
if (aListID != kNoReflowPrincipalList) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN); // XXX sufficient?
|
||||
}
|
||||
@ -5316,7 +5316,7 @@ nsBlockFrame::RemoveFrame(ChildListID aListID,
|
||||
MOZ_CRASH("unexpected child list");
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN); // XXX sufficient?
|
||||
}
|
||||
@ -7095,7 +7095,7 @@ void
|
||||
nsBlockFrame::CreateBulletFrameForListItem(bool aCreateBulletList,
|
||||
bool aListStylePositionInside)
|
||||
{
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
|
||||
CSSPseudoElementType pseudoType = aCreateBulletList ?
|
||||
CSSPseudoElementType::mozListBullet :
|
||||
|
@ -440,16 +440,16 @@ protected:
|
||||
}
|
||||
|
||||
nsLineBox* NewLineBox(nsIFrame* aFrame, bool aIsBlock) {
|
||||
return NS_NewLineBox(PresContext()->PresShell(), aFrame, aIsBlock);
|
||||
return NS_NewLineBox(PresShell(), aFrame, aIsBlock);
|
||||
}
|
||||
nsLineBox* NewLineBox(nsLineBox* aFromLine, nsIFrame* aFrame, int32_t aCount) {
|
||||
return NS_NewLineBox(PresContext()->PresShell(), aFromLine, aFrame, aCount);
|
||||
return NS_NewLineBox(PresShell(), aFromLine, aFrame, aCount);
|
||||
}
|
||||
void FreeLineBox(nsLineBox* aLine) {
|
||||
if (aLine == GetLineCursor()) {
|
||||
ClearLineCursor();
|
||||
}
|
||||
aLine->Destroy(PresContext()->PresShell());
|
||||
aLine->Destroy(PresShell());
|
||||
}
|
||||
/**
|
||||
* Helper method for StealFrame.
|
||||
|
@ -96,7 +96,7 @@ nsContainerFrame::SetInitialChildList(ChildListID aListID,
|
||||
}
|
||||
#endif
|
||||
nsFrameList* list =
|
||||
new (PresContext()->PresShell()) nsFrameList(aChildList);
|
||||
new (PresShell()) nsFrameList(aChildList);
|
||||
SetProperty(BackdropProperty(), list);
|
||||
} else {
|
||||
MOZ_ASSERT_UNREACHABLE("Unexpected child list");
|
||||
@ -118,7 +118,7 @@ nsContainerFrame::AppendFrames(ChildListID aListID,
|
||||
mFrames.AppendFrames(this, aFrameList);
|
||||
|
||||
if (aListID != kNoReflowPrincipalList) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -142,7 +142,7 @@ nsContainerFrame::InsertFrames(ChildListID aListID,
|
||||
mFrames.InsertFrames(this, aPrevFrame, aFrameList);
|
||||
|
||||
if (aListID != kNoReflowPrincipalList) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -162,7 +162,7 @@ nsContainerFrame::RemoveFrame(ChildListID aListID,
|
||||
if (kNoReflowPrincipalList == aListID) {
|
||||
generateReflowCommand = false;
|
||||
}
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
nsContainerFrame* lastParent = nullptr;
|
||||
while (aOldFrame) {
|
||||
nsIFrame* oldFrameNextContinuation = aOldFrame->GetNextContinuation();
|
||||
@ -1257,7 +1257,7 @@ TryRemoveFrame(nsIFrame* aFrame,
|
||||
// aChildToRemove *may* have been removed from this list.
|
||||
if (list->IsEmpty()) {
|
||||
aFrame->RemoveProperty(aProp);
|
||||
list->Delete(aFrame->PresContext()->PresShell());
|
||||
list->Delete(aFrame->PresShell());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1641,7 +1641,7 @@ nsContainerFrame::DrainExcessOverflowContainersList(ChildFrameMerger aMergeFunc)
|
||||
} else if (overflowContainers) {
|
||||
aMergeFunc(*overflowContainers, toMove, this);
|
||||
if (selfExcessOCFrames->IsEmpty()) {
|
||||
selfExcessOCFrames->Delete(PresContext()->PresShell());
|
||||
selfExcessOCFrames->Delete(PresShell());
|
||||
} else {
|
||||
SetPropTableFrames(selfExcessOCFrames, ExcessOverflowContainersProperty());
|
||||
}
|
||||
@ -1651,7 +1651,7 @@ nsContainerFrame::DrainExcessOverflowContainersList(ChildFrameMerger aMergeFunc)
|
||||
overflowContainers = selfExcessOCFrames;
|
||||
} else {
|
||||
SetPropTableFrames(selfExcessOCFrames, ExcessOverflowContainersProperty());
|
||||
auto shell = PresContext()->PresShell();
|
||||
auto shell = PresShell();
|
||||
overflowContainers = new (shell) nsFrameList(toMove);
|
||||
}
|
||||
SetPropTableFrames(overflowContainers, OverflowContainersProperty());
|
||||
@ -1987,7 +1987,7 @@ nsContainerFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
|
||||
// XXX Not sure if this is necessary anymore
|
||||
if (RenumberList()) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
@ -937,7 +937,7 @@ nsContainerFrame::DestroyOverflowList()
|
||||
{
|
||||
nsFrameList* list = RemovePropTableFrames(OverflowProperty());
|
||||
MOZ_ASSERT(list && list->IsEmpty());
|
||||
list->Delete(PresContext()->PresShell());
|
||||
list->Delete(PresShell());
|
||||
}
|
||||
|
||||
#endif /* nsContainerFrame_h___ */
|
||||
|
@ -204,7 +204,7 @@ nsFontInflationData::UpdateISize(const ReflowInput &aReflowInput)
|
||||
|
||||
// See comment above "font.size.inflation.lineThreshold" in
|
||||
// modules/libpref/src/init/all.js .
|
||||
nsIPresShell* presShell = bfc->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = bfc->PresShell();
|
||||
uint32_t lineThreshold = presShell->FontSizeInflationLineThreshold();
|
||||
nscoord newTextThreshold = (newNCAISize * lineThreshold) / 100;
|
||||
|
||||
|
@ -715,7 +715,7 @@ nsFrame::Init(nsIContent* aContent,
|
||||
"root frame should always be a container");
|
||||
}
|
||||
|
||||
if (PresContext()->PresShell()->AssumeAllFramesVisible() &&
|
||||
if (PresShell()->AssumeAllFramesVisible() &&
|
||||
TrackingVisibility()) {
|
||||
IncApproximateVisibleCount();
|
||||
}
|
||||
@ -1946,7 +1946,7 @@ nsIFrame::GetVisibility() const
|
||||
void
|
||||
nsIFrame::UpdateVisibilitySynchronously()
|
||||
{
|
||||
nsIPresShell* presShell = PresContext()->PresShell();
|
||||
nsIPresShell* presShell = PresShell();
|
||||
if (!presShell) {
|
||||
return;
|
||||
}
|
||||
@ -2015,7 +2015,7 @@ nsIFrame::EnableVisibilityTracking()
|
||||
AddStateBits(NS_FRAME_VISIBILITY_IS_TRACKED);
|
||||
SetProperty(VisibilityStateProperty(), 0);
|
||||
|
||||
nsIPresShell* presShell = PresContext()->PresShell();
|
||||
nsIPresShell* presShell = PresShell();
|
||||
if (!presShell) {
|
||||
return;
|
||||
}
|
||||
@ -2477,7 +2477,7 @@ DisplayDebugBorders(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
}
|
||||
// Draw a border around the current event target
|
||||
if (nsFrame::GetShowEventTargetFrameBorder() &&
|
||||
aFrame->PresContext()->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
||||
aFrame->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
||||
DisplayItemType::TYPE_EVENT_TARGET_BORDER));
|
||||
@ -3369,7 +3369,7 @@ DescendIntoChild(nsDisplayListBuilder* aBuilder, nsIFrame *aChild,
|
||||
// There are cases where the "ignore scroll frame" on the builder is not set
|
||||
// correctly, and so we additionally want to catch cases where the child is
|
||||
// a root scrollframe and we are ignoring scrolling on the viewport.
|
||||
nsIPresShell* shell = child->PresContext()->PresShell();
|
||||
nsIPresShell* shell = child->PresShell();
|
||||
bool keepDescending = child == aBuilder->GetIgnoreScrollFrame() ||
|
||||
(shell->IgnoringViewportScrolling() && child == shell->GetRootScrollFrame());
|
||||
if (!keepDescending) {
|
||||
@ -3556,7 +3556,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||
// (which means we're painting it, modulo occlusion), mark it as visible
|
||||
// within the displayport.
|
||||
if (aBuilder->IsPaintingToWindow() && child->TrackingVisibility()) {
|
||||
child->PresContext()->PresShell()->EnsureFrameInApproximatelyVisibleList(child);
|
||||
child->PresShell()->EnsureFrameInApproximatelyVisibleList(child);
|
||||
awayFromCommonPath = true;
|
||||
}
|
||||
|
||||
@ -4594,7 +4594,7 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsPresContext* aPresContext,
|
||||
offsets = GetContentOffsetsFromPoint(pt, SKIP_HIDDEN);
|
||||
handleTableSelection = false;
|
||||
} else {
|
||||
GetDataForTableSelection(frameselection, PresContext()->PresShell(),
|
||||
GetDataForTableSelection(frameselection, PresShell(),
|
||||
aEvent->AsMouseEvent(),
|
||||
getter_AddRefs(parentContent),
|
||||
&contentOffsetForTableSel,
|
||||
@ -7924,7 +7924,7 @@ nsIFrame::GetConstFrameSelection() const
|
||||
frame = frame->GetParent();
|
||||
}
|
||||
|
||||
return PresContext()->PresShell()->ConstFrameSelection();
|
||||
return PresShell()->ConstFrameSelection();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -542,7 +542,7 @@ nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree(nsIFrame *aFrame,
|
||||
|
||||
// If the mouse cursor in on a frame which is descendant of same
|
||||
// selection root, we can expand the selection to the frame.
|
||||
if (cursorFrame && cursorFrame->PresContext()->PresShell() == mShell)
|
||||
if (cursorFrame && cursorFrame->PresShell() == mShell)
|
||||
{
|
||||
nsIContent* cursorContent = cursorFrame->GetContent();
|
||||
NS_ENSURE_TRUE(cursorContent, NS_ERROR_FAILURE);
|
||||
|
@ -381,7 +381,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
|
||||
std::max(0, aState->mInsideBorderSize.height - hScrollbarDesiredHeight));
|
||||
|
||||
nsSize visualScrollPortSize = scrollPortSize;
|
||||
nsIPresShell* presShell = PresContext()->PresShell();
|
||||
nsIPresShell* presShell = PresShell();
|
||||
if (mHelper.mIsRoot && presShell->IsScrollPositionClampingScrollPortSizeSet()) {
|
||||
nsSize compositionSize = nsLayoutUtils::CalculateCompositionSizeForFrame(this, false);
|
||||
float resolution = presShell->GetResolution();
|
||||
@ -1055,7 +1055,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
PlaceScrollArea(state, oldScrollPosition);
|
||||
if (!mHelper.mPostedReflowCallback) {
|
||||
// Make sure we'll try scrolling to restored position
|
||||
PresContext()->PresShell()->PostReflowCallback(&mHelper);
|
||||
PresShell()->PostReflowCallback(&mHelper);
|
||||
mHelper.mPostedReflowCallback = true;
|
||||
}
|
||||
|
||||
@ -1879,7 +1879,7 @@ public:
|
||||
}
|
||||
|
||||
mCallee = aCallee;
|
||||
APZCCallbackHelper::SuppressDisplayport(true, mCallee->mOuter->PresContext()->PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(true, mCallee->mOuter->PresShell());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1904,7 +1904,7 @@ private:
|
||||
void RemoveObserver() {
|
||||
if (mCallee) {
|
||||
RefreshDriver(mCallee)->RemoveRefreshObserver(this, FlushType::Style);
|
||||
APZCCallbackHelper::SuppressDisplayport(false, mCallee->mOuter->PresContext()->PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(false, mCallee->mOuter->PresShell());
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -2091,7 +2091,7 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
|
||||
// active scroll containers so that we paint by whole tile increments
|
||||
// when scrolling.
|
||||
nsLayoutUtils::SetDisplayPortMargins(mOuter->GetContent(),
|
||||
mOuter->PresContext()->PresShell(),
|
||||
mOuter->PresShell(),
|
||||
ScreenMargin(),
|
||||
0,
|
||||
nsLayoutUtils::RepaintMode::DoNotRepaint);
|
||||
@ -2452,13 +2452,13 @@ bool ScrollFrameHelper::IsIgnoringViewportClipping() const
|
||||
if (!mIsRoot)
|
||||
return false;
|
||||
nsSubDocumentFrame* subdocFrame = static_cast<nsSubDocumentFrame*>
|
||||
(nsLayoutUtils::GetCrossDocParentFrame(mOuter->PresContext()->PresShell()->GetRootFrame()));
|
||||
(nsLayoutUtils::GetCrossDocParentFrame(mOuter->PresShell()->GetRootFrame()));
|
||||
return subdocFrame && !subdocFrame->ShouldClipSubdocument();
|
||||
}
|
||||
|
||||
void ScrollFrameHelper::MarkScrollbarsDirtyForReflow() const
|
||||
{
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mOuter->PresShell();
|
||||
if (mVScrollbarBox) {
|
||||
presShell->FrameNeedsReflow(mVScrollbarBox, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
@ -2472,7 +2472,7 @@ bool ScrollFrameHelper::ShouldClampScrollPosition() const
|
||||
if (!mIsRoot)
|
||||
return true;
|
||||
nsSubDocumentFrame* subdocFrame = static_cast<nsSubDocumentFrame*>
|
||||
(nsLayoutUtils::GetCrossDocParentFrame(mOuter->PresContext()->PresShell()->GetRootFrame()));
|
||||
(nsLayoutUtils::GetCrossDocParentFrame(mOuter->PresShell()->GetRootFrame()));
|
||||
return !subdocFrame || subdocFrame->ShouldClampScrollPosition();
|
||||
}
|
||||
|
||||
@ -2719,7 +2719,7 @@ ScrollFrameHelper::ScrollActivityCallback(nsITimer *aTimer, void* anInstance)
|
||||
// Fire the synth mouse move.
|
||||
self->mScrollActivityTimer->Cancel();
|
||||
self->mScrollActivityTimer = nullptr;
|
||||
self->mOuter->PresContext()->PresShell()->SynthesizeMouseMove(true);
|
||||
self->mOuter->PresShell()->SynthesizeMouseMove(true);
|
||||
}
|
||||
|
||||
|
||||
@ -3394,7 +3394,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// Root scrollframes have FrameMetrics and clipping on their container
|
||||
// layers, so don't apply clipping again.
|
||||
mAddClipRectToLayer =
|
||||
!(mIsRoot && mOuter->PresContext()->PresShell()->GetIsViewportOverridden());
|
||||
!(mIsRoot && mOuter->PresShell()->GetIsViewportOverridden());
|
||||
|
||||
// Whether we might want to build a scrollable layer for this scroll frame
|
||||
// at some point in the future. This controls whether we add the information
|
||||
@ -3493,7 +3493,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
if (mIsRoot) {
|
||||
clipRect.SizeTo(nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
|
||||
if (mOuter->PresContext()->IsRootContentDocument()) {
|
||||
double res = mOuter->PresContext()->PresShell()->GetResolution();
|
||||
double res = mOuter->PresShell()->GetResolution();
|
||||
clipRect.width = NSToCoordRound(clipRect.width / res);
|
||||
clipRect.height = NSToCoordRound(clipRect.height / res);
|
||||
}
|
||||
@ -3596,7 +3596,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// Set a displayport so next paint we don't have to force layerization
|
||||
// after the fact.
|
||||
nsLayoutUtils::SetDisplayPortMargins(mOuter->GetContent(),
|
||||
mOuter->PresContext()->PresShell(),
|
||||
mOuter->PresShell(),
|
||||
ScreenMargin(),
|
||||
0,
|
||||
nsLayoutUtils::RepaintMode::DoNotRepaint);
|
||||
@ -3778,7 +3778,7 @@ ScrollFrameHelper::DecideScrollableLayer(nsDisplayListBuilder* aBuilder,
|
||||
// The displayPort getter takes care of adjusting for resolution. So if
|
||||
// we have resolution but no displayPort then we need to adjust for
|
||||
// resolution here.
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mOuter->PresShell();
|
||||
*aVisibleRect = aVisibleRect->RemoveResolution(
|
||||
presShell->ScaleToResolution() ? presShell->GetResolution () : 1.0f);
|
||||
*aDirtyRect = aDirtyRect->RemoveResolution(
|
||||
@ -3947,7 +3947,7 @@ ScrollFrameHelper::GetScrollRangeForClamping() const
|
||||
nsSize
|
||||
ScrollFrameHelper::GetScrollPositionClampingScrollPortSize() const
|
||||
{
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mOuter->PresShell();
|
||||
if (mIsRoot && presShell->IsScrollPositionClampingScrollPortSizeSet()) {
|
||||
return presShell->GetScrollPositionClampingScrollPortSize();
|
||||
}
|
||||
@ -4261,7 +4261,7 @@ ScrollFrameHelper::GetPageScrollAmount() const
|
||||
if (mIsRoot) {
|
||||
// Reduce effective scrollport height by the height of any fixed-pos
|
||||
// headers or footers
|
||||
nsIFrame* root = mOuter->PresContext()->PresShell()->GetRootFrame();
|
||||
nsIFrame* root = mOuter->PresShell()->GetRootFrame();
|
||||
effectiveScrollPortSize =
|
||||
GetScrollPortSizeExcludingHeadersAndFooters(root, mScrollPort);
|
||||
} else {
|
||||
@ -4659,7 +4659,7 @@ ScrollFrameHelper::Destroy(PostDestroyData& aPostDestroyData)
|
||||
aPostDestroyData.AddAnonymousContent(mResizerContent.forget());
|
||||
|
||||
if (mPostedReflowCallback) {
|
||||
mOuter->PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
mOuter->PresShell()->CancelReflowCallback(this);
|
||||
mPostedReflowCallback = false;
|
||||
}
|
||||
|
||||
@ -5326,7 +5326,7 @@ nsXULScrollFrame::XULLayout(nsBoxLayoutState& aState)
|
||||
}
|
||||
if (!mHelper.mPostedReflowCallback) {
|
||||
// Make sure we'll try scrolling to restored position
|
||||
PresContext()->PresShell()->PostReflowCallback(&mHelper);
|
||||
PresShell()->PostReflowCallback(&mHelper);
|
||||
mHelper.mPostedReflowCallback = true;
|
||||
}
|
||||
if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
@ -5531,7 +5531,7 @@ ScrollFrameHelper::ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas)
|
||||
// needing reflow. Don't use NS_FRAME_IS_DIRTY as dirty as that means
|
||||
// we have to reflow the frame and all its descendants, and we don't
|
||||
// have to do that here. Only this frame needs to be reflowed.
|
||||
mOuter->PresContext()->PresShell()->FrameNeedsReflow(
|
||||
mOuter->PresShell()->FrameNeedsReflow(
|
||||
mOuter, nsIPresShell::eResize, NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
// Ensure that next time nsHTMLScrollFrame::Reflow runs, we don't skip
|
||||
// updating the scrollbars. (Because the overflow area of the scrolled
|
||||
@ -5634,7 +5634,7 @@ ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
|
||||
NS_ASSERTION(!mSuppressScrollbarUpdate,
|
||||
"This should have been suppressed");
|
||||
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mOuter->PresShell();
|
||||
|
||||
bool hasResizer = HasResizer();
|
||||
bool scrollbarOnLeft = !IsScrollbarOnRight();
|
||||
@ -5762,7 +5762,7 @@ ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
|
||||
// post reflow callback to modify scrollbar attributes
|
||||
mUpdateScrollbarAttributes = true;
|
||||
if (!mPostedReflowCallback) {
|
||||
aState.PresContext()->PresShell()->PostReflowCallback(this);
|
||||
aState.PresShell()->PostReflowCallback(this);
|
||||
mPostedReflowCallback = true;
|
||||
}
|
||||
}
|
||||
@ -5779,7 +5779,7 @@ void
|
||||
ScrollFrameHelper::SetScrollbarEnabled(nsIContent* aContent, nscoord aMaxPos)
|
||||
{
|
||||
DebugOnly<nsWeakPtr> weakShell(
|
||||
do_GetWeakReference(mOuter->PresContext()->PresShell()));
|
||||
do_GetWeakReference(mOuter->PresShell()));
|
||||
if (aMaxPos) {
|
||||
aContent->UnsetAttr(kNameSpaceID_None, nsGkAtoms::disabled, true);
|
||||
} else {
|
||||
@ -5794,7 +5794,7 @@ ScrollFrameHelper::SetCoordAttribute(nsIContent* aContent, nsAtom* aAtom,
|
||||
nscoord aSize)
|
||||
{
|
||||
DebugOnly<nsWeakPtr> weakShell(
|
||||
do_GetWeakReference(mOuter->PresContext()->PresShell()));
|
||||
do_GetWeakReference(mOuter->PresShell()));
|
||||
// convert to pixels
|
||||
int32_t pixelSize = nsPresContext::AppUnitsToIntCSSPixels(aSize);
|
||||
|
||||
@ -6093,7 +6093,7 @@ ScrollFrameHelper::SaveState() const
|
||||
state->SetAllowScrollOriginDowngrade(allowScrollOriginDowngrade);
|
||||
if (mIsRoot) {
|
||||
// Only save resolution properties for root scroll frames
|
||||
nsIPresShell* shell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* shell = mOuter->PresShell();
|
||||
state->SetResolution(shell->GetResolution());
|
||||
state->SetScaleToResolution(shell->ScaleToResolution());
|
||||
}
|
||||
@ -6114,7 +6114,7 @@ ScrollFrameHelper::RestoreState(nsPresState* aState)
|
||||
aState->GetResolution() == 1.0));
|
||||
|
||||
if (mIsRoot) {
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mOuter->PresShell();
|
||||
if (aState->GetScaleToResolution()) {
|
||||
presShell->SetResolutionAndScaleTo(aState->GetResolution());
|
||||
} else {
|
||||
|
@ -6687,7 +6687,7 @@ nsGridContainerFrame::NoteNewChildren(ChildListID aListID,
|
||||
MOZ_ASSERT(supportedLists.Contains(aListID), "unexpected child list");
|
||||
#endif
|
||||
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
for (auto pif = GetPrevInFlow(); pif; pif = pif->GetPrevInFlow()) {
|
||||
if (aListID == kPrincipalList) {
|
||||
pif->AddStateBits(NS_STATE_GRID_DID_PUSH_ITEMS);
|
||||
@ -6726,7 +6726,7 @@ nsGridContainerFrame::MergeSortedExcessOverflowContainers(nsFrameList& aList)
|
||||
if (eoc) {
|
||||
::MergeSortedFrameLists(*eoc, aList, GetContent());
|
||||
} else {
|
||||
SetPropTableFrames(new (PresContext()->PresShell()) nsFrameList(aList),
|
||||
SetPropTableFrames(new (PresShell()) nsFrameList(aList),
|
||||
ExcessOverflowContainersProperty());
|
||||
}
|
||||
}
|
||||
@ -6915,7 +6915,7 @@ nsGridContainerFrame::GetGridFrameWithComputedInfo(nsIFrame* aFrame)
|
||||
|
||||
if (reflowNeeded) {
|
||||
// Trigger a reflow that generates additional grid property data.
|
||||
nsIPresShell* shell = gridFrame->PresContext()->PresShell();
|
||||
nsIPresShell* shell = gridFrame->PresShell();
|
||||
gridFrame->AddStateBits(NS_STATE_GRID_GENERATE_COMPUTED_VALUES);
|
||||
shell->FrameNeedsReflow(gridFrame,
|
||||
nsIPresShell::eResize,
|
||||
|
@ -641,6 +641,10 @@ public:
|
||||
return StyleContext()->PresContext();
|
||||
}
|
||||
|
||||
nsIPresShell* PresShell() const {
|
||||
return PresContext()->PresShell();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to initialize the frame. This is called immediately after creating
|
||||
* the frame.
|
||||
|
@ -188,7 +188,7 @@ nsImageFrame::DisconnectMap()
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
if (nsAccessibilityService* accService = GetAccService()) {
|
||||
accService->RecreateAccessible(PresContext()->PresShell(), mContent);
|
||||
accService->RecreateAccessible(PresShell(), mContent);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -197,7 +197,7 @@ void
|
||||
nsImageFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
}
|
||||
|
||||
@ -1072,7 +1072,7 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishAndStoreOverflow(&aMetrics, aReflowInput.mStyleDisplay);
|
||||
|
||||
if ((GetStateBits() & NS_FRAME_FIRST_REFLOW) && !mReflowCallbackPosted) {
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
mReflowCallbackPosted = true;
|
||||
shell->PostReflowCallback(this);
|
||||
}
|
||||
@ -2124,7 +2124,7 @@ nsImageFrame::GetCursor(const nsPoint& aPoint,
|
||||
// here, since it means that areas on which the cursor isn't
|
||||
// specified will inherit the style from the image.
|
||||
RefPtr<nsStyleContext> areaStyle =
|
||||
PresContext()->PresShell()->StyleSet()->
|
||||
PresShell()->StyleSet()->
|
||||
ResolveStyleFor(area->AsElement(), StyleContext(),
|
||||
LazyComputeBehavior::Allow);
|
||||
FillCursorInformationFromStyle(areaStyle->StyleUserInterface(),
|
||||
@ -2150,7 +2150,7 @@ nsImageFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
}
|
||||
if (nsGkAtoms::alt == aAttribute)
|
||||
{
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this,
|
||||
PresShell()->FrameNeedsReflow(this,
|
||||
nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void
|
||||
nsPluginFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
}
|
||||
|
||||
// Ensure our DidComposite observer is gone.
|
||||
@ -359,7 +359,7 @@ nsPluginFrame::PrepForDrawing(nsIWidget *aWidget)
|
||||
#ifdef ACCESSIBILITY
|
||||
nsAccessibilityService* accService = nsIPresShell::AccService();
|
||||
if (accService) {
|
||||
accService->RecreateAccessible(PresContext()->PresShell(), mContent);
|
||||
accService->RecreateAccessible(PresShell(), mContent);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -221,7 +221,7 @@ nsSubDocumentFrame::GetSubdocumentPresShellForPainting(uint32_t aFlags)
|
||||
|
||||
nsIFrame* subdocRootFrame = subdocView->GetFrame();
|
||||
if (subdocRootFrame) {
|
||||
presShell = subdocRootFrame->PresContext()->PresShell();
|
||||
presShell = subdocRootFrame->PresShell();
|
||||
}
|
||||
|
||||
// If painting is suppressed in the presshell, we try to look for a better
|
||||
@ -237,7 +237,7 @@ nsSubDocumentFrame::GetSubdocumentPresShellForPainting(uint32_t aFlags)
|
||||
frame = nextView->GetFrame();
|
||||
}
|
||||
if (frame) {
|
||||
nsIPresShell* ps = frame->PresContext()->PresShell();
|
||||
nsIPresShell* ps = frame->PresShell();
|
||||
if (!presShell || (ps && !ps->IsPaintingSuppressed() && sShowPreviousPage)) {
|
||||
subdocView = nextView;
|
||||
subdocRootFrame = frame;
|
||||
@ -847,7 +847,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
|
||||
if (!aPresContext->IsPaginated() && !mPostedReflowCallback) {
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
mPostedReflowCallback = true;
|
||||
}
|
||||
|
||||
@ -911,7 +911,7 @@ nsSubDocumentFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
else if (aAttribute == nsGkAtoms::showresizer) {
|
||||
nsIFrame* rootFrame = GetSubdocumentRootFrame();
|
||||
if (rootFrame) {
|
||||
rootFrame->PresContext()->PresShell()->
|
||||
rootFrame->PresShell()->
|
||||
FrameNeedsReflow(rootFrame, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
@ -1000,7 +1000,7 @@ void
|
||||
nsSubDocumentFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (mPostedReflowCallback) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mPostedReflowCallback = false;
|
||||
}
|
||||
|
||||
@ -1021,7 +1021,7 @@ nsSubDocumentFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostD
|
||||
nsContentUtils::AddScriptRunner(
|
||||
new nsHideViewer(mContent,
|
||||
frameloader,
|
||||
PresContext()->PresShell(),
|
||||
PresShell(),
|
||||
(mDidCreateDoc || mCallingShow)));
|
||||
} else {
|
||||
frameloader->SetDetachedSubdocFrame(nullptr, nullptr);
|
||||
@ -1254,12 +1254,12 @@ nsSubDocumentFrame::EndSwapDocShells(nsIFrame* aOther)
|
||||
// And repaint them, for good measure, in case there's nothing
|
||||
// interesting that happens during reflow.
|
||||
if (weakThis.IsAlive()) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
if (weakOther.IsAlive()) {
|
||||
other->PresContext()->PresShell()->
|
||||
other->PresShell()->
|
||||
FrameNeedsReflow(other, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
other->InvalidateFrameSubtree();
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ InvalidateFrameDueToGlyphsChanged(nsIFrame* aFrame)
|
||||
{
|
||||
MOZ_ASSERT(aFrame);
|
||||
|
||||
nsIPresShell* shell = aFrame->PresContext()->PresShell();
|
||||
nsIPresShell* shell = aFrame->PresShell();
|
||||
for (nsIFrame* f = aFrame; f;
|
||||
f = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(f)) {
|
||||
f->InvalidateFrame();
|
||||
@ -2036,7 +2036,7 @@ static already_AddRefed<DrawTarget>
|
||||
CreateReferenceDrawTarget(const nsTextFrame* aTextFrame)
|
||||
{
|
||||
RefPtr<gfxContext> ctx =
|
||||
aTextFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
aTextFrame->PresShell()->CreateReferenceRenderingContext();
|
||||
RefPtr<DrawTarget> dt = ctx->GetDrawTarget();
|
||||
return dt.forget();
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ nsDisplayRemote::nsDisplayRemote(nsDisplayListBuilder* aBuilder,
|
||||
if (aBuilder->IsInsidePointerEventsNoneDoc() || frameIsPointerEventsNone) {
|
||||
mEventRegionsOverride |= EventRegionsOverride::ForceEmptyHitRegion;
|
||||
}
|
||||
if (nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresContext()->PresShell())) {
|
||||
if (nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresShell())) {
|
||||
mEventRegionsOverride |= EventRegionsOverride::ForceDispatchToContent;
|
||||
}
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ nsMathMLContainerFrame::ReLayoutChildren(nsIFrame* aParentFrame)
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
frame->PresContext()->PresShell()->
|
||||
frame->PresShell()->
|
||||
FrameNeedsReflow(frame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
|
||||
return NS_OK;
|
||||
@ -770,7 +770,7 @@ nsMathMLContainerFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
// XXX Since they are numerous MathML attributes that affect layout, and
|
||||
// we can't check all of them here, play safe by requesting a reflow.
|
||||
// XXXldb This should only do work for attributes that cause changes!
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -226,7 +226,7 @@ nsMathMLmactionFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
}
|
||||
|
||||
if (needsReflow) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ nsMathMLmactionFrame::MouseClick()
|
||||
mContent->SetAttr(kNameSpaceID_None, nsGkAtoms::selection_, value, notify);
|
||||
|
||||
// Now trigger a content-changed reflow...
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(mSelectedFrame, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
|
||||
// align - just need to issue a dirty (resize) reflow command
|
||||
if (aAttribute == nsGkAtoms::align) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -755,7 +755,7 @@ nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsMathMLContainerFrame::RebuildAutomaticDataForChildren(GetParent());
|
||||
// Need to reflow the parent, not us, because this can actually
|
||||
// affect siblings.
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(GetParent(), nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void
|
||||
nsMathMLmunderoverFrame::DestroyFrom(nsIFrame* aDestroyRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (!mPostReflowIncrementScriptLevelCommands.IsEmpty()) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
}
|
||||
nsMathMLContainerFrame::DestroyFrom(aDestroyRoot, aPostDestroyData);
|
||||
}
|
||||
@ -119,7 +119,7 @@ nsMathMLmunderoverFrame::SetIncrementScriptLevel(uint32_t aChildIndex,
|
||||
}
|
||||
|
||||
if (mPostReflowIncrementScriptLevelCommands.IsEmpty()) {
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
|
||||
mPostReflowIncrementScriptLevelCommands.AppendElement(
|
||||
|
@ -1460,7 +1460,7 @@ nsCSSRendering::FindBackgroundFrame(nsIFrame* aForFrame,
|
||||
nsIFrame** aBackgroundFrame)
|
||||
{
|
||||
nsIFrame* rootElementFrame =
|
||||
aForFrame->PresContext()->PresShell()->FrameConstructor()->GetRootElementStyleFrame();
|
||||
aForFrame->PresShell()->FrameConstructor()->GetRootElementStyleFrame();
|
||||
if (IsCanvasFrame(aForFrame)) {
|
||||
*aBackgroundFrame = FindCanvasBackgroundFrame(aForFrame, rootElementFrame);
|
||||
return true;
|
||||
|
@ -1125,7 +1125,7 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||
// position: fixed items are reflowed into and only drawn inside the
|
||||
// viewport, or the scroll position clamping scrollport size, if one is
|
||||
// set.
|
||||
nsIPresShell* ps = aFrame->PresContext()->PresShell();
|
||||
nsIPresShell* ps = aFrame->PresShell();
|
||||
if (ps->IsScrollPositionClampingScrollPortSizeSet()) {
|
||||
dirtyRectRelativeToDirtyFrame =
|
||||
nsRect(nsPoint(0, 0), ps->GetScrollPositionClampingScrollPortSize());
|
||||
@ -1266,7 +1266,7 @@ nsDisplayListBuilder::EnterPresShell(nsIFrame* aReferenceFrame,
|
||||
bool aPointerEventsNoneDoc)
|
||||
{
|
||||
PresShellState* state = mPresShellStates.AppendElement();
|
||||
state->mPresShell = aReferenceFrame->PresContext()->PresShell();
|
||||
state->mPresShell = aReferenceFrame->PresShell();
|
||||
state->mCaretFrame = nullptr;
|
||||
state->mFirstFrameMarkedForDisplay = mFramesMarkedForDisplay.Length();
|
||||
|
||||
@ -1349,7 +1349,7 @@ void
|
||||
nsDisplayListBuilder::LeavePresShell(nsIFrame* aReferenceFrame, nsDisplayList* aPaintedContents)
|
||||
{
|
||||
NS_ASSERTION(CurrentPresShellState()->mPresShell ==
|
||||
aReferenceFrame->PresContext()->PresShell(),
|
||||
aReferenceFrame->PresShell(),
|
||||
"Presshell mismatch");
|
||||
|
||||
if (mIsPaintingToWindow) {
|
||||
@ -1444,7 +1444,7 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
||||
// Store the current display data so that it can be used for fixed
|
||||
// background images.
|
||||
NS_ASSERTION(CurrentPresShellState()->mPresShell ==
|
||||
aDirtyFrame->PresContext()->PresShell(),
|
||||
aDirtyFrame->PresShell(),
|
||||
"Presshell mismatch");
|
||||
MOZ_ASSERT(!CurrentPresShellState()->mFixedBackgroundDisplayData,
|
||||
"already traversed this presshell's root frame?");
|
||||
@ -3274,7 +3274,7 @@ static Maybe<nsRect>
|
||||
GetViewportRectRelativeToReferenceFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
nsIFrame* rootFrame = aFrame->PresContext()->PresShell()->GetRootFrame();
|
||||
nsIFrame* rootFrame = aFrame->PresShell()->GetRootFrame();
|
||||
nsRect rootRect = rootFrame->GetRectRelativeToSelf();
|
||||
if (nsLayoutUtils::TransformRect(rootFrame, aFrame, rootRect) == nsLayoutUtils::TRANSFORM_SUCCEEDED) {
|
||||
return Some(rootRect + aBuilder->ToReferenceFrame(aFrame));
|
||||
@ -6863,7 +6863,7 @@ nsDisplaySubDocument::nsDisplaySubDocument(nsDisplayListBuilder* aBuilder,
|
||||
MOZ_COUNT_CTOR(nsDisplaySubDocument);
|
||||
mForceDispatchToContentRegion =
|
||||
aBuilder->IsBuildingLayerEventRegions() &&
|
||||
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresContext()->PresShell());
|
||||
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresShell());
|
||||
|
||||
// The SubDocument display item is conceptually outside the viewport frame,
|
||||
// so in cases where the viewport frame is an AGR, the SubDocument's AGR
|
||||
@ -6950,7 +6950,7 @@ nsDisplaySubDocument::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
nsRect displayport;
|
||||
nsIFrame* rootScrollFrame = mFrame->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
nsIFrame* rootScrollFrame = mFrame->PresShell()->GetRootScrollFrame();
|
||||
MOZ_ASSERT(rootScrollFrame);
|
||||
Unused << nsLayoutUtils::GetDisplayPort(rootScrollFrame->GetContent(), &displayport,
|
||||
RelativeTo::ScrollFrame);
|
||||
@ -7027,7 +7027,7 @@ nsDisplayResolution::HitTest(nsDisplayListBuilder* aBuilder,
|
||||
HitTestState* aState,
|
||||
nsTArray<nsIFrame*> *aOutFrames)
|
||||
{
|
||||
nsIPresShell* presShell = mFrame->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mFrame->PresShell();
|
||||
nsRect rect = aRect.RemoveResolution(presShell->ScaleToResolution() ? presShell->GetResolution () : 1.0f);
|
||||
mList.HitTest(aBuilder, rect, aState, aOutFrames);
|
||||
}
|
||||
@ -7036,7 +7036,7 @@ already_AddRefed<Layer>
|
||||
nsDisplayResolution::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerLayerParameters& aContainerParameters) {
|
||||
nsIPresShell* presShell = mFrame->PresContext()->PresShell();
|
||||
nsIPresShell* presShell = mFrame->PresShell();
|
||||
ContainerLayerParameters containerParameters(
|
||||
presShell->GetResolution(), presShell->GetResolution(), nsIntPoint(),
|
||||
aContainerParameters);
|
||||
|
@ -3310,7 +3310,7 @@ public:
|
||||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override {
|
||||
mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx,
|
||||
mFrame->PresShell()->PaintCount(mFrameName, aCtx,
|
||||
mFrame->PresContext(),
|
||||
mFrame, ToReferenceFrame(),
|
||||
mColor);
|
||||
@ -3324,7 +3324,7 @@ protected:
|
||||
#define DO_GLOBAL_REFLOW_COUNT_DSP(_name) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
||||
PresShell()->IsPaintingFrameCounts()) { \
|
||||
aLists.Outlines()->AppendNewToTop( \
|
||||
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name)); \
|
||||
} \
|
||||
@ -3333,7 +3333,7 @@ protected:
|
||||
#define DO_GLOBAL_REFLOW_COUNT_DSP_COLOR(_name, _color) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
||||
PresShell()->IsPaintingFrameCounts()) { \
|
||||
aLists.Outlines()->AppendNewToTop( \
|
||||
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name, _color)); \
|
||||
} \
|
||||
|
@ -110,7 +110,7 @@ nsFontFaceUtils::MarkDirtyForFontChange(nsIFrame* aSubtreeRoot,
|
||||
AutoTArray<nsIFrame*, 4> subtrees;
|
||||
subtrees.AppendElement(aSubtreeRoot);
|
||||
|
||||
nsIPresShell* ps = aSubtreeRoot->PresContext()->PresShell();
|
||||
nsIPresShell* ps = aSubtreeRoot->PresShell();
|
||||
|
||||
// check descendants, iterating over subtrees that may include
|
||||
// additional subtrees associated with placeholders
|
||||
|
@ -177,7 +177,7 @@ struct nsSVGFrameReferenceFromProperty
|
||||
{
|
||||
explicit nsSVGFrameReferenceFromProperty(nsIFrame* aFrame)
|
||||
: mFrame(aFrame)
|
||||
, mFramePresShell(aFrame->PresContext()->PresShell())
|
||||
, mFramePresShell(aFrame->PresShell())
|
||||
{}
|
||||
|
||||
// Clear our reference to the frame.
|
||||
|
@ -3331,7 +3331,7 @@ SVGTextFrame::ScheduleReflowSVGNonDisplayText(nsIPresShell::IntrinsicDirty aReas
|
||||
|
||||
MOZ_ASSERT(f, "should have found an ancestor frame to reflow");
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(f, aReason, NS_FRAME_IS_DIRTY);
|
||||
PresShell()->FrameNeedsReflow(f, aReason, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(SVGTextFrame::MutationObserver, nsIMutationObserver)
|
||||
@ -4213,7 +4213,7 @@ SVGTextFrame::GetSubStringLengthSlowFallback(nsIContent* aContent,
|
||||
// but we would still need to resort to full reflow for percentage
|
||||
// positioning attributes. For now we just do a full reflow regardless since
|
||||
// the cases that would cause us to be called are relatively uncommon.
|
||||
PresContext()->PresShell()->FlushPendingNotifications(FlushType::Layout);
|
||||
PresShell()->FlushPendingNotifications(FlushType::Layout);
|
||||
|
||||
UpdateGlyphPositioning();
|
||||
|
||||
|
@ -440,7 +440,7 @@ nsSVGForeignObjectFrame::NotifySVGChanged(uint32_t aFlags)
|
||||
// PresShell and prevent it from reflowing us properly in future. Besides
|
||||
// that, nsSVGOuterSVGFrame::DidReflow will take care of reflowing us
|
||||
// synchronously, so there's no need.
|
||||
if (needReflow && !PresContext()->PresShell()->IsReflowLocked()) {
|
||||
if (needReflow && !PresShell()->IsReflowLocked()) {
|
||||
RequestReflow(nsIPresShell::eResize);
|
||||
}
|
||||
|
||||
@ -503,7 +503,7 @@ void nsSVGForeignObjectFrame::RequestReflow(nsIPresShell::IntrinsicDirty aType)
|
||||
if (!kid)
|
||||
return;
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(kid, aType, NS_FRAME_IS_DIRTY);
|
||||
PresShell()->FrameNeedsReflow(kid, aType, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -101,7 +101,7 @@ nsSVGImageFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDest
|
||||
}
|
||||
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ nsSVGImageFrame::ReflowSVG()
|
||||
SVGObserverUtils::UpdateEffects(this);
|
||||
|
||||
if (!mReflowCallbackPosted) {
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
mReflowCallbackPosted = true;
|
||||
shell->PostReflowCallback(this);
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ nsSVGOuterSVGFrame::Init(nsIContent* aContent,
|
||||
// has had its first reflow, and that its size depends on our
|
||||
// intrinsic size. We need it to resize itself to use our (now
|
||||
// available) intrinsic size:
|
||||
embeddingFrame->PresContext()->PresShell()->
|
||||
embeddingFrame->PresShell()->
|
||||
FrameNeedsReflow(embeddingFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
@ -514,7 +514,7 @@ nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext,
|
||||
|
||||
// Make sure elements styled by :hover get updated if script/animation moves
|
||||
// them under or out from under the pointer:
|
||||
PresContext()->PresShell()->SynthesizeMouseMove(false);
|
||||
PresShell()->SynthesizeMouseMove(false);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
@ -716,14 +716,14 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
if (DependsOnIntrinsicSize(embeddingFrame)) {
|
||||
// Tell embeddingFrame's presShell it needs to be reflowed (which takes
|
||||
// care of reflowing us too).
|
||||
embeddingFrame->PresContext()->PresShell()->
|
||||
embeddingFrame->PresShell()->
|
||||
FrameNeedsReflow(embeddingFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
// else our width and height is overridden - don't reflow anything
|
||||
} else {
|
||||
// We are not embedded by reference, so our 'width' and 'height'
|
||||
// attributes are not overridden - we need to reflow.
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ nsSVGUtils::ScheduleReflowSVG(nsIFrame *aFrame)
|
||||
nsFrameState dirtyBit =
|
||||
(outerSVGFrame == aFrame ? NS_FRAME_IS_DIRTY : NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
aFrame->PresContext()->PresShell()->FrameNeedsReflow(
|
||||
aFrame->PresShell()->FrameNeedsReflow(
|
||||
outerSVGFrame, nsIPresShell::eResize, dirtyBit);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
mozilla::layers::WebRenderLayerManager* aManager,
|
||||
nsDisplayListBuilder* aDisplayListBuilder) override
|
||||
{
|
||||
RefPtr<nsFrameSelection> frameSelection = mFrame->PresContext()->PresShell()->FrameSelection();
|
||||
RefPtr<nsFrameSelection> frameSelection = mFrame->PresShell()->FrameSelection();
|
||||
if (frameSelection->GetTableCellSelection()) {
|
||||
return false;
|
||||
}
|
||||
@ -218,7 +218,7 @@ nsTableCellFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
// BasicTableLayoutStrategy
|
||||
if (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::nowrap &&
|
||||
PresContext()->CompatibilityMode() == eCompatibility_NavQuirks) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ nsTableColGroupFrame::InsertColsReflow(int32_t aColIndex,
|
||||
{
|
||||
AddColsToTable(aColIndex, true, aCols);
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this,
|
||||
PresShell()->FrameNeedsReflow(this,
|
||||
nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -270,7 +270,7 @@ nsTableColGroupFrame::RemoveChild(nsTableColFrame& aChild,
|
||||
}
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this,
|
||||
PresShell()->FrameNeedsReflow(this,
|
||||
nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ nsTableFrame::RowOrColSpanChanged(nsTableCellFrame* aCellFrame)
|
||||
|
||||
// XXX Should this use eStyleChange? It currently doesn't need
|
||||
// to, but it might given more optimization.
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
@ -726,7 +726,7 @@ nsTableFrame::AppendAnonymousColFrames(nsTableColGroupFrame* aColGroupFrame,
|
||||
NS_PRECONDITION(aColType != eColAnonymousCol, "Shouldn't happen");
|
||||
MOZ_ASSERT(aNumColsToAdd > 0, "We should be adding _something_.");
|
||||
|
||||
nsIPresShell *shell = PresContext()->PresShell();
|
||||
nsIPresShell *shell = PresShell();
|
||||
|
||||
// Get the last col frame
|
||||
nsFrameList newColFrames;
|
||||
@ -1219,7 +1219,7 @@ nsDisplayItemGeometry*
|
||||
nsDisplayTableItem::AllocateGeometry(nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
return new nsDisplayTableItemGeometry(this, aBuilder,
|
||||
mFrame->GetOffsetTo(mFrame->PresContext()->PresShell()->GetRootFrame()));
|
||||
mFrame->GetOffsetTo(mFrame->PresShell()->GetRootFrame()));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1233,7 +1233,7 @@ nsDisplayTableItem::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool invalidateForAttachmentFixed = false;
|
||||
if (mDrawsBackground && mPartHasFixedBackground) {
|
||||
nsPoint frameOffsetToViewport = mFrame->GetOffsetTo(
|
||||
mFrame->PresContext()->PresShell()->GetRootFrame());
|
||||
mFrame->PresShell()->GetRootFrame());
|
||||
invalidateForAttachmentFixed =
|
||||
frameOffsetToViewport != geometry->mFrameOffsetToViewport;
|
||||
}
|
||||
@ -2577,7 +2577,7 @@ nsTableFrame::AppendFrames(ChildListID aListID,
|
||||
printf("=== TableFrame::AppendFrames\n");
|
||||
Dump(true, true, true);
|
||||
#endif
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
SetGeometryDirty();
|
||||
}
|
||||
@ -2749,7 +2749,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID,
|
||||
return;
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
SetGeometryDirty();
|
||||
#ifdef DEBUG_TABLE_CELLMAP
|
||||
@ -2838,7 +2838,7 @@ nsTableFrame::RemoveFrame(ChildListID aListID,
|
||||
mozilla::StyleDisplay::TableColumnGroup !=
|
||||
aOldFrame->StyleDisplay()->mDisplay,
|
||||
"Wrong list name; use kColGroupList iff colgroup");
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
nsTableFrame* lastParent = nullptr;
|
||||
while (aOldFrame) {
|
||||
nsIFrame* oldFrameNextContinuation = aOldFrame->GetNextContinuation();
|
||||
|
@ -218,7 +218,7 @@ nsTableRowFrame::AppendFrames(ChildListID aListID,
|
||||
tableFrame->AppendCell(static_cast<nsTableCellFrame&>(*childFrame), GetRowIndex());
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
tableFrame->SetGeometryDirty();
|
||||
}
|
||||
@ -264,7 +264,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID,
|
||||
}
|
||||
tableFrame->InsertCells(cellChildren, GetRowIndex(), colIndex);
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
tableFrame->SetGeometryDirty();
|
||||
}
|
||||
@ -284,7 +284,7 @@ nsTableRowFrame::RemoveFrame(ChildListID aListID,
|
||||
// Remove the frame and destroy it
|
||||
mFrames.DestroyFrame(aOldFrame);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
|
@ -1489,7 +1489,7 @@ nsTableRowGroupFrame::AppendFrames(ChildListID aListID,
|
||||
if (rows.Length() > 0) {
|
||||
nsTableFrame* tableFrame = GetTableFrame();
|
||||
tableFrame->AppendRows(this, rowIndex, rows);
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
tableFrame->SetGeometryDirty();
|
||||
@ -1539,7 +1539,7 @@ nsTableRowGroupFrame::InsertFrames(ChildListID aListID,
|
||||
int32_t rowIndex = (prevRow) ? prevRow->GetRowIndex() + 1 : startRowIndex;
|
||||
tableFrame->InsertRows(this, rows, rowIndex, true);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
tableFrame->SetGeometryDirty();
|
||||
@ -1561,7 +1561,7 @@ nsTableRowGroupFrame::RemoveFrame(ChildListID aListID,
|
||||
// remove the rows from the table (and flag a rebalance)
|
||||
tableFrame->RemoveRows(*rowFrame, 1, true);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
tableFrame->SetGeometryDirty();
|
||||
|
@ -121,7 +121,7 @@ nsTableWrapperFrame::AppendFrames(ChildListID aListID,
|
||||
|
||||
// Reflow the new caption frame. It's already marked dirty, so
|
||||
// just tell the pres shell.
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ nsTableWrapperFrame::InsertFrames(ChildListID aListID,
|
||||
|
||||
// Reflow the new caption frame. It's already marked dirty, so
|
||||
// just tell the pres shell.
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ nsTableWrapperFrame::RemoveFrame(ChildListID aListID,
|
||||
// Remove the frame and destroy it
|
||||
mCaptionFrames.DestroyFrame(aOldFrame);
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN); // also means child removed
|
||||
}
|
||||
|
@ -1030,7 +1030,7 @@ nsBoxFrame::RemoveFrame(ChildListID aListID,
|
||||
aOldFrame->Destroy();
|
||||
|
||||
// mark us dirty and generate a reflow command
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ nsBoxFrame::InsertFrames(ChildListID aListID,
|
||||
SetDebugOnChildList(state, mFrames.FirstChild(), true);
|
||||
#endif
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1101,7 +1101,7 @@ nsBoxFrame::AppendFrames(ChildListID aListID,
|
||||
|
||||
// XXXbz why is this NS_FRAME_FIRST_REFLOW check here?
|
||||
if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1228,7 +1228,7 @@ nsBoxFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
UpdateMouseThrough();
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
else if (aAttribute == nsGkAtoms::ordinal) {
|
||||
@ -1242,7 +1242,7 @@ nsBoxFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
StyleDisplay()->mDisplay != mozilla::StyleDisplay::MozPopup) {
|
||||
parent->XULRelayoutChildAtOrdinal(this);
|
||||
// XXXldb Should this instead be a tree change on the child or parent?
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(parent, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
@ -1256,7 +1256,7 @@ nsBoxFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
mContent->IsXULElement(nsGkAtoms::tree)) {
|
||||
// Reflow ourselves and all our children if "rows" changes, since
|
||||
// nsTreeBodyFrame's layout reads this from its parent (this frame).
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ nsImageBoxFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
|
||||
if (aAttribute == nsGkAtoms::src) {
|
||||
UpdateImage();
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
else if (aAttribute == nsGkAtoms::validate)
|
||||
@ -861,7 +861,7 @@ nsImageBoxFrame::OnSizeAvailable(imgIRequest* aRequest, imgIContainer* aImage)
|
||||
nsPresContext::CSSPixelsToAppUnits(h));
|
||||
|
||||
if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
@ -885,7 +885,7 @@ nsImageBoxFrame::OnLoadComplete(imgIRequest* aRequest, nsresult aStatus)
|
||||
} else {
|
||||
// Fire an onerror DOM event.
|
||||
mIntrinsicSize.SizeTo(0, 0);
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
FireImageDOMEvent(mContent, eLoadError);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ nsListBoxBodyFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostD
|
||||
{
|
||||
// make sure we cancel any posted callbacks.
|
||||
if (mReflowCallbackPosted)
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
|
||||
// Revoke any pending position changed events
|
||||
for (uint32_t i = 0; i < mPendingPositionChangeEvents.Length(); ++i) {
|
||||
@ -239,7 +239,7 @@ nsListBoxBodyFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (aAttribute == nsGkAtoms::rows) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
else
|
||||
@ -492,7 +492,7 @@ nsListBoxBodyFrame::ReflowFinished()
|
||||
// if the row height changed then mark everything as a style change.
|
||||
// That will dirty the entire listbox
|
||||
if (mRowHeightWasSet) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
int32_t pos = mCurrentIndex * mRowHeight;
|
||||
if (mYPosition != pos)
|
||||
@ -780,7 +780,7 @@ nsListBoxBodyFrame::PostReflowCallback()
|
||||
{
|
||||
if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = true;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1074,7 +1074,7 @@ nsListBoxBodyFrame::DestroyRows(int32_t& aRowsToLose)
|
||||
nsIFrame* childFrame = GetFirstFrame();
|
||||
nsBoxLayoutState state(PresContext());
|
||||
|
||||
nsCSSFrameConstructor* fc = PresContext()->PresShell()->FrameConstructor();
|
||||
nsCSSFrameConstructor* fc = PresShell()->FrameConstructor();
|
||||
fc->BeginUpdate();
|
||||
while (childFrame && aRowsToLose > 0) {
|
||||
--aRowsToLose;
|
||||
@ -1086,7 +1086,7 @@ nsListBoxBodyFrame::DestroyRows(int32_t& aRowsToLose)
|
||||
}
|
||||
fc->EndUpdate();
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1099,7 +1099,7 @@ nsListBoxBodyFrame::ReverseDestroyRows(int32_t& aRowsToLose)
|
||||
nsIFrame* childFrame = GetLastFrame();
|
||||
nsBoxLayoutState state(PresContext());
|
||||
|
||||
nsCSSFrameConstructor* fc = PresContext()->PresShell()->FrameConstructor();
|
||||
nsCSSFrameConstructor* fc = PresShell()->FrameConstructor();
|
||||
fc->BeginUpdate();
|
||||
while (childFrame && aRowsToLose > 0) {
|
||||
--aRowsToLose;
|
||||
@ -1112,7 +1112,7 @@ nsListBoxBodyFrame::ReverseDestroyRows(int32_t& aRowsToLose)
|
||||
}
|
||||
fc->EndUpdate();
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1301,7 +1301,7 @@ nsListBoxBodyFrame::ContinueReflow(nscoord height)
|
||||
nsBoxLayoutState state(PresContext());
|
||||
|
||||
nsCSSFrameConstructor* fc =
|
||||
PresContext()->PresShell()->FrameConstructor();
|
||||
PresShell()->FrameConstructor();
|
||||
fc->BeginUpdate();
|
||||
while (currFrame) {
|
||||
nsIFrame* nextFrame = currFrame->GetNextSibling();
|
||||
@ -1310,7 +1310,7 @@ nsListBoxBodyFrame::ContinueReflow(nscoord height)
|
||||
}
|
||||
fc->EndUpdate();
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1328,7 +1328,7 @@ nsListBoxBodyFrame::ListBoxAppendFrames(nsFrameList& aFrameList)
|
||||
const nsFrameList::Slice& newFrames = mFrames.AppendFrames(nullptr, aFrameList);
|
||||
if (mLayoutManager)
|
||||
mLayoutManager->ChildrenAppended(this, state, newFrames);
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
@ -1345,7 +1345,7 @@ nsListBoxBodyFrame::ListBoxInsertFrames(nsIFrame* aPrevFrame,
|
||||
mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList);
|
||||
if (mLayoutManager)
|
||||
mLayoutManager->ChildrenInserted(this, state, aPrevFrame, newFrames);
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
@ -1386,7 +1386,7 @@ nsListBoxBodyFrame::OnContentInserted(nsIContent* aChildContent)
|
||||
}
|
||||
|
||||
CreateRows();
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1472,7 +1472,7 @@ nsListBoxBodyFrame::OnContentRemoved(nsPresContext* aPresContext,
|
||||
RemoveChildFrame(state, aChildFrame);
|
||||
}
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1529,7 +1529,7 @@ nsListBoxBodyFrame::RemoveChildFrame(nsBoxLayoutState &aState,
|
||||
nsAccessibilityService* accService = nsIPresShell::AccService();
|
||||
if (accService) {
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
accService->ContentRemoved(PresContext()->PresShell(), content);
|
||||
accService->ContentRemoved(PresShell(), content);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -162,7 +162,7 @@ nsMenuBarFrame::FindMenuWithShortcut(nsIDOMKeyEvent* aKeyEvent)
|
||||
return nullptr; // no character was pressed so just return
|
||||
|
||||
// Enumerate over our list of frames.
|
||||
auto insertion = PresContext()->PresShell()->FrameConstructor()->
|
||||
auto insertion = PresShell()->FrameConstructor()->
|
||||
GetInsertionPoint(GetContent(), nullptr);
|
||||
nsContainerFrame* immediateParent = insertion.mParentFrame;
|
||||
if (!immediateParent)
|
||||
|
@ -231,7 +231,7 @@ nsMenuFrame::Init(nsIContent* aContent,
|
||||
BuildAcceleratorText(false);
|
||||
if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = true;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ nsMenuFrame::DestroyPopupList()
|
||||
NS_ASSERTION(prop && prop->IsEmpty(),
|
||||
"popup list must exist and be empty when destroying");
|
||||
RemoveStateBits(NS_STATE_MENU_HAS_POPUP_LIST);
|
||||
prop->Delete(PresContext()->PresShell());
|
||||
prop->Delete(PresShell());
|
||||
}
|
||||
|
||||
void
|
||||
@ -295,7 +295,7 @@ nsMenuFrame::SetPopupFrame(nsFrameList& aFrameList)
|
||||
if (popupFrame) {
|
||||
// Remove the frame from the list and store it in a nsFrameList* property.
|
||||
aFrameList.RemoveFrame(popupFrame);
|
||||
nsFrameList* popupList = new (PresContext()->PresShell()) nsFrameList(popupFrame, popupFrame);
|
||||
nsFrameList* popupList = new (PresShell()) nsFrameList(popupFrame, popupFrame);
|
||||
SetProperty(PopupListProperty(), popupList);
|
||||
AddStateBits(NS_STATE_MENU_HAS_POPUP_LIST);
|
||||
break;
|
||||
@ -318,7 +318,7 @@ void
|
||||
nsMenuFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
}
|
||||
|
||||
@ -1307,7 +1307,7 @@ nsMenuFrame::RemoveFrame(ChildListID aListID,
|
||||
popupList->RemoveFirstChild();
|
||||
aOldFrame->Destroy();
|
||||
DestroyPopupList();
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
return;
|
||||
@ -1328,7 +1328,7 @@ nsMenuFrame::InsertFrames(ChildListID aListID,
|
||||
SetXULDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
|
||||
#endif
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
@ -1356,7 +1356,7 @@ nsMenuFrame::AppendFrames(ChildListID aListID,
|
||||
nsBoxLayoutState state(PresContext());
|
||||
SetXULDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
|
||||
#endif
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ nsMenuPopupFrame::ShowPopup(bool aIsContextMenu)
|
||||
|
||||
// do we need an actual reflow here?
|
||||
// is SetPopupPosition all that is needed?
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
if (mPopupType == ePopupTypeMenu) {
|
||||
@ -1878,7 +1878,7 @@ nsIScrollableFrame* nsMenuPopupFrame::GetScrollFrame(nsIFrame* aStart)
|
||||
void nsMenuPopupFrame::EnsureMenuItemIsVisible(nsMenuFrame* aMenuItem)
|
||||
{
|
||||
if (aMenuItem) {
|
||||
aMenuItem->PresContext()->PresShell()->ScrollFrameRectIntoView(
|
||||
aMenuItem->PresShell()->ScrollFrameRectIntoView(
|
||||
aMenuItem,
|
||||
nsRect(nsPoint(0,0), aMenuItem->GetRect().Size()),
|
||||
nsIPresShell::ScrollAxis(),
|
||||
@ -2029,7 +2029,7 @@ nsMenuPopupFrame::ChangeMenuItem(nsMenuFrame* aMenuItem,
|
||||
// the menu, blink it, or update any other state of the menuitem. The
|
||||
// command event will cause the item to be selected.
|
||||
nsContentUtils::DispatchXULCommand(aMenuItem->GetContent(), /* aTrusted = */ true,
|
||||
nullptr, PresContext()->PresShell(),
|
||||
nullptr, PresShell(),
|
||||
false, false, false, false);
|
||||
}
|
||||
#endif
|
||||
@ -2062,7 +2062,7 @@ nsMenuPopupFrame::FindMenuWithShortcut(nsIDOMKeyEvent* aKeyEvent, bool& doAction
|
||||
doAction = false;
|
||||
|
||||
// Enumerate over our list of frames.
|
||||
auto insertion = PresContext()->PresShell()->
|
||||
auto insertion = PresShell()->
|
||||
FrameConstructor()->GetInsertionPoint(GetContent(), nullptr);
|
||||
nsContainerFrame* immediateParent = insertion.mParentFrame;
|
||||
if (!immediateParent)
|
||||
@ -2339,7 +2339,7 @@ void
|
||||
nsMenuPopupFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
||||
{
|
||||
if (mReflowCallbackData.mPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackData.Clear();
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ NS_IMETHODIMP
|
||||
nsReflowFrameRunnable::Run()
|
||||
{
|
||||
if (mWeakFrame.IsAlive()) {
|
||||
mWeakFrame->PresContext()->PresShell()->
|
||||
mWeakFrame->PresShell()->
|
||||
FrameNeedsReflow(mWeakFrame, mIntrinsicDirty, mBitToAdd);
|
||||
}
|
||||
return NS_OK;
|
||||
@ -112,7 +112,7 @@ nsProgressMeterFrame::DoXULLayout(nsBoxLayoutState& aState)
|
||||
if (mNeedsReflowCallback) {
|
||||
nsIReflowCallback* cb = new nsAsyncProgressMeterInit(this);
|
||||
if (cb) {
|
||||
PresContext()->PresShell()->PostReflowCallback(cb);
|
||||
PresShell()->PostReflowCallback(cb);
|
||||
}
|
||||
mNeedsReflowCallback = false;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ nsScrollbarFrame::GetScrollbarMediator()
|
||||
}
|
||||
sbm = do_QueryFrame(f);
|
||||
if (f && !sbm) {
|
||||
f = f->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
f = f->PresShell()->GetRootScrollFrame();
|
||||
if (f && f->GetContent() == mScrollbarMediator) {
|
||||
return do_QueryFrame(f);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ nsSliderFrame::~nsSliderFrame()
|
||||
{
|
||||
if (mSuppressionActive) {
|
||||
APZCCallbackHelper::SuppressDisplayport(false, PresContext() ?
|
||||
PresContext()->PresShell() :
|
||||
PresShell() :
|
||||
nullptr);
|
||||
}
|
||||
}
|
||||
@ -313,7 +313,7 @@ nsSliderFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
aAttribute == nsGkAtoms::pageincrement ||
|
||||
aAttribute == nsGkAtoms::increment) {
|
||||
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
@ -1133,7 +1133,7 @@ nsSliderFrame::StartAPZDrag(WidgetGUIEvent* aEvent)
|
||||
|
||||
nsCOMPtr<nsIContent> scrollbar = GetContentOfBox(scrollbarBox);
|
||||
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
nsIPresShell* shell = PresShell();
|
||||
uint64_t inputblockId = InputAPZContext::GetInputBlockId();
|
||||
uint32_t presShellId = shell->GetPresShellId();
|
||||
AsyncDragMetrics dragMetrics(scrollTargetId, presShellId, inputblockId,
|
||||
@ -1641,8 +1641,8 @@ void
|
||||
nsSliderFrame::SuppressDisplayport()
|
||||
{
|
||||
if (!mSuppressionActive) {
|
||||
MOZ_ASSERT(PresContext()->PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(true, PresContext()->PresShell());
|
||||
MOZ_ASSERT(PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(true, PresShell());
|
||||
mSuppressionActive = true;
|
||||
}
|
||||
}
|
||||
@ -1651,8 +1651,8 @@ void
|
||||
nsSliderFrame::UnsuppressDisplayport()
|
||||
{
|
||||
if (mSuppressionActive) {
|
||||
MOZ_ASSERT(PresContext()->PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(false, PresContext()->PresShell());
|
||||
MOZ_ASSERT(PresShell());
|
||||
APZCCallbackHelper::SuppressDisplayport(false, PresShell());
|
||||
mSuppressionActive = false;
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ nsTextBoxFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
UpdateAttributes(aAttribute, aResize, aRedraw);
|
||||
|
||||
if (aResize) {
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
} else if (aRedraw) {
|
||||
@ -215,7 +215,7 @@ nsTextBoxFrame::UpdateAccesskey(WeakFrame& aWeakThis)
|
||||
RecomputeTitle();
|
||||
mAccessKey = accesskey;
|
||||
UpdateAccessTitle();
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
return true;
|
||||
@ -518,7 +518,7 @@ nsTextBoxFrame::DrawText(gfxContext& aRenderingContext,
|
||||
}
|
||||
|
||||
RefPtr<gfxContext> refContext =
|
||||
PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
PresShell()->CreateReferenceRenderingContext();
|
||||
DrawTarget* refDrawTarget = refContext->GetDrawTarget();
|
||||
|
||||
CalculateUnderline(refDrawTarget, *fontMet);
|
||||
@ -978,7 +978,7 @@ nsTextBoxFrame::DoXULLayout(nsBoxLayoutState& aBoxLayoutState)
|
||||
if (mNeedsReflowCallback) {
|
||||
nsIReflowCallback* cb = new nsAsyncAccesskeyUpdate(this);
|
||||
if (cb) {
|
||||
PresContext()->PresShell()->PostReflowCallback(cb);
|
||||
PresShell()->PostReflowCallback(cb);
|
||||
}
|
||||
mNeedsReflowCallback = false;
|
||||
}
|
||||
@ -1101,7 +1101,7 @@ nsTextBoxFrame::CalcDrawRect(gfxContext &aRenderingContext)
|
||||
// changed.
|
||||
nsAccessibilityService* accService = GetAccService();
|
||||
if (accService) {
|
||||
accService->UpdateLabelValue(PresContext()->PresShell(), mContent,
|
||||
accService->UpdateLabelValue(PresShell(), mContent,
|
||||
mCroppedTitle);
|
||||
}
|
||||
#endif
|
||||
|
@ -248,7 +248,7 @@ nsTreeBodyFrame::CalcMaxRowWidth()
|
||||
nsTreeColumn* col;
|
||||
|
||||
RefPtr<gfxContext> rc =
|
||||
PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
PresShell()->CreateReferenceRenderingContext();
|
||||
|
||||
for (int32_t row = 0; row < mRowCount; ++row) {
|
||||
rowWidth = 0;
|
||||
@ -282,7 +282,7 @@ nsTreeBodyFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDest
|
||||
mScrollEvent.Revoke();
|
||||
// Make sure we cancel any posted callbacks.
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
}
|
||||
|
||||
@ -349,10 +349,10 @@ void
|
||||
nsTreeBodyFrame::EnsureView()
|
||||
{
|
||||
if (!mView) {
|
||||
if (PresContext()->PresShell()->IsReflowLocked()) {
|
||||
if (PresShell()->IsReflowLocked()) {
|
||||
if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = true;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -389,13 +389,13 @@ nsTreeBodyFrame::ManageReflowCallback(const nsRect& aRect, nscoord aHorzWidth)
|
||||
{
|
||||
if (!mReflowCallbackPosted &&
|
||||
(!aRect.IsEqualEdges(mRect) || mHorzWidth != aHorzWidth)) {
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
mReflowCallbackPosted = true;
|
||||
mOriginalHorzWidth = mHorzWidth;
|
||||
}
|
||||
else if (mReflowCallbackPosted &&
|
||||
mHorzWidth != aHorzWidth && mOriginalHorzWidth == aHorzWidth) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
mOriginalHorzWidth = -1;
|
||||
}
|
||||
@ -527,12 +527,12 @@ nsTreeBodyFrame::SetView(nsITreeView * aView)
|
||||
NS_ENSURE_STATE(weakFrame.IsAlive());
|
||||
mView->GetRowCount(&mRowCount);
|
||||
|
||||
if (!PresContext()->PresShell()->IsReflowLocked()) {
|
||||
if (!PresShell()->IsReflowLocked()) {
|
||||
// The scrollbar will need to be updated.
|
||||
FullScrollbarsUpdate(false);
|
||||
} else if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = true;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1771,7 +1771,7 @@ nsTreeBodyFrame::IsCellCropped(int32_t aRow, nsITreeColumn* aCol, bool *_retval)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
RefPtr<gfxContext> rc =
|
||||
PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
PresShell()->CreateReferenceRenderingContext();
|
||||
|
||||
rv = GetCellWidth(aRow, col, rc, desiredSize, currentSize);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -1792,7 +1792,7 @@ nsTreeBodyFrame::MarkDirtyIfSelect()
|
||||
// XXX optimize this more
|
||||
|
||||
mStringWidth = -1;
|
||||
PresContext()->PresShell()->FrameNeedsReflow(this,
|
||||
PresShell()->FrameNeedsReflow(this,
|
||||
nsIPresShell::eTreeChange,
|
||||
NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
@ -2920,7 +2920,7 @@ nsTreeBodyFrame::PaintTreeBody(gfxContext& aRenderingContext,
|
||||
|
||||
if (oldPageCount != mPageLength || mHorzWidth != CalcHorzWidth(GetScrollParts())) {
|
||||
// Schedule a ResizeReflow that will update our info properly.
|
||||
PresContext()->PresShell()->
|
||||
PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
@ -1146,5 +1146,5 @@ nsView::HandleEvent(WidgetGUIEvent* aEvent,
|
||||
bool
|
||||
nsView::IsPrimaryFramePaintSuppressed()
|
||||
{
|
||||
return sShowPreviousPage && mFrame && mFrame->PresContext()->PresShell()->IsPaintingSuppressed();
|
||||
return sShowPreviousPage && mFrame && mFrame->PresShell()->IsPaintingSuppressed();
|
||||
}
|
||||
|
@ -7451,7 +7451,7 @@ nsWindow::GetAccessible()
|
||||
nsAccessibilityService* accService = GetOrCreateAccService();
|
||||
if (accService) {
|
||||
a11y::DocAccessible* docAcc =
|
||||
GetAccService()->GetDocAccessible(frame->PresContext()->PresShell());
|
||||
GetAccService()->GetDocAccessible(frame->PresShell());
|
||||
if (docAcc) {
|
||||
NS_LOG_WMGETOBJECT(this, mWnd,
|
||||
docAcc->GetAccessibleOrDescendant(frame->GetContent()));
|
||||
|
Loading…
Reference in New Issue
Block a user