mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 596765, patch 1: Don't skip initial reflow for zero-sized svg foreignObject frames. r+a=roc
This commit is contained in:
parent
1df70dc742
commit
644a076704
@ -559,7 +559,9 @@ nsSVGForeignObjectFrame::DoReflow()
|
||||
GetStateBits() & NS_FRAME_FIRST_REFLOW),
|
||||
"Calling InitialUpdate too early - must not call DoReflow!!!");
|
||||
|
||||
if (IsDisabled())
|
||||
// Skip reflow if we're zero-sized, unless this is our first reflow.
|
||||
if (IsDisabled() &&
|
||||
!(GetStateBits() & NS_FRAME_FIRST_REFLOW))
|
||||
return;
|
||||
|
||||
if (GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)
|
||||
@ -587,6 +589,10 @@ nsSVGForeignObjectFrame::DoReflow()
|
||||
float height =
|
||||
fO->mLengthAttributes[nsSVGForeignObjectElement::HEIGHT].GetAnimValue(fO);
|
||||
|
||||
// Clamp height & width to be non-negative (to match UpdateCoveredRegion).
|
||||
width = NS_MAX(width, 0.0f);
|
||||
height = NS_MAX(height, 0.0f);
|
||||
|
||||
nsSize size(nsPresContext::CSSPixelsToAppUnits(width),
|
||||
nsPresContext::CSSPixelsToAppUnits(height));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user