RESOLVED FIXED Bug 236923
[GPU Process] [iOS] Sometimes the text drop shadow is not drawn
https://bugs.webkit.org/show_bug.cgi?id=236923
Summary [GPU Process] [iOS] Sometimes the text drop shadow is not drawn
Jon Lee
Reported 2022-02-19 21:59:33 PST
fast/css/paint-order-shadow.html [ ImageOnlyFailure ] imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ] imported/w3c/web-platform-tests/mathml/relations/css-styling/color-005.html [ ImageOnlyFailure ] imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-inline.html [ ImageOnlyFailure ] imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-writing-modes.html [ ImageOnlyFailure ] imported/w3c/web-platform-tests/css/css-variables/vars-font-shorthand-001.html [ ImageOnlyFailure ]
Attachments
Patch (7.52 KB, patch)
2022-04-01 20:17 PDT, Said Abou-Hallawa
simon.fraser: review+
ews-feeder: commit-queue-
Patch (9.21 KB, patch)
2022-04-03 22:56 PDT, Said Abou-Hallawa
no flags
Radar WebKit Bug Importer
Comment 1 2022-02-19 21:59:50 PST
Jon Lee
Comment 2 2022-03-14 23:32:34 PDT
obb-paintserver.html turns into a Crash, and paint-order-shadow.html still fails, but the others are resolved with the patch for 237728.
Said Abou-Hallawa
Comment 3 2022-03-15 11:32:33 PDT
The crash in orb-paintserver.html is fixed. It was happening because of infinite recursion. It was happening because of this new function inline bool operator==(const std::variant<Ref<Gradient>, Ref<Pattern>>& a, const std::variant<Ref<Gradient>, Ref<Pattern>>& b) { return WTF::switchOn(a, [&] (const Ref<Gradient>& aGradient) { if (auto* bGradient = std::get_if<Ref<Gradient>>(&b)) return aGradient == *bGradient; return false; }, [&] (const Ref<Pattern>& aPattern) { if (auto* bPattern = std::get_if<Ref<Pattern>>(&b)) return aPattern == *bPattern; return false; } ); } The equality in "return aPattern == *bPattern;" was causing the recursion. Ref<Pattern> was converted to std::variant<Ref<Gradient>, Ref<Pattern>> so the function was calling itself infinitely. The fix is not to compare Ref<Pattern> but to compare the raw pointers: "return aPattern.ptr() == bPattern->ptr();"
Simon Fraser (smfr)
Comment 4 2022-03-15 12:34:41 PDT
Can we use arePointingToEqualData() here?
Jon Lee
Comment 5 2022-04-01 15:49:50 PDT
Remaining failures: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=fast%2Fcss%2Fpaint-order-shadow.html&test=imported%2Fblink%2Fsvg%2Ftext%2Fobb-paintserver.html fast/css/paint-order-shadow.html [ ImageOnlyFailure ] imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ]
Said Abou-Hallawa
Comment 6 2022-04-01 20:05:24 PDT
The failure: imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ] is tracked by bug 236924. Let this bug track the failure: imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ]
Said Abou-Hallawa
Comment 7 2022-04-01 20:17:14 PDT
Simon Fraser (smfr)
Comment 8 2022-04-01 20:49:07 PDT
Comment on attachment 456432 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456432&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:51 > Recorder::Recorder(const GraphicsContextState& state, const FloatRect& initialClip, const AffineTransform& initialCTM, DrawGlyphsRecorder::DeconstructDrawGlyphs deconstructDrawGlyphs) > : GraphicsContext(state) > - , m_drawGlyphsRecorder(*this, deconstructDrawGlyphs) > + , m_drawGlyphsRecorder(*this, initialCTM.xScale(), deconstructDrawGlyphs) Does this do the right thing when zoomed?
Said Abou-Hallawa
Comment 9 2022-04-03 22:56:17 PDT
Said Abou-Hallawa
Comment 10 2022-04-04 10:15:23 PDT
Comment on attachment 456432 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456432&action=review >> Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:51 >> + , m_drawGlyphsRecorder(*this, initialCTM.xScale(), deconstructDrawGlyphs) > > Does this do the right thing when zoomed? yes
EWS
Comment 11 2022-04-04 10:22:00 PDT
Committed r292294 (249192@main): <https://commits.webkit.org/249192@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456531 [details].
Note You need to log in before you can comment on or make changes to this bug.