Commit graph

25860 commits

Author SHA1 Message Date
streichgeorg
a0d23e3120 Issue #15959: Implemented parsing and serialization of initial-letter property 2017-03-28 18:53:30 +02:00
Simon Sapin
94eb159137 Remove heapsize for Stylo 2017-03-28 17:50:52 +02:00
Boris Zbarsky
76a8e1ca1c Update Gecko atom bindings for Gecko bug 1351139. 2017-03-28 10:19:09 -04:00
Jeremy Chen
a9e4b9caa6 stylo: Implement gecko glue for font-language-override.
To be aligned with the implementation from Gecko side, we parse
font-language-override as Normal keyword or String. Then, we compute
and store it as a u32. So, as to the stylo glue, we can just pass the
u32 to Gecko.

The extra crate, byteorder, is used to simplify the computing and
serialization.

Since we now implement font-language-override for Gecko, we can remove
the additional branches for font-language-override in font shorthand.

ref: Gecko Bug 1347821
2017-03-28 15:34:08 +08:00
Cameron McCormack
13c49606a4 stylo: Add argument to Servo_ResolveStyle to allow stale styles to be returned. 2017-03-28 15:32:35 +08:00
Bobby Holley
7c58483aff Centralize note_dirty_descendants implementation, and fully propagate dirty_descendants in resolve_style.
The current code can leave the tree in an inconsistent state, with the dirty
descendants bit not fully propagated.

MozReview-Commit-ID: ALI6etmlrDa
2017-03-27 20:43:24 -07:00
Bobby Holley
7654488988 stylo: Remove ThreadSafeArray.
MozReview-Commit-ID: JSpV8nhIVQA
2017-03-27 20:36:42 -07:00
bors-servo
0ebb9ec9e8 Auto merge of #16148 - emilio:cleanup-animation-only-restyle, r=hiikezoe
style: Cleanup a bit the restyle hint propagation 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/16148)
<!-- Reviewable:end -->
2017-03-27 16:08:09 -07:00
Anthony Ramine
02b2aa159a Store SSL context in ResourceGroup
This allows sharing it with the HTTP state in CoreResourceManager::fetch.
2017-03-28 00:52:10 +02:00
Anthony Ramine
7a4632bfa2 Introduce create_ssl_context 2017-03-28 00:37:25 +02:00
bors-servo
c85a02b144 Auto merge of #16048 - ferjm:issue-15701-image-cache, r=jdm
Make image cache per-document rather than global

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15701.
- [X] These changes do not require new tests because there should already be WPTs for image loads.

<!-- 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/16048)
<!-- Reviewable:end -->
2017-03-27 13:50:46 -07:00
James Bendig
67282f9bee Add full parsing/serialization for mask-repeat and background-repeat 2017-03-27 14:52:56 -05:00
Fernando Jiménez Moreno
fa433a74b1 Remove useless ImageDecoderRunnable struct 2017-03-27 20:44:04 +02:00
Fernando Jiménez Moreno
f4da16566d Make ImageCacheImpl have a single Mutex<ImageCacheStore> and use ImageDecoderRunnable 2017-03-27 19:54:15 +02:00
Fernando Jiménez Moreno
166c4e8bb2 Move image cache implementation to the net crate 2017-03-27 19:54:15 +02:00
Fernando Jiménez Moreno
72d7ee613b Make image cache per-document rather than global 2017-03-27 19:54:13 +02:00
Fernando Jiménez Moreno
d919f55884 Update http_network_or_cache_fetch according to spec 2017-03-27 19:45:05 +02:00
bors-servo
185d31f086 Auto merge of #16151 - emilio:fixup-webkit-order, r=emilio
style: Re-introduce the -webkit- prefix for the order property.

I accidentally removed it while converting "order" to a predefined type
in #16144.
2017-03-27 09:05:07 -07:00
Emilio Cobos Álvarez
17f055cd78
style: Re-introduce the -webkit- prefix for the order property.
I accidentally removed it while converting "order" to a predefined type
in #16144.
2017-03-27 18:02:58 +02:00
bors-servo
9eb6bb78b0 Auto merge of #16150 - kdy1997:master, r=jdm
Allow using servo as dependency, by fixing Cargo.toml of servo-test-t…

- [ ] `./mach build -d` does not report any errors
I had hard time trying to compile rust-mozjs on my ubuntu machine, and I gave up. As this pr does not touch any source code, I expect it to be work.

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

```sh
Checking the config file...
Checking directories for correct file extensions...

tidy reported no errors.
```

- [x] These changes fix #16149 (github issue number if applicable).

- [x] These changes do not require tests because it's trivial.

<!-- 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/16150)
<!-- Reviewable:end -->
2017-03-27 07:41:36 -07:00
bors-servo
9f5b17202f Auto merge of #16146 - mrobinson:containing-block-scrolling, r=glennw
Fix scroll root of absolutely positioned elements

Absolutely positioned elements should be given the scroll root of their
containing block and not necessarily the scroll root of their parent.
This fixes several CSS tests, though others are still failing pending a
similar fix for inherited clipping rectangles.

Fixes #13530.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] 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/16146)
<!-- Reviewable:end -->
2017-03-27 06:57:32 -07:00
강동윤
52ac3cf171 Allow using servo as dependency, by fixing Cargo.toml of servo-test-tidy. 2017-03-27 22:32:12 +09:00
bors-servo
b6bc49225e Auto merge of #16144 - emilio:number-calc, r=heycam
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
2017-03-27 06:13:39 -07:00
Anthony Ramine
e2e2d42e38 Introduce http_loader::is_redirect_status 2017-03-27 14:51:10 +02:00
Anthony Ramine
d64aa9c5bf Simplify should_be_blocked_due_to_nosniff 2017-03-27 14:14:34 +02:00
Emilio Cobos Álvarez
af37f7667b
style: Cleanup a bit the restyle hint propagation code. 2017-03-27 13:30:48 +02:00
bors-servo
1e2b36a97a Auto merge of #16147 - hiikezoe:update-effect-properties, r=heycam
Update effect properties for animations

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1350754
---
<!-- 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 it's for stylo

<!-- 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/16147)
<!-- Reviewable:end -->
2017-03-27 03:47:47 -07:00
Emilio Cobos Álvarez
b88c0fdd42
style: Use .iter().map instead of manual loop in counter code. 2017-03-27 12:47:02 +02:00
Emilio Cobos Álvarez
10ee812784
Fixup style unit tests 2017-03-27 12:42:35 +02:00
Emilio Cobos Álvarez
46c6b4e1f3
Manifest update 2017-03-27 12:42:33 +02:00
Emilio Cobos Álvarez
9e2977d49e
style: Fix Geckolib build. 2017-03-27 12:42:32 +02:00
Emilio Cobos Álvarez
bcd107967b
style: Stylistic nits. 2017-03-27 12:42:30 +02:00
Emilio Cobos Álvarez
37d8ee9037
style: Test a few more properties, and update expectations. 2017-03-27 12:42:29 +02:00
Emilio Cobos Álvarez
35496c8ae1
style: Align border-spacing with other engines. 2017-03-27 12:42:26 +02:00
Emilio Cobos Álvarez
8205a0de90
style: Properly handle calc inside integer expressions. 2017-03-27 12:42:25 +02:00
Emilio Cobos Álvarez
8175bfd60b
style: Add a note regarding why we don't need to handle percentages here. 2017-03-27 12:42:23 +02:00
Emilio Cobos Álvarez
fc72f096a0
style: Properly track whether <angle> or <time> values came from calc() expressions. 2017-03-27 12:42:22 +02:00
Hiroyuki Ikezoe
2513c8e24a Call UpdateEffectProperties for stylo. 2017-03-27 17:38:33 +09:00
Hiroyuki Ikezoe
4183b0dff2 Introduce UpdateAnimationTasks to perform a bunch of animation's tasks in a SequentialTask.
The UpdateAnimationsTasks is a bitflags and each bit is generated from
Gecko's UpdateAnimationsTasks (enum class) values for matching values
between C++ and Rust. For this reason, the bitflags is annotated as
(feature = "gecko"), as a result update_animations() which uses this bitflags
also became gecko-only function.
2017-03-27 17:38:09 +09:00
Hiroyuki Ikezoe
0c843d4b7d Add an FFI to check that a given (pseudo-) element has any type of animations or not.
If an element has any type of animations in match_elements(), we need to call
UpdateEffectProperties() to update KeyframeEffectReadOnly::mProperties.
2017-03-27 17:32:18 +09:00
Hiroyuki Ikezoe
4aae0e29d6 Update bindings. 2017-03-27 17:31:16 +09:00
Martin Robinson
feac76701f Fix scroll root of absolutely positioned elements
Absolutely positioned elements should be given the scroll root of their
containing block and not necessarily the scroll root of their parent.
This fixes several CSS tests, though others are still failing pending a
similar fix for inherited clipping rectangles.

Fixes #13530.
2017-03-27 08:43:07 +02:00
bors-servo
d77fceaf24 Auto merge of #16145 - hiikezoe:animation-only-restyles, r=heycam
Animation only restyles

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1344966

---
<!-- 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 it's for stylo.

<!-- 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/16145)
<!-- Reviewable:end -->
2017-03-26 21:13:44 -07:00
Emilio Cobos Álvarez
c654c05884
Fixup invalid test. 2017-03-27 03:56:33 +02:00
Emilio Cobos Álvarez
3ab6a20c85
style: Test for calc integer expressions. 2017-03-27 03:56:32 +02:00
Emilio Cobos Álvarez
c7ce2ff483
style: Make numbers keep track of whether they were specified as calc(). 2017-03-27 03:56:30 +02:00
bors-servo
c20bbb920c Auto merge of #16143 - emilio:lops, r=Manishearth
style: Be consistent with naming and serialization of "0" with LenghtOrPercentageOrNumber.

<!-- 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/16143)
<!-- Reviewable:end -->
2017-03-26 18:05:40 -07:00
bors-servo
447742b0a7 Auto merge of #16141 - emilio:keyword-from-ident, r=nox
style: Add <keyword>::from_ident helper to avoid tokenizing the same value multiple times.

We can use this to avoid tokenizing multiple times in some places, like #16127.

<!-- 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/16141)
<!-- Reviewable:end -->
2017-03-26 17:21:49 -07:00
bors-servo
7b64c3c419 Auto merge of #16142 - emilio:dumbness, r=canaltinova
style: Make PercentageOrNumber also reject negative percentages.

It always returns true, so this is just stupid.

<!-- 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/16142)
<!-- Reviewable:end -->
2017-03-26 16:42:48 -07:00
bors-servo
f4371dfa02 Auto merge of #16136 - streichgeorg:counter, r=emilio
to_css of counter-increment returns none when there are no properties.

<!-- Please describe your changes on the following line: -->
Changed to_css in style::properties::longhands::counter_increment returns "none" if there are no properties defined.

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

<!-- Either: -->
- [X] 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/16136)
<!-- Reviewable:end -->
2017-03-26 14:56:23 -07:00