Summary: | Avoid doing an extra layout in some cases while doing scale-to-fit | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
Component: | New Bugs | Assignee: | Tim Horton <thorton> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, bdakin, sam, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Tim Horton
2015-05-22 14:44:23 PDT
Created attachment 253607 [details]
Patch
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. |