Re: [css-writing-mode] change a structure of text-baseline test cases.

Hi fantasai,

Thank you for your review.

**** Dominant baseline testing
> These are the effects of the dominant baseline:
>  * when glyphs of different sizes are aligned to each other
>  * when glyphs of the same size but different fonts are aligned to each
other
>    (e.g. if one font has the baseline at 12% and the other at 20%)
>  * when atomic inlines are aligned to surrounding text

I have already created testcases for testing the first case and the third
case.
Sorry, I should have explain the all of testcase which I have created
previously.

Follwing is the file name and its description of all of my testcases.

inline-block-alignment-001~003.xht: test for inline-block which has some
text.
inline-block-alignment-004~006.xht: test for inline-block which has no text.
text-baseline-001~004.xht: test for text which has same font size.
text-baseline-005~007.xht: test for text which has different font size.
vertical-alignment-001~003.xht: test for vertical-align property 'baseline'.
vertical-alignment-004~006.xht: test for vertical-align property 'sub'.
vertical-alignment-007~009.xht: test for vertical-align property 'super'.
vertical-alignment-010~012.xht: test for vertical-align property 'length'
(zero value).
vertical-alignment-013~015.xht: test for vertical-align property 'length'
(positive value).
vertical-alignment-016~018.xht: test for vertical-align property 'length'
(negative value).
vertical-alignment-019~021.xht: test for vertical-align property
'percentage' (zero value).
vertical-alignment-022~024.xht: test for vertical-align property
'percentage' (positive value).
vertical-alignment-025~027.xht: test for vertical-align property
'parcentage' (negative value).

- All files are in css-writing-mode-3 directory. (
https://github.com/hshiozawa/csswg-test/tree/master/css-writing-modes-3)
- Testcase for different font size is 'text-baseline-005~007.xht'
- Testcase for atomic inlines is 'inline-block-alignment-001~006.xht'
- There is not a testcase for vertical-align property 'top', 'middle',
'bottom', 'text-top', 'text-bottom'. Because I think that these properties
are not effected by the baseline type (alphabetical or central)

**** Alignment of Images to Text
I will think about this topic within the few days.

**** Test organization
> However, I defer to Rebecca Hauck on this matter, since she is in charge
of such
> matters, so let us have her opinion. :)
Ok.

**** My name
Please call me my first name 'Hajime' ;-)



2014-11-23 15:59 GMT+09:00 fantasai <fantasai.lists@inkedblade.net>:

> On 11/17/2014 09:12 AM, 塩澤 元 (Shiozawa, Hajime) wrote:
>
>> Hi Gérard,
>>
>> I change a structure of text-baseline-***.html.
>>
>> Points are following.
>> 1. Test files are divided into more fine test case.
>> 2. Each test case contains a one test case and is named a combination of
>> writing-mode property and text-orientation property.
>> (e.g. tb-sideways-left).
>> 3. Files which have same number may have a same reference file.
>>     For example, the following files will have same reference file.
>>     + text-baseline-002-lr-sideways.xht
>>     + text-baseline-002-lr-sideways-left.xht
>>     + text-baseline-002-rl-sideways-left.xht
>> 4. I will apply the change to the others if this time change is no
>> problem.
>>
>> I consider about creating a reference file using a new font you discuss
>> about now.
>>
>
> Hello Shiozawa-san,
> Here are my comments on your testcases.
>
> First is design of the test. These cases test whether the image is aligned
> to the text at the correct baseline. This is only one effect of the
> dominant
> baseline, and it's possible the UA got this one correct but missed others
> relevant to the alignment of text or vice versa.
>
> These are the effects of the dominant baseline:
>   * when glyphs of different sizes are aligned to each other
>   * when glyphs of the same size but different fonts are aligned to each
> other
>     (e.g. if one font has the baseline at 12% and the other at 20%)
>   * when atomic inlines are aligned to surrounding text
>
> Ideally we would test all three, but the second one will require a new test
> font, which we don't have at the moment. So let us focus on the other two.
>
> Alignment of Different-size Text
> --------------------------------
>
> To test different sizes, we will need some text on the line that is of at
> least two different sizes. I suggest using three sizes, to test sizing both
> up and down. For example,
>
>   <p>A<big>B<small>C</small>B</big>A</p>
>
> (Please substitute <span> and CSS instead of <big>/<small>. 30px/50px/10px
> should show off the differences adequately.)
>
> For central alignment, we can use different-colored squares ("A") and
> require
> that the squares be perfectly centered with respect to each other.
>
> For alphabetic alignment, we can use "É" glyphs (or "p" glyphs) all of the
> same color and require that the appropriate side of the resulting shape is
> straight.
>
> The reference files for each can be made using backgrounds or borders
> and margins on normal blocks or floated blocks (no 'writing-mode'), as
> appropriate. Make sure the boxes all have the same margin-box size, so
> that we don't need to worry about how they are aligned!
>
> Alignment of Images to Text
> ---------------------------
>
> Your existing tests do technically test this, but since they use a 1px
> line,
> they do not test it very vigorously. To do that, we need a larger image. I
> would suggest using one of the support/*-swatch images, sizing it to be a
> larger or smaller square if necessary.
>
> You can test alignment of images similar to how we did text to larger text.
>
> This will not only test whether the image is aligned to the correct
> baseline,
> but also whether the correct point within the image is chosen for the
> alignment!
> For example, in central alignment the center of the image will be chosen,
> whereas for alphabetic alignment its edge will be chosen. It is important
> to
> test this also.
>
>  New test files are following.
>>
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-mixed.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-sideways-left.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-sideways-right.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-sideways.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-upright.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-001-tb-use-glyph-orientation.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-002-lr-sideways-left.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-002-lr-sideways.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-002-rl-sideways-left.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-003-lr-sideways-right.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-003-rl-sideways-right.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-003-rl-sideways.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-lr-mixed.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-lr-upright.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-lr-use-glyph-orientation.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-rl-mixed.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-rl-upright.xht
>> https://github.com/hshiozawa/csswg-test/blob/master/css-
>> writing-modes-3/text-baseline-004-rl-use-glyph-orientation.xht
>>
>
> My second comment is about test organization. I think it's important that
> each
> test file be understandable and not too complicated, both visually and
> code-wise.
> Sometimes this requires separating out related cases into multiple files.
> But in
> this case, I think it's just as understandable to keep all the
> text-orientation
> values in one file, and by keeping them in the same file it will make it
> easier
> to understand the tests because of the reduced duplication of code and the
> ability
> to see at once the variation in the tests and the similarity. Also, since
> we are
> automating tests, it will run faster if there are fewer files. So my
> preference
> would be to have separate files for each writing mode, but the same file
> for all
> text-orientation values.
>
> However, I defer to Rebecca Hauck on this matter, since she is in charge
> of such
> matters, so let us have her opinion. :)
>
> Overall, you did a good job of covering all of the combinations and
> documenting
> what the tests should be. (And they are not incorrect tests, they just
> could be
> more precise and more comprehensive.) So thank you for your efforts!
>
> ~fantasai
>



-- 
# 塩澤 元 (Shiozawa, Hajime)
# mail: hajime.shiozawa@gmail.com

Received on Tuesday, 25 November 2014 15:33:04 UTC