Bug 396185 - Make nsIFrame derivatives and helper abstract classes use a different dynamic-cast system than nsISupports:

* we know all types frames may be cast to at compile time, so instead of extensible GUID IIDs, use a big enum (see nsQueryFrame::FrameIID)
* eliminate all vestiges of refcounting, since frames aren't refcounted

Some frames (SVG frames in particular) still implement nsISupports-derived interfaces, for example nsISVGValue. There is a FrameIID for nsISVGValue that lets you go from a frame to the XPCOM interface, but you can't query back.

r+sr=roc

This patch locally causes two REFTEST-UNEXPECTED-PASS for Bidi stuff. It's possible that I accidentally fixed a bug, but I'm not sure, so I'm going to wait for the tinderboxes to confirm my local results.
This commit is contained in:
Benjamin Smedberg
2008-11-05 14:25:30 -05:00
parent c38b0fc4b6
commit 991a16d8bc
201 changed files with 1154 additions and 2097 deletions

View File

@@ -1117,12 +1117,9 @@ nsNSElementTearoff::GetScrollInfo(nsIScrollableView **aScrollableView,
}
// Get the scrollable frame
nsIScrollableFrame *scrollFrame = nsnull;
CallQueryInterface(frame, &scrollFrame);
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
if (!scrollFrame) {
nsIScrollableViewProvider *scrollProvider = nsnull;
CallQueryInterface(frame, &scrollProvider);
nsIScrollableViewProvider *scrollProvider = do_QueryFrame(frame);
// menu frames implement nsIScrollableViewProvider but we don't want
// to use it here.
if (scrollProvider && frame->GetType() != nsGkAtoms::menuFrame) {
@@ -1151,7 +1148,7 @@ nsNSElementTearoff::GetScrollInfo(nsIScrollableView **aScrollableView,
break;
}
CallQueryInterface(frame, &scrollFrame);
scrollFrame = do_QueryFrame(frame);
} while (!scrollFrame);
}