mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 807565: Don't let border/padding push minimum content-box size for themed flex items below 0. r=mats
This commit is contained in:
parent
cea53677bb
commit
3ea9bcc426
2
layout/generic/crashtests/807565-1.html
Normal file
2
layout/generic/crashtests/807565-1.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<html><ul style="display: flex;"><li style="-moz-appearance: treetwistyopen; padding-left: 536870913em;"></li></ul></html>
|
8
layout/generic/crashtests/807565-2.html
Normal file
8
layout/generic/crashtests/807565-2.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<div style="display: flex">
|
||||
<div style="-moz-appearance: treetwistyopen; padding-left: 536870913em;">
|
||||
<div style="float: left"></div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
@ -488,6 +488,8 @@ load 799207-1.html
|
||||
load 799207-2.html
|
||||
load 801268-1.html
|
||||
load 804089-1.xhtml
|
||||
load 807565-1.html
|
||||
load 807565-2.html
|
||||
load 810726.html
|
||||
load 825810-1.html
|
||||
load 825810-2.html
|
||||
|
@ -835,11 +835,13 @@ nsFlexContainerFrame::GenerateFlexItemForChild(
|
||||
aPresContext->DevPixelsToAppUnits(
|
||||
aAxisTracker.GetCrossComponent(widgetMinSize));
|
||||
|
||||
// GMWS() returns border-box; we need content-box
|
||||
widgetMainMinSize -=
|
||||
aAxisTracker.GetMarginSizeInMainAxis(childRS.ComputedPhysicalBorderPadding());
|
||||
widgetCrossMinSize -=
|
||||
aAxisTracker.GetMarginSizeInCrossAxis(childRS.ComputedPhysicalBorderPadding());
|
||||
// GMWS() returns border-box. We need content-box, so subtract
|
||||
// borderPadding (but don't let that push our min sizes below 0).
|
||||
nsMargin& bp = childRS.ComputedPhysicalBorderPadding();
|
||||
widgetMainMinSize = std::max(widgetMainMinSize -
|
||||
aAxisTracker.GetMarginSizeInMainAxis(bp), 0);
|
||||
widgetCrossMinSize = std::max(widgetCrossMinSize -
|
||||
aAxisTracker.GetMarginSizeInCrossAxis(bp), 0);
|
||||
|
||||
if (!canOverride) {
|
||||
// Fixed-size widget: freeze our main-size at the widget's mandated size.
|
||||
|
Loading…
Reference in New Issue
Block a user