nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values. For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.
MozReview-Commit-ID: 1N0AkCGo1ol
This avoids conflicts with mozilla::dom::FrameType.
MozReview-Commit-ID: 7aEMbHRaTFk
--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
This is a prerequisite for the mass rename variables whose name
containing ReflowState in the next patch. Otherwise
nsRubyBaseContainerFrame::ReflowInput will conflict with
mozilla::ReflowInput.
MozReview-Commit-ID: KUU51Rjn6z
--HG--
extra : rebase_source : fcb3aefaea40f57e59cc81349b9fcc0f3a88394a
Per spec, the additional leading is added on side of ruby base container, not
ruby container. This could lead to some trivial behavior changes on edge cases.
--HG--
extra : source : 495e466ebdb628fecd9a546b539001ac316fc133
The bulk of this commit was generated by running:
run-clang-tidy.py \
-checks='-*,llvm-namespace-comment' \
-header-filter=^/.../mozilla-central/.* \
-fix
Known problem:
It would cause infinite loop if there is any line break happens inside
ruby base or annotation, or the width of container is not enough for
the widest pair/span. This might be fixed in bug 1098272.
Important changes:
* Change base class of nsRuby{Base,Text}Frame to nsInlineFrame
* Make ComputeSize of nsRubyFrame and nsRubyBaseContainerFrame behavior like inline frames
Important changes:
* Avoid using GetPrefISize on the ruby texts in
nsRubyBaseContainerFrame::Reflow, since the size it produces might
not match the size produced by Reflow. The old code calls that on
all the ruby texts to determine how big they are, then reflows all
the ruby bases, and then reflows all the ruby texts. The new code
instead processes one pair at a time, and for each pair reflows the
ruby texts and then the ruby base.
* Change the base class of nsRubyTextContainerFrame from nsBlockFrame
to nsContainerFrame, and stop constructing an nsBlockReflowState for
its reflow.
* Move the code for reflowing ruby texts from nsRubyTextContainerFrame
and to nsRubyBaseContainerFrame.
* Fix the regression that ruby text containers contain span are not
reflowed properly. It is the regression introduced in patch 0.
Known regression:
* This patch drops centering ruby base and annotation in pairs. This
should be fixed in bug 1055676 (ruby-align).
Known regression:
This patch changes AppendTextContainer, and put aside text containers
which contain spanning annotations. This changes makes those text
containers not be reflowed by the current code. It will be fixed in
some later patch.
Fixes the assertion failure with text:
"###!!! ASSERTION: Wrong line container
hint: '!aForFrame || (aLineContainer == FindLineContainer(aForFrame) ||
aLineContainer->GetType() == nsGkAtoms::rubyTextContainerFrame ||
(aLineContainer->GetType() == nsGkAtoms::letterFrame &&
aLineContainer->IsFloating()))', file
/home/sgbowen/builds/mozilla-central/layout/generic/nsTextFrame.cpp, line 1259"
which occasionally appears when opening pages with ruby or when running ruby
reftests.
Updates the manifest for ruby reftests to the current expectations (adjust
assertion counts, etc.)
To account for spacing between bases or text boxes during reflow, the line
layout which manages the bases updates its inline direction coordinate based on
the preferred inline size for the corresponding text boxes. Next, the base is
reflowed at the correct inline coordinate. Each paired text box is then also
reflowed at the proper inline position determined by (1) the current position of
its corresponding base and (2) its own preferred width.
In computing intrinsic widths, accounting for spacing is less complicated. The
minimum intrinsic width is the width of the widest ruby column, and the
preferred intrinsic width is the sum of all the ruby column widths. Each ruby
column width is the maximum width of its base box and text boxes. These
individual widths are determined using GetPrefISize on the base and text boxes.
Ruby base container frames store a list of pointers to the ruby text container
frames in the segment they denote. This list of pointers is created in the ruby
frame reflow method before calling the reflow method for the ruby base
container. The list exists and is used only during reflow of the main ruby frame
and is cleared before returning from reflow.