Title: [180520] trunk/Source/WebCore
Revision
180520
Author
[email protected]
Date
2015-02-23 14:42:15 -0800 (Mon, 23 Feb 2015)

Log Message

[iOS] Max canvas size is lower than expected
https://bugs.webkit.org/show_bug.cgi?id=141886
<rdar://problem/19729246>

Reviewed by Tim Horton.

Use the same maximum canvas area for all ports,
which bumps the iOS limit up from 4580 * 1145
to 16k * 16k.

* html/HTMLCanvasElement.cpp: Update MaxCanvasArea.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (180519 => 180520)


--- trunk/Source/WebCore/ChangeLog	2015-02-23 22:29:37 UTC (rev 180519)
+++ trunk/Source/WebCore/ChangeLog	2015-02-23 22:42:15 UTC (rev 180520)
@@ -1,3 +1,17 @@
+2015-02-22  Dean Jackson  <[email protected]>
+
+        [iOS] Max canvas size is lower than expected
+        https://bugs.webkit.org/show_bug.cgi?id=141886
+        <rdar://problem/19729246>
+
+        Reviewed by Tim Horton.
+
+        Use the same maximum canvas area for all ports,
+        which bumps the iOS limit up from 4580 * 1145
+        to 16k * 16k.
+
+        * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
+
 2015-02-23  Chris Dumez  <[email protected]>
 
         Add support for diagnostic logging messages sampling

Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (180519 => 180520)


--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2015-02-23 22:29:37 UTC (rev 180519)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2015-02-23 22:42:15 UTC (rev 180520)
@@ -61,18 +61,14 @@
 
 using namespace HTMLNames;
 
-// These values come from the WhatWG spec.
+// These values come from the WhatWG/W3C HTML spec.
 static const int DefaultWidth = 300;
 static const int DefaultHeight = 150;
 
 // Firefox limits width/height to 32767 pixels, but slows down dramatically before it
 // reaches that limit. We limit by area instead, giving us larger maximum dimensions,
-// in exchange for a smaller maximum canvas size. The maximum canvas size is in CSS pixels.
-#if PLATFORM(IOS)
-static const float MaxCanvasArea = 4580 * 1145; // 20 MB assuming 4 bytes per pixel
-#else
-static const float MaxCanvasArea = 32768 * 8192;
-#endif
+// in exchange for a smaller maximum canvas size. The maximum canvas size is in device pixels.
+static const float MaxCanvasArea = 16384 * 16384;
 
 HTMLCanvasElement::HTMLCanvasElement(const QualifiedName& tagName, Document& document)
     : HTMLElement(tagName, document)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to