Commit graph

9303 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
46afc56c41
stylo: Implement support for the contents property. 2016-08-18 15:59:38 -07:00
Emilio Cobos Álvarez
d85a60e366
stylo: Use the improved version of Gecko_GetStyleContext() 2016-08-18 15:56:03 -07:00
Anthony Ramine
03a0170c91 Update to webrender 0.4.0 2016-08-18 19:33:12 +02:00
bors-servo
fb7cb92076 Auto merge of #12863 - emilio:disable-media, r=larsbergstrom
script: Disable our dependency in ffmpeg until the media madness is over

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

r? @larsbergstrom

---
<!-- 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/12863)
<!-- Reviewable:end -->
2016-08-18 11:22:06 -05:00
bors-servo
4e7c689a81 Auto merge of #12909 - ConnorGBrewster:framestate, r=asajeffrey
Add FrameState

<!-- Please describe your changes on the following line: -->
r? @asajeffrey
Might as well get this in now, since it may be a while before I can figure out what is causing the panics on the pending pipelines PR.

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

<!-- 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/12909)
<!-- Reviewable:end -->
2016-08-17 22:11:59 -05:00
Emilio Cobos Álvarez
a46f0c3b24
Lazily compute common style affecting attribute info. 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
Emilio Cobos Álvarez
b9f8905b21
script: Disable our dependency in ffmpeg until the media madness is over. 2016-08-17 13:44:44 -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
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
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
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
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
3831c0650c Adding support for correct shorthand serialization 2016-08-16 22:28:51 -04: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
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
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
Emilio Cobos Álvarez
d612d9f5ef
stylo: Convert pseudo-elements to an Atom wrapper. 2016-08-15 22:58:33 -07:00
Emilio Cobos Álvarez
b1091dff58
stylo: Regenerate the world. 2016-08-15 22:58:32 -07:00
Glenn Watson
1242a0df69 Update webrender + shaders. 2016-08-16 11:03:15 +10:00
bors-servo
d687f77fef Auto merge of #12873 - shinglyu:abs-margin-patch, r=notriddle,emilio
Fix absolute-flow's auto positioning

<!-- Please describe your changes on the following line: -->
If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end.

---
<!-- 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 #12676 (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/12873)
<!-- Reviewable:end -->
2016-08-15 08:19:04 -05:00
Shing Lyu
332cdd05c8 Absolute positioned flow should be placed at the margin-end of its previous flow 2016-08-15 19:34:37 +08:00
Connor Brewster
f8a1bfa750 Add FrameState 2016-08-14 21:54:36 -06:00
bors-servo
41296d20b9 Auto merge of #12849 - Coder206:gfxWarnings, r=Wafflespeanut
Fix GFX Warnings

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

- [ ] 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/12849)
<!-- Reviewable:end -->
2016-08-14 12:48:06 -05:00
Patrick Trottier
dd7daf2861 Fix GFX Warnings
Corrections to GFX Warnings Fix
2016-08-14 11:19:29 -04:00
bors-servo
27d082e577 Auto merge of #12854 - nox:impl-trait, r=jdm
Use impl Trait syntax for Node::child_elements

<!-- 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/12854)
<!-- Reviewable:end -->
2016-08-14 08:26:21 -05:00
bors-servo
8472699885 Auto merge of #12857 - anholt:webgl-framebuffer-binding-2, r=emilio
Implement GL_FRAMEBUFFER_BINDING (and fix a VertexAttrib1fv typo)

<!-- Please describe your changes on the following line: -->
This PR fixes many webgl conformance test failures due to missing support for a getParameter() call in the webgl test utils.

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

<!-- 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/12857)
<!-- Reviewable:end -->
2016-08-14 04:46:17 -05:00
Emilio Cobos Álvarez
40c04b4c6b
style: Correcly track whether calc values support viewport sizes. 2016-08-14 01:37:28 -07:00
Emilio Cobos Álvarez
b1fca78cba
layout: Mark correctly parents of dirty elements. 2016-08-14 01:37:28 -07:00
Eric Anholt
6651db8b56 webgl: Add support for getParameter(GL_FRAMEBUFFER_BINDING).
To do this, we need to keep a map of GL names (encapsulated as
WebGLFramebufferId) to WebGLFramebuffer objects so that we can return
the right type.

Fixes #12852
2016-08-14 00:49:41 -07:00
bors-servo
700bb911fc Auto merge of #12839 - notriddle:11818_sequential_layout_bug, r=emilio
Fix a cached style cascade bug that only manifested in sequential mode

When copying cached styles, keep the `writing_mode` up to date.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11818 (github issue number if applicable).
- [X] There are tests for these changes

EDIT: The test is now working. I ran it with the first commit (the actual fix) reverted and it failed.

<!-- 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/12839)
<!-- Reviewable:end -->
2016-08-14 02:27:19 -05:00
Eric Anholt
a21bbb78c4 webgl: Fix a typo in VertexAttrib1fv handling.
The VertexAttrib[234]fv compare to the same size as in their function
name.  This wasn't noticed becacuse this function isn't connected from
the .webidl yet.
2016-08-13 17:25:32 -07:00