Commit graph

40916 commits

Author SHA1 Message Date
Anthony Ramine
4279fe5933 Fix LayoutElementHelpers::get_classes_for_layout
It should not return a 'static reference
2020-03-30 13:07:27 +02:00
Anthony Ramine
05c71dff88 Fix AttrHelpersForLayout
We should never be returning 'static stuff from attrs, that's a big lie.
2020-03-30 13:07:27 +02:00
Anthony Ramine
4a17950331 Make LayoutShadowRootHelpers methods take self 2020-03-30 13:07:27 +02:00
Anthony Ramine
86296b84ff Clean up LayoutShadowRootHelpers::get_style_data_for_layout
Parameter E is unused and the result should be bound by 'dom.
2020-03-30 13:07:25 +02:00
Anthony Ramine
206157dd74 Make LayoutNodeHelpers methods take self 2020-03-29 19:34:22 +02:00
Anthony Ramine
467913acdb Make LayoutElementHelpers methods take self 2020-03-29 19:31:54 +02:00
Anthony Ramine
9b2debe678 Give a lifetime parameter to LayoutDocumentHelpers 2020-03-29 19:29:02 +02:00
Anthony Ramine
f0c98bfa5c Give a lifetime parameter to LayoutCharacterDataHelpers 2020-03-29 19:25:46 +02:00
Anthony Ramine
d87444cb1f Make LayoutCanvasWebGLRenderingContextHelpers methods take self 2020-03-29 17:52:34 +02:00
Anthony Ramine
301acdc309 Make LayoutSVGSVGElementHelpers methods take self 2020-03-29 17:25:00 +02:00
Anthony Ramine
56793f24da Make HTMLTableSectionElementLayoutHelpers methods take self 2020-03-29 17:23:52 +02:00
Anthony Ramine
5d3274c181 Make HTMLTableRowElementLayoutHelpers methods take self 2020-03-29 17:23:31 +02:00
Anthony Ramine
83045c7e68 Make HTMLTableElementLayoutHelpers methods take self 2020-03-29 17:22:47 +02:00
Anthony Ramine
09600301c5 Make HTMLTableCellElementLayoutHelpers methods take self 2020-03-29 17:22:11 +02:00
Anthony Ramine
f794feb6f4 Make LayoutHTMLMediaElementHelpers methods take self 2020-03-29 17:21:38 +02:00
Anthony Ramine
e590251e5f Make LayoutHTMLImageElementHelpers methods take self 2020-03-29 17:20:40 +02:00
Anthony Ramine
1504f35031 Make HTMLIFrameElementLayoutMethods methods take self 2020-03-29 17:19:59 +02:00
Anthony Ramine
668ef35612 Make HTMLHRLayoutHelpers methods take self 2020-03-29 17:19:32 +02:00
Anthony Ramine
fea4a2e629 Make HTMLFontElementLayoutHelpers methods take self 2020-03-29 17:18:59 +02:00
Anthony Ramine
56ef9b5170 Make LayoutHTMLCanvasElementHelpers methods take self 2020-03-29 17:18:31 +02:00
Anthony Ramine
e7cfd0c409 Make HTMLBodyElementLayoutHelpers methods take self 2020-03-29 17:17:00 +02:00
Anthony Ramine
9d337ea013 Make LayoutCanvasRenderingContext2DHelpers methods take self 2020-03-29 16:08:53 +02:00
bors-servo
15d8c6058b
Auto merge of #26048 - nox:layout-2020-transparent-data, r=jdm
Give a lifetime parameter to LayoutDom
2020-03-28 13:37:31 -04:00
Anthony Ramine
dba6a635e5 Give a lifetime parameter to LayoutDom 2020-03-28 15:37:57 +01:00
Anthony Ramine
60ca98b753 Pass pending restyles instead of draining them from layout 2020-03-28 15:37:56 +01:00
Anthony Ramine
400c7012b1 Make ServoLayoutNode::new return a free lifetime value
Binding the scope of the ServoLayoutNode value to the originating
TrustedNodeAddress is just theater.
2020-03-28 14:06:08 +01:00
Anthony Ramine
df0118dd10 Move PendingRestyle to the style_layout_interface crate 2020-03-28 14:00:53 +01:00
bors-servo
e69de9bc9c
Auto merge of #26053 - servo-wpt-sync:wpt_update_28-03-2020, r=servo-wpt-sync
Sync WPT with upstream (28-03-2020)

Automated downstream sync of changes from upstream as of 28-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-03-28 07:05:57 -04:00
WPT Sync Bot
f4e67a0197 Update web-platform-tests to revision cf8a15a334c6eb3b044b3db8a933436c2365819d 2020-03-28 11:05:43 +00:00
bors-servo
7d66871a9f
Auto merge of #26046 - mrobinson:arcrefcell-hoisting, r=SimonSapin
layout_2020: Use ArcRefCell to track hoisted fragments

This avoids the use of lookup tables for containing blocks when
constructing the stacking context tree.

This seems to catch some laid-out hoisted fragments that were otherwise
dropped in the previous design. The changes cause one new test to pass
and one to fail. Visual examination of the failing tests reveals that
it's a progression (list markers are appearing when they were previously
not rendered).

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

---
<!-- 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 #___ (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-03-27 12:20:08 -04:00
bors-servo
a927f1ad8a
Auto merge of #25998 - jdm:vao-drop, r=nox
Avoid a panic when closing webgl pages using VAOs

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25891
- [x] These changes do not require tests because GC behaviour at shutdown is nondeterministic and difficult to test
2020-03-27 09:55:12 -04:00
Martin Robinson
19f4b708b3 layout_2020: Use ArcRefCell to track hoisted fragments
This avoids the use of lookup tables for containing blocks when
constructing the stacking context tree.

This seems to catch some laid-out hoisted fragments that were otherwise
dropped in the previous design. The changes cause one new test to pass
and one to fail. Visual examination of the failing tests reveals that
it's a progression (list markers are appearing when they were previously
not rendered).
2020-03-27 13:02:22 +01:00
bors-servo
16251cd8db
Auto merge of #26044 - servo-wpt-sync:wpt_update_27-03-2020, r=servo-wpt-sync
Sync WPT with upstream (27-03-2020)

Automated downstream sync of changes from upstream as of 27-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-03-27 07:07:15 -04:00
WPT Sync Bot
932f14ce3a Update web-platform-tests to revision 169a1410bfe8e517d79852144555dd49ea1f597a 2020-03-27 11:07:02 +00:00
bors-servo
ebaa73ddcd
Auto merge of #26042 - jdm:webxrup, r=Manishearth
Update webxr and webxr-api.

This allows us to re-enter immersive mode on HoloLens, and also allows us to test immersive-ar scenes in the glwindow backend.
2020-03-26 19:20:53 -04:00
Josh Matthews
572a9c6e6a Update webxr and webxr-api. 2020-03-26 16:56:25 -04:00
bors-servo
4dbe3b30cd
Auto merge of #26037 - mrobinson:arcrefcell-fragment-tree, r=SimonSapin
layout_2020: Use ArcRefCell in the fragment tree

This will allow mutability which is useful for things like animations.

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

---
<!-- 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 should not change behavior.

<!-- 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-26 10:23:23 -04:00
bors-servo
0ed0c0d9f0
Auto merge of #26029 - paulrouget:uitask, r=jdm
Set user interactions for tasks

fix #26026

I need help here. Retrieving the interaction flag from the promise handle crashes.

```rust
let interaction = GetPromiseUserInputEventHandlingState(promise);
```

```
Stack trace for thread "ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }"
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/libunwind.rs:86
      backtrace::backtrace::trace_unsynchronized
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/mod.rs:66
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
             at ports/glutin/backtrace.rs:49
   2: <&mut W as core::fmt::Write>::write_fmt
   3: std::io::Write::write_fmt
             at /rustc/45ebd5808afd3df7ba842797c0fcd4447ddf30fb/src/libstd/io/mod.rs:1427
   4: servo::backtrace::print
             at ports/glutin/backtrace.rs:17
   5: servo::install_crash_handler::handler
             at ports/glutin/main2.rs:68
   6: <unknown>
   7: _ZN2JS37GetPromiseUserInputEventHandlingStateENS_6HandleIP8JSObjectEE
             at /Users/paul/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/2392ebc/mozjs/js/src/vm/JSObject.h:106
```
2020-03-26 09:15:00 -04:00
Anthony Ramine
04af32128c Add a 'dom lifetime to GetLayoutData 2020-03-26 13:17:46 +01:00
bors-servo
1c7fba31ed
Auto merge of #26039 - servo-wpt-sync:wpt_update_26-03-2020, r=servo-wpt-sync
Sync WPT with upstream (26-03-2020)

Automated downstream sync of changes from upstream as of 26-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-03-26 07:03:16 -04:00
WPT Sync Bot
d23cb97662 Update web-platform-tests to revision 66e7f134c43e83a70edf4028ec4738ddfea28e15 2020-03-26 11:03:03 +00:00
Paul Rouget
5621c887fd Propagate user interacting flag to timers and promises 2020-03-26 08:36:57 +01:00
bors-servo
145c3a5502
Auto merge of #26035 - dralley:test-jquery-py3, r=jdm
Make tests/jquery/run_jquery.py Python3 compatible

Attempt to make it py3 compatible.

Ran the "python-migrate" tool, and did a couple of manual adjustments, which are directly noted with comments below.

re: https://github.com/servo/servo/issues/23607

```
(.env) [dalley@localhost servo]$ python3 ./mach test-jquery
Already up to date.
Testing jQuery on Servo!
	selector
		OK: element - jQuery only
		OK: id
		OK: class - jQuery only
		OK: name
		OK: selectors with comma
		OK: child and adjacent
		OK: attributes
		OK: disconnected nodes
		OK: disconnected nodes - jQuery only
		OK: attributes - jQuery.attr
		OK: jQuery.contains
		OK: jQuery.uniqueSort
		OK: Sizzle cache collides with multiple Sizzles on a page
		FAIL: Iframe dispatch should not affect jQuery (#13936): WAS ok=0 fail=1 total=1 NOW ok=1 fail=0 total=1
	Ran 14 test groups. 1 unexpected results.
	163 tests succeeded of 167 (97.60%)

```

Not sure if the test failure on the last one is an issue.
2020-03-25 15:32:52 -04:00
Daniel Alley
cc18718152 Run py-modernize against tests/jquery/run_jquery.py
Attempt to make it py3 compatible
2020-03-25 15:10:44 -04:00
bors-servo
a9965db69f
Auto merge of #26005 - jdm:hubs-csp, r=nox
Update content-security-policy.

This allows hubs.mozilla.org to load instead of panicking due to unimplemented CSP features.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24702
- [x] These changes do not require tests because we never enabled the CSP testsuite
2020-03-25 13:33:23 -04:00
Martin Robinson
7cb0069be5 layout_2020: Use ArcRefCell in the fragment tree
This will allow mutability which is useful for things like animations.
2020-03-25 17:57:17 +01:00
bors-servo
2d055cbf6b
Auto merge of #26030 - paulrouget:delayedToaster, r=jdm
UWP: Add a devtools button

fix #26027

Shows the toaster when the button is clicked, instead of showing the toaster at startup.
2020-03-25 10:47:51 -04:00
bors-servo
998f9d1906
Auto merge of #26028 - servo-wpt-sync:wpt_update_25-03-2020, r=jdm
Sync WPT with upstream (25-03-2020)

Automated downstream sync of changes from upstream as of 25-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-03-25 10:34:20 -04:00
Josh Matthews
19216627d3 Update content-security-policy. 2020-03-25 09:11:09 -04:00
Josh Matthews
abc6fbf6bd
Add missing failure. 2020-03-25 09:06:07 -04:00