Bug 1525133: Explicitly skip orthogonal-flow children when determining last-baseline of a block from its children. r=mats
Without the check that I'm adding in this patch, we'd violate the "parallel writing mode" expectation of some baseline accessors that we use in the now-guarded code. And we'd produce bogus layout as a result. The added assertions are just for good measure. The included testcase causes us to fail both assertions, in a build that's missing the fix. Differential Revision: https://phabricator.services.mozilla.com/D18715
This commit is contained in:
@@ -487,7 +487,8 @@ bool nsBlockFrame::GetNaturalBaselineBOffset(
|
||||
if (line->IsBlock()) {
|
||||
nscoord offset;
|
||||
nsIFrame* kid = line->mFirstChild;
|
||||
if (kid->GetVerticalAlignBaseline(aWM, &offset)) {
|
||||
if (!aWM.IsOrthogonalTo(kid->GetWritingMode()) &&
|
||||
kid->GetVerticalAlignBaseline(aWM, &offset)) {
|
||||
// Ignore relative positioning for baseline calculations.
|
||||
const nsSize& sz = line->mContainerSize;
|
||||
offset += kid->GetLogicalNormalPosition(aWM, sz).B(aWM);
|
||||
|
||||
Reference in New Issue
Block a user