Closed
Bug 1177606
Opened 9 years ago
Closed 9 years ago
table contents misplaced in vertical-rl mode when the table has an explicitly specified width
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
1.25 KB,
text/html
|
Details | |
5.99 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
5.38 KB,
patch
|
Details | Diff | Splinter Review |
See attached testcase; when we *do* know the width of the table, we get the placement of the table body all wrong. :(
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8626397 -
Flags: review?(dholbert)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment 2•9 years ago
|
||
Comment on attachment 8626397 [details] [diff] [review] Fix containerWidth usage for vertical-rl tables where the table width is explicitly set >+++ b/layout/tables/nsTableFrame.cpp > void > nsTableFrame::DistributeBSizeToRows(const nsHTMLReflowState& aReflowState, > nscoord aAmount) > { > WritingMode wm = aReflowState.GetWritingMode(); > LogicalMargin borderPadding = GetChildAreaOffset(wm, &aReflowState); > >+ nscoord containerWidth = aReflowState.ComputedWidth(); >+ if (containerWidth == NS_UNCONSTRAINEDSIZE) { >+ containerWidth = 0; >+ } else { >+ containerWidth += aReflowState.ComputedPhysicalBorderPadding().LeftRight(); >+ } Per IRL discussion, could you file a followup on abstracting this ^ logic into a method on nsLayoutUtils or somewhere? >- // Make sure child views are properly positioned >+ >+ if (wm.IsVerticalRL()) { >+ nscoord rgWidth = rgFrame->GetRect().width; >+ for (nsTableRowFrame* rowFrame = rgFrame->GetFirstRow(); >+ rowFrame; rowFrame = rowFrame->GetNextRow()) { [etc] This new chunk needs an explanatory comment. r=me with that.
Attachment #8626397 -
Flags: review?(dholbert) → review+
Comment 4•9 years ago
|
||
I'm not sure if it's this bug or a different one, but the table body also gets displaced when <td>s have padding on the vertical sides.
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Simon Montagu :smontagu from comment #4) > I'm not sure if it's this bug or a different one, but the table body also > gets displaced when <td>s have padding on the vertical sides. Might be related to this or to bug 1177600. In my local build with both that patch and this one, adding padding to the <td>s seems to work properly.
Comment 6•9 years ago
|
||
After working with more different test cases, "when <td>s have padding on the vertical sides" might not be the exact criterion. Table content gets displaced in tables with vertical-rl from time to time, and it isn't always clear what the deciding factor is. If I still see it happening after this is checked in I'll pursue it further.
Assignee | ||
Comment 7•9 years ago
|
||
Here are a couple of reftests where an explicit width is specified on the table; the vertical-rl case fails until bug 1177600 and this bug are fixed.
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/645991c76862 https://hg.mozilla.org/integration/mozilla-inbound/rev/30031b730aa2
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/645991c76862 https://hg.mozilla.org/mozilla-central/rev/30031b730aa2
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•