[webkit-changes] [WebKit/WebKit] e93834: Restrict floats over setCurrentTime & setCurrentSc...
Ahmad Saleem
noreply at github.com
Sat Dec 24 09:32:40 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e938348a700cfd5e7db4d10a905e8af922328996
https://github.com/WebKit/WebKit/commit/e938348a700cfd5e7db4d10a905e8af922328996
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2022-12-24 (Sat, 24 Dec 2022)
Changed paths:
M LayoutTests/svg/animations/animate-setcurrenttime-expected.txt
M LayoutTests/svg/animations/animate-setcurrenttime.html
A LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash-expected.txt
A LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html
A LayoutTests/svg/dom/SVGSVGElement-currentTime-expected.txt
A LayoutTests/svg/dom/SVGSVGElement-currentTime.html
M Source/WebCore/svg/SVGSVGElement.cpp
M Source/WebCore/svg/SVGSVGElement.idl
Log Message:
-----------
Restrict floats over setCurrentTime & setCurrentScale to finite values
Restrict floats over setCurrentTime & setCurrentScale to finite values
https://bugs.webkit.org/show_bug.cgi?id=249741
Reviewed by Simon Fraser.
This patch is to align WebKit with Blink / Chromium, Gecko / Firefox and Web-Specification.
Merge - https://chromium.googlesource.com/chromium/blink/+/b4e294d0dec2aeffa4d401e19916e753a7d74a75
This patch modifies "setCurrentTime" and "setCurrentScale" to work with finite floats and also update IDL definition aligned with current web-standard and also aligned with other browsers.
* Source/WebCore/svg/SVGSVGElement.cpp:
(SVGSVGElement::currentScale): Add ASSERT for finite 'scale'
(SVGSVGElement::getCurrentTime): Change "if" to ASSERT for finite seconds
* Source/WebCore/svg/SVGSVGElement.idl: Aligned with Web-Spec
* LayoutTests/svg/dom/SVGSVGElement-currentTime.html: Add Test Case
* LayoutTests/svg/dom/SVGSVGElement-currentTime-expected.txt: Add Test Case Expectation
* LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html: Add Test Case
* LayoutTests/svg/dom/SSVGSVGElement-currentScale-NaN-no-crash-expected.txt: Add Test Case Expectation
* LayoutTests/svg/animations/animate-setcurrentime.html: Rebaselined
* LayoutTests/svg/animations/animate-setcurrentime-expected.txt: Ditto
Canonical link: https://commits.webkit.org/258322@main
More information about the webkit-changes
mailing list