Bug 1024082: Remove most of the nsIPresShell::FrameManager calls. r=dholbert

Most of them just want GetRootFrame(), and there's no need to explicitly go
through the frame manager for that, we have a handy alias in the shell.

MozReview-Commit-ID: GriEqkasidY
This commit is contained in:
Emilio Cobos Álvarez 2018-03-06 10:25:21 +01:00
parent 72f6feaa97
commit 043503a6d4
18 changed files with 38 additions and 39 deletions

View File

@ -223,7 +223,7 @@ public:
mContent = nullptr; mContent = nullptr;
nsPoint pt = mPoint - nsPoint pt = mPoint -
frame->GetOffsetTo(mPresContext->PresShell()->FrameManager()->GetRootFrame()); frame->GetOffsetTo(mPresContext->PresShell()->GetRootFrame());
RefPtr<nsFrameSelection> frameSelection = mFrameSelection; RefPtr<nsFrameSelection> frameSelection = mFrameSelection;
frameSelection->HandleDrag(frame, pt); frameSelection->HandleDrag(frame, pt);
if (!frame.IsAlive()) { if (!frame.IsAlive()) {
@ -1794,7 +1794,7 @@ Selection::SelectFrames(nsPresContext* aPresContext, nsRange* aRange,
if (mFrameSelection->GetTableCellSelection()) { if (mFrameSelection->GetTableCellSelection()) {
nsINode* node = aRange->GetCommonAncestor(); nsINode* node = aRange->GetCommonAncestor();
nsIFrame* frame = node->IsContent() ? node->AsContent()->GetPrimaryFrame() nsIFrame* frame = node->IsContent() ? node->AsContent()->GetPrimaryFrame()
: aPresContext->FrameManager()->GetRootFrame(); : aPresContext->PresShell()->GetRootFrame();
if (frame) { if (frame) {
frame->InvalidateFrameSubtree(); frame->InvalidateFrameSubtree();
} }
@ -2181,7 +2181,7 @@ Selection::DoAutoScroll(nsIFrame* aFrame, nsPoint aPoint)
nsRootPresContext* rootPC = presContext->GetRootPresContext(); nsRootPresContext* rootPC = presContext->GetRootPresContext();
if (!rootPC) if (!rootPC)
return NS_OK; return NS_OK;
nsIFrame* rootmostFrame = rootPC->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootmostFrame = rootPC->PresShell()->GetRootFrame();
AutoWeakFrame weakRootFrame(rootmostFrame); AutoWeakFrame weakRootFrame(rootmostFrame);
AutoWeakFrame weakFrame(aFrame); AutoWeakFrame weakFrame(aFrame);
// Get the point relative to the root most frame because the scroll we are // Get the point relative to the root most frame because the scroll we are
@ -2227,7 +2227,7 @@ Selection::DoAutoScroll(nsIFrame* aFrame, nsPoint aPoint)
// Start the AutoScroll timer if necessary. // Start the AutoScroll timer if necessary.
if (didScroll && mAutoScrollTimer) { if (didScroll && mAutoScrollTimer) {
nsPoint presContextPoint = globalPoint - nsPoint presContextPoint = globalPoint -
shell->FrameManager()->GetRootFrame()->GetOffsetToCrossDoc(rootmostFrame); shell->GetRootFrame()->GetOffsetToCrossDoc(rootmostFrame);
mAutoScrollTimer->Start(presContext, presContextPoint); mAutoScrollTimer->Start(presContext, presContextPoint);
} }

View File

@ -488,7 +488,7 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
nsLayoutUtils::InvalidateForDisplayPortChange(content, !!currentData, nsLayoutUtils::InvalidateForDisplayPortChange(content, !!currentData,
currentData ? currentData->mRect : nsRect(), displayport); currentData ? currentData->mRect : nsRect(), displayport);
nsIFrame* rootFrame = presShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = presShell->GetRootFrame();
if (rootFrame) { if (rootFrame) {
rootFrame->SchedulePaint(); rootFrame->SchedulePaint();
@ -3497,7 +3497,7 @@ nsDOMWindowUtils::SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior,
} }
// The root frame for this content window // The root frame for this content window
nsIFrame* rootFrame = presShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = presShell->GetRootFrame();
if (!rootFrame) { if (!rootFrame) {
return NS_ERROR_UNEXPECTED; return NS_ERROR_UNEXPECTED;
} }

View File

@ -2644,7 +2644,7 @@ EventStateManager::ComputeScrollTarget(nsIFrame* aTargetFrame,
} }
nsIFrame* newFrame = nsLayoutUtils::GetCrossDocParentFrame( nsIFrame* newFrame = nsLayoutUtils::GetCrossDocParentFrame(
aTargetFrame->PresContext()->FrameManager()->GetRootFrame()); aTargetFrame->PresShell()->GetRootFrame());
aOptions = aOptions =
static_cast<ComputeScrollTargetOptions>(aOptions & ~START_FROM_PARENT); static_cast<ComputeScrollTargetOptions>(aOptions & ~START_FROM_PARENT);
return newFrame ? ComputeScrollTarget(newFrame, aEvent, aOptions) : nullptr; return newFrame ? ComputeScrollTarget(newFrame, aEvent, aOptions) : nullptr;

View File

@ -2623,7 +2623,7 @@ TabChild::RecvRenderLayers(const bool& aEnabled, const uint64_t& aLayerObserverE
if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) { if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
presShell->SetIsActive(true); presShell->SetIsActive(true);
if (nsIFrame* root = presShell->FrameConstructor()->GetRootFrame()) { if (nsIFrame* root = presShell->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame( FrameLayerBuilder::InvalidateAllLayersForFrame(
nsLayoutUtils::GetDisplayRootFrame(root)); nsLayoutUtils::GetDisplayRootFrame(root));
root->SchedulePaint(); root->SchedulePaint();
@ -2937,7 +2937,7 @@ TabChild::MakeHidden()
if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) { if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
if (nsPresContext* presContext = presShell->GetPresContext()) { if (nsPresContext* presContext = presShell->GetPresContext()) {
nsRootPresContext* rootPresContext = presContext->GetRootPresContext(); nsRootPresContext* rootPresContext = presContext->GetRootPresContext();
nsIFrame* rootFrame = presShell->FrameConstructor()->GetRootFrame(); nsIFrame* rootFrame = presShell->GetRootFrame();
rootPresContext->ComputePluginGeometryUpdates(rootFrame, nullptr, nullptr); rootPresContext->ComputePluginGeometryUpdates(rootFrame, nullptr, nullptr);
rootPresContext->ApplyPluginGeometryUpdates(); rootPresContext->ApplyPluginGeometryUpdates();
} }

View File

@ -2105,7 +2105,7 @@ TabParent::GetChildProcessOffset()
} }
nsPresContext* presContext = targetFrame->PresContext(); nsPresContext* presContext = targetFrame->PresContext();
nsIFrame* rootFrame = presContext->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = presContext->PresShell()->GetRootFrame();
nsView* rootView = rootFrame ? rootFrame->GetView() : nullptr; nsView* rootView = rootFrame ? rootFrame->GetView() : nullptr;
if (!rootView) { if (!rootView) {
return offset; return offset;

View File

@ -10290,7 +10290,7 @@ void ReflowCountMgr::DoIndiTotalsTree()
printf("------------------------------------------------\n"); printf("------------------------------------------------\n");
if (mPresShell) { if (mPresShell) {
nsIFrame * rootFrame = mPresShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = mPresShell->GetRootFrame();
RecurseIndiTotals(mPresContext, mIndiFrameCounts, rootFrame, 0); RecurseIndiTotals(mPresContext, mIndiFrameCounts, rootFrame, 0);
printf("------------------------------------------------\n"); printf("------------------------------------------------\n");
printf("-- Individual Counts of Frames not in Root Tree\n"); printf("-- Individual Counts of Frames not in Root Tree\n");

View File

@ -6589,7 +6589,7 @@ nsLayoutUtils::GetClosestLayer(nsIFrame* aFrame)
} }
if (layer) if (layer)
return layer; return layer;
return aFrame->PresShell()->FrameManager()->GetRootFrame(); return aFrame->PresShell()->GetRootFrame();
} }
SamplingFilter SamplingFilter
@ -7494,7 +7494,7 @@ nsLayoutUtils::GetDisplayRootFrame(nsIFrame* aFrame)
nsIFrame* f = aFrame; nsIFrame* f = aFrame;
for (;;) { for (;;) {
if (!f->HasAnyStateBits(NS_FRAME_IN_POPUP)) { if (!f->HasAnyStateBits(NS_FRAME_IN_POPUP)) {
f = f->PresContext()->FrameManager()->GetRootFrame(); f = f->PresShell()->GetRootFrame();
if (!f) { if (!f) {
return aFrame; return aFrame;
} }

View File

@ -730,8 +730,7 @@ nsPresContext::InvalidatePaintedLayers()
{ {
if (!mShell) if (!mShell)
return; return;
nsIFrame* rootFrame = mShell->FrameManager()->GetRootFrame(); if (nsIFrame* rootFrame = mShell->GetRootFrame()) {
if (rootFrame) {
// FrameLayerBuilder caches invalidation-related values that depend on the // FrameLayerBuilder caches invalidation-related values that depend on the
// appunits-per-dev-pixel ratio, so ensure that all PaintedLayer drawing // appunits-per-dev-pixel ratio, so ensure that all PaintedLayer drawing
// is completely flushed. // is completely flushed.
@ -3193,7 +3192,7 @@ nsRootPresContext::ComputePluginGeometryUpdates(nsIFrame* aFrame,
if (aBuilder) { if (aBuilder) {
MOZ_ASSERT(aList); MOZ_ASSERT(aList);
nsIFrame* rootFrame = FrameManager()->GetRootFrame(); nsIFrame* rootFrame = mShell->GetRootFrame();
if (rootFrame && aBuilder->ContainsPluginItem()) { if (rootFrame && aBuilder->ContainsPluginItem()) {
aBuilder->SetForPluginGeometry(true); aBuilder->SetForPluginGeometry(true);

View File

@ -172,7 +172,7 @@ nsCanvasFrame::ScrollPositionWillChange(nscoord aX, nscoord aY)
{ {
if (mDoPaintFocus) { if (mDoPaintFocus) {
mDoPaintFocus = false; mDoPaintFocus = false;
PresContext()->FrameManager()->GetRootFrame()->InvalidateFrameSubtree(); PresShell()->GetRootFrame()->InvalidateFrameSubtree();
} }
} }
@ -181,7 +181,7 @@ nsCanvasFrame::SetHasFocus(bool aHasFocus)
{ {
if (mDoPaintFocus != aHasFocus) { if (mDoPaintFocus != aHasFocus) {
mDoPaintFocus = aHasFocus; mDoPaintFocus = aHasFocus;
PresContext()->FrameManager()->GetRootFrame()->InvalidateFrameSubtree(); PresShell()->GetRootFrame()->InvalidateFrameSubtree();
if (!mAddedScrollPositionListener) { if (!mAddedScrollPositionListener) {
nsIScrollableFrame* sf = nsIScrollableFrame* sf =

View File

@ -1004,7 +1004,7 @@ nsIFrame::RemoveDisplayItemDataForDeletion()
} }
if (IsFrameModified()) { if (IsFrameModified()) {
nsIFrame* rootFrame = PresContext()->PresShell()->GetRootFrame(); nsIFrame* rootFrame = PresShell()->GetRootFrame();
MOZ_ASSERT(rootFrame); MOZ_ASSERT(rootFrame);
nsTArray<nsIFrame*>* modifiedFrames = nsTArray<nsIFrame*>* modifiedFrames =
@ -1020,7 +1020,7 @@ nsIFrame::RemoveDisplayItemDataForDeletion()
} }
if (HasOverrideDirtyRegion()) { if (HasOverrideDirtyRegion()) {
nsIFrame* rootFrame = PresContext()->PresShell()->GetRootFrame(); nsIFrame* rootFrame = PresShell()->GetRootFrame();
MOZ_ASSERT(rootFrame); MOZ_ASSERT(rootFrame);
nsTArray<nsIFrame*>* frames = nsTArray<nsIFrame*>* frames =
@ -1061,7 +1061,7 @@ nsIFrame::MarkNeedsDisplayItemRebuild()
return; return;
} }
nsIFrame* rootFrame = PresContext()->PresShell()->GetRootFrame(); nsIFrame* rootFrame = PresShell()->GetRootFrame();
MOZ_ASSERT(rootFrame); MOZ_ASSERT(rootFrame);
if (rootFrame->IsFrameModified()) { if (rootFrame->IsFrameModified()) {
@ -6795,7 +6795,7 @@ nsRect nsIFrame::GetScreenRectInAppUnits() const
{ {
nsPresContext* presContext = PresContext(); nsPresContext* presContext = PresContext();
nsIFrame* rootFrame = nsIFrame* rootFrame =
presContext->PresShell()->FrameManager()->GetRootFrame(); presContext->PresShell()->GetRootFrame();
nsPoint rootScreenPos(0, 0); nsPoint rootScreenPos(0, 0);
nsPoint rootFrameOffsetInParent(0, 0); nsPoint rootFrameOffsetInParent(0, 0);
nsIFrame* rootFrameParent = nsIFrame* rootFrameParent =
@ -7878,7 +7878,7 @@ nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, const char* aPre
nsIPresShell *shell = aPresContext->GetPresShell(); nsIPresShell *shell = aPresContext->GetPresShell();
if (shell) { if (shell) {
nsIFrame* frame = shell->FrameManager()->GetRootFrame(); nsIFrame* frame = shell->GetRootFrame();
if(frame) { if(frame) {
frame->List(out, aPrefix); frame->List(out, aPrefix);
} }

View File

@ -508,7 +508,7 @@ nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree(nsIFrame* aFrame,
// Find the frame under the mouse cursor with the root frame. // Find the frame under the mouse cursor with the root frame.
// At this time, don't use the anchor's frame because it may not have // At this time, don't use the anchor's frame because it may not have
// fixed positioned frames. // fixed positioned frames.
nsIFrame* rootFrame = mShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = mShell->GetRootFrame();
nsPoint ptInRoot = aPoint + aFrame->GetOffsetTo(rootFrame); nsPoint ptInRoot = aPoint + aFrame->GetOffsetTo(rootFrame);
nsIFrame* cursorFrame = nsIFrame* cursorFrame =
nsLayoutUtils::GetFrameForPoint(rootFrame, ptInRoot); nsLayoutUtils::GetFrameForPoint(rootFrame, ptInRoot);

View File

@ -280,7 +280,7 @@ nsPluginFrame::PrepForDrawing(nsIWidget *aWidget)
if (mWidget) { if (mWidget) {
// Disallow windowed plugins in popups // Disallow windowed plugins in popups
nsIFrame* rootFrame = rpc->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = rpc->PresShell()->GetRootFrame();
nsIWidget* parentWidget = rootFrame->GetNearestWidget(); nsIWidget* parentWidget = rootFrame->GetNearestWidget();
if (!parentWidget || nsLayoutUtils::GetDisplayRootFrame(this) != rootFrame) { if (!parentWidget || nsLayoutUtils::GetDisplayRootFrame(this) != rootFrame) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@ -632,7 +632,7 @@ nsPluginFrame::CallSetWindow(bool aCheckIsHidden)
if (!rootPC) if (!rootPC)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel(); int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
nsIFrame* rootFrame = rootPC->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = rootPC->PresShell()->GetRootFrame();
nsRect bounds = GetContentRectRelativeToSelf() + GetOffsetToCrossDoc(rootFrame); nsRect bounds = GetContentRectRelativeToSelf() + GetOffsetToCrossDoc(rootFrame);
nsIntRect intBounds = bounds.ToNearestPixels(appUnitsPerDevPixel); nsIntRect intBounds = bounds.ToNearestPixels(appUnitsPerDevPixel);

View File

@ -3009,7 +3009,7 @@ nsCSSRendering::ComputeImageLayerPositioningArea(nsPresContext* aPresContext,
// If it's a fixed background attachment, then the image is placed // If it's a fixed background attachment, then the image is placed
// relative to the viewport, which is the area of the root frame // relative to the viewport, which is the area of the root frame
// in a screen context or the page content frame in a print context. // in a screen context or the page content frame in a print context.
attachedToFrame = aPresContext->PresShell()->FrameManager()->GetRootFrame(); attachedToFrame = aPresContext->PresShell()->GetRootFrame();
NS_ASSERTION(attachedToFrame, "no root frame"); NS_ASSERTION(attachedToFrame, "no root frame");
nsIFrame* pageContentFrame = nullptr; nsIFrame* pageContentFrame = nullptr;
if (aPresContext->IsPaginated()) { if (aPresContext->IsPaginated()) {

View File

@ -2429,7 +2429,7 @@ nsPrintJob::ReflowPrintObject(const UniquePtr<nsPrintObject>& aPO)
FILE * fd = fopen(filename, "w"); FILE * fd = fopen(filename, "w");
if (fd) { if (fd) {
nsIFrame *theRootFrame = nsIFrame *theRootFrame =
aPO->mPresShell->FrameManager()->GetRootFrame(); aPO->mPresShell->GetRootFrame();
fprintf(fd, "Title: %s\n", docStr.get()); fprintf(fd, "Title: %s\n", docStr.get());
fprintf(fd, "URL: %s\n", urlStr.get()); fprintf(fd, "URL: %s\n", urlStr.get());
fprintf(fd, "--------------- Frames ----------------\n"); fprintf(fd, "--------------- Frames ----------------\n");
@ -2665,7 +2665,7 @@ nsPrintJob::DoPrint(const UniquePtr<nsPrintObject>& aPO)
printData->mPreparingForPrint = false; printData->mPreparingForPrint = false;
#ifdef EXTENDED_DEBUG_PRINTING #ifdef EXTENDED_DEBUG_PRINTING
nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = poPresShell->GetRootFrame();
if (aPO->IsPrintable()) { if (aPO->IsPrintable()) {
nsAutoCString docStr; nsAutoCString docStr;
nsAutoCString urlStr; nsAutoCString urlStr;
@ -3659,7 +3659,7 @@ static void RootFrameList(nsPresContext* aPresContext, FILE* out,
nsIPresShell *shell = aPresContext->GetPresShell(); nsIPresShell *shell = aPresContext->GetPresShell();
if (shell) { if (shell) {
nsIFrame* frame = shell->FrameManager()->GetRootFrame(); nsIFrame* frame = shell->GetRootFrame();
if (frame) { if (frame) {
frame->List(out, aPrefix); frame->List(out, aPrefix);
} }
@ -3815,7 +3815,7 @@ static void DumpPrintObjectsList(const nsTArray<nsPrintObject*>& aDocList)
NS_ASSERTION(po, "nsPrintObject can't be null!"); NS_ASSERTION(po, "nsPrintObject can't be null!");
nsIFrame* rootFrame = nullptr; nsIFrame* rootFrame = nullptr;
if (po->mPresShell) { if (po->mPresShell) {
rootFrame = po->mPresShell->FrameManager()->GetRootFrame(); rootFrame = po->mPresShell->GetRootFrame();
while (rootFrame != nullptr) { while (rootFrame != nullptr) {
nsIPageSequenceFrame * sqf = do_QueryFrame(rootFrame); nsIPageSequenceFrame * sqf = do_QueryFrame(rootFrame);
if (sqf) { if (sqf) {
@ -3891,7 +3891,7 @@ static void DumpPrintObjectsTreeLayout(const UniquePtr<nsPrintObject>& aPO,
if (fd) { if (fd) {
nsIFrame* rootFrame = nullptr; nsIFrame* rootFrame = nullptr;
if (aPO->mPresShell) { if (aPO->mPresShell) {
rootFrame = aPO->mPresShell->FrameManager()->GetRootFrame(); rootFrame = aPO->mPresShell->GetRootFrame();
} }
for (int32_t k=0;k<aLevel;k++) fprintf(fd, " "); for (int32_t k=0;k<aLevel;k++) fprintf(fd, " ");
fprintf(fd, "%s %p %p\n", types[aPO->mFrameType], aPO.get(), fprintf(fd, "%s %p %p\n", types[aPO->mFrameType], aPO.get(),

View File

@ -1383,7 +1383,7 @@ nsRect
nsMenuPopupFrame::ComputeAnchorRect(nsPresContext* aRootPresContext, nsIFrame* aAnchorFrame) nsMenuPopupFrame::ComputeAnchorRect(nsPresContext* aRootPresContext, nsIFrame* aAnchorFrame)
{ {
// Get the root frame for a reference // Get the root frame for a reference
nsIFrame* rootFrame = aRootPresContext->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = aRootPresContext->PresShell()->GetRootFrame();
// The dimensions of the anchor // The dimensions of the anchor
nsRect anchorRect = aAnchorFrame->GetRectRelativeToSelf(); nsRect anchorRect = aAnchorFrame->GetRectRelativeToSelf();
@ -1413,7 +1413,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS
} }
nsPresContext* presContext = PresContext(); nsPresContext* presContext = PresContext();
nsIFrame* rootFrame = presContext->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = presContext->PresShell()->GetRootFrame();
NS_ASSERTION(rootFrame->GetView() && GetView() && NS_ASSERTION(rootFrame->GetView() && GetView() &&
rootFrame->GetView() == GetView()->GetParent(), rootFrame->GetView() == GetView()->GetParent(),
"rootFrame's view is not our view's parent???"); "rootFrame's view is not our view's parent???");

View File

@ -219,7 +219,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
} }
else if (menuPopupFrame) { else if (menuPopupFrame) {
nsRect frameRect = menuPopupFrame->GetScreenRectInAppUnits(); nsRect frameRect = menuPopupFrame->GetScreenRectInAppUnits();
nsIFrame* rootFrame = aPresContext->PresShell()->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = aPresContext->PresShell()->GetRootFrame();
nsRect rootScreenRect = rootFrame->GetScreenRectInAppUnits(); nsRect rootScreenRect = rootFrame->GetScreenRectInAppUnits();
nsPopupLevel popupLevel = menuPopupFrame->PopupLevel(); nsPopupLevel popupLevel = menuPopupFrame->PopupLevel();

View File

@ -28,7 +28,7 @@ nsIRootBox::GetRootBox(nsIPresShell* aShell)
if (!aShell) { if (!aShell) {
return nullptr; return nullptr;
} }
nsIFrame* rootFrame = aShell->FrameManager()->GetRootFrame(); nsIFrame* rootFrame = aShell->GetRootFrame();
if (!rootFrame) { if (!rootFrame) {
return nullptr; return nullptr;
} }

View File

@ -660,7 +660,7 @@ nsXULPopupManager::InitTriggerEvent(nsIDOMEvent* aEvent, nsIContent* aPopup,
if (!rootDocPresContext) if (!rootDocPresContext)
return; return;
nsIFrame* rootDocumentRootFrame = rootDocPresContext-> nsIFrame* rootDocumentRootFrame = rootDocPresContext->
PresShell()->FrameManager()->GetRootFrame(); PresShell()->GetRootFrame();
if ((event->mClass == eMouseEventClass || if ((event->mClass == eMouseEventClass ||
event->mClass == eMouseScrollEventClass || event->mClass == eMouseScrollEventClass ||
event->mClass == eWheelEventClass) && event->mClass == eWheelEventClass) &&
@ -672,7 +672,7 @@ nsXULPopupManager::InitTriggerEvent(nsIDOMEvent* aEvent, nsIContent* aPopup,
mouseEvent->GetClientY(&clientPt.y); mouseEvent->GetClientY(&clientPt.y);
// XXX this doesn't handle IFRAMEs in transforms // XXX this doesn't handle IFRAMEs in transforms
nsPoint thisDocToRootDocOffset = presShell->FrameManager()-> nsPoint thisDocToRootDocOffset = presShell->
GetRootFrame()->GetOffsetToCrossDoc(rootDocumentRootFrame); GetRootFrame()->GetOffsetToCrossDoc(rootDocumentRootFrame);
// convert to device pixels // convert to device pixels
mCachedMousePoint.x = presContext->AppUnitsToDevPixels( mCachedMousePoint.x = presContext->AppUnitsToDevPixels(