Commit graph

6091 commits

Author SHA1 Message Date
Xidorn Quan
2c0347ac5b Rename font_face::FontFaceRule to FontFaceData. 2017-03-30 11:41:07 +11:00
Simon Sapin
4f2b9a33fe Replace ParsedDeclaration::expand with non-generic method
... to reduce its code size impact.

https://bugzilla.mozilla.org/show_bug.cgi?id=1351737
2017-03-29 20:28:25 +02:00
bors-servo
8adf191973 Auto merge of #16159 - bholley:note_dirty_descendants, r=heycam
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.

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1350441

<!-- 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/16159)
<!-- Reviewable:end -->
2017-03-29 06:52:07 -05: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
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
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
Emilio Cobos Álvarez
35496c8ae1
style: Align border-spacing with other engines. 2017-03-27 12:42:26 +02: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
bors-servo
d992442dc6 Auto merge of #16137 - nox:die-rustc-serialize-die, r=emilio
Replace use of rustc_serialize::base64 by base64

<!-- 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/16137)
<!-- Reviewable:end -->
2017-03-26 12:23:17 -07:00
bors-servo
7f2a4e01b1 Auto merge of #16139 - servo:rustup, r=emilio
Update rustc to 1.17.0-nightly (7dd4e2db7 2017-03-26)

<!-- 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/16139)
<!-- Reviewable:end -->
2017-03-26 11:36:51 -07:00
Anthony Ramine
54d37d920c Remove some useless Option<T> wrappers from ServoUrl methods 2017-03-26 16:15:06 +02:00
Anthony Ramine
c16234f7a7 Update rustc to 1.17.0-nightly (7dd4e2db7 2017-03-26) 2017-03-26 16:10:44 +02:00
Anthony Ramine
0ed4df28b5 Replace use of rustc_serialize::base64 by base64 2017-03-26 14:15:31 +02:00
Anthony Ramine
a6d22b1a35 Only pass the protocol in use in to establish a WS connection 2017-03-24 11:09:30 +01:00
bors-servo
189b0d9094 Auto merge of #16099 - nox:tungstenite, r=jdm
Properly follow the spec in WebSocket::Constructor

<!-- 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/16099)
<!-- Reviewable:end -->
2017-03-24 01:46:14 -07:00
Anthony Ramine
0bd54b904b Properly follow the spec in WebSocket::Constructor 2017-03-24 09:43:14 +01:00
Anthony Ramine
bba0be13dd Make ServoUrl::as_url return a &Url 2017-03-23 15:37:32 +01:00
Anthony Ramine
9894dca86c Avoid a useless clone in WebSocket::Constructor 2017-03-23 14:17:17 +01:00
bors-servo
c99289a928 Auto merge of #16073 - glennw:update-wr-glfns, r=mrobinson
Update WR (gl trait, scroll roots)

<!-- 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/16073)
<!-- Reviewable:end -->
2017-03-23 03:43:49 -07:00
Glenn Watson
fe75382bcb Update WR (gl/es runtime table, scroll roots). 2017-03-23 14:32:03 +10:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
bors-servo
e0f1855c10 Auto merge of #16088 - mbrubeck:always-be-updating, r=emilio
Update parking_lot_core and smallvec

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they update third-party code only

<!-- 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/16088)
<!-- Reviewable:end -->
2017-03-22 16:21:28 -07:00
bors-servo
851cef4a2b Auto merge of #16083 - MortimerGoro:display_raf_check, r=emilio
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback

<!-- Please describe your changes on the following line: -->
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback. Fixes a possible deadlock during the interval when the requestAnimationFrame is moved from window to VRDisplay.

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

<!-- 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/16083)
<!-- Reviewable:end -->
2017-03-22 15:03:04 -07:00
Matt Brubeck
822d4803bc Update parking_lot_core and smallvec 2017-03-22 14:55:49 -07:00
Imanol Fernandez
134e918aae Only sync WebVR framedata with compositor when GetFrameData function is called inside a VRDisplay.requestAnimationFrame callback. 2017-03-22 17:41:15 +01: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
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
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
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
Elliott Pardee
fd42e3575a Making a few lines in layout_wrapper.rs a bit nicer. 2017-03-20 23:10:00 -04:00
Lucjan Suski
c83ac31e71 Make ImageData::new return Fallible instead of panic 2017-03-20 21:16:55 +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
Simon Sapin
643545b87f Per-document shared lock for author-origin stylesheets.
Fix #16027
2017-03-19 23:12:15 +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
Simon Sapin
57724e5a37 Replace RwLock<Keyframe> with Locked<Keyframe> 2017-03-19 22:30:37 +01:00
Simon Sapin
adb97d4cbe Wrap most CSS rules in Locked<_> instead of RwLock<_> 2017-03-19 22:30:36 +01:00
Simon Sapin
f35b4e27b3 Replace RwLock<CssRules> with Locked<CssRules> 2017-03-19 22:30:35 +01:00
Simon Sapin
b213daaa88 Tidy 2017-03-19 22:30:34 +01:00
Simon Sapin
600152bd00 Replace more RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:34 +01:00
Simon Sapin
fe4e70c5f8 Introduce a ToCssWithGuard trait 2017-03-19 22:30:33 +01:00
Simon Sapin
c5a7294e05 Replace RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:31 +01:00