[webkit-changes] [WebKit/WebKit] 6bf2a1: `marker orient="-1"` does not orient correctly (us...

Ahmad Saleem noreply at github.com
Sat May 13 19:13:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6bf2a1e9acdca0b3b54a5cb6332ecbf591ff565f
      https://github.com/WebKit/WebKit/commit/6bf2a1e9acdca0b3b54a5cb6332ecbf591ff565f
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-05-13 (Sat, 13 May 2023)

  Changed paths:
    A LayoutTests/svg/markers/marker-orientation-minus-one-expected.html
    A LayoutTests/svg/markers/marker-orientation-minus-one.html
    M Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourceMarker.h
    M Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp

  Log Message:
  -----------
  `marker orient="-1"` does not orient correctly (uses 'auto')

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

Reviewed by Said Abou-Hallawa.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

Merge: https://chromium.googlesource.com/chromium/src.git/+/886546446df947816927a7757de45fab1646c919

The value -1 (degrees) is a valid angle, so using it to indicate that
'auto' orientation should be used does not work out.
Just check 'orientType' directly instead and simplify the angle getter.

* Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp:
(RenderSVGResourceMarker::angle): Simplify logic
(RenderSVGResourceMarker::markerTransformation): Call 'orient' directly
* Source/WebCore/rendering/svg/RenderSVGResourceMarker.h: Update 'float angle' to std::optional
* Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp: Add Text Tree dump support
* LayoutTests/svg/markers/marker-orientation-minus-one.html: Add Test Case
* LayoutTests/svg/markers/marker-orientation-minus-one-expected.html: Add Test Case Expectation

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




More information about the webkit-changes mailing list