зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
Коммит
270edc1df1
|
@ -1,7 +1,12 @@
|
|||
# Bug 1016240 - Exterminate CR+LF line endings. r=briansmith,cpearce,ehsan,gavin
|
||||
# https://hg.mozilla.org/mozilla-central/rev/ca251a28d3dd
|
||||
741fa39165c4bec22e115d1d501631ae499c4180 # cinnabar
|
||||
51ba75d1355026c53c89c0c08bb36cada57d21a5 # gecko-dev
|
||||
|
||||
# Bug 1128203 - Reduce indentation from 4 to 2 spaces. rs=dolske DONTBUILD CLOSED TREE
|
||||
# https://hg.mozilla.org/mozilla-central/rev/a569f5a4bb6a27f25e99b5b45ee241db2660b7e3
|
||||
b8ffa2c11b99bd5762b5ed612acd755b29d1eae6 # cinnabar
|
||||
174ae94f90f1b5edc83b737b4006c82bb830db7c # gecko-div
|
||||
174ae94f90f1b5edc83b737b4006c82bb830db7c # gecko-dev
|
||||
|
||||
# Bug 1204606 - Reformat of dom/media
|
||||
# https://hg.mozilla.org/mozilla-central/rev/0ceae9db9ec0be18daa1a279511ad305723185d4
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
ca251a28d3ddae784436d28829fb019025f4b127 - Birunthan Mohanathas - Bug 1016240 - Exterminate CR+LF line endings. r=briansmith,cpearce,ehsan,gavin
|
||||
a569f5a4bb6a27f25e99b5b45ee241db2660b7e3 - Paolo Amadini - Bug 1128203 - Reduce indentation from 4 to 2 spaces. rs=dolske DONTBUILD CLOSED TREE
|
||||
0ceae9db9ec0be18daa1a279511ad305723185d4 - Sylvestre Ledru - Bug 1204606 - Reformat of dom/media. r=jya
|
||||
dcfc73c043c01c3185631262605e3511bebe4cca - Mark Banner - Bug 1309842 - Fix eslint/espree parsing errors for ignored directories in browser/. r=jaws
|
||||
|
|
|
@ -81,7 +81,7 @@ name = "atty"
|
|||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
@ -97,7 +97,7 @@ dependencies = [
|
|||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-named-pipes 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -119,7 +119,7 @@ dependencies = [
|
|||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -135,7 +135,7 @@ dependencies = [
|
|||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -149,7 +149,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
@ -160,7 +160,7 @@ version = "0.1.24"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -240,8 +240,8 @@ dependencies = [
|
|||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -358,7 +358,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dogear 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"moz_task 0.1.0",
|
||||
"nserror 0.1.0",
|
||||
|
@ -409,7 +409,7 @@ version = "0.3.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -418,7 +418,7 @@ version = "0.1.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -477,7 +477,7 @@ version = "0.28.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -533,7 +533,7 @@ version = "0.6.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -549,7 +549,7 @@ dependencies = [
|
|||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -560,7 +560,7 @@ dependencies = [
|
|||
"core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -726,11 +726,11 @@ dependencies = [
|
|||
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -809,43 +809,43 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.8.1"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"darling_core 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling_macro 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling_core 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling_macro 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_core"
|
||||
version = "0.8.1"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.8.1"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"darling_core 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling_core 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_common"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -854,10 +854,10 @@ name = "derive_more"
|
|||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -865,7 +865,7 @@ name = "devd-rs"
|
|||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -895,7 +895,7 @@ name = "dirs"
|
|||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
@ -947,7 +947,7 @@ version = "0.8.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.88 (git+https://github.com/servo/serde?branch=deserialize_from_enums10)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
|
@ -1024,9 +1024,9 @@ name = "euclid_macros"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1043,9 +1043,9 @@ name = "failure_derive"
|
|||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ name = "flate2"
|
|||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ name = "freetype"
|
|||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1108,7 +1108,7 @@ name = "fs2"
|
|||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
||||
|
@ -1182,7 +1182,7 @@ dependencies = [
|
|||
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.25.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"nsstring 0.1.0",
|
||||
|
@ -1348,7 +1348,7 @@ dependencies = [
|
|||
name = "hashglobe"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1424,7 +1424,7 @@ name = "iovec"
|
|||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1450,7 +1450,7 @@ dependencies = [
|
|||
"env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mozjs_sys 0.0.0",
|
||||
"num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1492,7 +1492,7 @@ dependencies = [
|
|||
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lmdb-rkv 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"moz_task 0.1.0",
|
||||
|
@ -1572,7 +1572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.43"
|
||||
version = "0.2.51"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -1589,7 +1589,7 @@ name = "libudev"
|
|||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libudev-sys 0.1.3",
|
||||
]
|
||||
|
||||
|
@ -1598,7 +1598,7 @@ name = "libudev-sys"
|
|||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1607,7 +1607,7 @@ version = "1.0.16"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1623,7 +1623,7 @@ version = "0.11.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lmdb-rkv-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1633,7 +1633,7 @@ version = "0.8.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1683,8 +1683,8 @@ name = "malloc_size_of_derive"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1698,7 +1698,7 @@ name = "memchr"
|
|||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1706,7 +1706,7 @@ name = "memchr"
|
|||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1716,7 +1716,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1725,7 +1725,7 @@ name = "memmap"
|
|||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
||||
|
@ -1740,7 +1740,7 @@ version = "0.1.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1750,7 +1750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1764,7 +1764,7 @@ dependencies = [
|
|||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1789,7 +1789,7 @@ name = "mio-uds"
|
|||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1813,7 +1813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "moz_task"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
|
@ -1829,7 +1829,7 @@ dependencies = [
|
|||
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.88 (git+https://github.com/servo/serde?branch=deserialize_from_enums10)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
@ -1839,7 +1839,7 @@ name = "mozjs_sys"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1927,7 +1927,7 @@ version = "0.2.32"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
||||
|
@ -1996,8 +1996,8 @@ version = "0.2.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2027,7 +2027,7 @@ name = "num_cpus"
|
|||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2088,7 +2088,7 @@ name = "parking_lot_core"
|
|||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
|
@ -2204,7 +2204,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.24"
|
||||
version = "0.4.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2237,7 +2237,7 @@ dependencies = [
|
|||
name = "pulse-ffi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2255,10 +2255,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.10"
|
||||
version = "0.6.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2267,7 +2267,7 @@ version = "0.3.22"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2277,7 +2277,7 @@ version = "0.4.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
||||
|
@ -2297,7 +2297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2401,7 +2401,7 @@ dependencies = [
|
|||
name = "rsdparsa_capi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"rsdparsa 0.1.0",
|
||||
|
@ -2477,9 +2477,9 @@ name = "scroll_derive"
|
|||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2544,9 +2544,9 @@ name = "serde_derive"
|
|||
version = "1.0.88"
|
||||
source = "git+https://github.com/servo/serde?branch=deserialize_from_enums10#84b2795d2a7b5312125a99b1ef11c67fd8d17c35"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2636,7 +2636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "storage"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"storage_variant 0.1.0",
|
||||
|
@ -2647,7 +2647,7 @@ dependencies = [
|
|||
name = "storage_variant"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"xpcom 0.1.0",
|
||||
|
@ -2679,8 +2679,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2757,11 +2757,11 @@ dependencies = [
|
|||
name = "style_derive"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derive_common 0.0.1",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2790,7 +2790,7 @@ dependencies = [
|
|||
"cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geckoservo 0.0.1",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2817,18 +2817,18 @@ name = "syn"
|
|||
version = "0.14.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.15.24"
|
||||
version = "0.15.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2837,9 +2837,9 @@ name = "synstructure"
|
|||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2876,7 +2876,7 @@ version = "0.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2893,7 +2893,7 @@ name = "termion"
|
|||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2917,7 +2917,7 @@ name = "thin-vec"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2944,7 +2944,7 @@ name = "time"
|
|||
version = "0.1.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
||||
]
|
||||
|
@ -2964,11 +2964,11 @@ dependencies = [
|
|||
name = "to_shmem_derive"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"darling 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derive_common 0.0.1",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -3115,7 +3115,7 @@ dependencies = [
|
|||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3149,7 +3149,7 @@ dependencies = [
|
|||
"boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"devd-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3321,7 +3321,7 @@ dependencies = [
|
|||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3392,7 +3392,7 @@ name = "which"
|
|||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3466,7 +3466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "xpcom"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"thin-vec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3587,9 +3587,9 @@ dependencies = [
|
|||
"checksum cubeb-backend 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "442cd5cfb980ff62730525278ce320d9b2ff635b725857ad3176832664262fec"
|
||||
"checksum cubeb-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0161f9327864922ba7a172c90bd86bc9094938433eca415e2c75629954045022"
|
||||
"checksum cubeb-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3ba7540c17b90159cf7d7854da370998ff0560d9b90e2c9290bb588afa0edf95"
|
||||
"checksum darling 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f593353cad5af2df6d54810de2b61aa8acba5b5fbc70b0d75e7cc5bdd80aca73"
|
||||
"checksum darling_core 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "168c246e87e727d58575d9b4595491010627f0cdc910e3e6ea3b36db2b9a9d9a"
|
||||
"checksum darling_macro 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99c4eff4bcbeaf6a22578012ff79c95910338668278d1901e528bd34a22f575d"
|
||||
"checksum darling 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9158d690bc62a3a57c3e45b85e4d50de2008b39345592c64efd79345c7e24be0"
|
||||
"checksum darling_core 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d2a368589465391e127e10c9e3a08efc8df66fd49b87dc8524c764bbe7f2ef82"
|
||||
"checksum darling_macro 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "244e8987bd4e174385240cde20a3657f607fb0797563c28255c353b5819a07b1"
|
||||
"checksum derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f57d78cf3bd45270dad4e70c21ec77a960b36c7a841ff9db76aaa775a8fb871"
|
||||
"checksum devd-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7c9ac481c38baf400d3b732e4a06850dfaa491d1b6379a249d9d40d14c2434c"
|
||||
"checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
|
||||
|
@ -3652,7 +3652,7 @@ dependencies = [
|
|||
"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
|
||||
"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
|
||||
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
|
||||
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
||||
"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"
|
||||
"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
|
||||
"checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
|
||||
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
|
||||
|
@ -3710,11 +3710,11 @@ dependencies = [
|
|||
"checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
|
||||
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4"
|
||||
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
|
||||
"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915"
|
||||
"checksum procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f566249236c6ca4340f7ca78968271f0ed2b0f234007a61b66f9ecd0af09260"
|
||||
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
|
||||
"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8"
|
||||
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
|
||||
"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1"
|
||||
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
|
||||
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
||||
"checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d"
|
||||
|
@ -3764,7 +3764,7 @@ dependencies = [
|
|||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||
"checksum syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59"
|
||||
"checksum syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4e4b5274d4a0a3d2749d5c158dc64d3403e60554dc61194648787ada5212473d"
|
||||
"checksum syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)" = "734ecc29cd36e8123850d9bf21dfd62ef8300aaa8f879aabaa899721808be37c"
|
||||
"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2"
|
||||
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
||||
"checksum target-lexicon 0.2.0 (git+https://github.com/glandium/target-lexicon?branch=thumbv7neon-v0.2)" = "<none>"
|
||||
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.2.100
|
||||
Current extension version is: 2.2.117
|
||||
|
||||
Taken from upstream commit: f9c58115
|
||||
Taken from upstream commit: 57abddc9
|
||||
|
|
|
@ -173,6 +173,9 @@ PdfDataListener.prototype = {
|
|||
}
|
||||
return combinedArray;
|
||||
},
|
||||
get isDone() {
|
||||
return !!this.isDataReady;
|
||||
},
|
||||
finish: function PdfDataListener_finish() {
|
||||
this.isDataReady = true;
|
||||
if (this.oncompleteCallback) {
|
||||
|
@ -606,14 +609,16 @@ class RangedChromeActions extends ChromeActions {
|
|||
}
|
||||
|
||||
initPassiveLoading() {
|
||||
var data;
|
||||
let data, done;
|
||||
if (!this.streamingEnabled) {
|
||||
this.originalRequest.cancel(Cr.NS_BINDING_ABORTED);
|
||||
this.originalRequest = null;
|
||||
data = this.dataListener.readData();
|
||||
done = this.dataListener.isDone;
|
||||
this.dataListener = null;
|
||||
} else {
|
||||
data = this.dataListener.readData();
|
||||
done = this.dataListener.isDone;
|
||||
|
||||
this.dataListener.onprogress = (loaded, total) => {
|
||||
this.domWindow.postMessage({
|
||||
|
@ -624,6 +629,11 @@ class RangedChromeActions extends ChromeActions {
|
|||
}, PDF_VIEWER_ORIGIN);
|
||||
};
|
||||
this.dataListener.oncomplete = () => {
|
||||
if (!done && this.dataListener.isDone) {
|
||||
this.domWindow.postMessage({
|
||||
pdfjsLoadAction: "progressiveDone",
|
||||
}, PDF_VIEWER_ORIGIN);
|
||||
}
|
||||
this.dataListener = null;
|
||||
};
|
||||
}
|
||||
|
@ -635,6 +645,7 @@ class RangedChromeActions extends ChromeActions {
|
|||
pdfUrl: this.pdfUrl,
|
||||
length: this.contentLength,
|
||||
data,
|
||||
done,
|
||||
}, PDF_VIEWER_ORIGIN);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.2.100';
|
||||
var pdfjsBuild = 'f9c58115';
|
||||
var pdfjsVersion = '2.2.117';
|
||||
var pdfjsBuild = '57abddc9';
|
||||
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -1264,6 +1264,7 @@ function getDocument(src) {
|
|||
networkStream = new _transport_stream.PDFDataTransportStream({
|
||||
length: params.length,
|
||||
initialData: params.initialData,
|
||||
progressiveDone: params.progressiveDone,
|
||||
disableRange: params.disableRange,
|
||||
disableStream: params.disableStream
|
||||
}, rangeTransport);
|
||||
|
@ -1297,11 +1298,12 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
if (pdfDataRangeTransport) {
|
||||
source.length = pdfDataRangeTransport.length;
|
||||
source.initialData = pdfDataRangeTransport.initialData;
|
||||
source.progressiveDone = pdfDataRangeTransport.progressiveDone;
|
||||
}
|
||||
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.2.100',
|
||||
apiVersion: '2.2.117',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -1371,12 +1373,14 @@ const PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() {
|
|||
}();
|
||||
|
||||
class PDFDataRangeTransport {
|
||||
constructor(length, initialData) {
|
||||
constructor(length, initialData, progressiveDone = false) {
|
||||
this.length = length;
|
||||
this.initialData = initialData;
|
||||
this.progressiveDone = progressiveDone;
|
||||
this._rangeListeners = [];
|
||||
this._progressListeners = [];
|
||||
this._progressiveReadListeners = [];
|
||||
this._progressiveDoneListeners = [];
|
||||
this._readyCapability = (0, _util.createPromiseCapability)();
|
||||
}
|
||||
|
||||
|
@ -1392,6 +1396,10 @@ class PDFDataRangeTransport {
|
|||
this._progressiveReadListeners.push(listener);
|
||||
}
|
||||
|
||||
addProgressiveDoneListener(listener) {
|
||||
this._progressiveDoneListeners.push(listener);
|
||||
}
|
||||
|
||||
onDataRange(begin, chunk) {
|
||||
for (const listener of this._rangeListeners) {
|
||||
listener(begin, chunk);
|
||||
|
@ -1414,6 +1422,14 @@ class PDFDataRangeTransport {
|
|||
});
|
||||
}
|
||||
|
||||
onDataProgressiveDone() {
|
||||
this._readyCapability.promise.then(() => {
|
||||
for (const listener of this._progressiveDoneListeners) {
|
||||
listener();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
transportReady() {
|
||||
this._readyCapability.resolve();
|
||||
}
|
||||
|
@ -3059,9 +3075,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
return InternalRenderTask;
|
||||
}();
|
||||
|
||||
const version = '2.2.100';
|
||||
const version = '2.2.117';
|
||||
exports.version = version;
|
||||
const build = 'f9c58115';
|
||||
const build = '57abddc9';
|
||||
exports.build = build;
|
||||
|
||||
/***/ }),
|
||||
|
@ -6149,42 +6165,42 @@ var TilingPattern = function TilingPatternClosure() {
|
|||
y0 = bbox[1],
|
||||
x1 = bbox[2],
|
||||
y1 = bbox[3];
|
||||
var topLeft = [x0, y0];
|
||||
var botRight = [x0 + xstep, y0 + ystep];
|
||||
var width = botRight[0] - topLeft[0];
|
||||
var height = botRight[1] - topLeft[1];
|
||||
|
||||
var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);
|
||||
|
||||
var curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform);
|
||||
|
||||
var combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]];
|
||||
width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])), MAX_PATTERN_SIZE);
|
||||
height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])), MAX_PATTERN_SIZE);
|
||||
var tmpCanvas = owner.cachedCanvases.getCanvas('pattern', width, height, true);
|
||||
var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]);
|
||||
var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]);
|
||||
var tmpCanvas = owner.cachedCanvases.getCanvas('pattern', dimx.size, dimy.size, true);
|
||||
var tmpCtx = tmpCanvas.context;
|
||||
var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);
|
||||
graphics.groupLevel = owner.groupLevel;
|
||||
this.setFillAndStrokeStyleToContext(graphics, paintType, color);
|
||||
this.setScale(width, height, xstep, ystep);
|
||||
this.transformToScale(graphics);
|
||||
var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]];
|
||||
graphics.transform.apply(graphics, tmpTranslate);
|
||||
graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);
|
||||
graphics.transform(1, 0, 0, 1, -x0, -y0);
|
||||
this.clipBbox(graphics, bbox, x0, y0, x1, y1);
|
||||
graphics.executeOperatorList(operatorList);
|
||||
this.ctx.transform(1, 0, 0, 1, x0, y0);
|
||||
this.ctx.scale(1 / dimx.scale, 1 / dimy.scale);
|
||||
return tmpCanvas.canvas;
|
||||
},
|
||||
setScale: function TilingPattern_setScale(width, height, xstep, ystep) {
|
||||
this.scale = [width / xstep, height / ystep];
|
||||
},
|
||||
transformToScale: function TilingPattern_transformToScale(graphics) {
|
||||
var scale = this.scale;
|
||||
var tmpScale = [scale[0], 0, 0, scale[1], 0, 0];
|
||||
graphics.transform.apply(graphics, tmpScale);
|
||||
},
|
||||
scaleToContext: function TilingPattern_scaleToContext() {
|
||||
var scale = this.scale;
|
||||
this.ctx.scale(1 / scale[0], 1 / scale[1]);
|
||||
getSizeAndScale: function TilingPattern_getSizeAndScale(step, realOutputSize, scale) {
|
||||
step = Math.abs(step);
|
||||
var maxSize = Math.max(MAX_PATTERN_SIZE, realOutputSize);
|
||||
var size = Math.ceil(step * scale);
|
||||
|
||||
if (size >= maxSize) {
|
||||
size = maxSize;
|
||||
} else {
|
||||
scale = size / step;
|
||||
}
|
||||
|
||||
return {
|
||||
scale,
|
||||
size
|
||||
};
|
||||
},
|
||||
clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
|
@ -6222,11 +6238,10 @@ var TilingPattern = function TilingPatternClosure() {
|
|||
}
|
||||
},
|
||||
getPattern: function TilingPattern_getPattern(ctx, owner) {
|
||||
var temporaryPatternCanvas = this.createPatternCanvas(owner);
|
||||
ctx = this.ctx;
|
||||
ctx.setTransform.apply(ctx, this.baseTransform);
|
||||
ctx.transform.apply(ctx, this.matrix);
|
||||
this.scaleToContext();
|
||||
var temporaryPatternCanvas = this.createPatternCanvas(owner);
|
||||
return ctx.createPattern(temporaryPatternCanvas, 'repeat');
|
||||
}
|
||||
};
|
||||
|
@ -7299,7 +7314,8 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
function PDFDataTransportStream(params, pdfDataRangeTransport) {
|
||||
(0, _util.assert)(pdfDataRangeTransport);
|
||||
this._queuedChunks = [];
|
||||
var initialData = params.initialData;
|
||||
this._progressiveDone = params.progressiveDone || false;
|
||||
const initialData = params.initialData;
|
||||
|
||||
if (initialData && initialData.length > 0) {
|
||||
let buffer = new Uint8Array(initialData).buffer;
|
||||
|
@ -7333,6 +7349,10 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
});
|
||||
});
|
||||
|
||||
this._pdfDataRangeTransport.addProgressiveDoneListener(() => {
|
||||
this._onProgressiveDone();
|
||||
});
|
||||
|
||||
this._pdfDataRangeTransport.transportReady();
|
||||
}
|
||||
|
||||
|
@ -7371,6 +7391,15 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
_onProgressiveDone() {
|
||||
if (this._fullRequestReader) {
|
||||
this._fullRequestReader.progressiveDone();
|
||||
}
|
||||
|
||||
this._progressiveDone = true;
|
||||
},
|
||||
|
||||
_removeRangeReader: function PDFDataTransportStream_removeRangeReader(reader) {
|
||||
var i = this._rangeReaders.indexOf(reader);
|
||||
|
||||
|
@ -7382,7 +7411,7 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
(0, _util.assert)(!this._fullRequestReader);
|
||||
var queuedChunks = this._queuedChunks;
|
||||
this._queuedChunks = null;
|
||||
return new PDFDataTransportStreamReader(this, queuedChunks);
|
||||
return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone);
|
||||
},
|
||||
getRangeReader: function PDFDataTransportStream_getRangeReader(begin, end) {
|
||||
var reader = new PDFDataTransportStreamRangeReader(this, begin, end);
|
||||
|
@ -7408,9 +7437,9 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
}
|
||||
};
|
||||
|
||||
function PDFDataTransportStreamReader(stream, queuedChunks) {
|
||||
function PDFDataTransportStreamReader(stream, queuedChunks, progressiveDone = false) {
|
||||
this._stream = stream;
|
||||
this._done = false;
|
||||
this._done = progressiveDone || false;
|
||||
this._filename = null;
|
||||
this._queuedChunks = queuedChunks || [];
|
||||
this._requests = [];
|
||||
|
@ -7493,7 +7522,16 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
|
|||
});
|
||||
|
||||
this._requests = [];
|
||||
},
|
||||
|
||||
progressiveDone() {
|
||||
if (this._done) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._done = true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function PDFDataTransportStreamRangeReader(stream, begin, end) {
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
const pdfjsVersion = '2.2.100';
|
||||
const pdfjsBuild = 'f9c58115';
|
||||
const pdfjsVersion = '2.2.117';
|
||||
const pdfjsBuild = '57abddc9';
|
||||
|
||||
const pdfjsCoreWorker = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -378,7 +378,7 @@ var WorkerMessageHandler = {
|
|||
var WorkerTasks = [];
|
||||
const verbosity = (0, _util.getVerbosityLevel)();
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.2.100';
|
||||
let workerVersion = '2.2.117';
|
||||
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
|
|
|
@ -11391,7 +11391,7 @@ _app.PDFViewerApplication.externalServices = {
|
|||
|
||||
switch (args.pdfjsLoadAction) {
|
||||
case 'supportsRangedLoading':
|
||||
pdfDataRangeTransport = new FirefoxComDataRangeTransport(args.length, args.data);
|
||||
pdfDataRangeTransport = new FirefoxComDataRangeTransport(args.length, args.data, args.done);
|
||||
callbacks.onOpenWithTransport(args.pdfUrl, args.length, pdfDataRangeTransport);
|
||||
break;
|
||||
|
||||
|
@ -11407,6 +11407,13 @@ _app.PDFViewerApplication.externalServices = {
|
|||
pdfDataRangeTransport.onDataProgressiveRead(args.chunk);
|
||||
break;
|
||||
|
||||
case 'progressiveDone':
|
||||
if (pdfDataRangeTransport) {
|
||||
pdfDataRangeTransport.onDataProgressiveDone();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'progress':
|
||||
callbacks.onProgress(args.loaded, args.total);
|
||||
break;
|
||||
|
|
|
@ -20,7 +20,7 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: version 2.2.100
|
||||
release: version 2.2.117
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
|
@ -1129,22 +1129,9 @@ void Document::SelectorCache::NotifyExpired(SelectorCacheKey* aSelector) {
|
|||
delete aSelector;
|
||||
}
|
||||
|
||||
struct Document::FrameRequest {
|
||||
FrameRequest(FrameRequestCallback& aCallback, int32_t aHandle)
|
||||
: mCallback(&aCallback), mHandle(aHandle) {}
|
||||
|
||||
// Conversion operator so that we can append these to a
|
||||
// FrameRequestCallbackList
|
||||
operator const RefPtr<FrameRequestCallback>&() const { return mCallback; }
|
||||
|
||||
// Comparator operators to allow RemoveElementSorted with an
|
||||
// integer argument on arrays of FrameRequest
|
||||
bool operator==(int32_t aHandle) const { return mHandle == aHandle; }
|
||||
bool operator<(int32_t aHandle) const { return mHandle < aHandle; }
|
||||
|
||||
RefPtr<FrameRequestCallback> mCallback;
|
||||
int32_t mHandle;
|
||||
};
|
||||
Document::FrameRequest::FrameRequest(FrameRequestCallback& aCallback,
|
||||
int32_t aHandle)
|
||||
: mCallback(&aCallback), mHandle(aHandle) {}
|
||||
|
||||
// ==================================================================
|
||||
// =
|
||||
|
@ -3744,9 +3731,10 @@ void Document::UpdateFrameRequestCallbackSchedulingState(
|
|||
mFrameRequestCallbacksScheduled = shouldBeScheduled;
|
||||
}
|
||||
|
||||
void Document::TakeFrameRequestCallbacks(FrameRequestCallbackList& aCallbacks) {
|
||||
aCallbacks.AppendElements(mFrameRequestCallbacks);
|
||||
mFrameRequestCallbacks.Clear();
|
||||
void Document::TakeFrameRequestCallbacks(nsTArray<FrameRequest>& aCallbacks) {
|
||||
MOZ_ASSERT(aCallbacks.IsEmpty());
|
||||
aCallbacks.SwapElements(mFrameRequestCallbacks);
|
||||
mCanceledFrameRequestCallbacks.clear();
|
||||
// No need to manually remove ourselves from the refresh driver; it will
|
||||
// handle that part. But we do have to update our state.
|
||||
mFrameRequestCallbacksScheduled = false;
|
||||
|
@ -9162,9 +9150,16 @@ void Document::CancelFrameRequestCallback(int32_t aHandle) {
|
|||
// mFrameRequestCallbacks is stored sorted by handle
|
||||
if (mFrameRequestCallbacks.RemoveElementSorted(aHandle)) {
|
||||
UpdateFrameRequestCallbackSchedulingState();
|
||||
} else {
|
||||
Unused << mCanceledFrameRequestCallbacks.put(aHandle);
|
||||
}
|
||||
}
|
||||
|
||||
bool Document::IsCanceledFrameRequestCallback(int32_t aHandle) const {
|
||||
return !mCanceledFrameRequestCallbacks.empty() &&
|
||||
mCanceledFrameRequestCallbacks.has(aHandle);
|
||||
}
|
||||
|
||||
nsresult Document::GetStateObject(nsIVariant** aState) {
|
||||
// Get the document's current state object. This is the object backing both
|
||||
// history.state and popStateEvent.state.
|
||||
|
@ -12627,19 +12622,20 @@ already_AddRefed<mozilla::dom::Promise> Document::RequestStorageAccess(
|
|||
AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(
|
||||
NodePrincipal(), inner, AntiTrackingCommon::eStorageAccessAPI,
|
||||
performFinalChecks)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[outer, promise] {
|
||||
// Step 10. Grant the document access to cookies and store
|
||||
// that fact for
|
||||
// the purposes of future calls to
|
||||
// hasStorageAccess() and requestStorageAccess().
|
||||
outer->SetHasStorageAccess(true);
|
||||
promise->MaybeResolveWithUndefined();
|
||||
},
|
||||
[outer, promise] {
|
||||
outer->SetHasStorageAccess(false);
|
||||
promise->MaybeRejectWithUndefined();
|
||||
});
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[outer, promise] {
|
||||
// Step 10. Grant the document access to cookies and store
|
||||
// that fact for
|
||||
// the purposes of future calls to
|
||||
// hasStorageAccess() and requestStorageAccess().
|
||||
outer->SetHasStorageAccess(true);
|
||||
promise->MaybeResolveWithUndefined();
|
||||
},
|
||||
[outer, promise] {
|
||||
outer->SetHasStorageAccess(false);
|
||||
promise->MaybeRejectWithUndefined();
|
||||
});
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "mozilla/dom/ContentBlockingLog.h"
|
||||
#include "mozilla/dom/DispatcherTrait.h"
|
||||
#include "mozilla/dom/DocumentOrShadowRoot.h"
|
||||
#include "mozilla/HashTable.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "mozilla/NotNull.h"
|
||||
#include "mozilla/SegmentedVector.h"
|
||||
|
@ -2950,16 +2951,34 @@ class Document : public nsINode,
|
|||
|
||||
SVGSVGElement* GetSVGRootElement() const;
|
||||
|
||||
struct FrameRequest {
|
||||
FrameRequest(FrameRequestCallback& aCallback, int32_t aHandle);
|
||||
|
||||
// Comparator operators to allow RemoveElementSorted with an
|
||||
// integer argument on arrays of FrameRequest
|
||||
bool operator==(int32_t aHandle) const { return mHandle == aHandle; }
|
||||
bool operator<(int32_t aHandle) const { return mHandle < aHandle; }
|
||||
|
||||
RefPtr<FrameRequestCallback> mCallback;
|
||||
int32_t mHandle;
|
||||
};
|
||||
|
||||
nsresult ScheduleFrameRequestCallback(FrameRequestCallback& aCallback,
|
||||
int32_t* aHandle);
|
||||
void CancelFrameRequestCallback(int32_t aHandle);
|
||||
|
||||
typedef nsTArray<RefPtr<FrameRequestCallback>> FrameRequestCallbackList;
|
||||
/**
|
||||
* Returns true if the handle refers to a callback that was canceled that
|
||||
* we did not find in our list of callbacks (e.g. because it is one of those
|
||||
* in the set of callbacks currently queued to be run).
|
||||
*/
|
||||
bool IsCanceledFrameRequestCallback(int32_t aHandle) const;
|
||||
|
||||
/**
|
||||
* Put this document's frame request callbacks into the provided
|
||||
* list, and forget about them.
|
||||
*/
|
||||
void TakeFrameRequestCallbacks(FrameRequestCallbackList& aCallbacks);
|
||||
void TakeFrameRequestCallbacks(nsTArray<FrameRequest>& aCallbacks);
|
||||
|
||||
/**
|
||||
* @return true if this document's frame request callbacks should be
|
||||
|
@ -4417,10 +4436,12 @@ class Document : public nsINode,
|
|||
|
||||
nsCOMPtr<nsIDocumentEncoder> mCachedEncoder;
|
||||
|
||||
struct FrameRequest;
|
||||
|
||||
nsTArray<FrameRequest> mFrameRequestCallbacks;
|
||||
|
||||
// The set of frame request callbacks that were canceled but which we failed
|
||||
// to find in mFrameRequestCallbacks.
|
||||
HashSet<int32_t> mCanceledFrameRequestCallbacks;
|
||||
|
||||
// This object allows us to evict ourself from the back/forward cache. The
|
||||
// pointer is non-null iff we're currently in the bfcache.
|
||||
nsIBFCacheEntry* mBFCacheEntry;
|
||||
|
|
|
@ -400,11 +400,12 @@ void nsAttrValue::SetToSerialized(const nsAttrValue& aOther) {
|
|||
}
|
||||
}
|
||||
|
||||
void nsAttrValue::SetTo(const SVGOrient& aValue, const nsAString* aSerialized) {
|
||||
void nsAttrValue::SetTo(const SVGAnimatedOrient& aValue,
|
||||
const nsAString* aSerialized) {
|
||||
SetSVGType(eSVGOrient, &aValue, aSerialized);
|
||||
}
|
||||
|
||||
void nsAttrValue::SetTo(const SVGIntegerPair& aValue,
|
||||
void nsAttrValue::SetTo(const SVGAnimatedIntegerPair& aValue,
|
||||
const nsAString* aSerialized) {
|
||||
SetSVGType(eSVGIntegerPair, &aValue, aSerialized);
|
||||
}
|
||||
|
@ -434,7 +435,7 @@ void nsAttrValue::SetTo(const SVGNumberList& aValue,
|
|||
SetSVGType(eSVGNumberList, &aValue, aSerialized);
|
||||
}
|
||||
|
||||
void nsAttrValue::SetTo(const SVGNumberPair& aValue,
|
||||
void nsAttrValue::SetTo(const SVGAnimatedNumberPair& aValue,
|
||||
const nsAString* aSerialized) {
|
||||
SetSVGType(eSVGNumberPair, &aValue, aSerialized);
|
||||
}
|
||||
|
@ -484,7 +485,7 @@ void nsAttrValue::SetTo(const SVGTransformList& aValue,
|
|||
SetSVGType(eSVGTransformList, &aValue, aSerialized);
|
||||
}
|
||||
|
||||
void nsAttrValue::SetTo(const SVGViewBox& aValue,
|
||||
void nsAttrValue::SetTo(const SVGAnimatedViewBox& aValue,
|
||||
const nsAString* aSerialized) {
|
||||
SetSVGType(eSVGViewBox, &aValue, aSerialized);
|
||||
}
|
||||
|
@ -566,13 +567,13 @@ void nsAttrValue::ToString(nsAString& aResult) const {
|
|||
break;
|
||||
}
|
||||
case eSVGIntegerPair: {
|
||||
SVGAttrValueWrapper::ToString(GetMiscContainer()->mValue.mSVGIntegerPair,
|
||||
aResult);
|
||||
SVGAttrValueWrapper::ToString(
|
||||
GetMiscContainer()->mValue.mSVGAnimatedIntegerPair, aResult);
|
||||
break;
|
||||
}
|
||||
case eSVGOrient: {
|
||||
SVGAttrValueWrapper::ToString(GetMiscContainer()->mValue.mSVGOrient,
|
||||
aResult);
|
||||
SVGAttrValueWrapper::ToString(
|
||||
GetMiscContainer()->mValue.mSVGAnimatedOrient, aResult);
|
||||
break;
|
||||
}
|
||||
case eSVGLength: {
|
||||
|
@ -591,8 +592,8 @@ void nsAttrValue::ToString(nsAString& aResult) const {
|
|||
break;
|
||||
}
|
||||
case eSVGNumberPair: {
|
||||
SVGAttrValueWrapper::ToString(GetMiscContainer()->mValue.mSVGNumberPair,
|
||||
aResult);
|
||||
SVGAttrValueWrapper::ToString(
|
||||
GetMiscContainer()->mValue.mSVGAnimatedNumberPair, aResult);
|
||||
break;
|
||||
}
|
||||
case eSVGPathData: {
|
||||
|
@ -607,7 +608,7 @@ void nsAttrValue::ToString(nsAString& aResult) const {
|
|||
}
|
||||
case eSVGPreserveAspectRatio: {
|
||||
SVGAttrValueWrapper::ToString(
|
||||
GetMiscContainer()->mValue.mSVGPreserveAspectRatio, aResult);
|
||||
GetMiscContainer()->mValue.mSVGAnimatedPreserveAspectRatio, aResult);
|
||||
break;
|
||||
}
|
||||
case eSVGStringList: {
|
||||
|
@ -621,8 +622,8 @@ void nsAttrValue::ToString(nsAString& aResult) const {
|
|||
break;
|
||||
}
|
||||
case eSVGViewBox: {
|
||||
SVGAttrValueWrapper::ToString(GetMiscContainer()->mValue.mSVGViewBox,
|
||||
aResult);
|
||||
SVGAttrValueWrapper::ToString(
|
||||
GetMiscContainer()->mValue.mSVGAnimatedViewBox, aResult);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
|
@ -151,25 +151,27 @@ class nsAttrValue {
|
|||
const nsAString* aSerialized);
|
||||
void SetTo(nsIURI* aValue, const nsAString* aSerialized);
|
||||
void SetTo(const nsIntMargin& aValue);
|
||||
void SetTo(const mozilla::SVGOrient& aValue, const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGIntegerPair& aValue,
|
||||
void SetTo(const mozilla::SVGAnimatedIntegerPair& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const nsSVGLength2& aValue, const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGAnimatedNumberPair& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGAnimatedOrient& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGAnimatedPreserveAspectRatio& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGAnimatedViewBox& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGLengthList& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGNumberList& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGNumberPair& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGPathData& aValue, const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGPointList& aValue, const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGAnimatedPreserveAspectRatio& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGStringList& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGTransformList& aValue,
|
||||
const nsAString* aSerialized);
|
||||
void SetTo(const mozilla::SVGViewBox& aValue, const nsAString* aSerialized);
|
||||
|
||||
/**
|
||||
* Sets this object with the string or atom representation of aValue.
|
||||
|
|
|
@ -44,18 +44,19 @@ struct MiscContainer final {
|
|||
nsIURI* mURL;
|
||||
mozilla::AtomArray* mAtomArray;
|
||||
nsIntMargin* mIntMargin;
|
||||
const mozilla::SVGIntegerPair* mSVGIntegerPair;
|
||||
const mozilla::SVGAnimatedIntegerPair* mSVGAnimatedIntegerPair;
|
||||
const mozilla::SVGAnimatedPreserveAspectRatio*
|
||||
mSVGAnimatedPreserveAspectRatio;
|
||||
const mozilla::SVGAnimatedNumberPair* mSVGAnimatedNumberPair;
|
||||
const mozilla::SVGAnimatedOrient* mSVGAnimatedOrient;
|
||||
const nsSVGLength2* mSVGLength;
|
||||
const mozilla::SVGAnimatedViewBox* mSVGAnimatedViewBox;
|
||||
const mozilla::SVGLengthList* mSVGLengthList;
|
||||
const mozilla::SVGNumberList* mSVGNumberList;
|
||||
const mozilla::SVGNumberPair* mSVGNumberPair;
|
||||
const mozilla::SVGOrient* mSVGOrient;
|
||||
const mozilla::SVGPathData* mSVGPathData;
|
||||
const mozilla::SVGPointList* mSVGPointList;
|
||||
const mozilla::SVGAnimatedPreserveAspectRatio* mSVGPreserveAspectRatio;
|
||||
const mozilla::SVGStringList* mSVGStringList;
|
||||
const mozilla::SVGTransformList* mSVGTransformList;
|
||||
const mozilla::SVGViewBox* mSVGViewBox;
|
||||
};
|
||||
uint32_t mRefCount : 31;
|
||||
uint32_t mCached : 1;
|
||||
|
|
|
@ -21684,32 +21684,38 @@ void TransactionDatabaseOperationBase::SendPreprocessInfoOrResults(
|
|||
MOZ_ASSERT(mTransaction);
|
||||
|
||||
if (NS_WARN_IF(IsActorDestroyed())) {
|
||||
// Don't send any notifications if the actor was destroyed already.
|
||||
// Normally we wouldn't need to send any notifications if the actor was
|
||||
// already destroyed, but this can be a VersionChangeOp which needs to
|
||||
// notify its parent operation (OpenDatabaseOp) about the failure.
|
||||
// So SendFailureResult needs to be called even when the actor was
|
||||
// destroyed. Normal operations redundantly check if the actor was
|
||||
// destroyed in SendSuccessResult and SendFailureResult, therefore it's
|
||||
// ok to call it in all cases here.
|
||||
if (NS_SUCCEEDED(mResultCode)) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
mResultCode = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
||||
}
|
||||
} else {
|
||||
if (mTransaction->IsInvalidated() || mTransaction->IsAborted()) {
|
||||
// Aborted transactions always see their requests fail with ABORT_ERR,
|
||||
// even if the request succeeded or failed with another error.
|
||||
mResultCode = NS_ERROR_DOM_INDEXEDDB_ABORT_ERR;
|
||||
} else if (NS_SUCCEEDED(mResultCode)) {
|
||||
if (aSendPreprocessInfo) {
|
||||
// This should not release the IPDL reference.
|
||||
mResultCode = SendPreprocessInfo();
|
||||
} else {
|
||||
// This may release the IPDL reference.
|
||||
mResultCode = SendSuccessResult();
|
||||
}
|
||||
}
|
||||
} else if (mTransaction->IsInvalidated() || mTransaction->IsAborted()) {
|
||||
// Aborted transactions always see their requests fail with ABORT_ERR,
|
||||
// even if the request succeeded or failed with another error.
|
||||
mResultCode = NS_ERROR_DOM_INDEXEDDB_ABORT_ERR;
|
||||
}
|
||||
|
||||
if (NS_FAILED(mResultCode)) {
|
||||
// This should definitely release the IPDL reference.
|
||||
if (!SendFailureResult(mResultCode)) {
|
||||
// Abort the transaction.
|
||||
mTransaction->Abort(mResultCode, /* aForce */ false);
|
||||
}
|
||||
if (NS_SUCCEEDED(mResultCode)) {
|
||||
if (aSendPreprocessInfo) {
|
||||
// This should not release the IPDL reference.
|
||||
mResultCode = SendPreprocessInfo();
|
||||
} else {
|
||||
// This may release the IPDL reference.
|
||||
mResultCode = SendSuccessResult();
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(mResultCode)) {
|
||||
// This should definitely release the IPDL reference.
|
||||
if (!SendFailureResult(mResultCode)) {
|
||||
// Abort the transaction.
|
||||
mTransaction->Abort(mResultCode, /* aForce */ false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2958,6 +2958,29 @@ void ClientValidationPrefChangedCallback(const char* aPrefName,
|
|||
gClientValidation = Preferences::GetBool(aPrefName, kDefaultClientValidation);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
void RequestAllowToCloseIf(P aPredicate) {
|
||||
AssertIsOnBackgroundThread();
|
||||
|
||||
if (!gLiveDatabases) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<Database>> databases;
|
||||
|
||||
for (Database* database : *gLiveDatabases) {
|
||||
if (aPredicate(database)) {
|
||||
databases.AppendElement(database);
|
||||
}
|
||||
}
|
||||
|
||||
for (Database* database : databases) {
|
||||
database->RequestAllowToClose();
|
||||
}
|
||||
|
||||
databases.Clear();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -5127,8 +5150,9 @@ void Database::RequestAllowToClose() {
|
|||
// child actor. Except the case when the actor was already destroyed.
|
||||
if (mActorDestroyed) {
|
||||
MOZ_ASSERT(mAllowedToClose);
|
||||
} else {
|
||||
Unused << SendRequestAllowToClose();
|
||||
} else if (NS_WARN_IF(!SendRequestAllowToClose())) {
|
||||
// Allow to close immediately if sending failed.
|
||||
AllowToClose();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7997,29 +8021,21 @@ void QuotaClient::AbortOperations(const nsACString& aOrigin) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gLiveDatabases) {
|
||||
for (Database* database : *gLiveDatabases) {
|
||||
if (aOrigin.IsVoid() || database->Origin() == aOrigin) {
|
||||
// TODO: This just allows the database to close, but we can actually
|
||||
// set a flag to abort any existing operations, so we can
|
||||
// eventually close faster.
|
||||
|
||||
database->RequestAllowToClose();
|
||||
}
|
||||
}
|
||||
if (aOrigin.IsVoid()) {
|
||||
RequestAllowToCloseIf([](const Database* const) { return true; });
|
||||
} else {
|
||||
RequestAllowToCloseIf([&aOrigin](const Database* const aDatabase) {
|
||||
return aDatabase->Origin() == aOrigin;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void QuotaClient::AbortOperationsForProcess(ContentParentId aContentParentId) {
|
||||
AssertIsOnBackgroundThread();
|
||||
|
||||
if (gLiveDatabases) {
|
||||
for (Database* database : *gLiveDatabases) {
|
||||
if (database->IsOwnedByProcess(aContentParentId)) {
|
||||
database->RequestAllowToClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
RequestAllowToCloseIf([aContentParentId](const Database* const aDatabase) {
|
||||
return aDatabase->IsOwnedByProcess(aContentParentId);
|
||||
});
|
||||
}
|
||||
|
||||
void QuotaClient::StartIdleMaintenance() { AssertIsOnBackgroundThread(); }
|
||||
|
@ -8045,11 +8061,7 @@ void QuotaClient::ShutdownWorkThreads() {
|
|||
gPreparedDatastores = nullptr;
|
||||
}
|
||||
|
||||
if (gLiveDatabases) {
|
||||
for (Database* database : *gLiveDatabases) {
|
||||
database->RequestAllowToClose();
|
||||
}
|
||||
}
|
||||
RequestAllowToCloseIf([](const Database* const) { return true; });
|
||||
|
||||
if (gPreparedObsevers) {
|
||||
gPreparedObsevers->Clear();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "DOMSVGAngle.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "mozilla/dom/SVGAngleBinding.h"
|
||||
#include "mozilla/dom/SVGSVGElement.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAngle, Release)
|
|||
|
||||
DOMSVGAngle::DOMSVGAngle(SVGSVGElement* aSVGElement)
|
||||
: mSVGElement(aSVGElement), mType(DOMSVGAngle::CreatedValue) {
|
||||
mVal = new SVGOrient();
|
||||
mVal = new SVGAnimatedOrient();
|
||||
mVal->Init();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
class SVGOrient;
|
||||
class SVGAnimatedOrient;
|
||||
|
||||
namespace dom {
|
||||
class SVGSVGElement;
|
||||
|
@ -28,7 +28,7 @@ class DOMSVGAngle final : public nsWrapperCache {
|
|||
/**
|
||||
* Generic ctor for DOMSVGAngle objects that are created for an attribute.
|
||||
*/
|
||||
DOMSVGAngle(SVGOrient* aVal, SVGElement* aSVGElement, AngleType aType)
|
||||
DOMSVGAngle(SVGAnimatedOrient* aVal, SVGElement* aSVGElement, AngleType aType)
|
||||
: mVal(aVal), mSVGElement(aSVGElement), mType(aType) {}
|
||||
|
||||
/**
|
||||
|
@ -54,8 +54,8 @@ class DOMSVGAngle final : public nsWrapperCache {
|
|||
protected:
|
||||
~DOMSVGAngle();
|
||||
|
||||
SVGOrient* mVal; // if mType is CreatedValue, we own the angle. Otherwise,
|
||||
// the element does.
|
||||
SVGAnimatedOrient* mVal; // if mType is CreatedValue, we own the angle.
|
||||
// Otherwise, the element does.
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
AngleType mType;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "DOMSVGAnimatedAngle.h"
|
||||
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "mozilla/dom/SVGAnimatedAngleBinding.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
class SVGOrient;
|
||||
class SVGAnimatedOrient;
|
||||
|
||||
namespace dom {
|
||||
|
||||
|
@ -24,7 +24,7 @@ class DOMSVGAnimatedAngle final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedAngle)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedAngle)
|
||||
|
||||
DOMSVGAnimatedAngle(SVGOrient* aVal, SVGElement* aSVGElement)
|
||||
DOMSVGAnimatedAngle(SVGAnimatedOrient* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
|
@ -37,7 +37,7 @@ class DOMSVGAnimatedAngle final : public nsWrapperCache {
|
|||
protected:
|
||||
~DOMSVGAnimatedAngle();
|
||||
|
||||
SVGOrient* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedOrient* mVal; // kept alive because it belongs to content
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_DOMSVGAnimatedBoolean_h
|
||||
#define mozilla_dom_DOMSVGAnimatedBoolean_h
|
||||
|
||||
#include "SVGBoolean.h"
|
||||
#include "SVGAnimatedBoolean.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
@ -19,7 +19,7 @@ class DOMSVGAnimatedBoolean final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedBoolean)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedBoolean)
|
||||
|
||||
DOMSVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement)
|
||||
DOMSVGAnimatedBoolean(SVGAnimatedBoolean* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// WebIDL
|
||||
|
@ -36,7 +36,7 @@ class DOMSVGAnimatedBoolean final : public nsWrapperCache {
|
|||
protected:
|
||||
~DOMSVGAnimatedBoolean();
|
||||
|
||||
SVGBoolean* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedBoolean* mVal; // kept alive because it belongs to content
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "Link.h"
|
||||
#include "nsDOMTokenList.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "mozilla/dom/SVGGraphicsElement.h"
|
||||
|
||||
nsresult NS_NewSVGAElement(
|
||||
|
@ -98,7 +98,7 @@ class SVGAElement final : public SVGAElementBase, public Link {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { HREF, XLINK_HREF, TARGET };
|
||||
SVGString mStringAttributes[3];
|
||||
SVGAnimatedString mStringAttributes[3];
|
||||
static StringInfo sStringInfo[3];
|
||||
|
||||
RefPtr<nsDOMTokenList> mRelList;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGBoolean.h"
|
||||
#include "SVGAnimatedBoolean.h"
|
||||
|
||||
#include "DOMSVGAnimatedBoolean.h"
|
||||
#include "nsError.h"
|
||||
|
@ -18,9 +18,9 @@ namespace mozilla {
|
|||
|
||||
/* Implementation */
|
||||
|
||||
static inline SVGAttrTearoffTable<SVGBoolean, DOMSVGAnimatedBoolean>&
|
||||
static inline SVGAttrTearoffTable<SVGAnimatedBoolean, DOMSVGAnimatedBoolean>&
|
||||
SVGAnimatedBooleanTearoffTable() {
|
||||
static SVGAttrTearoffTable<SVGBoolean, DOMSVGAnimatedBoolean>
|
||||
static SVGAttrTearoffTable<SVGAnimatedBoolean, DOMSVGAnimatedBoolean>
|
||||
sSVGAnimatedBooleanTearoffTable;
|
||||
return sSVGAnimatedBooleanTearoffTable;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ static nsresult GetValueFromAtom(const nsAtom* aValueAsAtom, bool* aValue) {
|
|||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
}
|
||||
|
||||
nsresult SVGBoolean::SetBaseValueAtom(const nsAtom* aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedBoolean::SetBaseValueAtom(const nsAtom* aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
bool val = false;
|
||||
|
||||
nsresult rv = GetValueFromAtom(aValue, &val);
|
||||
|
@ -71,11 +71,11 @@ nsresult SVGBoolean::SetBaseValueAtom(const nsAtom* aValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAtom* SVGBoolean::GetBaseValueAtom() const {
|
||||
nsAtom* SVGAnimatedBoolean::GetBaseValueAtom() const {
|
||||
return mBaseVal ? nsGkAtoms::_true : nsGkAtoms::_false;
|
||||
}
|
||||
|
||||
void SVGBoolean::SetBaseValue(bool aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedBoolean::SetBaseValue(bool aValue, SVGElement* aSVGElement) {
|
||||
if (aValue == mBaseVal) {
|
||||
return;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void SVGBoolean::SetBaseValue(bool aValue, SVGElement* aSVGElement) {
|
|||
aSVGElement->DidChangeBoolean(mAttrEnum);
|
||||
}
|
||||
|
||||
void SVGBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && mAnimVal == aValue) {
|
||||
return;
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ void SVGBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
|
|||
aSVGElement->DidAnimateBoolean(mAttrEnum);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedBoolean> SVGBoolean::ToDOMAnimatedBoolean(
|
||||
SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedBoolean>
|
||||
SVGAnimatedBoolean::ToDOMAnimatedBoolean(SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAnimatedBoolean> domAnimatedBoolean =
|
||||
SVGAnimatedBooleanTearoffTable().GetTearoff(this);
|
||||
if (!domAnimatedBoolean) {
|
||||
|
@ -114,11 +114,11 @@ DOMSVGAnimatedBoolean::~DOMSVGAnimatedBoolean() {
|
|||
SVGAnimatedBooleanTearoffTable().RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGBoolean::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedBoolean::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILBool>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGBoolean::SMILBool::ValueFromString(
|
||||
nsresult SVGAnimatedBoolean::SMILBool::ValueFromString(
|
||||
const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
bool value;
|
||||
|
@ -134,13 +134,13 @@ nsresult SVGBoolean::SMILBool::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGBoolean::SMILBool::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedBoolean::SMILBool::GetBaseValue() const {
|
||||
SMILValue val(SMILBoolType::Singleton());
|
||||
val.mU.mBool = mVal->mBaseVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGBoolean::SMILBool::ClearAnimValue() {
|
||||
void SVGAnimatedBoolean::SMILBool::ClearAnimValue() {
|
||||
if (mVal->mIsAnimated) {
|
||||
mVal->mIsAnimated = false;
|
||||
mVal->mAnimVal = mVal->mBaseVal;
|
||||
|
@ -148,7 +148,7 @@ void SVGBoolean::SMILBool::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGBoolean::SMILBool::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedBoolean::SMILBool::SetAnimValue(const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == SMILBoolType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == SMILBoolType::Singleton()) {
|
|
@ -25,7 +25,7 @@ class SVGAnimationElement;
|
|||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
class SVGBoolean {
|
||||
class SVGAnimatedBoolean {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -57,13 +57,13 @@ class SVGBoolean {
|
|||
public:
|
||||
struct SMILBool : public SMILAttr {
|
||||
public:
|
||||
SMILBool(SVGBoolean* aVal, SVGElement* aSVGElement)
|
||||
SMILBool(SVGAnimatedBoolean* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGBoolean* mVal;
|
||||
SVGAnimatedBoolean* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGClass.h"
|
||||
#include "SVGAnimatedClass.h"
|
||||
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
@ -16,15 +16,15 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
// DOM wrapper class for the (DOM)SVGAnimatedString interface where the
|
||||
// wrapped class is SVGClass.
|
||||
// wrapped class is SVGAnimatedClass.
|
||||
struct DOMAnimatedString final : public DOMSVGAnimatedString {
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString)
|
||||
|
||||
DOMAnimatedString(SVGClass* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimatedString(SVGAnimatedClass* aVal, SVGElement* aSVGElement)
|
||||
: DOMSVGAnimatedString(aSVGElement), mVal(aVal) {}
|
||||
|
||||
SVGClass* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedClass* mVal; // kept alive because it belongs to content
|
||||
|
||||
void GetBaseVal(nsAString& aResult) override {
|
||||
mVal->GetBaseValue(aResult, mSVGElement);
|
||||
|
@ -50,7 +50,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMAnimatedString)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedString> SVGClass::ToDOMAnimatedString(
|
||||
already_AddRefed<DOMSVGAnimatedString> SVGAnimatedClass::ToDOMAnimatedString(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMAnimatedString> result = new DOMAnimatedString(this, aSVGElement);
|
||||
return result.forget();
|
||||
|
@ -58,8 +58,8 @@ already_AddRefed<DOMSVGAnimatedString> SVGClass::ToDOMAnimatedString(
|
|||
|
||||
/* Implementation */
|
||||
|
||||
void SVGClass::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
void SVGAnimatedClass::SetBaseValue(const nsAString& aValue,
|
||||
SVGElement* aSVGElement, bool aDoSetAttr) {
|
||||
NS_ASSERTION(aSVGElement, "Null element passed to SetBaseValue");
|
||||
|
||||
aSVGElement->SetMayHaveClass();
|
||||
|
@ -71,13 +71,13 @@ void SVGClass::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
|
|||
}
|
||||
}
|
||||
|
||||
void SVGClass::GetBaseValue(nsAString& aValue,
|
||||
const SVGElement* aSVGElement) const {
|
||||
void SVGAnimatedClass::GetBaseValue(nsAString& aValue,
|
||||
const SVGElement* aSVGElement) const {
|
||||
aSVGElement->GetAttr(kNameSpaceID_None, nsGkAtoms::_class, aValue);
|
||||
}
|
||||
|
||||
void SVGClass::GetAnimValue(nsAString& aResult,
|
||||
const SVGElement* aSVGElement) const {
|
||||
void SVGAnimatedClass::GetAnimValue(nsAString& aResult,
|
||||
const SVGElement* aSVGElement) const {
|
||||
if (mAnimVal) {
|
||||
aResult = *mAnimVal;
|
||||
return;
|
||||
|
@ -86,7 +86,8 @@ void SVGClass::GetAnimValue(nsAString& aResult,
|
|||
aSVGElement->GetAttr(kNameSpaceID_None, nsGkAtoms::_class, aResult);
|
||||
}
|
||||
|
||||
void SVGClass::SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedClass::SetAnimValue(const nsAString& aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mAnimVal && mAnimVal->Equals(aValue)) {
|
||||
return;
|
||||
}
|
||||
|
@ -103,11 +104,11 @@ void DOMAnimatedString::GetAnimVal(nsAString& aResult) {
|
|||
mVal->GetAnimValue(aResult, mSVGElement);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGClass::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedClass::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILString>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGClass::SMILString::ValueFromString(
|
||||
nsresult SVGAnimatedClass::SMILString::ValueFromString(
|
||||
const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
SMILValue val(SMILStringType::Singleton());
|
||||
|
@ -118,21 +119,21 @@ nsresult SVGClass::SMILString::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGClass::SMILString::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedClass::SMILString::GetBaseValue() const {
|
||||
SMILValue val(SMILStringType::Singleton());
|
||||
mSVGElement->GetAttr(kNameSpaceID_None, nsGkAtoms::_class,
|
||||
*static_cast<nsAString*>(val.mU.mPtr));
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGClass::SMILString::ClearAnimValue() {
|
||||
void SVGAnimatedClass::SMILString::ClearAnimValue() {
|
||||
if (mVal->mAnimVal) {
|
||||
mVal->mAnimVal = nullptr;
|
||||
mSVGElement->DidAnimateClass();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult SVGClass::SMILString::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedClass::SMILString::SetAnimValue(const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == SMILStringType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == SMILStringType::Singleton()) {
|
|
@ -23,7 +23,7 @@ namespace dom {
|
|||
class DOMSVGAnimatedString;
|
||||
class SVGElement;
|
||||
|
||||
class SVGClass {
|
||||
class SVGAnimatedClass {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -48,13 +48,13 @@ class SVGClass {
|
|||
public:
|
||||
struct SMILString : public SMILAttr {
|
||||
public:
|
||||
SMILString(SVGClass* aVal, SVGElement* aSVGElement)
|
||||
SMILString(SVGAnimatedClass* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGClass* mVal;
|
||||
SVGAnimatedClass* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "mozilla/SMILValue.h"
|
||||
|
@ -17,10 +17,12 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
static SVGAttrTearoffTable<SVGEnum, SVGEnum::DOMAnimatedEnum>
|
||||
static SVGAttrTearoffTable<SVGAnimatedEnumeration,
|
||||
SVGAnimatedEnumeration::DOMAnimatedEnum>
|
||||
sSVGAnimatedEnumTearoffTable;
|
||||
|
||||
const SVGEnumMapping* SVGEnum::GetMapping(SVGElement* aSVGElement) {
|
||||
const SVGEnumMapping* SVGAnimatedEnumeration::GetMapping(
|
||||
SVGElement* aSVGElement) {
|
||||
SVGElement::EnumAttributesInfo info = aSVGElement->GetEnumInfo();
|
||||
|
||||
NS_ASSERTION(info.mEnumCount > 0 && mAttrEnum < info.mEnumCount,
|
||||
|
@ -29,8 +31,8 @@ const SVGEnumMapping* SVGEnum::GetMapping(SVGElement* aSVGElement) {
|
|||
return info.mEnumInfo[mAttrEnum].mMapping;
|
||||
}
|
||||
|
||||
nsresult SVGEnum::SetBaseValueAtom(const nsAtom* aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedEnumeration::SetBaseValueAtom(const nsAtom* aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
const SVGEnumMapping* mapping = GetMapping(aSVGElement);
|
||||
|
||||
while (mapping && mapping->mKey) {
|
||||
|
@ -55,7 +57,7 @@ nsresult SVGEnum::SetBaseValueAtom(const nsAtom* aValue,
|
|||
return NS_ERROR_DOM_TYPE_ERR;
|
||||
}
|
||||
|
||||
nsAtom* SVGEnum::GetBaseValueAtom(SVGElement* aSVGElement) {
|
||||
nsAtom* SVGAnimatedEnumeration::GetBaseValueAtom(SVGElement* aSVGElement) {
|
||||
const SVGEnumMapping* mapping = GetMapping(aSVGElement);
|
||||
|
||||
while (mapping && mapping->mKey) {
|
||||
|
@ -68,7 +70,8 @@ nsAtom* SVGEnum::GetBaseValueAtom(SVGElement* aSVGElement) {
|
|||
return nsGkAtoms::_empty;
|
||||
}
|
||||
|
||||
nsresult SVGEnum::SetBaseValue(uint16_t aValue, SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedEnumeration::SetBaseValue(uint16_t aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
const SVGEnumMapping* mapping = GetMapping(aSVGElement);
|
||||
|
||||
while (mapping && mapping->mKey) {
|
||||
|
@ -90,7 +93,8 @@ nsresult SVGEnum::SetBaseValue(uint16_t aValue, SVGElement* aSVGElement) {
|
|||
return NS_ERROR_DOM_TYPE_ERR;
|
||||
}
|
||||
|
||||
void SVGEnum::SetAnimValue(uint16_t aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedEnumeration::SetAnimValue(uint16_t aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && aValue == mAnimVal) {
|
||||
return;
|
||||
}
|
||||
|
@ -99,8 +103,8 @@ void SVGEnum::SetAnimValue(uint16_t aValue, SVGElement* aSVGElement) {
|
|||
aSVGElement->DidAnimateEnum(mAttrEnum);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedEnumeration> SVGEnum::ToDOMAnimatedEnum(
|
||||
SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedEnumeration>
|
||||
SVGAnimatedEnumeration::ToDOMAnimatedEnum(SVGElement* aSVGElement) {
|
||||
RefPtr<DOMAnimatedEnum> domAnimatedEnum =
|
||||
sSVGAnimatedEnumTearoffTable.GetTearoff(this);
|
||||
if (!domAnimatedEnum) {
|
||||
|
@ -111,15 +115,16 @@ already_AddRefed<DOMSVGAnimatedEnumeration> SVGEnum::ToDOMAnimatedEnum(
|
|||
return domAnimatedEnum.forget();
|
||||
}
|
||||
|
||||
SVGEnum::DOMAnimatedEnum::~DOMAnimatedEnum() {
|
||||
SVGAnimatedEnumeration::DOMAnimatedEnum::~DOMAnimatedEnum() {
|
||||
sSVGAnimatedEnumTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGEnum::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedEnumeration::ToSMILAttr(
|
||||
SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILEnum>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGEnum::SMILEnum::ValueFromString(
|
||||
nsresult SVGAnimatedEnumeration::SMILEnum::ValueFromString(
|
||||
const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
nsAtom* valAtom = NS_GetStaticAtom(aStr);
|
||||
|
@ -143,13 +148,13 @@ nsresult SVGEnum::SMILEnum::ValueFromString(
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
SMILValue SVGEnum::SMILEnum::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedEnumeration::SMILEnum::GetBaseValue() const {
|
||||
SMILValue val(SMILEnumType::Singleton());
|
||||
val.mU.mUint = mVal->mBaseVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGEnum::SMILEnum::ClearAnimValue() {
|
||||
void SVGAnimatedEnumeration::SMILEnum::ClearAnimValue() {
|
||||
if (mVal->mIsAnimated) {
|
||||
mVal->mIsAnimated = false;
|
||||
mVal->mAnimVal = mVal->mBaseVal;
|
||||
|
@ -157,7 +162,8 @@ void SVGEnum::SMILEnum::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGEnum::SMILEnum::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedEnumeration::SMILEnum::SetAnimValue(
|
||||
const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == SMILEnumType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == SMILEnumType::Singleton()) {
|
|
@ -32,7 +32,7 @@ struct SVGEnumMapping {
|
|||
const SVGEnumValue mVal;
|
||||
};
|
||||
|
||||
class SVGEnum {
|
||||
class SVGAnimatedEnumeration {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -68,14 +68,14 @@ class SVGEnum {
|
|||
|
||||
public:
|
||||
// DOM wrapper class for the (DOM)SVGAnimatedEnumeration interface where the
|
||||
// wrapped class is SVGEnum.
|
||||
// wrapped class is SVGAnimatedEnumeration.
|
||||
struct DOMAnimatedEnum final
|
||||
: public mozilla::dom::DOMSVGAnimatedEnumeration {
|
||||
DOMAnimatedEnum(SVGEnum* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimatedEnum(SVGAnimatedEnumeration* aVal, SVGElement* aSVGElement)
|
||||
: mozilla::dom::DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
|
||||
virtual ~DOMAnimatedEnum();
|
||||
|
||||
SVGEnum* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedEnumeration* mVal; // kept alive because it belongs to content
|
||||
|
||||
using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
|
||||
virtual uint16_t BaseVal() override { return mVal->GetBaseValue(); }
|
||||
|
@ -94,13 +94,13 @@ class SVGEnum {
|
|||
|
||||
struct SMILEnum : public SMILAttr {
|
||||
public:
|
||||
SMILEnum(SVGEnum* aVal, SVGElement* aSVGElement)
|
||||
SMILEnum(SVGAnimatedEnumeration* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGEnum* mVal;
|
||||
SVGAnimatedEnumeration* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGInteger.h"
|
||||
#include "SVGAnimatedInteger.h"
|
||||
|
||||
#include "nsError.h"
|
||||
#include "SMILIntegerType.h"
|
||||
|
@ -18,11 +18,12 @@ namespace mozilla {
|
|||
|
||||
/* Implementation */
|
||||
|
||||
static SVGAttrTearoffTable<SVGInteger, SVGInteger::DOMAnimatedInteger>
|
||||
static SVGAttrTearoffTable<SVGAnimatedInteger,
|
||||
SVGAnimatedInteger::DOMAnimatedInteger>
|
||||
sSVGAnimatedIntegerTearoffTable;
|
||||
|
||||
nsresult SVGInteger::SetBaseValueString(const nsAString &aValueAsString,
|
||||
SVGElement *aSVGElement) {
|
||||
nsresult SVGAnimatedInteger::SetBaseValueString(const nsAString &aValueAsString,
|
||||
SVGElement *aSVGElement) {
|
||||
bool success;
|
||||
auto token = SVGContentUtils::GetAndEnsureOneToken(aValueAsString, success);
|
||||
|
||||
|
@ -46,12 +47,12 @@ nsresult SVGInteger::SetBaseValueString(const nsAString &aValueAsString,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGInteger::GetBaseValueString(nsAString &aValueAsString) {
|
||||
void SVGAnimatedInteger::GetBaseValueString(nsAString &aValueAsString) {
|
||||
aValueAsString.Truncate();
|
||||
aValueAsString.AppendInt(mBaseVal);
|
||||
}
|
||||
|
||||
void SVGInteger::SetBaseValue(int aValue, SVGElement *aSVGElement) {
|
||||
void SVGAnimatedInteger::SetBaseValue(int aValue, SVGElement *aSVGElement) {
|
||||
// We can't just rely on SetParsedAttrValue (as called by DidChangeInteger)
|
||||
// detecting redundant changes since it will compare false if the existing
|
||||
// attribute value has an associated serialized version (a string value) even
|
||||
|
@ -70,7 +71,7 @@ void SVGInteger::SetBaseValue(int aValue, SVGElement *aSVGElement) {
|
|||
aSVGElement->DidChangeInteger(mAttrEnum);
|
||||
}
|
||||
|
||||
void SVGInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
|
||||
void SVGAnimatedInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
|
||||
if (mIsAnimated && aValue == mAnimVal) {
|
||||
return;
|
||||
}
|
||||
|
@ -79,8 +80,8 @@ void SVGInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
|
|||
aSVGElement->DidAnimateInteger(mAttrEnum);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedInteger> SVGInteger::ToDOMAnimatedInteger(
|
||||
SVGElement *aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedInteger>
|
||||
SVGAnimatedInteger::ToDOMAnimatedInteger(SVGElement *aSVGElement) {
|
||||
RefPtr<DOMAnimatedInteger> domAnimatedInteger =
|
||||
sSVGAnimatedIntegerTearoffTable.GetTearoff(this);
|
||||
if (!domAnimatedInteger) {
|
||||
|
@ -91,15 +92,15 @@ already_AddRefed<DOMSVGAnimatedInteger> SVGInteger::ToDOMAnimatedInteger(
|
|||
return domAnimatedInteger.forget();
|
||||
}
|
||||
|
||||
SVGInteger::DOMAnimatedInteger::~DOMAnimatedInteger() {
|
||||
SVGAnimatedInteger::DOMAnimatedInteger::~DOMAnimatedInteger() {
|
||||
sSVGAnimatedIntegerTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGInteger::ToSMILAttr(SVGElement *aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedInteger::ToSMILAttr(SVGElement *aSVGElement) {
|
||||
return MakeUnique<SMILInteger>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGInteger::SMILInteger::ValueFromString(
|
||||
nsresult SVGAnimatedInteger::SMILInteger::ValueFromString(
|
||||
const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
|
||||
SMILValue &aValue, bool &aPreventCachingOfSandwich) const {
|
||||
int32_t val;
|
||||
|
@ -115,13 +116,13 @@ nsresult SVGInteger::SMILInteger::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGInteger::SMILInteger::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedInteger::SMILInteger::GetBaseValue() const {
|
||||
SMILValue val(SMILIntegerType::Singleton());
|
||||
val.mU.mInt = mVal->mBaseVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGInteger::SMILInteger::ClearAnimValue() {
|
||||
void SVGAnimatedInteger::SMILInteger::ClearAnimValue() {
|
||||
if (mVal->mIsAnimated) {
|
||||
mVal->mIsAnimated = false;
|
||||
mVal->mAnimVal = mVal->mBaseVal;
|
||||
|
@ -129,7 +130,8 @@ void SVGInteger::SMILInteger::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGInteger::SMILInteger::SetAnimValue(const SMILValue &aValue) {
|
||||
nsresult SVGAnimatedInteger::SMILInteger::SetAnimValue(
|
||||
const SMILValue &aValue) {
|
||||
NS_ASSERTION(aValue.mType == SMILIntegerType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == SMILIntegerType::Singleton()) {
|
|
@ -23,7 +23,7 @@ namespace dom {
|
|||
class SVGAnimationElement;
|
||||
} // namespace dom
|
||||
|
||||
class SVGInteger {
|
||||
class SVGAnimatedInteger {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -63,11 +63,11 @@ class SVGInteger {
|
|||
|
||||
public:
|
||||
struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
|
||||
DOMAnimatedInteger(SVGInteger* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimatedInteger(SVGAnimatedInteger* aVal, SVGElement* aSVGElement)
|
||||
: mozilla::dom::DOMSVGAnimatedInteger(aSVGElement), mVal(aVal) {}
|
||||
virtual ~DOMAnimatedInteger();
|
||||
|
||||
SVGInteger* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedInteger* mVal; // kept alive because it belongs to content
|
||||
|
||||
virtual int32_t BaseVal() override { return mVal->GetBaseValue(); }
|
||||
virtual void SetBaseVal(int32_t aValue) override {
|
||||
|
@ -84,13 +84,13 @@ class SVGInteger {
|
|||
|
||||
struct SMILInteger : public SMILAttr {
|
||||
public:
|
||||
SMILInteger(SVGInteger* aVal, SVGElement* aSVGElement)
|
||||
SMILInteger(SVGAnimatedInteger* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGInteger* mVal;
|
||||
SVGAnimatedInteger* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGIntegerPair.h"
|
||||
#include "SVGAnimatedIntegerPair.h"
|
||||
|
||||
#include "nsCharSeparatedTokenizer.h"
|
||||
#include "nsError.h"
|
||||
|
@ -18,9 +18,11 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
static SVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
|
||||
static SVGAttrTearoffTable<SVGAnimatedIntegerPair,
|
||||
SVGAnimatedIntegerPair::DOMAnimatedInteger>
|
||||
sSVGFirstAnimatedIntegerTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
|
||||
static SVGAttrTearoffTable<SVGAnimatedIntegerPair,
|
||||
SVGAnimatedIntegerPair::DOMAnimatedInteger>
|
||||
sSVGSecondAnimatedIntegerTearoffTable;
|
||||
|
||||
/* Implementation */
|
||||
|
@ -48,8 +50,8 @@ static nsresult ParseIntegerOptionalInteger(const nsAString& aValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult SVGIntegerPair::SetBaseValueString(const nsAString& aValueAsString,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedIntegerPair::SetBaseValueString(
|
||||
const nsAString& aValueAsString, SVGElement* aSVGElement) {
|
||||
int32_t val[2];
|
||||
|
||||
nsresult rv = ParseIntegerOptionalInteger(aValueAsString, val);
|
||||
|
@ -74,7 +76,8 @@ nsresult SVGIntegerPair::SetBaseValueString(const nsAString& aValueAsString,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGIntegerPair::GetBaseValueString(nsAString& aValueAsString) const {
|
||||
void SVGAnimatedIntegerPair::GetBaseValueString(
|
||||
nsAString& aValueAsString) const {
|
||||
aValueAsString.Truncate();
|
||||
aValueAsString.AppendInt(mBaseVal[0]);
|
||||
if (mBaseVal[0] != mBaseVal[1]) {
|
||||
|
@ -83,8 +86,8 @@ void SVGIntegerPair::GetBaseValueString(nsAString& aValueAsString) const {
|
|||
}
|
||||
}
|
||||
|
||||
void SVGIntegerPair::SetBaseValue(int32_t aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedIntegerPair::SetBaseValue(int32_t aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
uint32_t index = (aPairIndex == eFirst ? 0 : 1);
|
||||
if (mIsBaseSet && mBaseVal[index] == aValue) {
|
||||
return;
|
||||
|
@ -101,8 +104,8 @@ void SVGIntegerPair::SetBaseValue(int32_t aValue, PairIndex aPairIndex,
|
|||
aSVGElement->DidChangeIntegerPair(mAttrEnum, emptyOrOldValue);
|
||||
}
|
||||
|
||||
void SVGIntegerPair::SetBaseValues(int32_t aValue1, int32_t aValue2,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedIntegerPair::SetBaseValues(int32_t aValue1, int32_t aValue2,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsBaseSet && mBaseVal[0] == aValue1 && mBaseVal[1] == aValue2) {
|
||||
return;
|
||||
}
|
||||
|
@ -120,8 +123,8 @@ void SVGIntegerPair::SetBaseValues(int32_t aValue1, int32_t aValue2,
|
|||
aSVGElement->DidChangeIntegerPair(mAttrEnum, emptyOrOldValue);
|
||||
}
|
||||
|
||||
void SVGIntegerPair::SetAnimValue(const int32_t aValue[2],
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedIntegerPair::SetAnimValue(const int32_t aValue[2],
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && mAnimVal[0] == aValue[0] && mAnimVal[1] == aValue[1]) {
|
||||
return;
|
||||
}
|
||||
|
@ -131,8 +134,9 @@ void SVGIntegerPair::SetAnimValue(const int32_t aValue[2],
|
|||
aSVGElement->DidAnimateIntegerPair(mAttrEnum);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedInteger> SVGIntegerPair::ToDOMAnimatedInteger(
|
||||
PairIndex aIndex, SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedInteger>
|
||||
SVGAnimatedIntegerPair::ToDOMAnimatedInteger(PairIndex aIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMAnimatedInteger> domAnimatedInteger =
|
||||
aIndex == eFirst ? sSVGFirstAnimatedIntegerTearoffTable.GetTearoff(this)
|
||||
: sSVGSecondAnimatedIntegerTearoffTable.GetTearoff(this);
|
||||
|
@ -149,7 +153,7 @@ already_AddRefed<DOMSVGAnimatedInteger> SVGIntegerPair::ToDOMAnimatedInteger(
|
|||
return domAnimatedInteger.forget();
|
||||
}
|
||||
|
||||
SVGIntegerPair::DOMAnimatedInteger::~DOMAnimatedInteger() {
|
||||
SVGAnimatedIntegerPair::DOMAnimatedInteger::~DOMAnimatedInteger() {
|
||||
if (mIndex == eFirst) {
|
||||
sSVGFirstAnimatedIntegerTearoffTable.RemoveTearoff(mVal);
|
||||
} else {
|
||||
|
@ -157,11 +161,12 @@ SVGIntegerPair::DOMAnimatedInteger::~DOMAnimatedInteger() {
|
|||
}
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGIntegerPair::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedIntegerPair::ToSMILAttr(
|
||||
SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILIntegerPair>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGIntegerPair::SMILIntegerPair::ValueFromString(
|
||||
nsresult SVGAnimatedIntegerPair::SMILIntegerPair::ValueFromString(
|
||||
const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
int32_t values[2];
|
||||
|
@ -180,14 +185,14 @@ nsresult SVGIntegerPair::SMILIntegerPair::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGIntegerPair::SMILIntegerPair::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedIntegerPair::SMILIntegerPair::GetBaseValue() const {
|
||||
SMILValue val(SVGIntegerPairSMILType::Singleton());
|
||||
val.mU.mIntPair[0] = mVal->mBaseVal[0];
|
||||
val.mU.mIntPair[1] = mVal->mBaseVal[1];
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGIntegerPair::SMILIntegerPair::ClearAnimValue() {
|
||||
void SVGAnimatedIntegerPair::SMILIntegerPair::ClearAnimValue() {
|
||||
if (mVal->mIsAnimated) {
|
||||
mVal->mIsAnimated = false;
|
||||
mVal->mAnimVal[0] = mVal->mBaseVal[0];
|
||||
|
@ -196,7 +201,7 @@ void SVGIntegerPair::SMILIntegerPair::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGIntegerPair::SMILIntegerPair::SetAnimValue(
|
||||
nsresult SVGAnimatedIntegerPair::SMILIntegerPair::SetAnimValue(
|
||||
const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == SVGIntegerPairSMILType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
|
@ -23,7 +23,7 @@ class SVGAnimationElement;
|
|||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
class SVGIntegerPair {
|
||||
class SVGAnimatedIntegerPair {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -71,14 +71,14 @@ class SVGIntegerPair {
|
|||
|
||||
public:
|
||||
struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
|
||||
DOMAnimatedInteger(SVGIntegerPair* aVal, PairIndex aIndex,
|
||||
DOMAnimatedInteger(SVGAnimatedIntegerPair* aVal, PairIndex aIndex,
|
||||
SVGElement* aSVGElement)
|
||||
: mozilla::dom::DOMSVGAnimatedInteger(aSVGElement),
|
||||
mVal(aVal),
|
||||
mIndex(aIndex) {}
|
||||
virtual ~DOMAnimatedInteger();
|
||||
|
||||
SVGIntegerPair* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedIntegerPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second integer
|
||||
|
||||
virtual int32_t BaseVal() override { return mVal->GetBaseValue(mIndex); }
|
||||
|
@ -96,13 +96,13 @@ class SVGIntegerPair {
|
|||
|
||||
struct SMILIntegerPair : public SMILAttr {
|
||||
public:
|
||||
SMILIntegerPair(SVGIntegerPair* aVal, SVGElement* aSVGElement)
|
||||
SMILIntegerPair(SVGAnimatedIntegerPair* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGIntegerPair* mVal;
|
||||
SVGAnimatedIntegerPair* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
|
||||
#include "nsCharSeparatedTokenizer.h"
|
||||
#include "SVGAttrTearoffTable.h"
|
||||
|
@ -16,9 +16,11 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
static SVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
|
||||
static SVGAttrTearoffTable<SVGAnimatedNumberPair,
|
||||
SVGAnimatedNumberPair::DOMAnimatedNumber>
|
||||
sSVGFirstAnimatedNumberTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
|
||||
static SVGAttrTearoffTable<SVGAnimatedNumberPair,
|
||||
SVGAnimatedNumberPair::DOMAnimatedNumber>
|
||||
sSVGSecondAnimatedNumberTearoffTable;
|
||||
|
||||
static nsresult ParseNumberOptionalNumber(const nsAString& aValue,
|
||||
|
@ -44,8 +46,8 @@ static nsresult ParseNumberOptionalNumber(const nsAString& aValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult SVGNumberPair::SetBaseValueString(const nsAString& aValueAsString,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedNumberPair::SetBaseValueString(
|
||||
const nsAString& aValueAsString, SVGElement* aSVGElement) {
|
||||
float val[2];
|
||||
|
||||
nsresult rv = ParseNumberOptionalNumber(aValueAsString, val);
|
||||
|
@ -69,7 +71,8 @@ nsresult SVGNumberPair::SetBaseValueString(const nsAString& aValueAsString,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGNumberPair::GetBaseValueString(nsAString& aValueAsString) const {
|
||||
void SVGAnimatedNumberPair::GetBaseValueString(
|
||||
nsAString& aValueAsString) const {
|
||||
aValueAsString.Truncate();
|
||||
aValueAsString.AppendFloat(mBaseVal[0]);
|
||||
if (mBaseVal[0] != mBaseVal[1]) {
|
||||
|
@ -78,8 +81,8 @@ void SVGNumberPair::GetBaseValueString(nsAString& aValueAsString) const {
|
|||
}
|
||||
}
|
||||
|
||||
void SVGNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
uint32_t index = (aPairIndex == eFirst ? 0 : 1);
|
||||
if (mIsBaseSet && mBaseVal[index] == aValue) {
|
||||
return;
|
||||
|
@ -95,8 +98,8 @@ void SVGNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex,
|
|||
aSVGElement->DidChangeNumberPair(mAttrEnum, emptyOrOldValue);
|
||||
}
|
||||
|
||||
void SVGNumberPair::SetBaseValues(float aValue1, float aValue2,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedNumberPair::SetBaseValues(float aValue1, float aValue2,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsBaseSet && mBaseVal[0] == aValue1 && mBaseVal[1] == aValue2) {
|
||||
return;
|
||||
}
|
||||
|
@ -113,8 +116,8 @@ void SVGNumberPair::SetBaseValues(float aValue1, float aValue2,
|
|||
aSVGElement->DidChangeNumberPair(mAttrEnum, emptyOrOldValue);
|
||||
}
|
||||
|
||||
void SVGNumberPair::SetAnimValue(const float aValue[2],
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedNumberPair::SetAnimValue(const float aValue[2],
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && mAnimVal[0] == aValue[0] && mAnimVal[1] == aValue[1]) {
|
||||
return;
|
||||
}
|
||||
|
@ -124,8 +127,9 @@ void SVGNumberPair::SetAnimValue(const float aValue[2],
|
|||
aSVGElement->DidAnimateNumberPair(mAttrEnum);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber> SVGNumberPair::ToDOMAnimatedNumber(
|
||||
PairIndex aIndex, SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGAnimatedNumberPair::ToDOMAnimatedNumber(PairIndex aIndex,
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMAnimatedNumber> domAnimatedNumber =
|
||||
aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this)
|
||||
: sSVGSecondAnimatedNumberTearoffTable.GetTearoff(this);
|
||||
|
@ -141,7 +145,7 @@ already_AddRefed<DOMSVGAnimatedNumber> SVGNumberPair::ToDOMAnimatedNumber(
|
|||
return domAnimatedNumber.forget();
|
||||
}
|
||||
|
||||
SVGNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber() {
|
||||
SVGAnimatedNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber() {
|
||||
if (mIndex == eFirst) {
|
||||
sSVGFirstAnimatedNumberTearoffTable.RemoveTearoff(mVal);
|
||||
} else {
|
||||
|
@ -149,11 +153,11 @@ SVGNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber() {
|
|||
}
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGNumberPair::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedNumberPair::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILNumberPair>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGNumberPair::SMILNumberPair::ValueFromString(
|
||||
nsresult SVGAnimatedNumberPair::SMILNumberPair::ValueFromString(
|
||||
const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
float values[2];
|
||||
|
@ -172,14 +176,14 @@ nsresult SVGNumberPair::SMILNumberPair::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGNumberPair::SMILNumberPair::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedNumberPair::SMILNumberPair::GetBaseValue() const {
|
||||
SMILValue val(&SVGNumberPairSMILType::sSingleton);
|
||||
val.mU.mNumberPair[0] = mVal->mBaseVal[0];
|
||||
val.mU.mNumberPair[1] = mVal->mBaseVal[1];
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGNumberPair::SMILNumberPair::ClearAnimValue() {
|
||||
void SVGAnimatedNumberPair::SMILNumberPair::ClearAnimValue() {
|
||||
if (mVal->mIsAnimated) {
|
||||
mVal->mIsAnimated = false;
|
||||
mVal->mAnimVal[0] = mVal->mBaseVal[0];
|
||||
|
@ -188,7 +192,8 @@ void SVGNumberPair::SMILNumberPair::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGNumberPair::SMILNumberPair::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedNumberPair::SMILNumberPair::SetAnimValue(
|
||||
const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == &SVGNumberPairSMILType::sSingleton,
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == &SVGNumberPairSMILType::sSingleton) {
|
|
@ -25,7 +25,7 @@ class SVGAnimationElement;
|
|||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
class SVGNumberPair {
|
||||
class SVGAnimatedNumberPair {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -72,16 +72,16 @@ class SVGNumberPair {
|
|||
|
||||
public:
|
||||
// DOM wrapper class for the (DOM)SVGAnimatedNumber interface where the
|
||||
// wrapped class is SVGNumberPair.
|
||||
// wrapped class is SVGAnimatedNumberPair.
|
||||
struct DOMAnimatedNumber final : public mozilla::dom::DOMSVGAnimatedNumber {
|
||||
DOMAnimatedNumber(SVGNumberPair* aVal, PairIndex aIndex,
|
||||
DOMAnimatedNumber(SVGAnimatedNumberPair* aVal, PairIndex aIndex,
|
||||
SVGElement* aSVGElement)
|
||||
: mozilla::dom::DOMSVGAnimatedNumber(aSVGElement),
|
||||
mVal(aVal),
|
||||
mIndex(aIndex) {}
|
||||
virtual ~DOMAnimatedNumber();
|
||||
|
||||
SVGNumberPair* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedNumberPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second number
|
||||
|
||||
virtual float BaseVal() override { return mVal->GetBaseValue(mIndex); }
|
||||
|
@ -100,13 +100,13 @@ class SVGNumberPair {
|
|||
|
||||
struct SMILNumberPair : public SMILAttr {
|
||||
public:
|
||||
SMILNumberPair(SVGNumberPair* aVal, SVGElement* aSVGElement)
|
||||
SMILNumberPair(SVGAnimatedNumberPair* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGNumberPair* mVal;
|
||||
SVGAnimatedNumberPair* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
@ -28,12 +28,14 @@ static const nsStaticAtom* const angleUnitMap[] = {
|
|||
nullptr, /* SVG_ANGLETYPE_UNSPECIFIED */
|
||||
nsGkAtoms::deg, nsGkAtoms::rad, nsGkAtoms::grad};
|
||||
|
||||
static SVGAttrTearoffTable<SVGOrient, DOMSVGAnimatedEnumeration>
|
||||
static SVGAttrTearoffTable<SVGAnimatedOrient, DOMSVGAnimatedEnumeration>
|
||||
sSVGAnimatedEnumTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGOrient, DOMSVGAnimatedAngle>
|
||||
static SVGAttrTearoffTable<SVGAnimatedOrient, DOMSVGAnimatedAngle>
|
||||
sSVGAnimatedAngleTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sBaseSVGAngleTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sAnimSVGAngleTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGAnimatedOrient, DOMSVGAngle>
|
||||
sBaseSVGAngleTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGAnimatedOrient, DOMSVGAngle>
|
||||
sAnimSVGAngleTearoffTable;
|
||||
|
||||
/* Helper functions */
|
||||
|
||||
|
@ -44,7 +46,7 @@ static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sAnimSVGAngleTearoffTable;
|
|||
class MOZ_RAII AutoChangeOrientNotifier {
|
||||
public:
|
||||
explicit AutoChangeOrientNotifier(
|
||||
SVGOrient* aOrient, SVGElement* aSVGElement,
|
||||
SVGAnimatedOrient* aOrient, SVGElement* aSVGElement,
|
||||
bool aDoSetAttr = true MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: mOrient(aOrient), mSVGElement(aSVGElement), mDoSetAttr(aDoSetAttr) {
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
|
@ -66,7 +68,7 @@ class MOZ_RAII AutoChangeOrientNotifier {
|
|||
}
|
||||
|
||||
private:
|
||||
SVGOrient* const mOrient;
|
||||
SVGAnimatedOrient* const mOrient;
|
||||
SVGElement* const mSVGElement;
|
||||
nsAttrValue mEmptyOrOldValue;
|
||||
bool mDoSetAttr;
|
||||
|
@ -116,8 +118,8 @@ static void GetAngleValueString(nsAString& aValueAsString, float aValue,
|
|||
}
|
||||
|
||||
/* static */
|
||||
bool SVGOrient::GetValueFromString(const nsAString& aString, float& aValue,
|
||||
uint16_t* aUnitType) {
|
||||
bool SVGAnimatedOrient::GetValueFromString(const nsAString& aString,
|
||||
float& aValue, uint16_t* aUnitType) {
|
||||
bool success;
|
||||
auto token = SVGContentUtils::GetAndEnsureOneToken(aString, success);
|
||||
|
||||
|
@ -138,7 +140,7 @@ bool SVGOrient::GetValueFromString(const nsAString& aString, float& aValue,
|
|||
}
|
||||
|
||||
/* static */
|
||||
float SVGOrient::GetDegreesPerUnit(uint8_t aUnit) {
|
||||
float SVGAnimatedOrient::GetDegreesPerUnit(uint8_t aUnit) {
|
||||
switch (aUnit) {
|
||||
case SVG_ANGLETYPE_UNSPECIFIED:
|
||||
case SVG_ANGLETYPE_DEG:
|
||||
|
@ -153,8 +155,8 @@ float SVGOrient::GetDegreesPerUnit(uint8_t aUnit) {
|
|||
}
|
||||
}
|
||||
|
||||
void SVGOrient::SetBaseValueInSpecifiedUnits(float aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedOrient::SetBaseValueInSpecifiedUnits(float aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mBaseVal == aValue && mBaseType == SVG_MARKER_ORIENT_ANGLE) {
|
||||
return;
|
||||
}
|
||||
|
@ -169,8 +171,8 @@ void SVGOrient::SetBaseValueInSpecifiedUnits(float aValue,
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGOrient::ConvertToSpecifiedUnits(uint16_t unitType,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedOrient::ConvertToSpecifiedUnits(uint16_t unitType,
|
||||
SVGElement* aSVGElement) {
|
||||
if (!IsValidAngleUnitType(unitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
||||
if (mBaseValUnit == uint8_t(unitType) &&
|
||||
|
@ -184,9 +186,9 @@ nsresult SVGOrient::ConvertToSpecifiedUnits(uint16_t unitType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult SVGOrient::NewValueSpecifiedUnits(uint16_t unitType,
|
||||
float valueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedOrient::NewValueSpecifiedUnits(uint16_t unitType,
|
||||
float valueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement) {
|
||||
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (!IsValidAngleUnitType(unitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
@ -208,7 +210,8 @@ nsresult SVGOrient::NewValueSpecifiedUnits(uint16_t unitType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAngle> SVGOrient::ToDOMBaseVal(SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAngle> SVGAnimatedOrient::ToDOMBaseVal(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAngle> domBaseVal = sBaseSVGAngleTearoffTable.GetTearoff(this);
|
||||
if (!domBaseVal) {
|
||||
domBaseVal = new DOMSVGAngle(this, aSVGElement, DOMSVGAngle::BaseValue);
|
||||
|
@ -218,7 +221,8 @@ already_AddRefed<DOMSVGAngle> SVGOrient::ToDOMBaseVal(SVGElement* aSVGElement) {
|
|||
return domBaseVal.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAngle> SVGOrient::ToDOMAnimVal(SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAngle> SVGAnimatedOrient::ToDOMAnimVal(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAngle> domAnimVal = sAnimSVGAngleTearoffTable.GetTearoff(this);
|
||||
if (!domAnimVal) {
|
||||
domAnimVal = new DOMSVGAngle(this, aSVGElement, DOMSVGAngle::AnimValue);
|
||||
|
@ -240,9 +244,9 @@ DOMSVGAngle::~DOMSVGAngle() {
|
|||
|
||||
/* Implementation */
|
||||
|
||||
nsresult SVGOrient::SetBaseValueString(const nsAString& aValueAsString,
|
||||
SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
nsresult SVGAnimatedOrient::SetBaseValueString(const nsAString& aValueAsString,
|
||||
SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
uint8_t type;
|
||||
float value;
|
||||
uint16_t unitType;
|
||||
|
@ -290,7 +294,7 @@ nsresult SVGOrient::SetBaseValueString(const nsAString& aValueAsString,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGOrient::GetBaseValueString(nsAString& aValueAsString) const {
|
||||
void SVGAnimatedOrient::GetBaseValueString(nsAString& aValueAsString) const {
|
||||
switch (mBaseType) {
|
||||
case SVG_MARKER_ORIENT_AUTO:
|
||||
aValueAsString.AssignLiteral("auto");
|
||||
|
@ -302,16 +306,18 @@ void SVGOrient::GetBaseValueString(nsAString& aValueAsString) const {
|
|||
GetAngleValueString(aValueAsString, mBaseVal, mBaseValUnit);
|
||||
}
|
||||
|
||||
void SVGOrient::GetBaseAngleValueString(nsAString& aValueAsString) const {
|
||||
void SVGAnimatedOrient::GetBaseAngleValueString(
|
||||
nsAString& aValueAsString) const {
|
||||
GetAngleValueString(aValueAsString, mBaseVal, mBaseValUnit);
|
||||
}
|
||||
|
||||
void SVGOrient::GetAnimAngleValueString(nsAString& aValueAsString) const {
|
||||
void SVGAnimatedOrient::GetAnimAngleValueString(
|
||||
nsAString& aValueAsString) const {
|
||||
GetAngleValueString(aValueAsString, mAnimVal, mAnimValUnit);
|
||||
}
|
||||
|
||||
void SVGOrient::SetBaseValue(float aValue, uint8_t aUnit,
|
||||
SVGElement* aSVGElement, bool aDoSetAttr) {
|
||||
void SVGAnimatedOrient::SetBaseValue(float aValue, uint8_t aUnit,
|
||||
SVGElement* aSVGElement, bool aDoSetAttr) {
|
||||
float valueInSpecifiedUnits = aValue / GetDegreesPerUnit(aUnit);
|
||||
if (aUnit == mBaseValUnit && mBaseVal == valueInSpecifiedUnits &&
|
||||
mBaseType == SVG_MARKER_ORIENT_ANGLE) {
|
||||
|
@ -330,7 +336,8 @@ void SVGOrient::SetBaseValue(float aValue, uint8_t aUnit,
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGOrient::SetBaseType(SVGEnumValue aValue, SVGElement* aSVGElement) {
|
||||
nsresult SVGAnimatedOrient::SetBaseType(SVGEnumValue aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mBaseType == aValue) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -351,8 +358,8 @@ nsresult SVGOrient::SetBaseType(SVGEnumValue aValue, SVGElement* aSVGElement) {
|
|||
return NS_ERROR_DOM_TYPE_ERR;
|
||||
}
|
||||
|
||||
void SVGOrient::SetAnimValue(float aValue, uint8_t aUnit,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedOrient::SetAnimValue(float aValue, uint8_t aUnit,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && mAnimVal == aValue && mAnimValUnit == aUnit &&
|
||||
mAnimType == SVG_MARKER_ORIENT_ANGLE) {
|
||||
return;
|
||||
|
@ -364,7 +371,8 @@ void SVGOrient::SetAnimValue(float aValue, uint8_t aUnit,
|
|||
aSVGElement->DidAnimateOrient();
|
||||
}
|
||||
|
||||
void SVGOrient::SetAnimType(SVGEnumValue aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedOrient::SetAnimType(SVGEnumValue aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (mIsAnimated && mAnimType == aValue) {
|
||||
return;
|
||||
}
|
||||
|
@ -375,7 +383,7 @@ void SVGOrient::SetAnimType(SVGEnumValue aValue, SVGElement* aSVGElement) {
|
|||
aSVGElement->DidAnimateOrient();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedAngle> SVGOrient::ToDOMAnimatedAngle(
|
||||
already_AddRefed<DOMSVGAnimatedAngle> SVGAnimatedOrient::ToDOMAnimatedAngle(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAnimatedAngle> domAnimatedAngle =
|
||||
sSVGAnimatedAngleTearoffTable.GetTearoff(this);
|
||||
|
@ -387,8 +395,8 @@ already_AddRefed<DOMSVGAnimatedAngle> SVGOrient::ToDOMAnimatedAngle(
|
|||
return domAnimatedAngle.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedEnumeration> SVGOrient::ToDOMAnimatedEnum(
|
||||
SVGElement* aSVGElement) {
|
||||
already_AddRefed<DOMSVGAnimatedEnumeration>
|
||||
SVGAnimatedOrient::ToDOMAnimatedEnum(SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGAnimatedEnumeration> domAnimatedEnum =
|
||||
sSVGAnimatedEnumTearoffTable.GetTearoff(this);
|
||||
if (!domAnimatedEnum) {
|
||||
|
@ -403,19 +411,19 @@ DOMSVGAnimatedAngle::~DOMSVGAnimatedAngle() {
|
|||
sSVGAnimatedAngleTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
SVGOrient::DOMAnimatedEnum::~DOMAnimatedEnum() {
|
||||
SVGAnimatedOrient::DOMAnimatedEnum::~DOMAnimatedEnum() {
|
||||
sSVGAnimatedEnumTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
// we want to avoid exposing SVG_MARKER_ORIENT_AUTO_START_REVERSE to
|
||||
// Web content
|
||||
uint16_t SVGOrient::DOMAnimatedEnum::Sanitize(uint16_t aValue) {
|
||||
uint16_t SVGAnimatedOrient::DOMAnimatedEnum::Sanitize(uint16_t aValue) {
|
||||
return aValue == dom::SVG_MARKER_ORIENT_AUTO_START_REVERSE
|
||||
? dom::SVGMarkerElement_Binding::SVG_MARKER_ORIENT_UNKNOWN
|
||||
: aValue;
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGOrient::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedOrient::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
if (aSVGElement->NodeInfo()->Equals(nsGkAtoms::marker, kNameSpaceID_SVG)) {
|
||||
return MakeUnique<SMILOrient>(this, aSVGElement);
|
||||
}
|
||||
|
@ -425,7 +433,7 @@ UniquePtr<SMILAttr> SVGOrient::ToSMILAttr(SVGElement* aSVGElement) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult SVGOrient::SMILOrient::ValueFromString(
|
||||
nsresult SVGAnimatedOrient::SMILOrient::ValueFromString(
|
||||
const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
SMILValue val(&SVGOrientSMILType::sSingleton);
|
||||
|
@ -453,7 +461,7 @@ nsresult SVGOrient::SMILOrient::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGOrient::SMILOrient::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedOrient::SMILOrient::GetBaseValue() const {
|
||||
SMILValue val(&SVGOrientSMILType::sSingleton);
|
||||
val.mU.mOrient.mAngle = mOrient->GetBaseValInSpecifiedUnits();
|
||||
val.mU.mOrient.mUnit = mOrient->GetBaseValueUnit();
|
||||
|
@ -461,7 +469,7 @@ SMILValue SVGOrient::SMILOrient::GetBaseValue() const {
|
|||
return val;
|
||||
}
|
||||
|
||||
void SVGOrient::SMILOrient::ClearAnimValue() {
|
||||
void SVGAnimatedOrient::SMILOrient::ClearAnimValue() {
|
||||
if (mOrient->mIsAnimated) {
|
||||
mOrient->mIsAnimated = false;
|
||||
mOrient->mAnimVal = mOrient->mBaseVal;
|
||||
|
@ -471,7 +479,7 @@ void SVGOrient::SMILOrient::ClearAnimValue() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGOrient::SMILOrient::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedOrient::SMILOrient::SetAnimValue(const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == &SVGOrientSMILType::sSingleton,
|
||||
"Unexpected type to assign animated value");
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "DOMSVGAnimatedEnumeration.h"
|
||||
#include "nsError.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "mozilla/AlreadyAddRefed.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/SMILAttr.h"
|
||||
|
@ -30,7 +30,7 @@ class SVGAnimationElement;
|
|||
class SVGElement;
|
||||
} // namespace dom
|
||||
|
||||
class SVGOrient {
|
||||
class SVGAnimatedOrient {
|
||||
friend class AutoChangeOrientNotifier;
|
||||
friend class mozilla::dom::DOMSVGAngle;
|
||||
friend class mozilla::dom::DOMSVGAnimatedAngle;
|
||||
|
@ -100,13 +100,13 @@ class SVGOrient {
|
|||
|
||||
public:
|
||||
// DOM wrapper class for the (DOM)SVGAnimatedEnumeration interface where the
|
||||
// wrapped class is SVGOrient.
|
||||
// wrapped class is SVGAnimatedOrient.
|
||||
struct DOMAnimatedEnum final : public dom::DOMSVGAnimatedEnumeration {
|
||||
DOMAnimatedEnum(SVGOrient* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimatedEnum(SVGAnimatedOrient* aVal, SVGElement* aSVGElement)
|
||||
: DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
|
||||
~DOMAnimatedEnum();
|
||||
|
||||
SVGOrient* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedOrient* mVal; // kept alive because it belongs to content
|
||||
|
||||
using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
|
||||
uint16_t BaseVal() override { return Sanitize(mVal->mBaseType); }
|
||||
|
@ -127,13 +127,13 @@ class SVGOrient {
|
|||
|
||||
struct SMILOrient final : public SMILAttr {
|
||||
public:
|
||||
SMILOrient(SVGOrient* aOrient, SVGElement* aSVGElement)
|
||||
SMILOrient(SVGAnimatedOrient* aOrient, SVGElement* aSVGElement)
|
||||
: mOrient(aOrient), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGOrient* mOrient;
|
||||
SVGAnimatedOrient* mOrient;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "SVGAnimatedRect.h"
|
||||
#include "mozilla/dom/SVGAnimatedRectBinding.h"
|
||||
#include "SVGElement.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "SVGIRect.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -18,11 +18,12 @@ NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
|
|||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
|
||||
|
||||
SVGAnimatedRect::SVGAnimatedRect(SVGViewBox* aVal, SVGElement* aSVGElement)
|
||||
SVGAnimatedRect::SVGAnimatedRect(SVGAnimatedViewBox* aVal,
|
||||
SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
SVGAnimatedRect::~SVGAnimatedRect() {
|
||||
SVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
|
||||
SVGAnimatedViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
already_AddRefed<SVGIRect> SVGAnimatedRect::GetBaseVal() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "nsWrapperCache.h"
|
||||
|
||||
namespace mozilla {
|
||||
class SVGViewBox;
|
||||
class SVGAnimatedViewBox;
|
||||
namespace dom {
|
||||
|
||||
class SVGAnimatedRect final : public nsWrapperCache {
|
||||
|
@ -23,7 +23,7 @@ class SVGAnimatedRect final : public nsWrapperCache {
|
|||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedRect)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedRect)
|
||||
|
||||
SVGAnimatedRect(SVGViewBox* aVal, SVGElement* aSVGElement);
|
||||
SVGAnimatedRect(SVGAnimatedViewBox* aVal, SVGElement* aSVGElement);
|
||||
|
||||
SVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
||||
|
@ -37,7 +37,7 @@ class SVGAnimatedRect final : public nsWrapperCache {
|
|||
private:
|
||||
virtual ~SVGAnimatedRect();
|
||||
|
||||
SVGViewBox* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedViewBox* mVal; // kept alive because it belongs to content
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/SMILValue.h"
|
||||
|
@ -15,28 +15,30 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGString::DOMAnimatedString,
|
||||
mSVGElement)
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(
|
||||
SVGAnimatedString::DOMAnimatedString, mSVGElement)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGString::DOMAnimatedString)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGString::DOMAnimatedString)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedString::DOMAnimatedString)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedString::DOMAnimatedString)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGString::DOMAnimatedString)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedString::DOMAnimatedString)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
static inline SVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>&
|
||||
static inline SVGAttrTearoffTable<SVGAnimatedString,
|
||||
SVGAnimatedString::DOMAnimatedString>&
|
||||
SVGAnimatedStringTearoffTable() {
|
||||
static SVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>
|
||||
static SVGAttrTearoffTable<SVGAnimatedString,
|
||||
SVGAnimatedString::DOMAnimatedString>
|
||||
sSVGAnimatedStringTearoffTable;
|
||||
return sSVGAnimatedStringTearoffTable;
|
||||
}
|
||||
|
||||
/* Implementation */
|
||||
|
||||
void SVGString::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
void SVGAnimatedString::SetBaseValue(const nsAString& aValue,
|
||||
SVGElement* aSVGElement, bool aDoSetAttr) {
|
||||
NS_ASSERTION(aSVGElement, "Null element passed to SetBaseValue");
|
||||
|
||||
mIsBaseSet = true;
|
||||
|
@ -50,8 +52,8 @@ void SVGString::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
|
|||
aSVGElement->DidChangeString(mAttrEnum);
|
||||
}
|
||||
|
||||
void SVGString::GetAnimValue(nsAString& aResult,
|
||||
const SVGElement* aSVGElement) const {
|
||||
void SVGAnimatedString::GetAnimValue(nsAString& aResult,
|
||||
const SVGElement* aSVGElement) const {
|
||||
if (mAnimVal) {
|
||||
aResult = *mAnimVal;
|
||||
return;
|
||||
|
@ -60,7 +62,8 @@ void SVGString::GetAnimValue(nsAString& aResult,
|
|||
aSVGElement->GetStringBaseValue(mAttrEnum, aResult);
|
||||
}
|
||||
|
||||
void SVGString::SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement) {
|
||||
void SVGAnimatedString::SetAnimValue(const nsAString& aValue,
|
||||
SVGElement* aSVGElement) {
|
||||
if (aSVGElement->IsStringAnimatable(mAttrEnum)) {
|
||||
if (mAnimVal && mAnimVal->Equals(aValue)) {
|
||||
return;
|
||||
|
@ -73,7 +76,7 @@ void SVGString::SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement) {
|
|||
}
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedString> SVGString::ToDOMAnimatedString(
|
||||
already_AddRefed<DOMSVGAnimatedString> SVGAnimatedString::ToDOMAnimatedString(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMAnimatedString> domAnimatedString =
|
||||
SVGAnimatedStringTearoffTable().GetTearoff(this);
|
||||
|
@ -85,15 +88,15 @@ already_AddRefed<DOMSVGAnimatedString> SVGString::ToDOMAnimatedString(
|
|||
return domAnimatedString.forget();
|
||||
}
|
||||
|
||||
SVGString::DOMAnimatedString::~DOMAnimatedString() {
|
||||
SVGAnimatedString::DOMAnimatedString::~DOMAnimatedString() {
|
||||
SVGAnimatedStringTearoffTable().RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGString::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedString::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILString>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGString::SMILString::ValueFromString(
|
||||
nsresult SVGAnimatedString::SMILString::ValueFromString(
|
||||
const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
SMILValue val(SMILStringType::Singleton());
|
||||
|
@ -104,21 +107,21 @@ nsresult SVGString::SMILString::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGString::SMILString::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedString::SMILString::GetBaseValue() const {
|
||||
SMILValue val(SMILStringType::Singleton());
|
||||
mSVGElement->GetStringBaseValue(mVal->mAttrEnum,
|
||||
*static_cast<nsAString*>(val.mU.mPtr));
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGString::SMILString::ClearAnimValue() {
|
||||
void SVGAnimatedString::SMILString::ClearAnimValue() {
|
||||
if (mVal->mAnimVal) {
|
||||
mVal->mAnimVal = nullptr;
|
||||
mSVGElement->DidAnimateString(mVal->mAttrEnum);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult SVGString::SMILString::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedString::SMILString::SetAnimValue(const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == SMILStringType::Singleton(),
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == SMILStringType::Singleton()) {
|
|
@ -21,7 +21,7 @@ namespace dom {
|
|||
class SVGElement;
|
||||
}
|
||||
|
||||
class SVGString {
|
||||
class SVGAnimatedString {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -59,15 +59,15 @@ class SVGString {
|
|||
|
||||
public:
|
||||
// DOM wrapper class for the (DOM)SVGAnimatedString interface where the
|
||||
// wrapped class is SVGString.
|
||||
// wrapped class is SVGAnimatedString.
|
||||
struct DOMAnimatedString final : public mozilla::dom::DOMSVGAnimatedString {
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString)
|
||||
|
||||
DOMAnimatedString(SVGString* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimatedString(SVGAnimatedString* aVal, SVGElement* aSVGElement)
|
||||
: mozilla::dom::DOMSVGAnimatedString(aSVGElement), mVal(aVal) {}
|
||||
|
||||
SVGString* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedString* mVal; // kept alive because it belongs to content
|
||||
|
||||
void GetBaseVal(nsAString& aResult) override {
|
||||
mVal->GetBaseValue(aResult, mSVGElement);
|
||||
|
@ -87,13 +87,13 @@ class SVGString {
|
|||
};
|
||||
struct SMILString : public SMILAttr {
|
||||
public:
|
||||
SMILString(SVGString* aVal, SVGElement* aSVGElement)
|
||||
SMILString(SVGAnimatedString* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGString* mVal;
|
||||
SVGAnimatedString* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGViewBox.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/SMILValue.h"
|
||||
|
@ -62,39 +62,39 @@ nsresult SVGViewBoxRect::FromString(const nsAString& aStr,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* Cycle collection macros for SVGViewBox */
|
||||
/* Cycle collection macros for SVGAnimatedViewBox */
|
||||
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGViewBox::DOMBaseVal,
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedViewBox::DOMBaseVal,
|
||||
mSVGElement)
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGViewBox::DOMAnimVal,
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedViewBox::DOMAnimVal,
|
||||
mSVGElement)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGViewBox::DOMBaseVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGViewBox::DOMBaseVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedViewBox::DOMBaseVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedViewBox::DOMBaseVal)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGViewBox::DOMAnimVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGViewBox::DOMAnimVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedViewBox::DOMAnimVal)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedViewBox::DOMAnimVal)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGViewBox::DOMBaseVal)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedViewBox::DOMBaseVal)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGViewBox::DOMAnimVal)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedViewBox::DOMAnimVal)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMBaseVal>
|
||||
static SVGAttrTearoffTable<SVGAnimatedViewBox, SVGAnimatedViewBox::DOMBaseVal>
|
||||
sBaseSVGViewBoxTearoffTable;
|
||||
static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMAnimVal>
|
||||
static SVGAttrTearoffTable<SVGAnimatedViewBox, SVGAnimatedViewBox::DOMAnimVal>
|
||||
sAnimSVGViewBoxTearoffTable;
|
||||
SVGAttrTearoffTable<SVGViewBox, SVGAnimatedRect>
|
||||
SVGViewBox::sSVGAnimatedRectTearoffTable;
|
||||
SVGAttrTearoffTable<SVGAnimatedViewBox, SVGAnimatedRect>
|
||||
SVGAnimatedViewBox::sSVGAnimatedRectTearoffTable;
|
||||
|
||||
/* Implementation of SVGViewBox methods */
|
||||
/* Implementation of SVGAnimatedViewBox methods */
|
||||
|
||||
void SVGViewBox::Init() {
|
||||
void SVGAnimatedViewBox::Init() {
|
||||
mHasBaseVal = false;
|
||||
// We shouldn't use mBaseVal for rendering (its usages should be guarded with
|
||||
// "mHasBaseVal" checks), but just in case we do by accident, this will
|
||||
|
@ -104,7 +104,7 @@ void SVGViewBox::Init() {
|
|||
mAnimVal = nullptr;
|
||||
}
|
||||
|
||||
bool SVGViewBox::HasRect() const {
|
||||
bool SVGAnimatedViewBox::HasRect() const {
|
||||
// Check mAnimVal if we have one; otherwise, check mBaseVal if we have one;
|
||||
// otherwise, just return false (we clearly do not have a rect).
|
||||
const SVGViewBoxRect* rect = mAnimVal;
|
||||
|
@ -119,8 +119,8 @@ bool SVGViewBox::HasRect() const {
|
|||
return !rect->none && rect->width >= 0 && rect->height >= 0;
|
||||
}
|
||||
|
||||
void SVGViewBox::SetAnimValue(const SVGViewBoxRect& aRect,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedViewBox::SetAnimValue(const SVGViewBoxRect& aRect,
|
||||
SVGElement* aSVGElement) {
|
||||
if (!mAnimVal) {
|
||||
// it's okay if allocation fails - and no point in reporting that
|
||||
mAnimVal = new SVGViewBoxRect(aRect);
|
||||
|
@ -133,8 +133,8 @@ void SVGViewBox::SetAnimValue(const SVGViewBoxRect& aRect,
|
|||
aSVGElement->DidAnimateViewBox();
|
||||
}
|
||||
|
||||
void SVGViewBox::SetBaseValue(const SVGViewBoxRect& aRect,
|
||||
SVGElement* aSVGElement) {
|
||||
void SVGAnimatedViewBox::SetBaseValue(const SVGViewBoxRect& aRect,
|
||||
SVGElement* aSVGElement) {
|
||||
if (!mHasBaseVal || mBaseVal == aRect) {
|
||||
// This method is used to set a single x, y, width
|
||||
// or height value. It can't create a base value
|
||||
|
@ -155,9 +155,9 @@ void SVGViewBox::SetBaseValue(const SVGViewBoxRect& aRect,
|
|||
}
|
||||
}
|
||||
|
||||
nsresult SVGViewBox::SetBaseValueString(const nsAString& aValue,
|
||||
SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
nsresult SVGAnimatedViewBox::SetBaseValueString(const nsAString& aValue,
|
||||
SVGElement* aSVGElement,
|
||||
bool aDoSetAttr) {
|
||||
SVGViewBoxRect viewBox;
|
||||
|
||||
nsresult rv = SVGViewBoxRect::FromString(aValue, &viewBox);
|
||||
|
@ -185,7 +185,7 @@ nsresult SVGViewBox::SetBaseValueString(const nsAString& aValue,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void SVGViewBox::GetBaseValueString(nsAString& aValue) const {
|
||||
void SVGAnimatedViewBox::GetBaseValueString(nsAString& aValue) const {
|
||||
if (mBaseVal.none) {
|
||||
aValue.AssignLiteral("none");
|
||||
return;
|
||||
|
@ -195,7 +195,7 @@ void SVGViewBox::GetBaseValueString(nsAString& aValue) const {
|
|||
(double)mBaseVal.height);
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAnimatedRect> SVGViewBox::ToSVGAnimatedRect(
|
||||
already_AddRefed<SVGAnimatedRect> SVGAnimatedViewBox::ToSVGAnimatedRect(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<SVGAnimatedRect> domAnimatedRect =
|
||||
sSVGAnimatedRectTearoffTable.GetTearoff(this);
|
||||
|
@ -207,7 +207,8 @@ already_AddRefed<SVGAnimatedRect> SVGViewBox::ToSVGAnimatedRect(
|
|||
return domAnimatedRect.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<SVGIRect> SVGViewBox::ToDOMBaseVal(SVGElement* aSVGElement) {
|
||||
already_AddRefed<SVGIRect> SVGAnimatedViewBox::ToDOMBaseVal(
|
||||
SVGElement* aSVGElement) {
|
||||
if (!mHasBaseVal || mBaseVal.none) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -221,11 +222,12 @@ already_AddRefed<SVGIRect> SVGViewBox::ToDOMBaseVal(SVGElement* aSVGElement) {
|
|||
return domBaseVal.forget();
|
||||
}
|
||||
|
||||
SVGViewBox::DOMBaseVal::~DOMBaseVal() {
|
||||
SVGAnimatedViewBox::DOMBaseVal::~DOMBaseVal() {
|
||||
sBaseSVGViewBoxTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
already_AddRefed<SVGIRect> SVGViewBox::ToDOMAnimVal(SVGElement* aSVGElement) {
|
||||
already_AddRefed<SVGIRect> SVGAnimatedViewBox::ToDOMAnimVal(
|
||||
SVGElement* aSVGElement) {
|
||||
if ((mAnimVal && mAnimVal->none) ||
|
||||
(!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
|
||||
return nullptr;
|
||||
|
@ -240,39 +242,40 @@ already_AddRefed<SVGIRect> SVGViewBox::ToDOMAnimVal(SVGElement* aSVGElement) {
|
|||
return domAnimVal.forget();
|
||||
}
|
||||
|
||||
SVGViewBox::DOMAnimVal::~DOMAnimVal() {
|
||||
SVGAnimatedViewBox::DOMAnimVal::~DOMAnimVal() {
|
||||
sAnimSVGViewBoxTearoffTable.RemoveTearoff(mVal);
|
||||
}
|
||||
|
||||
void SVGViewBox::DOMBaseVal::SetX(float aX, ErrorResult& aRv) {
|
||||
void SVGAnimatedViewBox::DOMBaseVal::SetX(float aX, ErrorResult& aRv) {
|
||||
SVGViewBoxRect rect = mVal->GetBaseValue();
|
||||
rect.x = aX;
|
||||
mVal->SetBaseValue(rect, mSVGElement);
|
||||
}
|
||||
|
||||
void SVGViewBox::DOMBaseVal::SetY(float aY, ErrorResult& aRv) {
|
||||
void SVGAnimatedViewBox::DOMBaseVal::SetY(float aY, ErrorResult& aRv) {
|
||||
SVGViewBoxRect rect = mVal->GetBaseValue();
|
||||
rect.y = aY;
|
||||
mVal->SetBaseValue(rect, mSVGElement);
|
||||
}
|
||||
|
||||
void SVGViewBox::DOMBaseVal::SetWidth(float aWidth, ErrorResult& aRv) {
|
||||
void SVGAnimatedViewBox::DOMBaseVal::SetWidth(float aWidth, ErrorResult& aRv) {
|
||||
SVGViewBoxRect rect = mVal->GetBaseValue();
|
||||
rect.width = aWidth;
|
||||
mVal->SetBaseValue(rect, mSVGElement);
|
||||
}
|
||||
|
||||
void SVGViewBox::DOMBaseVal::SetHeight(float aHeight, ErrorResult& aRv) {
|
||||
void SVGAnimatedViewBox::DOMBaseVal::SetHeight(float aHeight,
|
||||
ErrorResult& aRv) {
|
||||
SVGViewBoxRect rect = mVal->GetBaseValue();
|
||||
rect.height = aHeight;
|
||||
mVal->SetBaseValue(rect, mSVGElement);
|
||||
}
|
||||
|
||||
UniquePtr<SMILAttr> SVGViewBox::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
UniquePtr<SMILAttr> SVGAnimatedViewBox::ToSMILAttr(SVGElement* aSVGElement) {
|
||||
return MakeUnique<SMILViewBox>(this, aSVGElement);
|
||||
}
|
||||
|
||||
nsresult SVGViewBox::SMILViewBox ::ValueFromString(
|
||||
nsresult SVGAnimatedViewBox::SMILViewBox ::ValueFromString(
|
||||
const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
||||
SVGViewBoxRect viewBox;
|
||||
|
@ -288,20 +291,21 @@ nsresult SVGViewBox::SMILViewBox ::ValueFromString(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
SMILValue SVGViewBox::SMILViewBox::GetBaseValue() const {
|
||||
SMILValue SVGAnimatedViewBox::SMILViewBox::GetBaseValue() const {
|
||||
SMILValue val(&SVGViewBoxSMILType::sSingleton);
|
||||
*static_cast<SVGViewBoxRect*>(val.mU.mPtr) = mVal->mBaseVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
void SVGViewBox::SMILViewBox::ClearAnimValue() {
|
||||
void SVGAnimatedViewBox::SMILViewBox::ClearAnimValue() {
|
||||
if (mVal->mAnimVal) {
|
||||
mVal->mAnimVal = nullptr;
|
||||
mSVGElement->DidAnimateViewBox();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult SVGViewBox::SMILViewBox::SetAnimValue(const SMILValue& aValue) {
|
||||
nsresult SVGAnimatedViewBox::SMILViewBox::SetAnimValue(
|
||||
const SMILValue& aValue) {
|
||||
NS_ASSERTION(aValue.mType == &SVGViewBoxSMILType::sSingleton,
|
||||
"Unexpected type to assign animated value");
|
||||
if (aValue.mType == &SVGViewBoxSMILType::sSingleton) {
|
|
@ -45,7 +45,7 @@ struct SVGViewBoxRect {
|
|||
static nsresult FromString(const nsAString& aStr, SVGViewBoxRect* aViewBox);
|
||||
};
|
||||
|
||||
class SVGViewBox {
|
||||
class SVGAnimatedViewBox {
|
||||
public:
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
|
||||
|
@ -104,10 +104,10 @@ class SVGViewBox {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMBaseVal)
|
||||
|
||||
DOMBaseVal(SVGViewBox* aVal, SVGElement* aSVGElement)
|
||||
DOMBaseVal(SVGAnimatedViewBox* aVal, SVGElement* aSVGElement)
|
||||
: mozilla::dom::SVGIRect(), mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
SVGViewBox* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedViewBox* mVal; // kept alive because it belongs to content
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
|
||||
float X() const final { return mVal->GetBaseValue().x; }
|
||||
|
@ -133,10 +133,10 @@ class SVGViewBox {
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimVal)
|
||||
|
||||
DOMAnimVal(SVGViewBox* aVal, SVGElement* aSVGElement)
|
||||
DOMAnimVal(SVGAnimatedViewBox* aVal, SVGElement* aSVGElement)
|
||||
: mozilla::dom::SVGIRect(), mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
SVGViewBox* mVal; // kept alive because it belongs to content
|
||||
SVGAnimatedViewBox* mVal; // kept alive because it belongs to content
|
||||
RefPtr<SVGElement> mSVGElement;
|
||||
|
||||
// Script may have modified animation parameters or timeline -- DOM getters
|
||||
|
@ -185,13 +185,13 @@ class SVGViewBox {
|
|||
|
||||
struct SMILViewBox : public SMILAttr {
|
||||
public:
|
||||
SMILViewBox(SVGViewBox* aVal, SVGElement* aSVGElement)
|
||||
SMILViewBox(SVGAnimatedViewBox* aVal, SVGElement* aSVGElement)
|
||||
: mVal(aVal), mSVGElement(aSVGElement) {}
|
||||
|
||||
// These will stay alive because a SMILAttr only lives as long
|
||||
// as the Compositing step, and DOM elements don't get a chance to
|
||||
// die during that.
|
||||
SVGViewBox* mVal;
|
||||
SVGAnimatedViewBox* mVal;
|
||||
SVGElement* mSVGElement;
|
||||
|
||||
// SMILAttr methods
|
||||
|
@ -204,7 +204,7 @@ class SVGViewBox {
|
|||
virtual nsresult SetAnimValue(const SMILValue& aValue) override;
|
||||
};
|
||||
|
||||
static SVGAttrTearoffTable<SVGViewBox, mozilla::dom::SVGAnimatedRect>
|
||||
static SVGAttrTearoffTable<SVGAnimatedViewBox, mozilla::dom::SVGAnimatedRect>
|
||||
sSVGAnimatedRectTearoffTable;
|
||||
};
|
||||
|
|
@ -7,28 +7,28 @@
|
|||
#include "SVGAttrValueWrapper.h"
|
||||
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGIntegerPair.h"
|
||||
#include "SVGAnimatedIntegerPair.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGLengthList.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGNumberList.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "SVGPathData.h"
|
||||
#include "SVGPointList.h"
|
||||
#include "SVGStringList.h"
|
||||
#include "SVGTransformList.h"
|
||||
#include "SVGViewBox.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
/*static*/
|
||||
void SVGAttrValueWrapper::ToString(const SVGOrient* aOrient,
|
||||
void SVGAttrValueWrapper::ToString(const SVGAnimatedOrient* aOrient,
|
||||
nsAString& aResult) {
|
||||
aOrient->GetBaseValueString(aResult);
|
||||
}
|
||||
|
||||
/*static*/
|
||||
void SVGAttrValueWrapper::ToString(const SVGIntegerPair* aIntegerPair,
|
||||
void SVGAttrValueWrapper::ToString(const SVGAnimatedIntegerPair* aIntegerPair,
|
||||
nsAString& aResult) {
|
||||
aIntegerPair->GetBaseValueString(aResult);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ void SVGAttrValueWrapper::ToString(const SVGNumberList* aNumberList,
|
|||
}
|
||||
|
||||
/*static*/
|
||||
void SVGAttrValueWrapper::ToString(const SVGNumberPair* aNumberPair,
|
||||
void SVGAttrValueWrapper::ToString(const SVGAnimatedNumberPair* aNumberPair,
|
||||
nsAString& aResult) {
|
||||
aNumberPair->GetBaseValueString(aResult);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void SVGAttrValueWrapper::ToString(const SVGTransformList* aTransformList,
|
|||
}
|
||||
|
||||
/*static*/
|
||||
void SVGAttrValueWrapper::ToString(const SVGViewBox* aViewBox,
|
||||
void SVGAttrValueWrapper::ToString(const SVGAnimatedViewBox* aViewBox,
|
||||
nsAString& aResult) {
|
||||
aViewBox->GetBaseValueString(aResult);
|
||||
}
|
||||
|
|
|
@ -17,26 +17,29 @@
|
|||
class nsSVGLength2;
|
||||
|
||||
namespace mozilla {
|
||||
class SVGIntegerPair;
|
||||
class SVGAnimatedIntegerPair;
|
||||
class SVGAnimatedNumberPair;
|
||||
class SVGAnimatedOrient;
|
||||
class SVGAnimatedPreserveAspectRatio;
|
||||
class SVGAnimatedViewBox;
|
||||
class SVGLengthList;
|
||||
class SVGNumberList;
|
||||
class SVGNumberPair;
|
||||
class SVGOrient;
|
||||
class SVGPathData;
|
||||
class SVGPointList;
|
||||
class SVGAnimatedPreserveAspectRatio;
|
||||
class SVGStringList;
|
||||
class SVGTransformList;
|
||||
class SVGViewBox;
|
||||
|
||||
class SVGAttrValueWrapper {
|
||||
public:
|
||||
static void ToString(const SVGOrient* aAngle, nsAString& aResult);
|
||||
static void ToString(const SVGIntegerPair* aIntegerPair, nsAString& aResult);
|
||||
static void ToString(const SVGAnimatedIntegerPair* aIntegerPair,
|
||||
nsAString& aResult);
|
||||
static void ToString(const SVGAnimatedNumberPair* aNumberPair,
|
||||
nsAString& aResult);
|
||||
static void ToString(const SVGAnimatedOrient* aOrient, nsAString& aResult);
|
||||
static void ToString(const nsSVGLength2* aLength, nsAString& aResult);
|
||||
static void ToString(const SVGAnimatedViewBox* aViewBox, nsAString& aResult);
|
||||
static void ToString(const SVGLengthList* aLengthList, nsAString& aResult);
|
||||
static void ToString(const SVGNumberList* aNumberList, nsAString& aResult);
|
||||
static void ToString(const SVGNumberPair* aNumberPair, nsAString& aResult);
|
||||
static void ToString(const SVGPathData* aPathData, nsAString& aResult);
|
||||
static void ToString(const SVGPointList* aPointList, nsAString& aResult);
|
||||
static void ToString(
|
||||
|
@ -45,7 +48,6 @@ class SVGAttrValueWrapper {
|
|||
static void ToString(const SVGStringList* aStringList, nsAString& aResult);
|
||||
static void ToString(const SVGTransformList* aTransformList,
|
||||
nsAString& aResult);
|
||||
static void ToString(const SVGViewBox* aViewBox, nsAString& aResult);
|
||||
};
|
||||
|
||||
} /* namespace mozilla */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGClipPathElement_h
|
||||
#define mozilla_dom_SVGClipPathElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "mozilla/dom/SVGTransformableElement.h"
|
||||
|
||||
class nsSVGClipPathFrame;
|
||||
|
@ -44,7 +44,7 @@ class SVGClipPathElement final : public SVGClipPathElementBase {
|
|||
|
||||
protected:
|
||||
enum { CLIPPATHUNITS };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGComponentTransferFunctionElement_h
|
||||
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
|
||||
|
@ -78,7 +78,7 @@ class SVGComponentTransferFunctionElement
|
|||
static NumberInfo sNumberInfo[5];
|
||||
|
||||
enum { TYPE };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sTypeMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
};
|
||||
|
|
|
@ -43,17 +43,17 @@
|
|||
#include "SVGAnimatedPointList.h"
|
||||
#include "SVGAnimatedPathSegList.h"
|
||||
#include "SVGAnimatedTransformList.h"
|
||||
#include "SVGBoolean.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGInteger.h"
|
||||
#include "SVGIntegerPair.h"
|
||||
#include "SVGAnimatedBoolean.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedInteger.h"
|
||||
#include "SVGAnimatedIntegerPair.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGMotionSMILAttr.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "SVGMotionSMILAttr.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
// This is needed to ensure correct handling of calls to the
|
||||
|
@ -173,13 +173,13 @@ nsresult SVGElement::Init() {
|
|||
enumInfo.Reset(i);
|
||||
}
|
||||
|
||||
SVGOrient* orient = GetOrient();
|
||||
SVGAnimatedOrient* orient = GetOrient();
|
||||
|
||||
if (orient) {
|
||||
orient->Init();
|
||||
}
|
||||
|
||||
SVGViewBox* viewBox = GetViewBox();
|
||||
SVGAnimatedViewBox* viewBox = GetViewBox();
|
||||
|
||||
if (viewBox) {
|
||||
viewBox->Init();
|
||||
|
@ -408,7 +408,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGNumberPair attribute
|
||||
// Check for SVGAnimatedNumberPair attribute
|
||||
NumberPairAttributesInfo numberPairInfo = GetNumberPairInfo();
|
||||
for (i = 0; i < numberPairInfo.mNumberPairCount; i++) {
|
||||
if (aAttribute == numberPairInfo.mNumberPairInfo[i].mName) {
|
||||
|
@ -426,7 +426,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGInteger attribute
|
||||
// Check for SVGAnimatedInteger attribute
|
||||
IntegerAttributesInfo integerInfo = GetIntegerInfo();
|
||||
for (i = 0; i < integerInfo.mIntegerCount; i++) {
|
||||
if (aAttribute == integerInfo.mIntegerInfo[i].mName) {
|
||||
|
@ -444,7 +444,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGIntegerPair attribute
|
||||
// Check for SVGAnimatedIntegerPair attribute
|
||||
IntegerPairAttributesInfo integerPairInfo = GetIntegerPairInfo();
|
||||
for (i = 0; i < integerPairInfo.mIntegerPairCount; i++) {
|
||||
if (aAttribute == integerPairInfo.mIntegerPairInfo[i].mName) {
|
||||
|
@ -463,7 +463,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGBoolean attribute
|
||||
// Check for SVGAnimatedBoolean attribute
|
||||
BooleanAttributesInfo booleanInfo = GetBooleanInfo();
|
||||
for (i = 0; i < booleanInfo.mBooleanCount; i++) {
|
||||
if (aAttribute == booleanInfo.mBooleanInfo[i].mName) {
|
||||
|
@ -484,7 +484,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGEnum attribute
|
||||
// Check for SVGAnimatedEnumeration attribute
|
||||
EnumAttributesInfo enumInfo = GetEnumInfo();
|
||||
for (i = 0; i < enumInfo.mEnumCount; i++) {
|
||||
if (aAttribute == enumInfo.mEnumInfo[i].mName) {
|
||||
|
@ -532,7 +532,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
if (!foundMatch) {
|
||||
// Check for orient attribute
|
||||
if (aAttribute == nsGkAtoms::orient) {
|
||||
SVGOrient* orient = GetOrient();
|
||||
SVGAnimatedOrient* orient = GetOrient();
|
||||
if (orient) {
|
||||
rv = orient->SetBaseValueString(aValue, this, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -543,9 +543,9 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
foundMatch = true;
|
||||
}
|
||||
// Check for SVGViewBox attribute
|
||||
// Check for viewBox attribute
|
||||
} else if (aAttribute == nsGkAtoms::viewBox) {
|
||||
SVGViewBox* viewBox = GetViewBox();
|
||||
SVGAnimatedViewBox* viewBox = GetViewBox();
|
||||
if (viewBox) {
|
||||
rv = viewBox->SetBaseValueString(aValue, this, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -556,7 +556,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
foundMatch = true;
|
||||
}
|
||||
// Check for SVGAnimatedPreserveAspectRatio attribute
|
||||
// Check for preserveAspectRatio attribute
|
||||
} else if (aAttribute == nsGkAtoms::preserveAspectRatio) {
|
||||
SVGAnimatedPreserveAspectRatio* preserveAspectRatio =
|
||||
GetPreserveAspectRatio();
|
||||
|
@ -603,7 +603,7 @@ bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
if (!foundMatch) {
|
||||
// Check for SVGString attribute
|
||||
// Check for SVGAnimatedString attribute
|
||||
StringAttributesInfo stringInfo = GetStringInfo();
|
||||
for (uint32_t i = 0; i < stringInfo.mStringCount; i++) {
|
||||
if (aNamespaceID == stringInfo.mStringInfo[i].mNamespaceID &&
|
||||
|
@ -768,7 +768,7 @@ void SVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
|
|||
|
||||
// Check if this is an orient attribute going away
|
||||
if (aName == nsGkAtoms::orient) {
|
||||
SVGOrient* orient = GetOrient();
|
||||
SVGAnimatedOrient* orient = GetOrient();
|
||||
if (orient) {
|
||||
MaybeSerializeAttrBeforeRemoval(aName, aNotify);
|
||||
orient->Init();
|
||||
|
@ -778,7 +778,7 @@ void SVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
|
|||
|
||||
// Check if this is a viewBox attribute going away
|
||||
if (aName == nsGkAtoms::viewBox) {
|
||||
SVGViewBox* viewBox = GetViewBox();
|
||||
SVGAnimatedViewBox* viewBox = GetViewBox();
|
||||
if (viewBox) {
|
||||
MaybeSerializeAttrBeforeRemoval(aName, aNotify);
|
||||
viewBox->Init();
|
||||
|
@ -1885,14 +1885,14 @@ void SVGElement::DidAnimateEnum(uint8_t aAttrEnum) {
|
|||
}
|
||||
}
|
||||
|
||||
SVGOrient* SVGElement::GetOrient() { return nullptr; }
|
||||
SVGAnimatedOrient* SVGElement::GetOrient() { return nullptr; }
|
||||
|
||||
nsAttrValue SVGElement::WillChangeOrient() {
|
||||
return WillChangeValue(nsGkAtoms::orient);
|
||||
}
|
||||
|
||||
void SVGElement::DidChangeOrient(const nsAttrValue& aEmptyOrOldValue) {
|
||||
SVGOrient* orient = GetOrient();
|
||||
SVGAnimatedOrient* orient = GetOrient();
|
||||
|
||||
NS_ASSERTION(orient, "DidChangeOrient on element with no orient attrib");
|
||||
|
||||
|
@ -1911,14 +1911,14 @@ void SVGElement::DidAnimateOrient() {
|
|||
}
|
||||
}
|
||||
|
||||
SVGViewBox* SVGElement::GetViewBox() { return nullptr; }
|
||||
SVGAnimatedViewBox* SVGElement::GetViewBox() { return nullptr; }
|
||||
|
||||
nsAttrValue SVGElement::WillChangeViewBox() {
|
||||
return WillChangeValue(nsGkAtoms::viewBox);
|
||||
}
|
||||
|
||||
void SVGElement::DidChangeViewBox(const nsAttrValue& aEmptyOrOldValue) {
|
||||
SVGViewBox* viewBox = GetViewBox();
|
||||
SVGAnimatedViewBox* viewBox = GetViewBox();
|
||||
|
||||
NS_ASSERTION(viewBox, "DidChangeViewBox on element with no viewBox attrib");
|
||||
|
||||
|
@ -2222,13 +2222,13 @@ UniquePtr<SMILAttr> SVGElement::GetAnimatedAttr(int32_t aNamespaceID,
|
|||
|
||||
// orient:
|
||||
if (aName == nsGkAtoms::orient) {
|
||||
SVGOrient* orient = GetOrient();
|
||||
SVGAnimatedOrient* orient = GetOrient();
|
||||
return orient ? orient->ToSMILAttr(this) : nullptr;
|
||||
}
|
||||
|
||||
// viewBox:
|
||||
if (aName == nsGkAtoms::viewBox) {
|
||||
SVGViewBox* viewBox = GetViewBox();
|
||||
SVGAnimatedViewBox* viewBox = GetViewBox();
|
||||
return viewBox ? viewBox->ToSMILAttr(this) : nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "mozilla/SVGContentUtils.h"
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/SVGClass.h"
|
||||
#include "mozilla/dom/SVGAnimatedClass.h"
|
||||
#include "mozilla/gfx/MatrixFwd.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsChangeHint.h"
|
||||
|
@ -36,24 +36,24 @@ nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
|
|||
namespace mozilla {
|
||||
class DeclarationBlock;
|
||||
|
||||
class DOMSVGStringList;
|
||||
class SVGAnimatedBoolean;
|
||||
class SVGAnimatedEnumeration;
|
||||
class SVGAnimatedInteger;
|
||||
class SVGAnimatedIntegerPair;
|
||||
class SVGAnimatedLengthList;
|
||||
class SVGAnimatedNumberList;
|
||||
class SVGAnimatedNumberPair;
|
||||
class SVGAnimatedOrient;
|
||||
class SVGAnimatedPathSegList;
|
||||
class SVGAnimatedPointList;
|
||||
class SVGAnimatedString;
|
||||
class SVGAnimatedPreserveAspectRatio;
|
||||
class SVGAnimatedTransformList;
|
||||
class SVGAnimatedLengthList;
|
||||
class SVGBoolean;
|
||||
class SVGEnum;
|
||||
class SVGUserUnitList;
|
||||
class SVGInteger;
|
||||
class SVGIntegerPair;
|
||||
class SVGAnimatedViewBox;
|
||||
class SVGNumberList;
|
||||
class SVGNumberPair;
|
||||
class SVGOrient;
|
||||
class SVGString;
|
||||
class SVGStringList;
|
||||
class DOMSVGStringList;
|
||||
class SVGViewBox;
|
||||
class SVGUserUnitList;
|
||||
|
||||
struct SVGEnumMapping;
|
||||
|
||||
|
@ -376,11 +376,11 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct NumberPairAttributesInfo {
|
||||
SVGNumberPair* const mNumberPairs;
|
||||
SVGAnimatedNumberPair* const mNumberPairs;
|
||||
const NumberPairInfo* const mNumberPairInfo;
|
||||
const uint32_t mNumberPairCount;
|
||||
|
||||
NumberPairAttributesInfo(SVGNumberPair* aNumberPairs,
|
||||
NumberPairAttributesInfo(SVGAnimatedNumberPair* aNumberPairs,
|
||||
NumberPairInfo* aNumberPairInfo,
|
||||
uint32_t aNumberPairCount)
|
||||
: mNumberPairs(aNumberPairs),
|
||||
|
@ -396,12 +396,12 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct IntegerAttributesInfo {
|
||||
SVGInteger* const mIntegers;
|
||||
SVGAnimatedInteger* const mIntegers;
|
||||
const IntegerInfo* const mIntegerInfo;
|
||||
const uint32_t mIntegerCount;
|
||||
|
||||
IntegerAttributesInfo(SVGInteger* aIntegers, IntegerInfo* aIntegerInfo,
|
||||
uint32_t aIntegerCount)
|
||||
IntegerAttributesInfo(SVGAnimatedInteger* aIntegers,
|
||||
IntegerInfo* aIntegerInfo, uint32_t aIntegerCount)
|
||||
: mIntegers(aIntegers),
|
||||
mIntegerInfo(aIntegerInfo),
|
||||
mIntegerCount(aIntegerCount) {}
|
||||
|
@ -416,11 +416,11 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct IntegerPairAttributesInfo {
|
||||
SVGIntegerPair* const mIntegerPairs;
|
||||
SVGAnimatedIntegerPair* const mIntegerPairs;
|
||||
const IntegerPairInfo* const mIntegerPairInfo;
|
||||
const uint32_t mIntegerPairCount;
|
||||
|
||||
IntegerPairAttributesInfo(SVGIntegerPair* aIntegerPairs,
|
||||
IntegerPairAttributesInfo(SVGAnimatedIntegerPair* aIntegerPairs,
|
||||
IntegerPairInfo* aIntegerPairInfo,
|
||||
uint32_t aIntegerPairCount)
|
||||
: mIntegerPairs(aIntegerPairs),
|
||||
|
@ -436,12 +436,12 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct BooleanAttributesInfo {
|
||||
SVGBoolean* const mBooleans;
|
||||
SVGAnimatedBoolean* const mBooleans;
|
||||
const BooleanInfo* const mBooleanInfo;
|
||||
const uint32_t mBooleanCount;
|
||||
|
||||
BooleanAttributesInfo(SVGBoolean* aBooleans, BooleanInfo* aBooleanInfo,
|
||||
uint32_t aBooleanCount)
|
||||
BooleanAttributesInfo(SVGAnimatedBoolean* aBooleans,
|
||||
BooleanInfo* aBooleanInfo, uint32_t aBooleanCount)
|
||||
: mBooleans(aBooleans),
|
||||
mBooleanInfo(aBooleanInfo),
|
||||
mBooleanCount(aBooleanCount) {}
|
||||
|
@ -449,7 +449,7 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
void Reset(uint8_t aAttrEnum);
|
||||
};
|
||||
|
||||
friend class mozilla::SVGEnum;
|
||||
friend class mozilla::SVGAnimatedEnumeration;
|
||||
|
||||
struct EnumInfo {
|
||||
nsStaticAtom* const mName;
|
||||
|
@ -458,11 +458,11 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct EnumAttributesInfo {
|
||||
SVGEnum* const mEnums;
|
||||
SVGAnimatedEnumeration* const mEnums;
|
||||
const EnumInfo* const mEnumInfo;
|
||||
const uint32_t mEnumCount;
|
||||
|
||||
EnumAttributesInfo(SVGEnum* aEnums, EnumInfo* aEnumInfo,
|
||||
EnumAttributesInfo(SVGAnimatedEnumeration* aEnums, EnumInfo* aEnumInfo,
|
||||
uint32_t aEnumCount)
|
||||
: mEnums(aEnums), mEnumInfo(aEnumInfo), mEnumCount(aEnumCount) {}
|
||||
|
||||
|
@ -525,11 +525,11 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
};
|
||||
|
||||
struct StringAttributesInfo {
|
||||
SVGString* const mStrings;
|
||||
SVGAnimatedString* const mStrings;
|
||||
const StringInfo* const mStringInfo;
|
||||
const uint32_t mStringCount;
|
||||
|
||||
StringAttributesInfo(SVGString* aStrings, StringInfo* aStringInfo,
|
||||
StringAttributesInfo(SVGAnimatedString* aStrings, StringInfo* aStringInfo,
|
||||
uint32_t aStringCount)
|
||||
: mStrings(aStrings),
|
||||
mStringInfo(aStringInfo),
|
||||
|
@ -568,9 +568,9 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
virtual EnumAttributesInfo GetEnumInfo();
|
||||
// We assume all orients, viewboxes and preserveAspectRatios are alike
|
||||
// so we don't need to wrap the class
|
||||
virtual SVGOrient* GetOrient();
|
||||
virtual SVGViewBox* GetViewBox();
|
||||
virtual SVGAnimatedOrient* GetOrient();
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio();
|
||||
virtual SVGAnimatedViewBox* GetViewBox();
|
||||
virtual NumberListAttributesInfo GetNumberListInfo();
|
||||
virtual LengthListAttributesInfo GetLengthListInfo();
|
||||
virtual StringAttributesInfo GetStringInfo();
|
||||
|
@ -582,7 +582,7 @@ class SVGElement : public SVGElementBase // nsIContent
|
|||
void UnsetAttrInternal(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
bool aNotify);
|
||||
|
||||
SVGClass mClassAttribute;
|
||||
SVGAnimatedClass mClassAttribute;
|
||||
nsAutoPtr<nsAttrValue> mClassAnimAttr;
|
||||
RefPtr<mozilla::DeclarationBlock> mContentDeclarationBlock;
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGFEBlendElement_h
|
||||
#define mozilla_dom_SVGFEBlendElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEBlendElement(
|
||||
|
@ -36,7 +36,7 @@ class SVGFEBlendElement : public SVGFEBlendElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -53,12 +53,12 @@ class SVGFEBlendElement : public SVGFEBlendElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { MODE };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sModeMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
enum { RESULT, IN1, IN2 };
|
||||
SVGString mStringAttributes[3];
|
||||
SVGAnimatedString mStringAttributes[3];
|
||||
static StringInfo sStringInfo[3];
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_dom_SVGFEColorMatrixElement_h
|
||||
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEColorMatrixElement(
|
||||
|
@ -40,7 +40,7 @@ class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -58,12 +58,12 @@ class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase {
|
|||
virtual NumberListAttributesInfo GetNumberListInfo() override;
|
||||
|
||||
enum { TYPE };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sTypeMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
enum { VALUES };
|
||||
|
|
|
@ -36,7 +36,7 @@ class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -51,7 +51,7 @@ class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGFECompositeElement_h
|
||||
#define mozilla_dom_SVGFECompositeElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
|
||||
|
@ -38,7 +38,7 @@ class SVGFECompositeElement : public SVGFECompositeElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -65,12 +65,12 @@ class SVGFECompositeElement : public SVGFECompositeElementBase {
|
|||
static NumberInfo sNumberInfo[4];
|
||||
|
||||
enum { OPERATOR };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sOperatorMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
enum { RESULT, IN1, IN2 };
|
||||
SVGString mStringAttributes[3];
|
||||
SVGAnimatedString mStringAttributes[3];
|
||||
static StringInfo sStringInfo[3];
|
||||
};
|
||||
|
||||
|
|
|
@ -68,12 +68,12 @@ already_AddRefed<DOMSVGAnimatedString> SVGFEConvolveMatrixElement::In1() {
|
|||
|
||||
already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderX() {
|
||||
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
|
||||
SVGIntegerPair::eFirst, this);
|
||||
SVGAnimatedIntegerPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderY() {
|
||||
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
|
||||
SVGIntegerPair::eSecond, this);
|
||||
SVGAnimatedIntegerPair::eSecond, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumberList>
|
||||
|
@ -111,13 +111,13 @@ already_AddRefed<DOMSVGAnimatedNumber> SVGFEConvolveMatrixElement::Bias() {
|
|||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEConvolveMatrixElement::KernelUnitLengthX() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEConvolveMatrixElement::KernelUnitLengthY() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
void SVGFEConvolveMatrixElement::GetSourceImageNames(
|
||||
|
@ -135,10 +135,10 @@ FilterPrimitiveDescription SVGFEConvolveMatrixElement::GetPrimitiveDescription(
|
|||
mNumberListAttributes[KERNELMATRIX].GetAnimValue();
|
||||
uint32_t kmLength = kernelMatrix.Length();
|
||||
|
||||
int32_t orderX =
|
||||
mIntegerPairAttributes[ORDER].GetAnimValue(SVGIntegerPair::eFirst);
|
||||
int32_t orderY =
|
||||
mIntegerPairAttributes[ORDER].GetAnimValue(SVGIntegerPair::eSecond);
|
||||
int32_t orderX = mIntegerPairAttributes[ORDER].GetAnimValue(
|
||||
SVGAnimatedIntegerPair::eFirst);
|
||||
int32_t orderY = mIntegerPairAttributes[ORDER].GetAnimValue(
|
||||
SVGAnimatedIntegerPair::eSecond);
|
||||
|
||||
if (orderX <= 0 || orderY <= 0 ||
|
||||
static_cast<uint32_t>(orderX * orderY) != kmLength) {
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
#define mozilla_dom_SVGFEConvolveMatrixElement_h
|
||||
|
||||
#include "DOMSVGAnimatedNumberList.h"
|
||||
#include "SVGAnimatedBoolean.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedInteger.h"
|
||||
#include "SVGAnimatedIntegerPair.h"
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "SVGBoolean.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "SVGInteger.h"
|
||||
#include "SVGIntegerPair.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEConvolveMatrixElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -47,7 +48,7 @@ class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -83,28 +84,28 @@ class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase {
|
|||
static NumberInfo sNumberInfo[2];
|
||||
|
||||
enum { KERNEL_UNIT_LENGTH };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { TARGET_X, TARGET_Y };
|
||||
SVGInteger mIntegerAttributes[2];
|
||||
SVGAnimatedInteger mIntegerAttributes[2];
|
||||
static IntegerInfo sIntegerInfo[2];
|
||||
|
||||
enum { ORDER };
|
||||
SVGIntegerPair mIntegerPairAttributes[1];
|
||||
SVGAnimatedIntegerPair mIntegerPairAttributes[1];
|
||||
static IntegerPairInfo sIntegerPairInfo[1];
|
||||
|
||||
enum { PRESERVEALPHA };
|
||||
SVGBoolean mBooleanAttributes[1];
|
||||
SVGAnimatedBoolean mBooleanAttributes[1];
|
||||
static BooleanInfo sBooleanInfo[1];
|
||||
|
||||
enum { EDGEMODE };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sEdgeModeMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
enum { KERNELMATRIX };
|
||||
|
|
|
@ -45,13 +45,13 @@ SVGFEDiffuseLightingElement::DiffuseConstant() {
|
|||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEDiffuseLightingElement::KernelUnitLengthX() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEDiffuseLightingElement::KernelUnitLengthY() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
FilterPrimitiveDescription SVGFEDiffuseLightingElement::GetPrimitiveDescription(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGFEDisplacementMapElement_h
|
||||
#define mozilla_dom_SVGFEDisplacementMapElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEDisplacementMapElement(
|
||||
|
@ -36,7 +36,7 @@ class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -74,12 +74,12 @@ class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase {
|
|||
static NumberInfo sNumberInfo[1];
|
||||
|
||||
enum { CHANNEL_X, CHANNEL_Y };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static SVGEnumMapping sChannelMap[];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
|
||||
enum { RESULT, IN1, IN2 };
|
||||
SVGString mStringAttributes[3];
|
||||
SVGAnimatedString mStringAttributes[3];
|
||||
static StringInfo sStringInfo[3];
|
||||
};
|
||||
|
||||
|
|
|
@ -52,12 +52,12 @@ already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::Dy() {
|
|||
|
||||
already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationX() {
|
||||
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationY() {
|
||||
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
void SVGFEDropShadowElement::SetStdDeviation(float stdDeviationX,
|
||||
|
@ -72,10 +72,10 @@ FilterPrimitiveDescription SVGFEDropShadowElement::GetPrimitiveDescription(
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) {
|
||||
float stdX = aInstance->GetPrimitiveNumber(SVGContentUtils::X,
|
||||
&mNumberPairAttributes[STD_DEV],
|
||||
SVGNumberPair::eFirst);
|
||||
SVGAnimatedNumberPair::eFirst);
|
||||
float stdY = aInstance->GetPrimitiveNumber(SVGContentUtils::Y,
|
||||
&mNumberPairAttributes[STD_DEV],
|
||||
SVGNumberPair::eSecond);
|
||||
SVGAnimatedNumberPair::eSecond);
|
||||
if (stdX < 0 || stdY < 0) {
|
||||
return FilterPrimitiveDescription();
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef mozilla_dom_SVGFEDropShadowElement_h
|
||||
#define mozilla_dom_SVGFEDropShadowElement_h
|
||||
|
||||
#include "SVGFilters.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEDropShadowElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -39,7 +39,7 @@ class SVGFEDropShadowElement : public SVGFEDropShadowElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -67,11 +67,11 @@ class SVGFEDropShadowElement : public SVGFEDropShadowElementBase {
|
|||
static NumberInfo sNumberInfo[2];
|
||||
|
||||
enum { STD_DEV };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class SVGFEFloodElement : public SVGFEFloodElementBase {
|
|||
nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
|
||||
const nsTArray<bool>& aInputsAreTainted,
|
||||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ class SVGFEFloodElement : public SVGFEFloodElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { RESULT };
|
||||
SVGString mStringAttributes[1];
|
||||
SVGAnimatedString mStringAttributes[1];
|
||||
static StringInfo sStringInfo[1];
|
||||
};
|
||||
|
||||
|
|
|
@ -42,13 +42,13 @@ already_AddRefed<DOMSVGAnimatedString> SVGFEGaussianBlurElement::In1() {
|
|||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEGaussianBlurElement::StdDeviationX() {
|
||||
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFEGaussianBlurElement::StdDeviationY() {
|
||||
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
void SVGFEGaussianBlurElement::SetStdDeviation(float stdDeviationX,
|
||||
|
@ -63,10 +63,10 @@ FilterPrimitiveDescription SVGFEGaussianBlurElement::GetPrimitiveDescription(
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) {
|
||||
float stdX = aInstance->GetPrimitiveNumber(SVGContentUtils::X,
|
||||
&mNumberPairAttributes[STD_DEV],
|
||||
SVGNumberPair::eFirst);
|
||||
SVGAnimatedNumberPair::eFirst);
|
||||
float stdY = aInstance->GetPrimitiveNumber(SVGContentUtils::Y,
|
||||
&mNumberPairAttributes[STD_DEV],
|
||||
SVGNumberPair::eSecond);
|
||||
SVGAnimatedNumberPair::eSecond);
|
||||
if (stdX < 0 || stdY < 0) {
|
||||
return FilterPrimitiveDescription();
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#ifndef mozilla_dom_SVGFEGaussianBlurElement_h
|
||||
#define mozilla_dom_SVGFEGaussianBlurElement_h
|
||||
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGString.h"
|
||||
|
||||
nsresult NS_NewSVGFEGaussianBlurElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -38,7 +38,7 @@ class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -56,11 +56,11 @@ class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { STD_DEV };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class SVGFEImageElement final : public SVGFEImageElementBase,
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual bool OutputIsTainted(const nsTArray<bool>& aInputsAreTainted,
|
||||
|
@ -95,7 +95,7 @@ class SVGFEImageElement final : public SVGFEImageElementBase,
|
|||
nsIContent* AsContent() override { return this; }
|
||||
|
||||
enum { RESULT, HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[3];
|
||||
SVGAnimatedString mStringAttributes[3];
|
||||
static StringInfo sStringInfo[3];
|
||||
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
|
|
|
@ -34,7 +34,7 @@ class SVGFEMergeElement : public SVGFEMergeElementBase {
|
|||
nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
|
||||
const nsTArray<bool>& aInputsAreTainted,
|
||||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -46,7 +46,7 @@ class SVGFEMergeElement : public SVGFEMergeElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { RESULT };
|
||||
SVGString mStringAttributes[1];
|
||||
SVGAnimatedString mStringAttributes[1];
|
||||
static StringInfo sStringInfo[1];
|
||||
};
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase {
|
|||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
|
||||
const SVGString* GetIn1() { return &mStringAttributes[IN1]; }
|
||||
const SVGAnimatedString* GetIn1() { return &mStringAttributes[IN1]; }
|
||||
|
||||
// WebIDL
|
||||
already_AddRefed<DOMSVGAnimatedString> In1();
|
||||
|
@ -44,7 +44,7 @@ class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { IN1 };
|
||||
SVGString mStringAttributes[1];
|
||||
SVGAnimatedString mStringAttributes[1];
|
||||
static StringInfo sStringInfo[1];
|
||||
};
|
||||
|
||||
|
|
|
@ -53,12 +53,12 @@ already_AddRefed<DOMSVGAnimatedEnumeration> SVGFEMorphologyElement::Operator() {
|
|||
|
||||
already_AddRefed<DOMSVGAnimatedNumber> SVGFEMorphologyElement::RadiusX() {
|
||||
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber> SVGFEMorphologyElement::RadiusY() {
|
||||
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
void SVGFEMorphologyElement::SetRadius(float rx, float ry) {
|
||||
|
@ -80,11 +80,11 @@ void SVGFEMorphologyElement::GetRXY(int32_t* aRX, int32_t* aRY,
|
|||
// issues.
|
||||
*aRX = NSToIntCeil(aInstance.GetPrimitiveNumber(
|
||||
SVGContentUtils::X, &mNumberPairAttributes[RADIUS],
|
||||
SVGNumberPair::eFirst) -
|
||||
SVGAnimatedNumberPair::eFirst) -
|
||||
MORPHOLOGY_EPSILON);
|
||||
*aRY = NSToIntCeil(aInstance.GetPrimitiveNumber(
|
||||
SVGContentUtils::Y, &mNumberPairAttributes[RADIUS],
|
||||
SVGNumberPair::eSecond) -
|
||||
SVGAnimatedNumberPair::eSecond) -
|
||||
MORPHOLOGY_EPSILON);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef mozilla_dom_SVGFEMorphologyElement_h
|
||||
#define mozilla_dom_SVGFEMorphologyElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGString.h"
|
||||
|
||||
nsresult NS_NewSVGFEMorphologyElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -39,7 +39,7 @@ class SVGFEMorphologyElement : public SVGFEMorphologyElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -61,16 +61,16 @@ class SVGFEMorphologyElement : public SVGFEMorphologyElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { RADIUS };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { OPERATOR };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sOperatorMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#ifndef mozilla_dom_SVGFEOffsetElement_h
|
||||
#define mozilla_dom_SVGFEOffsetElement_h
|
||||
|
||||
#include "SVGFilters.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFEOffsetElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -38,7 +38,7 @@ class SVGFEOffsetElement : public SVGFEOffsetElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -59,7 +59,7 @@ class SVGFEOffsetElement : public SVGFEOffsetElementBase {
|
|||
static NumberInfo sNumberInfo[2];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -48,13 +48,13 @@ SVGFESpecularLightingElement::SpecularExponent() {
|
|||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFESpecularLightingElement::KernelUnitLengthX() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFESpecularLightingElement::KernelUnitLengthY() {
|
||||
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -38,7 +38,7 @@ class SVGFETileElement : public SVGFETileElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -52,7 +52,7 @@ class SVGFETileElement : public SVGFETileElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -63,13 +63,13 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
|
|||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFETurbulenceElement::BaseFrequencyX() {
|
||||
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eFirst, this);
|
||||
SVGAnimatedNumberPair::eFirst, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedNumber>
|
||||
SVGFETurbulenceElement::BaseFrequencyY() {
|
||||
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
|
||||
SVGNumberPair::eSecond, this);
|
||||
SVGAnimatedNumberPair::eSecond, this);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGAnimatedInteger> SVGFETurbulenceElement::NumOctaves() {
|
||||
|
@ -93,10 +93,10 @@ FilterPrimitiveDescription SVGFETurbulenceElement::GetPrimitiveDescription(
|
|||
nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
|
||||
const nsTArray<bool>& aInputsAreTainted,
|
||||
nsTArray<RefPtr<SourceSurface>>& aInputImages) {
|
||||
float fX =
|
||||
mNumberPairAttributes[BASE_FREQ].GetAnimValue(SVGNumberPair::eFirst);
|
||||
float fY =
|
||||
mNumberPairAttributes[BASE_FREQ].GetAnimValue(SVGNumberPair::eSecond);
|
||||
float fX = mNumberPairAttributes[BASE_FREQ].GetAnimValue(
|
||||
SVGAnimatedNumberPair::eFirst);
|
||||
float fY = mNumberPairAttributes[BASE_FREQ].GetAnimValue(
|
||||
SVGAnimatedNumberPair::eSecond);
|
||||
float seed = mNumberAttributes[OCTAVES].GetAnimValue();
|
||||
uint32_t octaves =
|
||||
clamped(mIntegerAttributes[OCTAVES].GetAnimValue(), 0, MAX_OCTAVES);
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
#ifndef mozilla_dom_SVGFETurbulenceElement_h
|
||||
#define mozilla_dom_SVGFETurbulenceElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGFilters.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedInteger.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGInteger.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGFilters.h"
|
||||
|
||||
nsresult NS_NewSVGFETurbulenceElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -42,7 +42,7 @@ class SVGFETurbulenceElement : public SVGFETurbulenceElementBase {
|
|||
nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
|
||||
|
@ -68,21 +68,21 @@ class SVGFETurbulenceElement : public SVGFETurbulenceElementBase {
|
|||
static NumberInfo sNumberInfo[1];
|
||||
|
||||
enum { BASE_FREQ };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { OCTAVES };
|
||||
SVGInteger mIntegerAttributes[1];
|
||||
SVGAnimatedInteger mIntegerAttributes[1];
|
||||
static IntegerInfo sIntegerInfo[1];
|
||||
|
||||
enum { TYPE, STITCHTILES };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static SVGEnumMapping sTypeMap[];
|
||||
static SVGEnumMapping sStitchTilesMap[];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
|
||||
enum { RESULT };
|
||||
SVGString mStringAttributes[1];
|
||||
SVGAnimatedString mStringAttributes[1];
|
||||
static StringInfo sStringInfo[1];
|
||||
};
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#ifndef mozilla_dom_SVGFilterElement_h
|
||||
#define mozilla_dom_SVGFilterElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
class nsSVGFilterFrame;
|
||||
|
@ -64,11 +64,11 @@ class SVGFilterElement : public SVGFilterElementBase {
|
|||
static LengthInfo sLengthInfo[4];
|
||||
|
||||
enum { FILTERUNITS, PRIMITIVEUNITS };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "nsSVGFilterInstance.h"
|
||||
#include "SVGNumberList.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGString.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/SVGContentUtils.h"
|
||||
|
@ -144,15 +144,15 @@ bool SVGFE::HasValidDimensions() const {
|
|||
}
|
||||
|
||||
Size SVGFE::GetKernelUnitLength(nsSVGFilterInstance* aInstance,
|
||||
SVGNumberPair* aKernelUnitLength) {
|
||||
SVGAnimatedNumberPair* aKernelUnitLength) {
|
||||
if (!aKernelUnitLength->IsExplicitlySet()) {
|
||||
return Size(1, 1);
|
||||
}
|
||||
|
||||
float kernelX = aInstance->GetPrimitiveNumber(
|
||||
SVGContentUtils::X, aKernelUnitLength, SVGNumberPair::eFirst);
|
||||
SVGContentUtils::X, aKernelUnitLength, SVGAnimatedNumberPair::eFirst);
|
||||
float kernelY = aInstance->GetPrimitiveNumber(
|
||||
SVGContentUtils::Y, aKernelUnitLength, SVGNumberPair::eSecond);
|
||||
SVGContentUtils::Y, aKernelUnitLength, SVGAnimatedNumberPair::eSecond);
|
||||
return Size(kernelX, kernelY);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "FilterSupport.h"
|
||||
#include "nsImageLoadingContent.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "SVGNumberPair.h"
|
||||
#include "SVGAnimatedNumberPair.h"
|
||||
|
||||
class nsSVGFilterInstance;
|
||||
|
||||
|
@ -22,10 +22,10 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
struct SVGStringInfo {
|
||||
SVGStringInfo(const SVGString* aString, SVGElement* aElement)
|
||||
SVGStringInfo(const SVGAnimatedString* aString, SVGElement* aElement)
|
||||
: mString(aString), mElement(aElement) {}
|
||||
|
||||
const SVGString* mString;
|
||||
const SVGAnimatedString* mString;
|
||||
SVGElement* mElement;
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ class SVGFE : public SVGFEBase {
|
|||
return !(aFlags & ~eFILTER);
|
||||
}
|
||||
|
||||
virtual SVGString& GetResultImageName() = 0;
|
||||
virtual SVGAnimatedString& GetResultImageName() = 0;
|
||||
// Return a list of all image names used as sources. Default is to
|
||||
// return no sources.
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources);
|
||||
|
@ -146,7 +146,7 @@ class SVGFE : public SVGFEBase {
|
|||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
|
||||
Size GetKernelUnitLength(nsSVGFilterInstance* aInstance,
|
||||
SVGNumberPair* aKernelUnitLength);
|
||||
SVGAnimatedNumberPair* aKernelUnitLength);
|
||||
|
||||
enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
|
||||
nsSVGLength2 mLengthAttributes[4];
|
||||
|
@ -192,7 +192,7 @@ class SVGFELightingElement : public SVGFELightingElementBase {
|
|||
|
||||
virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute) const override;
|
||||
virtual SVGString& GetResultImageName() override {
|
||||
virtual SVGAnimatedString& GetResultImageName() override {
|
||||
return mStringAttributes[RESULT];
|
||||
}
|
||||
virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
|
||||
|
@ -225,11 +225,11 @@ class SVGFELightingElement : public SVGFELightingElementBase {
|
|||
static NumberInfo sNumberInfo[4];
|
||||
|
||||
enum { KERNEL_UNIT_LENGTH };
|
||||
SVGNumberPair mNumberPairAttributes[1];
|
||||
SVGAnimatedNumberPair mNumberPairAttributes[1];
|
||||
static NumberPairInfo sNumberPairInfo[1];
|
||||
|
||||
enum { RESULT, IN1 };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#define __NS_SVGGRADIENTELEMENT_H__
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGAnimatedTransformList.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
|
@ -64,12 +64,12 @@ class SVGGradientElement : public SVGGradientElementBase {
|
|||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
|
||||
enum { GRADIENTUNITS, SPREADMETHOD };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static SVGEnumMapping sSpreadMethodMap[];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
// SVGGradientElement values
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsImageLoadingContent.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGGeometryElement.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
|
||||
|
@ -112,7 +112,7 @@ class SVGImageElement : public SVGImageElementBase,
|
|||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#define mozilla_dom_SVGMPathElement_h
|
||||
|
||||
#include "mozilla/dom/IDTracker.h"
|
||||
#include "SVGElement.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
|
||||
nsresult NS_NewSVGMPathElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
@ -110,7 +110,7 @@ class SVGMPathElement final : public SVGMPathElementBase,
|
|||
void NotifyParentOfMpathChange(nsIContent* aParent);
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
PathElementTracker mPathTracker;
|
||||
};
|
||||
|
|
|
@ -165,9 +165,9 @@ SVGElement::EnumAttributesInfo SVGMarkerElement::GetEnumInfo() {
|
|||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
SVGOrient* SVGMarkerElement::GetOrient() { return &mOrient; }
|
||||
SVGAnimatedOrient* SVGMarkerElement::GetOrient() { return &mOrient; }
|
||||
|
||||
SVGViewBox* SVGMarkerElement::GetViewBox() { return &mViewBox; }
|
||||
SVGAnimatedViewBox* SVGMarkerElement::GetViewBox() { return &mViewBox; }
|
||||
|
||||
SVGAnimatedPreserveAspectRatio* SVGMarkerElement::GetPreserveAspectRatio() {
|
||||
return &mPreserveAspectRatio;
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include "DOMSVGAnimatedAngle.h"
|
||||
#include "DOMSVGAnimatedEnumeration.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
#include "mozilla/dom/SVGMarkerElementBinding.h"
|
||||
|
@ -79,21 +79,21 @@ class SVGMarkerElement : public SVGMarkerElementBase {
|
|||
|
||||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
virtual SVGOrient* GetOrient() override;
|
||||
virtual SVGViewBox* GetViewBox() override;
|
||||
virtual SVGAnimatedOrient* GetOrient() override;
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
|
||||
virtual SVGAnimatedViewBox* GetViewBox() override;
|
||||
|
||||
enum { REFX, REFY, MARKERWIDTH, MARKERHEIGHT };
|
||||
nsSVGLength2 mLengthAttributes[4];
|
||||
static LengthInfo sLengthInfo[4];
|
||||
|
||||
enum { MARKERUNITS };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sUnitsMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
SVGOrient mOrient;
|
||||
SVGViewBox mViewBox;
|
||||
SVGAnimatedOrient mOrient;
|
||||
SVGAnimatedViewBox mViewBox;
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
|
||||
SVGViewportElement* mCoordCtx;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGMaskElement_h
|
||||
#define mozilla_dom_SVGMaskElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
|
@ -59,7 +59,7 @@ class SVGMaskElement final : public SVGMaskElementBase {
|
|||
static LengthInfo sLengthInfo[4];
|
||||
|
||||
enum { MASKUNITS, MASKCONTENTUNITS };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "mozilla/SMILParserUtils.h"
|
||||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include "SVGMotionSMILPathUtils.h"
|
||||
#include "SVGMotionSMILType.h"
|
||||
#include "SVGPathDataParser.h"
|
||||
|
@ -391,7 +391,8 @@ nsresult SVGMotionSMILAnimationFunction::SetRotate(const nsAString& aRotate,
|
|||
mRotateType = eRotateType_Explicit;
|
||||
|
||||
uint16_t angleUnit;
|
||||
if (!SVGOrient::GetValueFromString(aRotate, mRotateAngle, &angleUnit)) {
|
||||
if (!SVGAnimatedOrient::GetValueFromString(aRotate, mRotateAngle,
|
||||
&angleUnit)) {
|
||||
mRotateAngle = 0.0f; // set default rotate angle
|
||||
// XXX report to console?
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
|
@ -399,8 +400,8 @@ nsresult SVGMotionSMILAnimationFunction::SetRotate(const nsAString& aRotate,
|
|||
|
||||
// Convert to radian units, if we're not already in radians.
|
||||
if (angleUnit != SVG_ANGLETYPE_RAD) {
|
||||
mRotateAngle *= SVGOrient::GetDegreesPerUnit(angleUnit) /
|
||||
SVGOrient::GetDegreesPerUnit(SVG_ANGLETYPE_RAD);
|
||||
mRotateAngle *= SVGAnimatedOrient::GetDegreesPerUnit(angleUnit) /
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(SVG_ANGLETYPE_RAD);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "mozilla/SMILValue.h"
|
||||
#include "mozilla/dom/SVGMarkerElement.h"
|
||||
#include "nsDebug.h"
|
||||
#include "SVGOrient.h"
|
||||
#include "SVGAnimatedOrient.h"
|
||||
#include <math.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -69,17 +69,19 @@ nsresult SVGOrientSMILType::Add(SMILValue& aDest, const SMILValue& aValueToAdd,
|
|||
|
||||
// We may be dealing with two different angle units, so we normalize to
|
||||
// degrees for the add:
|
||||
float currentAngle = aDest.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aDest.mU.mOrient.mUnit);
|
||||
float currentAngle =
|
||||
aDest.mU.mOrient.mAngle *
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aDest.mU.mOrient.mUnit);
|
||||
float angleToAdd =
|
||||
aValueToAdd.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aValueToAdd.mU.mOrient.mUnit) * aCount;
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aValueToAdd.mU.mOrient.mUnit) *
|
||||
aCount;
|
||||
|
||||
// And then we give the resulting animated value the same units as the value
|
||||
// that we're animating to/by (i.e. the same as aValueToAdd):
|
||||
aDest.mU.mOrient.mAngle =
|
||||
(currentAngle + angleToAdd) /
|
||||
SVGOrient::GetDegreesPerUnit(aValueToAdd.mU.mOrient.mUnit);
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aValueToAdd.mU.mOrient.mUnit);
|
||||
aDest.mU.mOrient.mUnit = aValueToAdd.mU.mOrient.mUnit;
|
||||
|
||||
return NS_OK;
|
||||
|
@ -99,9 +101,9 @@ nsresult SVGOrientSMILType::ComputeDistance(const SMILValue& aFrom,
|
|||
|
||||
// Normalize both to degrees in case they're different angle units:
|
||||
double from = aFrom.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aFrom.mU.mOrient.mUnit);
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aFrom.mU.mOrient.mUnit);
|
||||
double to = aTo.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aTo.mU.mOrient.mUnit);
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aTo.mU.mOrient.mUnit);
|
||||
|
||||
aDistance = fabs(to - from);
|
||||
|
||||
|
@ -123,15 +125,16 @@ nsresult SVGOrientSMILType::Interpolate(const SMILValue& aStartVal,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
float start = aStartVal.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aStartVal.mU.mOrient.mUnit);
|
||||
float start =
|
||||
aStartVal.mU.mOrient.mAngle *
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aStartVal.mU.mOrient.mUnit);
|
||||
float end = aEndVal.mU.mOrient.mAngle *
|
||||
SVGOrient::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
|
||||
SVGAnimatedOrient::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
|
||||
float result = (start + (end - start) * aUnitDistance);
|
||||
|
||||
// Again, we use the unit of the to/by value for the result:
|
||||
aResult.mU.mOrient.mAngle =
|
||||
result / SVGOrient::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
|
||||
result / SVGAnimatedOrient::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
|
||||
aResult.mU.mOrient.mUnit = aEndVal.mU.mOrient.mUnit;
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -162,7 +162,7 @@ SVGElement::EnumAttributesInfo SVGPatternElement::GetEnumInfo() {
|
|||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
SVGViewBox* SVGPatternElement::GetViewBox() { return &mViewBox; }
|
||||
SVGAnimatedViewBox* SVGPatternElement::GetViewBox() { return &mViewBox; }
|
||||
|
||||
SVGAnimatedPreserveAspectRatio* SVGPatternElement::GetPreserveAspectRatio() {
|
||||
return &mPreserveAspectRatio;
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
#define mozilla_dom_SVGPatternElement_h
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGAnimatedTransformList.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "SVGAnimatedTransformList.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
class nsSVGPatternFrame;
|
||||
|
@ -72,26 +72,26 @@ class SVGPatternElement final : public SVGPatternElementBase {
|
|||
protected:
|
||||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
virtual SVGViewBox* GetViewBox() override;
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
|
||||
virtual StringAttributesInfo GetStringInfo() override;
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
|
||||
virtual SVGAnimatedViewBox* GetViewBox() override;
|
||||
|
||||
enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
|
||||
nsSVGLength2 mLengthAttributes[4];
|
||||
static LengthInfo sLengthInfo[4];
|
||||
|
||||
enum { PATTERNUNITS, PATTERNCONTENTUNITS };
|
||||
SVGEnum mEnumAttributes[2];
|
||||
SVGAnimatedEnumeration mEnumAttributes[2];
|
||||
static EnumInfo sEnumInfo[2];
|
||||
|
||||
nsAutoPtr<mozilla::SVGAnimatedTransformList> mPatternTransform;
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
// SVGFitToViewbox properties
|
||||
SVGViewBox mViewBox;
|
||||
SVGAnimatedViewBox mViewBox;
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
};
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ SVGViewElement* SVGSVGElement::GetCurrentViewElement() const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const SVGViewBox& SVGSVGElement::GetViewBoxInternal() const {
|
||||
const SVGAnimatedViewBox& SVGSVGElement::GetViewBoxInternal() const {
|
||||
SVGViewElement* viewElement = GetCurrentViewElement();
|
||||
|
||||
if (viewElement && viewElement->mViewBox.HasRect()) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_SVGSVGElement_h
|
||||
#define mozilla_dom_SVGSVGElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGViewportElement.h"
|
||||
|
||||
nsresult NS_NewSVGSVGElement(
|
||||
|
@ -33,8 +33,8 @@ class SVGView {
|
|||
public:
|
||||
SVGView();
|
||||
|
||||
mozilla::SVGEnum mZoomAndPan;
|
||||
SVGViewBox mViewBox;
|
||||
SVGAnimatedEnumeration mZoomAndPan;
|
||||
SVGAnimatedViewBox mViewBox;
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
nsAutoPtr<SVGAnimatedTransformList> mTransforms;
|
||||
};
|
||||
|
@ -219,14 +219,14 @@ class SVGSVGElement final : public SVGSVGElementBase {
|
|||
}
|
||||
virtual float GetCurrentScale() const override { return mCurrentScale; }
|
||||
|
||||
virtual const SVGViewBox& GetViewBoxInternal() const override;
|
||||
virtual const SVGAnimatedViewBox& GetViewBoxInternal() const override;
|
||||
virtual SVGAnimatedTransformList* GetTransformInternal() const override;
|
||||
|
||||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
|
||||
enum { ZOOMANDPAN };
|
||||
mozilla::SVGEnum mEnumAttributes[1];
|
||||
static mozilla::SVGEnumMapping sZoomAndPanMap[];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sZoomAndPanMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
// The time container for animations within this SVG document fragment. Set
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef mozilla_dom_SVGScriptElement_h
|
||||
#define mozilla_dom_SVGScriptElement_h
|
||||
|
||||
#include "SVGElement.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "mozilla/AlreadyAddRefed.h"
|
||||
#include "mozilla/dom/ScriptElement.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
nsresult NS_NewSVGScriptElement(
|
||||
nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
|
@ -81,7 +81,7 @@ class SVGScriptElement final : public SVGScriptElementBase,
|
|||
virtual bool GetAsyncState() override { return false; }
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -37,8 +37,10 @@ class SVGTSpanElement final : public SVGTSpanElementBase {
|
|||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
|
||||
SVGEnum mEnumAttributes[1];
|
||||
virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
virtual SVGAnimatedEnumeration* EnumAttributes() override {
|
||||
return mEnumAttributes;
|
||||
}
|
||||
|
||||
nsSVGLength2 mLengthAttributes[1];
|
||||
virtual nsSVGLength2* LengthAttributes() override {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "mozilla/dom/SVGGraphicsElement.h"
|
||||
#include "DOMSVGAnimatedEnumeration.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
|
||||
class SVGTextFrame;
|
||||
|
@ -60,7 +60,7 @@ class SVGTextContentElement : public SVGTextContentElementBase {
|
|||
GetNonLayoutDependentNumberOfChars();
|
||||
|
||||
enum { LENGTHADJUST };
|
||||
virtual SVGEnum* EnumAttributes() = 0;
|
||||
virtual SVGAnimatedEnumeration* EnumAttributes() = 0;
|
||||
static SVGEnumMapping sLengthAdjustMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
|
|
|
@ -37,8 +37,10 @@ class SVGTextElement final : public SVGTextElementBase {
|
|||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
|
||||
SVGEnum mEnumAttributes[1];
|
||||
virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
virtual SVGAnimatedEnumeration* EnumAttributes() override {
|
||||
return mEnumAttributes;
|
||||
}
|
||||
|
||||
nsSVGLength2 mLengthAttributes[1];
|
||||
virtual nsSVGLength2* LengthAttributes() override {
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef mozilla_dom_SVGTextPathElement_h
|
||||
#define mozilla_dom_SVGTextPathElement_h
|
||||
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGAnimatedPathSegList.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "mozilla/dom/SVGTextContentElement.h"
|
||||
|
||||
class nsAtom;
|
||||
|
@ -72,15 +72,17 @@ class SVGTextPathElement final : public SVGTextPathElementBase {
|
|||
static LengthInfo sLengthInfo[2];
|
||||
|
||||
enum { /* LENGTHADJUST, */ METHOD = 1, SPACING, SIDE };
|
||||
SVGEnum mEnumAttributes[4];
|
||||
virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
|
||||
SVGAnimatedEnumeration mEnumAttributes[4];
|
||||
virtual SVGAnimatedEnumeration* EnumAttributes() override {
|
||||
return mEnumAttributes;
|
||||
}
|
||||
static SVGEnumMapping sMethodMap[];
|
||||
static SVGEnumMapping sSpacingMap[];
|
||||
static SVGEnumMapping sSideMap[];
|
||||
static EnumInfo sEnumInfo[4];
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
SVGAnimatedPathSegList mPath;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGString.h"
|
||||
#include "SVGAnimatedString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsIContent;
|
||||
|
@ -144,7 +144,7 @@ class SVGUseElement final : public SVGUseElementBase,
|
|||
static LengthInfo sLengthInfo[4];
|
||||
|
||||
enum { HREF, XLINK_HREF };
|
||||
SVGString mStringAttributes[2];
|
||||
SVGAnimatedString mStringAttributes[2];
|
||||
static StringInfo sStringInfo[2];
|
||||
|
||||
RefPtr<SVGUseElement> mOriginal; // if we've been cloned, our "real" copy
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "mozilla/SMILValue.h"
|
||||
#include "nsDebug.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include <math.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -67,7 +67,7 @@ SVGElement::EnumAttributesInfo SVGViewElement::GetEnumInfo() {
|
|||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
|
||||
}
|
||||
|
||||
SVGViewBox* SVGViewElement::GetViewBox() { return &mViewBox; }
|
||||
SVGAnimatedViewBox* SVGViewElement::GetViewBox() { return &mViewBox; }
|
||||
|
||||
SVGAnimatedPreserveAspectRatio* SVGViewElement::GetPreserveAspectRatio() {
|
||||
return &mPreserveAspectRatio;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef mozilla_dom_SVGViewElement_h
|
||||
#define mozilla_dom_SVGViewElement_h
|
||||
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "SVGStringList.h"
|
||||
#include "SVGViewBox.h"
|
||||
#include "mozilla/dom/SVGElement.h"
|
||||
|
||||
class nsSVGOuterSVGFrame;
|
||||
|
@ -54,14 +54,14 @@ class SVGViewElement : public SVGViewElementBase {
|
|||
virtual EnumAttributesInfo GetEnumInfo() override;
|
||||
|
||||
enum { ZOOMANDPAN };
|
||||
SVGEnum mEnumAttributes[1];
|
||||
SVGAnimatedEnumeration mEnumAttributes[1];
|
||||
static SVGEnumMapping sZoomAndPanMap[];
|
||||
static EnumInfo sEnumInfo[1];
|
||||
|
||||
virtual SVGViewBox* GetViewBox() override;
|
||||
virtual SVGAnimatedViewBox* GetViewBox() override;
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
|
||||
|
||||
SVGViewBox mViewBox;
|
||||
SVGAnimatedViewBox mViewBox;
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
};
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ bool SVGViewportElement::HasValidDimensions() const {
|
|||
mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0));
|
||||
}
|
||||
|
||||
SVGViewBox* SVGViewportElement::GetViewBox() { return &mViewBox; }
|
||||
SVGAnimatedViewBox* SVGViewportElement::GetViewBox() { return &mViewBox; }
|
||||
|
||||
SVGAnimatedPreserveAspectRatio* SVGViewportElement::GetPreserveAspectRatio() {
|
||||
return &mPreserveAspectRatio;
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
#include "mozilla/dom/FromParser.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIContentInlines.h"
|
||||
#include "SVGAnimatedEnumeration.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "SVGEnum.h"
|
||||
#include "SVGAnimatedViewBox.h"
|
||||
#include "SVGGraphicsElement.h"
|
||||
#include "SVGImageContext.h"
|
||||
#include "nsSVGLength2.h"
|
||||
#include "nsISVGPoint.h"
|
||||
#include "SVGPreserveAspectRatio.h"
|
||||
#include "SVGViewBox.h"
|
||||
|
||||
class nsSVGOuterSVGFrame;
|
||||
class nsSVGViewportFrame;
|
||||
|
@ -126,7 +126,7 @@ class SVGViewportElement : public SVGGraphicsElement {
|
|||
// WebIDL
|
||||
already_AddRefed<SVGAnimatedRect> ViewBox();
|
||||
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
|
||||
virtual SVGViewBox* GetViewBox() override;
|
||||
virtual SVGAnimatedViewBox* GetViewBox() override;
|
||||
|
||||
protected:
|
||||
// implementation helpers:
|
||||
|
@ -178,11 +178,13 @@ class SVGViewportElement : public SVGGraphicsElement {
|
|||
|
||||
virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
|
||||
|
||||
virtual const SVGViewBox& GetViewBoxInternal() const { return mViewBox; }
|
||||
virtual const SVGAnimatedViewBox& GetViewBoxInternal() const {
|
||||
return mViewBox;
|
||||
}
|
||||
virtual SVGAnimatedTransformList* GetTransformInternal() const {
|
||||
return mTransforms;
|
||||
}
|
||||
SVGViewBox mViewBox;
|
||||
SVGAnimatedViewBox mViewBox;
|
||||
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
||||
|
||||
// The size of the rectangular SVG viewport into which we render. This is
|
||||
|
|
|
@ -19,13 +19,13 @@ EXPORTS.mozilla += [
|
|||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'SVGAElement.h',
|
||||
'SVGAnimatedClass.h',
|
||||
'SVGAnimatedRect.h',
|
||||
'SVGAnimateElement.h',
|
||||
'SVGAnimateMotionElement.h',
|
||||
'SVGAnimateTransformElement.h',
|
||||
'SVGAnimationElement.h',
|
||||
'SVGCircleElement.h',
|
||||
'SVGClass.h',
|
||||
'SVGClipPathElement.h',
|
||||
'SVGComponentTransferFunctionElement.h',
|
||||
'SVGDefsElement.h',
|
||||
|
@ -123,21 +123,28 @@ UNIFIED_SOURCES += [
|
|||
'nsSVGLength2.cpp',
|
||||
'nsSVGNumber2.cpp',
|
||||
'SVGAElement.cpp',
|
||||
'SVGAnimatedBoolean.cpp',
|
||||
'SVGAnimatedClass.cpp',
|
||||
'SVGAnimatedEnumeration.cpp',
|
||||
'SVGAnimatedInteger.cpp',
|
||||
'SVGAnimatedIntegerPair.cpp',
|
||||
'SVGAnimatedLengthList.cpp',
|
||||
'SVGAnimatedNumberList.cpp',
|
||||
'SVGAnimatedNumberPair.cpp',
|
||||
'SVGAnimatedOrient.cpp',
|
||||
'SVGAnimatedPathSegList.cpp',
|
||||
'SVGAnimatedPointList.cpp',
|
||||
'SVGAnimatedPreserveAspectRatio.cpp',
|
||||
'SVGAnimatedRect.cpp',
|
||||
'SVGAnimatedString.cpp',
|
||||
'SVGAnimatedTransformList.cpp',
|
||||
'SVGAnimatedViewBox.cpp',
|
||||
'SVGAnimateElement.cpp',
|
||||
'SVGAnimateMotionElement.cpp',
|
||||
'SVGAnimateTransformElement.cpp',
|
||||
'SVGAnimationElement.cpp',
|
||||
'SVGAttrValueWrapper.cpp',
|
||||
'SVGBoolean.cpp',
|
||||
'SVGCircleElement.cpp',
|
||||
'SVGClass.cpp',
|
||||
'SVGClipPathElement.cpp',
|
||||
'SVGContentUtils.cpp',
|
||||
'SVGDataParser.cpp',
|
||||
|
@ -147,7 +154,6 @@ UNIFIED_SOURCES += [
|
|||
'SVGElement.cpp',
|
||||
'SVGElementFactory.cpp',
|
||||
'SVGEllipseElement.cpp',
|
||||
'SVGEnum.cpp',
|
||||
'SVGFEBlendElement.cpp',
|
||||
'SVGFEColorMatrixElement.cpp',
|
||||
'SVGFEComponentTransferElement.cpp',
|
||||
|
@ -178,8 +184,6 @@ UNIFIED_SOURCES += [
|
|||
'SVGGradientElement.cpp',
|
||||
'SVGGraphicsElement.cpp',
|
||||
'SVGImageElement.cpp',
|
||||
'SVGInteger.cpp',
|
||||
'SVGIntegerPair.cpp',
|
||||
'SVGIntegerPairSMILType.cpp',
|
||||
'SVGLength.cpp',
|
||||
'SVGLengthList.cpp',
|
||||
|
@ -196,9 +200,7 @@ UNIFIED_SOURCES += [
|
|||
'SVGMPathElement.cpp',
|
||||
'SVGNumberList.cpp',
|
||||
'SVGNumberListSMILType.cpp',
|
||||
'SVGNumberPair.cpp',
|
||||
'SVGNumberPairSMILType.cpp',
|
||||
'SVGOrient.cpp',
|
||||
'SVGOrientSMILType.cpp',
|
||||
'SVGPathData.cpp',
|
||||
'SVGPathDataParser.cpp',
|
||||
|
@ -217,7 +219,6 @@ UNIFIED_SOURCES += [
|
|||
'SVGScriptElement.cpp',
|
||||
'SVGSetElement.cpp',
|
||||
'SVGStopElement.cpp',
|
||||
'SVGString.cpp',
|
||||
'SVGStringList.cpp',
|
||||
'SVGStyleElement.cpp',
|
||||
'SVGSVGElement.cpp',
|
||||
|
@ -236,7 +237,6 @@ UNIFIED_SOURCES += [
|
|||
'SVGTransformListSMILType.cpp',
|
||||
'SVGTSpanElement.cpp',
|
||||
'SVGUseElement.cpp',
|
||||
'SVGViewBox.cpp',
|
||||
'SVGViewBoxSMILType.cpp',
|
||||
'SVGViewElement.cpp',
|
||||
'SVGViewportElement.cpp',
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
for (let name of ["test", Symbol.match, Symbol.replace, Symbol.search]) {
|
||||
try {
|
||||
RegExp.prototype[name].call({});
|
||||
} catch (e) {
|
||||
let methodName = typeof name === "symbol" ? `[${name.description}]` : name;
|
||||
assertEq(e.message, `${methodName} method called on incompatible Object`);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
|
@ -11,6 +11,9 @@
|
|||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include "jsdate.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "selfhosted.out.h"
|
||||
|
@ -1962,11 +1965,22 @@ bool js::ReportIncompatibleSelfHostedMethod(JSContext* cx,
|
|||
// called function instead.
|
||||
|
||||
// Lookup the selfhosted method that was invoked. But skip over
|
||||
// IsTypedArrayEnsuringArrayBuffer frames, because those are never the
|
||||
// internal self-hosted function frames, because those are never the
|
||||
// actual self-hosted callee from external code. We can't just skip
|
||||
// self-hosted things until we find a non-self-hosted one because of cases
|
||||
// like array.sort(somethingSelfHosted), where we want to report the error
|
||||
// in the somethingSelfHosted, not in the sort() call.
|
||||
|
||||
static const char* const internalNames[] = {
|
||||
"IsTypedArrayEnsuringArrayBuffer",
|
||||
"UnwrapAndCallRegExpBuiltinExec",
|
||||
"RegExpBuiltinExec",
|
||||
"RegExpExec",
|
||||
"RegExpSearchSlowPath",
|
||||
"RegExpReplaceSlowPath",
|
||||
"RegExpMatchSlowPath",
|
||||
};
|
||||
|
||||
ScriptFrameIter iter(cx);
|
||||
MOZ_ASSERT(iter.isFunctionFrame());
|
||||
|
||||
|
@ -1979,7 +1993,9 @@ bool js::ReportIncompatibleSelfHostedMethod(JSContext* cx,
|
|||
if (!funName) {
|
||||
return false;
|
||||
}
|
||||
if (strcmp(funName, "IsTypedArrayEnsuringArrayBuffer") != 0) {
|
||||
if (std::all_of(
|
||||
std::begin(internalNames), std::end(internalNames),
|
||||
[funName](auto* name) { return strcmp(funName, name) != 0; })) {
|
||||
JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_INCOMPATIBLE_METHOD, funName, "method",
|
||||
InformalValueTypeName(args.thisv()));
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче