Avoid doing an extra layout in some cases while doing scale-to-fit
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2015 21:48:53 +0000 (21:48 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2015 21:48:53 +0000 (21:48 +0000)
commitf8b0157e22dfea308568f994c03eb8a77c8dcc88
tree436000dceb352b97ed39860a38a5d5f460dab87e
parentf0405c488b7d54a315cfe1c642174eabde00d6f9
Avoid doing an extra layout in some cases while doing scale-to-fit
https://bugs.webkit.org/show_bug.cgi?id=145321
<rdar://problem/21051165>

Reviewed by Beth Dakin.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
the view width is still less than the last-known minimum document size,
and the document size hasn't changed, update the view scale without
doing an extra layout, keeping the fixed layout size at the previously
computed minimum document size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm