Bug 19592 - Mismatched GraphicsContext::save()/restore() pairs in shadow painting code
Summary: Mismatched GraphicsContext::save()/restore() pairs in shadow painting code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 12:12 PDT by Jonathon Jongsma (jonner)
Modified: 2008-06-16 13:11 PDT (History)
0 users

See Also:


Attachments
remove the extra save() (1.79 KB, patch)
2008-06-16 13:01 PDT, Jonathon Jongsma (jonner)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.