Closed
Bug 1307806
Opened 8 years ago
Closed 8 years ago
[css-grid][css-flexbox][css-align] Implement nsLayoutUtils::GetFirstLineBaseline for flex/grid containers.
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
Attachments
(1 file, 1 obsolete file)
1.36 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3c0672b9107a7b5331a47f8b55b397c3621a6f7b
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Assignee | ||
Comment 2•8 years ago
|
||
(don't worry about the test failures, they are unrelated)
Attachment #8798166 -
Flags: review?(dholbert)
Assignee | ||
Comment 3•8 years ago
|
||
BTW, we should probably add something to nsLayoutUtils::GetLastLineBaseline as well eventually, but I don't think it matters for now. Grid items that are grid containers are handled specially in the Grid code for now, and Flexbox layout doesn't implement last-baseline.
Assignee | ||
Comment 4•8 years ago
|
||
* yet. :-)
Comment 5•8 years ago
|
||
Comment on attachment 8798166 [details] [diff] [review] fix Review of attachment 8798166 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsLayoutUtils.cpp @@ +6212,5 @@ > + fType == nsGkAtoms::gridContainerFrame) { > + aResult->mBStart = 0; > + aResult->mBaseline = aFrame->GetLogicalBaseline(aWM); > + aResult->mBEnd = aFrame->BSize(aWM); > + return true; This looks identical to the contents of the "if (fType == nsGkAtoms::tableWrapperFrame)" case further up in this method. Should we just share that existing code here, and just broaden its "if" check a bit?
Comment 6•8 years ago
|
||
(Also: can we include tests for this change?)
Assignee | ||
Comment 7•8 years ago
|
||
Hopefully bug 1306894 will be fixed soon enough so we'll get a test that way. ;-) BTW, I asked Brad if he could take a look at that one - it seems like we should already have a baseline value somewhere in Flexbox layout that we can to store for that method to return, right?
Attachment #8798166 -
Attachment is obsolete: true
Attachment #8798166 -
Flags: review?(dholbert)
Attachment #8798207 -
Flags: review?(dholbert)
Comment 8•8 years ago
|
||
Comment on attachment 8798207 [details] [diff] [review] fix Review of attachment 8798207 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! (Yeah, the flex container's baseline gets set (not-entirely-correctly) here: > aDesiredSize.SetBlockStartAscent(flexContainerAscent); https://dxr.mozilla.org/mozilla-central/source/layout/generic/nsFlexContainerFrame.cpp#4217 We could cache that on the frame in a member-variable, if that tends to match what we do elsewhere for storing baselines.)
Attachment #8798207 -
Flags: review?(dholbert) → review+
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/32aa05912bbb [css-grid][css-flexbox][css-align] Implement nsLayoutUtils::GetFirstLineBaseline for flex/grid containers. r=dholbert
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/32aa05912bbb
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•