[webkit-changes] [WebKit/WebKit] fdd2e5: [SVG] Clean up SVGLengthContext::valueForLength

Yusuke Suzuki noreply at github.com
Wed Oct 25 21:36:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fdd2e5c403982e20ef7c0de6dbb23261bd8d1983
      https://github.com/WebKit/WebKit/commit/fdd2e5c403982e20ef7c0de6dbb23261bd8d1983
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M Source/WebCore/svg/SVGLengthContext.cpp

  Log Message:
  -----------
  [SVG] Clean up SVGLengthContext::valueForLength
https://bugs.webkit.org/show_bug.cgi?id=263644
rdar://117464325

Reviewed by Cameron McCormack.

This patch cleans up SVGLengthContext::valueForLength. If we review all conditions, we can find that only
three LengthType needs to be handled in this place, Percent, Fixed, and Calculated. And we can know that
we do not need to compute viewport size when LengthType is Fixed. This patch changes it so that we no longer
need to compute it when LengthType is Fixed.

* Source/WebCore/svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):

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




More information about the webkit-changes mailing list