1. Load a bugs.webkit.org with checkboxes. 2. Zoom in and out until the checkboxes appear striped.
rdar://problem/19726362
Created attachment 251883 [details] Patch
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!
Created attachment 251884 [details] Patch
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.
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.
Comment on attachment 251884 [details] Patch Clearing flags on attachment: 251884 Committed r183511: <http://trac.webkit.org/changeset/183511>
All reviewed patches have been landed. Closing bug.
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().