Commit graph

12844 commits

Author SHA1 Message Date
Matt Brubeck
dbfb3813f6 Bug 1337068 - stylo: :empty, :-moz-first-node, :-moz-last-node, and :-moz-only-whitespace. 2017-03-22 08:18:47 -07:00
bors-servo
2fcbdb62f7 Auto merge of #16076 - methyl:grid-auto-flow-glue, r=Wafflespeanut
Stylo: Add gecko glue for grid-auto-flow

- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16025 (github issue number if applicable).
- [x] These changes do not require tests because we don't test gecko glue code

<!-- 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/16076)
<!-- Reviewable:end -->
2017-03-22 04:57:21 -07:00
Emilio Cobos Álvarez
a9b133bcbb
Bug 1345950: stylo: Fix slow selector flags. r=bholley
MozReview-Commit-ID: QwuSxulNG0
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-22 11:21:24 +01:00
Lucjan Suski
99aee290db Stylo: Add gecko glue for grid-auto-flow 2017-03-22 11:09:23 +01:00
bors-servo
cb1438e44f Auto merge of #15813 - canaltinova:will-change, r=upsuper,emilio
Implement parsing/serialization and glue for will-change property

Implement parsing/serialization  and glue for will-change property

---
<!-- 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 #15706 (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/15813)
<!-- Reviewable:end -->
2017-03-21 21:56:23 -07:00
bors-servo
7be9f0e7c4 Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdm
implement structured clone callbacks - support Blob cloning

<!-- Please describe your changes on the following line: -->
1. Implement stubs for structured clone callbacks.
2. Support Blob cloning.

Partial implementation of https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

---
<!-- 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 #15021 (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/15519)
<!-- Reviewable:end -->
2017-03-21 21:17:25 -07:00
Gregory Terzian
5c4f0be048 support structured cloning for Blob 2017-03-22 09:52:35 +08:00
Manish Goregaokar
f2f832d1d9 stylo: Support all non-ts pseudos with an argument 2017-03-21 12:33:57 -07:00
Nazım Can Altınova
ea1e405500
Implement gecko glue for will-change 2017-03-21 21:10:07 +03:00
Nazım Can Altınova
a3862780ac
Add flags to longhands for gecko glue
The flags are creates_stacking_context, fixpos_cb and abspos_cb. These will be needed in will-change glue.
2017-03-21 21:10:01 +03:00
Nazım Can Altınova
56b8c1d8b7
Implement parsing/serialization of will-change 2017-03-21 21:09:57 +03:00
bors-servo
2f6cf2e9c8 Auto merge of #16061 - methyl:master, r=Manishearth
Use servo_config::opts only on linux target.

It's not used for other architectures and triggers 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 #16058
- [x] These changes do not require tests because it's purely refactoring task

<!-- 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/16061)
<!-- Reviewable:end -->
2017-03-21 10:18:25 -07:00
bors-servo
d790973fb4 Auto merge of #16062 - BorisChiou:stylo/animation/parse_number, r=emilio
stylo: Make specified::parse_number() return finite f32.

We need to clamp the float numbers to avoid positive/negative infinity in timing functions, transform functions, and other possible css values to avoid undefined behaviors and assertions.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1343153](https://bugzilla.mozilla.org/show_bug.cgi?id=1343153) and [Bug 1336769](https://bugzilla.mozilla.org/show_bug.cgi?id=1336769)
- [X] These changes do not require tests because gecko has related tests

<!-- 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/16062)
<!-- Reviewable:end -->
2017-03-21 09:22:37 -07:00
Boris Chiou
f3a99baeac Make specified::parse_number() return finite f32. 2017-03-22 00:20:55 +08:00
Lucjan Suski
9a059b49c5 Use servo_config::opts only on linux target.
It's not used for other architectures and triggers warnings.
2017-03-21 15:55:45 +01:00
bors-servo
6d3f166671 Auto merge of #16056 - emilio:nsstring-vendor, r=mystor
Revendor rust nsstring bindings.

r? @mystor

<!-- 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/16056)
<!-- Reviewable:end -->
2017-03-21 07:13:28 -07:00
bors-servo
cea1760eb7 Auto merge of #16034 - jonathandturner:fix_font, r=metajack
Fix Windows UI and font squishing

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

This PR:

* updates the browserhtml dep (fixes https://github.com/servo/servo/issues/15255)
* updates the Windows font metric calculation (fixes https://github.com/servo/servo/issues/15698, based on codec-abc https://github.com/servo/servo/pull/15937#issuecomment-286513712)
* may address https://github.com/servo/servo/issues/15933.  With this PR, I was not able to repro

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because change are to UI/visual results of font drawing

<!-- 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/16034)
<!-- Reviewable:end -->
2017-03-21 03:15:10 -07:00
Emilio Cobos Álvarez
6c1153ab28
Revendor rust nsstring bindings. 2017-03-21 10:26:45 +01:00
Boris Chiou
30f44da11c Bug 1343153 - Replace pointer to const with immutable reference for nsTimingFunction. 2017-03-21 16:35:07 +08:00
Boris Chiou
708f446364 Bug 1343153 - Support Servo_ParseEasing. 2017-03-21 16:34:58 +08:00
Elliott Pardee
fd42e3575a Making a few lines in layout_wrapper.rs a bit nicer. 2017-03-20 23:10:00 -04:00
bors-servo
32ca5f3540 Auto merge of #16053 - bholley:shared_lock_atomic_refcell, r=bholley
Use AtomicRefCell instead of RwLock inside SharedRwLock for stylo

@SimonSapin wrote the original patch in [1], and I tweaked it to conditionally compile. Just waiting for the try run to come back green before landing.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1348587

<!-- 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/16053)
<!-- Reviewable:end -->
2017-03-20 17:00:31 -07:00
Simon Sapin
7850d3f331 Use AtomicRefCell instead of RwLock inside SharedRwLock for stylo.
MozReview-Commit-ID: 8M6BUqe4pil
2017-03-20 16:36:03 -07:00
bors-servo
315e2dd161 Auto merge of #16047 - canaltinova:eventstate-bindings, r=emilio
Stylo: Update bindings for ServoType

This is needed for https://bugzilla.mozilla.org/show_bug.cgi?id=1348873

---
<!-- 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 [Bug 1348873](https://bugzilla.mozilla.org/show_bug.cgi?id=1348873)

<!-- 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/16047)
<!-- Reviewable:end -->
2017-03-20 15:17:48 -07:00
Lucjan Suski
c83ac31e71 Make ImageData::new return Fallible instead of panic 2017-03-20 21:16:55 +01:00
Nazım Can Altınova
260e919f7b
Stylo: Update bindings for ServoType 2017-03-20 21:18:59 +03:00
bors-servo
17098ddc8f Auto merge of #16045 - mbrubeck:any, r=emilio
Bug 1348487 - stylo: Don't allow combinators in :-moz-any.

https://bugzilla.mozilla.org/show_bug.cgi?id=1348487
2017-03-20 08:31:25 -07:00
Matt Brubeck
b8dead37f6 Bug 1348487 - stylo: Don't allow combinators in :-moz-any. 2017-03-20 08:28:56 -07:00
bors-servo
4fa40c7703 Auto merge of #15890 - emilio:bloom, r=heycam
selectors: Check the bloom filter at most once per complex selector.

Fixes https://github.com/servo/rust-selectors/issues/107

<!-- 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/15890)
<!-- Reviewable:end -->
2017-03-20 06:26:38 -07:00
bors-servo
4a63581fad Auto merge of #15918 - munyari:whitespace, r=emilio
PropertyDeclaration with CSSWideKeyword is parsed

Addresses #15401

<!-- 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/15918)
<!-- Reviewable:end -->
2017-03-20 04:23:28 -07:00
Emilio Cobos Álvarez
2772419ad8
selectors: Check the bloom filter at most once per complex selector.
Fixes https://github.com/servo/rust-selectors/issues/107
2017-03-20 12:09:34 +01:00
bors-servo
9fdebf0934 Auto merge of #16035 - emilio:parallel-log-no-fun, r=upsuper
stylo: Sequentialize binding generation if logging is enabled.

Otherwise the log is useless, and it's even slower than in parallel mode due to
the high lock contention.

<!-- 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/16035)
<!-- Reviewable:end -->
2017-03-20 03:43:26 -07:00
Emilio Cobos Álvarez
e348940296
stylo: Sequentialize binding generation if logging is enabled.
Otherwise the log is useless, and it's even slower than in parallel mode due to
the high lock contention.
2017-03-20 11:42:41 +01:00
bors-servo
50fd39f068 Auto merge of #16016 - Manishearth:graft-font-size, r=upsuper
Add separate specified value for keyword font sizes

In Gecko, these keywords compute to different values depending on the
font.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775

<!-- 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/16016)
<!-- Reviewable:end -->
2017-03-20 00:28:46 -07:00
Manish Goregaokar
c9198d92d5 Add separate specified value for keyword font sizes
In Gecko, these keywords compute to different values depending on the
font.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775
2017-03-20 00:06:04 -07:00
Jeremy Chen
615c8cb5e6 stylo: Add support for text-size-adjust property 2017-03-20 11:34:48 +08:00
bors-servo
8d25dcb8b5 Auto merge of #16033 - servo:per-document-locks, r=emilio
Per-document shared lock for author-origin stylesheets

Fix #16027

<!-- 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/16033)
<!-- Reviewable:end -->
2017-03-19 18:22:23 -07:00
bors-servo
bea126fb73 Auto merge of #16030 - paulrouget:toggle-wr-profiler, r=glennw
Expose a method to toggle wr profiler

<!-- 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/16030)
<!-- Reviewable:end -->
2017-03-19 17:42:16 -07:00
Paul Rouget
b8cd715b3e Expose a method to toggle wr profiler 2017-03-20 01:40:38 +01:00
Jonathan Turner
cf911cef28 Change windows font metrics 2017-03-20 11:57:39 +13:00
Panashe M. Fundira
ec87545774
PropertyDeclaration with CSSWideKeyword is parsed
Addresses #15401

The desired result is for `CSSWideKeyword`s to return false (they are
parsed) and other Custom declaration values to return true (they are unparsed).
2017-03-19 18:37:40 -04:00
Simon Sapin
643545b87f Per-document shared lock for author-origin stylesheets.
Fix #16027
2017-03-19 23:12:15 +01:00
Simon Sapin
02dc8b286a No-op refactor: root_flow param for perform_post_style_recalc_layout_passes
This whole method was a large `if let` block:

```rust
if let Some(mut root_flow) = self.root_flow.clone() {
   // ...
}
```

Move that `if let` to callers to make it clear that the method
doesn’t need to be called when `self.root_flow` is `None`.

By itself, this commit doesn’t change anything.
But it enables the next one.
2017-03-19 23:12:14 +01:00
Simon Sapin
d5074136e3 Rename ReadGuards to StylesheetGuards 2017-03-19 22:30:42 +01:00
Simon Sapin
2952ccfae2 Fix another deadlock 2017-03-19 22:30:41 +01:00
Simon Sapin
d9491187dc Parse stylesheets without acquiring a shared lock. 2017-03-19 22:30:40 +01:00
Simon Sapin
cc046300f0 Remove some indirection. 2017-03-19 22:30:39 +01:00
Simon Sapin
1e38013783 Refactor StylesheetLoader so impls do not need to acquire a shared lock.
This fixes a deadlock:
https://github.com/servo/servo/pull/16014#issuecomment-287527067
2017-03-19 22:30:39 +01:00
Simon Sapin
1bacd0eb15 Move all PropertyDeclarationBlock from RwLock<_> to Locked<_> 2017-03-19 22:30:38 +01:00
Simon Sapin
aeffca2a59 Replace RwLock<StyleRule> with Locked<StyleRule> 2017-03-19 22:30:37 +01:00