Closed Bug 1156021 Opened 9 years ago Closed 9 years ago

text-indent with percentage value in vertical writing-modes

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: bugzilla, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(2 files)

Tests (with vendor-prefixes)
----------------------------

A)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vrl-006.xht

B)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vlr-007.xht

C)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vrl-008.xht

D)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vlr-009.xht


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

A)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-abs-pos-non-replaced-vlr-009-ref.xht

B)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vlr-003-ref.xht

C)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vrl-008-ref.xht

D)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-text-indent-vlr-005-ref.xht


Explanation
-----------
'text-indent' set with a percentage unit on an element must be a percentage of its containing block height (measure or logical width).
'text-indent' computed and used value (specified with a percentage unit) must be calculated with respect to the measure (logical width) of the containing block.


Notes
-----
- Those tests (along with 12 other text-indent tests currently being developed) will eventually be submitted to the test.csswg.org repository 
- Chrome 44.0.2369.0 dev pass these 4 tests. IE11 passes the 'direction: ltr' tests (006 and 007) but fails the 'direction: rtl' tests (008 and 009). Prince 9.0.5 passes the 2 vertical-rl tests (006 and 008).
- I am using Firefox 40.0a1 buildID=20150417134120
- I use Linux 3.16.0-34-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.
The code in nsBlockFrame::Reflow looks fine, so I think it's probably just the code in nsLineLayout::BeginLineReflow that's calling nsHTMLReflowState::GetContainingBlockContentWidth.
The used text-indent value in all those 4 tests should be 80px. 

In Firefox 40.0a1 buildID=20150417134120, it is 40px.
Blocks: writing-mode
Keywords: testcase
As noted in comment 1, we just need to check the writing mode and get the right dimension from the containing block to use as the basis for percentages. With this patch, all the testcases in comment 0 and comment 3 look good.
Attachment #8594446 - Flags: review?(dbaron)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
And a reftest to go with it.
Attachment #8594478 - Flags: review?(dbaron)
https://hg.mozilla.org/mozilla-central/rev/9f3b7f39745b
https://hg.mozilla.org/mozilla-central/rev/fb6a787276ec
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: