Commit graph

12070 commits

Author SHA1 Message Date
Manish Goregaokar
c0e1a1f963 Ensure that gradients have at least 2 stops 2017-01-31 22:23:00 -08:00
Manish Goregaokar
5117b7ec5a Preallocate in deduplicate_property_declarations 2017-01-31 16:43:57 -08:00
Hiroyuki Ikezoe
35192b03c3 Assert if there is an important declaration while collecting animated properties in keyframes.
Parser has already dropped it.
2017-02-01 07:33:37 +09:00
Hiroyuki Ikezoe
a80725c91b Allow empty keyframe and keyframes with non-animatable properties.
We need to create CSS animations that have empty keyframe or keyframes
which have only invalid properties or non-animatable properties to fire
animation events for such animations.
2017-02-01 07:06:38 +09:00
bors-servo
8421ae6077 Auto merge of #15111 - glennw:wr-update-generate, r=pcwalton
Update WR (radial gradients, generate_frame API, mac subpixel improvements, ANGLE shader support).

<!-- 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/15111)
<!-- Reviewable:end -->
2017-01-31 11:49:18 -08:00
Glenn Watson
4cbefe82b5 Update WR (radial gradients, subpixel positioning, tiling changes). 2017-02-01 05:40:44 +10:00
Ms2ger
f376f9c2d7 Improve the readability of dictionaries' new() method. 2017-01-31 16:37:31 +01:00
bors-servo
166b304840 Auto merge of #15288 - emilio:style-attr-restyle, r=SimonSapin
Refactor more stuff in preparation for special handling for restyling using the style attribute

<!-- 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/15288)
<!-- Reviewable:end -->
2017-01-30 14:54:26 -08:00
Emilio Cobos Álvarez
0b2c32a45a
style: Temporarily force selector matching for style attribute restyles.
The test failures on try were because of this.
2017-01-30 23:53:55 +01:00
Emilio Cobos Álvarez
f48328edfe
style: Remove a bit of unused code. 2017-01-30 23:53:54 +01:00
Emilio Cobos Álvarez
314f2ce714
style: Define a CascadeLevel enum, and make the rule tree operate on it.
We'll use this level to know where to stop replacing nodes in the tree.
2017-01-30 23:53:53 +01:00
Emilio Cobos Álvarez
31ecc9b692
script: Don't avoid all the mutation notification methods when the style attribute changes.
Styling was correct because of the explicit dirtiness, but still not fun.

Some things, like dynamic updates to with things like [style~="color"] ~ foo
selectors, were pretty broken, because we didn't take snapshots of those
attributes.
2017-01-30 19:24:42 +01:00
Emilio Cobos Álvarez
cb304fd42c
script: insert the restyle attribute restyle hint when a style attribute is modified. 2017-01-30 19:24:42 +01:00
Emilio Cobos Álvarez
d37e6f8c66
script: Propagate the attribute into the document's element_attr_will_change method. 2017-01-30 19:24:42 +01:00
Emilio Cobos Álvarez
7a9cdbb857
style: Add a style attribute restyle hint. 2017-01-30 19:24:41 +01:00
Andreas Tolfsen
96ce7dbba2 webdriver_server, constellation, libservo, servo: upgrade webdriver and backtrace
Upgrades to webdriver v0.20.0 and backtrace v0.3
2017-01-30 17:05:48 +00:00
bors-servo
81712560ca Auto merge of #15300 - servo:blob-fragment, r=Wafflespeanut
Remove unused part of the return value of parse_blob_url().

<!-- 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/15300)
<!-- Reviewable:end -->
2017-01-30 06:21:46 -08:00
Ms2ger
f4ab3ac54d Remove unused part of the return value of parse_blob_url(). 2017-01-30 15:16:27 +01:00
bors-servo
cc2011c050 Auto merge of #15264 - servo:content-type, r=nox
Always set the Document::contentType attribute in ScriptThread::load().

<!-- 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/15264)
<!-- Reviewable:end -->
2017-01-30 05:33:14 -08:00
Ms2ger
69e3173047 Always set the Document::contentType attribute in ScriptThread::load().
There's no good reason to limit this to a few particular content types.
2017-01-30 12:43:49 +01:00
Atheed Thameem
cbe0810e63 removed unused import 2017-01-29 12:52:49 -05:00
bors-servo
1c1aaa5a88 Auto merge of #14556 - iamrohit7:fix-set-device, r=SimonSapin,Emilio
Make Stylist::set_device check stylesheet media queries

Fixes Stylist::set_device to check for media queries in stylesheets.

<!-- 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 #14279  (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/14556)
<!-- Reviewable:end -->
2017-01-29 04:06:03 -08:00
Rohit Burra
325271ec83 Changes Stylist::set_device to check for mediaqueries in Stylesheets 2017-01-29 17:11:26 +05:30
bors-servo
e58ef9115f Auto merge of #15289 - montrivo:webidl-exposed, r=cbrewster
Expose interfaces only where they should be. #12415 - Partial

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

I verified the following interfaces:
CSSStyleDeclaration.webidl
ElementCSSInlineStyle.webidl
ElementContentEditable.webidl
EventHandler.webidl
Screen.webidl
StyleSheetList.webidl
StyleSheet.webidl
Client.webidl

---
<!-- 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 #12415 (github issue number if applicable).

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

<!-- 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/15289)
<!-- Reviewable:end -->
2017-01-29 00:00:19 -08:00
bors-servo
dfcfc1d2c1 Auto merge of #15278 - atheed:zero-parsing, r=Wafflespeanut
Parsing "0" as Number for line-height and border-image-outset

Fixes #15171 by correctly parsing `0` as `0` (rather than as `0px`, as was the case earlier) for the `line-height` and `border-image-outset` CSS properties. Wrote unit tests for both; `./mach test-unit -p style` passes all tests.

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

<!-- Either: -->
- [X] There are tests for these changes.

<!-- 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/15278)
<!-- Reviewable:end -->
2017-01-28 22:18:44 -08:00
bors-servo
0459e1a6dd Auto merge of #15287 - hiikezoe:css-animation, r=heycam
Counter part of bug 1328787 - Stylo: Convert Servo's animation keyframes and store them into Gecko's keyframes

<!-- Please describe your changes on the following line: -->
Reviewed by @heycam, An exception is auto-generated bindgen stuff, I did not include it in patches on bugzilla.  The bindgen diff included in this PR was generated with  b5c94bad37.  It might be bit-rotted.

---
<!-- 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 gecko has test cases.

<!-- 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/15287)
<!-- Reviewable:end -->
2017-01-28 21:24:04 -08:00
bors-servo
67c1826382 Auto merge of #15120 - asajeffrey:script-windows-share-browsing-contexts, r=jdm
Allow windows to share browsing contexts.

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

This PR allows different `Window` objects in the same browsing context to share a `BrowsingContext` object.

SpiderMonkey requires a `WindowProxy` object to be in the same compartment as its `Window`, so when a `WindowProxy` changes `Window`, we have to brain-transplant it. In turn this requires the reflector of a `BrowsingContext` to be mutable.

---
<!-- 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 #13608 and #14843
- [X] These changes do not require tests because an existing test catches this (`/html/browsers/the-window-object/Window-document.html` is now `PASS`)

<!-- 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/15120)
<!-- Reviewable:end -->
2017-01-28 20:35:39 -08:00
Alan Jeffrey
403499a9d5 Allow windows to share browsing contexts. 2017-01-28 21:57:03 -06:00
Alan Jeffrey
fc67878edf Remove warnings about unnecessary mutability. 2017-01-28 21:48:07 -06:00
bors-servo
fdf0833ec2 Auto merge of #15271 - mbrubeck:root, r=notriddle
Initialize block_container_inline_size for non-block root flows

Fixes #14948. Fixes #14945.  Needs a try run.  r? @notriddle

<!-- 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/15271)
<!-- Reviewable:end -->
2017-01-28 19:18:53 -08:00
bors-servo
ec12b7665b Auto merge of #15268 - mbrubeck:sideways, r=upsuper
Make text-orientation:sideways-right an alias for sideways in Gecko

Fixes #15214. r? @upsuper

<!-- 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/15268)
<!-- Reviewable:end -->
2017-01-28 17:24:47 -08:00
bors-servo
b9e675cdad Auto merge of #15280 - emilio:negative-leaks, r=bholley
Bug 1334579: Ensure constructors for nsStyleContentData run.

Reviewed upstream by @bholley

<!-- 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/15280)
<!-- Reviewable:end -->
2017-01-28 16:30:08 -08:00
montrivo
d5c6c24d2a Expose interfaces only where they should be. #12415 - Partial 2017-01-29 01:29:29 +01:00
Hiroyuki Ikezoe
90571eaa54 Bug 1328787 - Part 11: The last keyframe's KeyframePercentage is 1.0. r=heycam
MozReview-Commit-ID: Hgsc45m9401
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
2bfa0f7a2d Bug 1328787 - Part 10: Set Keyframe.mPropertyValues for the case where keyframe is not specified. r=heycam 2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
aa6372d99d Bug 1328787 - Part 9: Set Keyframe.mPropertyValues for the case where keyframe is specified. r=heycam
MozReview-Commit-ID: Ayt7IsYShl4
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
e20a3ad9b5 Bug 1328787 - Part 8: Animation timing function can be overridden by animation-timing-function specified in keyframe. r=heycam 2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
51faa53ee2 Bug 1328787 - Part 7: Implement From for specified TransitionTimingFunction. r=heycam
Now animation-timing-function in keyframe is stored as specified
TransitionTimingFunction.  We need a way to convert it to nsTimingFunction too.

MozReview-Commit-ID: C8j5PmJFm2i
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
b7d7ec233b Update bindgen.
MozReview-Commit-ID: FDASu6yG306
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
a4cafe7106 Bug 1328787 - Part 6: Update build_gecko.rs and bindings. r=heycam
'RawServoDeclarationBlock' in structs_types in build_gecko.rs and the change in
conversion.rs are needed for using set_arc_leaky() for
PropertyValuePair.mServoDeclarationBlock. Without this change,
mServoDeclarationBlock.set_arc_leaky() is called against RawServoDeclarationBlockVoid.

MozReview-Commit-ID: FZkZ0OclXcP
2017-01-29 09:07:41 +09:00
bors-servo
cd0a6b98f4 Auto merge of #15115 - Wafflespeanut:lop, r=emilio
Introduce the `NoCalcLength`

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

I began this for making the `CalcLengthOrPercentage` represent `LengthOrPercentage` (instead of the enum we already have), but only later did I realize that it will make `LengthOrPercentageOrFoo` types fatty (which is the problem we're trying to avoid - #15061) and so, I dropped that attempt. Along the way, I introduced an internal type for `Length`, for representing all its non-calc variants (which are `Copy`). We could still have this type for the `LengthOrPercentageOrFoo` types which don't really need  `Length` since they already have their own variants for calc.

r? @Manishearth @emilio @SimonSapin or anyone interested

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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

<!-- 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/15115)
<!-- Reviewable:end -->
2017-01-28 14:08:38 -08:00
Ravi Shankar
8d09d64856 Change LengthOrPercentageOrAutoOrContent to use NoCalcLength 2017-01-29 02:30:39 +05:30
Ravi Shankar
39ae0bbf47 Change LengthOrPercentageOrNone to use NoCalcLength 2017-01-29 02:30:37 +05:30
Ravi Shankar
bdb08b9a82 Change LengthOrPercentageOrAuto to make use of NoCalcLength 2017-01-29 02:30:34 +05:30
Ravi Shankar
590c9579f0 Change LengthOrPercentage to make use of NoCalcLength 2017-01-29 02:30:25 +05:30
bors-servo
73bb75989f Auto merge of #15157 - emilio:bug-1332969, r=bholley
Bug 1332969: stylo: Synchronously do a style update when the device changes

Ideally this would be lazy, but eventually we're going to need to restyle in
RebuildAllStyleData anyway, which would require us to have the style up to date,
so no need to complicate our lives.

r? @heycam or @upsuper or @bholley

<!-- 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/15157)
<!-- Reviewable:end -->
2017-01-28 12:56:50 -08:00
Ravi Shankar
377a23df50 Refactor and modify stuff to make use of NoCalcLength 2017-01-29 02:04:24 +05:30
Ravi Shankar
4035bbd738 Split the Length type (introduce NoCalcLength) 2017-01-28 23:33:00 +05:30
Atheed Thameem
beeca1213c implement parsing of line_height and border_image_outset to parse plain zero as Number 2017-01-28 08:51:31 -05:00
Emilio Cobos Álvarez
684545b396
script: Also do so for element owners. 2017-01-28 14:47:10 +01:00