<table><tr><td style="">drosca requested changes to this revision.<br />drosca added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12096">View Revision</a></tr></table><br /><div><div><p>I don't see why this is called <tt style="background: #ebebeb; font-size: 13px;">DefaultZoomManager</tt> when it doesn't change default zoom, but it changes current zoom for pages.</p>

<p>As I said on IRC, I'd like to have some generic "per-site settings", so I don't like it in current state. It should be made to be able to handle multiple "settings" in addition to zoom value (eg. allow cookies, various permissions like load images and html5 permissions). <br />
There is already similar functionality with HTML5 permissions (<tt style="background: #ebebeb; font-size: 13px;">lib/tools/html5permissions</tt>), so it should be integrated into one "manager" class (something like <tt style="background: #ebebeb; font-size: 13px;">SiteSettingsManager</tt>).</p>

<p>Another issue is where to store the preferences. Currently it is using QSettings (both this patch and html5permissions), but it's not good for this usecase as it always completely re-writes the <tt style="background: #ebebeb; font-size: 13px;">.ini</tt> file on any change, thus saving a lot of data there will make all manipulation with the file slow. <br />
I think best way is to add new table (eg. <tt style="background: #ebebeb; font-size: 13px;">sitesettings</tt>) in sqlite database (with async api <tt style="background: #ebebeb; font-size: 13px;">SqlQueryJob</tt> to not block main thread):</p>

<div class="remarkup-table-wrap"><table style="border-collapse: separate;
          border-spacing: 1px;
          background: #d3d3d3;
          margin: 12px 0;">
<tr><td style="background: #ffffff;
          padding: 3px 6px;">domain</td><td style="background: #ffffff;
          padding: 3px 6px;">zoom_level</td><td style="background: #ffffff;
          padding: 3px 6px;">allow_cookies</td><td style="background: #ffffff;
          padding: 3px 6px;">allow_location</td></tr>
<tr><td style="background: #ffffff;
          padding: 3px 6px;">kde.org</td><td style="background: #ffffff;
          padding: 3px 6px;">8</td><td style="background: #ffffff;
          padding: 3px 6px;">TRUE</td><td style="background: #ffffff;
          padding: 3px 6px;">FALSE</td></tr>
<tr></tr>
</table></div>

<p>And last thing, do we really want to show in gui all domains where zoom was changed and add option to edit it there? It may be a very long list, and probably not even useful as it can be changed by visiting that domain directly. Of course, the situation is different with html5permissions, but even there it could be solved by adding a permissions settings in "site info" popup (after clicking on site icon in locationbar).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R875 Falkon</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12096">https://phabricator.kde.org/D12096</a></div></div><br /><div><strong>To: </strong>anmolgautam, drosca, Falkon<br /><strong>Cc: </strong>falkon, herrold, anmolgautam, iodelay, spoorun, navarromorales, cochise, clivej, ach<br /></div>