Closed
Bug 1083892
Opened 10 years ago
Closed 10 years ago
In a block with vertical writing-mode, only the first of a series of child blocks (e.g. paragraphs) appears correctly
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
1.86 KB,
text/html
|
Details | |
11.13 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
2.00 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
See testcase. When vertical-lr writing mode is selected, only the first of the three paragraphs within the test <div> is visible.
Note that an unexpected vertical scrollbar appears on the top-level viewport, suggesting that layout may have placed the following paragraphs far below the expected position (thanks to an unconstrained height somewhere?), although scrolling down does not reveal them.
Updated•10 years ago
|
Assignee | ||
Comment 1•10 years ago
|
||
To fix this, we need to make nsHTMLReflowState::CalculateBlockSideMargins work with logical coordinates. I have a WIP patch that seems to work pretty well; waiting for tryserver results (https://tbpl.mozilla.org/?tree=Try&rev=bb776069eab6) before posting for review.
Assignee | ||
Comment 2•10 years ago
|
||
Updated to fix a few test failures from the first attempt; now passes on try. https://tbpl.mozilla.org/?tree=Try&rev=c52ae6754d05
Attachment #8510144 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•10 years ago
|
||
And a reftest to go with it, based on the original failing testcase here. (Passes harmlessly when vertical mode is not enabled.)
Attachment #8510148 -
Flags: review?(smontagu)
Updated•10 years ago
|
Attachment #8510148 -
Flags: review?(smontagu) → review+
Comment 4•10 years ago
|
||
Comment on attachment 8510144 [details] [diff] [review]
Make CalculateBlockSideMargins work with logical coordinates.
Review of attachment 8510144 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/generic/nsHTMLReflowState.cpp
@@ +2343,5 @@
> if (availMarginSpace < 0) {
> if (mCBReflowState &&
> + mCBReflowState->GetWritingMode().IsBidiLTR() !=
> + mWritingMode.IsBidiLTR()) {
> + margin.IStart(mWritingMode) += availMarginSpace;
I'm not clear why you have this condition instead of just adding the space to margin.IEnd(mWritingMode) in all cases.
@@ +2406,5 @@
> // it to 'auto', depending on 'direction'.
> else if (mCBReflowState &&
> + mCBReflowState->GetWritingMode().IsBidiLTR() !=
> + mWritingMode.IsBidiLTR()) {
> + isAutoStartMargin = true;
Same question here
Assignee | ||
Comment 5•10 years ago
|
||
Which side's margin we need to adjust is dependent on the parent's directionality; if that doesn't match this state's mWritingMode, then we need to adjust the opposite margin than we'd do if they were the same direction.
Without this, we fail a number of reftests, e.g. a lot of the examples in box-properties/CSS21-t100303.xhtml.
Comment 6•10 years ago
|
||
Comment on attachment 8510144 [details] [diff] [review]
Make CalculateBlockSideMargins work with logical coordinates.
Review of attachment 8510144 [details] [diff] [review]:
-----------------------------------------------------------------
I see.
Attachment #8510144 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/80ba33c7c549
https://hg.mozilla.org/integration/mozilla-inbound/rev/155f1e8a1578
Target Milestone: --- → mozilla36
https://hg.mozilla.org/mozilla-central/rev/80ba33c7c549
https://hg.mozilla.org/mozilla-central/rev/155f1e8a1578
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•