RESOLVED FIXED 48984
[Chromium] @media print crash due to paged media support
https://bugs.webkit.org/show_bug.cgi?id=48984
Summary [Chromium] @media print crash due to paged media support
Shinichiro Hamaji
Reported 2010-11-04 03:14:26 PDT
Created attachment 72921 [details] Test case Chromium crashes when we are printing the following HTML: <style> @media print { * { display: none; } } </style> Chromium bug: http://code.google.com/p/chromium/issues/detail?id=60464
Attachments
Test case (63 bytes, text/html)
2010-11-04 03:14 PDT, Shinichiro Hamaji
no flags
Patch (3.63 KB, patch)
2010-11-08 01:23 PST, Yuzo Fujishima
no flags
Added comments (3.93 KB, patch)
2010-11-08 18:55 PST, Yuzo Fujishima
no flags
Make expected result cleaner, added manual test instruction (3.86 KB, patch)
2010-11-09 01:01 PST, Yuzo Fujishima
no flags
Yuzo Fujishima
Comment 1 2010-11-08 01:23:40 PST
Shinichiro Hamaji
Comment 2 2010-11-08 04:22:32 PST
Comment on attachment 73225 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=73225&action=review Looks like the expectation file is wrong? > LayoutTests/printing/page-format-data-display-none-expected.txt:1 > + Does DRT really output this file? > WebCore/ChangeLog:6 > + https://bugs.webkit.org/show_bug.cgi?id=48984 I'd comment why this patch fixes this issue.
Yuzo Fujishima
Comment 3 2010-11-08 18:55:37 PST
Created attachment 73334 [details] Added comments
Yuzo Fujishima
Comment 4 2010-11-08 18:59:17 PST
Thank you for the review. (In reply to comment #2) > (From update of attachment 73225 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=73225&action=review > > Looks like the expectation file is wrong? > > > LayoutTests/printing/page-format-data-display-none-expected.txt:1 > > + > > Does DRT really output this file? Yes. I thought it was weird and spent some time to see if I made any mistakes. But DRT somehow spit it. > > > WebCore/ChangeLog:6 > > + https://bugs.webkit.org/show_bug.cgi?id=48984 > > I'd comment why this patch fixes this issue. Added comments there and at styleForPage().
Shinichiro Hamaji
Comment 5 2010-11-08 23:26:27 PST
> Yes. > > I thought it was weird and spent some time to see if I made any mistakes. > But DRT somehow spit it. I see. So, how about adding document.styleSheets[0].removeRule(0); after calling pageSizeAndMarginsInPixels to get a sane result? I'd add a comment which describes how to run the layout test manually.
Yuzo Fujishima
Comment 6 2010-11-09 01:01:45 PST
Created attachment 73346 [details] Make expected result cleaner, added manual test instruction
Yuzo Fujishima
Comment 7 2010-11-09 01:02:46 PST
Thank you for the review, again. (In reply to comment #5) > > Yes. > > > > I thought it was weird and spent some time to see if I made any mistakes. > > But DRT somehow spit it. > > I see. So, how about adding > > document.styleSheets[0].removeRule(0); > > after calling pageSizeAndMarginsInPixels to get a sane result? Done. > > > I'd add a comment which describes how to run the layout test manually. Done.
Shinichiro Hamaji
Comment 8 2010-11-09 01:16:06 PST
Comment on attachment 73346 [details] Make expected result cleaner, added manual test instruction Looks good. Thanks for updating patch!
WebKit Commit Bot
Comment 9 2010-11-09 04:21:35 PST
Comment on attachment 73346 [details] Make expected result cleaner, added manual test instruction Clearing flags on attachment: 73346 Committed r71621: <http://trac.webkit.org/changeset/71621>
WebKit Commit Bot
Comment 10 2010-11-09 04:21:40 PST
All reviewed patches have been landed. Closing bug.
Mihai Parparita
Comment 11 2010-11-09 08:26:28 PST
It looks like neither the test_shell nor the Chromium DRT have pageSizeAndMarginsInPixels, I'm going to add a TEXT expectation for this test and open a bug about adding support for it.
Yuzo Fujishima
Comment 12 2010-11-09 17:26:36 PST
Mihai, Sorry for the breakage and thank you for filing the bug.
Note You need to log in before you can comment on or make changes to this bug.