<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="https://git.reviewboard.kde.org/r/116065/">https://git.reviewboard.kde.org/r/116065/</a>
     </td>
    </tr>
   </table>
   <br />











<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/116065/diff/2/?file=246157#file246157line2072" style="color: black; font-weight: bold; text-decoration: underline;">src/qtcore.js</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">2072</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="nx">dom_style</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">'style'</span><span class="p">),</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Should use camelCase.</pre>
</div>
<br />



<p>- Nikita Skovoroda</p>


<br />
<p>On February 25th, 2014, 11:20 p.m. UTC, Nikita Skovoroda wrote:</p>








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

<div>Review request for QML Web and Anton Kreuzkamp.</div>
<div>By Nikita Skovoroda.</div>


<p style="color: grey;"><i>Updated Feb. 25, 2014, 11:20 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
qmlweb
</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;">Implement FontLoader type.

See http://qt-project.org/doc/qt-5/qml-qtquick-fontloader.html and http://qt-project.org/doc/qt-4.7/qml-fontloader.html

This currently depends on smnh's MIT-licensed FontLoader.js library
to get notifications when a font is loaded and trigger all events in time.

Elements that are using that font through 'font.family: fontId.name' get their dimensions recalculated correctly when the font loads.

If FontLoader.js is not provided the font is still loaded, but 'status' property is set to Error and dimensions recalculation is triggered after a fixed timeout (3 seconds).
In this case the user gets a notice in console.log.


Timeout (3 seconds) is the maximum time for a font to load. If font isn't loaded in this time, status is set to Error.
Without FontLoader.js dimensions recalculations for elements are triggered after that time.

For both cases (with and without FontLoader.js) if the font takes more than this time to load, dimensions recalculations for elements that are using this font will not be triggered or will have no effect.

On the other hand, if the font could not be loaded (with FontLoader.js enabled), the Error status will be set only when this timeout expires.
</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;">Works as expected (as described above) with or without FontLoader.js.
Tested cases when the font should load and when it should fail to load.

Tested «Text {font.family: fontId.name}» dimensions recalculations.

Works well for me.
</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>src/qtcore.js <span style="color: grey">(c219e2e)</span></li>

</ul>

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







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








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