Commit graph

14203 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
d30c4fe79d Use SMIL override value that has been processed during animation-only restyles for normal restyle.
In the case where we process an element which has SMIL animations in normal travesal
the SMIL styles must have been computed in animation-only restyles. So we
have only to pick the computed styles instead of recomputing it.
2017-05-24 11:11:26 +09:00
bors-servo
96d6b30eff Auto merge of #16998 - bzbarsky:fix-contain-flags, r=emilio
The 'contain' property can affect whether a box is a fixed-pos containing block

This makes will-change:contain work correctly.

<!-- 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/16998)
<!-- Reviewable:end -->
2017-05-23 16:52:31 -05:00
bors-servo
5e58c52272 Auto merge of #17005 - emilio:backdrop-fixup, r=emilio
stylo: Fixup an embarrassing typo that has turned everything orange.

I messed up when turning the conditions the other way around in #16981.

<!-- 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/17005)
<!-- Reviewable:end -->
2017-05-23 10:50:13 -05:00
bors-servo
f35c7a577d Auto merge of #16990 - emilio:selector-map, r=upsuper
Remove dead code in restyle_hints submodule, and move SelectorMap to its own submodule.

<!-- 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/16990)
<!-- Reviewable:end -->
2017-05-23 08:40:37 -05:00
Emilio Cobos Álvarez
ec6d7e855d
stylo: Fixup an embarrassing typo that has turned everything orange. 2017-05-23 14:50:27 +02:00
Emilio Cobos Álvarez
e51ca0958e
style: Add a SelectorMapEntry trait. 2017-05-23 14:48:06 +02:00
Emilio Cobos Álvarez
a67e880256
style: Move SelectorMap to its own submodule. 2017-05-23 14:48:04 +02:00
Emilio Cobos Álvarez
bc8382ebe9
style: Use a FnvHashMap for ExtraStyleData, and remove unused stuff from PerDocumentStyleDataImpl. 2017-05-23 14:47:18 +02:00
Emilio Cobos Álvarez
5749886336
style: Remove dead code in restyle_hints module. 2017-05-23 14:47:16 +02:00
bors-servo
84c1f904cb Auto merge of #16985 - emilio:cache, r=bholley
layout: Stop mutating the style data from layout.

This is part of #16982.

Right now we have some code that tries to cache stuff in the style data during
layout.

This code is extremely rarely executed, only for `<details>` and `<summary>`.

I think if we really really want to cache these, we should find a place in the
layout data for it.

For now, let's move it away (and all the other layout code) from mutating the
style data from layout.

<!-- 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/16985)
<!-- Reviewable:end -->
2017-05-23 06:35:16 -05:00
bors-servo
e24d96cdd0 Auto merge of #16983 - emilio:indir-data, r=nox
style: Remove unneeded indirection in traversal code.

<!-- 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/16983)
<!-- Reviewable:end -->
2017-05-23 04:58:53 -05:00
bors-servo
17069f4876 Auto merge of #16981 - emilio:backdrop, r=heycam
Bug 1366427: Make backdrop not inherit from the parent element. r=heycam

<!-- 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/16981)
<!-- Reviewable:end -->
2017-05-23 02:25:07 -05:00
bors-servo
e8f9ab51ca Auto merge of #16979 - manfredbrandl:patch-1, r=emilio
remove unused style::restyle_hints::RestyleReplacements

<!-- Please describe your changes on the following line: -->
remove unused style::restyle_hints::RestyleReplacements from line 134

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

<!-- Either: -->
- [X] These changes do not require tests because removes only unused "use"

<!-- 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/16979)
<!-- Reviewable:end -->
2017-05-23 00:31:15 -05:00
bors-servo
edd6c2cecb Auto merge of #16779 - behnam:bidi-0.3, r=mbrubeck
[gfx] [layout] [style] Upgrade unicode-bidi to 0.3

Depends on https://github.com/servo/unicode-bidi/pull/27 , which
upgrades `unicode-bidi` crate to `0.3.0`.

Summary of changes:

* Use `unicode_bidi::Level` (instead of `u8`) in all relevant places and
replace magic computations with (inline) method calls to Level API.

* Doing so required adding `unicode-bidi` crate dependency to two more
components here: `style` and `gfx`. IMHO, totally makes sense, as
replaces local integer manipulations/checks with well-tested ones
already available in a common dependency.

---
<!-- 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). [N/A]

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because `unicode-bidi` has its own tests and there's no logic change in this diff.

<!-- 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/16779)
<!-- Reviewable:end -->
2017-05-22 23:06:07 -05:00
Boris Zbarsky
7518f5155d The 'contain' property can affect whether a box is a fixed-pos containing block.
This makes will-change:contain work correctly.
2017-05-22 22:10:55 -04:00
bors-servo
1306b16d5a Auto merge of #16968 - HeyZoos:stylist-accessors, r=emilio
Stylist accessors

<!-- Please describe your changes on the following line: -->
Add accessor methods for the `device` and `ruleset` fields in the `Stylist` struct.

---
<!-- 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 #16857 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/16968)
<!-- Reviewable:end -->
2017-05-22 20:12:46 -05:00
Behnam Esfahbod
14c524df4f [gfx] [layout] [style] Upgrade unicode-bidi to 0.3 2017-05-22 20:06:19 -05:00
bors-servo
a03d0b8472 Auto merge of #16947 - nox:moz-alt-content, r=Wafflespeanut
Parse -moz-alt-content as a whole content value (fixes #15726)

<!-- 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/16947)
<!-- Reviewable:end -->
2017-05-22 16:46:30 -05:00
bors-servo
a0d6d6883c Auto merge of #16916 - asajeffrey:constellation-top-level-browsing-contexts, r=cbrewster
Added a TopLevelBrowsingContextId type.

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

Added a `TopLevelBrowsingContextId` type, which is a subtype of `BrowsingContextId` that only refers to top-level browsing contexts.

---
<!-- 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 do not require tests because refactoring

<!-- 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/16916)
<!-- Reviewable:end -->
2017-05-22 15:13:42 -05:00
bors-servo
e9c5860808 Auto merge of #16996 - bzbarsky:backout-webkit-appearance, r=bzbarsky
Back out webkit-appearance support in stylo for now.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1365614 for web compat issues this causes.

<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1365614

<!-- 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/16996)
<!-- Reviewable:end -->
2017-05-22 13:36:36 -05:00
Mats Palmgren
e8ba41379b Back out webkit-appearance support in stylo for now.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1365614 for web compat issues this causes.
2017-05-22 12:47:29 -04:00
bors-servo
9a5e6fb553 Auto merge of #16994 - servo:derive-all-the-things, r=emilio
Refactor basic shapes and fix a silly bug

<!-- 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/16994)
<!-- Reviewable:end -->
2017-05-22 11:37:28 -05:00
bors-servo
594479fe15 Auto merge of #16970 - MaloJaffre:grid_cleanup, r=wafflespeanut
Refactor grid style types and impls

Fixes #16949.
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's just a refactor

<!-- 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/16970)
<!-- Reviewable:end -->
2017-05-22 09:42:20 -05:00
Alan Jeffrey
42577365b7 Added a TopLevelBrowsingContextId type. 2017-05-22 09:27:07 -05:00
Anthony Ramine
66aa38e1a1 Fix serialisation of computed circles 2017-05-22 14:03:14 +02:00
Anthony Ramine
a65c874ec8 Refactor basic shapes 2017-05-22 14:03:12 +02:00
Anthony Ramine
499e81410f Parse -moz-alt-content as a whole content value (fixes #15726) 2017-05-22 13:59:36 +02:00
bors-servo
b428a94326 Auto merge of #16962 - hiikezoe:prefixed-intrinsic-size-value, r=Manishearth
Prefixed intrinsic size value

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

This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1355402
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16788
- [X] These changes do not require tests because it's for stylo

<!-- 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/16962)
<!-- Reviewable:end -->
2017-05-22 01:46:01 -05:00
bors-servo
8cd4330b2a Auto merge of #16959 - hiikezoe:font-serialization-for-canvas, r=Manishearth,emilio
Font serialization for canvas

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1362914
---
<!-- 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 do not require tests because it's for stylo

<!-- 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/16959)
<!-- Reviewable:end -->
2017-05-21 23:22:35 -05:00
bors-servo
b42ee29c1b Auto merge of #16958 - kvark:no-batch, r=jdm
-Z wr-no-batch option

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

This new debug option exposes https://github.com/servo/webrender/pull/1186

---
<!-- 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 _____ it's a debug option

<!-- 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/16958)
<!-- Reviewable:end -->
2017-05-21 19:07:40 -05:00
Hiroyuki Ikezoe
36a87bc19d Update bindings. 2017-05-22 07:30:47 +09:00
Hiroyuki Ikezoe
e7b777384c Drop initial values of properties other than font-size and font-family in serialization of canvas font attribute.
According to the canvas spec [1], we must drop initial values other than
font-size and font-family when we serialize canvas font attribute.
As for font-size and font-family, the default values, '10px sans-serif' [2]
are not dropped at all.

[1] https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-font
[2] https://html.spec.whatwg.org/multipage/scripting.html#canvastextdrawingstyles
2017-05-22 07:16:23 +09:00
Hiroyuki Ikezoe
7330dab51f Factor out PropertyDeclaration only iterator. 2017-05-22 07:16:23 +09:00
bors-servo
d40b26202d Auto merge of #16988 - emilio:backout, r=emilio
Revert "Auto merge of #16976 - upsuper:bug1366247, r=nox" for breaking the world.

This reverts commit 3d40b516c8, reversing
changes made to 255387a915.

<!-- 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/16988)
<!-- Reviewable:end -->
2017-05-21 15:40:41 -05:00
Emilio Cobos Álvarez
1f7d48f564
Revert "Auto merge of #16976 - upsuper:bug1366247, r=nox"
This reverts commit 3d40b516c8, reversing
changes made to 255387a915.
2017-05-21 21:29:50 +02:00
bors-servo
460c90af8d Auto merge of #16956 - mbrubeck:cleanup, r=Manishearth
stylo: Use correct counts when copying from image layers.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are code cleanup.

<!-- 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/16956)
<!-- Reviewable:end -->
2017-05-21 14:09:52 -05:00
Malo Jaffré
72db1765d0 Refactor grid style types and impls
Fixes #16949.
2017-05-21 20:46:45 +02:00
Emilio Cobos Álvarez
e17e001b0f
style: Remove now-unused cached_pseudos field. 2017-05-21 17:40:34 +02:00
Emilio Cobos Álvarez
a8fe5d65d4
layout: Stop mutating the style data from layout.
This is part of #16982.

Right now we have some code that tries to cache stuff in the style data during
layout.

This code is extremely rarely executed, only for `<details>` and `<summary>`.

I think if we really really want to cache these, we should find a place in the
layout data for it.

For now, let's move it away (and all the other layout code) from mutating the
style data from layout.
2017-05-21 17:40:33 +02:00
bors-servo
0566c60157 Auto merge of #16984 - emilio:lop-parsing-mode, r=canaltinova
Bug 1365629: Respect parsing mode in LengthOrPercentage. r=canaltinova

<!-- 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/16984)
<!-- Reviewable:end -->
2017-05-21 10:36:54 -05:00
Emilio Cobos Álvarez
911d307f8f
Bug 1365629: Respect parsing mode in LengthOrPercentage. r=canaltinova 2017-05-21 17:02:42 +02:00
Emilio Cobos Álvarez
d5f8b91d91
style: Remove unneeded indirection in traversal code. 2017-05-21 16:47:22 +02:00
bors-servo
a25b1e5fe3 Auto merge of #16973 - servo:derive-all-the-things, r=emilio
Derive ToComputedValue

<!-- 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/16973)
<!-- Reviewable:end -->
2017-05-21 08:48:10 -05:00
Anthony Ramine
07c0456cfd Derive ToComputedValue
For now, only impls for types like in style::values::generics can be derived.

This also needed a few ToComputedValueAsSpecified impls that I would like to
replace by some #[to_computed_value(clone)] attribute, but I think it is ok
to keep it like this for now.
2017-05-21 15:31:17 +02:00
Emilio Cobos Álvarez
71dbc6c023
Bug 1366427: Make backdrop not inherit from the parent element. r=heycam
MozReview-Commit-ID: EnnmvDsgbdx
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-21 15:19:01 +02:00
bors-servo
3d40b516c8 Auto merge of #16976 - upsuper:bug1366247, r=nox
Add sugar for already_AddRefed

This is Servo side change of [bug 1366247](https://bugzilla.mozilla.org/show_bug.cgi?id=1366247).

<!-- 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/16976)
<!-- Reviewable:end -->
2017-05-21 05:28:58 -05:00
Manfred Brandl
cb846e0b86 remove unused style::restyle_hints::RestyleReplacements
solve #16978
2017-05-21 12:25:25 +02:00
bors-servo
255387a915 Auto merge of #16945 - hiikezoe:update-css-animations-by-css-rule-changes, r=birtles,heycam
Update css animations by css rule changes

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

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo

<!-- 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/16945)
<!-- Reviewable:end -->
2017-05-21 03:07:47 -05:00
Xidorn Quan
e30e676658 Update binding file. 2017-05-21 18:03:48 +10:00
Xidorn Quan
2b1f7f6081 Add sugar for already_AddRefed and use it for conversion between Atom and nsIAtom pointer. 2017-05-21 18:03:47 +10:00