Commit Graph

119 Commits

Author SHA1 Message Date
Xidorn Quan
8abbe602f2 Bug 1098272 part 2 - Assert that there is no line break inside ruby. r=dbaron 2014-12-22 16:16:06 +11:00
Xidorn Quan
8b07b46948 Bug 1052123 - Autohide ruby annotations which are identical to their ruby bases. r=dbaron 2014-12-15 14:37:15 +11:00
Wes Kocher
c6a9fc1926 Backed out changeset 50d264e4ffa4 (bug 1052123) for android/linux reftest failures 2014-12-16 15:44:15 -08:00
Xidorn Quan
18bc76ac38 Bug 1052123 - Autohide ruby annotations which are identical to their ruby bases. r=dbaron 2014-12-15 14:37:15 +11:00
Xidorn Quan
98c76cdef5 Bug 1107721 - Link line layouts of ruby annotations to those of their ruby base. r=dbaron 2014-12-10 10:04:15 +11:00
Xidorn Quan
a3083587a2 Bug 1107721 - Move BeginSpan down for attaching annotation containers to the base container. r=dbaron 2014-12-11 15:13:42 +11:00
Xidorn Quan
6737561b22 Bug 1107721 - Add pointer to the base line layout in nsLineLayout. r=dbaron 2014-12-05 15:05:51 -08:00
Xidorn Quan
954b87b838 (no bug) Add comment to clarify the reason of using UniquePtr in nsRubyBaseContainerFrame::Reflow. DONTBUILD, comment-only 2014-12-11 11:24:53 +11:00
Ehsan Akhgari
360626e7bf Bug 1109705 - Fix more bad implicit constructors in layout; r=roc 2014-12-10 17:47:09 -05:00
Xidorn Quan
71052dfdb0 Bug 1052924 - Implement basic line breaking for ruby. r=dbaron
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.
2014-11-26 15:52:50 +11:00
Xidorn Quan
79719630bd Bug 1052924 - Separate reflow code. r=dbaron 2014-11-26 15:52:50 +11:00
Xidorn Quan
9af29cff51 Bug 1052924 - Give rbc & rtc correct position. r=dbaron
Important changes:
  * Use line layout to reflow ruby base container
2014-11-26 15:52:49 +11:00
Xidorn Quan
4cfdc5a174 Bug 1052924 - Resolve some warnings. r=dbaron
Important changes:
  * Change base class of nsRuby{Base,Text}Frame to nsInlineFrame
  * Make ComputeSize of nsRubyFrame and nsRubyBaseContainerFrame behavior like inline frames
2014-11-26 15:52:49 +11:00
Xidorn Quan
d0c08c2081 Bug 1052924 - Rewrite reflow code. r=dbaron
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).
2014-11-26 15:52:49 +11:00
Xidorn Quan
5d70e8a4b5 Bug 1052924 - Use unified enumerators to simplify code. r=dbaron 2014-11-26 15:52:48 +11:00
Xidorn Quan
26b5cb7aad Bug 1052924 - Rewrite pref isize and min isize computation. r=dbaron
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.
2014-11-26 15:52:48 +11:00
Susanna Bowen
2e41f7ff03 Bug 1030993 - Fix assertion failure in reftest css-ruby/ruby-whitespace-1.html. r=dbaron
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.)
2014-08-15 10:34:20 -07:00
Susanna Bowen
3c4a808a0e Bug 1030993 - Basic reflow implementation for ruby frame classes. r=dbaron
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.
2014-08-15 10:34:20 -07:00
Susanna Bowen
2f81b02ca1 Bug 1021952 - Add ruby display values and ruby frames. r=dholbert,bz 2014-07-22 19:08:01 -07:00