Media queries right now are divided into two categories and constructed differently. "Simple" media queries, e.g., the kind used when examining <link>'s media attribute, do not have enough information to handle certain types of queries correctly. These queries need to have a pointer to the m_frame, they need a root style to latch on to for resolution of units like em, and they also need a place to hang viewport-dependent query results other than the style selector (since that has not been built yet).
@Antti & @Tim - Can we close this old bug now?