Make JNI code more robust and introduce antialiasing option
This throws exceptions in various places. Trying to reduce the amount of unwrap/expect.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#21306 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21871)
<!-- Reviewable:end -->
We use that to send only the pixels that will be actually drawn to the
canvas thread in CanvasRenderingContext2d::PutImageData.
We also make the canvas thread byte swap and premultiply colours in-place.
The tarball for 0.4.1 is 44 KB uncompressed and contains 18 files.
The tarball for 0.4.0 is 45 MB uncompressed and contains 22113 files,
most of which appear to be the output of `cargo doc` that was accidentally
included in a release.
Fix flickering on Android
This is particularly noticeable in debug builds on WebGL pages, but also appears during startup when loading normal pages. requestRender() causes Android to swap buffers under the assumption that the buffer contains a fully rendered frame, but when calling it from `doFrame` there are no guarantees that Servo has finished compositing yet. This causes stale buffers to be composited instead, leading to flickering at startup when there is no content, or general jerkiness on pages using animation callbacks as previous frames replace current frames.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#21796
- [x] These changes do not require tests because no android integration tests.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21842)
<!-- Reviewable:end -->
Create a Maven repository on package
This new step will go through all the *release* builds of the servoview AAR, and create a maven repo (just a tree of directories) with the relevant POM files under `target/gradle/servoview/maven`.
For example, after building for armv7 and x86, it looks like this:
```
/Users/paul/git/servo/target/gradle/servoview/maven
└── org
└── mozilla
└── servoview
├── servoview-armv7
│ ├── 0.0.1.20181002
│ │ ├── servoview-armv7-0.0.1.20181002.aar
│ │ ├── servoview-armv7-0.0.1.20181002.aar.md5
│ │ ├── servoview-armv7-0.0.1.20181002.aar.sha1
│ │ ├── servoview-armv7-0.0.1.20181002.pom
│ │ ├── servoview-armv7-0.0.1.20181002.pom.md5
│ │ └── servoview-armv7-0.0.1.20181002.pom.sha1
│ ├── maven-metadata.xml
│ ├── maven-metadata.xml.md5
│ └── maven-metadata.xml.sha1
└── servoview-x86
├── 0.0.1.20181002
│ ├── servoview-x86-0.0.1.20181002.aar
│ ├── servoview-x86-0.0.1.20181002.aar.md5
│ ├── servoview-x86-0.0.1.20181002.aar.sha1
│ ├── servoview-x86-0.0.1.20181002.pom
│ ├── servoview-x86-0.0.1.20181002.pom.md5
│ └── servoview-x86-0.0.1.20181002.pom.sha1
├── maven-metadata.xml
├── maven-metadata.xml.md5
└── maven-metadata.xml.sha1
```
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21851)
<!-- Reviewable:end -->
Enable fake fillText API in nightly builds.
The [three.js examples](https://threejs.org/examples/) are really useful for checking Servo WebGL support, but if the fillText API is not available they only display a blank screen. I think it's worth lying to web content about this API in order to make it easy to make use of these examples without using local development builds.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21826)
<!-- Reviewable:end -->
Optional backtraces for JS errors and WebGL errors
This adds two new build-time features to enable useful debugging tools when investigating why JS and WebGL content isn't working. They're optional because they're quite heavyweight.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they're optional developer features.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21825)
<!-- Reviewable:end -->
Warn when using slow WebGL code path.
This will make it more obvious when one source of WebGL performance problems is present.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21828)
<!-- Reviewable:end -->
Fix appveyor build
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#21832
- [x] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21833)
<!-- Reviewable:end -->
Update Constellation to track focused BrowsingContext instead of Pipeline
<!-- Please describe your changes on the following line: -->
I need confirmation as to whether I understand this correctly, but I don't think tracking the focused browsing context instead of the pipeline introduces the benefits described in the issue, because if the focused browsing context is an iframe nested in a document that is being changed, we need to change focus to the browsing context whose current document is being changed, i.e. above the currently focused iframe. Is this correct?
However, I think we may be able to save the slightly expensive iteration over a frame tree (which is needed to check if the currently focused browsing context is nested within the one where the page is being loaded) when the [EDIT] focused browsing is the top-level browsing context, as in this case the load doesn't change the focus. I haven't implemented this as I'm unsure whether this is correct.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#15507 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because because no new behaviour was introduced.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21713)
<!-- Reviewable:end -->