RESOLVED FIXED Bug 144351
Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
https://bugs.webkit.org/show_bug.cgi?id=144351
Summary Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
zalan
Reported 2015-04-28 13:11:38 PDT
1. Load a bugs.webkit.org with checkboxes. 2. Zoom in and out until the checkboxes appear striped.
Attachments
Patch (5.45 KB, patch)
2015-04-28 13:28 PDT, zalan
no flags
Patch (5.45 KB, patch)
2015-04-28 13:38 PDT, zalan
no flags
zalan
Comment 1 2015-04-28 13:12:01 PDT
zalan
Comment 2 2015-04-28 13:28:21 PDT
Simon Fraser (smfr)
Comment 3 2015-04-28 13:31:35 PDT
Comment on attachment 251883 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251883&action=review > LayoutTests/fast/forms/checkbox-painting-with-hr.html:8 > + margin-top: -10px; > + border: 1px dashed white; Whitespace!
zalan
Comment 4 2015-04-28 13:38:29 PDT
Said Abou-Hallawa
Comment 5 2015-04-28 13:48:00 PDT
Comment on attachment 251884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251884&action=review > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:300 > + CGContextSaveGState(context); Can't we have a smart CG SaverRestorer class instead? So we do not have we worry about restoring the CG before every return statement.
zalan
Comment 6 2015-04-28 13:58:34 PDT
Comment on attachment 251884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251884&action=review >> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:300 >> + CGContextSaveGState(context); > > Can't we have a smart CG SaverRestorer class instead? So we do not have we worry about restoring the CG before every return statement. Yes, it'd be great to have one, but since GraphicsContextCG is pretty static, the risk of missing a restore is extremely low.
WebKit Commit Bot
Comment 7 2015-04-28 15:22:39 PDT
Comment on attachment 251884 [details] Patch Clearing flags on attachment: 251884 Committed r183511: <http://trac.webkit.org/changeset/183511>
WebKit Commit Bot
Comment 8 2015-04-28 15:22:43 PDT
All reviewed patches have been landed. Closing bug.
Said Abou-Hallawa
Comment 9 2015-05-01 12:26:43 PDT
Comment on attachment 251884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251884&action=review >>> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:300 >>> + CGContextSaveGState(context); >> >> Can't we have a smart CG SaverRestorer class instead? So we do not have we worry about restoring the CG before every return statement. > > Yes, it'd be great to have one, but since GraphicsContextCG is pretty static, the risk of missing a restore is extremely low. Actually we do have one. I just found it. Its name is GraphicsContextStateSaver. So the above code can be something like this: GraphicsContextStateSaver saver(*this, false); if (drawsDashedLine) { saver.save(); And there is no need for the other restoring code. The disadvantage of using it here might be it is not platform specific. So it does more than just calling CGContextSaveGState()/CGContextRestoreGState().
Note You need to log in before you can comment on or make changes to this bug.