<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 - View scale changes are temporarily lost after restoring a page from the page cache"
   href="https://bugs.webkit.org/show_bug.cgi?id=144934">144934</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>View scale changes are temporarily lost after restoring a page from the page cache
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (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>WebKit2
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>thorton&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Steps to Reproduce (through the code!):

1. Set a non-1 viewScale.
2. Navigate.
3. Set a different non-1 viewScale.
4. Go back.

Expected:

WebCore's pageScaleFactor should be equal to the viewScale set in #3.
The transform on the tiles should be a scale equal to the viewScale set in #3.

Actual:

WebCore's pageScaleFactor is equal to the viewScale set in #1.
The transform on the tiles is a scale equal to the viewScale set in #1.

Notes:

This is happening because the pageScaleFactor stored on HistoryItem is WebCore's pageScaleFactor, which has
the viewScale multiplied into it. When we come back from the PageCache, HistoryController does a setPageScaleFactor() with
the stored scale (with the old viewScale multiplied into it), disregarding any viewScale changes since that item went into the PageCache.

Since WebKit2 keeps pageScale and viewScale separately, doing a small pinch zoom will push the correct pageScaleFactor to WebCore and recover from this situation.

To fix this, I think we're going to have to inform WebCore of the viewScale, something I had previously been trying to avoid -- but only for the purposes of the PageCache, so hopefully it will be OK.</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>