Commit graph

10381 commits

Author SHA1 Message Date
Patrick Walton
8b138e5e75 style: Remove modify_style_for_anonymous_table_object, now that the
cascade takes care of it.
2016-10-26 14:14:08 -07:00
Patrick Walton
a7f64f3d33 layout: Remove the old anonymous table object generation code. 2016-10-26 14:14:06 -07:00
Patrick Walton
bc2f5864bc layout: Rewrite the anonymous table object generation code.
This patch introduces a "legalizer", which encapsulates all the
anonymous flow generation logic in one place. The legalizer knows how
to, for example, place adjacent blocks with `display: table-cell` in the
same table row.

Improves etsy.com.

Closes #13782.
2016-10-26 14:14:05 -07:00
Patrick Walton
3d645a9253 layout: Don't use BlockFlow::assign_block_size() when assigning flex
flows' block sizes.

This ensures that we never collapse margins for flex flows.
2016-10-26 14:14:04 -07:00
Patrick Walton
fb2d1e1020 layout: Add a new cascading mode that inherits all properties, even
non-inheritable ones.

This works like the `modify_style_for_*` functions and will allow us to
easily migrate from them to real cascading.
2016-10-26 14:14:01 -07:00
Patrick Walton
93e41ba4aa style: Add some new Servo-specific pseudo-classes for anonymous flows.
This allows us to remove `modify_style_for_anonymous_table_object`.
2016-10-26 14:04:16 -07:00
Patrick Walton
92b7189f31 layout: Add a safe way for layout to perform random access on child
flows.

This uses caching to ensure that we perform no more than O(n) pointer
loads.
2016-10-26 14:04:15 -07:00
Patrick Walton
d990a7eb84 layout: Don't leak FlowRefs to the flexbox layout code.
This can cause memory safety problems. Comments have been added to
`flow_list.rs` to prevent this from happening again.
2016-10-26 14:04:14 -07:00
Patrick Walton
179547b68f layout: Make surrounding_intrinsic_inline_size report border/padding
and margin separately.

This makes correct table layout easier.
2016-10-26 14:04:12 -07:00
Patrick Walton
b659753555 layout: Treat flex flows as individual formatting contexts per spec. 2016-10-26 14:04:11 -07:00
Patrick Walton
b809aae74b layout: Add a new MARGINS_CANNOT_COLLAPSE flow flag. 2016-10-26 14:04:10 -07:00
Patrick Walton
be252371ea layout: Refactor Flow::from_fragment-style constructors to be
consistent.
2016-10-26 14:04:08 -07:00
bors-servo
e888b76534 Auto merge of #13923 - pcwalton:inline-absolute-hypothetical-margin, r=SimonSapin
layout: Remove margins from inline absolute hypothetical boxes.

As they're hypothetical, their margins shouldn't take up space!

Improves Google search results.

Closes #13915.

<!-- 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/13923)
<!-- Reviewable:end -->
2016-10-26 12:38:09 -05:00
bors-servo
c8b6ece97b Auto merge of #13913 - bholley:styling_mode, r=emilio
incremental restyle: Introduce StylingMode and deprecate explicit dirtiness

This is another chunk of work to move us toward the new incremental restyle architecture.

Eventually, we'll make a fine-grained decision at each node about what style to recompute based on the RestyleHint on the node data (along with other things). For now, we use the existence of RestyleData as a coarse-grained approximation of this.

<!-- 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/13913)
<!-- Reviewable:end -->
2016-10-26 06:36:06 -05:00
bors-servo
3c16dde1f2 Auto merge of #13902 - Wafflespeanut:keyword, r=emilio
Prefer auto-generation for some keyword props

<!-- 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-geckolib` 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. -->

r? @Manishearth or @emilio

<!-- 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/13902)
<!-- Reviewable:end -->
2016-10-26 02:27:13 -05:00
Ravi Shankar
e7cbd10ece Auto-generate 'image-rendering' using 'single_keyword' 2016-10-26 12:56:11 +05:30
Bobby Holley
05c1f1e016 Introduce StylingMode and deprecate explicit dirtiness.
MozReview-Commit-ID: 5tF075EJKBa
2016-10-26 00:23:18 -07:00
Ravi Shankar
12f429e23b Keyword argument for custom constant mapping 2016-10-26 11:56:54 +05:30
Ravi Shankar
1c34162220 Make use of existing codegen methods for font-* 2016-10-26 11:56:53 +05:30
Ravi Shankar
af8899edf0 Merge keyword and predefined type longhands 2016-10-26 11:56:52 +05:30
Glenn Watson
86eaef237b Update WR - texture layers, image mask, profiler, optimizations. 2016-10-26 12:09:27 +10:00
Patrick Walton
41976c0afc layout: Remove margins from inline absolute hypothetical boxes.
As they're hypothetical, their margins shouldn't take up space!

Improves Google search results.

Closes #13915.
2016-10-25 18:52:17 -07:00
bors-servo
4b28750b9a Auto merge of #13912 - ddrmanxbxfr:remove-deprecated-url-methods, r=Ms2ger
Remove URL.domainToASCII and URL.domainToUnicode

Modifications

- Removed URL.domainToASCII method
- Removed URL.domainToUnicode method
- Added test in wpt to make sure both method are undefined.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13835  (github issue number if applicable).
- [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/13912)
<!-- Reviewable:end -->
2016-10-25 19:46:54 -05:00
Mathieu Rheaume
943233afd6 Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
bors-servo
c8321edc27 Auto merge of #13836 - emilio:js-intl, r=Ms2ger
Update mozjs_sys to expose proper locale callbacks.

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Fixes #13788

<!-- 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/13836)
<!-- Reviewable:end -->
2016-10-25 05:51:03 -05:00
bors-servo
a9715c1f02 Auto merge of #13911 - upsuper:bug1312338, r=Manishearth
Use nsACString to pass string params for bindings

This is the Servo side change of [bug 1312338](https://bugzilla.mozilla.org/show_bug.cgi?id=1312338) which has been reviewed by @Manishearth.

r? @Manishearth

(This should not be merged before the Gecko side code lands in m-c)

<!-- 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/13911)
<!-- Reviewable:end -->
2016-10-25 04:09:19 -05:00
Xidorn Quan
3303a978b9 Use nsACString to pass string params for bindings 2016-10-25 18:22:45 +11:00
bors-servo
6029c927ee Auto merge of #13900 - glennw:update-wr-more-opts, r=pcwalton
Update WR - includes a number of optimizations, bsd build fixes, tidy ups.

<!-- 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/13900)
<!-- Reviewable:end -->
2016-10-24 20:38:23 -05:00
Xidorn Quan
eeada5ac51 Add as_str_unchecked() to nsACString 2016-10-25 10:21:01 +11:00
Emilio Cobos Álvarez
9682c0cd3a
Update mozjs_sys to expose proper locale callbacks.
Fixes #13788
2016-10-25 01:11:13 +02:00
bors-servo
8bd7978980 Auto merge of #13904 - upsuper:bug1311598, r=heycam
Move RawGecko{Node,Element,Document} to bindings

This is the Servo side change of [bug 1311598](https://bugzilla.mozilla.org/show_bug.cgi?id=1311598). This has been approved by @heycam on Bugzilla.

(Please don't merge it before the Gecko side code gets merged into 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/13904)
<!-- Reviewable:end -->
2016-10-24 16:13:27 -05:00
Corey Farwell
bec5bf49bd Implement selectedIndex property on <select>. 2016-10-24 14:14:49 -04:00
bors-servo
f90b256472 Auto merge of #13907 - mmatyas:update_libfontconfig, r=Ms2ger
Update libfontconfig to 4.0.2

<!-- Please describe your changes on the following line: -->
Update libfontconfig to 4.0.2 to pick up servo/libfontconfig#26 and servo/libfontconfig#27.

(This is a fix for servo/servo#13154)

<!-- 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/13907)
<!-- Reviewable:end -->
2016-10-24 09:59:41 -05:00
bors-servo
ca9d24d87e Auto merge of #13906 - mmatyas:update_fontsan, r=nox
Update fontsan

<!-- Please describe your changes on the following line: -->
Update fontsan to pick up servo/fontsan#20.

(This is a fix for servo/servo#13154)

<!-- 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/13906)
<!-- Reviewable:end -->
2016-10-24 09:11:18 -05:00
Mátyás Mustoha
aa4a20fc34 Update libfontconfig to 4.0.2 2016-10-24 13:38:02 +02:00
Mátyás Mustoha
30fee2bde8 Update fontsan 2016-10-24 13:35:08 +02:00
Mátyás Mustoha
5ee92c216c Update heartbeats-simple-sys to v0.3.2 2016-10-24 13:30:24 +02:00
Xidorn Quan
109bf2a755 Move RawGecko{Node,Element,Document} to bindings 2016-10-24 20:43:42 +11:00
bors-servo
f3973a0d3b Auto merge of #13898 - anholt:webgl-texture-fixes, r=emilio
webgl: texture size validation fixes

<!-- Please describe your changes on the following line: -->
This pull request fixes the errors in texture-size-limit.html.

---
<!-- 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: -->
- [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/13898)
<!-- Reviewable:end -->
2016-10-24 00:52:57 -05:00
Glenn Watson
00789210b0 Update WR - includes a number of optimizations, bsd build fixes, tidy ups. 2016-10-24 15:37:21 +10:00
bors-servo
d5e412b3f1 Auto merge of #13873 - mrobinson:remove-nesting, r=glennw
Remove stacking context nesting from WebRender display construction

<!-- 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 should not produce any behavior 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/13873)
<!-- Reviewable:end -->
2016-10-23 21:48:28 -05:00
Eric Anholt
5b852b1cdd webgl: Fix up maximum size validation.
We were checking to see if it was too big to be level 0, but we really
want to see if it's too big to be the given level.

This was the last remaining failure in texture-size-limit.html.
2016-10-23 17:46:10 -07:00
Eric Anholt
2f68297051 webgl: Allow TexImage data argument to be larger than necessary.
texture-size-limit.html is using a large array for all of its calls at
various sizes, and we were throwing errors on the calls that should
have passed.
2016-10-23 17:45:56 -07:00
bors-servo
672545430f Auto merge of #13889 - upsuper:regen-output, r=emilio
Use str for bindgen output directly

r? @emilio

<!-- 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/13889)
<!-- Reviewable:end -->
2016-10-23 18:10:03 -05:00
bors-servo
a1306e1dd3 Auto merge of #13897 - scotttrinh:dom-webidl, r=jdm
Partial fix for #12415: DOM interfaces

<!-- Please describe your changes on the following line: -->
Fix exposure of DOM interfaces. Only two of the interfaces needed changing and I want someone to double check on `DOMException` (which I left exposed to both `Window` and `Worker`), but I used Firefox's definition as my source since the specs don't lay it out explicitly.

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

<!-- Either: -->
- [X] These changes do not require tests because they only remove code.

<!-- 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/13897)
<!-- Reviewable:end -->
2016-10-23 12:21:11 -05:00
Scott Trinh
9af35e8a25 Partial fix for #12415: DOM interfaces 2016-10-23 10:18:12 -04:00
bors-servo
2772626d91 Auto merge of #13895 - lautat:dom-response-clone-step-1, r=KiChjang
Implement Step 1 of Response API Clone Method

<!-- Please describe your changes on the following line: -->
Implements first step of response API Clone method. Response Clone test expectations have been updated. Fixes issue #13888.

---
<!-- 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 #13888.

<!-- 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/13895)
<!-- Reviewable:end -->
2016-10-23 07:55:30 -05:00
Martin Robinson
0a13c05479 Update WebRender to get the latest changes 2016-10-23 13:20:36 +02:00
Martin Robinson
8a12c15582 Produce WR display lists without nested stacking contexts
WebRender now supports display lists that do not use nested stacking
contexts for overflow scroll regions. We can remove a bit of code in
Servo now.
2016-10-23 12:31:01 +02:00
Atte Lautanala
65a7747864 Implement response API Clone step 1 2016-10-23 12:32:48 +03:00