mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Auto merge of #12945 - Manishearth:bgarray, r=SimonSapin
Support multiple backgrounds in both servo and stylo (Commits do not build individually, but split up for review) These patches make all of the background- properties accept multiple values, and add the layout code to display them. Still needs some cleanup, and some testing, but it seems to work. r? @SimonSapin <!-- 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/12945) <!-- Reviewable:end -->
This commit is contained in:
commit
c5e81f8361
32 changed files with 806 additions and 440 deletions
1
ports/cef/Cargo.lock
generated
1
ports/cef/Cargo.lock
generated
|
@ -2119,6 +2119,7 @@ dependencies = [
|
|||
"libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
|
|
9
ports/geckolib/Cargo.lock
generated
9
ports/geckolib/Cargo.lock
generated
|
@ -234,6 +234,14 @@ dependencies = [
|
|||
"libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.1.35"
|
||||
|
@ -363,6 +371,7 @@ dependencies = [
|
|||
"libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -335,6 +335,8 @@ extern "C" {
|
|||
pub fn Gecko_DestroyClipPath(clip: *mut StyleClipPath);
|
||||
pub fn Gecko_NewBasicShape(type_: StyleBasicShapeType)
|
||||
-> *mut StyleBasicShape;
|
||||
pub fn Gecko_FillAllBackgroundLists(layers: *mut nsStyleImageLayers,
|
||||
maxLen: u32);
|
||||
pub fn Gecko_AddRefCalcArbitraryThread(aPtr: *mut Calc);
|
||||
pub fn Gecko_ReleaseCalcArbitraryThread(aPtr: *mut Calc);
|
||||
pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont);
|
||||
|
|
|
@ -3,13 +3,16 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::iter::{once, Chain, Once, IntoIterator};
|
||||
use std::slice::IterMut;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use structs::nsStyleAutoArray;
|
||||
|
||||
impl<T> nsStyleAutoArray<T> {
|
||||
pub fn iter_mut(&mut self) -> Chain<Once<&mut T>, IterMut<T>> {
|
||||
once(&mut self.mFirstElement).chain(self.mOtherElements.iter_mut())
|
||||
}
|
||||
pub fn iter(&self) -> Chain<Once<&T>, Iter<T>> {
|
||||
once(&self.mFirstElement).chain(self.mOtherElements.iter())
|
||||
}
|
||||
|
||||
// Note that often structs containing autoarrays will have
|
||||
// additional member fields that contain the length, which must be kept
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue