Commit graph

16155 commits

Author SHA1 Message Date
cku
cc67f37d4e Stylo: Add new Gecko_XXXImageValue functions and remove unsed ones in binding.rs 2017-05-16 02:34:18 +08:00
cku
f9b370719d Stylo: Pass style list's image_value to gecko. 2017-05-16 02:34:16 +08:00
Josh Matthews
b0bf2b4bad Make methods storing layout-originating nodes unsafe. 2017-05-15 14:12:08 -04:00
Josh Matthews
2ca80a800f Warn about ignored transitions which can't be rooted. 2017-05-15 14:12:08 -04:00
Josh Matthews
9134918844 Send information to script as part of finishing layout.
This avoids the need for multiple layout RPC operations immediately
following return of control to script. This means that layout and
script can continue to operate in parallel at this point, rather
than one potentially waiting on the shared mutex to be unlocked.
2017-05-15 14:12:08 -04:00
Josh Matthews
c3b9714ab7 Accumulate transitioning nodes inside the layout context. 2017-05-15 14:11:40 -04:00
Josh Matthews
dabebdfbf5 Root nodes for the duration of their CSS transitions.
This ensures that we can pass a node address as part of the asynchronous
transition end notification, making it safe to fire the corresponding
DOM event on the node from the script thread. Without explicitly rooting
this node when the transition starts, we risk the node being GCed before
the transition is complete.
2017-05-15 14:07:41 -04:00
cku
ff5043c8b5 Stylo: Pass cursor's image_value to gecko. 2017-05-16 01:42:33 +08:00
cku
c04195f79e Stylo: Pass content's image_value to gecko. 2017-05-16 01:42:32 +08:00
cku
f7e3c534e3 Stylo: Pass LayerImage's image_value to gecko. 2017-05-16 01:42:31 +08:00
cku
2fe55e82d3 Stylo: Let SpecifiedUrl be able to carry ImageValue. 2017-05-16 01:42:30 +08:00
Bobby Holley
bf242088c7 Use a SmallVec when gathering applicable declarations. 2017-05-15 18:36:38 +02:00
Boris Zbarsky
cd29916c99 Fix dynamic updates when :dir matching changes in stylo.
This is the servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1364280
2017-05-15 12:31:49 -04:00
bors-servo
f3c8f7e0d0 Auto merge of #16869 - nox:mime, r=nox
Ignore mime type parameters in nosniff (fixes #16049)

<!-- 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/16869)
<!-- Reviewable:end -->
2017-05-15 10:15:37 -05:00
bors-servo
eb7314b412 Auto merge of #16859 - nox:gradients, r=emilio
Rewrite style images with a good dose of generics 💉

<!-- 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/16859)
<!-- Reviewable:end -->
2017-05-15 09:13:38 -05:00
Anthony Ramine
dd38bba1be Pass the gradient compatibility mode to gecko 2017-05-15 15:36:28 +02:00
Anthony Ramine
ea4e7299d4 Implement -webkit-gradient() (fixes #16542) 2017-05-15 15:36:26 +02:00
Anthony Ramine
9e6f9db127 Reorganise specified::image::GradientItem methods 2017-05-15 15:36:24 +02:00
Anthony Ramine
c9d140121d Accept strings in -moz-image-rect() (fixes #16823) 2017-05-15 15:36:23 +02:00
Anthony Ramine
73f77e0a53 Rename LayerImage to ImageLayer and make it a type alias 2017-05-15 15:36:21 +02:00
Anthony Ramine
fa5b46b6ee Clean up methods on specified::Image 2017-05-15 15:36:19 +02:00
Anthony Ramine
abef5da9d8 Refactor Gradient
In a similar way to Position, now specified and computed gradients share
a common Gradient type defined in style::values::generics::image.

This allows us to reuse most code for many style traits like ToCss,
HasViewportPercentage and ToComputedValue.

The test changes are the fallout of the disappearance of AngleOrCorner::None,
which align our code to the spec for serialisation, where components that can
be omitted should be omitted.
2017-05-15 15:36:15 +02:00
Anthony Ramine
f2aaba685b Kill side keywords from style::values::specified::image 2017-05-15 15:35:31 +02:00
Anthony Ramine
1c54758ad6 Introduce style::values::generics::image 2017-05-15 15:35:26 +02:00
cku
373307f9c2 Stylo: Change mask-repeat initial value from no-repeat to repeat. 2017-05-15 21:01:29 +08:00
Fabrice Desré
990b85049e Ignore mime type parameters in nosniff
This patch implements the following changes:
- Only check for the toplevel/sublevel part of the mime type when
  deciding if it's a js or css resource, ignoring the mime parameters.
- Fix the wpt tests that did not escape url parameters properly and
  also used an invalid syntax for the mime parameter.
- Update the wpt manifest.
2017-05-15 14:43:45 +02:00
bors-servo
5cd8265f9a Auto merge of #16835 - ferjm:bug1350175.line.column.css.rules, r=upsuper,SimonSapin
Stylo: Bug 1350175 - Support getting line / column number of CSS rules

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1350175

<!-- 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/16835)
<!-- Reviewable:end -->
2017-05-15 05:28:50 -05:00
Brian Birtles
49bc7b9e69 Add add() method to Animatable interface 2017-05-15 12:53:14 +09:00
Brian Birtles
2f07b29296 Rewrite interpolate() in terms of a more general add_weighted() function
Generalizing the procedure like this will allow us to re-use it for addition of
most types.
2017-05-15 12:26:21 +09:00
bors-servo
8366b4d4f9 Auto merge of #16855 - emilio:rem-root, r=upsuper
style: Set root font-size right after cascading font-size

This way rem in the root element works as expected.

This fixes layout/reftests/css-valuesandunits/unit-rem-root-width.html in Gecko.

<!-- 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/16855)
<!-- Reviewable:end -->
2017-05-14 18:53:28 -05:00
Nazım Can Altınova
85fb3efd76
stylo: -moz-image-region shouldn't parse unitless lengths in quirks mode 2017-05-14 21:01:46 +03:00
Emilio Cobos Álvarez
51166375c6
style: Set root font-size right after cascading font-size
This way rem in the root element works as expected.

This fixes layout/reftests/css-valuesandunits/unit-rem-root-width.html in Gecko.
2017-05-14 16:27:12 +02:00
bors-servo
dab2df3565 Auto merge of #16853 - upsuper:font-feature-settings-serialization, r=emilio
Fix serialization of font-feature-settings

<!-- 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/16853)
<!-- Reviewable:end -->
2017-05-13 23:56:25 -05:00
bors-servo
94ac822132 Auto merge of #16819 - canaltinova:quirk-mode, r=bholley,emilio
stylo: Propagate quirks mode information from Gecko to Servo

r=bholley in bugzilla

---
<!-- 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 [Bug 1360488](https://bugzilla.mozilla.org/show_bug.cgi?id=1360488)

<!-- 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/16819)
<!-- Reviewable:end -->
2017-05-13 20:50:10 -05:00
Xidorn Quan
7d37804eac Fix serialization of font-feature-settings 2017-05-14 10:52:28 +10:00
Hiroyuki Ikezoe
48f6821516 Update bindings. 2017-05-14 08:46:35 +09:00
Nazım Can Altınova
c54d255d07
stylo: Propagate quirks mode information from Gecko to Servo 2017-05-14 01:51:50 +03:00
Hiroyuki Ikezoe
59dd93f849 Add PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES to force to parse negative values.
As per SVG spec [1], we should also parse negative color components values for
SMIL, but currently Gecko does not support it either.

[1] https://www.w3.org/TR/SVG/implnote.html#RangeClamping
2017-05-14 07:15:19 +09:00
Hiroyuki Ikezoe
b6b3187efa Make ParsingMode bitflags.
assert_parsing_mode_match() is mostly the same as
assert_restyle_hints_match().
2017-05-14 07:15:19 +09:00
Hiroyuki Ikezoe
fcc50ea421 Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength.
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.
2017-05-14 07:15:19 +09:00
bors-servo
b80d4acef4 Auto merge of #16844 - bradwerth:stylesheet64, r=heycam
Servo-side change stylesheet_set entry unique_id to u64

https://bugzilla.mozilla.org/show_bug.cgi?id=1363572
https://reviewboard.mozilla.org/r/138092/

---
<!-- 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/16844)
<!-- Reviewable:end -->
2017-05-13 16:13:13 -05:00
bors-servo
4613c0382a Auto merge of #16829 - hiikezoe:disallow-negative-duration, r=emilio
Disallow negative duration for animation and transition

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

<!-- Either: -->
- [X] There are tests for these changes written by @simon-whitehead . Thank you!

<!-- 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/16829)
<!-- Reviewable:end -->
2017-05-13 15:12:15 -05:00
Hiroyuki Ikezoe
8742ce29cb Update bindings. 2017-05-14 03:59:43 +09:00
Hiroyuki Ikezoe
285da1b621 Add clear method for LonghandIdSet. 2017-05-14 03:58:26 +09:00
bors-servo
5e5d3559d9 Auto merge of #16852 - servo:illegal_floating_point_literal_pattern, r=jdm+SimonSapin
Fix illegal_floating_point_literal_pattern again and rustup…

… to compiler that has it, to avoid regressing again.

Upgrade to (rustc 1.19.0-nightly (e17a1227a 2017-05-12)

<!-- 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/16852)
<!-- Reviewable:end -->
2017-05-13 11:25:07 -05:00
Simon Sapin
dd38c0969d Fix illegal_floating_point_literal_pattern again and rustup…
… to compiler that has it, to avoid regressing again.
2017-05-13 14:23:25 +02:00
bors-servo
34d0e59849 Auto merge of #16845 - asajeffrey:script-rename-browsing-contexts, r=jdm
Renamed BrowsingContext to WindowProxy in script.

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

Renamed `script::dom::BrowsingContext` to `script::dom::WindowProxy`.

The browsing context is mostly maintained in the constellation, not in script. It would be nice to rename `constellation::Frame` to `constellation::BrowsingContext`, but that will be very confusing if there are two `BrowsingContext` types.

---
<!-- 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 renamings aren't externally visible

<!-- 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/16845)
<!-- Reviewable:end -->
2017-05-13 07:09:29 -05:00
bors-servo
e83e102736 Auto merge of #16827 - upsuper:subprop-font-feature-settings, r=Manishearth
Make font-feature-settings a subprop of font

<!-- 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/16827)
<!-- Reviewable:end -->
2017-05-13 04:40:18 -05:00
Xidorn Quan
5b4f0686c7 Make font-feature-settings a subprop of font 2017-05-13 17:26:23 +10:00
bors-servo
9be1fead3c Auto merge of #16843 - froydnj:bindgen-cross-compile, r=emilio
explicitly specify bitness for x86 cross-compilation situations

Despite compiling for architecture X, the user may have specified a
clang that defaults to architecture Y.  We need to ensure that we invoke
clang with the correct architecture selection.  We do not use --target
to do this, however, because that runs into problems with LLVM's default
search paths.  For the x86 case, we can simply use -m$BITNESS to select
the correct architecture.

This is not at all a general solution, but it does unblock compiling Stylo for 32-bit Linux on Gecko's infra.

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

<!-- 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/16843)
<!-- Reviewable:end -->
2017-05-13 02:03:19 -05:00