Closed Bug 1133945 Opened 9 years ago Closed 9 years ago

vertical-align: 0 should be mapped to baseline when dominant baseline is central

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: bugzilla, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(2 files)

Tests
-----

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s43-vertical-align-0-001.xht

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s43-vertical-align-0-002.xht

Expected results
----------------

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s43-inline-replaced-vrl-004-ref.xht

Explanation
-----------

When 'text-orientation' is 'mixed', then the dominant baseline is the central baseline. When an inline replaced element has to be centrally baseline-aligned, its baseline is assumed to be halfway between the under and over margin edges of its box. Here, the test images should fit inside the minimal line box height (6.25em == 100px) and the line box should not grow taller. 'vertical-align: 0' and 'vertical-align: 0%' should be mapped to dominant baseline.

Firefox 38 seems to add 50px (half the physical width of test images) to the 2 line boxes and then positions, chooses to set the central baseline there.

Notes
-----

- I think component should be 'Layout: Block and Inline' but it could be 'Layout: Images'
- I have not yet submitted those tests to the test.csswg.org repository but I will, along with its correspondent reference file
- IE11 pass both tests
- I am using Firefox 38.0a1 buildID=20150213223659
- I use Linux 3.16.0-30-generic x86_64, Qt: 4.8.6, KDE 4.14.1; Kubuntu (utopic) 14.10
- I've searched for duplicates and did not find any
Blocks: writing-mode
Keywords: testcase
The vertical-lr test version:
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s43-vertical-align-0-003.xht

IE11 passes this test and Firefox 38.0a1 buildID=20150213223659 fails this test.
It seems that this bug only affects inline replaced elements.
I think all we need to do is something like this.
Attachment #8581107 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8581107 [details] [diff] [review]
Fix behavior of vertical-align with a specified length, relative to dominant centered baseline in vertical mode

Review of attachment 8581107 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this makes sense.
Attachment #8581107 - Flags: review?(smontagu) → review+
Attachment #8581108 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/b95971911f74
https://hg.mozilla.org/mozilla-central/rev/22bd01ab37fa
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: