[webkit-changes] [WebKit/WebKit] 57f898: Make FloatQuad::boundingBox manage large finite va...

Ahmad Saleem noreply at github.com
Fri Dec 29 21:40:36 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 57f898204047c2950cdb7cbe02436a5faf1ba104
      https://github.com/WebKit/WebKit/commit/57f898204047c2950cdb7cbe02436a5faf1ba104
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-12-29 (Fri, 29 Dec 2023)

  Changed paths:
    A LayoutTests/fast/css/transform-infinity-expected.txt
    A LayoutTests/fast/css/transform-infinity.html
    M Source/WebCore/platform/graphics/FloatQuad.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp

  Log Message:
  -----------
  Make FloatQuad::boundingBox manage large finite values and infinite ones

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

Reviewed by Alan Baradlay.

Merge: https://chromium.googlesource.com/chromium/src.git/+/6f25d3a7fca5d1a30eb5f05c4057ee33aa7eb702 ,
https://chromium.googlesource.com/chromium/src/+/76905b16d9f5ba9533a7e8d41724fcd383fa4d37 and
https://chromium.googlesource.com/chromium/src/+/fdda021cbb442c16633595fa580614b6039132e3

This PR is to change FloatQuad::boundingBox() to check for -Infinity and Infinity when
converting to a FloatRect, thereby allowing the returned rect to be used
and snapped without hitting the isNaN() check when clamping to saturate.

Further, this is to extend FloatQuad::boundingBox to treat large finite values the
same way it treats infinite values, by clamping them to the range of int.

* Source/WebCore/platform/graphics/FloatQuad.cpp:
(clampToIntRange): For clamping new function
(FloatQuad::boundingBox): Use above new function
* Tools/TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp: New API tests
* LayoutTests/fast/css/transform-infinity.html: Add Test Case
* LayoutTests/fast/css/transform-infinity-expected.txt: Add Test Case Expectation

Canonical link: https://commits.webkit.org/272533@main




More information about the webkit-changes mailing list