<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/105600/">http://git.reviewboard.kde.org/r/105600/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit edbb4ef9f5aa8f120558b9d4f4b9f68970100c4b by Fabio D'Urso to branch KDE/4.9.</pre>
 <br />







<p>- Commit</p>


<br />
<p>On July 17th, 2012, 10:24 a.m., Fabio D'Urso wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Okular and Albert Astals Cid.</div>
<div>By Fabio D'Urso.</div>


<p style="color: grey;"><i>Updated July 17, 2012, 10:24 a.m.</i></p>






<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;">This patch fixes a bug that causes the extraction of a wrong bounding box.

The issue is that, if the request queue is not empty, signalPixmapRequestDone causes a new pixmap request to be started, thus overwriting mPixmapGenerationThread's mCalcBoundingBox before it is read by the if in the next line.
If the current request had mCalcBoundingBox disabled and the next request enables it, GeneratorPrivate::pixmapGenerationFinished() will think that the current request has mCalcBoundingBox enabled and will set the bounding box to whatever value mPixmapGenerationThread->boundingBox() returns, ie the value left by the last request that actually calculated the bounding box (usually for a different page).
On the other hand, if the current request has mCalcBoundingBox enabled and the next request disables it, the if will not be taken and the calculated bounding box is discarded.

I moved the signalPixmapRequestDone call after the bounding box is saved, so that new requests are started only after all data from mPixmapGenerationThread have been saved.

Note: This patch does not reintroduce the issue fixed by 9ea54d72980715fd36927b4d7e7f432091787088, because I'm updating the bounding box after calling Page::setPixmap.</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;">Bugs 257370, 292680, 303622 seem to be fixed</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=257370">257370</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=292680">292680</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=303622">303622</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>core/generator.cpp <span style="color: grey">(0073943)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105600/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>