Commit Graph

3877 Commits

Author SHA1 Message Date
Dmitry Gozman
de30ee0aa8
fix(oopifs): account for various races between processes (#5320)
Consider the following situation (one among many possible).
- FrameA has an oopif child FrameB;
- FrameA navigates to same-process origin (e.g. about:blank);
- at the same time, FrameC is attached to the FrameB in the
  FrameB's process.

In this case, we get `frameNavigated` event for FrameA, immediately
followed by `frameAttached` event for FrameC. Since we detach all
FrameA's child frames on navigation, including the oopif FrameB,
there is no parent frame for FrameC to attach to.

In general, multiple processes coming from oopif may send their
events in wildly different order, and their view about the frame
tree may not always correspond to the "up to date" frame tree as
seen from the main frame's process. We try to keep our frame tree
aligned with what main process thinks, and ignore events that
reference frames absent in this tree.

Drive-by: handle filechooser exceptions because of async processing.
2021-02-05 11:30:44 -08:00
Yury Semikhatsky
494f0f63cc
docs: update route callback type for java (#5324) 2021-02-05 09:39:03 -08:00
Yury Semikhatsky
28e5975772
docs: define java specific waitFor* methods (#5315) 2021-02-04 21:15:14 -08:00
Dmitry Gozman
0cbb2c14e6
feat(text selector): match text in child nodes (#5293)
This changes `text=` and `:text()` selectors to match the element when:
- it's combined text content matches the text;
- combined text content of any immediate child does not match the text.

This allows the following markup to match "Some bold and italics text":
`<div>Some <b>bold</b> and <i>italics</i> text</div>`.

For the reference, "combined text content" is almost equal to `element.textContent`,
but with some changes like using value of `<input type=button>` or ignoring `<head>`.

This also includes some caching optimizations, meaningful in complex matches
that involve multiple calls to the text engine.

Performance changes (measured on large page with ~25000 elements):
- `:has-text()` - 14% faster.
- `text=` - 50% faster.
- `:text()` - 0-35% slower.
- `:text-matches()` - 28% slower.
2021-02-04 17:44:55 -08:00
Pavel Feldman
c1b08f1a8c
feat(recorder): allow dragging toolbar (#5316) 2021-02-04 14:41:53 -08:00
Joel Einbinder
d1aad632ee
browser(webkit): fix scrolling a second time on linux (#5173) 2021-02-04 12:12:04 -08:00
Anže Vodovnik
ff06399afd
docs(csharp): events convention based naming fix for csharp (#5238)
* docs(gen): Updating events names to camelCase.
* docs(gen): updating generator to match new assumption for event names
* docs(gen): renaming references to events
2021-02-04 19:34:09 +01:00
Anže Vodovnik
cf96b15051
fix(docs): ignore case when validating order of events and methods (#5309) 2021-02-04 19:19:38 +01:00
Yury Semikhatsky
997bd0827c
feat(webkit): bump to 1432 (#5300) 2021-02-04 08:53:00 -08:00
Pavel Feldman
c2b8718bae
fix(waitForFunction): process isFunction auto-detection (#5312) 2021-02-04 08:45:59 -08:00
Pavel Feldman
17986773f8
feat: remove chaining from trace viewer preview (#5265) 2021-02-04 06:24:53 -08:00
Pavel Feldman
dd9b51d68b
chore: friendlier install failure message (#5281) 2021-02-04 06:23:47 -08:00
Joel Einbinder
3126fee780
fix(lint): correctly find api.ts on windows (#5308) 2021-02-04 05:31:59 -08:00
Andrey Lushnikov
3c36322c72
feat(ffmpeg): roll FFMPEG to r1005 (#5303)
Drive-By: update `//utils/roll_browser.js` script to support FFMPEG

References #5278
2021-02-03 21:15:09 -08:00
Andrey Lushnikov
039e7af05f
feat(firefox): roll Firefox to r1228 (#5302) 2021-02-03 20:59:47 -08:00
Andrey Lushnikov
d851bcead7
devops: bundle ffmpeg license file with our archives (#5301)
References #5278
2021-02-03 19:36:10 -08:00
Pavel Feldman
fe2c529fda
docs: complete sentences with full stop (#5298) 2021-02-03 18:25:06 -08:00
Pavel Feldman
9841f6dbcb
chore: remove the 1.8.0a1 mentions (#5297) 2021-02-03 18:10:55 -08:00
Yury Semikhatsky
6ae2e576d8
fix: properly detect function literals (#5296) 2021-02-03 16:56:36 -08:00
Pavel Feldman
847bea2f83
chore: remove force_expr parameter from python api (#5295) 2021-02-03 16:39:08 -08:00
Pavel Feldman
34adc28ed3
feat(pause): make page.pause public (#5288) 2021-02-03 16:01:51 -08:00
Yury Semikhatsky
509c3e91b4
browser(webkit): fix ubuntu 18 compilation (#5294) 2021-02-03 15:54:54 -08:00
Yury Semikhatsky
c0480e5905
docs: skip Respone.json and Request.postDataJSON in Java (#5292) 2021-02-03 15:02:22 -08:00
Yury Semikhatsky
1c65b592d0
docs: use separate options for string and buffer body (#5291) 2021-02-03 14:56:17 -08:00
Dmitry Gozman
d8e0834562
fix(server): use setMaxListeners(0) on all internal event emitters (#5283) 2021-02-03 13:53:09 -08:00
Pavel Feldman
3d253c4e5c
feat: auto-detect expression/function in js server (#5284) 2021-02-03 13:49:25 -08:00
Dmitry Gozman
fa1cf4108b
fix(codegen): do not show recorder controls in iframes (#5282) 2021-02-03 13:42:29 -08:00
Yury Semikhatsky
080a9529b3
docs: rename Route.continue_ to Route.resume in java and C# (#5290) 2021-02-03 13:40:58 -08:00
Yury Semikhatsky
6c44a781c7
docs: make Request.failure return string by default (#5289) 2021-02-03 13:33:46 -08:00
Yury Semikhatsky
a8425d33dd
docs: change Accessibility.snapshot type to string in java and c# (#5287) 2021-02-03 12:23:02 -08:00
Yury Semikhatsky
eee2d02290
docs: change Accessibility.snapshot type to string in java and c# (#5286) 2021-02-03 12:19:25 -08:00
Dmitry Gozman
53ed35ef96
feat(dialogs): auto-dismiss dialogs when there are no listeners (#5269)
This makes dialogs disappear and prevents stalling.

Pros:
- No need to worry about dialogs for most users.
- Those that wait for a specific dialog still get to control it.

Cons:
- Those who use Playwright to show interactive browser will have
  to add an empty 'dialog' handler to prevent auto-dismiss.
  We do this in cli.
2021-02-03 10:34:45 -08:00
Andrey Lushnikov
bbfbb1b2f7
browser(firefox): fix build on Windows (#5275) 2021-02-03 09:50:35 -08:00
Andrey Lushnikov
cb1b64289c
devops: downloading ffmpeg during install step (#5249)
This patch starts downloading FFMPEG like we download our browsers
instead of bundling it in the NPM package.

With this patch, NPM size is reduced from 8.8MB to 1.7MB.

Consequences:
- `npx playwright` is drastically faster now
- playwright driver for language bindings is way smaller
- projects that bundle Playwright can pass Apple Notorization

Fixes #5193
2021-02-03 09:19:11 -08:00
Yury Semikhatsky
9d72d6b625
browser(webkit): roll to 02-03-21 (#5277) 2021-02-03 09:17:21 -08:00
Dmitry Gozman
4cad34509f
fix(oopifs): do not emulate focus in oopifs (#5270)
- We don't need this, since it should propagate from the main frame.
- Forcing focus in oopif immediately focuses it and blurs currently
  focused frame. This leads to undesired side effects, e.g. selects
  being closed.
2021-02-03 08:47:52 -08:00
Andrey Lushnikov
985dd5666f devops(chromium): fix chromium linux build 2021-02-03 07:35:29 -07:00
Andrey Lushnikov
8d4dc600f8 devops(firefox): properly cleanup old node.js artifact 2021-02-02 23:59:33 -07:00
Andrey Lushnikov
986bddaecc devops(firefox): fix arm build dependency management 2021-02-02 23:03:54 -07:00
Andrey Lushnikov
11f570be61
devops(firefox): fix Firefox on Apple Silicon (#5272)
As per guide at https://docs.google.com/document/d/1N5yfEVEISofMmjAxfj3xXONGwyQYBSilsfXqux_M6TM/edit
2021-02-02 21:53:23 -08:00
Andrey Lushnikov
b392c57a53
devops: attempt to install Firefox build deps on buildbots (#5271) 2021-02-02 21:35:12 -08:00
Yury Semikhatsky
4cd0d3e5da
docs: change StorageState type to string in java and C# (#5268) 2021-02-02 17:48:32 -08:00
Dmitry Gozman
1a464c732c
feat(video): switch vp8 in ffmpeg to realtime (#5260)
This switches vp8 to "realtime" mode that works fast, adapting to
the speed of incoming frames, and produces the best quality in can
given realtime constraints.

In practice, this gives 2x larger video files but no noticible quality
difference. It also eliminates huge delays for encoding the video.

Drive-by: document our ffmpeg option choices and add some links
to documentation for future use.
2021-02-02 17:14:39 -08:00
Yury Semikhatsky
1ffd654d63
browser(webkit): roll to 02-02-21 (#5263) 2021-02-02 15:20:35 -08:00
Pavel Feldman
8a8d8ea370
fix: update terminal size dynamically (#5250) 2021-02-02 14:25:51 -08:00
Dmitry Gozman
d96c547389
docs: note that user data dir is a parent of profile path (#5262)
Copied from https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#current-location
to help users that copy "Profile Path" to be used as user data dir.
2021-02-02 13:28:41 -08:00
Dmitry Gozman
6c12f58058
feat(selectors): always make xpath relative (#5252)
This makes `/foo` and `//foo` match starting with the scope,
not the document, by turning them into `./foo` and `.//foo`.
2021-02-02 13:27:16 -08:00
Yury Semikhatsky
e0f41bf1fd
docs: change default return type of Response.finished to string (#5261) 2021-02-02 12:18:05 -08:00
Yury Semikhatsky
c51a1f96e5
docs: update type of env in the remaining places (#5254) 2021-02-02 10:57:22 -08:00
Yury Semikhatsky
cee394d6e0
docs: split ignoreDefaultArgs into 2 options for java (#5251) 2021-02-02 10:46:36 -08:00