[webkit-changes] [WebKit/WebKit] d692a7: [LBSE] Implement support for markers

Nikolas Zimmermann noreply at github.com
Wed Jan 31 03:19:23 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d692a7789eddaebfce1963d41c032c50505d7bba
      https://github.com/WebKit/WebKit/commit/d692a7789eddaebfce1963d41c032c50505d7bba
  Author: Nikolas Zimmermann <nzimmermann at igalia.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/TestExpectations
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-01-f-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-03-f-expected.png
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-1-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-2-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-3-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-1-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-2-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-3-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-4-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/invalid-css-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-and-object-creation-expected.png
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-and-object-creation-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-creation-expected.png
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-creation-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-changes-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-child-changes-css-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-child-changes-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-default-width-height-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-empty-path-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-opacity-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-orient-auto-expected.png
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-orient-auto-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-overflow-clip-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-referencePoint-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-strokeWidth-changes-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-viewBox-changes-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-circular-marker-reference-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-scaling-stroke-markers-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/painting-marker-07-f-inherit-expected.txt
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/shapes-supporting-markers-expected.png
    A LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/shapes-supporting-markers-expected.txt
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/rendering/ReferencedSVGResources.cpp
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerModelObject.cpp
    M Source/WebCore/rendering/RenderLayerModelObject.h
    M Source/WebCore/rendering/RenderObject.h
    M Source/WebCore/rendering/svg/RenderSVGContainer.cpp
    M Source/WebCore/rendering/svg/RenderSVGHiddenContainer.h
    M Source/WebCore/rendering/svg/RenderSVGPath.cpp
    M Source/WebCore/rendering/svg/RenderSVGPath.h
    M Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
    A Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp
    A Source/WebCore/rendering/svg/RenderSVGResourceMarker.h
    A Source/WebCore/rendering/svg/RenderSVGResourceMarkerInlines.h
    M Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
    M Source/WebCore/rendering/svg/SVGBoundingBoxComputation.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceMarker.cpp
    M Source/WebCore/svg/SVGElement.cpp
    M Source/WebCore/svg/SVGMarkerElement.cpp
    M Source/WebCore/svg/SVGMarkerElement.h

  Log Message:
  -----------
  [LBSE] Implement support for markers
https://bugs.webkit.org/show_bug.cgi?id=265137

Reviewed by Rob Buis.

Add full support for <marker> in LBSE. The code from the legacy SVG engine is largely re-used,
adapted to the new RenderSVGResource framework, that allows for cheap invalidations, avoiding
costly relayouts, as opposed to the legacy SVG engine.

Covered by existing tests (non-text repaint reftests, etc.).

* LayoutTests/platform/mac-sonoma-wk2-lbse-text/TestExpectations:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-01-f-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-03-f-expected.png: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-1-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-2-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/animations/animate-marker-orienttype-3-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-1-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-2-expected.txt: Copied from LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-3-expected.txt.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-3-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-4-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/invalid-css-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-and-object-creation-expected.png: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-and-object-creation-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-creation-expected.png: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/js-late-marker-creation-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-changes-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-child-changes-css-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-child-changes-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-default-width-height-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-empty-path-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-opacity-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-orient-auto-expected.png: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-orient-auto-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-overflow-clip-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-referencePoint-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-strokeWidth-changes-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/marker-viewBox-changes-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-circular-marker-reference-expected.txt: Copied from LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/circular-marker-reference-3-expected.txt.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-scaling-stroke-markers-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/painting-marker-07-f-inherit-expected.txt: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/shapes-supporting-markers-expected.png: Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/shapes-supporting-markers-expected.txt: Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/ReferencedSVGResources.cpp:
(WebCore::CSSSVGResourceElementClient::resourceChanged):
(WebCore::ReferencedSVGResources::referencedSVGResourceIDs):
(WebCore::ReferencedSVGResources::referencedMarkerElement):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintSVGResourceLayer):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::svgMaskerResourceFromStyle const):
(WebCore::RenderLayerModelObject::svgMarkerStartResourceFromStyle const):
(WebCore::RenderLayerModelObject::svgMarkerMidResourceFromStyle const):
(WebCore::RenderLayerModelObject::svgMarkerEndResourceFromStyle const):
(WebCore::RenderLayerModelObject::svgMarkerResourceFromStyle const):
* Source/WebCore/rendering/RenderLayerModelObject.h:
* Source/WebCore/rendering/RenderObject.h:
(WebCore::RenderObject::isLegacyRenderSVGResourceMarker const):
(WebCore::RenderObject::isRenderSVGResourceMarker const):
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* Source/WebCore/rendering/svg/RenderSVGHiddenContainer.h:
* Source/WebCore/rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::updateShapeFromElement):
(WebCore::markerForType):
(WebCore::RenderSVGPath::shouldGenerateMarkerPositions const):
(WebCore::RenderSVGPath::drawMarkers):
(WebCore::RenderSVGPath::computeMarkerBoundingBox const):
(WebCore::RenderSVGPath::updateMarkerPositions):
(WebCore::RenderSVGPath::processMarkerPositions): Deleted.
* Source/WebCore/rendering/svg/RenderSVGPath.h:
* Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyMaskClipping):
* Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp: Added.
(WebCore::RenderSVGResourceMarker::RenderSVGResourceMarker):
(WebCore::RenderSVGResourceMarker::invalidateMarker):
(WebCore::RenderSVGResourceMarker::computeViewport const):
(WebCore::RenderSVGResourceMarker::updateLayoutSizeIfNeeded):
(WebCore::RenderSVGResourceMarker::layout):
(WebCore::RenderSVGResourceMarker::updateFromStyle):
(WebCore::RenderSVGResourceMarker::updateLayerTransform):
(WebCore::RenderSVGResourceMarker::applyTransform const):
(WebCore::RenderSVGResourceMarker::overflowClipRect const):
(WebCore::RenderSVGResourceMarker::markerTransformation const):
(WebCore::RenderSVGResourceMarker::computeMarkerBoundingBox const):
* Source/WebCore/rendering/svg/RenderSVGResourceMarker.h: Added.
* Source/WebCore/rendering/svg/RenderSVGResourceMarkerInlines.h: Added.
(WebCore::RenderSVGResourceMarker::markerElement const):
(WebCore::RenderSVGResourceMarker::referencePoint const):
(WebCore::RenderSVGResourceMarker::angle const):
(WebCore::RenderSVGResourceMarker::markerUnits const):
(WebCore::RenderSVGResourceMarker::hasReverseStart const):
* Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyMask):
* Source/WebCore/rendering/svg/SVGBoundingBoxComputation.cpp:
(WebCore::SVGBoundingBoxComputation::handleRootOrContainer const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceMarker.cpp:
(WebCore::LegacyRenderSVGResourceMarker::LegacyRenderSVGResourceMarker):
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::isSVGLayerAwareElement):
* Source/WebCore/svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::invalidateMarkerResource):
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
(WebCore::SVGMarkerElement::setOrientToAuto):
(WebCore::SVGMarkerElement::setOrientToAngle):
(WebCore::SVGMarkerElement::createElementRenderer):
* Source/WebCore/svg/SVGMarkerElement.h:

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




More information about the webkit-changes mailing list