Commit graph

21094 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
1ab56c0ccd resources: Style anonymous blocks and anonymous table flows
appropriately in the UA stylesheet.
2016-10-26 14:14:02 -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
bors-servo
2b236c20cd Auto merge of #13927 - glennw:update-wr-texture-layers, r=emilio
Update WR - texture layers, image mask, profiler, optimizations.

<!-- 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/13927)
<!-- Reviewable:end -->
2016-10-26 01:25:57 -05:00
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
bors-servo
4a151fd2d8 Auto merge of #13922 - servo:jdm-patch-1, r=emilio
Disable events-004.html

<!-- 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/13922)
<!-- Reviewable:end -->
2016-10-25 19:00:09 -05:00
Josh Matthews
1ab0d0fa6c Disable c5525-fltblck.htm 2016-10-25 19:59:52 -04:00
Mathieu Rheaume
943233afd6 Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
Josh Matthews
2992501db6 Disable events-004.htm 2016-10-25 16:10:09 -04:00
Josh Matthews
6f17394e93 Disable events-004.html 2016-10-25 14:52:47 -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
Emilio Cobos Álvarez
60e0ccf17d
Test for localeCompare. 2016-10-25 12:28:36 +02: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
30039f2cdc
readme: List yasm as a build-time dependency for Servo. 2016-10-25 01:11:14 +02:00
Emilio Cobos Álvarez
9682c0cd3a
Update mozjs_sys to expose proper locale callbacks.
Fixes #13788
2016-10-25 01:11:13 +02:00
Glenn Watson
04139b8dd6 Update test expectations.
Disabled the filter test due to an apparent rounding bug in mesa softpipe. We still have coverage
of contrast in other tests in the same directory.
2016-10-25 07:57:07 +10: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
bors-servo
94ab5905f8 Auto merge of #13818 - frewsxcv:selected-index, r=KiChjang
Implement `selectedIndex` property on `<select>`.

<!-- 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/13818)
<!-- Reviewable:end -->
2016-10-24 13:40:16 -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
bors-servo
cf0218fe4e Auto merge of #13905 - mmatyas:update_heartbeats, r=Ms2ger
Update heartbeats-simple-sys to v0.3.2

<!-- Please describe your changes on the following line: -->
Update heartbeats-simple-sys to pick up libheartbeats/heartbeats-simple-sys#17.

(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/13905)
<!-- Reviewable:end -->
2016-10-24 06:44:57 -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