This is sufficient for nsCSSFrameConstructor.h's needs, and the corresponding C++ file already includes nsIDocument.h.
Original patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>.