[webkit-reviews] review granted: [Bug 59109] Extra GraphicsContext::save() in InlineTextBox::paintDecoration() : [Attachment 90663] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 21 21:08:47 PDT 2011
mitz at webkit.org has granted Simon Fraser (smfr) <simon.fraser at apple.com>'s
request for review:
Bug 59109: Extra GraphicsContext::save() in InlineTextBox::paintDecoration()
https://bugs.webkit.org/show_bug.cgi?id=59109
Attachment 90663: Patch
https://bugs.webkit.org/attachment.cgi?id=90663&action=review
------- Additional Comments from mitz at webkit.org
View in context: https://bugs.webkit.org/attachment.cgi?id=90663&action=review
r=me but please consider my comments
> Source/WebCore/html/HTMLCanvasElement.cpp:107
> +#if !ASSERT_DISABLED
> + // Deal with mismatched save/restore calls from content.
> + if (GraphicsContext* context = drawingContext()) {
> + while (context->stackDepth())
> + context->restore();
> + }
> +#endif
Why can’t CanvasRenderingContext2D (and other CanvasRenderingContexts if
necessary) handle this by popping its internal stack?
> Source/WebCore/platform/graphics/GraphicsContext.h:283
> + size_t stackDepth() const { return m_stack.size(); }
It’s kind of ugly that this is a public member. Please consider guarding this
with #if !ASSERT_DISABLED too.
More information about the webkit-reviews
mailing list