Commit graph

20192 commits

Author SHA1 Message Date
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
Anthony Ramine
6e1523f4ae Compile WebIDL return type "object" to NonZero<*mut JSObject> 2016-08-30 19:07:13 +02:00
Anthony Ramine
3e32948a39 Root js_object in TextEncoder::Encode 2016-08-30 19:06:41 +02:00
Anthony Ramine
897a81e95b Improve some TestBinding methods
We make them return sensical things in a sensical way.
2016-08-30 19:06:41 +02:00
Anthony Ramine
2400b91d05 Don't bother with the global in ImageData::get_image_data 2016-08-30 19:06:41 +02:00
Anthony Ramine
854a3dff68 Assert that ImageData::data is not null 2016-08-30 19:06:40 +02:00
Emilio Cobos Álvarez
b9d91929aa
Fix debug assertion introduced in #13108 by me.
I'm stupid, and when I did the last moving-the-code-around, I failed miserably
to double-check it in a debug build.
2016-08-30 08:57:44 -07:00
Alexandrov Sergey
e4006fa9dd add HTMLOptionElement form attribute test 2016-08-30 17:30:06 +03:00
Alexandrov Sergey
f5dbf41841 add HTMLOptionElement form attribute support 2016-08-30 17:29:58 +03:00
bors-servo
fb9c36c833 Auto merge of #13086 - Manishearth:shadowarray, r=emilio
Add bindings for nsCSSShadowArray, use for text-shadow and box-shadow

<!-- 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/13086)
<!-- Reviewable:end -->
2016-08-30 09:22:49 -05:00
bors-servo
8695552052 Auto merge of #13120 - glennw:update-wr-font-size, r=emilio
Update webrender with font size fix.
2016-08-30 00:36:34 -05:00
Glenn Watson
de813c3ce9 Update webrender with font size fix. 2016-08-30 15:02:10 +10:00
bors-servo
3a715e5c55 Auto merge of #13114 - glennw:webrender-canvas, r=emilio
Fix canvas image tests when using webrender.

When webrender is enabled, image decoding doesn't pre-multiply by
alpha, but the canvas code expects the image data to be
pre-multiplied form.

<!-- 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/13114)
<!-- Reviewable:end -->
2016-08-29 22:59:28 -05:00
Manish Goregaokar
85332d5790 stylo: Support box-shadow 2016-08-30 08:04:04 +05:30
Manish Goregaokar
7fae87d687 stylo: Support text-shadow 2016-08-30 08:04:03 +05:30
Manish Goregaokar
a4a95dafd1 stylo: Add sugar for nsCSSShadowArray 2016-08-30 08:04:02 +05:30
bors-servo
c55588d25b Auto merge of #13116 - upsuper:msvc32-atoms, r=emilio
Avoid LLVM prepending "_" for msvc32 symbols.

See rust-lang/rust#36097. This patch adds a workaround to that issue, which makes win32 stylo 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/13116)
<!-- Reviewable:end -->
2016-08-29 21:07:00 -05:00
Xidorn Quan
3bb7fdf025 Avoid LLVM prepending "_" for msvc32 symbols. 2016-08-30 11:23:14 +10:00