[Webkit-unassigned] [Bug 257614] Set intrinsic size for inline SVG earlier
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 25 15:42:30 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=257614
--- Comment #2 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
Changes needed in Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:
const int defaultWidth = 300;
const int defaultHeight = 150;
LegacyRenderSVGRoot::LegacyRenderSVGRoot(SVGSVGElement& element, RenderStyle&& style)
: RenderReplaced(element, WTFMove(style))
, m_isLayoutSizeChanged(false)
, m_needsBoundariesOrTransformUpdate(true)
, m_hasBoxDecorations(false)
{
LayoutSize intrinsicSize(calculateIntrinsicSize());
if (!intrinsicSize.width())
intrinsicSize.setWidth(defaultWidth);
if (!intrinsicSize.height())
intrinsicSize.setHeight(defaultHeight);
setIntrinsicSize(intrinsicSize);
}
and
FloatSize LegacyRenderSVGRoot::calculateIntrinsicSize() const
{
return FloatSize(floatValueForLength(svgSVGElement().intrinsicWidth(), 0), floatValueForLength(svgSVGElement().intrinsicHeight(), 0));
}
void LegacyRenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, FloatSize& intrinsicRatio) const
{
ASSERT(!shouldApplySizeContainment());
// https://www.w3.org/TR/SVG/coords.html#IntrinsicSizing
intrinsicSize = calculateIntrinsicSize();
if (style().aspectRatio
...
__
and Source/WebCore/rendering/svg/LegacyRenderSVGRoot.h:
FloatSize calculateIntrinsicSize() const;
_____
Make us pass the test in Legacy, will try LBSE next.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230725/b6af9652/attachment.htm>
More information about the webkit-unassigned
mailing list