Commit graph

20253 commits

Author SHA1 Message Date
bors-servo
a59a80b301
Auto merge of #22028 - asajeffrey:debug-all-the-things, r=emilio
Add lots of derived Debug impls

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

Add a bunch of derived `Debug` impls. After this, pretty much anything that implements `Deserializable` also implements `Debug`. The exception is `webrender_api::RenderApiSender`, which would need a webrender PR.

---
<!-- 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 do not require tests because it's just debugging

<!-- 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/22028)
<!-- Reviewable:end -->
2018-10-29 14:17:02 -04:00
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Alan Jeffrey
dab8f4a97f Support building for Magic Leap. 2018-10-29 08:49:41 -05:00
bors-servo
e580250d5d
Auto merge of #21988 - CYBAI:drop-promises, r=jdm
Clear refcounted promise before dropping JSRuntime

Not sure if this is the right solution?

I also tried to `impl Drop for LiveDOMReferences` but it's still executed after dropping JSRuntime.
So, maybe we should clear it before dropping the JSRuntime?

cc @jdm @asajeffrey

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21331 .
- [x] There are tests for these changes; the status of `fetch/cross-origin-resource-policy/fetch-in-iframe.html` will be `OK`

<!-- 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/21988)
<!-- Reviewable:end -->
2018-10-29 08:31:12 -04:00
bors-servo
cbd81d2ad9
Auto merge of #22040 - paulrouget:shutdown_canvas_paint_thread, r=jdm
Exit Canvas paint thread on shutdown

<!-- 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 #22038 (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/22040)
<!-- Reviewable:end -->
2018-10-29 07:28:25 -04:00
Paul Rouget
cdf22c1493 Exit Canvas paint thread on shutdown 2018-10-29 11:06:06 +01:00
bors-servo
d9f5e8ada8
Auto merge of #22035 - pyfisch:line-item, r=emilio
Directly build WebRender LineDisplayItem

Remove unused SimpleMatrixDetection.

<!-- 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: -->
- [ ] `./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. -->

<!-- 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/22035)
<!-- Reviewable:end -->
2018-10-28 21:49:49 -04:00
Emilio Cobos Álvarez
05f9f10a1c
style: Fix servo build and tidy lints. 2018-10-28 23:52:13 +01:00
Mats Palmgren
a51b4e754c
style: Force line-height:normal for themed comboboxes for compat with other UAs.
Bug: 1501908
Reviewed-by: emilio
2018-10-28 23:45:29 +01:00
Emilio Cobos Álvarez
20d9a076d4
style: Properly handle exhaustive matches in animation keywords to avoid a warning.
Need to do the gecko_inexhaustive thing because those animation properties have
an EndGuard_ generated by IPDL I suspect.
2018-10-28 23:45:24 +01:00
Emilio Cobos Álvarez
67fae7a2ce
style: Assert earlier to try to get a more helpful stack. 2018-10-28 23:45:18 +01:00
Emilio Cobos Álvarez
e7261d51e9
style: Back out diagnostics for not being helpful enough at diagnosing.
The selectors that crash seem just corrupted data structures, none of the
selectors from crash dumps make sense, and the ones for which I could trace the
source found no issue.
2018-10-28 23:45:13 +01:00
Boris Chiou
0c057d9299
style: Implement steps(jump-*) functions.
1. Add a new preference, layout.css.step-position-jump.enabled, for
   step(_, jump-*) timing functions.
2. We still keep JumpEnd and End tags, even though there is no difference
   between them. Therefore, we could disable the preference if needed.
3. Update the calculation of StepTiming to match the algorithm in the spec.
4. For servo, we implement the correct step function algorithm except
   for the handling of before_flag. This could be fixed later.

Depends on D9313

Differential Revision: https://phabricator.services.mozilla.com/D9314
2018-10-28 23:45:03 +01:00
Boris Chiou
3723042937
style: Generate StyleTimingFunction and drop ns_timing_function.rs.
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Differential Revision: https://phabricator.services.mozilla.com/D9313
2018-10-28 23:44:51 +01:00
Boris Chiou
2bbcb5c633
style: Replace u32 with computed::Integer for computed::TimingFunction.
We make sure the step number is always positive, so using
computed::Integer is safe and can derive ToComputedValue.

Depends on D9311

Differential Revision: https://phabricator.services.mozilla.com/D9845
2018-10-28 23:44:42 +01:00
Boris Chiou
a20b6a5166
style: Split TimingFunction into a separate file to match spec.
TimingFunction is defined in a separate spec (i.e. css-easing), instead
of transform, so we move it into a different file.

Depends on D9310

Differential Revision: https://phabricator.services.mozilla.com/D9311
2018-10-28 23:44:26 +01:00
Boris Chiou
3a536f463c
style: Drop frames() timing function.
frames() timing function was removed from the spec, so we drop it.
Besides, some devtool tests are removed because they use frame(). I will
add them back by using new step function later.

Differential Revision: https://phabricator.services.mozilla.com/D9309
2018-10-28 23:44:16 +01:00
Brian Birtles
990f2c6bb9
style: Compare absolute dot-product to 1.0 when interpolating quaternions.
See the extended commit message for the following spec change:

  6b36d41ebc

Basically, by failing to take the absolute value, for certain content we can end
up doing division by zero which will mean that the test included in this patch
will cause an assertion to fail in debug builds and return
"matrix(NaN, NaN....)" in release builds.

Differential Revision: https://phabricator.services.mozilla.com/D9618
2018-10-28 23:44:04 +01:00
tb120
ac873c714f
style: Convert NS_STYLE_ANIMATION_PLAY_STATE_* to scoped enum StyleAnimationPlayState.
This change removes directives NS_STYLE_ANIMATION_PLAY_STATE_* and replaces the
values with those from a scoped enum called StyleAnimationPlayState.

Differential Revision: https://phabricator.services.mozilla.com/D9382
2018-10-28 23:43:53 +01:00
Emilio Cobos Álvarez
0191705e87
style: Use searchfox links instead of dxr links for nsRuleNode.
Searchfox has better blame.

Differential Revision: https://phabricator.services.mozilla.com/D9375
2018-10-28 23:43:45 +01:00
Brian Birtles
fc59165ff3
style: Implement the even more forgiving interpolation rules for transform lists.
As discussed in:

  https://github.com/w3c/csswg-drafts/issues/927

with tentative spec text:

  https://github.com/w3c/csswg-drafts/pull/3215

Differential Revision: https://phabricator.services.mozilla.com/D9185
2018-10-28 23:43:32 +01:00
Pyfisch
93abe795c6 Directly build WebRender LineDisplayItem
Remove unused SimpleMatrixDetection.
2018-10-28 22:23:36 +01:00
Fernando Jiménez Moreno
7bf1944007 Rename seek_sync to seek_end 2018-10-26 10:22:00 +02:00
Fernando Jiménez Moreno
aa3c911efa HTMLMediaElement.seek: clean-up and update WPTs expectations 2018-10-26 10:22:00 +02:00
Fernando Jiménez Moreno
d94cbc83fc Fix loadedmetadata event handler 2018-10-26 10:21:27 +02:00
Fernando Jiménez Moreno
1f182d0bbd Remove seekable flag 2018-10-26 10:21:27 +02:00
Fernando Jiménez Moreno
44133bfb3c Byte range request for HTMLMediaElement seeking 2018-10-26 10:21:26 +02:00
Fernando Jiménez Moreno
75407822bc HTMLMediaElement seeking 2018-10-26 10:19:52 +02:00
Fernando Jiménez Moreno
2db141fb8b Setter and getter for HTMLMediaElement.currentTime 2018-10-26 10:17:32 +02:00
Fernando Jiménez Moreno
21f67a99f5 Update servo-media to fix intermittent timeouts 2018-10-24 16:36:50 +02:00
bors-servo
b19f9d9c5b
Auto merge of #21999 - asajeffrey:script-dummy-media-position-changed, r=ferjm
Update servo-media

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

Get servo to compile against servo-media master.

---
<!-- 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 do not require tests because updating a dependency

<!-- 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/21999)
<!-- Reviewable:end -->
2018-10-23 15:24:24 -04:00
bors-servo
7544ce7890
Auto merge of #22000 - oli-obk:master, r=jdm
Add a workaround for a rustc ICE

While https://github.com/rust-lang/rust/issues/55223 is being fixed, this workaround will allow servo to compile on the latest nightly rustc

r? @SimonSapin

---

- [ ] `./mach build -d` does not report any errors
  * I'm getting
  ```
    Collecting voluptuous==0.10.5 (from -r /home/oliver/Projects/rust/servo/python/requirements.txt (line 18))
      Using cached https://files.pythonhosted.org/packages/c3/81/c84f8a3e723b760fdd1c41fc80201cb80cd29c1bce5159d8918c58df7d2a/voluptuous-0.10.5.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-Qdty2x/voluptuous/setup.py", line 16, in <module>
            f.write(long_description)
        UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 1229: ordinal not in range(128)
    ```
    locally, no clue how to continue from there. The script crate compiles fine with `cargo build`
- [ ] `./mach test-tidy` does not report any errors

- [X] These changes do not require tests because the `script` crate just won't compile without this change

<!-- 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/22000)
<!-- Reviewable:end -->
2018-10-23 12:30:11 -04:00
bors-servo
30d9962b70
Auto merge of #20755 - CYBAI:unhandled-rejection, r=jdm
Implement unhandledrejection event

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15412
- [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/20755)
<!-- Reviewable:end -->
2018-10-23 10:56:38 -04:00
Alan Jeffrey
4282141c14 Updated servo-media 2018-10-22 19:39:36 -05:00
Oliver Scherer
47364f64ef Add a workaround for a rustc ICE 2018-10-22 19:15:25 +02:00
Pyfisch
d9b1950d74 Layout: Remove redundant deny unsafe and format
Add license to two files.

Bypass DisplayListBuilder for some items.
2018-10-22 16:15:48 +02:00
Pyfisch
2ff330a5c9 Split layout/background.rs file
Have background, border and gradient modules
for calculation functions.
Use shorter names for functions that are qualified
by the module name like `border::radii`.

Use push_item and push_iter to add items to WebRender.
2018-10-22 16:15:46 +02:00
CYBAI
bca951d79e Drop TrustedPromise before dropping JSRuntime 2018-10-21 21:30:19 +08:00
bors-servo
2304f02123
Auto merge of #21971 - emilio:animations, r=jdm
Revert "style: Make the transitions code make sense again."

This reverts commit d6092fae27.

This change actually makes transitions start, and our code for stopping
transitions is just bogus, so we just keep re-starting them over and over, which
is not good.

<!-- 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/21971)
<!-- Reviewable:end -->
2018-10-19 23:00:31 -04:00
Emilio Cobos Álvarez
3b7b21ebb5
Revert "style: Make the transitions code make sense again."
This reverts commit d6092fae27.

This change actually makes transitions start, and our code for stopping
transitions is just bogus, so we just keep re-starting them over and over, which
is not good.
2018-10-19 01:21:04 +02:00
Emilio Cobos Álvarez
1505eaaade
style: Fix Servo build. 2018-10-19 01:15:26 +02:00
Emilio Cobos Álvarez
856886c40d
Fix Servo build. 2018-10-19 01:01:27 +02:00
Emilio Cobos Álvarez
b66e828842
Fix various tidy issues. 2018-10-19 01:01:27 +02:00
Emilio Cobos Álvarez
fb0702476a
style: Remove StaticId.
Destructors in statics are ok now.

Differential Revision: https://phabricator.services.mozilla.com/D9004
2018-10-19 00:40:18 +02:00
Emilio Cobos Álvarez
d0c96bff27
style: followup test fix to the followup build fix. 2018-10-19 00:40:09 +02:00
Emilio Cobos Álvarez
edc40ce320
style: Implement @supports selector() syntax.
This implements the selector(<complex-selector>) syntax for @supports.

See https://github.com/w3c/csswg-drafts/issues/3207 for explainer and
discussion.

Probably would should wait for that to be sorted out to land this, or maybe we
should put it behind a pref to get the code landed and change our
implementation if the discussion there leads to a change.

Differential Revision: https://phabricator.services.mozilla.com/D8864
2018-10-19 00:40:02 +02:00
Emilio Cobos Álvarez
4e356b4bb9
style: Clear host rules from clear_cascade_data.
While at it, also measure them for about:memory.

Differential Revision: https://phabricator.services.mozilla.com/D8972
2018-10-19 00:39:41 +02:00
Cameron McCormack
5770247af0
style: Make css::URLValue::IsLocalRef call into CssUrlData::is_fragment.
This fixes the issue that we should no longer be looking for control characters.

Differential Revision: https://phabricator.services.mozilla.com/D8876
2018-10-19 00:39:31 +02:00
Cameron McCormack
623363e3c8
style: Have css::URLValue get URLExtraData from its CssUrlData.
Depends on D8874

Differential Revision: https://phabricator.services.mozilla.com/D8875
2018-10-19 00:39:22 +02:00
Cameron McCormack
c4491ea39d
style: Make css::URLValue hold on to a CssUrlData, not just its serialization.
Differential Revision: https://phabricator.services.mozilla.com/D8874
2018-10-19 00:39:13 +02:00