Commit graph

17270 commits

Author SHA1 Message Date
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
bors-servo
b6475cf433 Auto merge of #19057 - mrobinson:update-wr-sticky-api, r=glennw
Update WR to use the new sticky positioning API

<!-- 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 do 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. -->

<!-- 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/19057)
<!-- Reviewable:end -->
2017-10-30 15:58:07 -05:00
bors-servo
10227e3cd2 Auto merge of #19051 - CYBAI:moz-script-min-size-no-mako, r=emilio,canaltinova
style: Move font -moz-script-min-size outside of mako

This is a sub-PR for #19015
r? emilio

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19034 (github issue number if applicable).
- [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/19051)
<!-- Reviewable:end -->
2017-10-30 15:00:05 -05:00
bors-servo
7f8842f7a9 Auto merge of #19044 - cbrewster:text_overflow_nomako, r=emilio
style: Move text-overflow outside of mako

<!-- 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 are apart of #19015 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.

<!-- 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/19044)
<!-- Reviewable:end -->
2017-10-30 14:04:52 -05:00
bors-servo
f18099118a Auto merge of #19061 - servo:ft-alloc, r=mbrubeck
FreeType: don’t use usable_size() as deallocation size

Instead use C-level malloc()/free() so that the size doesn’t need to be known during deallocation, since FreeType doesn’t provide it.

Hopefully fixes https://github.com/servo/servo/issues/19058

Depends on https://github.com/alexcrichton/jemallocator/pull/21

<!-- 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/19061)
<!-- Reviewable:end -->
2017-10-30 12:40:34 -05:00
Simon Sapin
6319ad0124 FreeType: don’t use usable_size() as deallocation size
Instead use C-level malloc()/free() so that the size doesn’t need
to be known during deallocation, since FreeType doesn’t provide it.

Hopefully fixes https://github.com/servo/servo/issues/19058
2017-10-30 18:22:30 +01:00
CYBAI
63cd930fd0 style: Move font -moz-script-min-size outside of mako 2017-10-31 00:44:55 +08:00
bors-servo
26279064eb Auto merge of #19060 - emilio:invalidation-fishy, r=nox
style: Fix some fishiness in the invalidation code.

See individual commits for details, I think this is not observable.

<!-- 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/19060)
<!-- Reviewable:end -->
2017-10-30 07:39:00 -05:00
bors-servo
1b73cf3352 Auto merge of #19059 - emilio:selector-map-nicer, r=nox
style: Make the SelectorMap API slightly nicer.

<!-- 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/19059)
<!-- Reviewable:end -->
2017-10-30 06:42:14 -05:00
Emilio Cobos Álvarez
f060cbb38c
style: Properly forward ElementWrapper::blocks_ancestor_combinators.
Not doing it is buggy. I think the only outcome of it is that we may
over-invalidate, so it's probably not a huge deal, but worth doing it.
2017-10-30 12:40:25 +01:00
Emilio Cobos Álvarez
bea79aabff
style: Implement ElementWrapper::pseudo_element_originating_element in terms of its TElement implementation.
This matches right now, but it may not in the future.
2017-10-30 12:40:24 +01:00
Emilio Cobos Álvarez
7861ec1d5b
style: Make the SelectorMap API slightly nicer. 2017-10-30 12:33:44 +01:00
Martin Robinson
f37fa0cf6d Update WR to use the new sticky positioning API 2017-10-30 10:15:30 +01:00
Xidorn Quan
c7172052f9 Add support for -moz-window-opacity to stylo 2017-10-30 16:33:51 +11:00
Emilio Cobos Álvarez
0df912be93
style: Make style sharing look at XBL / Shadow DOM rules.
Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU
2017-10-28 12:43:43 +02:00
Gecko Backout
cda9d186c1 Backed out changeset fc813bf68348 for failing reftest layout/reftests/bugs/272646-1.xul on OS X. r=backout
Backs out https://github.com/servo/servo/pull/19045
2017-10-28 08:08:47 +00:00
Connor Brewster
deb932784e style: Move text-overflow outside of mako 2017-10-27 23:09:05 -05:00
bors-servo
592c513c28 Auto merge of #19045 - emilio:shadow-style-sharing, r=bzbarsky
style: Make style sharing look at XBL / Shadow DOM rules.

Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU

<!-- 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/19045)
<!-- Reviewable:end -->
2017-10-27 19:14:20 -05:00
Emilio Cobos Álvarez
4b43b7c7f8
style: Make style sharing look at XBL / Shadow DOM rules.
Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU
2017-10-28 02:13:59 +02:00
Boris Chiou
3a29c63250 Handle rotate, rotate{x|y|z}, and skew{x|y} properly when cloning transforms. 2017-10-27 21:18:31 +02:00
Boris Chiou
52c81a0a84 Add Servo_ComposeAnimationSegment which composes an animation segment. 2017-10-27 21:18:21 +02:00
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Boris Chiou
f02bd01add Add Servo_AnimationValue_Opacity which creates an AnimationValue of opacity. 2017-10-27 21:18:01 +02:00
Sylvestre Ledru
6d6a68b5b1 Support multi lines declarations in the parsing of the Fx header files
For example, in dom/base/nsGkAtomList.h, we currently have:
GK_ATOM(mouseWheel, "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)
but if we change to
GK_ATOM(mouseWheel,
        "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)
The parser didn't handle the declaration
2017-10-27 17:10:42 +02:00
bors-servo
d21657a9e5 Auto merge of #19028 - MortimerGoro:webgl2, r=emilio
Kick off WebGL 2.0 implementation

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

This PR kicks off the WebGL 2.0 implementation:

- Include WebGL2RenderingContext.webidl and comment unimplemented methods
- Create WebGL2 struct hierarchy with WebGL 1.0 backwards compatibility
- Add WebGL 2.0 entry points to canvas
- Select the correct GL Version on GLContext backends (related PR https://github.com/emilio/rust-offscreen-rendering-context/pull/108)
- Add WebGL version selection in shader compilations
- Create a WebGL 2.0 preference

I tried a complex three.js demo using canvas.getContext("webgl2") and the backwards compatibility worked great.

Next steps:

- I'll add WebGLVersion selection/filtering to WebGLExtensions and move some extensions to core in WebGL 2.0 (e.g. VAOs)
- I'll add the WebGL 2.0 conformance WPT
- I'll create a mega-issue with a the list of all TODO methods for a complete WebGL 2.0 implementation (as @emilio did with WebGL 1.0), so we can start start getting community involvement.

---
<!-- 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 I will add the entire webgl 2.0 WPT in a different PR

<!-- 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/19028)
<!-- Reviewable:end -->
2017-10-27 05:56:12 -05:00
Imanol Fernandez
ddd6c86e99 Kick off WebGL 2.0 implementation 2017-10-27 12:53:11 +02:00
bors-servo
8f171058f8 Auto merge of #19035 - nnethercote:bug-1411893, r=emilio
Introduce nsStaticAtom.

It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

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

<!-- 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/19035)
<!-- Reviewable:end -->
2017-10-27 04:34:17 -05:00
Nicholas Nethercote
5866b820e0 Introduce nsStaticAtom.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)
2017-10-27 20:33:40 +11:00
Connor Brewster
122626e46b Move table -x-span outisde of mako 2017-10-27 01:09:57 -05:00
bors-servo
de7595f16f Auto merge of #19027 - emilio:svg-use-bug, r=upsuper
selectors: Be consistent about how we get a parent element for selector matching

This fixes bug 1412011.

<!-- 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/19027)
<!-- Reviewable:end -->
2017-10-26 19:54:09 -05:00
CYBAI
cefc622e9b style: Move -x-text-zoom outside of mako 2017-10-27 02:32:59 +08:00
Emilio Cobos Álvarez
2b94c79d5a
style: inline a local-variable which is no longer used more than once. 2017-10-26 18:31:03 +02:00
Emilio Cobos Álvarez
529f33eb6f
selectors: Be consistent about how we get next elements for selector-matching.
This fixes bug 1412011.

MozReview-Commit-ID: JgLoBNjA3m8
2017-10-26 18:24:07 +02:00
Emilio Cobos Álvarez
22dc480272
selectors: Deindent some selector-matching code.
MozReview-Commit-ID: B0ixSTcRS4S
2017-10-26 18:23:06 +02:00
Emilio Cobos Álvarez
dd5cd29a61
style: Introduce TDocument::is_html_element and TDocument::quirks_mode.
This allows some code to read a bit nicer, and stop passing down quirks mode to
querySelector / querySelectorAll.
2017-10-26 13:22:31 +02:00
Emilio Cobos Álvarez
bfa7cd7d9e
style: Add TNode::owner_doc. 2017-10-26 13:03:11 +02:00
Emilio Cobos Álvarez
4d4fa69018
style: Introduce a TDocument trait.
This will be useful for querySelector optimizations.
2017-10-26 12:49:13 +02:00
Emilio Cobos Álvarez
6c796b50ec
style: Remove PresentationalHintsSynthesizer.
This is not really an useful abstraction, and I never knew how to spell it.
2017-10-26 11:45:28 +02:00
bors-servo
a814fc578f Auto merge of #19022 - glennw:update-wr-wavy, r=jdm
Update WR (line decorations, pre-mul borders, mac fonts)

<!-- 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/19022)
<!-- Reviewable:end -->
2017-10-25 16:56:38 -05:00
Glenn Watson
47544b2d28 Update WR (line decorations, pre-mul borders, mac fonts) 2017-10-26 07:37:14 +10:00
bors-servo
e438b094f6 Auto merge of #18670 - avadacatavra:interactive-metrics, r=jdm
added time to interactive metrics

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

Added time to interactive metrics and refactored metrics/lib

I need to write tests, but wanted to submit the PR for review

---
<!-- 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/18670)
<!-- Reviewable:end -->
2017-10-25 15:53:57 -05:00
bors-servo
ce890be0b9 Auto merge of #19018 - emilio:scroll-snap, r=wafflespeanut
style: Cleanup a bit the scroll-snap-type properties.

Still not perfect, but at least a bit more consistent.

<!-- 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/19018)
<!-- Reviewable:end -->
2017-10-25 13:24:27 -05:00
Emilio Cobos Álvarez
328f142f38
style: Cleanup a bit the scroll-snap-type properties.
Still not perfect, but at least a bit more consistent.
2017-10-25 20:12:37 +02:00
bors-servo
a69e33366e Auto merge of #18871 - KiChjang:websocket-fetch-integration, r=avadacatavra
Merge functionality of WebsocketConnect into Fetch

Partial #14897.

<!-- 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/18871)
<!-- Reviewable:end -->
2017-10-25 09:00:41 -05:00
ddh
52b63def44 added pipelines to all task sources
changed task sources to accept pipeline ids
2017-10-25 14:25:58 +01:00
bors-servo
a347e8d6d3 Auto merge of #19014 - emilio:caller-type, r=upsuper
stylo: Honor CallerType for media query parsing.

So that matchMedia can parse internal stuff in chrome code.

Bug: 1410074
Reviewed-by: xidorn
MozReview-Commit-ID: 6M4HHqVJ1dp

<!-- 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/19014)
<!-- Reviewable:end -->
2017-10-25 07:50:46 -05:00
Emilio Cobos Álvarez
21b314e633
stylo: Honor CallerType for media query parsing.
So that matchMedia can parse internal stuff in Chrome code.

Bug: 1410074
Reviewed-by: xidorn
MozReview-Commit-ID: 6M4HHqVJ1dp
2017-10-25 14:27:16 +02:00
bors-servo
6449c00fc9 Auto merge of #19007 - MortimerGoro:const_codegen, r=emilio
Fix Const IDL value compilation errors in codegen

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

I found that some const WebIDL values fail at rust compile time.

Example:

const long long TIMEOUT_IGNORED  = -1;

```
906 |     ConstantSpec { name: b"TIMEOUT_IGNORED\0", value: ConstantVal::DoubleVal(-1) }]
    |                                                                              ^^ expected f64, found integral variable
    |
    = note: expected type `f64`
               found type `{integer}`
```

I added a explicit cast to to fix the problem in conversions that may fail to compile.

---
<!-- 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/19007)
<!-- Reviewable:end -->
2017-10-25 06:48:43 -05:00
Imanol Fernandez
3ed5899a64 Fix Const IDL value compilation errors in codegen 2017-10-25 12:56:39 +02:00
Keith Yeung
99f9696a24 Merge functionality of WebsocketConnect into Fetch 2017-10-24 20:54:19 -07:00