Commit Graph

58 Commits

Author SHA1 Message Date
Andrey Lushnikov
6c5317bd31
chore: update browser patches as of Dec 13, 2022 (#20297) 2023-01-23 11:29:48 -08:00
Andrey Lushnikov
e4be1266a9
browser(firefox-stable): roll Firefox to 104.0 (#16784)
References #16780
2022-08-23 15:13:06 -07:00
Dmitry Gozman
94efeed192
browser(firefox): make scrollIntoViewIfNeeded and getContentQuads work with display:contents (#16111) 2022-08-01 14:40:23 -07:00
Andrey Lushnikov
e9d66535ba
browser(firefox): move screenshots to browser-side (#15230)
* `clip` option is always passed from the client code
* with this change, we can no longer capture screenshot of a blinking
  caret; the browser-side API doesn't have this capability.
2022-07-06 15:02:48 -07:00
Andrey Lushnikov
530867e8ab
browser(firefox): report unhandled rejections for Firefox (#15391)
References #14165
2022-07-05 15:46:28 -07:00
Andrey Lushnikov
8a8bdec87d
browser(firefox): roll Firefox Stable to 102 (#15321)
This roll:
- NetworkObserver now uses the `remote's` ChannelEventSink layer to
  subscribe to redirects.
- Wheel events now must be dispatched from browser process.
- There's a new API for console messages
- The old methods to wait for search service and addon manager no longer
  work; speculatively remove them since neither `remote` nor
  `marionette` have anything like this.

Native manual merge: 9e6fcfd868
2022-07-05 08:20:01 -07:00
Dmitry Gozman
141093a1cd
browser(firefox): a11y haspopup is a string, not a boolean (#15056) 2022-06-22 17:01:13 -07:00
Andrey Lushnikov
7b0505d610
browser(firefox): roll Firefox to 100.0.2 (#14492) 2022-05-31 00:54:36 -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
08d31965c6
browser(firefox): ignore console events with attached exception (#10581) 2021-11-29 17:55:15 +01:00
Andrey Lushnikov
0fa8073ab6
browser(firefox): fix input composition when TIP is stolen by user (#10238)
When firefox is automated + interacted with manually, input composition
might get stolen from Text Input Processor.

Re-requiring TIP every time seems to fix this.

References #5460
2021-11-11 10:23:00 -08:00
Andrey Lushnikov
5901cb321d
browser(firefox): fix file chooser in iframes #8510 (#8510)
References #8016
2021-08-27 09:28:24 -07:00
Joel Einbinder
f7950352b9
browser(firefox): Page.dispatchWheelEvent (#8439) 2021-08-25 11:27:12 -04:00
Andrey Lushnikov
75dfc15e62
browser(firefox): roll to new Firefox Stable M91 (#8130) 2021-08-10 17:37:57 -07:00
Max Schmitt
9b9091b3fe
browser(firefox): fixed Array.prototype.toJSON workaround (#7018)
References #7015
2021-06-10 17:21:20 -07:00
Max Schmitt
226159defc
browser(firefox): forced-colors media query emulation (#6902) 2021-06-09 01:00:15 +02:00
Yury Semikhatsky
f60b79a311
browser(firefox): do not use Array.prototype.toJSON for serialization (#6767) 2021-05-26 15:38:53 -07:00
Max Schmitt
c4a6c2bcab
browser(firefox): added reduced motion emulation (#6618) 2021-05-18 21:23:12 +02:00
Joel Einbinder
5b223f92c8
browser(firefox): Browser.setScrollbarsHidden (#6457) 2021-05-14 08:06:34 -07:00
Yury Semikhatsky
84031d4a07
browser(firefox): simplify isolated world structures (#6521) 2021-05-12 08:52:08 -07:00
Yury Semikhatsky
f8039bed10
browser(firefox): bindings in isolated worlds (#6493) 2021-05-11 09:27:39 -07:00
Dmitry Gozman
f1a65820f4
browser(firefox): fix addBinding on pages with CSP (#6470) 2021-05-08 18:06:56 -07:00
Yury Semikhatsky
b0fae0f831
browser(firefox): merge FrameData into Frame (#6365) 2021-04-29 15:09:10 -07:00
Andrey Lushnikov
d662eba86a
browser(firefox): roll Firefox to beta @ Apr 1, 2021 (#6041)
Merging conflicts:
038f367c30

After this roll, we no longer require our custom `onFrameLocationChanged` instrumentation
since gecko now fixed the `NOTIFY_LOCATION` behavior so that it works
for same-document navigations inside iframes.
2021-04-01 16:49:01 -07:00
Dmitry Gozman
66541552d0
browser(firefox): make dpr emulation optional, take screenshots at 1x (#5555)
- deviceScaleFactor is now optional, so we can use host machine's dpr.
- Screenshots are not scaled up by dpr.
- Removed unused methods.
2021-04-01 14:51:02 -07:00
Andrey Lushnikov
cb15603ccb
browser(firefox): do not report console messages twice. (#6031)
References #6001
2021-04-01 09:29:33 -07:00
Joel Einbinder
e56f56c11e
browser(firefox): pass null for the data transfer (#5723) 2021-03-04 17:20:45 -08: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
Joel Einbinder
e677e7ba4e
browser(firefox): pass drag action test (#5560) 2021-02-23 15:21:29 -08:00
Joel Einbinder
d06afadb8b
browser(firefox): send dragend after drop and survive navigations (#4506) 2020-11-25 03:47:34 -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
Joel Einbinder
e91140e88c
browser(firefox): force a layout before dispatching a tap (#4428) 2020-11-16 11:07:06 -08:00
Dmitry Gozman
ae738c1fac
browser(firefox): ignore WebProgress events coming from workers (#4380)
Somehow, we get WebProgress state changes when worker is loaded
with a blob url. This messes up frame navigation detection.

Luckily, it's easy to filter out non-document state changes.
2020-11-09 09:29:34 -08:00
Andrey Lushnikov
c522a0dfba
browser(firefox): force always active docshell (#4363)
This forces active docshell for all content processes.

References #4208
2020-11-05 17:53:22 -08:00
Andrey Lushnikov
2b495c9750
browser(firefox): fix SimpleChannel to await initialization (#4311)
As Joel noticed recently, MessageManager in firefox doesn't guarantee
message delivery if the opposite end hasn't been initialized yet. In
this case, message will be silently dropped on the ground.

To fix this, we establish a handshake in SimpleChannel to make sure that
both ends are initialized, end buffer outgoing messages until this
happens.

Drive-by: serialize dialog events to only deliver *after* the
`Page.ready` protocol event. Otherwise, we deliver dialog events to the
unreported page.
2020-11-02 16:21:34 -08:00
Andrey Lushnikov
18c3efe79e
browser(firefox): instrument websockets (#4287) 2020-10-29 16:33:50 -07:00
Joel Einbinder
4f7d65fe9c
browser(firefox): report pageerrors without stack properties (#4166) 2020-10-19 02:23:53 -07:00
Joel Einbinder
a4474f6752
browser(firefox): Page.dispatchTapEvent (#4101) 2020-10-13 12:24:11 -07:00
Andrey Lushnikov
1ccce09a02
browser(firefox): roll Firefox to beta Oct 7, 2020 (#4087)
References #3995
2020-10-07 14:12:19 -07:00
Andrey Lushnikov
3b4232864d
browser(firefox): a different way to emit 'load' event (#4080)
Using WebProgressListener events works in all cases. Currently
used `pageshow` event will stop being emitted in future when loading
was stopped with `window.stop()` api.

References #3995
2020-10-07 09:22:56 -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
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
2631e1a809
browser(firefox): use browsingContextID for frame IDs (#3999)
BrowsingContextIDs are consistent across the processes, so we can use
them to target frames in both browser and content processes. This will
aid browser-side navigation.

As a nice side-effect, we can drop a round-trip to the content process
for every `requestWillBeSent` event since we *almost* always can
attribute all network events to the proper parent frames.

I say "almost", because we in fact **fail** to correctly attribute requests
from workers that are instantiated by subframes. This, however, is
not working in Chromium ATM, so I consider this to be a minor regression
that is worth the simplification.
2020-09-29 11:22:00 -07:00
Joel Einbinder
abb50a79bd
browser(firefox): fix request frame attribution (#3657)
Firefox will sometimes send multiple requests with the same http channel id. When a frame is loaded, the favicon is requested in the parent frame, but with the same channel id. This can cause the document request to report the wrong frame, causing the test 'should capture iframe navigation request' to fail. It fails consistently on my computer.

This patch adds the content policy type into the http channelId to better distinguish requests. Maybe there is something better we can do? It looks like we use channelId has request ids, so there might be more bugs with these favicon requests in playwright?
2020-08-28 17:55:05 -07:00
Dmitry Gozman
da95b73b59
browser(firefox): emit iframe lifecycle when initial navigation fails (#3389) 2020-08-11 16:05:34 -07:00
Joel Einbinder
3e023f6c3d
Revert "browser(firefox): fix color scheme not updating until reload" (#3198) 2020-07-28 13:46:37 -07:00
Joel Einbinder
549a37b939
browser(firefox): fix color scheme not updating until reload (#3157) 2020-07-24 16:01:45 -07:00