Commit graph

35029 commits

Author SHA1 Message Date
Benjamin Bouvier
170909fc31
style: Share bindgen flags globally.
Bug: 1495669
Reviewed-by: emilio,froydnj
2018-10-19 00:37:30 +02:00
Emilio Cobos Álvarez
2c52210ba7
style: Remove PseudoElement::inherits_all.
I plan to change servo to use all: inherit on its UA sheet.

I hope the patch below should make it good enough performance-wise. And also,
it's probably broken so I don't think it's worth supporting it specially.

Differential Revision: https://phabricator.services.mozilla.com/D8686
2018-10-19 00:37:24 +02:00
Emilio Cobos Álvarez
8a47c8b2e6
style: Don't copy structs to write the same value to them.
This makes us not allocate useless style structs when you're doing something
like resetting an already-reset property, or inheriting an already-inherited
property.

Seemed simple enough that I think we should do it. In practice we don't even
should pay an extra branch because I expect the compiler to be smart enough and
merge it with the one in the mutate() call.

Differential Revision: https://phabricator.services.mozilla.com/D8685
2018-10-19 00:37:17 +02:00
Cameron McCormack
4e174ace3b
style: Use helper function to set length and copy into nsTArrays of PODs from Rust.
Differential Revision: https://phabricator.services.mozilla.com/D8058
2018-10-19 00:37:08 +02:00
Cameron McCormack
d960db340c
style: Part 11: Move Gecko borrowed FFI types to a separate header file.
Differential Revision: https://phabricator.services.mozilla.com/D8653
2018-10-19 00:36:59 +02:00
Cameron McCormack
89e4d6c049
style: Move list of Servo Boxed types to a separate header file.
Differential Revision: https://phabricator.services.mozilla.com/D8652
2018-10-19 00:36:49 +02:00
Cameron McCormack
52d054ab5f
style: Add comments to ServoBindingTypes.h
Differential Revision: https://phabricator.services.mozilla.com/D8650
2018-10-19 00:36:40 +02:00
Diego Pino Garcia
3d41f0911f
style: Implement text-transform: full-size-kana.
Bug: 1498148
Reviewed-by: xidorn
2018-10-19 00:36:27 +02:00
Noemi Erli
f68f6669f4
Backed out changeset a00b402fb8e8 (bug 1498148) for Linting failure in builds/worker/checkouts/gecko/tools/lint/wpt.yml CLOSED TREE 2018-10-19 00:36:20 +02:00
Diego Pino Garcia
8d2124d820
style: Implement text-transform: full-size-kana.
Bug: 1498148
Reviewed-by: xidorn
2018-10-19 00:36:05 +02:00
Mats Palmgren
a400285eef
style: Unship most of the -moz-appearance values that aren't supported by -webkit-appearance in other UAs.
Bug: 1496720
Reviewed-by: emilio
2018-10-19 00:35:37 +02:00
Emilio Cobos Álvarez
2d9c764e2c
style: remove unneeded cast. 2018-10-19 00:35:31 +02:00
Emilio Cobos Álvarez
42def5a011
style: Always compute angle values to degrees.
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:

> All <angle> units are compatible, and deg is their canonical unit.

And https://drafts.csswg.org/css-values/#compat, which says:

>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.

And also other implementations (Blink always serializes angles as degrees in
computed style for example).

Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.

Differential Revision: https://phabricator.services.mozilla.com/D8619
2018-10-19 00:35:22 +02:00
Emilio Cobos Álvarez
11fedf18d9
style: Some more nsCSSValue cleanup.
I had this around, I couldn't work on more stuff today, but I may as well land
this.

Differential Revision: https://phabricator.services.mozilla.com/D8277
2018-10-19 00:35:15 +02:00
Cameron McCormack
9865a4194c
style: Merge css::{URLValueData, ImageValue} into css::URLValue.
Differential Revision: https://phabricator.services.mozilla.com/D8061
2018-10-19 00:34:27 +02:00
Nicholas Nethercote
cd439df54f
style: Rename nsStaticAtom subclasses.
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

Bug: 1497734
Reviewed-by: heycam
2018-10-19 00:34:02 +02:00
bors-servo
bcafe4188f
Auto merge of #21961 - servo:webgl, r=jdm
Properly support gl_PointSize and gl_PointCoord

Fixes #21719.
Fixes #20993.
Fixes #20992.
Fixes #21007.
Fixes #20979.

<!-- 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/21961)
<!-- Reviewable:end -->
2018-10-18 14:16:01 -04:00
Anthony Ramine
8828925f4f Properly support gl_PointSize and gl_PointCoord
Fixes #21719.
Fixes #20993.
Fixes #20992.
Fixes #21007.
Fixes #20979.
2018-10-18 20:15:23 +02:00
CYBAI
24f1afd0d5 Label as ERROR because the catch should not be reached
This should be fixed after #21964 fixed.
2018-10-18 22:12:23 +08:00
CYBAI
32185566c9 Assert decodeAudioData not reach the catch 2018-10-18 22:12:23 +08:00
CYBAI
b368e27dd5 Label as ERROR due to grain starts and ends not equal 2018-10-18 22:12:22 +08:00
CYBAI
4bee9b6639 Label as ERROR due to ChannelSplitterNode not implemented yet 2018-10-18 22:12:22 +08:00
CYBAI
854a9c9107 Label as ERROR due to not supporting async wasm compilation yet
This should be fixed after #21476 done.
2018-10-18 22:12:21 +08:00
CYBAI
0a173c1740 Make more tests PASS 2018-10-18 22:12:21 +08:00
CYBAI
fd833207d4 Label as ERROR due to ReadableStream not implemented yet
This should be fixed when #21482 is done.
2018-10-18 22:12:21 +08:00
CYBAI
46b9f61417 Catch the rejected promise to avoid harness error 2018-10-18 22:12:02 +08:00
CYBAI
0284afc51a Assert play promise rejected caused by pause() 2018-10-18 21:55:07 +08:00
CYBAI
445c1d0706 Label as ERROR due to SharedWorker not implemented yet 2018-10-18 19:13:26 +08:00
CYBAI
4e17c0205a Label as ERROR due to setPosition not implemented yet 2018-10-18 19:13:26 +08:00
CYBAI
f4dfbbd0c7 Label as FAIL due to depending on MessageChannel
This should be fixed after #16622 merged.
2018-10-18 19:13:25 +08:00
CYBAI
d5de841bfa Label as ERROR due to createImageBitmap not implemented yet
This should be fixed after #20650 done.
2018-10-18 19:13:25 +08:00
CYBAI
9036ce4f5c Add config for disallow-crossorigin.html
This should be removed when #13195 fixed.
2018-10-18 19:13:24 +08:00
CYBAI
0f249e1eb6 Add PromiseRejectionEvent interface to interface tests 2018-10-18 19:13:24 +08:00
CYBAI
f952d7ce0a Clear consumed rejections and add FIXME comments 2018-10-18 19:13:24 +08:00
CYBAI
9039a5cc71 Update test cases 2018-10-18 19:13:23 +08:00
CYBAI
42903412c7 Make first argument of DOMManipulationTaskSource as a Box<ScriptChan +
Send>

We don't have `window` for `workers`. So, if we use `global.as_window()`
to get the DOMManipulationTaskSource, it will make worker panic.
Instead, we should get the DOMManipulationTaskSource from each own
thread.

Ref: https://github.com/servo/servo/pull/20755#discussion_r193557746
2018-10-18 19:13:23 +08:00
CYBAI
924a78c6c6 Implement unhandledrejection event 2018-10-18 19:13:22 +08:00
bors-servo
c3c68983b7
Auto merge of #21975 - pyfisch:fix-selection, r=paulrouget
Correctly determine text selection direction

Add some debug! output.

Closes #21891

<!-- 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 #21891 (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/21975)
<!-- Reviewable:end -->
2018-10-18 01:55:06 -04:00
bors-servo
93ffd6cf52
Auto merge of #21979 - servo-wpt-sync:wpt_update_17-10-2018, r=jdm
Sync WPT with upstream (17-10-2018)

Automated downstream sync of changes from upstream as of 17-10-2018.
[no-wpt-sync]

<!-- 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/21979)
<!-- Reviewable:end -->
2018-10-17 23:10:24 -04:00
WPT Sync Bot
ed390a659c Update web-platform-tests to revision ade06500869396f7a46b95bc3553af4ca9c07f31 2018-10-17 22:57:41 -04:00
Pyfisch
c2ea135c49 Correctly determine text selection direction
Add some debug! output.

Closes #21891
2018-10-17 22:39:37 +02:00
bors-servo
45ac424ef7
Auto merge of #21965 - servo:jdm-patch-13, r=asajeffrey
Return the expected response when webdriver requests a session deletion.

This fixes a mistake that I have to deal with every time I try to use our webdriver server implementation for something new. We don't have any automated tests for this functionality yet (#21370) but I want to stop stumbling over it.

---
- [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 ¯\\\_(ツ)\_/¯

<!-- 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/21965)
<!-- Reviewable:end -->
2018-10-17 13:47:11 -04:00
CYBAI
8b28921136 Make expectionCode of Promise have newline character automatically
In the `fill` method, it will check if the exception code is empty
string or has newline character in the end of string or not. However, we
didn't do any change to exceptionCode when type is Promise. Thus, we add
the newline character to make it pass the checking in `fill` method.

See more detail from the log of IRC: https://mozilla.logbot.info/servo/20180501#c14692647
2018-10-18 01:38:27 +08:00
bors-servo
9a0404ac5f
Auto merge of #21881 - pyfisch:keyboard-types, r=paulrouget
Use keyboard-types crate

Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331

What this PR does:

* allow the use non-ASCII keyboards for text input
* decouple keyboard event "key" from "code" (key meaning vs location)

What this PR does not do:

* completely improve keyboard events send from winit and webdriver
* add support for CompositionEvent or IME

Notes:

* The winit embedder does not send keyup events for printable keys (this is a regression)
* keyboard-types is on crates.io because I believe it to be useful outside of servo. If you prefer I can add a copy in this repo.

<!-- 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/21881)
<!-- Reviewable:end -->
2018-10-17 05:36:08 -04:00
bors-servo
b158417956
Auto merge of #21969 - servo-wpt-sync:wpt_update_16-10-2018, r=jdm
Sync WPT with upstream (16-10-2018)

Automated downstream sync of changes from upstream as of 16-10-2018.
[no-wpt-sync]

<!-- 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/21969)
<!-- Reviewable:end -->
2018-10-16 23:17:28 -04:00
WPT Sync Bot
b2341e328d Update web-platform-tests to revision 077bb422b7bb21491a414e334bc594d83ca9e55b 2018-10-16 22:45:55 -04:00
Josh Matthews
f57e3fa433
Return the expected response when webdriver requests a session deletion. 2018-10-16 16:42:16 -04:00
bors-servo
aa9591137a
Auto merge of #21933 - notriddle:navigation-redirect-status-code, r=nox
Thread the status through navigation redirects

This is necessary because status codes affect whether the redirect is done with the same HTTP method or a different one.

This is part of #21886, but there's also a flaw in how iframes are handled that is causing the redirect to take over the entire window, so this commit doesn't entirely fix slither.io.

---
<!-- 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 are part of #21886, but more changes are needed to actually fix it

<!-- 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/21933)
<!-- Reviewable:end -->
2018-10-16 09:21:22 -04:00
bors-servo
a77ad4288c
Auto merge of #21959 - servo:webgl, r=jdm
Fix a couple of Drop implementations for WebGL objects

<!-- 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/21959)
<!-- Reviewable:end -->
2018-10-16 08:16:28 -04:00
Anthony Ramine
c010ae88cd Remove assertion in Drop for WebGLBuffer 2018-10-16 11:19:58 +02:00