Commit graph

12031 commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
684545b396
script: Also do so for element owners. 2017-01-28 14:47:10 +01:00
Emilio Cobos Álvarez
9b06932535
script: Fix base url for style-rule-owned declarations. 2017-01-28 14:47:10 +01:00
Emilio Cobos Álvarez
dd90366775
script: Refactor CSSStyleDeclaration and fix some bugs in the way. 2017-01-28 14:47:09 +01:00
bors-servo
b5c94bad37 Auto merge of #14971 - asajeffrey:script-track-active-documents, r=cbrewster
Constellation informs script about documents becoming inactive, active or fully active.

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

This PR replaces the current freeze/thaw mechanism by messages from the constellation to script informing it about when documents become inactive, active or fully active.

This means we can now implement |Document::is_active()| which is used in |document.write|.

This PR also changes how timers work: previously they were initialized running, and were then frozen/thawed. This means there was a transitory period when timers were running even though the document was not fully active. With this PR, timers are initially suspended, and are only resumed when the document is made fully active.

---
<!-- 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 #14876
- [X] These changes do not require tests because it's an interal refactoring.

<!-- 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/14971)
<!-- Reviewable:end -->
2017-01-27 16:30:37 -08:00
Alan Jeffrey
ca9cee084e Fix document.write check for activity. 2017-01-27 17:25:40 -06:00
bors-servo
d4ee8a3599 Auto merge of #15269 - Maaarcocr:master, r=emilio
Substituing quickersort with pdqsort

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

I have been working on issue number #15244. I have substituted quickersort with pdqsort in the style component. The changes I made affect: Cargo.toml, stylist.rs and lib.rs (all of them are in /components/style).

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because both library expose the same functionality, they differ in permance.

<!-- 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/15269)
<!-- Reviewable:end -->
2017-01-27 15:11:42 -08:00
bors-servo
b38da9b920 Auto merge of #15246 - andreastt:webdriver-optional-timeout, r=jgraham
Allow script timeouts to be optional and associate timeouts with session state

These changes let WebDriver script timeouts be optional and associated all timeout state with the session. Because the durations are currently associated with the handler which is never reset, they bleed across to any subsequent WebDriver sessions.

See each individual commit for more information.

---
- [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 _Servo needs more work before it can pass the WPT WebDriver tests_

<!-- 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/15246)
<!-- Reviewable:end -->
2017-01-27 13:08:04 -08:00
Marco Concetto Rudilosso
07f04ced2e changed quickersort with pdqsort 2017-01-27 18:42:22 +00:00
Alan Jeffrey
a43c842099 The constellation notifies the script thread about documents becoming inactive, active and fully active. 2017-01-27 12:39:43 -06:00
bors-servo
a1187c12ee Auto merge of #15262 - alon:master, r=Ms2ger
dom/document: scripting_enabled can be a bool. #15260

Fix #15260 - scripting_enabled can be a bool

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15260

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because - there were no tests previously (not a real good excuse :)

<!-- 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/15262)
<!-- Reviewable:end -->
2017-01-27 08:57:38 -08:00
bors-servo
556a46f537 Auto merge of #15245 - andreastt:webdriver-caps, r=jdm
Correct capabilities returned by WebDriver server

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

These patches aligns Servo’s capabilities with those in the [WebDriver standard](https://w3c.github.io/webdriver/webdriver-spec.html). See each commit’s message for further information.

---
<!-- 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 _Servo needs more work before it can pass WPT WebDriver tests_

<!-- 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/15245)
<!-- Reviewable:end -->
2017-01-27 08:01:29 -08:00
bors-servo
ba7696ebc6 Auto merge of #15220 - nox:kill-parser-pipeline, r=SimonSapin,jdm
Kill ServoParser::pipeline

<!-- 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/15220)
<!-- Reviewable:end -->
2017-01-27 04:19:24 -08:00
Anthony Ramine
d8238646a0 Kill ServoParser::pipeline 2017-01-27 12:12:21 +01:00
bors-servo
cfba589e64 Auto merge of #15242 - servo:refpol, r=nox
Simplify handling of the referrer policy header 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/15242)
<!-- Reviewable:end -->
2017-01-27 02:27:38 -08:00
Alon Levy
d966f1fae2 dom/document: scripting_enabled can be a bool. #15260 2017-01-27 12:01:27 +02:00
bors-servo
5af74c38fc Auto merge of #15238 - servo:clip_rect, r=emilio
Remove unused InProgressLoad::clip_rect.

<!-- 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/15238)
<!-- Reviewable:end -->
2017-01-27 01:31:47 -08:00
bors-servo
1795374007 Auto merge of #15234 - heycam:bindings-update-19, r=emilio
Regenerate bindings and tweak some geckolib code for it.

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

Regenerate bindings for latest mozilla-central -> stylo merge.  I had to tweak somethings in build_gecko.rs to get it to compile with the new bindgen, which then resulted in me having to tweak a bit in glue.rs.  Not sure if there's a better way than what I've done here.  (Note that the name `RawServoAnimationValueBorrowedList` is a little misleading, since it's naming a Gecko type (nsTArray) with Servo types (ServoAnimationValue pointers) inside it.)

r? @emilio

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

<!-- 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/15234)
<!-- Reviewable:end -->
2017-01-27 00:36:30 -08:00
bors-servo
d3daad327f Auto merge of #15231 - bholley:align_self, r=upsuper
Remove out-of-date handling for align-self in Gecko builds.

See #15229.

<!-- 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/15231)
<!-- Reviewable:end -->
2017-01-26 23:06:25 -08:00
bors-servo
d77465b166 Auto merge of #15226 - dashed:gh-15208, r=emilio
Fix text-overflow serialization.

Fixes https://github.com/servo/servo/issues/15208

- [x] **More tests pending PR review.**
- [x] **Correct placement of unit test**

<!-- 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 #15208 (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/15226)
<!-- Reviewable:end -->
2017-01-26 21:41:23 -08:00
bors-servo
1395b72884 Auto merge of #15225 - DexterHaslem:fix-transform-none, r=emilio
fix transform: none serialization

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

As mentioned I struggled a bit figuring out the unit tests, please let me know if I missed anything or if there is a better way as usual! I will likely give the related implementing the rest of serialization for transform a shot next

---
<!-- 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 #15195 (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/15225)
<!-- Reviewable:end -->
2017-01-26 20:08:08 -08:00
bors-servo
efff0a9418 Auto merge of #15187 - montrivo:webidl-exposed, r=jdm
Partial - Expose interfaces only where they should be. #12415

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

Reviewed webidl interfaces:

Location.webidl
MediaError.webidl
MimeTypeArray.webidl
MimeType.webidl
PageTransitionEvent.webidl
PluginArray.webidl
Plugin.webidl
PopStateEvent.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: -->
- [ ] 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/15187)
<!-- Reviewable:end -->
2017-01-26 16:06:57 -08:00
tim
5f31c178b6 Expose interfaces only where they should be. #12415 2017-01-26 22:13:49 +01:00
bors-servo
5427e68572 Auto merge of #15178 - canaltinova:calc, r=Wafflespeanut
Fix serialization of CalcLengthOrPercentage

<!-- 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 #15168 (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/15178)
<!-- Reviewable:end -->
2017-01-26 12:46:08 -08:00
bors-servo
0fa5f2e21f Auto merge of #15212 - upsuper:filter-drop-shadow, r=emilio
Use whitespace to separate params of drop-shadow

<!-- 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/15212)
<!-- Reviewable:end -->
2017-01-26 11:48:06 -08:00
Andreas Tolfsen
90d1ee7602 webdriver_server: allow script timeout to be optional
The script timeout duration may be set to null, indicating that an
injected script should run indefinitely without getting interrupted.
This change fixes the internal data structure, but does not address the
parsing of the input arguments to handle_set_timeouts.
2017-01-26 19:44:18 +00:00
Andreas Tolfsen
e87c275de0 webdriver_server: associate timeouts with session
The WebDriver timeout configuration durations should be associated with
the session so that they do not bleed across sessions.  Since they are
currently stored on the WebDriverHandler, a call to the SetTimeouts
command will cause them to affect the subsequent session.
2017-01-26 18:48:52 +00:00
bors-servo
9c5abebd47 Auto merge of #15172 - upsuper:border-image-slice, r=Wafflespeanut
Add space before keyword for border-image-slice

<!-- 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/15172)
<!-- Reviewable:end -->
2017-01-26 10:48:22 -08:00
Andreas Tolfsen
e4abc811b9 webdriver_server: rename acceptSslCerts to acceptInsecureCerts
The WebDriver standard never defined acceptSslCerts, but it was used
by legacy Selenium implementations.  The standard does however define a
slightly more negative-sounding capability called acceptInsecureCerts,
which to greater extent warns users about what its consequences are.
2017-01-26 18:40:11 +00:00
Andreas Tolfsen
8653ef77c2 webdriver_server: remove non-conforming screenshot capabilities
The WebDriver standard no longer specifies that the takeScreenshot and
takeElementScreenshot capabilities since it is assumed that all driver
implementations must support these features.
2017-01-26 18:40:11 +00:00
bors-servo
36fc07d9c4 Auto merge of #15170 - upsuper:column-rule, r=Wafflespeanut
Correct serialization of column-rule shorthand

<!-- 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/15170)
<!-- Reviewable:end -->
2017-01-26 09:50:19 -08:00
bors-servo
88cd8a3cf0 Auto merge of #15179 - servo:alter_resource_utilization, r=nox
Refactor away ScriptThread::alter_resource_utilization().

It's used in two places, one of which already has access to the Window.

<!-- 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/15179)
<!-- Reviewable:end -->
2017-01-26 08:30:56 -08:00
Ms2ger
a689cf1d34 Refactor away ScriptThread::alter_resource_utilization().
It's used in two places, one of which already has access to the Window.
2017-01-26 16:57:00 +01:00
Ms2ger
5b97632132 Simplify handling of the referrer policy header in ScriptThread::load(). 2017-01-26 14:37:11 +01:00
Ms2ger
b9e7aae9a2 Remove unused InProgressLoad::clip_rect. 2017-01-26 12:35:37 +01:00
Cameron McCormack
2f39b49e22 Regenerate bindings and tweak some geckolib code for it. 2017-01-26 17:32:08 +08:00
bors-servo
58f4804ef5 Auto merge of #15183 - servo:font-family, r=nox
Fix parsing and serialization of font-family

<!-- 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 #15059 (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/15183)
<!-- Reviewable:end -->
2017-01-26 01:18:00 -08:00
bors-servo
e4a1cb6f87 Auto merge of #15175 - BorisChiou:animation/interpolate_and_cascade, r=heycam
Interpolate servo animation values and add them to the cascade

These are the servo-side changes for [bug 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209). @Manishearth, @emilio, and @heycam have already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/15175)
<!-- Reviewable:end -->
2017-01-25 23:36:33 -08:00