Commit graph

41039 commits

Author SHA1 Message Date
bors-servo
d64f7d427a
Auto merge of #26105 - servo:layout-2020-less-opaque, r=emilio
Make DOM own the style and layout data, in an UnsafeCell
2020-04-04 09:35:34 -04:00
Anthony Ramine
185a402d9c Make DOM own the style and layout data, in an UnsafeCell
The previous Cell was a lie.
2020-04-04 13:10:19 +02:00
Anthony Ramine
516e8e0aa6 Don't expose any AtomicRefCell directly from style traits
This lets us experiment with how we store this data on the DOM side.
2020-04-04 13:08:51 +02:00
Anthony Ramine
4c61baee30 Make OpaqueLayoutAndStyleData just a bit less opaque
It now stores a NonNull<dyn Any>.
2020-04-04 13:08:51 +02:00
bors-servo
9972aee81f
Auto merge of #26106 - qrasmont:fix-26088-bhm-opt-in-multiproc, r=gterzian
Check the BHM option before starting it in multi-process mode.

In multi-process mode, if the BHM option is set start with one otherwise don't.

I didn't add a test for this. However if I should I'd be happy to be pointed to where similar tests are done (meaning tests of options yielding the expected state) because I didn't find my way in all those tests.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26088

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are minor enough to not require one.
2020-04-04 06:41:09 -04:00
Quentin Rasmont
8b9390d68c Check the BHM option before starting it in multi-process mode. 2020-04-04 11:01:33 +02:00
bors-servo
f7d3d4a447
Auto merge of #26065 - dralley:fix-motionmark, r=cbrewster,SimonSapin
Don't send empty canvases to WebRender

If any dimension of a canvas is 0, don't try to display it as it causes
problems inside webrender.

Minimal test case available here: https://github.com/servo/servo/issues/21411#issuecomment-605226547

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [x] 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. -->
2020-04-03 13:57:33 -04:00
bors-servo
7ba88247ba
Auto merge of #26102 - servo:rdp, r=paulrouget
Add support for requersting RDP access from generic-worker

Fixes https://github.com/servo/servo/issues/26082

Depends on:

* [x] https://github.com/mozilla/community-tc-config/pull/252
* [x] https://github.com/servo/taskcluster-config/pull/24
* [x] https://github.com/servo/saltfs/pull/997
* [ ] https://github.com/mozilla/treeherder/pull/6265 (for relevant tasks to show up in https://treeherder.mozilla.org/#/jobs?repo=servo-try)
2020-04-03 12:16:12 -04:00
Daniel Alley
61fb84d6a0 Don't send empty canvases to WebRender
If any dimension of a canvas is 0, don't try to render it as it causes
problems inside webrender.
2020-04-03 11:34:04 -04:00
bors-servo
e23fbd25e6
Auto merge of #26101 - servo-wpt-sync:wpt_update_03-04-2020, r=jdm
Sync WPT with upstream (03-04-2020)

Automated downstream sync of changes from upstream as of 03-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-03 10:45:09 -04:00
Josh Matthews
e1af489ea2
Create element-replacement-on-replaced-element.tentative.html.ini 2020-04-03 10:30:01 -04:00
Simon Sapin
5b546dc3c0 Request RDP access from generic-worker for try=windows-rdp 2020-04-03 16:28:49 +02:00
WPT Sync Bot
018bc3f219 Update web-platform-tests to revision c063a8c9acc637e3bd72b719b46e6f2fb627da4a 2020-04-03 11:08:23 +00:00
bors-servo
e66ab111a6
Auto merge of #26094 - servo-wpt-sync:wpt_update_02-04-2020, r=jdm
Sync WPT with upstream (02-04-2020)

Automated downstream sync of changes from upstream as of 02-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-02 12:13:04 -04:00
Josh Matthews
65fd97cce9
Add mac-only failure. 2020-04-02 10:57:34 -04:00
bors-servo
a651bad838
Auto merge of #25447 - teapotd:form-validation, r=jdm
Form constraint validation

It's almost done, there are few things remaining:

- ~Range underflow, range overflow and step mismatch implementation require #25405~
- ~There are some test failures due to missing DOM parts (#25003)~
- ~`pattern` attribute uses JS regexp syntax. Currently I used regex crate, but it's probably incompatible. Should we use SpiderMonkey's regexp via jsapi?~
- Currently validation errors are reported using `println!`. Are there any better options?
- ~["While the user interface is representing input that the user agent cannot convert to punycode, the control is suffering from bad input."](https://html.spec.whatwg.org/multipage/#e-mail-state-(type%3Demail)%3Asuffering-from-bad-input)~

r? @jdm

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11444
- [x] There are tests for these changes
2020-04-02 08:07:30 -04:00
WPT Sync Bot
6b740f0283 Update web-platform-tests to revision 6366ae15c2bc2314adca4321357c68bb468fec98 2020-04-02 11:05:54 +00:00
teapotd
779552ee7d Form constraints validation 2020-04-02 10:16:46 +02:00
bors-servo
e47e884cc7
Auto merge of #26093 - jdm:webxrup, r=jdm
Update webxr.

This brings in an openxr improvement that is necesary for testing prerelease HoloLens images.
2020-04-01 23:54:53 -04:00
bors-servo
b895ccbec4
Auto merge of #26086 - jdm:mozjs-jitspew, r=Manishearth
Support SpiderMonkey jitspew.

This enables developers to diagnose JIT performance issues on desktop and on device by following the steps at https://github.com/servo/servo/wiki/Diagnosing-SpiderMonkey-JIT-issues.
2020-04-01 23:38:13 -04:00
Josh Matthews
ba58df680d Update webxr. 2020-04-01 22:25:35 -04:00
bors-servo
7dcd83f488
Auto merge of #26084 - servo-wpt-sync:wpt_update_01-04-2020, r=servo-wpt-sync
Sync WPT with upstream (01-04-2020)

Automated downstream sync of changes from upstream as of 01-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-01 21:57:58 -04:00
bors-servo
c3d1c28b42
Auto merge of #26085 - utsavoza:ugo/docs/01-04-2020, r=jdm
Use a valid debug option in the example command in the Debugging guide.

<!-- Please describe your changes on the following line: -->
The debug option `dump-layer-tree` used seems maybe irrelevant to the example command, but using one from the existing debug options helps to simply copy/paste the command and see what the example is trying to demonstrate.

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are doc changes exclusively.

<!-- 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. -->
2020-04-01 16:04:28 -04:00
bors-servo
516279e24f
Auto merge of #26074 - jdm:transition-fix, r=SimonSapin
Avoid infinitely looping CSS transitions.

This change addresses the long-standing issue of CSS transitions not ending appropriately. It does not fundamentally change the way we process transitions/animations.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20379
- [x] There are tests for these changes
2020-04-01 15:19:15 -04:00
Josh Matthews
2bb6ab4567 Avoid infinitely looping CSS transitions. 2020-04-01 12:13:52 -04:00
bors-servo
af1ebe79ef
Auto merge of #26083 - servo:layout-2020-more-cleanups, r=jdm
More layout cleanups from the introduction of a lifetime in LayoutDom<T>

What can I say, the follow-up fixes just kept coming to my door one by one, I couldn't just tell them to go away.
2020-04-01 12:05:16 -04:00
Josh Matthews
689b32c6e4 Support SpiderMonkey jitspew. 2020-04-01 11:32:53 -04:00
Utsav Oza
2b71e0cba8 Merge branch 'master' into ugo/docs/01-04-2020 2020-04-01 18:46:29 +05:30
Utsav Oza
d2a0763f38 Use a valid debug option in the Debugging guide 2020-04-01 18:44:41 +05:30
bors-servo
5926577534
Auto merge of #26079 - servo:box-sizing, r=nox
Implement the `box-sizing` property
2020-04-01 07:49:08 -04:00
WPT Sync Bot
d8c042fbb2 Update web-platform-tests to revision 3bf30e8f1c56700c4b48508e876e72cccb7437ed 2020-04-01 10:58:32 +00:00
Anthony Ramine
4e64a1c682 Add some comments and remove obsolete allow attributes 2020-04-01 11:40:56 +02:00
Anthony Ramine
d9e4f7a0ba Introduce more layout helpers to make selection_for_layout be safe 2020-04-01 11:40:56 +02:00
Anthony Ramine
28e5abe606 Introduce <LayoutDom<Element>>::focus_state 2020-04-01 11:40:56 +02:00
Anthony Ramine
295f120425 Make LayoutShadowRootHelpers::get_style_data_for_layout return a &CascadeData
That return type is Sync, which thus means that the method can be safe.
2020-04-01 11:40:55 +02:00
Anthony Ramine
ebd2892158 Make synthesize_presentational_hints_for_legacy_attributes be safe 2020-04-01 11:40:55 +02:00
Anthony Ramine
0c0027ecfd Make LayoutDocumentHelpers::style_shared_lock be safe
StyleSharedRwLock is Sync.
2020-04-01 11:40:55 +02:00
Anthony Ramine
4636507fa1 Move unsafe code out of <LayoutDom<HTMLTextAreaElement>>::value_for_layout 2020-04-01 11:40:55 +02:00
Anthony Ramine
f8af8176de Introduce a bunch of LayoutDom<HTMLInputElement> private helpers
Those help contain the unsafety in most of the actual helpers used by layout.
2020-04-01 11:40:55 +02:00
Anthony Ramine
1cd3d6bd4c Introduce <LayoutDom<HTMLImageElement>>::current_request
This safe helper contains the only source of unsafety from the actual image
layout helpers methods, making them completely safe.
2020-04-01 11:40:55 +02:00
Anthony Ramine
fc07a5147c Make LayoutNodeHelpers::composed_parent_node_ref be safe
For clarity, I introduce <LayoutDom<Element>>::parent_node_ref to contain
the remaining unsafety bits out of composed_parent_node_ref which is more
complex than just a field access.
2020-04-01 11:40:34 +02:00
bors-servo
ef2b9863d1
Auto merge of #26081 - dylan-lom:fix-bootstrap-debian, r=jdm
Add support for Debian in mach bootstrap

<!-- Please describe your changes on the following line: -->

Run apt-get commands (as written for Ubuntu), when `context.distro` is 'Debian GNU/Linux'.

This makes `./mach bootstrap` install dependencies on Debian.

---
<!-- 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 #26080 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

No test is included, I'm unsure how I would add one, since the changes are distro-dependant.

<!-- 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. -->
2020-03-31 23:34:52 -04:00
bors-servo
2c0bbcf2aa
Auto merge of #26077 - jdm:xr-canvas-dirty, r=asajeffrey
webgl: Don't dirty canvas element while in immersive mode.

There are various WebGL APIs that are supposed to trigger a frame composite at the end of the event loop when they're used. We enforce this via dirtying the canvas element and ensuring that reflow occurs for normal content. This is redundant when we're using immersive mode and incurs extra work by the layout thread and compositor that inhibits the immersive rendering performance.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix (part of) #26019
- [x] These changes do not require tests because we do not have infrastructure to test immersive mode on CI.
2020-03-31 22:23:32 -04:00
bors-servo
b3c12ad9b3
Auto merge of #26051 - Manishearth:openxr-context, r=jdm
Hook up new openxr context menu gesture to embedder context menu machinery

Based on https://github.com/servo/servo/pull/26043/

Fixes https://github.com/servo/servo/issues/25797, #26057

https://github.com/servo/webxr/pull/144 needs to land first

Currently when exited the Servo window is blurred, apparently we need to call `Window.Activate` on it.

r? @jdm

cc @paulrouget
2020-03-31 21:13:10 -04:00
Dylan Lom
16bb61bd54 Add support for Debian in mach bootstrap 2020-04-01 11:36:47 +11:00
bors-servo
dd97e6d164
Auto merge of #26076 - jdm:client-rect-cache, r=asajeffrey
Reduce unnecessary layout queries in babylon.js content

Every frame, Babylon.js compares the width property of the webgl canvas element to its clientWidth. This incurs two layout operations every frame - one to get the dimensions of the element, and at the end of the frame to construct a display list and send that to webrender.

These changes introduce the concept of cached layout values which are constructed from the result of layout queries. These cached values are automatically invalidated when a new layout operation takes place, but as long as only the query operations that stored a cached value are used and the DOM is not otherwise dirtied, the cached values will remain valid and no further layout operations will take place.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix (part of) #26019
- [x] These changes do not require tests because we have no infrastructure to test whether or not reflow occurred.
2020-03-31 20:03:51 -04:00
Simon Sapin
4bfe194486 Update WPT expectations 2020-04-01 01:00:14 +02:00
Simon Sapin
08801d94cd Less cloning 2020-04-01 01:00:14 +02:00
bors-servo
75ca3d8198
Auto merge of #26075 - servo:facepalm, r=jdm
Don’t forget to apply the inline-start margin to blocks 🤦
2020-03-31 17:44:51 -04:00
Simon Sapin
c377d9c48e Implement the box-sizing property 2020-03-31 23:43:58 +02:00