Bug 141861 - Print a console warning when HTMLCanvasElement exceeds the maximum size
Summary: Print a console warning when HTMLCanvasElement exceeds the maximum size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 17:02 PST by Dean Jackson
Modified: 2015-02-22 18:36 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.57 KB, patch)
2015-02-20 17:09 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (3.74 KB, patch)
2015-02-20 17:24 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (1.98 KB, patch)
2015-02-20 17:36 PST, Dean Jackson
simon.fraser: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-mavericks-wk2 (741.44 KB, application/zip)
2015-02-20 17:58 PST, Build Bot
no flags Details
Archive of layout-test-results from ews100 for mac-mavericks (590.63 KB, application/zip)
2015-02-20 18:25 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2015-02-20 17:02:08 PST
Print a console warning when HTMLCanvasElement exceeds the maximum size
Comment 1 Dean Jackson 2015-02-20 17:09:04 PST
Created attachment 247014 [details]
Patch
Comment 2 Dean Jackson 2015-02-20 17:09:21 PST
        <rdar://problem/19729145>
Comment 3 Simon Fraser (smfr) 2015-02-20 17:15:25 PST
Comment on attachment 247014 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=247014&action=review

> Source/WebCore/html/HTMLCanvasElement.cpp:558
> +        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Canvas size exceeds the maximum limit. Draw operations will not produce output."));

I think this should say what the limit is.
Comment 4 Dean Jackson 2015-02-20 17:24:28 PST
Created attachment 247017 [details]
Patch
Comment 5 Simon Fraser (smfr) 2015-02-20 17:26:49 PST
Comment on attachment 247017 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=247017&action=review

> Source/WebCore/html/HTMLCanvasElement.cpp:559
> +        stringBuilder.append("Canvas size exceeds the maximum limit (width * height > ");

Maybe "canvas area exceeds"

> LayoutTests/fast/canvas/huge-canvas-error-expected.txt:1
> +CONSOLE MESSAGE: line 14: Canvas size exceeds the maximum limit. Draw operations will not produce output.

You'll have to fix this.
Comment 6 Dean Jackson 2015-02-20 17:36:01 PST
Created attachment 247020 [details]
Patch
Comment 7 Simon Fraser (smfr) 2015-02-20 17:37:30 PST
Comment on attachment 247020 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=247020&action=review

> Source/WebCore/html/HTMLCanvasElement.cpp:559
> +        stringBuilder.append("Canvas size exceeds the maximum limit (width * height > ");

Canvas area ("size" is ambiguous).

> Source/WebCore/html/HTMLCanvasElement.cpp:561
> +        stringBuilder.append("). Draw operations will not produce output.");

Does "Draw operations will not produce output" add anything? Maybe drop it.
Comment 8 Build Bot 2015-02-20 17:58:39 PST
Comment on attachment 247020 [details]
Patch

Attachment 247020 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4509105733500928

New failing tests:
fast/canvas/pattern-too-large-to-create.html
fast/canvas/canvas-toDataURL-crash.html
Comment 9 Build Bot 2015-02-20 17:58:43 PST
Created attachment 247026 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 10 Build Bot 2015-02-20 18:25:20 PST
Comment on attachment 247020 [details]
Patch

Attachment 247020 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4909735987904512

New failing tests:
fast/canvas/pattern-too-large-to-create.html
fast/canvas/canvas-toDataURL-crash.html
Comment 11 Build Bot 2015-02-20 18:25:24 PST
Created attachment 247030 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 12 Dean Jackson 2015-02-22 18:36:24 PST
Committed r180492: <http://trac.webkit.org/changeset/180492>