void nsDeckFrame::IndexChanged() { //did the index change? PRInt32 index = GetSelectedIndex(); if (index == mIndex) return; // redraw InvalidateOverflowRect(); // hide the currently showing box nsIBox* currentBox = GetSelectedBox(); if (currentBox) // only hide if it exists HideBox(currentBox); mIndex = index; }
void nsSubDocumentFrame::EndSwapDocShells(nsIFrame* aOther) { nsSubDocumentFrame* other = static_cast<nsSubDocumentFrame*>(aOther); ShowViewer(); other->ShowViewer(); // Now make sure we reflow both frames, in case their contents // determine their size. PresContext()->PresShell()-> FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY); other->PresContext()->PresShell()-> FrameNeedsReflow(other, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY); // And repaint them, for good measure, in case there's nothing // interesting that happens during reflow. InvalidateOverflowRect(); other->InvalidateOverflowRect(); }
void nsDeckFrame::IndexChanged(nsPresContext* aPresContext) { //did the index change? PRInt32 index = GetSelectedIndex(); if (index == mIndex) return; // redraw InvalidateOverflowRect(); // hide the currently showing box nsIBox* currentBox = GetSelectedBox(); if (currentBox) // only hide if it exists HideBox(aPresContext, currentBox); mIndex = index; // show the new box nsIBox* newBox = GetSelectedBox(); if (newBox) // only show if it exists ShowBox(aPresContext, newBox); }