RESOLVED FIXED 4274
REGRESSION: canvas draws when window loses focus (flipped and in wrong position!)
https://bugs.webkit.org/show_bug.cgi?id=4274
Summary REGRESSION: canvas draws when window loses focus (flipped and in wrong positi...
Todd Yandell
Reported 2005-08-03 01:22:03 PDT
In the latest version of WebKit the canvas element has a rendering error. It appears to be copying the rendered image on top of everything else, only it's drawn from another coordinate system (where [0, 0] is at the lower left hand corner, the default for Quartz), causing the image to be flipped over. The image only appears to get copied when the Safari window loses or gains focus. This doesn't happen in WebKit 412, and it doesn't appear to happen all of the time. It will work for a while, then stop. Restarting Safari causes the bug to show up again.
Attachments
A test case for this bug. (1.21 KB, text/html)
2005-08-03 01:23 PDT, Todd Yandell
no flags
Screenshot of the bug. (61.72 KB, image/png)
2005-08-03 01:24 PDT, Todd Yandell
no flags
patch to make sure canvas doesn't draw when QPainter has painting disabled (1.94 KB, patch)
2005-09-04 14:43 PDT, Darin Adler
no flags
patch to make sure nobody tries to use the CGContext when painting disabled (5.19 KB, patch)
2005-09-04 14:59 PDT, Darin Adler
sullivan: review+
Todd Yandell
Comment 1 2005-08-03 01:23:14 PDT
Created attachment 3214 [details] A test case for this bug.
Todd Yandell
Comment 2 2005-08-03 01:24:07 PDT
Created attachment 3215 [details] Screenshot of the bug.
Chris Petersen
Comment 3 2005-08-07 09:34:56 PDT
Confirming this issue only happens with TOT WebKit.
Darin Adler
Comment 4 2005-09-04 13:57:04 PDT
When this bug does NOT happen, we get this on the console: CGContextDrawImage: invalid context This makes me think that there's some code path that draws the image into the current context and the context is not set up.
Darin Adler
Comment 5 2005-09-04 14:04:31 PDT
I figured it out. This regression was caused by the recent form element work.
Darin Adler
Comment 6 2005-09-04 14:43:03 PDT
Created attachment 3763 [details] patch to make sure canvas doesn't draw when QPainter has painting disabled
Darin Adler
Comment 7 2005-09-04 14:59:52 PDT
Created attachment 3765 [details] patch to make sure nobody tries to use the CGContext when painting disabled
Darin Adler
Comment 8 2005-09-04 15:00:57 PDT
Comment on attachment 3765 [details] patch to make sure nobody tries to use the CGContext when painting disabled This patch should fix both this bug and bug 4755.
John Sullivan
Comment 9 2005-09-04 18:45:07 PDT
Comment on attachment 3765 [details] patch to make sure nobody tries to use the CGContext when painting disabled I see, this one is more complete than the previous one. That's why the previous one had the review ? flag removed.
Geoffrey Garen
Comment 10 2005-09-14 14:58:11 PDT
I just hit this assertion failure a number of times with TOT: QPainter::currentContext(): ASSERT(!data->state.paintingDisabled); EXC_BAD_ACCESS (0x0001) KERN_INVALID_ADDRESS (0x0001) at 0xbbadbeef Thread 0 Crashed: 0 QPainter::currentContext() + 96 (KWQPainter.mm:841) 1 QPainter::save() + 92 (KWQPainter.mm:181) 2 khtml::InlineTextBox::paintSelection(QPainter*, int, int, khtml::RenderStyle*, khtml::Font const*) + 364 (render_text.cpp:524) 3 khtml::InlineTextBox::paint(khtml::RenderObject::PaintInfo&, int, int) + 1220 (render_text.cpp:330) 4 khtml::InlineFlowBox::paint(khtml::RenderObject::PaintInfo&, int, int) + 976 (render_line.cpp:785) 5 khtml::RootInlineBox::paint(khtml::RenderObject::PaintInfo&, int, int) + 60 (render_line.cpp:1197) 6 khtml::RenderFlow::paintLines(khtml::RenderObject::PaintInfo&, int, int) + 2004 (render_flow.cpp: 373) 7 khtml::RenderBlock::paintObject(khtml::RenderObject::PaintInfo&, int, int) + 436 (render_block.cpp: 1311) 8 khtml::RenderBlock::paint(khtml::RenderObject::PaintInfo&, int, int) + 696 (render_block.cpp:1240) 9 khtml::RenderBlock::paintChildren(khtml::RenderObject::PaintInfo&, int, int) + 808 (render_block.cpp:1262) Since this checkin last modified that assertion, I'm reopening this bug.
Geoffrey Garen
Comment 11 2005-09-14 15:10:19 PDT
I'm reclosing this bug because the assertion failure is being tracked by 4985.
Note You need to log in before you can comment on or make changes to this bug.