Commit graph

16805 commits

Author SHA1 Message Date
bors-servo
ffa03380ca Auto merge of #18580 - MortimerGoro:webgl_active_texture, r=jdm
Associate WebGL textures with texture units

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

Currently `bound_texture_2d` and `bound_texture_cube_map` fields are used to restore texture states and to get the current bindings in GetParams(...). But as soon as active texture is changed all the values can become dirty, leading to broken textures in some demos or invalid getParam(...) call results.

This PR implements the texture binding association with the texture units.

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

<!-- 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/18580)
<!-- Reviewable:end -->
2017-09-28 14:12:06 -05:00
Imanol Fernandez
b9710a59b5 Associate bound WebGLTextures with texture units. 2017-09-28 18:52:29 +02:00
bors-servo
056c085119 Auto merge of #18663 - servo:ROOT-ALL-THE-THINGS, r=jdm
Make DomRoot<T> a type alias of a more general Root<T> type

<!-- 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/18663)
<!-- Reviewable:end -->
2017-09-28 10:45:11 -05:00
bors-servo
2c73736f7d Auto merge of #18660 - upsuper:var-sub-inherit, r=emilio
Don't use inherited custom properties for substitution

<!-- Please describe your changes on the following line: -->
Custom properties from parent node has been considered in early stage of cascading them (in [`custom_properties::cascade`](01adcf69d7/components/style/custom_properties.rs (L461-L469))), and there is nothing in the spec stating that substitution should take inherited values into consideration when the value is invalid in the current node. Actually, there is a web-platform test explicitly checks that inherited value is not taken when the value is computed to invalid.

This would fix [bug 1402217](https://bugzilla.mozilla.org/show_bug.cgi?id=1402217).

---
<!-- 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
- [ ] 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/18660)
<!-- Reviewable:end -->
2017-09-28 09:06:48 -05:00
Anthony Ramine
dee38475b8 Make DomRoot<T> a type alias of a more general Root<T> type
This Root<T> relies on the concept of a stable trace object, which doesn't
move for the whole lifetime of the T value. For safety reasons, T must be 'static.

The only implementor of StableTraceObject for now is Dom<T>.
2017-09-28 15:42:43 +02:00
Xidorn Quan
dba19f53f5 Don't use inherited custom properties for substitution 2017-09-28 19:46:53 +10:00
Emilio Cobos Álvarez
f6a350b725
style: update bindings. 2017-09-28 10:03:58 +02:00
Emilio Cobos Álvarez
0ead078aa0
style: Simplify and remove some more code.
Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: Ec9pfQw7U6W
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:45 +02:00
Emilio Cobos Álvarez
87dc00d54f
style: Remove :-moz-empty-except-children-with-local-name.
<applet> is not a thing anymore, and that selector in our UA sheet will never
match anyway, since an <applet> element will never have the BROKEN state.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: 7UOMKOv55uJ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:19 +02:00
Emilio Cobos Álvarez
abcd92ba9e
style: Hide :-moz-devtools-highlighted from anywhere but UA sheets.
It's always used from a UA sheet already.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: J3poQuTD1C7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:57:55 +02:00
Nazım Can Altınova
6ac5e9c3fa stylo: Handle quirks mode on font base sizes 2017-09-28 00:54:30 +03:00
Michael Layzell
47df1375c5 Stop allocating in fmt::Write for nsA[C]String 2017-09-27 13:51:02 -04:00
bors-servo
bad77b6a20 Auto merge of #18652 - emilio:xbl-stuff, r=TYLin
style: Fix various issues with XBL rule matching

See the commit details.

<!-- 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/18652)
<!-- Reviewable:end -->
2017-09-27 09:15:16 -05:00
Emilio Cobos Álvarez
19d34b96e5
style: Fix various issues with XBL rule matching.
We were using the wrong MatchingMode and flags setter just because we didn't
bother threading them down.

This patch fixes the issue seen with the video controls.

MozReview-Commit-ID: Il1WOzRDxI1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 15:29:04 +02:00
bors-servo
807275d8ac Auto merge of #18653 - servo:ROOT-ALL-THE-THINGS, r=jdm
Move root-related things around so that the abstractions make more sense

<!-- 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/18653)
<!-- Reviewable:end -->
2017-09-27 08:09:57 -05:00
Anthony Ramine
b441f8a0f7 Kill RootCollectionPtr 2017-09-27 14:24:37 +02:00
Anthony Ramine
378babfd4c Move STACK_ROOTS to dom::bindings::root 2017-09-27 14:16:05 +02:00
bors-servo
aff99ef30b Auto merge of #18581 - GuillaumeGomez:update-mp3, r=KiChjang
Update mp3-metatada and thus audio-video-metadata

<!-- 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/18581)
<!-- Reviewable:end -->
2017-09-27 07:06:07 -05:00
Anthony Ramine
8d566fbc3c Move script_runtime::StackRootTLS to root::ThreadLocalStackRoots 2017-09-27 13:58:59 +02:00
Anthony Ramine
a6d01c92d9 Reorder things in dom::bindings::root
The type DomRoot<T> is now the first one defined in it.
2017-09-27 13:44:07 +02:00
Emilio Cobos Álvarez
d82e6926fc
style: Do not optimize out lazy pseudo rules if the main stylist doesn't have rules for it.
This could prevent an XBL binding to use some pseudo-elements fairly randomly.

MozReview-Commit-ID: b44DO8qcfD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 13:29:36 +02:00
Hiroyuki Ikezoe
08574b8c4d Update bindings. 2017-09-27 18:27:58 +09:00
Hiroyuki Ikezoe
5481d8ed6f Compute css variables with custom properties in keyframes for getKeyframes() 2017-09-27 18:27:57 +09:00
Hiroyuki Ikezoe
1b39041a8c Factor custom properties in keyframes into compute values in each keyframe 2017-09-27 18:27:55 +09:00
Hiroyuki Ikezoe
ded0c713db Store custom properties in keyframes into servo's PropertyDeclarationBlock 2017-09-27 18:27:48 +09:00
bors-servo
54f8a131ea Auto merge of #18649 - nnethercote:bug-1400459, r=froydnj
Devirtualize nsIAtom.

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

https://bugzilla.mozilla.org/show_bug.cgi?id=1400459
---
<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1400459

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tested on the Gecko side.

<!-- 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/18649)
<!-- Reviewable:end -->
2017-09-27 00:52:31 -05:00
bors-servo
97227aaca3 Auto merge of #18644 - Manishearth:stylo-attr-ws, r=bz
stylo: Don't error out on trailing whitespace in attr()

r=bz bug 1403282

<!-- 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/18644)
<!-- Reviewable:end -->
2017-09-26 23:56:15 -05:00
Nicholas Nethercote
67e62f49fd Update Gecko bindings. 2017-09-27 13:48:12 +10:00
Nicholas Nethercote
7019d42523 Devirtualize nsIAtom. 2017-09-27 12:40:31 +10:00
Manish Goregaokar
2e1359b164 stylo: Don't error out on trailing whitespace in attr() 2017-09-26 14:00:11 -07:00
bors-servo
0160aaeeea Auto merge of #18641 - servo:ROOT-ALL-THE-THINGS, r=SimonSapin
Improve DomRoot<T>

<!-- 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/18641)
<!-- Reviewable:end -->
2017-09-26 14:25:20 -05:00
Guillaume Gomez
d6761548a4 Update mp3-metatada and thus audio-video-metadata 2017-09-26 20:57:27 +02:00
Michael Layzell
98dbf149ad Remove unlanded TakeFrom methods from nsstring_vendor 2017-09-26 14:14:22 -04:00
Anthony Ramine
9ea645481b Store a Dom<T> in DomRoot<T> 2017-09-26 18:29:15 +02:00
Michael Layzell
c1c98659b9 Update ns[C]String::from -> ns[C]Str::from where possible 2017-09-26 11:03:35 -04:00
Michael Layzell
cc8b69bae1 Update version of nsstring bindings used by stylo 2017-09-26 10:45:35 -04:00
Anthony Ramine
1ff6c4f9aa Make DomRoot::new unsafe 2017-09-26 16:10:30 +02:00
bors-servo
4450bbdb0c Auto merge of #18640 - emilio:cleanup-as-you-go, r=nox
style: Really minor cleanups.

See commits for details.
2017-09-26 07:53:43 -05:00
Emilio Cobos Álvarez
2bf84ba468
style: There are no more ua_sheets. 2017-09-26 14:52:00 +02:00
Emilio Cobos Álvarez
8a51a4eb01
style: Reformat a bunch of signatures in wrapper.rs 2017-09-26 14:49:27 +02:00
Emilio Cobos Álvarez
4e6fd5693a
style: Cleanup some media-query-related code. 2017-09-26 14:49:25 +02:00
bors-servo
3dbb97922d Auto merge of #18638 - emilio:invalidation-lazy, r=heycam
style: Lazily tweak the traversal root to account for sibling invalidations.

Bug: 1403078
Reviewed-by: heycam
MozReview-Commit-ID: Ij3nMOKu5FO
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

<!-- 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/18638)
<!-- Reviewable:end -->
2017-09-26 06:58:04 -05:00
Emilio Cobos Álvarez
07d55a4bf8
style: Lazily tweak the traversal root to account for sibling invalidations.
Bug: 1403078
Reviewed-by: heycam
MozReview-Commit-ID: Ij3nMOKu5FO
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-26 13:09:03 +02:00
bors-servo
81801ab8b4 Auto merge of #18637 - nnethercote:rename-add_size_of_children, r=emilio
Two small tweaks related to MallocSizeOf

<!-- 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 tested on the Gecko side.

<!-- 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/18637)
<!-- Reviewable:end -->
2017-09-26 05:52:34 -05:00
Nicholas Nethercote
009150696f Remove some use statements in malloc_size_of.
This file potentially uses multiple implementations of types like `Arc`,
so explicit qualification makes things clearer.
2017-09-26 19:05:23 +10:00
Nicholas Nethercote
e030c0d96a Rename add_size_of_children() methods as add_size_of().
This makes them match `size_of` from `MallocSizeOf`.
2017-09-26 18:54:36 +10:00
bors-servo
1282e0d808 Auto merge of #18635 - servo:RENAME-ALL-THE-THINGS, r=emilio
Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things

<!-- 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/18635)
<!-- Reviewable:end -->
2017-09-26 03:20:05 -05:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00
Anthony Ramine
577370746e Rename DOMRefCell<T> to DomRefCell<T>
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
2017-09-26 09:49:08 +02:00
Anthony Ramine
9a7ba89c84 Rename OnceCellJS<T> to DomOnceCell<T>
Like DOMRefCell<T>.
2017-09-26 09:49:06 +02:00