Bug 219200

Summary: Support aspect-ratio on replaced elements
Product: WebKit Reporter: Rob Buis <rbuis>
Component: CSSAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, darin, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, pdr, sabouhallawa, schenney, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Description Rob Buis 2020-11-20 05:41:16 PST
Support aspect-ratio on replaced elements.
Comment 1 Rob Buis 2020-11-20 06:01:06 PST
Created attachment 414670 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2020-11-27 05:42:16 PST
<rdar://problem/71763936>
Comment 3 Rob Buis 2020-12-08 12:59:41 PST
Created attachment 415665 [details]
Patch
Comment 4 Rob Buis 2020-12-09 07:09:35 PST
Created attachment 415755 [details]
Patch
Comment 5 Rob Buis 2020-12-09 13:39:17 PST
Created attachment 415794 [details]
Patch
Comment 6 Darin Adler 2020-12-09 15:54:25 PST
Comment on attachment 415794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415794&action=review

> Source/WebCore/rendering/svg/RenderSVGRoot.cpp:109
> +    if (style().aspectRatioType() == AspectRatioType::AutoAndRatio && !intrinsicRatioValue)
> +        intrinsicRatio = style().logicalAspectRatio();
> +    else if (intrinsicRatioValue)
> +        intrinsicRatio = *intrinsicRatioValue;

I would write it this way instead:

    if (intrinsicRatioValue)
        intrinsicRatio = *intrinsicRatioValue;
    else if (style().aspectRatioType() == AspectRatioType::AutoAndRatio)
        intrinsicRatio = style().logicalAspectRatio();
Comment 7 Rob Buis 2020-12-10 00:39:12 PST
Created attachment 415842 [details]
Patch
Comment 8 EWS 2020-12-10 02:10:08 PST
Committed r270618: <https://trac.webkit.org/changeset/270618>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415842 [details].