Commit graph

20237 commits

Author SHA1 Message Date
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
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
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
Benjamin Bouvier
ecb9de4acd
style: Apply rustfmt on build_gecko.rs.
Bug: 1499359
Reviewed-by: emilio
2018-10-19 00:38:58 +02:00
Benjamin Bouvier
ff34daa384
style: Remove unused HashMap import and remove namespacing around Table.
Bug: 1499359
Reviewed-by: emilio
2018-10-19 00:38:36 +02:00
Boris Chiou
c9d39b2b19
style: Move MozLength and MaxLength into generics.
Move MozLength and MaxLength into generics, and drop the manual implementation
of ToComputedValue.

Differential Revision: https://phabricator.services.mozilla.com/D8291
2018-10-19 00:38:25 +02:00
Boris Chiou
53eb6cd667
style: Store the correct computed values for keywords for sizing properties.
In order to get the correct computed value of these keywords, we have to
make sure we store the correct computed values in sizing properties in
both inline axis and block axis.

-moz-max-content and -moz-min-content should behave as the property's
initial value in block axis. -moz-fit-content and -moz-available are not
supported in block axis, so we also treat them as initial values.

Differential Revision: https://phabricator.services.mozilla.com/D8290
2018-10-19 00:38:14 +02:00
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