Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser(firefox): remove the hack around setting viewport size #4010

Commits on Sep 30, 2020

  1. browser(firefox): remove the hack around setting viewport size

    Juggler code had a bug where we subscribed to window and tab
    events, but did not iterate collections of current windows and tabs.
    
    As a result, we were sometimes failing to set viewport size for the
    initial window, and implemented an artificial promise to workaround
    the problem.
    
    This patch:
    - starts calling `onOpenWindow` and `onOpenTabListener` callbacks
      for *all* windows and tabs - current and future, eliminating the
      race condition.
    
    This worked too well and we started overriding window sizes that
    were set by users with `window.open(url, 'width=300;height=400')` (we
    have a test for this). To fix this, we now plumb `CHROME_WITH_SIZE`
    flag from appWindow and override viewport iff this flag is not set.
    
    After this patch, we will use the `onTabOpened` event to move user
    agent emulation to the browser-side.
    
    References microsoft#3995
    aslushnikov committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    f57f66c View commit details
    Browse the repository at this point in the history
  2. address comments

    aslushnikov committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    8dec612 View commit details
    Browse the repository at this point in the history