Commit Graph

53 Commits

Author SHA1 Message Date
Andrey Lushnikov 3536e81d77
chore: update browser patches as of May 26, 2023 (#23556) (#24079)
Internal commit reference:

2e6d52519c
2023-07-06 12:22:45 -07:00
Andrey Lushnikov f9c3e1915b
chore: update browser patches as of Apr 26, 2023 (#23556)
Internal commit reference:

b71297a4b9
2023-06-06 15:08:23 -07:00
Andrey Lushnikov f3a1058b38
chore: update browser patches as of Apr 5, 2023 (#23112)
Internal commit reference:
f7e6794188
2023-05-17 17:50:43 -07:00
Andrey Lushnikov 0c4bed191f
chore: update browser patches as of Mar 14, 2023 (#22603)
Internal commit reference:
e994525a6d
2023-04-24 14:28:08 -07:00
Andrey Lushnikov a6468b73b2
chore: update browser patches as of Feb 7, 2023 (#21824)
Internal SHA: 50b497cbfbdb567ecfaeb80f30942689b08db7c4
2023-03-20 18:23:12 -07:00
Andrey Lushnikov 6c5317bd31
chore: update browser patches as of Dec 13, 2022 (#20297) 2023-01-23 11:29:48 -08:00
Andrey Lushnikov 458c9b2207
browser(firefox): fix racy browser.newPage() method (#15251)
It looks like the tabopen callback is async, so we must
make sure it is called when opening new pages.
2022-06-30 11:07:38 -07:00
Pavel Feldman 618cc66c8d
browser(firefox): manage scripts to evaluate on load on front-end (#12101) 2022-02-14 20:32:12 -08:00
Max Schmitt 6a1e075903
fix(browser): fix downloads with nested frames (#9925) 2021-11-01 09:37:07 -07:00
Yury Semikhatsky 7560f40c77
browser(firefox): set opener for popup opened from iframe (#9837) 2021-10-28 02:16:37 -07:00
Joel Einbinder e04ff81921
browser(firefox): Browser.setPlatformOverride (#8440) 2021-08-25 11:45:45 -04:00
Dmitry Gozman dba3c5055f
browser(firefox): support start/stop videos for context (#8173) 2021-08-12 17:17:54 -07:00
Andrey Lushnikov 75dfc15e62
browser(firefox): roll to new Firefox Stable M91 (#8130) 2021-08-10 17:37:57 -07:00
Max Schmitt 18266722a1
browser(firefox): add Download.cancel (#7390) 2021-06-30 01:29:58 +02:00
Max Schmitt 226159defc
browser(firefox): forced-colors media query emulation (#6902) 2021-06-09 01:00:15 +02:00
Max Schmitt b2b45afc22
browser(firefox): override reduced motion no-preference (#6683) 2021-05-20 21:07:39 +02:00
Max Schmitt c4a6c2bcab
browser(firefox): added reduced motion emulation (#6618) 2021-05-18 21:23:12 +02:00
Yury Semikhatsky f8039bed10
browser(firefox): bindings in isolated worlds (#6493) 2021-05-11 09:27:39 -07:00
Pavel Feldman 8d21b12454
browser(firefox): fit screencast images into given frame (#6495) 2021-05-10 22:01:41 -07:00
Pavel Feldman edd2cc807c browser(ff): migrate screencast to client interfaces 2021-05-07 21:01:01 -07:00
Pavel Feldman 78ec057117
browser(firefox): implement screencast (#6452) 2021-05-06 19:11:42 -07:00
Pavel Feldman 765d74987f
chore(ff): remove some dead code (#6423) 2021-05-05 13:27:51 -07:00
Joel Einbinder 1a58281394
browser(firefox): don't record video outside the viewport (#6361) 2021-05-04 05:33:32 -07:00
Andrey Lushnikov 28d9f244df
browser(firefox): roll Firefox to Beta @ Feb 28, 2021 (#5659)
Diff merges:
498eaa7a87

Additional changes:
8404fbe1ad
2021-03-02 18:52:19 -08:00
Yury Semikhatsky b3e7838582
browser(firefox): clear AuthCache when setting context proxy (#4793) 2020-12-21 15:54:15 -08:00
Dmitry Gozman e8419f85b6
browser(firefox): support alertCheck and confirmCheck dialogs (#4553)
These are shown with "prevent this page from showing more dialogs" checkbox.
2020-11-30 20:05:15 -08:00
Dmitry Gozman 14a96ca21f
browser(firefox): ensure detachedFromTarget is always sent (#4505)
browser(firefox): ensure detachedFromTarget is always sent

LinkedBrowser can throw when removing listeners in PageTarget.dispose,
and that prevents BrowserHandler from sending Browser.detachedFromTarget.

Using a try-catch seems good enough.
2020-11-20 10:48:06 -08:00
Andrey Lushnikov cb1f2a38f3
browser(firefox): roll Firefox to Nov 17,2020 (#4477)
Changes accomodate touchEventsOverride that has moved to the
browser side.
2020-11-18 08:19:09 -08:00
Andrey Lushnikov e3b12b0a0d
browser(firefox): fix closing browser contexts with beforeunload (#4314)
References #4021
2020-11-02 17:29:54 -08:00
Andrey Lushnikov c5d3490b34
browser(firefox): roll firefox to beta Oct, 28 (#4274) 2020-10-28 14:47:14 -07:00
Andrey Lushnikov 4ab66a4fe5
browser(firefox): follow-up with assorted simplifications (#4066)
This patch:
- moves `SimpleChannel` to synchronously dispatch buffered commands
  instead of a `await Promise.resolve()` hack
- moves dialog & screencast handling from `PageHandler` to
  `TargetManager`. This leaves `PageHandler` to be concerned solely about
  protocol.
- removes `attach` and `detach` methods for worker channels: since
  channels are buffering messages until the namespace registers, there's
  no chance to loose any events.
- slightly simplifies `PageNetwork` class: it's lifetime is now
  identical to the lifetime of the associated `PageTarget`, so a lot can
  be simplified later on.

References #3995
2020-10-06 01:53:25 -07:00
Andrey Lushnikov c8a64b88e1
browser(firefox): enable document channel (#4065)
In the current tip-of-tree Firefox, document channel is enabled by
default, so we have to enable it in order to roll further.

This patch:
1. Removes content disposition sniffing from content process since it
   crashes renderer with document channel.
2. Merges all page-related handlers in a single `PageHandler` and
   serializes network events wrt the `Page.frameAttached` event.

The serialization mentioned in (2) is necessary: frame attachment is
reported from the content process, and network events are reported from
the browsers process. This is an inherent race, that becomes exposed by
the document channel.

On a side note, (2) makes it possible to synchronously report all
buffered events in `SimpleChannel` (cc offline discussion with @dgozman
that highlighted an unsighty approach that we currently employ there: reporting
events in a subsequent microtask.)

References #3995
2020-10-06 00:15:24 -07:00
Dmitry Gozman 133de10a47
browser(firefox): start screencast in existing pages upon setScreencastOptions (#4045)
This makes it work in persistent context.

To achieve this, we have to move screencast logic into PageTarget and
make PageHandler listen to an event.
2020-10-02 17:16:49 -07:00
Andrey Lushnikov 2c11b10598
browser(firefox): remove multisession logic (#4039)
This patch:
1. Changes `SimpleChannel` to buffer messages to the namespace that
   hasn't been registered yet. This allows us to create `SimpleChannel`
   per target on the browser side right away.
2. Removes multisession support. Now there's only one `PageAgent` in the
   content process, which talks to a single `PageHandler` on the browser
   side. Both ends can be created as-soon-as-needed; thanks to
   `SimpleChannel` bufferring, no messages will be lost and all messages
   will be delivered in proper order. (This is currently the reason why
   build 1178 flakes on windows).
3. Straightens up the target reporting. Targets are reported as soon
   as they appear on the browser side.

**NOTE:** this doesn't yet remove sessions from protocol.

References #3995
2020-10-02 04:13:42 -07:00
Andrey Lushnikov b74a6b78ef
browser(firefox): do not double-attach session to the same target (#4027)
We currently might double-attach to the target in `BrowserHandler` since we iterate over all targets, and then subscribe to the additional event when target is getting initialized.

This patch fixes this race condition and should unblock the roll to r1177.

References #3995
2020-09-30 23:50:02 -07:00
Andrey Lushnikov 974358442d
browser(firefox): move user agent emulation to browser side (#4016)
References #3995
2020-09-30 08:02:22 -07:00
Andrey Lushnikov e28083974d
browser(firefox): simplify PageTarget lifecycle (#4014)
As of today, we create `PageTarget` instances whenever we get a
sync IPC from the content process. This, however, breaks an invariant
that `browserContext.pages` always has all pages (and *browsing contexts* - not to be confused with *browser contexts*), associated with browser context. This invariant will be especially important when we move
user agent emulation to browser-side.

This patch makes `PageTarget` lifecycle symmetrical:
- `PageTarget` instance is created when tab is opened
- `PageTarget` is destroyed when tab is crashed or closed

This should also fix a bunch of race conditions with persistent mode, since sometimes we arrive to the window after its
initialization.

Drive-by: straighten viewport management and put a nice descriptive comment.
2020-09-30 02:10:34 -07:00
Andrey Lushnikov 24bc0e39b8
browser(firefox): remove the hack around setting viewport size (#4010)
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 #3995
2020-09-30 00:36:46 -07:00
Yury Semikhatsky 25b199b40a
browser(firefox): fix screencast start event for popups (#3834) 2020-09-10 14:37:48 -07:00
Yury Semikhatsky d64d0025a4
browser(firefox): fix screencast in first window on mac headful (#3826)
* browser(firefox): fix screencast in first window on mac headful

* Revert only
2020-09-10 00:40:56 -07:00
Yury Semikhatsky 17077fd901
browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
Yury Semikhatsky 5ba0254c99
browser(firefox): make sure response is sent when context is closed (#3553) 2020-08-20 13:26:04 -07:00
Yury Semikhatsky 854d755db5
browser(firefox): make context close wait for sessions to finish (#3550) 2020-08-20 11:04:57 -07:00
Yury Semikhatsky f13cebc66d
browser(firefox): remove redundant checks for PageTarget._browserContext (#3541) 2020-08-19 15:39:46 -07:00
Yury Semikhatsky df50660458
browser(firefox): make tab close listener sync again (#3533) 2020-08-19 12:52:43 -07:00
Yury Semikhatsky 73cd6ecef3
browser(firefox): add screencast control methods to context (#3530) 2020-08-19 12:43:53 -07:00
Andrey Lushnikov a225447653
browser(firefox): introduce global proxy (#3335)
This will be used instead of messing up user preferences for proxy
setup.
2020-08-07 15:38:06 -07:00
Andrey Lushnikov ca3bd5e2ef
browser(firefox): roll Firefox to June, 24 (#3327)
Review URL: 83e6f0114e

References #3215
2020-08-06 10:32:50 -07:00
Yury Semikhatsky baaa65492b
browser(firefox): resize window when changing viewport (#2861) 2020-07-07 14:04:07 -07:00
Yury Semikhatsky 6aef045fd4
browser(firefox): create new window for each new page (#2823) 2020-07-02 14:46:57 -07:00