Commit graph

19641 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
51b6568273
style: Run restyle_hints_state.html onload, so it doesn't interact with children_changed. 2016-08-17 14:17:44 -07:00
Emilio Cobos Álvarez
63d9f2f56e
style: Fix the handling of the RESTYLE_DESCENDANTS hint.
This was the underlying cause of the restyle_hints_state.html failure.

It was uncovered only when fixing the HAS_EDGE_CHILD_SELECTOR flags because this
was the series of events happening.

 * <script> starts executing.
 * All the restyle hint processing takes place.
 * <script> ends executing, gets appended to the body (I think this is also a bug).
 * <body> receives children_changed notification, with an Append mutation.
   * <body> had the HAS_EDGE_CHILD_SELECTOR flag, so due to its bogus value, it
     restyled the whole tree after <body>, fixing any mishandling of restyle
     hints.
2016-08-17 14:17:43 -07:00
Emilio Cobos Álvarez
173ec260e6
Tidy up, make the cache a bit more performant.
Haven't measured a lot, will do tomorrow, but I want a test run.
2016-08-17 14:16:20 -07:00
Emilio Cobos Álvarez
3af774bd75
Rewrite the style sharing candidate cache.
The style candidate cache had regressed a few times (see #12534), and my
intuition is that being able to disable all style sharing with a single rule in
the page is really unfortunate.

This commit redesigns the style sharing cache in order to be a optimistic cache,
but then reject candidates if they match different sibling-affecting selectors
in the page, for example.

So far the numbers have improved, but not so much as I'd wanted (~10%/20% of
non-incremental restyling time in general). The current implementation is really
dumb though (we recompute and re-match a lot of stuff), so we should be able to
optimise it quite a bit.

I have different ideas for improving it (that may or may not work), apart of the
low-hanging fruit like don't re-matching candidates all the time but I have to
measure the real impact.

Also, I need to verify it against try.
2016-08-17 14:16:16 -07:00
bors-servo
ec53136863 Auto merge of #11756 - vvuk:servo-msvc, r=larsbergstrom
MSVC support for Servo, and CMake builds for native code

This is the base PR for MSVC builds of servo and dependent crates.  It's got replacements in the Cargo.toml to pull in the right versions, to make sure that crates were properly converted to CMake for all other platforms, not just Windows.  (Servo builds with MSVC 2015 with this PR; also with 2013, though a manual change in rust-mozjs to select a different set of bindings is needed.)

This PR isn't quite ready yet, but I want bors-servo to do builds.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11756)
<!-- Reviewable:end -->
2016-08-17 13:22:52 -05:00
Vladimir Vukicevic
dd37716459 Update ports and geckolib Cargo.lock 2016-08-17 13:32:12 -04:00
bors-servo
b61c45639a Auto merge of #12572 - craftytrickster:10933/shorthands, r=emilio
10933/shorthands

<!-- Please describe your changes on the following line: -->
This implements the serialization of nearly all of the css shorthand properties with the following exceptions:

1. font - this may be implemented correctly, but I am not 100% sure
2. border-radius - I do not know how to implement this, since I am not familiar with how the property works
3. background - this is implemented, but I think that the implementation might be a tiny bit off.

---
<!-- 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 #10933  (github issue number if applicable). Also fixes issue #11448

<!-- 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/12572)
<!-- Reviewable:end -->
2016-08-17 12:17:48 -05:00
Vladimir Vukicevic
ae117c1c04 Update Cargo.toml 2016-08-17 09:51:49 -04:00
Vladimir Vukicevic
a25c3da27a Set up PATH to find DLLs for tests 2016-08-17 09:51:45 -04:00
Vladimir Vukicevic
ab007315c2 Copy in DLLs to servo.exe dir 2016-08-17 09:51:42 -04:00
Vladimir Vukicevic
e7dd579ebf Ignore TOML failing to parse Cargo.lock, due to a bug 2016-08-17 09:51:38 -04:00
Vladimir Vukicevic
59da96def1 Use mingw windows subsystem syntax for gcc only 2016-08-17 09:51:14 -04:00
Vladimir Vukicevic
5ab760e698 Fix unicode env issues for call() 2016-08-17 09:51:09 -04:00
Vladimir Vukicevic
926439acb2 Update appveyor.yml for msvc build 2016-08-17 09:51:06 -04:00
Vladimir Vukicevic
0aa5ad4197 Don't enforce line length in Cargo.toml files 2016-08-17 09:51:02 -04:00
Vladimir Vukicevic
0e32871591 Add proper Win32 notification for builds 2016-08-17 09:50:58 -04:00
Vladimir Vukicevic
82df8e9399 Set windows subsystem on MSVC builds with editbin 2016-08-17 09:50:54 -04:00
Vladimir Vukicevic
5bbec7469d Native MSVC windows build, convert to cmake 2016-08-17 09:50:51 -04:00
bors-servo
fc7053e030 Auto merge of #12826 - Manishearth:addref, r=emilio,bholley
Add safer bindings for dealing with owned Arcs over FFI

Not yet ready to land, since I need to implement the logic for borrowed refs too. Ready for review for the first part.

The corresponding gecko changes are at https://github.com/servo/gecko-dev/compare/crashfix...Manishearth:addref-borrow

(I'll upload them to the bug once the borrow stuff is done)
r? @bholley

<!-- 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/12826)
<!-- Reviewable:end -->
2016-08-17 07:35:43 -05:00
bors-servo
f4f212fd18 Auto merge of #12897 - izgzhen:improve-file-api-comments, r=Manishearth
Improve File API related comments

r? @Manishearth

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- 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/12897)
<!-- Reviewable:end -->
2016-08-17 06:38:34 -05:00
David Raifaizen
d8c042a0f7 Restoring expected failures for several .ini files 2016-08-17 07:37:08 -04:00
bors-servo
2eb0328738 Auto merge of #12896 - izgzhen:fix-blob-size, r=Manishearth
Improve Blob.Size() speed by avoid reading content

r? @Manishearth

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- 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/12896)
<!-- Reviewable:end -->
2016-08-17 04:52:42 -05:00
Zhen Zhang
cd9fc4919d Improve File API related comments 2016-08-17 11:06:25 +02:00
Manish Goregaokar
2fdbce0743
Resync bindings 2016-08-17 13:19:20 +05:30
bors-servo
9785e520ae Auto merge of #12900 - pathway27:master, r=notriddle
./mach throws error on poor connectivity

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

Imported error from socket using `from` since it's the only thing we need.
The exception is [different ](https://docs.python.org/2/library/socket.html#socket.error) from the other exceptions as it could be a string or a tuple with error number.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests they execute before the test runner is installed. Can't test the bootstrapping 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/12900)
<!-- Reviewable:end -->
2016-08-17 02:30:56 -05:00
Manish Goregaokar
0d4d1b539e Add safer bindings for refcounted types across ffi 2016-08-17 12:30:31 +05:30
bors-servo
5f169581dc Auto merge of #12843 - emilio:transforms, r=glennw
layout: Make the stacking context take into account the children transform when calculating overflow areas.

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

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- 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 partially fix #12842 (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/12843)
<!-- Reviewable:end -->
2016-08-17 00:35:16 -05:00
bors-servo
8fd74e026c Auto merge of #12887 - glennw:wr2-update, r=pcwalton
Update webrender + shaders.

<!-- 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: -->
- [ ] `./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
- [ ] 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/12887)
<!-- Reviewable:end -->
2016-08-16 22:50:35 -05:00
David Raifaizen
3085433c78 Added unit tests for shorthand serialization 2016-08-16 22:29:07 -04:00
David Raifaizen
3831c0650c Adding support for correct shorthand serialization 2016-08-16 22:28:51 -04:00
S
f5c5fdebe1 Add error message for connectivity issues during bootstrap 2016-08-17 01:13:18 +00:00
bors-servo
17df3c276b Auto merge of #12880 - Coder206:osReadMe, r=nox,Ms2ger
Added OS Links in Markdown

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

It is really an improvement to make room for a commit that links contributors to https://janitor.technology

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

<!-- 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/12880)
<!-- Reviewable:end -->
2016-08-16 19:16:55 -05:00
Patrick Trottier
0c9a718fa9 Added OS Links in Markdown
From a to header

Fixes for heading layout
2016-08-17 00:04:07 +00:00
Emilio Cobos Álvarez
babb5d4247
Add a test for nested stacking context overflow areas. 2016-08-16 15:44:43 -07:00
Emilio Cobos Álvarez
fd3a99ead3
layout: Make the stacking context take into account the children transform when calculating overflow areas.
This only works for simple translations and similar, but I want Patrick to
validate my approach.
2016-08-16 15:34:28 -07:00
Zhen Zhang
06e29c0497 Improve Blob.Size() speed by avoid reading content 2016-08-16 23:17:54 +02:00
bors-servo
49431be44a Auto merge of #12838 - emilio:viewport, r=SimonSapin
Fix restyling on viewport resize.

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

Fixes https://github.com/servo/servo/issues/12835

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

<!-- 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/12838)
<!-- Reviewable:end -->
2016-08-16 13:48:20 -05:00
Emilio Cobos Álvarez
fc12841cd3
style: Remove the block that explicitly checked for the style attribute, since now it's useless. 2016-08-16 10:58:17 -07:00
Emilio Cobos Álvarez
9e88a495c8
style: Introduce a generic way of gathering information from the cascade, and use it for viewport units. 2016-08-16 10:58:16 -07:00
bors-servo
c386a3c881 Auto merge of #12815 - emilio:stylo-atoms, r=bholley
stylo: Use atoms as the pseudo-element back-end.

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

A bit of work left, and we can uber-optimize this (left comments, will fill follow-ups), but this is a decent refactor so I thought I'd rather get some feedback on it.

r? @bholley (not formally yet, maybe, but some feedback is appreciated).

---
<!-- 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] These changes do not require tests because geckolib only...

<!-- 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/12815)
<!-- Reviewable:end -->
2016-08-16 12:50:29 -05:00
bors-servo
e5391554e0 Auto merge of #12893 - servo:glutinup, r=metajack
Update glutin.

<!-- 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/12893)
<!-- Reviewable:end -->
2016-08-16 11:10:11 -05:00
Ms2ger
028918da4a Update glutin. 2016-08-16 14:03:12 +02:00
bors-servo
2b74e94b73 Auto merge of #12890 - nox:rng-pressure, r=Manishearth
Lessen pressure on the thread-local RNG

<!-- 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/12890)
<!-- Reviewable:end -->
2016-08-16 05:19:37 -05:00
Anthony Ramine
6cc862d0c6 Lessen pressure on the thread-local RNG
When loading HTTP requests, initialise the request ID only if devtools
are used, to lessen the pressure put on the RNG initialisation.

This tentatively fixes #11100 on OS X.
2016-08-16 10:12:33 +02:00
Emilio Cobos Álvarez
09cc240d4c
stylo: Add debug docs assertion in Atom::from_static() 2016-08-15 23:02:24 -07:00
Emilio Cobos Álvarez
2b3c684b37
stylo: Add sugar over the bitfield accessors in nsIAtom. 2016-08-15 23:00:16 -07:00
Emilio Cobos Álvarez
24168f87eb
stylo: privatize Atom::chars() 2016-08-15 23:00:06 -07:00
Emilio Cobos Álvarez
babb2b7160
stylo: Remove misleading comments re. break-before and break-after.
They're alias, and the deprecated property is page-break-xxx, not break-xxx.
2016-08-15 22:59:54 -07:00
Emilio Cobos Álvarez
6bce4c8c20
stylo: Use Arc::get_mut().unwrap() instead of make_mut.
It's infallible, so no point in using make_mut.
2016-08-15 22:59:35 -07:00
Emilio Cobos Álvarez
010bce128b
stylo: We have an Atom back-end now. 2016-08-15 22:58:33 -07:00