For now, IsFrameOfType() is a virtual function call (unless/until we act on bug 1364813). So, calls to IsFrameOfType(nsIFrame::eBlockFrame) are kind of expensive.
In bug 1525628, I'm adding a non-virtual function, nsIFrame::IsBlockFrameOrSubclass(), which should serve the same purpose and which is implemented using do_QueryFrame (which is non-virtual as of bug 1364815).
In theory we should be able to remove nsIFrame::eBlockFrame and migrate its IsFrameOfType() callsites to use IsBlockFrameOrSubclass() instead.
One prerequisite: in its initial version, IsBlockFrameOrSubclass() is a non-const method. To make it correctly "const", we should probably also make the QueryFrame machinery become const-friendly. That might be the first part of this bug, and it'll be necessary to make this IsBlockFrameOrSubclass() function callable at some of our IsFrameOfType() callsites, e.g. this one:
(We could also just make IsBlockFrameOrSubclass do a hacky const_cast internally, but it seems like we should attempt to fix QueryFrame first before resorting to that.)