<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [iOS] PDFDocumentImage should not create a cached image larger than what the device can handle"
href="https://bugs.webkit.org/show_bug.cgi?id=158715">158715</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[iOS] PDFDocumentImage should not create a cached image larger than what the device can handle
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Images
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sabouhallawa@apple.com
</td>
</tr></table>
<p>
<div>
<pre>This is a follow up for the bug <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - [iOS] PDFDocumentImage should not create a cached image larger than 4M pixels"
href="show_bug.cgi?id=157857">https://bugs.webkit.org/show_bug.cgi?id=157857</a>.
This bug was partially fixed in <a href="http://trac.webkit.org/changeset/201629">http://trac.webkit.org/changeset/201629</a> for low end devices whose ram sizes are less than 1GB ram. The bug was not addressed for higher end devices which larger ram sizes.
We need to use some heuristic than can work for all ram sizes. We can say, for every 1GB of ram we allow 16MB memory increase in the PDF cachedImage size. Or more formally, the PDF cachedImage will be created only:
if (ramSize() / PDF_cachedImage_size > 1GB / 16MB)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>