Avoid doing an extra layout in some cases while doing scale-to-fit
Created attachment 253607 [details] Patch
http://trac.webkit.org/changeset/184797
Comment on attachment 253607 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253607&action=review > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:318 > + m_isScalingViewToFitDocument = true; Why do we have to add this new flag? Down in this block we setFixedLayoutSize() with the scaled width. Can't we use the following condition to check whether we are in scaling mode or not: m_webPage.fixedLayoutSize().width() < m_lastDocumentSizeForScaleToFit.width()
(In reply to comment #3) > Comment on attachment 253607 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253607&action=review > > > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:318 > > + m_isScalingViewToFitDocument = true; > > Why do we have to add this new flag? Down in this block we > setFixedLayoutSize() with the scaled width. Can't we use the following > condition to check whether we are in scaling mode or not: > > m_webPage.fixedLayoutSize().width() < m_lastDocumentSizeForScaleToFit.width() Originally there were other cases (page load for example) that would cause the flag to get un-set, but that is no longer the case. Possible we could do something better, but it's nice to be explicit, too.