⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286842 in webkit


Ignore:
Timestamp:
Dec 10, 2021, 3:24:56 AM (5 years ago)
Author:
Nikolas Zimmermann
Message:

[LBSE] Begin layer-aware RenderSVGRoot implementation
https://bugs.webkit.org/show_bug.cgi?id=233863

Reviewed by Rob Buis.

Begin implementing RenderSVGRoot - the renderer for the outermost <svg> element -
for the layer-based SVG engine (LBSE). Starting with the downstream implementation,
all parts were removed that can be upstreamed separated (SVGBoundingBoxComputation,
SVGContainerLayout, etc.). This only creates the renderer and integrates it with
the build systems.

Covered by existing tests, no change in behaviour.

  • Sources.txt: Add RenderSVGRoot.* to build.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/transforms/TransformState.h:

(WebCore::TransformState::direction const): Make direction() public.

  • rendering/svg/RenderSVGRoot.cpp: Added.

(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::svgSVGElement const):
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation const):
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage const):
(WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument const):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth const):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight const):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::shouldApplyViewportClip const):
(WebCore::RenderSVGRoot::paint):
(WebCore::RenderSVGRoot::paintObject):
(WebCore::RenderSVGRoot::paintContents):
(WebCore::RenderSVGRoot::willBeDestroyed):
(WebCore::RenderSVGRoot::insertedIntoTree):
(WebCore::RenderSVGRoot::willBeRemovedFromTree):
(WebCore::RenderSVGRoot::styleDidChange):
(WebCore::RenderSVGRoot::updateLayerInformation):
(WebCore::RenderSVGRoot::updateFromStyle):
(WebCore::RenderSVGRoot::clippedOverflowRect const):
(WebCore::RenderSVGRoot::computeTransformationMatrices):
(WebCore::RenderSVGRoot::nodeAtPoint):
(WebCore::RenderSVGRoot::hasRelativeDimensions const):
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
(WebCore::RenderSVGRoot::currentViewportSize const):
(WebCore::RenderSVGRoot::mapLocalToContainer const):
(WebCore::RenderSVGRoot::overflowClipRect const):
(WebCore::RenderSVGRoot::applyTransform const):
(WebCore::RenderSVGRoot::absoluteRects const):
(WebCore::RenderSVGRoot::absoluteQuads const):

  • rendering/svg/RenderSVGRoot.h: Added.
Location:
trunk/Source/WebCore
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r286840 r286842  
     12021-12-10  Nikolas Zimmermann  <nzimmermann@igalia.com>
     2
     3        [LBSE] Begin layer-aware RenderSVGRoot implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=233863
     5
     6        Reviewed by Rob Buis.
     7
     8        Begin implementing RenderSVGRoot - the renderer for the outermost <svg> element -
     9        for the layer-based SVG engine (LBSE). Starting with the downstream implementation,
     10        all parts were removed that can be upstreamed separated (SVGBoundingBoxComputation,
     11        SVGContainerLayout, etc.). This only creates the renderer and integrates it with
     12        the build systems.
     13
     14        Covered by existing tests, no change in behaviour.
     15
     16        * Sources.txt: Add RenderSVGRoot.* to build.
     17        * WebCore.xcodeproj/project.pbxproj: Ditto.
     18        * platform/graphics/transforms/TransformState.h:
     19        (WebCore::TransformState::direction const): Make direction() public.
     20        * rendering/svg/RenderSVGRoot.cpp: Added.
     21        (WebCore::RenderSVGRoot::RenderSVGRoot):
     22        (WebCore::RenderSVGRoot::svgSVGElement const):
     23        (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation const):
     24        (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage const):
     25        (WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument const):
     26        (WebCore::RenderSVGRoot::computeReplacedLogicalWidth const):
     27        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight const):
     28        (WebCore::RenderSVGRoot::layout):
     29        (WebCore::RenderSVGRoot::shouldApplyViewportClip const):
     30        (WebCore::RenderSVGRoot::paint):
     31        (WebCore::RenderSVGRoot::paintObject):
     32        (WebCore::RenderSVGRoot::paintContents):
     33        (WebCore::RenderSVGRoot::willBeDestroyed):
     34        (WebCore::RenderSVGRoot::insertedIntoTree):
     35        (WebCore::RenderSVGRoot::willBeRemovedFromTree):
     36        (WebCore::RenderSVGRoot::styleDidChange):
     37        (WebCore::RenderSVGRoot::updateLayerInformation):
     38        (WebCore::RenderSVGRoot::updateFromStyle):
     39        (WebCore::RenderSVGRoot::clippedOverflowRect const):
     40        (WebCore::RenderSVGRoot::computeTransformationMatrices):
     41        (WebCore::RenderSVGRoot::nodeAtPoint):
     42        (WebCore::RenderSVGRoot::hasRelativeDimensions const):
     43        (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
     44        (WebCore::RenderSVGRoot::currentViewportSize const):
     45        (WebCore::RenderSVGRoot::mapLocalToContainer const):
     46        (WebCore::RenderSVGRoot::overflowClipRect const):
     47        (WebCore::RenderSVGRoot::applyTransform const):
     48        (WebCore::RenderSVGRoot::absoluteRects const):
     49        (WebCore::RenderSVGRoot::absoluteQuads const):
     50        * rendering/svg/RenderSVGRoot.h: Added.
     51
    1522021-12-10  Frederic Wang  <fwang@igalia.com>
    253
  • trunk/Source/WebCore/Sources.txt

    r286838 r286842  
    24862486rendering/svg/RenderSVGResourceRadialGradient.cpp
    24872487rendering/svg/RenderSVGResourceSolidColor.cpp
     2488rendering/svg/RenderSVGRoot.cpp
    24882489rendering/svg/RenderSVGShape.cpp
    24892490rendering/svg/RenderSVGTSpan.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r286838 r286842  
    12551255                436708E112D9CA4B00044234 /* RenderSVGResourceRadialGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 436708A212D9CA4B00044234 /* RenderSVGResourceRadialGradient.h */; };
    12561256                436708E312D9CA4B00044234 /* RenderSVGResourceSolidColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 436708A412D9CA4B00044234 /* RenderSVGResourceSolidColor.h */; };
     1257                436708E512D9DB4B00044234 /* RenderSVGRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 436708A612D9DB4B00044234 /* RenderSVGRoot.h */; };
    12571258                436708E512D9CA4B00044234 /* LegacyRenderSVGRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 436708A612D9CA4B00044234 /* LegacyRenderSVGRoot.h */; };
    12581259                436708E912D9CA4B00044234 /* RenderSVGTransformableContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 436708AA12D9CA4B00044234 /* RenderSVGTransformableContainer.h */; };
     
    89828983                436708A312D9CA4B00044234 /* RenderSVGResourceSolidColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceSolidColor.cpp; sourceTree = "<group>"; };
    89838984                436708A412D9CA4B00044234 /* RenderSVGResourceSolidColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceSolidColor.h; sourceTree = "<group>"; };
     8985                436708A512D9CA5C00044234 /* RenderSVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGRoot.cpp; sourceTree = "<group>"; };
     8986                436708A612D9DB4B00044234 /* RenderSVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGRoot.h; sourceTree = "<group>"; };
    89848987                436708A512D9CA4B00044234 /* LegacyRenderSVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyRenderSVGRoot.cpp; sourceTree = "<group>"; };
    89858988                436708A612D9CA4B00044234 /* LegacyRenderSVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyRenderSVGRoot.h; sourceTree = "<group>"; };
     
    1887818881                                436708A312D9CA4B00044234 /* RenderSVGResourceSolidColor.cpp */,
    1887918882                                436708A412D9CA4B00044234 /* RenderSVGResourceSolidColor.h */,
     18883                                436708A512D9CA5C00044234 /* RenderSVGRoot.cpp */,
     18884                                436708A612D9DB4B00044234 /* RenderSVGRoot.h */,
    1888018885                                A10BB5881484E3B300B2E87A /* RenderSVGShape.cpp */,
    1888118886                                A10BB5891484E3B300B2E87A /* RenderSVGShape.h */,
     
    3655136556                                CDF747F9270F87CB008FEEEC /* RenderSVGResourceRadialGradientInlines.h in Headers */,
    3655236557                                436708E312D9CA4B00044234 /* RenderSVGResourceSolidColor.h in Headers */,
     36558                                436708E512D9DB4B00044234 /* RenderSVGRoot.h in Headers */,
    3655336559                                A10BB58B1484E3B300B2E87A /* RenderSVGShape.h in Headers */,
    3655436560                                CDF747F7270F86A4008FEEEC /* RenderSVGShapeInlines.h in Headers */,
  • trunk/Source/WebCore/platform/graphics/transforms/TransformState.h

    r278244 r286842  
    114114
    115115    TransformationMatrix* accumulatedTransform() const { return m_accumulatedTransform.get(); }
     116    TransformDirection direction() const { return m_direction; }
    116117
    117118private:
     
    121122    void applyAccumulatedOffset();
    122123   
    123     TransformDirection direction() const { return m_direction; }
    124124    TransformDirection inverseDirection() const;
    125125
Note: See TracChangeset for help on using the changeset viewer.