Commit graph

19991 commits

Author SHA1 Message Date
bors-servo
6c68680581 Auto merge of #13122 - Manishearth:basic-shape-position-redux, r=SimonSapin
Handle specialized serialization of <position> in basic shapes

Fixes #13083

We temporarily broke basic-shape serialization in #13042 when 4-value positions were implemented, since I didn't want to increase the scope of that PR too much.

This fixes it.

r? @SimonSapin

cc @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/13122)
<!-- Reviewable:end -->
2016-09-01 12:50:32 -05:00
bors-servo
fbf77e40fe Auto merge of #13121 - emilio:negative-calc, r=SimonSapin
style: Properly track whether negative values of calc() are allowed

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

r? @SimonSapin

---
<!-- 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] 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. -->

In order to clamp them at computed value time.

<!-- 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/13121)
<!-- Reviewable:end -->
2016-09-01 11:41:35 -05:00
bors-servo
e699d9bfad Auto merge of #13151 - Wafflespeanut:mach_cleanup, r=Ms2ger
Make sure that mach gets the correct paths of executables in virtualenv

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

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup related to `mach`

<!-- 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/13151)
<!-- Reviewable:end -->
2016-09-01 06:58:50 -05:00
Ravi Shankar
b579841183 Minor cleanup of mach and bootstrap script 2016-09-01 17:25:36 +05:30
Ravi Shankar
f83fe9e39b Ensure that we get python and pip from virtualenv 2016-09-01 17:00:18 +05:30
bors-servo
f787e8ed65 Auto merge of #13145 - ashrko619:nav-cookie-enabled, r=nox
Implemented Navigator.cookieEnabled

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

<!-- 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/13145)
<!-- Reviewable:end -->
2016-09-01 05:25:52 -05:00
bors-servo
c3ef836c09 Auto merge of #13146 - glennw:update-wr-soa, r=nox
Update WR + shaders (switch to untyped UBO for CI).

This makes WR startup time significantly faster on Linux, by working around a slow path in the shader compiler.

<!-- 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/13146)
<!-- Reviewable:end -->
2016-09-01 04:28:46 -05:00
Manish Goregaokar
bf00733e02 Tests for 3+ value positions in basic shapes 2016-09-01 14:00:00 +05:30
Manish Goregaokar
7c9aff33c5 Handle specialized serialization of <position> in basic shapes (fixes #13083) 2016-09-01 13:59:59 +05:30
bors-servo
57b372ba3b Auto merge of #13110 - emilio:element-flags, r=SimonSapin
Fix incremental restyling under some circumstances due to our bogus use of ElementFlags.

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

<!-- Either: -->
- [x] 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. -->

Depends on https://github.com/servo/rust-selectors/pull/98

<!-- 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/13110)
<!-- Reviewable:end -->
2016-09-01 02:44:36 -05:00
bors-servo
78baf21c54 Auto merge of #13147 - bholley:rev_fnv, r=Manishearth
Update to fnv 1.0.4

This should get rid of the vim backup files discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1298957
2016-08-31 22:31:50 -05:00
Bobby Holley
4a7d0cd740 Update to fnv 1.0.4 2016-08-31 20:30:40 -07:00
Glenn Watson
31d055dced Update WR + shaders (switch to untyped UBO for CI). 2016-09-01 11:44:26 +10:00
Ashwin R
60f249874e Implemented Navigator.cookieEnabled 2016-09-01 06:24:33 +05:30
Emilio Cobos Álvarez
ccb4e958e5
Add reftest for the correct restyling of containers that match slow selectors. 2016-08-31 17:27:15 -07:00
Emilio Cobos Álvarez
468b329645
style: Provide whether we're styling or not to rust-selectors.
This makes us not adding the flags to everything in servo.
2016-08-31 17:27:15 -07:00
bors-servo
bbfe38e35f Auto merge of #13134 - servo:archery, r=emilio
Add lots of Arc’s in style, and prepare for using DOMRefCell

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

`DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots.

r? @emilio

---
<!-- 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 new tests because 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/13134)
<!-- Reviewable:end -->
2016-08-31 16:30:56 -05:00
bors-servo
23adba0242 Auto merge of #13135 - glennw:wr-update-caching, r=nox
Webrender update (border anti-aliasing, primitive caching).

<!-- 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/13135)
<!-- Reviewable:end -->
2016-08-31 12:24:47 -05:00
bors-servo
f5a546a160 Auto merge of #12437 - gpoesia:tr_margin_fix, r=pcwalton
Handle row borders in border collapsing logic.

<!-- Please describe your changes on the following line: -->
Handle table row border when collapsing borders for a table row. The row border is combined with the cell's border using the already implemented conflict resolution logic.

This is a screenshot of the following test:

```html
<!doctype html>
<html><body>
    <style>
      table {
        border-collapse: collapse;
      }
      tr {
        border: 1px solid black;
      }
    </style>
    <table>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
    </table>
  </body>
</html>
```

<img src="https://dl.dropboxusercontent.com/u/10962672/Screenshots%20Servo/servo_tr_border_collapse.png"/>

The top border is missing, but I think that's a different bug, since it also does not show up when the border is in the cells, and not the rows. Also, when debugging the border collapsing structures, they seem ok (the top border seems to be there). I can look at that bug in a separate issue (or in this one too if you prefer).

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

<!-- Either: -->
- [X] These changes do not require tests because I didn't find how to automatically test it (will be happy to provide a test if there's infrastructure for this kind of test already in place).

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

Fixes #11527.

<!-- 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/12437)
<!-- Reviewable:end -->
2016-08-31 11:28:18 -05:00
bors-servo
59a0be0068 Auto merge of #13136 - servo:error-test, r=nox
Add a test for the exact timing of the error event for invalid event …

<!-- 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/13136)
<!-- Reviewable:end -->
2016-08-31 10:25:17 -05:00
bors-servo
e542dcf883 Auto merge of #13138 - jsnajdr:master, r=nox
Console message packets should have a '_type' attribute

<!-- Please describe your changes on the following line: -->
Renamed the `type_` attribute of `PageError` and `ConsoleAPI` structs to make them correct Firefox RDP packets.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because devtools component doesn't have any

<!-- 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/13138)
<!-- Reviewable:end -->
2016-08-31 08:33:36 -05:00
Jarda Snajdr
088351469a Console message packets should have a '_type' attribute 2016-08-31 15:01:34 +02:00
bors-servo
c3ce9f2c90 Auto merge of #13107 - UK992:tidy, r=Wafflespeanut
Tidy: Handle empty files

Fix index error ``list index out of range``, when file is empty.

r? @Wafflespeanut

---
- [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/13107)
<!-- Reviewable:end -->
2016-08-31 07:42:25 -05:00
UK992
e36ea7ba2a Remove ./tests/html/tiny_test.html 2016-08-31 14:14:20 +02:00
Simon Sapin
95033e1c0d Add any_important and any_normal methods to PropertyDeclarationBlock 2016-08-31 13:41:38 +02:00
Ms2ger
aeb6b1795a Add a test for the exact timing of the error event for invalid event handlers. 2016-08-31 13:20:25 +02:00
Glenn Watson
25f60a29db Webrender update (border anti-aliasing, primitive caching). 2016-08-31 19:43:32 +10:00
bors-servo
3649a356c8 Auto merge of #13100 - nox:better-getters, r=Ms2ger
Use Option<T> to return from getters

<!-- 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/13100)
<!-- Reviewable:end -->
2016-08-31 04:10:42 -05:00
Emilio Cobos Álvarez
2617d15ed6
style: Properly track whether negative values of calc() are allowed
In order to clamp them at computed value time.
2016-08-30 19:17:16 -07:00
bors-servo
acb47007ba Auto merge of #13132 - emilio:deferred-paint, r=pcwalton
layout: Keep track of whether we've deferred the painting of the document due to a script query.

<!-- 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 #13131

<!-- Either: -->
- [x] 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. -->

r? @pcwalton

<!-- 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/13132)
<!-- Reviewable:end -->
2016-08-30 21:05:56 -05:00
Emilio Cobos Álvarez
2673fcd750
Reftest for deferred paint. 2016-08-30 19:05:31 -07:00
Gabriel Poesia
a3af2303d6 Handle row borders in border collapsing logic.
Fixes #11527.
2016-08-30 23:00:58 -03:00
Simon Sapin
7ef4930472 Prepare for interior mutability in PropertyDeclarationBlock
`Stylist` contains separate hashmaps for important and normal declarations,
but typically a given block only contains declarations of one importance.

Before this commit, there is an optimization where
a `PropertyDeclarationBlock` is only inserted in the corresponding map
if it has a non-zero number of declaration of a given importance.

With CSSOM, `PropertyDeclarationBlock` is gonna have interior mutability:
the importance (priority) of a declaration could change.
This optimization would become incorrect when the block is missing
in a hashmap where it should be.

This commits removes the original optimization, and replaces it with
a slightly weaker one: if a block doesn’t have any declaration
with the importance we’re cascading for, skip selector matching.
2016-08-31 02:34:09 +02:00
Simon Sapin
ad3437b98a Remove now-redundant Arc inside PropertyDeclarationBlock. 2016-08-31 02:34:08 +02:00
Simon Sapin
acc38aa8c2 Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate. 2016-08-31 02:34:07 +02:00
Simon Sapin
c50e6add4a Import Debug implementations for RefCell and friends 2016-08-31 02:34:06 +02:00
Simon Sapin
c87180a2fb Move DOMRefCell to style. 2016-08-31 02:34:05 +02:00
Simon Sapin
ec723057b2 Make DOMRefCell use style’s copy of RefCell 2016-08-31 02:34:04 +02:00
Simon Sapin
edbd88cce5 Update our copy of RefCell, add try_borrow and try_borrow_mut. 2016-08-31 02:34:03 +02:00
Simon Sapin
ef5977f059 Wrap in Arc<_> every object reflected in CSSOM.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1281962#c5
2016-08-31 02:34:03 +02:00
Simon Sapin
94d5b28fe9 Add a separate NamespaceRule type 2016-08-31 02:34:02 +02:00
Simon Sapin
a5a3a74262 Remove CSSRule::Charset
`@charset` rules are not reflected in CSSOM.
2016-08-31 02:34:01 +02:00
Emilio Cobos Álvarez
fd9cd2f103
layout: Keep track of whether we've deferred the painting of the document due to
a script query.

This will, rather unfortunately, mean that we might repaint two times if we've
deferred a paint, then get an out-of-band reflow. Still seemed better than not
suppressing paints at all.

Fixes #13131
2016-08-30 17:01:03 -07:00
bors-servo
c4f34e9019 Auto merge of #13113 - edunham:tidy-version, r=emilio
bump Tidy version

Published a new tidy after config file fixes landed, as requested in https://github.com/servo/servo/issues/10636#issuecomment-210658297. This commit makes the repo match what I published, is all.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 **I changed one character in a string. If this breaks stuff, we're !#@$#@!$'d.**

<!-- 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/13113)
<!-- Reviewable:end -->
2016-08-30 18:26:56 -05:00
bors-servo
1fcc447941 Auto merge of #13075 - emilio:calc-media, r=SimonSapin
style: Allow calc in media queries.

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

<!-- Either: -->
- [x] 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1290228

No tests have been added yet, I expect wpt to catch something, otherwise I'll write/import others.

<!-- 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/13075)
<!-- Reviewable:end -->
2016-08-30 15:53:09 -05:00
Emilio Cobos Álvarez
be7a44315d
style: Allow calc in media queries. 2016-08-30 13:48:55 -07:00
bors-servo
e07ee3f4cf Auto merge of #13126 - splav:HTMLOptionElement.form#13111, r=metajack
Html option element.form#13111

<!-- Please describe your changes on the following line: -->
Add HTMLOptionElement form attribute support

---
<!-- 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 #13111 (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/13126)
<!-- Reviewable:end -->
2016-08-30 13:18:10 -05:00
Alexandrov Sergey
3b3b871146 update fixed tests expectations 2016-08-30 20:28:10 +03:00
bors-servo
b318e61d5d Auto merge of #13128 - emilio:stupidest-assertion-ever, r=SimonSapin
Fix debug assertion introduced in #13108 by me.

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

<!-- Either: -->
- [x] These changes do not require tests because https://github.com/servo/servo/issues/13127

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

I'm stupid, and when I did the last moving-the-code-around, I failed miserably
to double-check it in a debug build.

<!-- 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/13128)
<!-- Reviewable:end -->
2016-08-30 12:21:14 -05:00
Anthony Ramine
7dfb336be8 Use Option<T> to return from getters
This removes the cumbersome &mut bool argument and offers overall
a more readable code.
2016-08-30 19:07:19 +02:00