When rendering just the current Selection (Print - Selection) then don't create display items
for table-related frames unless the frame itself is part of the selection, and always ask
descendant frames to build display lists [in case they are selected].
This is the first of two patches to honor inflation during intrinsic
width calculation (which we need to do to make some form controls
inflate correctly).
Outer table frames act as CSS2.1 table wrapper boxes. We used to lay them out
without taking their margins into the account, which meant that their width was
always equal to the available width. This breaks horizontal positioning of
absolutely positioned kids of a table frame.
The main purpose of this patch is to apply the margins of tables to their outer
frame, instead of the inner frame. This means that the inner table frame will
always have a zero margin, which means that a lot of the stuff which used to
rely on the fact that table margins are applied to the inner frame need to
change.
In particular, in order to get the computed margins of a table, we used to query
the inner table frame, and this patch corrects that. Also, when shrink wrapping
tables, we used to not take the margins of the inner table frame into account,
which is fixed by this patch too. nsBlockReflowState::
ComputeReplacedBlockOffsetsForFloats also needed to be changed to read the
margin values from the outer frame too.
Also, as part of this patch, we start to respect the CSS2.1 margin model for
captions on all sides. This means that in particular, the top/bottom margins on
the top-outside and bottom-outside captions will not be collapsed with the
top/bottom margins of the table, and that the margins of the caption element
contribute to the width and height of the outer table frame. The
427129-table-caption reftest has been modified to match this new behavior.
Another side effect of this bug is fixing bug 87277, and the reftests for that
bug are marked as passing in this patch.
Make nsCSSFrameConstructor::ConstructTable return a null frame if
creating the inner table frame fails. Simplify some code since we can
now depend on the invariant that a properly created outer table frame
always has a non-null inner table frame.
Make nsIFrame::GetParentStyleContextFrame return the frame directly
instead of indirectly through an out parameter. Remove the unused
nsPresContext parameter.
Implement GetChildList(ChildListID) and GetChildLists(nsTArray<ChildList>*)
for various frame classes. Remove GetAdditionalChildListName(PRInt32)
methods and associated macros and list index constants.
* 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
nsITextControlFrame didn't have an IID the first time around, but this wasn't a compile error because nsITextControlFrame::kFrameIID inherited from nsIFormControlFrame::kFrameIID. I've added a static analysis pass to verify the correct behavior, since I can't figure out a way to make the compiler do it.
--HG--
extra : rebase_source : 4894a2ca0278e2ab92f27459db77165f8348cf41
* 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.