Commit graph

23704 commits

Author SHA1 Message Date
Josh Matthews
66b2b3293d webgl: Fix active uniform block length check. 2020-04-07 16:16:05 -04:00
Istvan
62f00df79d Add initial support for VertexAttribI4*, VertexAttribIPointer
Adds initial support for the WebGL2 `VertexAttribI4i`, `VertexAttribI4iv`, `VertexAttribI4ui`, `VertexAttribI4uiv` and `VertexAttribIPointer` calls.
2020-04-07 15:01:39 -04:00
bors-servo
2002f490ef
Auto merge of #26130 - Manishearth:euclidup, r=nox
Update euclid

r? @nox @jdm
2020-04-07 11:51:38 -04:00
Manish Goregaokar
fccfff11c5 Update euclid 2020-04-07 08:51:08 -07:00
bors-servo
d8781c1054
Auto merge of #26120 - servo:layout-2020-non-opaque-style-data, r=SimonSapin
Remove postorder traversal from layout 2020 during styling
2020-04-07 10:38:16 -04:00
Anthony Ramine
c10e839924 Don't go through the layout thread to retrieve a node's primary style 2020-04-07 14:34:47 +02:00
bors-servo
95da6dbd6d
Auto merge of #26104 - tipowol:fix-23704, r=paulrouget
Update parse_length to match spec

<!-- 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 #23704
- [x] There are tests for these changes

<!-- 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-07 08:04:39 -04:00
bors-servo
f3aa7f7144
Auto merge of #26126 - dralley:fix-motionmark, r=jdm
Fix misspelled "get_suported_extensions" function

closes #21122
2020-04-06 20:31:29 -04:00
bors-servo
8126c9d268
Auto merge of #26116 - tipowol:fix-26007, r=jdm
Add InRealm argument to Callback trait

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26007
- [x] There are tests for these changes
2020-04-06 18:15:49 -04:00
Anthony Ramine
030a1cf8fb Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutData 2020-04-06 23:06:13 +02:00
Daniel Alley
d0890db479 Fix misspelled "get_suported_extensions" function
closes #21122
2020-04-06 13:50:49 -04:00
Utsav Oza
2c306227e9 Extract user_agent from global opts 2020-04-06 21:29:58 +05:30
Anthony Ramine
88d79fe46d Remove postorder traversal from layout 2020 during styling 2020-04-06 12:40:05 +02:00
Anthony Ramine
e3be136c9b Rename a bunch of style/layout data items
GetLayoutData::get_style_and_layout_data becomes
GetOpaqueStyleAndLayoutData::get_opaque_style_and_layout_data.

GetRawData::get_raw_data becomes GetStyleAndLayoutData::get_style_and_layout_data.

LayoutNode::init_style_and_layout_data becomes
LayoutNode::init_opaque_style_and_layout_data.

LayoutNode::take_style_and_layout_data becomes
LayoutNode::take_opaque_style_and_layout_data.
2020-04-06 12:39:52 +02:00
bors-servo
3df65c02fe
Auto merge of #26113 - servo:layout-2020-rm-random-unsafe-removals-cause-i-am-bored, r=emilio
Drive-by refactoring of some unsafe code in stylo

Some stuff I found while thinking about other things between stylo and layout.

Third commit requires Gecko changes because I removed `From<u32>` for `FontLanguageOverride` and replaced it by the unsafe `FontLanguageOverride::from_u32` method.
2020-04-06 01:40:14 -04:00
Tipowol
8a3bf880e9 Add InRealm argument to Callback trait 2020-04-05 19:54:30 +02:00
bors-servo
ae49473c25
Auto merge of #26087 - gterzian:allow_service_workers_in_multiprocess, r=jdm
Fix ServiceWorker in multiprocess

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

FIX #15217
FIX #26100

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./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: -->
- [ ] 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-05 11:02:08 -04:00
Gregory Terzian
1e017a7082 allow for a service worker network mediator per origin 2020-04-05 22:43:37 +08:00
Gregory Terzian
db217d5575 allow for a service worker manager per origin 2020-04-05 22:43:40 +08:00
Anthony Ramine
94ee8b34ca Rearrange FontLanguageOverride
Creating one from a u32 should be unsafe because we rely on the fact that the
value is a valid &str.
2020-04-05 01:20:39 +02:00
Anthony Ramine
e7cb736796 Replace ScopedTLS::unsafe_get by ScopedTLS::into_slots
We only ever look at the slots after we are done with the thread pool,
so we don't need to expose any unsafety to inspect the slots.
2020-04-05 01:20:39 +02:00
Anthony Ramine
5d6c5132c1 Don't use transmute to create PaintOrder values
I checked that rustc optimises the code just as well as with the transmute.

https://rust.godbolt.org/z/w6UJN4
2020-04-04 20:29:25 +02:00
bors-servo
57fe27a4ef
Auto merge of #26110 - servo:layout-2020-rm-note-dirty-descendant, r=emilio
Kill ServoLayoutElement::note_dirty_descendant
2020-04-04 09:51:19 -04:00
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
8a0775fc89 Kill ServoLayoutElement::note_dirty_descendant
There is no need to set the dirty descendants flag unsafely from the layout side
for elements with pending restyles, we can do that on the DOM side when draining
the restyles from the Document.
2020-04-04 15:00:04 +02: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
Tipowol
94f08adfc7 Update parse_length to match spec 2020-04-03 21:32:02 +02: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
teapotd
779552ee7d Form constraints validation 2020-04-02 10:16:46 +02: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
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
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
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
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