<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/130171/">https://git.reviewboard.kde.org/r/130171/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On Juli 3rd, 2017, 11:07 nachm. CEST, <b>Albert Astals Cid</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sorry but no, you can't fix presentation mode by removing code out of pageview that you claim you don't know what it does. Debug more and come up with a better patch.</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Well, can you tell me what that code I'm trying to remove ought to do? (Even a hunch would be super useful!)</p></pre>
<br />
<p>- Alexander</p>
<br />
<p>On Juli 3rd, 2017, 10:54 nachm. CEST, Alexander Schlarb wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Okular.</div>
<div>By Alexander Schlarb.</div>
<p style="color: grey;"><i>Updated Juli 3, 2017, 10:54 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This fixes an issue I've commonly encountered while quickly working myself through large PDFs with many pages (such as <a href="https://storage.ninetailed.ninja/index.php/s/FS58uge8yKCvjlB" style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">this</a>).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Steps to reproduce the issue:</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Open Okular</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">For easily reproducing the issue change <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Settings</em> ? <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Performance</em> ? <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Memory Usage</em> to <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Greedy</em> (the issue can be reproduced without it, but it's harder an alot more random)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Open a PDF with many pages</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Immidiately go to presentation mode (<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Ctrl</em>+<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Shift</em>+<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">P</em>)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Click on the screen or press the left-arrow keyboard button</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Expected behaviour:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">The next slide is shown</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Actual behaviour:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">The next slide <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">is</em> indeed shown for a split second before the one is sent back to the first slide (this keeps being the case until all slides have been preloaded, then it stops)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Interestingly enough (and I frankly have no idea why) everything works normally if one quickly double-clicks to skip forward by two slides, slides can be viewed normally after that as long as you don't go back to the second slide again…?</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch fixes the problematic behaviour by removing code that looks its a bogus fixi from something that shouldn't be a problem… maybe.
Unfortunately the one attached comment isn't helpful at all in describing what this check was originally supposed to do – just like the commit message for that change (obtained through <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">git blame</code>):</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>commit d2d2fa3b2a4fa8f4b554b87ec13ee5a15b64f35d
Author: Mailson Menezes <mailson@gmail.com>
Date: Sun Nov 11 23:09:12 2012 -0300
Refactoring PageView
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I therefor can only hope that this solution doesn't break anything. Guidance of somebody with in-depth knowledge of the code-base would be apprechiated on this. :-)</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Loaded a few different PDFs that had previously exibited the described behaviour and verfied that they are fixed now. Also scrolled through them in non-presentation mode, to verify that nothing else appears to be broken now.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>ui/pageview.cpp <span style="color: grey">(acacfb90)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/130171/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>