Bug 19592

Summary: Mismatched GraphicsContext::save()/restore() pairs in shadow painting code
Product: WebKit Reporter: Jonathon Jongsma (jonner) <jonathon>
Component: TextAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
remove the extra save() mitz: review+

Description Jonathon Jongsma (jonner) 2008-06-16 12:12:03 PDT
If you look at the following code, you'll notice two calls to context->save() with only a single restore() at teh end of the function.  The context is not modified at all between the two calls to save(), so I think the first one is useless and will lead to mismatched save/restore pairs.
http://trac.webkit.org/browser/trunk/WebCore/rendering/InlineFlowBox.cpp#L934
Comment 1 Jonathon Jongsma (jonner) 2008-06-16 13:01:34 PDT
Created attachment 21743 [details]
remove the extra save()

I'm not sure if there's a test we can add for this.  I haven't been able to actually come up with a rendering failure due to this, it just looks like it may be a bug in waiting.
Comment 2 mitz 2008-06-16 13:07:49 PDT
Comment on attachment 21743 [details]
remove the extra save()

r=me

I am going to land it, tweaking the change log format and removing the reference to GraphicsContextCairo.cpp.
Comment 3 Jonathon Jongsma (jonner) 2008-06-16 13:08:45 PDT
oops, how did that get in there? :P  thanks.
Comment 4 mitz 2008-06-16 13:11:30 PDT
Landed in <http://trac.webkit.org/changeset/34604>.