[Webkit-unassigned] [Bug 199236] Safari is not scaling SVGs with Command+/- zoom when font-size: is used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 13 13:13:57 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=199236

--- Comment #5 from Dean Jackson <dino at apple.com> ---
When we're calculating the font-size, we go through BuilderState::setFontSize, which looks at useSVGZoomRules()

// SVG handles zooming in a different way compared to CSS. The whole document is scaled instead
// of each individual length value in the render style / tree. CSSPrimitiveValue::computeLength*()
// multiplies each resolved length with the zoom multiplier - so for SVG we need to disable that.
// Though all CSS values that can be applied to outermost <svg> elements (width/height/border/padding...)
// need to respect the scaling. RenderBox (the parent class of RenderSVGRoot) grabs values like
// width/height/border/padding/... from the RenderStyle -> for SVG these values would never scale,
// if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor of 1.0 for specific
// properties that are NOT allowed to scale within a zoomed SVG document (letter/word-spacing/font-size).
bool BuilderState::useSVGZoomRules() const
{
    return is<SVGElement>(element());
}

-- 
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/20191113/fea8224e/attachment.htm>


More information about the webkit-unassigned mailing list