Commit graph

18765 commits

Author SHA1 Message Date
bors-servo
26d2e77410
Auto merge of #20214 - mrobinson:stop-using-using-localclip-roundedrect, r=glennw
Stop using LocalClip::RoundedRect

We would like to remove this functionality from WebRender, so convert
its use to clip scroll nodes. This change also removes the redundant
BlocBlockStackingContextType in favor of Option<StackingContextType>,
which is just as expressive. This simplifies the code a bit.

<!-- 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 should 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/20214)
<!-- Reviewable:end -->
2018-03-06 15:53:11 -05:00
Martin Robinson
e100a72122 Stop using LocalClip::RoundedRect
We would like to remove this functionality from WebRender, so convert
its use to clip scroll nodes. This change also removes the redundant
BlocBlockStackingContextType in favor of Option<StackingContextType>,
which is just as expressive. This simplifies the code a bit.
2018-03-06 21:26:22 +01:00
bors-servo
96b9000fa2
Auto merge of #20212 - mkollaro:webidlcmake, r=jdm
Regenerate all WebIDLs when one of them changes

WebIDL files have dependencies between each other, but cmake doesn't have any
information about them. This can cause it to not update all the changed bindings
when switching branches.

---
<!-- 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 #20169

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a minor change in the build dependencies.
Switching between two of my branches was previously failing because a change in WebGL1 bindings didn't re-generate the WebGL2 bindings. I verified that it works with this patch.

<!-- 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/20212)
<!-- Reviewable:end -->
2018-03-06 12:37:58 -05:00
bors-servo
785b7c7775
Auto merge of #20211 - servo:derive-all-the-things, r=emilio
Improve #[derive(ToCss)]

<!-- 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/20211)
<!-- Reviewable:end -->
2018-03-06 11:42:58 -05:00
bors-servo
94a6c2c429
Auto merge of #20181 - fabricedesre:end-load-pageshow, r=jdm
Fire the pageshow event at the end of the page load

<!-- Please describe your changes on the following line: -->
This implements step 8 of https://html.spec.whatwg.org/multipage/parsing.html#the-end

---
<!-- 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 could not find a wpt test for that, which is strange. I likely missed it :(

<!-- 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/20181)
<!-- Reviewable:end -->
2018-03-06 10:49:51 -05:00
Fabrice Desré
3dd015b2d9 Fire the pageshow event at the end of the page load r=jdm 2018-03-06 07:24:24 -08:00
bors-servo
f5037cf621
Auto merge of #20144 - mkollaro:gettexparameter, r=jdm
Add WebGL function glGetTexParameter

<!-- Please describe your changes on the following line: -->
Add WebGL function glGetTexParameter

---
<!-- 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 part of #10209

<!-- 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/20144)
<!-- Reviewable:end -->
2018-03-06 09:48:56 -05:00
Martina Kollarova
288ef50fb7 Add WebGL function glGetTexParameter
Set the expected result of the test `tex-input-validation.html` to CRASH, since
that is caused by unrelated problems. The test was previously not executing
completely, because it stopped when it didn't find the implementation of
getTexParameter.
2018-03-06 15:28:10 +02:00
Martina Kollarova
25b95aa1a1 Regenerate all WebIDLs when one of them changes
WebIDL files have dependencies between each other, but cmake doesn't have any
information about them. This can cause it to not update all the changed bindings
when switching branches.
2018-03-06 14:55:53 +02:00
Anthony Ramine
88685be649 Don't use SequenceWriter if there is a single field to serialise 2018-03-06 13:14:26 +01:00
Emilio Cobos Álvarez
a5fc724349
style: Add a comment about the weird setup for justify-items.
And derive ToCss while at it.
2018-03-06 11:28:41 +01:00
Anthony Ramine
85950a801f Move #[css(iterable)] on fields rather than variants 2018-03-06 11:08:19 +01:00
Anthony Ramine
f5393cef8d Add some assertions for #[derive(ToCss)] on enums 2018-03-06 11:08:19 +01:00
Anthony Ramine
3b31ec36f1 Don't use Ident for #[css(function)]
CSS identifiers aren't Rust identifiers.
2018-03-06 11:08:19 +01:00
Anthony Ramine
529a30a682 Extract variant code to its own function in style_derive::to_css 2018-03-06 11:08:19 +01:00
Anthony Ramine
14dd4217fa Qualify path to ToCss in #[derive(ToCss)] 2018-03-06 11:08:19 +01:00
Anthony Ramine
2aa5f68c92 Derive ToCss for FontSize 2018-03-05 15:53:16 +01:00
Anthony Ramine
ca45695db1 Introduce #[css(skip)] 2018-03-05 15:53:15 +01:00
Anthony Ramine
c4cfb127b8 Use darling::util::Override in #[derive(ToCss)] 2018-03-05 13:23:33 +01:00
Anthony Ramine
75b05c518d Derive ToCss for DeclaredValueOwned rather than DeclaredValue 2018-03-05 12:02:32 +01:00
Anthony Ramine
247bcbbbd6 Derive ToCss for all vector longhands that cannot be empty
We don't need to check for emptiness and write `none` for them.
2018-03-05 12:02:31 +01:00
Anthony Ramine
31036d6510 Derive ToCss for MediaList
This uncovered the fancy snowflake `use fmt::Write` in the impl of ToCss
for NonTSPseudoClass.
2018-03-05 12:02:31 +01:00
Anthony Ramine
fb8b6fc0a5 Derive ToCss for CounterBound 2018-03-05 12:02:30 +01:00
Anthony Ramine
0b3a5b42ba Introduce enum CounterBound for the bounds in counter_style::Ranges 2018-03-05 12:02:25 +01:00
bors-servo
fbeb5a81a8
Auto merge of #20194 - emilio:ascii-ext-stuff, r=nox
style: remove unused AsciiExt imports.

eq_ignore_ascii_case is not in AsciiExt since rustc 1.23.

<!-- 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/20194)
<!-- Reviewable:end -->
2018-03-04 13:35:04 -05:00
bors-servo
ec3aa8bd7a
Auto merge of #20182 - paulrouget:ctrl_l, r=jdm
Prompt URL on Cmd/Ctrl-L

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

The `sanitize_url` code is very naive. I'm sure we can do better.
This ServoShell issue describes the problem: https://github.com/paulrouget/servoshell/issues/59

I can fix that now if someone can help me figure out how to tell if a string is a valid url which is just missing a scheme. Or we can do that in a follow up.

---
<!-- 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 #20165

<!-- 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/20182)
<!-- Reviewable:end -->
2018-03-04 12:48:30 -05:00
bors-servo
1783e41f34
Auto merge of #20191 - jfkthame:font-shorthand-resets-variation-settings, r=emilio
style: Make 'font' shorthand reset 'font-variation-settings' property

As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.

- [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).

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because font-variation-settings isn't supported in servo; it is implemented here for gecko/stylo, and will be tested by mozilla-central mochitests.

<!-- 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/20191)
<!-- Reviewable:end -->
2018-03-04 11:50:56 -05:00
Emilio Cobos Álvarez
39a3d93b4f
style: remove unused AsciiExt imports.
eq_ignore_ascii_case is not in AsciiExt since rustc 1.23.
2018-03-04 15:31:06 +01:00
bors-servo
a716dfd40b
Auto merge of #20192 - servo:derive-all-the-things, r=emilio
Derive ToCss for DeclaredValue

<!-- 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/20192)
<!-- Reviewable:end -->
2018-03-04 09:29:01 -05:00
Anthony Ramine
886554dba5 Derive ToCss for DeclaredValue 2018-03-04 15:21:11 +01:00
Anthony Ramine
1937f594ac Implement ToCss for UnparsedValue 2018-03-04 15:16:09 +01:00
Jonathan Kew
33ead015b1 style: Make 'font' shorthand reset the 'font-variation-settings' property.
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.
2018-03-04 12:26:32 +00:00
bors-servo
86a7010082
Auto merge of #20189 - servo:squared-distance-for-real, r=emilio
Never store a squared root in SquaredDistance

<!-- 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/20189)
<!-- Reviewable:end -->
2018-03-03 20:11:41 -05:00
Anthony Ramine
6ce5e9a869 Never store a squared root in SquaredDistance 2018-03-04 02:10:44 +01:00
Emilio Cobos Álvarez
9ace0e43ce
style: Cleanup indentation in a couple places. 2018-03-04 01:07:29 +01:00
Emilio Cobos Álvarez
50a299f82c
style: Don't guard the context opacity keywords with the svg in opentype pref.
This is effectively the stylo version of the second patch for bug 1365926, and
should fix bug 1442867.
2018-03-04 01:07:20 +01:00
Emilio Cobos Álvarez
f422c7dca4
style: Assert sanity in GeckoNode::as_document. 2018-03-03 23:52:52 +01:00
Emilio Cobos Álvarez
56fc1a6649
style: Account for a few more cases in the node's debug-formatting code. 2018-03-03 23:52:51 +01:00
Emilio Cobos Álvarez
a19219ec79
style: Add also a containing_shadow API. 2018-03-03 23:52:50 +01:00
Emilio Cobos Álvarez
2f0df1b421
style: Add bindings for ShadowRoot.
This adds TShadowRoot to the `dom` module.

Right now it barely adds uses of it, but this is a prerequisite to fix a bunch
of Shadow DOM bugs and separate it from the XBL mess.
2018-03-03 23:52:49 +01:00
bors-servo
df079286c2
Auto merge of #20187 - emilio:font-optical-sizing, r=emilio
style: Add font-optical-sizing property.

Patch by Jonathan Kew <jkew@mozilla.com>.

Bug: 1435692
Reviewed-by: emilio

<!-- 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/20187)
<!-- Reviewable:end -->
2018-03-03 15:10:30 -05:00
Emilio Cobos Álvarez
865a14cf0f
style: Update bindings. 2018-03-03 20:42:41 +01:00
Jonathan Kew
93b7d01324
style: Add font-optical-sizing property.
Bug: 1435692
Reviewed-by: emilio
2018-03-03 20:42:40 +01:00
bors-servo
95f81d0c39
Auto merge of #20183 - servo:computed-as-clone, r=emilio
Unconditionally derive ToComputedValue as Clone for non-generic types

We assume that types such as `<Self as ToComputedValue>::ToComputedValue == Self`
just construct a new value that is just a clone of the original one without any
additional code.

<!-- 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/20183)
<!-- Reviewable:end -->
2018-03-03 14:15:17 -05:00
bors-servo
5bfd74e42d
Auto merge of #20180 - emilio:moar-refcount-hackery, r=jdm
style: Copy less urls for stylo.

Bug: 1442246
Reviewed-by: jdm
MozReview-Commit-ID: NmHue1mGDq

<!-- 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/20180)
<!-- Reviewable:end -->
2018-03-03 13:25:15 -05:00
Anthony Ramine
b517bcd42b Unconditionally derive ToComputedValue as Clone for non-generics
We assume that types such as `<Self as ToComputedValue>::ToComputedValue == Self`
just construct a new value that is just a clone of the original one without any
additional code.
2018-03-03 18:41:50 +01:00
Emilio Cobos Álvarez
569dde72d0
style: Fix text-emphasis-style conversion.
Was accidentally broken in #20178 and is causing orange.
2018-03-03 18:22:27 +01:00
Emilio Cobos Álvarez
98e4c08c64
style: Update bindings. 2018-03-03 18:18:22 +01:00
Emilio Cobos Álvarez
da94feb11a
style: Copy less URLs on stylo.
Bug: 1442246
Reviewed-by: jdm
MozReview-Commit-ID: NmHue1mGDq
2018-03-03 18:18:22 +01:00
Anthony Ramine
15dcd8a8ea Derive ToCss for ViewportLength 2018-03-03 16:15:24 +01:00