Commit graph

11803 commits

Author SHA1 Message Date
bors-servo
a70af60eec Auto merge of #15063 - Wafflespeanut:calc, r=heycam
Cleaning up CalcLengthOrPercentage

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

We don't really need enum variants in `CalcLengthOrPercentage`. Given that we already have the information (whether it's `vw`, `ch`, etc.) in the struct fields, we could just store `Option<CSSFloat>` there, and modify our `ToCss` implementation a bit.

cc #15061

r? @Manishearth 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/15063)
<!-- Reviewable:end -->
2017-01-17 02:18:15 -08:00
Ravi Shankar
6cf9fc0813 Prefer CSSFloat instead of enum variants in CalcLoP 2017-01-17 11:34:16 +05:30
bors-servo
7c1112408e Auto merge of #15056 - upsuper:blockify-none, r=emilio
Never blockify display: none

<!-- 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/15056)
<!-- Reviewable:end -->
2017-01-16 18:01:43 -08:00
Xidorn Quan
5d2bb99d49 Never blockify display: none 2017-01-17 11:32:09 +11:00
bors-servo
a4551d0cee Auto merge of #15047 - emilio:click-regression, r=notriddle,emilio
gfx: Don't mutate the same point multiple times while translating it …

…to other stacking context space.

I don't know how neither review or a test caught this.

r? @pcwalton  or @notriddle

Fixes #15015

<!-- 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/15047)
<!-- Reviewable:end -->
2017-01-16 15:46:05 -08:00
bors-servo
b9c6f9f76e Auto merge of #15040 - Manishearth:stylo-supports, r=heycam
stylo: support 1-arg CSS.supports()

r=heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1331316

<!-- 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/15040)
<!-- Reviewable:end -->
2017-01-16 13:56:51 -08:00
bors-servo
c8c38249a3 Auto merge of #15018 - emilio:freetype, r=jdm
gfx: Use proper freetype bindings.

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

Needs https://github.com/servo/rust-freetype/pull/48, and https://github.com/servo/webrender/pull/716

<!-- 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/15018)
<!-- Reviewable:end -->
2017-01-16 13:01:59 -08:00
bors-servo
e01417e936 Auto merge of #15031 - emilio:stylo-display-none-pseudo, r=bholley
Bug 1331272: style: Unify restyle-damage display: none checks.

They were formerly different because we used the element check to cull the
traversal.

Now this is no longer true, so we can just unify them.

Also, update a no-longer up-to-date comment on that.

r? @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/15031)
<!-- Reviewable:end -->
2017-01-16 12:07:02 -08:00
Emilio Cobos Álvarez
65c388cd06
gfx: Use proper freetype bindings. 2017-01-16 20:49:07 +01:00
bors-servo
ecd1d2dbc9 Auto merge of #15020 - jdm:external_script_line, r=Ms2ger
Do not use the script element's line number for external scripts.

This was yielding incorrect line numbers when looking at JS backtraces in gdb.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- 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/15020)
<!-- Reviewable:end -->
2017-01-16 11:11:46 -08:00
Florian Merz
65f3ac7d19 Don't translate point for independent stacking contexts
I took the test for hit_test from:
https://github.com/servo/servo/pull/15047/commits/602b45a3724747e1be767605c523c510846cfbf6
Thank you emilio
2017-01-16 19:19:34 +01:00
bors-servo
e891277dd5 Auto merge of #14994 - jdm:callback_rooting, r=Manishearth,Ms2ger
Make WebIDL callbacks permanently rooted

This replicates the same model that Promise uses right now, because it requires less thinking than coming up with something else.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14447
- [ ] There are tests for these changes

<!-- 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/14994)
<!-- Reviewable:end -->
2017-01-16 10:16:44 -08:00
bors-servo
57d6b8ec45 Auto merge of #15039 - heycam:bindings-update-17, r=emilio
stylo: Regenerate bindings.

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

Bindings update for the sync I'll pushed based on https://treeherder.mozilla.org/#/jobs?repo=try&revision=42b2ac6142ddec57f60f4c3c05ec7c7d5aba9533, assuming there's nothing wrong.

r? @Manishearth

<!-- 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/15039)
<!-- Reviewable:end -->
2017-01-16 06:48:07 -08:00
bors-servo
bb540cab63 Auto merge of #15042 - servo:update-regex, r=jdm
Update regex.

<!-- 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/15042)
<!-- Reviewable:end -->
2017-01-16 05:59:18 -08:00
Emilio Cobos Álvarez
602b45a372
gfx: Don't mutate the same point multiple times while translating it to other stacking context space.
I don't know how neither review or a test caught this.
2017-01-16 14:39:55 +01:00
Ms2ger
a1d478fbb7 Update regex. 2017-01-16 13:11:16 +01:00
Manish Goregaokar
98fd42df17 stylo: support 1-arg CSS.supports() 2017-01-16 00:42:52 -08:00
Emilio Cobos Álvarez
6f3957a549
Bug 1331272: style: Unify restyle-damage display: none checks.
They were formerly different because we used the element check to cull the
traversal.

Now this is no longer true, so we can just unify them.

Also, update a no-longer up-to-date comment on that.

MozReview-Commit-ID: FH5GH7NfI8G
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-16 09:39:14 +01:00
Cameron McCormack
6ca0c10e79 stylo: Regenerate bindings. 2017-01-16 16:22:55 +08:00
Xidorn Quan
66af7e4d3a Store blink value for text-decoration-line
The spec does say user agents may not blink, but it doesn't say this
value can be ignored during parsing.
2017-01-16 16:23:11 +11:00
bors-servo
d09bf70d22 Auto merge of #15026 - tydus101:max-session-fix, r=jdm
Max session fix

<!-- Please describe your changes on the following line: -->
Converted document discarding from an opt into a pref. Updated testing docs and changed all uses to pref api.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because current test suite is sufficient

<!-- 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/15026)
<!-- Reviewable:end -->
2017-01-14 15:08:56 -08:00
tyler
0fae39f468 Converted --max-session-history opt into a pref, updated its uses to PREF api
updated test docs
2017-01-14 17:02:53 -05:00
bors-servo
89c020f258 Auto merge of #15028 - cynicaldevil:correction, r=emilio
Minor spelling corrections

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

<!-- Either: -->

<!-- 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/15028)
<!-- Reviewable:end -->
2017-01-14 13:54:01 -08:00
Nikhil Shagrithaya
85439a2935 Minor spelling corrections 2017-01-15 02:39:00 +05:30
bors-servo
4c401e47dc Auto merge of #14999 - Manishearth:stylo-prefs, r=heycam
stylo: Hook property parsing into Gecko prefs

r=heycam, https://bugzilla.mozilla.org/show_bug.cgi?id=1297322

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14999)
<!-- Reviewable:end -->

<!-- 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/14999)
<!-- Reviewable:end -->
2017-01-14 09:23:05 -08:00
Anthony Ramine
9c87cb7e26 Kill beforescriptexecute and afterscriptexecute (fixes #12446) 2017-01-14 16:16:53 +01:00
bors-servo
c2d2c38b0f Auto merge of #15011 - nox:load-fixes, r=jdm
Various script loading fixes

<!-- 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/15011)
<!-- Reviewable:end -->
2017-01-14 06:18:31 -08:00
Anthony Ramine
91717ab17c Implement HTMLScriptElement async attribute 2017-01-14 14:53:04 +01:00
Hiroyuki Ikezoe
f960b4c444 Bug 1330824 - Do not copy animation property over mAnimationXXCount. r=heycam
MozReview-Commit-ID: GeSWnPQltHf
2017-01-14 11:43:35 +09:00
Hiroyuki Ikezoe
f66774b096 Bug 1330824 - Do not set mAnimationNameCount less than 1. r=heycam
animation-name property is 'allow_empty=True', we have to handle 0-length
array case.

MozReview-Commit-ID: LwU3RfhfVfH
2017-01-14 11:42:48 +09:00
Hiroyuki Ikezoe
2d19e67fc4 Bug 1330824 - Add IndexMut for nsStyleAutoArray. r=heycam
MozReview-Commit-ID: 9EU8g4SLoHp
2017-01-14 11:42:23 +09:00
Hiroyuki Ikezoe
ce59a7e9ee Bug 1330824 - Add truncate for nsAString and nsACString. r=mystor
MozReview-Commit-ID: 2ND5ra3buxI
2017-01-14 11:42:22 +09:00
Hiroyuki Ikezoe
b914d41d52 Bug 1330824 - Use impl_copy_animation_value for animation-timing-function. r=heycam
I did forget to do it in bug 1328786.

MozReview-Commit-ID: IDpVShW6nrH
2017-01-14 11:35:58 +09:00
Josh Matthews
6f19b0cd82 Do not use the script element's line number for external scripts. 2017-01-13 17:50:54 -05:00
Manish Goregaokar
05728839f1 stylo: Hook property parsing into Gecko prefs
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:16 -08:00
Manish Goregaokar
296b468801 stylo: Expose property-pref mappings
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:04 -08:00
bors-servo
2fb9a345d6 Auto merge of #15016 - prampey:doc-deactivate, r=cbrewster
Documents now fully deactivate when a freeze message is sent

<!-- Please describe your changes on the following line: -->
Documents now fully deactivate when a freeze message is sent

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minimal 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/15016)
<!-- Reviewable:end -->
2017-01-13 14:15:44 -08:00
bors-servo
a46e630b00 Auto merge of #14968 - Manishearth:stylo-keyframes, r=heycam,birtles
stylo: Store servo computed values for animation properties

Servo counterpart of https://bugzilla.mozilla.org/show_bug.cgi?id=1317208

r=heycam,birtles

<!-- 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/14968)
<!-- Reviewable:end -->
2017-01-13 13:25:39 -08:00
Prudhvi Rampey
584f72d63b Documents now fully deactivate when a freeze message is sent 2017-01-14 01:12:21 +05:30
mrnayak
3d9e44a8c4 Handle crossorigin in link and refactor crossorigin handling
Implemented Step three and handled step four of obtain the resource part
of 4.2.4 The link element.
Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain

Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
2017-01-13 23:35:00 +05:30
Josh Matthews
3f35c3eee2 Add a permanent root to WebIDL callbacks, ensuring they are always safe to store. 2017-01-13 09:59:57 -05:00
Anthony Ramine
3e19b37c83 Don't fire a load event on inline scripts
https://github.com/whatwg/html/issues/1757
2017-01-13 13:50:31 +01:00
Xidorn Quan
679d9dece7 Fix filling of two vector fields for geckolib 2017-01-13 16:43:27 +11:00
bors-servo
cc8bee8f89 Auto merge of #14997 - bholley:bug_1329845, r=heycam
stylo: Various crash fixes

Corresponding gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1329854

<!-- 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/14997)
<!-- Reviewable:end -->
2017-01-12 19:23:17 -08:00
Bobby Holley
e29cd8f532 Bug 1329854 - Avoid propagating the dirty descendants bit when appending items to display:none subtrees. r=heycam 2017-01-12 17:39:54 -08:00
bors-servo
6a04aea4a5 Auto merge of #14989 - notriddle:ellipsis_reflow, r=emilio
Fix the incrmental reflow behavior of text-overflow

This patch allows Servo to incrementally reflow truncated fragments correctly.

* The untruncated version of a fragment is preserved, and when incrementally reflowing, the untruncated version is what gets reflowed. If it needs truncated, it will get truncated again.
* The ellipsis fragments are skipped when incrementally reflowing a line. If it is still needed, it will be recreated.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14952
- [X] There are tests for these changes OR

<!-- 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/14989)
<!-- Reviewable:end -->
2017-01-12 17:31:19 -08:00
bors-servo
38fccce3ba Auto merge of #14992 - servo:rustup, r=jdm
Upgrade to rustc 1.16.0-nightly (2782e8f8f 2017-01-12)

<!-- 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
- [ ] 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/14992)
<!-- Reviewable:end -->
2017-01-12 16:07:54 -08:00
Simon Sapin
5cf10622bb Upgrade to rustc 1.16.0-nightly (2782e8f8f 2017-01-12) 2017-01-12 23:43:02 +01:00
Michael Howell
cef4ebed20 Preserve the un-truncated version of fragments
Fixes #14952
2017-01-12 22:02:53 +00:00
Michael Howell
8a90cda09f Do not replace an ellipsis when reflowing a line
The ellipsis should be replaced, if needed, when the text itself is reflowed.
2017-01-12 21:16:27 +00:00