Page keeps reloading when viewing photos in google drive (due to too high canvas...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 16:09:54 +0000 (16:09 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 16:09:54 +0000 (16:09 +0000)
commit4059031135f42b4dab634559e7656e0dd36736f5
tree2f086722b56625fa9bdba5d276790f0190fda65c
parent9ba80102c342dfc091d0cf888b94d9c54b978e88
Page keeps reloading when viewing photos in google drive (due to too high canvas memory limits)
https://bugs.webkit.org/show_bug.cgi?id=185903
<rdar://problem/38420562>

Reviewed by Simon Fraser.

Source/WebCore:

The canvas memory usage limits don't work on iOS since the current 2GB minimum limit is
larger than the maximum process size.

* html/HTMLCanvasElement.cpp:
(WebCore::maxActivePixelMemory):

Always base this on the reported ramSize() on iOS. Make it still fairly large to not risk breaking
any currently working content. In practice the limit computes to 448MB on device at the moment.

LayoutTests:

* platform/ios-simulator/fast/canvas/canvas-crash-expected.txt:
* platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/fast/canvas/canvas-crash-expected.txt
LayoutTests/platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp