Commit graph

34159 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0b520c9558
style: Make NonCustomPropertyId <-> nsCSSPropertyId conversions fast.
We have a different order in nsCSSPropertyId for no good reason. The only
invariant there is that longhands come before shorthands, and shorthands before
aliases.

Luckily that's also an invariant that NonCustomPropertyId has, so we can reuse
them.

Differential Revision: https://phabricator.services.mozilla.com/D2463

MozReview-Commit-ID: 1hsQu6hmqiN
2018-08-08 01:35:48 +02:00
Emilio Cobos Álvarez
5a7358b833
style: Restore the order of Scrollbarbutton appearance values.
The patch at bug 1478391 comment 6 changed the way the math in Scrollbarbutton*
worked, which pretty surely caused this.

Restore the original order and math to be the same as before bug 1478391.

Bug: 1479216
Reviewed-by: xidorn
MozReview-Commit-ID: CK3iOqeX2NW
2018-08-08 01:35:34 +02:00
Nicholas Nethercote
fc9df0bcf3
style: Convert FnvHash{Set,Map} instances to FxHash{Set,Map}.
Bug: 1477628
Reviewed-by: heycam
2018-08-08 01:34:35 +02:00
Emilio Cobos Álvarez
0cab212052
style: Autogenerate StyleAppearance.
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

Differential Revision: https://phabricator.services.mozilla.com/D2361
2018-08-08 01:35:08 +02:00
Emilio Cobos Álvarez
798d45f38d
style: Generate StyleDisplay using cbindgen.
We use the same setup WR uses, which is checking-in the files.

But I think it's much better than keeping the two things in sync manually :)

When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.

Differential Revision: https://phabricator.services.mozilla.com/D2354
2018-08-08 01:34:49 +02:00
Hiroyuki Ikezoe
c63a9a37a9
style: Introduce nsCSSKeywordAndBoolTableEntry.
The values in the boolean context depend on its feature.  For examples, in the
case of prefers-reduced-motion 'no-preference' means false and 'reduced' mean
true in the boolean context, whereas in the case of prefers-contrast
'no-preference' means false and other two values, 'high' and 'low' means true
in the boolean context.  To support it we introduce a child struct of
nsCSSKTableEntry that has an additional field representing the value in the
boolean context and use it when we have no specified value in the media feature
(i.e. in the boolean context).

Bug: 1365045
Reviewed-by: heycam
MozReview-Commit-ID: 79HiW8l5ous
2018-08-08 01:34:35 +02:00
Simon Sapin
d1733aa502 Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-08 00:09:56 +02:00
bors-servo
5410505c12
Auto merge of #21347 - servo:paulrouget-patch-1, r=jdm
Update README.md

Adding a note about how to skip libsimpleservo compilation.

<!-- 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/21347)
<!-- Reviewable:end -->
2018-08-07 14:48:43 -04:00
bors-servo
2ceb8dcd22
Auto merge of #21218 - gterzian:root_cloned_blobs, r=jdm
Use a structured clone holder to store rooted clones

<!-- 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 #21164 (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/21218)
<!-- Reviewable:end -->
2018-08-07 12:49:25 -04:00
Gregory Terzian
a5d7cd1a7f use a structured clone holder to store rooted clones 2018-08-07 17:40:46 +02:00
bors-servo
e363d579fa
Auto merge of #21302 - paulrouget:res, r=mbrubeck
Fix page size when device-pixel-ratio is set manually

Fix #21277

We were using the user-define pixel ratio to get the device values of the winit coordinates.

<!-- 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/21302)
<!-- Reviewable:end -->
2018-08-07 06:51:09 -04:00
Pyfisch
3d2957c737 Fix unit tests 2018-08-06 22:40:04 +02:00
Pyfisch
9e971f9d8f Replace Servo DL items with WR ones
The Servo internal display list items are already pretty much
equivalent to the WebRender ones. Except that Servo items contain
base information and associated glyphs and gradient stops which are
stored implicitly in WebRender. Remove the display items for
rectangles, text, images, border, gradients and box shadow and
replace them with their WebRender counter parts.
2018-08-06 19:47:00 +02:00
bors-servo
2a0eec4ad6
Auto merge of #21223 - paulrouget:wrupdate, r=gw3583
Webrender update

Requires:

- ~winit PR: https://github.com/tomaka/winit/pull/608~
- ~glutin PR: https://github.com/tomaka/glutin/pull/1047~
- ~skia PR: https://github.com/servo/skia/pull/164~
- ~azure PR: https://github.com/servo/rust-azure/pull/291~
- ~WR PR: https://github.com/servo/webrender/pull/2923~
- ~offscreen gl context PR: https://github.com/servo/rust-offscreen-rendering-context/pull/127~
- ~plane-split PR: https://github.com/servo/plane-split/pull/14~
- ~pathfinder: https://github.com/pcwalton/pathfinder/pull/92~

<!-- 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/21223)
<!-- Reviewable:end -->
2018-08-06 01:32:31 -04:00
Paul Rouget
0d9161dd7b WR update 2018-08-06 07:22:24 +02:00
Paul Rouget
8d285104e2
Update README.md
Adding a note about how to skip libsimpleservo compilation.
2018-08-06 07:06:58 +02:00
George Roman
232addbd06 Remove unused compositing dependency from bluetooth crate 2018-08-05 15:41:09 +03:00
Pyfisch
045f8bcf30 Add --cap-lints warn to rustdoc script
Use --document-private-items instead of
manually specifying passes as this is deprecated.

Closes #21179
2018-08-05 12:21:25 +02:00
bors-servo
2f14e33395
Auto merge of #21334 - paulrouget:uploadaar, r=mbrubeck
Upload AAR alongside the APK

<!-- 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/21334)
<!-- Reviewable:end -->
2018-08-04 14:10:21 -04:00
bors-servo
025ba5cbe3
Auto merge of #21335 - servo:webgl, r=emilio
Merge code from Draw* and Draw*Instanced methods

<!-- 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/21335)
<!-- Reviewable:end -->
2018-08-03 05:34:05 -04:00
Paul Rouget
cef71b47db Upload AAR alongside the APK 2018-08-03 09:42:14 +02:00
Anthony Ramine
04c81c5cc3 Merge code from Draw* and Draw*Instanced methods
This made me realise we weren't supporting OES_element_index_uint in the
ANGLE_instanced_arrays extension.
2018-08-02 22:54:39 +02:00
bors-servo
c5aaae7333
Auto merge of #21324 - servo:webgl, r=emilio
Properly set initial values for WebGL texture filters

<!-- 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/21324)
<!-- Reviewable:end -->
2018-08-02 12:08:12 -04:00
Anthony Ramine
f7124886bc Use the DOM cache for gl.getTexParameter(gl.TEXTURE_*_FILTER)
Part of #20596.
2018-08-02 18:06:58 +02:00
Anthony Ramine
9e912be4ea Properly set initial values for WebGL texture filters 2018-08-02 15:53:57 +02:00
bors-servo
bde8a1e239
Auto merge of #21313 - jdm:glstuff, r=nox
Framebuffer and renderbuffer fixes

This commits address two separate panics that occur when running the framebuffer-object-attachment.html test. The test still panics due to another framebuffer completion status problem, so the overall test results don't demonstrate any improvement.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21252
- [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/21313)
<!-- Reviewable:end -->
2018-08-02 09:26:35 -04:00
bors-servo
a5fba3c8d6
Auto merge of #21307 - servo:webgl, r=emilio
Always use a WebGLVertexArrayObject to handle vertex attribs

This lets us clean up how buffers are reference-counted.

<!-- 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/21307)
<!-- Reviewable:end -->
2018-08-02 06:48:35 -04:00
Anthony Ramine
fba6d801a1 Always use a WebGLVertexArrayObject to handle vertex attribs
This lets us clean up how buffers are reference-counted.
2018-08-02 12:46:19 +02:00
Josh Matthews
03eb7e4dd2 webgl: Emulate some renderbuffer formats in non-GLES. 2018-08-02 02:05:53 -04:00
bors-servo
5c5ed54a6b
Auto merge of #21316 - servo:jdm-patch-27, r=Manishearth
mach: Avoid python error when there's no cargo cache.

This happens when we have a newly provisioned machine.

<!-- 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/21316)
<!-- Reviewable:end -->
2018-08-01 23:28:29 -04:00
Josh Matthews
6ad63b57e7
Fix python indentation. 2018-08-01 23:26:15 -04:00
Josh Matthews
458879b2cd
mach: Avoid python error when there's no cargo cache. 2018-08-01 20:52:17 -04:00
Josh Matthews
3334e477c1 webgl: Mark zero-sized framebuffers as incomplete attachments. 2018-08-01 15:40:46 -04:00
bors-servo
451c52e18d
Auto merge of #21309 - servo:jdm-patch-26, r=jdm
Actually clean all build artifacts.

I forgot that the remove-build-directories script on saltfs and the cleanup script in etc/ci are completely separate things.

<!-- 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/21309)
<!-- Reviewable:end -->
2018-08-01 15:27:54 -04:00
bors-servo
88f3c8e158
Auto merge of #21301 - paulrouget:stickykeys, r=Manishearth
Do not manually keep the modifiers state

Fix #21294

<!-- 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/21301)
<!-- Reviewable:end -->
2018-08-01 13:53:27 -04:00
Josh Matthews
aba765afbb
Actually clean all build artifacts. 2018-08-01 12:09:22 -04:00
bors-servo
733552d997
Auto merge of #21234 - paulrouget:surface, r=MortimerGoro
Android: Introduce ServoSurface

(WIP as it depends on 2 other PRs)

Depends on #21199. Only last commit matters.

r? @MortimerGoro

Please look at ServoSurface.java. The rest is mostly some refactoring to share as much code as possible with ServoView.

<!-- 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/21234)
<!-- Reviewable:end -->
2018-08-01 12:04:32 -04:00
bors-servo
890d40dd4f
Auto merge of #21308 - paulrouget:jsonerror, r=jdm
Android: Fix JSON error when no arguments are passed

Probably fix #21298

<!-- 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/21308)
<!-- Reviewable:end -->
2018-08-01 09:53:11 -04:00
Paul Rouget
fb8d8b33ac Android: Fix JSON error when no arguments are passed 2018-08-01 21:01:49 +08:00
Paul Rouget
4dfe617d3f Fix page size when device-pixel-ratio is set manually 2018-08-01 11:52:31 +02:00
Paul Rouget
8c4d4a3aaa Do not manually keep the modifiers state 2018-08-01 11:07:56 +02:00
bors-servo
3e09d7270a
Auto merge of #21199 - paulrouget:aar, r=MortimerGoro
Publish a AAR with servoview

Depends on #20912

Fix #21127

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

<!-- 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/21199)
<!-- Reviewable:end -->
2018-08-01 05:05:49 -04:00
Paul Rouget
c36b16546e Introduce ServoSurface 2018-08-01 16:35:22 +08:00
Paul Rouget
02983ef39a Add make_current to libsimpleservo 2018-08-01 16:33:46 +08:00
Paul Rouget
e8af185a3d Build a AAR archive alongside the APK 2018-08-01 16:15:47 +08:00
bors-servo
78e90d6358
Auto merge of #21282 - felixrabe:patch-2, r=jdm
Code style: Use canonical naming and formatting

<!-- 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/21282)
<!-- Reviewable:end -->
2018-07-31 18:28:31 -04:00
bors-servo
95b54ca8f3
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simonsapin
Revisit how the Android port works.

Fix #20855
Fix #18625
Fix #21147

Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach.

I recommend reviewing commit by commit.

To test, just follow the regular steps:

```
    ./mach build -d --android
    ./mach package --dev --android builds servo.apk
    ./mach install --dev --android && ./mach run --android
```

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

<!-- 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/20912)
<!-- Reviewable:end -->
2018-07-31 13:07:33 -04:00
Paul Rouget
6a31864126 Update Gradle and SDK 2018-07-31 22:39:45 +08:00
Paul Rouget
bef2fe83cd new android port: fix android build and tests 2018-07-31 22:39:45 +08:00
Paul Rouget
76d394eca8 new android port: update fakeld 2018-07-31 22:39:45 +08:00