[webkit-reviews] review granted: [Bug 190570] Changing view scale should zoom to initial scale if the page is already at initial scale : [Attachment 352325] Add a layout test description

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 15 09:29:50 PDT 2018


Tim Horton <thorton at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 190570: Changing view scale should zoom to initial scale if the page is
already at initial scale
https://bugs.webkit.org/show_bug.cgi?id=190570

Attachment 352325: Add a layout test description

https://bugs.webkit.org/attachment.cgi?id=352325&action=review




--- Comment #4 from Tim Horton <thorton at apple.com> ---
Comment on attachment 352325
  --> https://bugs.webkit.org/attachment.cgi?id=352325
Add a layout test description

View in context: https://bugs.webkit.org/attachment.cgi?id=352325&action=review

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2526
> +    if (m_viewportConfiguration.layoutSizeScaleFactor() != scaleFactor &&
std::abs(m_viewportConfiguration.initialScale() - pageScaleFactor()) <= 0.025)

I think you might want areEssentiallyEqual for float compare. At least, Ben
used it in a few places because we do so much math with these scales that
they’d end up “equal” but only in that sense, and things would break. Don’t
know if it’s a concern in this path.


More information about the webkit-reviews mailing list