Skip to content
  • Brad Werth's avatar
    Bug 1598145 Part 1: For user-scalable=no, force min and max zoom to match... · fb1e4b36
    Brad Werth authored
    Bug 1598145 Part 1: For user-scalable=no, force min and max zoom to match initial zoom, add WPT. r=hiro
    
    This provides web compatability with Chrome's interpretation of the spec at
    https://drafts.csswg.org/css-device-adapt/#user-zoom-desc. This changes makes
    us treat "the user cannot interactively change the zoom factor" as inclusive
    of ANY method of the user agent changing zoom levels, regardless of whether or
    not the user initiated an action.
    
    So, in addition to preventing things like double-tap-to-zoom and pinch-zoom,
    this change prevents zoom changes to fit all content into the viewport, or to
    maintain visible content proportionality if the viewport is resized dynamically.
    
    This also adds an assert to cases where Document::GetViewportInfo returns a
    viewport with a non-positive scale factor that it also sets the auto scale
    flag.
    
    This also adds a tentative web-platform test.
    
    Differential Revision: https://phabricator.services.mozilla.com/D72004
    fb1e4b36