mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Issue #1619 - Missing Dimension Computation
This existed in Firefox before this bug. I don't know if it came from a previous bug or was removed post-fork.
This commit is contained in:
parent
3c02d3fc0d
commit
777b3cc622
1 changed files with 10 additions and 0 deletions
|
|
@ -5290,6 +5290,16 @@ nsImageRenderer::ComputeIntrinsicSize()
|
|||
if (haveHeight) {
|
||||
result.SetHeight(nsPresContext::CSSPixelsToAppUnits(imageIntSize.height));
|
||||
}
|
||||
|
||||
if (!haveHeight && haveWidth && result.mRatio) {
|
||||
nscoord intrinsicHeight =
|
||||
result.mRatio.Inverted().ApplyTo(imageIntSize.width);
|
||||
result.SetHeight(nsPresContext::CSSPixelsToAppUnits(intrinsicHeight));
|
||||
} else if (haveHeight && !haveWidth && result.mRatio) {
|
||||
nscoord intrinsicWidth = result.mRatio.ApplyTo(imageIntSize.height);
|
||||
result.SetWidth(nsPresContext::CSSPixelsToAppUnits(intrinsicWidth));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case eStyleImageType_Element:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue