Changeset 232113 in webkit


Ignore:
Timestamp:
May 23, 2018 9:09:54 AM (6 years ago)
Author:
Antti Koivisto
Message:

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.
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r232107 r232113  
     12018-05-23  Antti Koivisto  <antti@apple.com>
     2
     3        Page keeps reloading when viewing photos in google drive (due to too high canvas memory limits)
     4        https://bugs.webkit.org/show_bug.cgi?id=185903
     5        <rdar://problem/38420562>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * platform/ios-simulator/fast/canvas/canvas-crash-expected.txt:
     10        * platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt: Added.
     11
    1122018-05-22  Manuel Rego Casasnovas  <rego@igalia.com>
    213
  • trunk/LayoutTests/platform/ios-simulator/fast/canvas/canvas-crash-expected.txt

    r215734 r232113  
    1 CONSOLE MESSAGE: line 16: Canvas area exceeds the maximum limit (width * height > 16777216).
    2 PASSED
     1CONSOLE MESSAGE: line 15: Total canvas memory use exceeds the maximum limit (256 MB).
     2CONSOLE MESSAGE: line 16: TypeError: null is not an object (evaluating 'ctx.putImageData')
     3
  • trunk/Source/WebCore/ChangeLog

    r232109 r232113  
     12018-05-23  Antti Koivisto  <antti@apple.com>
     2
     3        Page keeps reloading when viewing photos in google drive (due to too high canvas memory limits)
     4        https://bugs.webkit.org/show_bug.cgi?id=185903
     5        <rdar://problem/38420562>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The canvas memory usage limits don't work on iOS since the current 2GB minimum limit is
     10        larger than the maximum process size.
     11
     12        * html/HTMLCanvasElement.cpp:
     13        (WebCore::maxActivePixelMemory):
     14
     15        Always base this on the reported ramSize() on iOS. Make it still fairly large to not risk breaking
     16        any currently working content. In practice the limit computes to 448MB on device at the moment.
     17
    1182018-05-23  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r229694 r232113  
    197197    static std::once_flag onceFlag;
    198198    std::call_once(onceFlag, [] {
     199#if PLATFORM(IOS)
     200        maxPixelMemory = ramSize() / 2;
     201#else
    199202        maxPixelMemory = std::max(ramSize() / 4, 2151 * MB);
     203#endif
    200204    });
    201205    return maxPixelMemory;
Note: See TracChangeset for help on using the changeset viewer.