RESOLVED FIXED 227009
GraphicsContext restores need to do nothing if the state stack is empty
https://bugs.webkit.org/show_bug.cgi?id=227009
Summary GraphicsContext restores need to do nothing if the state stack is empty
Myles C. Maxfield
Reported 2021-06-14 20:20:41 PDT
GraphicsContext restores need to do nothing if the state stack is empty
Attachments
Patch (2.35 KB, patch)
2021-06-14 20:23 PDT, Myles C. Maxfield
no flags
Patch (4.46 KB, patch)
2021-06-14 22:06 PDT, Myles C. Maxfield
no flags
Patch (5.15 KB, patch)
2021-06-14 23:28 PDT, Myles C. Maxfield
ews-feeder: commit-queue-
Patch (4.47 KB, patch)
2021-06-15 00:14 PDT, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2021-06-14 20:23:27 PDT
Tim Horton
Comment 2 2021-06-14 20:43:59 PDT
Comment on attachment 431397 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=431397&action=review > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:222 > + if (!stackSize()) > + return; I think you'll want this in all of the subclasses?
Simon Fraser (smfr)
Comment 3 2021-06-14 20:49:59 PDT
Comment on attachment 431397 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=431397&action=review > Source/WebCore/ChangeLog:10 > + According to the HTML spec (https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-restore-dev), > + "If there is no saved state, then the method must do nothing." That's true, and the CanvasRenderingContext protects against it, but you're changing GraphicsContext. We have thus far assumed that mismatched push/pop in GraphicsContext is a programming error.
Myles C. Maxfield
Comment 4 2021-06-14 22:06:53 PDT
Myles C. Maxfield
Comment 5 2021-06-14 23:28:53 PDT
Myles C. Maxfield
Comment 6 2021-06-15 00:14:45 PDT
EWS
Comment 7 2021-06-15 11:16:03 PDT
Committed r278884 (238826@main): <https://commits.webkit.org/238826@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431408 [details].
Radar WebKit Bug Importer
Comment 8 2021-06-15 11:17:22 PDT
Note You need to log in before you can comment on or make changes to this bug.