Commit graph

25860 commits

Author SHA1 Message Date
UK992
9b35fd9472 Add support for Visual Studio 2017 2017-04-11 23:31:22 +02:00
bors-servo
e6a89899b0 Auto merge of #16344 - hiikezoe:animation-only-restyle-fix, r=emilio,heycam
Call process_animation only if it's not animation-only restyles

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1354426

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's for stylo.

<!-- 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/16344)
<!-- Reviewable:end -->
2017-04-11 14:16:21 -05:00
Pu Xingyu
6c5dfdf19b layout: Fix intrinsic inline size calculating of inline blocks
When calculating intrinsic inline sizes of an inline block, take its
nested inline parents into account.
2017-04-12 02:42:18 +08:00
bors-servo
df67977704 Auto merge of #16342 - emilio:media-query-parsing, r=SimonSapin
Fix a few media query parsing bugs.

<!-- 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/16342)
<!-- Reviewable:end -->
2017-04-11 10:12:13 -05:00
bors-servo
2544c08521 Auto merge of #16334 - chenpighead:stylo-image-orientation-support, r=bholley
Stylo - support image-orientation property

First, we need to make Servo's image-orientation parser to be agreed with Gecko's.
Numbers without any AngleUnit, including unitless 0 angle, should be invalid
for image-orientation. However, rotate() and skew() for transform properties
accept unitless 0 angle. In order to make all these properties work properly,
I fixed Angle::parse() to match Gecko. For the existing users of Angle::parse(),
I create Angle::parse_with_unitless() and use it as an alternative for them.
Once https://github.com/w3c/csswg-drafts/issues/1162 is resolved, we shall be
able to use an unified version of Angle::parse() then.

The parser of image-orientation is also fixed to report parsing errors on
empty string.

Then, with the newly added binding functions support in Gecko side, we shall
reuse the same methods from Gecko to pass the computed value from Servo to Gecko.

Gecko bug: Bug 1341758

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

<!-- 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/16334)
<!-- Reviewable:end -->
2017-04-11 09:37:21 -05:00
bors-servo
bbfaa2316a Auto merge of #16350 - mrobinson:remove-show-compositor-borders, r=emilio
Remove the show-compositor-borders debug option

This was used by the old compositor of which only the ghostly echoes of
old commits remain. Since it's been unused for quite some time, it is
probably safe to remove it.

<!-- 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 do not change functionality.

<!-- 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/16350)
<!-- Reviewable:end -->
2017-04-11 09:01:33 -05:00
Martin Robinson
e7c79b22eb Remove the show-compositor-borders debug option
This was used by the old compositor of which only the ghostly echoes of
old commits remain. Since it's been unused for quite some time, it is
probably safe to remove it.
2017-04-11 15:57:57 +02:00
Jeremy Chen
76b48c3c41 Stylo - add glue code for initial-letter property 2017-04-11 21:09:09 +08:00
Jeremy Chen
5332d4b265 Stylo - support image-orientation property
First, we need to make Servo's image-orientation parser to be agreed with Gecko's.
Numbers without any AngleUnit, including unitless 0 angle, should be invalid
for image-orientation. However, rotate() and skew() for transform properties
accept unitless 0 angle. In order to make all these properties work properly,
I fixed Angle::parse() to match Gecko. For the existing users of Angle::parse(),
I create Angle::parse_with_unitless() and use it as an alternative for them.
Once https://github.com/w3c/csswg-drafts/issues/1162 is resolved, we shall be
able to use an unified version of Angle::parse() then.

The parser of image-orientation is also fixed to report parsing errors on
empty string.

Then, with the newly added binding functions support in Gecko side, we shall
reuse the same methods from Gecko to pass the computed value from Servo to Gecko.

Gecko bug: Bug 1341758
2017-04-11 19:23:43 +08:00
Jeremy Chen
b5a003246e Stylo - update bindings. 2017-04-11 19:23:41 +08:00
tamamu
f91b3d4cf6 Fix serialization when the second value is identical to the first 2017-04-11 18:59:31 +09:00
Emilio Cobos Álvarez
78a3408405
Fix a few media query parsing bugs.
MozReview-Commit-ID: 6nUd2vA6zO
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-11 16:51:34 +08:00
cku
10c8dbdefd stylo: Correct computed value of mask-image. 2017-04-11 16:44:44 +08:00
Hiroyuki Ikezoe
27405bd0b6 Don't call process_animations during animation-only restyles. 2017-04-11 16:42:18 +09:00
Hiroyuki Ikezoe
c316594bd3 Rename cascade_with_replacements to replace_rules.
That's because the function does not invoke cascade() at all.
2017-04-11 16:32:00 +09:00
bors-servo
ca3cd64d6b Auto merge of #16338 - Wafflespeanut:byte, r=jdm
Disable bytecode generation in mach

Recently, [@]froydnj had some trouble with `mach`, and after half an hour of struggle, a simple `git clean` and `git reset --hard` seemed to fix the issue. Apparently, sometimes (though I'm not sure when, and I don't even have a convincing argument), the changes to `mach` scripts don't really seem to reflect on the related bytecode files (when it absolutely should've!).

Having bytecode files is just a matter of optimization (i.e., we don't have to compile the scripts again), but when it comes to our simple build system, "not having them" doesn't add a great overhead. So, we could just disable their creation to avoid such issues in the future.

Existing users can do `find ./python -name '*.pyc' -delete` for a cleanup (and maybe remove the `python/_virtualenv` directory too, though not necessary)

<!-- 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/16338)
<!-- Reviewable:end -->
2017-04-10 17:53:37 -05:00
bors-servo
4013e9d7a0 Auto merge of #16285 - stshine:inline-block-margin, r=emilio
layout: Use the margin box of an inline block when computing the inline size

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

When computing the inline size of an inline block in inline formating
context, use the margin box of the underling block.

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

<!-- 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/16285)
<!-- Reviewable:end -->
2017-04-10 15:07:06 -05:00
bors-servo
3620e755a9 Auto merge of #16319 - canaltinova:element, r=upsuper
stylo: Add -moz-element support

Implemented -moz-element for background property.
r=upsuper

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

<!-- 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/16319)
<!-- Reviewable:end -->
2017-04-10 14:08:04 -05:00
Ravi Shankar
c8e43958ad Disable bytecode generation in mach 2017-04-10 23:09:07 +05:30
Pu Xingyu
dd26148d43 Use the margin box of an inline block when computing the inline size
When computing the inline size of an inline block in inline formating
context, use the margin box of the underling block.
2017-04-10 23:00:16 +08:00
bors-servo
638e1dc40b Auto merge of #16325 - KiChjang:fix-formdata-wpt, r=cbrewster
Fix formdata-blob.htm

The other failure is a legitimate WPT bug, will fix upstream.

<!-- 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/16325)
<!-- Reviewable:end -->
2017-04-10 09:27:01 -05:00
tamamu
a864300a57 Remove the serialization tests 2017-04-10 20:09:33 +09:00
tamamu
4253d6390a Mark disable_when_testing 2017-04-10 20:08:54 +09:00
bors-servo
10f51165c4 Auto merge of #16327 - servo:jdm-patch-3, r=jdm
Double number of WPT processes for Linux builders.

<!-- 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/16327)
<!-- Reviewable:end -->
2017-04-10 04:40:18 -05:00
bors-servo
a0a60ba61d Auto merge of #16328 - bradwerth:computedStyles, r=heycam
Stylo: Add FFI interfaces for exposing style sources.

https://bugzilla.mozilla.org/show_bug.cgi?id=1346256
https://reviewboard.mozilla.org/r/119044/

<!-- 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/16328)
<!-- Reviewable:end -->
2017-04-10 04:04:54 -05:00
Brad Werth
bfc7e84767 Stylo: Add FFI interfaces for exposing style sources.
MozReview-Commit-ID: BlAb8sQ5WYl
2017-04-10 16:40:46 +08:00
bors-servo
dafa6c94eb Auto merge of #16333 - Manishearth:stylo-metrics, r=heycam
stylo: support font metrics

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

<!-- 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/16333)
<!-- Reviewable:end -->
2017-04-10 01:35:18 -05:00
Keith Yeung
912ac622e7 Follow the spec in giving blobs a 'blob' name attribute 2017-04-09 23:30:40 -07:00
Manish Goregaokar
25667d0321 stylo: Use gecko's font metrics 2017-04-10 14:29:51 +08:00
Manish Goregaokar
1154600dd4 stylo: Add bindings for fetching font metrics from Gecko 2017-04-10 14:16:02 +08:00
bors-servo
a4605855f0 Auto merge of #16332 - servo:jdm-patch-5, r=emilio
data-url.html is no longer intermittent.

As far as I can tell this test consistently fails and the ini file was removed unintentionally.

<!-- 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/16332)
<!-- Reviewable:end -->
2017-04-10 00:53:58 -05:00
Josh Matthews
3f83dd6b87 data-url.html is no longer intermittent. 2017-04-10 15:38:43 +10:00
Josh Matthews
65f076b3b0 Double number of WPT processes for Linux builders. 2017-04-10 14:31:10 +10:00
bors-servo
80f6160580 Auto merge of #16315 - jryans:at-page-stylo, r=xidorn
Stylo: @page support

Reviewed by upsuper in https://bugzilla.mozilla.org/show_bug.cgi?id=1345206.

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

<!-- 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/16315)
<!-- Reviewable:end -->
2017-04-09 21:47:59 -05:00
Keith Yeung
b5722e50bb Provide MIME type data for File in formdata::get_file 2017-04-09 17:34:16 -07:00
tamamu
bfa408255f Add place-items shorthand property (it fails unit-test) 2017-04-10 04:38:23 +09:00
Nazım Can Altınova
9618363e08
stylo: Add -moz-element support 2017-04-09 21:25:48 +03:00
tamamu
b6cbd31b73 Add place-self shorthand property (it fails unit-test) 2017-04-10 03:16:04 +09:00
tamamu
d6f4c8c6dd Add place-content shorthand property 2017-04-10 02:58:02 +09:00
bors-servo
d77d752990 Auto merge of #16316 - Manishearth:stylo-threadsafe, r=emilio
stylo: Make font base size computation threadsafe

r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1351200

<!-- 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/16316)
<!-- Reviewable:end -->
2017-04-09 06:15:51 -05:00
Manish Goregaokar
2febe7ccde stylo: Use font metrics provider as a cache for font size results 2017-04-09 19:15:37 +08:00
Manish Goregaokar
e402c72d0e stylo: Store font metrics provider in thread local style context 2017-04-09 19:15:35 +08:00
bors-servo
949931ec0c Auto merge of #16293 - emilio:refactor-selectors, r=bholley
style: Refactor the selectors crate to remove ad-hoc logic.

Also refactors a lot of the restyle hint code to use these new hooks, and removes a lot of hacks in servo that shouldn't be needed because of correct handling of restyles due to attribute changes.

I just smoketested this, so going for a full try run now.

<!-- 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/16293)
<!-- Reviewable:end -->
2017-04-09 05:17:55 -05:00
Emilio Cobos Álvarez
8dfef0416f
selectors: Remove unused visit_simple_selectors. 2017-04-09 18:15:56 +08:00
Emilio Cobos Álvarez
96ee4c7c66
selectors: Remove unused AFFECTED_BY_ATTRIBUTE_SELECTORS. 2017-04-09 18:15:55 +08:00
Emilio Cobos Álvarez
53cad6227e
script: Map HTMLCanvasElement width and height attributes. 2017-04-09 18:15:53 +08:00
Emilio Cobos Álvarez
df29d02026
script: Remove now-unused function.
MozReview-Commit-ID: Cnw5dlczJxv
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-09 18:15:52 +08:00
Emilio Cobos Álvarez
0ea58d1ffa
style: Stop special-casing a few attributes for style sharing, and use a visitor to track dependencies.
Also, simplify all the pre-snapshot attribute hacks in the script and style
code.

MozReview-Commit-ID: 6c9ipeb7Tnr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-09 18:15:50 +08:00
J. Ryan Stinnett
579bc36c96 Update Gecko bindings for @page support 2017-04-09 17:49:52 +08:00
J. Ryan Stinnett
a9ecebbe32 Servo glue for @page rule
Expose new glue functions and types on the Servo side for working with @page
rules from Gecko.

MozReview-Commit-ID: 5g13YldTr9
2017-04-09 17:49:44 +08:00