Commit Graph

100 Commits

Author SHA1 Message Date
Xidorn Quan
d8f699817b Bug 1089431 part 2 - Break between ruby bases according to line-breaking rules. r=jfkthame 2015-02-11 10:26:56 +11:00
L. David Baron
d5dd9493b9 Bug 1121738 - Ruby base container frames should not support CSS transforms. r=xidorn
Following bug 1055667 patch 5, nsRubyBaseContainerFrame is the only ruby
frame type with this bug.  It should not support CSS transforms given
the spec wording in
http://dev.w3.org/csswg/css-transforms/#transformable-element
2015-01-15 15:07:50 -08:00
Xidorn Quan
07bccd491c Bug 1055667 part 3 - Suppress border/padding space on rbc/rtc frames. r=dbaron 2015-01-15 20:02:11 +11:00
Xidorn Quan
660e809d5e Bug 1055667 part 2 - Remove unnecessary param of SetBSizeFromFontMetrics. r=dbaron 2015-01-15 20:02:11 +11:00
Xidorn Quan
11c36cd9e1 Bug 1055667 part 1 - Allow inline direction margin of ruby base/text boxes. r=dbaron 2015-01-15 20:02:11 +11:00
Xidorn Quan
18a293b76d Bug 1115262 - Fix position of ruby annotation when writing mode is vertical-rl. r=jfkthame 2015-01-13 20:04:41 +11:00
Xidorn Quan
0549a155fe Bug 1055658 part 4 - Revert RubyReflowState. r=dbaron 2015-01-13 20:04:41 +11:00
Nigel Babu
2492f633d1 Backed out 4 changesets (bug 1055658) for M5 bustage on a CLOSED TREE
Backed out changeset 3cbd9323c896 (bug 1055658)
Backed out changeset 99e071295c42 (bug 1055658)
Backed out changeset 55119d19e4c5 (bug 1055658)
Backed out changeset e82f640cb53f (bug 1055658)
2015-01-12 10:43:11 +05:30
Xidorn Quan
cdb8162daf Bug 1055658 part 4 - Revert RubyReflowState. r=dbaron 2015-01-12 14:31:55 +11:00
Xidorn Quan
3848b04cde Bug 1099807 part 4 - Fix line breaking around ruby intra-level whitespaces. r=dholbert 2015-01-08 18:28:09 +11:00
Xidorn Quan
8206cd35a3 Bug 1099807 part 3 - Use specific frame type in RubyColumn. r=dholbert 2015-01-08 18:28:09 +11:00
Xidorn Quan
f3ebefa8a7 Bug 1099807 part 2 - Implement intra-level whitespace pairing. r=dholbert
Line breaking is not handled properly in this patch.
It would be fixed in the part 4.
2015-01-08 18:28:09 +11:00
Xidorn Quan
3117e03451 Bug 1116631 - Fix isize reservation of ruby base container. r=roc 2015-01-07 12:47:09 +11:00
Xidorn Quan
2dffaa6260 Bug 1116037 part 12 - Move mLineSize to RubyReflowState. r=dbaron 2014-12-30 11:20:10 +11:00
Xidorn Quan
6e53ba9ae1 Bug 1116037 part 11 - Add RubyReflowState for sharing states between ruby level boxes. r=dbaron 2014-12-30 11:16:30 +11:00
Xidorn Quan
683fe156df Bug 1116037 part 10 - Remove mColumnCount from nsRubyBaseContainerFrame. r=dbaron 2014-12-30 10:05:54 +11:00
Xidorn Quan
5396f2a0da Bug 1116037 part 9 - Move ruby text container arrays to stack. r=dbaron 2014-12-30 09:56:34 +11:00
Xidorn Quan
5f370f6a3f Bug 1116037 part 8 - Merge two ruby text container arrays. r=dbaron 2014-12-30 09:44:12 +11:00
Xidorn Quan
b4e34d9c72 Bug 1116037 part 7 - Small fixes to ruby line breaking. r=dbaron 2014-12-30 09:24:57 +11:00
Xidorn Quan
68f5496a53 Bug 1116037 part 6 - Use a single struct to represent ruby column. r=dbaron 2014-12-29 15:22:19 +11:00
Xidorn Quan
e6fa5a707f Bug 1116037 part 5 - Use unified struct for ruby reflow states. r=dbaron 2014-12-29 15:03:38 +11:00
Xidorn Quan
ed501207f6 Bug 1116037 part 4 - Remove useless parameters in ruby reflow methods. r=dbaron 2014-12-29 14:46:24 +11:00
Xidorn Quan
dcadfdf213 Bug 1116037 part 3 - Use ruby "column" instead of "pair" to match the spec term. r=dbaron 2014-12-29 14:30:00 +11:00
Xidorn Quan
d1ef25d527 Bug 1116037 part 2 - Use frame state bit to mark rtc of span. r=dbaron 2014-12-29 13:34:07 +11:00
Xidorn Quan
6ed01ce159 Bug 1114792 - Rename nsStyleContext::IsDirectlyInsideRuby to IsInlineDescendantOfRuby. r=dbaron 2014-12-31 16:39:43 +11:00
Xidorn Quan
10dbd31052 Bug 1055665 part 3 - Position ruby annotations and set the line size of them correctly. r=dholbert 2014-12-09 17:47:26 +11:00
Xidorn Quan
c390054f12 Bug 1108429 part 2 - Reserve isize for ruby boxes. r=roc 2014-12-13 11:05:02 +11:00
Xidorn Quan
dd4c8b86e3 Bug 1098272 part 6 - Check whether line break is allowed in ruby. r=dbaron 2014-12-22 16:52:30 +11:00
Xidorn Quan
070473da15 Bug 1098272 part 5 - Move final line break check code in ruby. r=dbaron 2014-12-22 16:36:55 +11:00
Xidorn Quan
377f87a18b Bug 1098272 part 4 - Remove unused parameter of nsRubyBaseContainerFrame::ReflowSpans. r=dbaron 2014-12-22 16:32:14 +11:00
Xidorn Quan
a536fe2ada Bug 1098272 part 3 - Move initial line break check code in ruby. r=dbaron 2014-12-22 16:24:24 +11:00
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