Commit Graph

735 Commits

Author SHA1 Message Date
Yury Semikhatsky
5648eac063
browser(webkit): fix mac build after last roll (#4108) 2020-10-09 16:11:50 -07:00
Yury Semikhatsky
db744e28ee
browser(webkit): roll to 10/08 (#4106) 2020-10-09 14:43:36 -07:00
Yury Semikhatsky
b85ba62291
browser(webkit): actually fix mac compilation (#4105) 2020-10-09 13:06:25 -07:00
Yury Semikhatsky
d6a198a9bb
browser(webkit): speculative build fix for Mac (#4104) 2020-10-09 11:13:02 -07:00
Yury Semikhatsky
8252eb7413
browser(webkit): roll to 09-27 (#4103) 2020-10-09 09:32:36 -07:00
Joel Einbinder
e2f77455dd
browser(chromium): roll to 815036 (#4098) 2020-10-08 22:03:39 -07:00
Darío Kondratiuk
ff295d10e6
fix(windows): fix dependencies check on windows (#4076) 2020-10-08 09:45:53 -07:00
Andrey Lushnikov
6a7d24469a
devops: fix firefox build (#4088)
New firefox build requires a pre-created python virtual environment.
We should detect it and create if necessary.

References #3995
2020-10-07 14:34:58 -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
6beef551d9
browser(firefox): wait for search and addon manager initialization (#4081)
It looks like terminating browser when search service or addon manager is
not fully initialized results in a broken shutdown sequence. As of
today, this results in multiple errors in the browser STDERR. In future,
this might also result in browser stalling instead of terminating.

This starts awaiting search and addon manager termination.

References #3995
2020-10-07 10:24:16 -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
e6869edf98
browser(firefox): fix typo in dispatcher teardown (#4069) 2020-10-06 12:06:50 -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
Pavel Feldman
857abcfc10
browser(firefox): make pipe work on Windows (#4058) 2020-10-05 10:58:56 -07:00
Dmitry Gozman
a7beaf657c
browser(chromium): roll to 813607 (#4052) 2020-10-05 04:23:35 -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
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
Yury Semikhatsky
c4a2732515
browser(webkit): another mac fix (#3948) 2020-09-21 19:03:44 -07:00
Yury Semikhatsky
ce51af0509
brower(webkit): add missing override markers (#3947) 2020-09-21 17:59:11 -07:00
Yury Semikhatsky
2fbe767142
browser(webkit): roll to 09/21 (#3945) 2020-09-21 16:04:38 -07:00
Andrey Lushnikov
2693c162b8
devops(ffmpeg): compile zlib dependency that is needed for ffmpeg (#3940)
This patch adds zlib compilation that is required for ffmpeg.
2020-09-21 14:54:22 -07:00
Pavel Feldman
731560ccbc
browser(chromium): roll to v808777 (#3941) 2020-09-21 14:40:26 -07:00
Andrey Lushnikov
ee7c6230ae
devops: compile ffmpeg with support of video splitting (#3938) 2020-09-21 12:02:47 -07:00
Andrey Lushnikov
9de39b1e85
devops: hardcode build number in winldd executable (#3923)
This will allow us to trace builds back to source code.
2020-09-18 14:51:08 -07:00
Andrey Lushnikov
bff9fb21ec devops: fix winldd build 2020-09-18 11:30:53 -06:00
Andrey Lushnikov
6af0aa6763 devops: notify when winldd is built 2020-09-18 11:26:59 -06:00
Andrey Lushnikov
fda31dfca2
devops: build winldd on buildbots (#3917)
This patch:
- moves PrintDepsWindows folder to `//browser_patches/winldd`
- adds `build.sh`, `archive.sh`, `clean.sh` and `BUILD_NUMBER` to
  power builds on buildbots
- starts building `winldd-win64` on windows buildbot
2020-09-18 09:43:43 -07:00
Andrey Lushnikov
e4e3f82337
devops: fix ffmpeg linux build (#3884)
The `PKG_CONFIG_PATH` variable is important since it is needed
to resolve `.pc` library files.
2020-09-14 17:46:07 -07:00
Andrey Lushnikov
2a66f8a066
devops: build ffmpeg for linux (#3880) 2020-09-14 15:12:35 -07:00
Yury Semikhatsky
b8e90a5582
browser(webkit): duplicate each frame duration times (#3856) 2020-09-11 13:48:39 -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
Andrey Lushnikov
3124a1b600
devops: fine-tune ffmpeg compilation (#3823)
This patch:
- removes `--enable-gpl` and `--enable-version3` flags. This defaults
builds to LGPL2 license
- includes `--disable-autodetect` to ensure determenism
- includes extra version suffix to link from binary files back to these
build scripts
2020-09-09 18:43:38 -07:00
Andrey Lushnikov
29b809887e
devops: fix running docker when executed from cronjob (#3822)
Turns out docker doesn't like faking terminal if STDIN is not attached
to a real terminal.
2020-09-09 17:27:14 -07:00
Andrey Lushnikov
245d1001b1
devops: produce ffmpeg builds on bots (#3820)
This patch moves FFMPEG building to buildbots:
- `ffmpeg-mac.zip` is built on Mac 10.14 machine
- `ffmpeg-win32.zip` and `ffmpeg-win64.zip` are cross-compiled on
  Ubuntu 20.04 machine

All builds across the platforms share the same config:
- the same versions of `ffmpeg` and `libvpx`
- the same build configuration for both `ffmpeg` and `libvpx`

The config could be found in the `//browser_patches/ffmpeg/CONFIG.sh`.

The builds will be then copied manually and committed to the git
repository.
2020-09-09 17:05:08 -07:00
Andrey Lushnikov
6c83266047
browser(firefox): force firefox devtools to open in a separate window (#3816)
References #3470
2020-09-09 09:36:32 -07:00
Dmitry Gozman
5364c6acbc
browser(firefox): fix automatic http->https redirect (#3812)
browser(firefox): fix automatic http->https redirect

Sometimes, Firefox does an automatic http->https redirect without hitting
the network (e.g. for http://wikipedia.org). In this case, the http request
is very strange:
- it does not actually hit the network;
- it is never intercepted;
- we cannot access its response because there was no actual response.

So, we had a bug where:
- redirects inherited the original request's listener;
- that listener was throwing an error.
This lead to the error in the listeners onDataAvailable call chain,
and original listener that renders the response was never called,
resulting in an empty page.

This change:
- ignores the original request that did not hit the network;
- does not inherit the listener;
- adds try/catch around problematic calls.
2020-09-09 09:16:03 -07:00
Andrey Lushnikov
b8d7f398b8
browser(chromium): mirror Chromium r799411 to Azure (#3808) 2020-09-08 17:19:14 -07:00
Andrey Lushnikov
638c77c8e2
devops: stop bundling FFMPEG with Chromium (#3806)
- This stops bundling FFMPEG with Chromium
- Stop supporting build numbers as fractional parts for Chromium
revisions
2020-09-08 17:05:21 -07:00
Yury Semikhatsky
a5a563659b
browser(webkit): fix basic screencast for accelerated compositing on win (#3803) 2020-09-08 16:00:51 -07:00
Yury Semikhatsky
1d4601b479
browser(webkit): fix screencast scale on Mac headful (#3797) 2020-09-08 14:22:33 -07:00
Andrey Lushnikov
bcb4944f1b
devops: auto-detect platform in //browser_patches/chromium/build.sh (#3772)
If there's no platform specified for the chromium build, we should
detect the host platform.

This will make it pleasant to verify Chromium rolls locally.
Assuming there's a `CR` env variable pointing to the local chromium,
rolling would look like this:

- bump a revision in `//browser_patches/chromium/BUILD_NUMBER`
- run `//browser_patches/chromium/build.sh`
- run tests with pulled chromium: `CRPATH=$CR npm run ctest`
2020-09-04 04:23:13 -07:00
Andrey Lushnikov
f09145e504 chore: fix typo in build script 2020-09-04 03:16:46 -07:00
Andrey Lushnikov
3cb3c650df
chore: build Chromium version with ffmpeg (#3770) 2020-09-04 03:14:29 -07:00