Bug 237711

Summary: [LBSE] Activate SVG transform support through layers
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, commit-queue, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, Hironori.Fujii, kondapallykalyan, pdr, rbuis, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 237553, 237554, 237590, 237701, 239060    
Bug Blocks: 90738, 239717    
Attachments:
Description Flags
Patch, v1
none
Patch, v2
none
Patch, v3
none
Patch, v6
none
Patch, v4
none
Patch, v5
none
Patch, v6
none
Patch, v7
none
Patch, v8
none
Patch, v9
none
Patch, v10
none
Patch, v11 rbuis: review+, ews-feeder: commit-queue-

Nikolas Zimmermann
Reported 2022-03-10 05:58:21 PST
Finally activate SVG transform support for containers & shapes in LBSE.
Attachments
Patch, v1 (25.05 KB, patch)
2022-03-10 06:02 PST, Nikolas Zimmermann
no flags
Patch, v2 (27.12 KB, patch)
2022-03-10 06:05 PST, Nikolas Zimmermann
no flags
Patch, v3 (25.57 KB, patch)
2022-03-10 15:43 PST, Nikolas Zimmermann
no flags
Patch, v6 (38.49 KB, text/plain)
2022-03-13 16:43 PDT, Nikolas Zimmermann
no flags
Patch, v4 (25.78 KB, patch)
2022-03-13 16:49 PDT, Nikolas Zimmermann
no flags
Patch, v5 (25.75 KB, patch)
2022-03-16 03:27 PDT, Nikolas Zimmermann
no flags
Patch, v6 (25.75 KB, patch)
2022-03-21 02:55 PDT, Nikolas Zimmermann
no flags
Patch, v7 (25.75 KB, patch)
2022-04-04 13:36 PDT, Nikolas Zimmermann
no flags
Patch, v8 (25.71 KB, patch)
2022-04-05 14:59 PDT, Nikolas Zimmermann
no flags
Patch, v9 (25.76 KB, patch)
2022-04-07 03:31 PDT, Nikolas Zimmermann
no flags
Patch, v10 (25.66 KB, patch)
2022-04-07 15:59 PDT, Nikolas Zimmermann
no flags
Patch, v11 (25.91 KB, patch)
2022-04-11 04:30 PDT, Nikolas Zimmermann
rbuis: review+
ews-feeder: commit-queue-
Nikolas Zimmermann
Comment 1 2022-03-10 06:02:07 PST
Created attachment 454350 [details] Patch, v1
Nikolas Zimmermann
Comment 2 2022-03-10 06:02:24 PST
Delaying EWS submission until the dependency patches are landed.
Nikolas Zimmermann
Comment 3 2022-03-10 06:05:39 PST
Created attachment 454351 [details] Patch, v2
Nikolas Zimmermann
Comment 4 2022-03-10 15:43:30 PST
Created attachment 454412 [details] Patch, v3
Nikolas Zimmermann
Comment 5 2022-03-13 16:43:47 PDT
Created attachment 454559 [details] Patch, v6 The latest iteration of the patch introduces FloatOrLayoutRect, which either holds a FloatRect or LayoutRect (realized via variant<FloatRect, LayoutRect>) -- this avoids all LayoutRect(fromFloatRect) hacks, present in previous iterations of the patch and guarantees type-safety again. As benefit it allows us to detect if we need to pixel snap or not (SVG stores FloatRects, no pixel snapping should occour), simplifying quite a few parts in RenderLayer
Nikolas Zimmermann
Comment 6 2022-03-13 16:49:13 PDT
Created attachment 454562 [details] Patch, v4
Nikolas Zimmermann
Comment 7 2022-03-13 16:50:18 PDT
(In reply to Nikolas Zimmermann from comment #5) > Created attachment 454559 [details] > Patch, v6 > > The latest iteration of the patch introduces FloatOrLayoutRect, which either > holds a FloatRect or LayoutRect (realized via variant<FloatRect, > LayoutRect>) -- this avoids all LayoutRect(fromFloatRect) hacks, present in > previous iterations of the patch and guarantees type-safety again. As > benefit it allows us to detect if we need to pixel snap or not (SVG stores > FloatRects, no pixel snapping should occour), simplifying quite a few parts > in RenderLayer Please ignore this comment, this was supposed to go onto ticket 237554, not here.
Nikolas Zimmermann
Comment 8 2022-03-16 03:27:28 PDT
Created attachment 454818 [details] Patch, v5
Radar WebKit Bug Importer
Comment 9 2022-03-16 05:38:19 PDT
Nikolas Zimmermann
Comment 10 2022-03-21 02:55:34 PDT
Created attachment 455227 [details] Patch, v6
Nikolas Zimmermann
Comment 11 2022-04-04 13:36:19 PDT
Created attachment 456619 [details] Patch, v7
Nikolas Zimmermann
Comment 12 2022-04-05 14:59:50 PDT
Created attachment 456754 [details] Patch, v8
Nikolas Zimmermann
Comment 13 2022-04-07 03:31:31 PDT
Created attachment 456902 [details] Patch, v9
Nikolas Zimmermann
Comment 14 2022-04-07 03:33:04 PDT
Depends on 237701, hence the build failures.
Nikolas Zimmermann
Comment 15 2022-04-07 15:59:43 PDT
Created attachment 456979 [details] Patch, v10
Nikolas Zimmermann
Comment 16 2022-04-10 15:45:39 PDT
The mac-wk1 / mac-wk2 failures are multicol related, not affected by this patch - tested on my machine. There appears to be general flakiness with respect to multicol layout at present?
Nikolas Zimmermann
Comment 17 2022-04-10 15:52:09 PDT
Fujii Hironori
Comment 18 2022-04-10 21:13:33 PDT
The EWS result didn't seem false positive. Some multicol tests are ramdomly failing since 249482@trunk. See the history of the result. https://build.webkit.org/results/Apple-Monterey-Debug-AppleSilicon-WK2-Tests/r292690%20(1670)/results.html
WebKit Commit Bot
Comment 19 2022-04-10 21:19:57 PDT
Re-opened since this is blocked by bug 239060
Nikolas Zimmermann
Comment 20 2022-04-11 04:29:48 PDT
(In reply to Fujii Hironori from comment #18) > The EWS result didn't seem false positive. > Some multicol tests are ramdomly failing since 249482@trunk. > See the history of the result. > https://build.webkit.org/results/Apple-Monterey-Debug-AppleSilicon-WK2-Tests/ > r292690%20(1670)/results.html Thanks for taking care Fujii - indeed I was misremembering two things: we do build with LBSE enabled by default on macOS, GTK & WPE -- I thought that the changes in the #if ENABLE(LBSE)... blocks are unrelated to the EWS failures :-( And indeed I saw the flakiness before, however not on results.webkit.org, but a private dashboard ... due to my patch: A classic one -- uninitialized variable: diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index 8a4d80f2b642..a65a7517b56e 100644 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -2030,6 +2030,9 @@ RenderObject::RenderObjectRareData::RenderObjectRareData() , m_isRenderFragmentedFlow(false) , m_hasOutlineAutoAncestor(false) , m_paintContainmentApplies(false) +#if ENABLE(LAYER_BASED_SVG_ENGINE) + , m_hasSVGTransform(false) +#endif { } That solves the mystery. Will add another patch, and ask Rob for another review. Side note: We should get rid of ADD_BOOLEAN_BITFIELD() -- the code is dangerous, we have to define the bitfields in the header, and initialize them in the source file. That leads to bugs like this one, which can be avoided with in-place initialization... I'll note this down for a rainy afternoon.
Nikolas Zimmermann
Comment 21 2022-04-11 04:30:11 PDT
Created attachment 457243 [details] Patch, v11
Nikolas Zimmermann
Comment 22 2022-04-11 05:54:11 PDT
Note You need to log in before you can comment on or make changes to this bug.