Skip to content

Commit 35e0fa2

Browse files
delanLoirooriol
authored andcommitted
Commit our changes on top of upstream Stylo
This is a rebase of 18ca509 Signed-off-by: Martin Robinson <[email protected]>
1 parent 67a63bc commit 35e0fa2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1499
-400
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/_filtered/
33
/target/
44
/style/properties/__pycache__/
5+
Cargo.lock

Cargo.toml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"dom",
5+
"malloc_size_of",
6+
"rustfmt.toml",
7+
"selectors",
8+
"servo_arc",
9+
"style",
10+
"style_derive",
11+
"style_static_prefs",
12+
"style_traits",
13+
"to_shmem",
14+
"to_shmem_derive",
15+
]
16+
default-members = ["style"]

atoms/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "servo_atoms"
3+
version = "0.0.1"
4+
authors = ["The Servo Project Developers"]
5+
license = "MPL-2.0"
6+
edition = "2018"
7+
publish = false
8+
build = "build.rs"
9+
10+
[lib]
11+
path = "lib.rs"
12+
13+
[dependencies]
14+
string_cache = "0.8"
15+
16+
[build-dependencies]
17+
string_cache_codegen = "0.5"

atoms/build.rs

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4+
5+
use std::env;
6+
use std::fs::File;
7+
use std::io::{BufRead, BufReader};
8+
use std::path::Path;
9+
10+
fn main() {
11+
let static_atoms =
12+
Path::new(&env::var_os("CARGO_MANIFEST_DIR").unwrap()).join("static_atoms.txt");
13+
let static_atoms = BufReader::new(File::open(&static_atoms).unwrap());
14+
let mut atom_type = string_cache_codegen::AtomType::new("Atom", "atom!");
15+
16+
macro_rules! predefined {
17+
($($name: expr,)+) => {
18+
{
19+
$(
20+
atom_type.atom($name);
21+
)+
22+
}
23+
}
24+
}
25+
include!("../style/counter_style/predefined.rs");
26+
27+
atom_type
28+
.atoms(static_atoms.lines().map(Result::unwrap))
29+
.write_to_file(&Path::new(&env::var_os("OUT_DIR").unwrap()).join("atom.rs"))
30+
.unwrap();
31+
}

atoms/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4+
5+
include!(concat!(env!("OUT_DIR"), "/atom.rs"));

atoms/static_atoms.txt

+179
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
-moz-content-preferred-color-scheme
2+
-moz-device-pixel-ratio
3+
-moz-fixed-pos-containing-block
4+
-moz-gtk-csd-close-button-position
5+
-moz-gtk-csd-maximize-button-position
6+
-moz-gtk-csd-menu-radius
7+
-moz-gtk-csd-minimize-button-position
8+
-moz-gtk-csd-titlebar-button-spacing
9+
-moz-gtk-csd-titlebar-radius
10+
-moz-gtk-menu-radius
11+
-moz-mac-titlebar-height
12+
-moz-overlay-scrollbar-fade-duration
13+
DOMContentLoaded
14+
abort
15+
activate
16+
addtrack
17+
animationcancel
18+
animationend
19+
animationiteration
20+
animationstart
21+
aspect-ratio
22+
beforeunload
23+
block-size
24+
button
25+
canplay
26+
canplaythrough
27+
center
28+
change
29+
characteristicvaluechanged
30+
checkbox
31+
click
32+
close
33+
closing
34+
color
35+
complete
36+
compositionend
37+
compositionstart
38+
compositionupdate
39+
controllerchange
40+
cursive
41+
dark
42+
datachannel
43+
date
44+
datetime-local
45+
dir
46+
device-pixel-ratio
47+
durationchange
48+
email
49+
emptied
50+
end
51+
ended
52+
error
53+
fantasy
54+
fetch
55+
file
56+
fill
57+
fill-opacity
58+
formdata
59+
fullscreenchange
60+
fullscreenerror
61+
gattserverdisconnected
62+
hashchange
63+
height
64+
hidden
65+
icecandidate
66+
iceconnectionstatechange
67+
icegatheringstatechange
68+
image
69+
inline-size
70+
input
71+
inputsourceschange
72+
invalid
73+
keydown
74+
keypress
75+
kind
76+
left
77+
light
78+
ltr
79+
load
80+
loadeddata
81+
loadedmetadata
82+
loadend
83+
loadstart
84+
message
85+
message
86+
messageerror
87+
monospace
88+
month
89+
mousedown
90+
mousemove
91+
mouseover
92+
mouseup
93+
negotiationneeded
94+
none
95+
normal
96+
number
97+
onchange
98+
open
99+
orientation
100+
pagehide
101+
pageshow
102+
password
103+
pause
104+
play
105+
playing
106+
popstate
107+
postershown
108+
prefers-color-scheme
109+
print
110+
progress
111+
radio
112+
range
113+
ratechange
114+
readystatechange
115+
referrer
116+
reftest-wait
117+
rejectionhandled
118+
removetrack
119+
reset
120+
resize
121+
resolution
122+
resourcetimingbufferfull
123+
right
124+
rtl
125+
sans-serif
126+
safe-area-inset-top
127+
safe-area-inset-bottom
128+
safe-area-inset-left
129+
safe-area-inset-right
130+
scan
131+
screen
132+
scroll-position
133+
scrollbar-inline-size
134+
search
135+
seeked
136+
seeking
137+
select
138+
selectend
139+
selectionchange
140+
selectstart
141+
serif
142+
sessionavailable
143+
signalingstatechange
144+
squeeze
145+
squeezeend
146+
squeezestart
147+
srclang
148+
statechange
149+
stroke
150+
stroke-opacity
151+
storage
152+
submit
153+
suspend
154+
system-ui
155+
tel
156+
text
157+
time
158+
timeupdate
159+
toggle
160+
track
161+
transitioncancel
162+
transitionend
163+
transitionrun
164+
transitionstart
165+
uncapturederror
166+
unhandledrejection
167+
unload
168+
url
169+
visibilitychange
170+
volumechange
171+
waiting
172+
webglcontextcreationerror
173+
webkitAnimationEnd
174+
webkitAnimationIteration
175+
webkitAnimationStart
176+
webkitTransitionEnd
177+
webkitTransitionRun
178+
week
179+
width

dom/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "dom"
3+
version = "0.0.1"
4+
authors = ["The Servo Project Developers"]
5+
license = "MPL-2.0"
6+
edition = "2021"
7+
publish = false
8+
9+
[lib]
10+
path = "lib.rs"
11+
12+
[dependencies]
13+
bitflags = "2"
14+
malloc_size_of = { path = "../malloc_size_of" }

0 commit comments

Comments
 (0)