[webkit-reviews] review granted: [Bug 66710] Assertion fires if canvas is resized while save() active : [Attachment 104865] Make CanvasRenderingContext2D::reset() clear the state stack

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 23 10:59:04 PDT 2011


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Stephen White
<senorblanco at chromium.org>'s request for review:
Bug 66710: Assertion fires if canvas is resized while save() active
https://bugs.webkit.org/show_bug.cgi?id=66710

Attachment 104865: Make CanvasRenderingContext2D::reset() clear the state stack
https://bugs.webkit.org/attachment.cgi?id=104865&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=104865&action=review


> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:178
> +    if (size_t stackSize = m_stateStack.size()) {
> +	   if (GraphicsContext* context = canvas()->existingDrawingContext()) {

> +	       while (--stackSize)
> +		   context->restore();
> +	   }
> +    }

WOuld be nice to share this code with the dtor. Maybe a new
"unwindStateStack()" method or something.


More information about the webkit-reviews mailing list