Commit Graph

8008 Commits

Author SHA1 Message Date
Bogdan Tara
92db9979a0 Backed out changeset 72b855b514f9 (bug 1477628) for rusttests build bustages CLOSED TREE 2018-07-27 07:00:56 +03:00
Nicholas Nethercote
2475b3e62f Bug 1477628 - Convert FnvHash{Set,Map} instances to FxHash{Set,Map}. r=heycam
It doesn't appear to make much difference to performance, but it does let us
remove the `fnv` crate from the repo.
2018-07-27 09:01:15 +10:00
Emilio Cobos Álvarez
517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

Differential Revision: https://phabricator.services.mozilla.com/D2361

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Emilio Cobos Álvarez
f48df04e5b Bug 1478330: Generate StyleDisplay using cbindgen. r=heycam
We use the same setup WR uses, which is checking-in the files.

But I think it's much better than keeping the two things in sync manually :)

When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.

Differential Revision: https://phabricator.services.mozilla.com/D2354

MozReview-Commit-ID: DnXkNAzP54H
2018-07-26 17:06:05 +02:00
shindli
a007b2dc62 Backed out changeset 230ea1f373ff (bug 1478330) for Linting failure on a CLOSED TREE 2018-07-26 16:49:19 +03:00
Emilio Cobos Álvarez
42a2ddb5b9 Bug 1478330: Generate StyleDisplay using cbindgen. r=heycam
We use the same setup WR uses, which is checking-in the files.

But I think it's much better than keeping the two things in sync manually :)

When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.

Differential Revision: https://phabricator.services.mozilla.com/D2354

MozReview-Commit-ID: DnXkNAzP54H
2018-07-26 15:35:24 +02:00
Hiroyuki Ikezoe
3353a9c0e3 Bug 1365045 - Introduce nsCSSKeywordAndBoolTableEntry. r=heycam
The values in the boolean context depend on its feature.  For examples, in the
case of prefers-reduced-motion 'no-preference' means false and 'reduced' mean
true in the boolean context, whereas in the case of prefers-contrast
'no-preference' means false and other two values, 'high' and 'low' means true
in the boolean context.  To support it we introduce a child struct of
nsCSSKTableEntry that has an additional field representing the value in the
boolean context and use it when we have no specified value in the media feature
(i.e. in the boolean context).

MozReview-Commit-ID: 79HiW8l5ous
2018-07-24 16:50:47 +09:00
Emilio Cobos Álvarez
1a53242e60 Bug 1477883: Appease Servo's tidy lint. r=me
MozReview-Commit-ID: CqqndCexGKW
2018-07-24 04:03:24 +02:00
Emilio Cobos Álvarez
d2466a05c8 Bug 1477883: Fix servo build. r=me
MozReview-Commit-ID: LU5Id4244ft
2018-07-24 04:03:22 +02:00
Emilio Cobos Álvarez
d94136a13b Bug 1477883: Update itoa. r=me
Has been updated in servo for a long time, and we already have the new version
in tree.

MozReview-Commit-ID: 1yNOsqwLign
2018-07-24 04:03:21 +02:00
nupurbaghel
0db62cee2a Bug 1477883: Cherry-pick style changes from servo/servo#21181. r=emilio
MozReview-Commit-ID: FpZ0YvXEYmP
2018-07-24 04:03:20 +02:00
Bastien Orivel
29f51fc11b Bug 1477883: Update parking_lot to 0.6. r=emilio
Cherry-pick of servo/servo#21216.

MozReview-Commit-ID: 4sTKSSCbrP4
2018-07-24 04:03:18 +02:00
Coroiu Cristina
44141cfda4 Merge inbound to mozilla-central a=merge 2018-07-24 00:43:44 +03:00
Ting-Yu Lin
222d82f138 Bug 1477533 - Convert NS_STYLE_COLUMN_SPAN_* to an enum class. r=heycam
MozReview-Commit-ID: F8M1DlpBop2

--HG--
extra : rebase_source : f98d97be38c6f2a8b3cf6624db3df15389cb0123
2018-07-21 19:53:44 -07:00
Ting-Yu Lin
a6015f5b37 Bug 1477533 - Convert NS_STYLE_COLUMN_FILL_* to an enum class. r=heycam
I put Balance as the first item in StyleColumnFill because it is the default
value.

MozReview-Commit-ID: A4DVMLL6XBa

--HG--
extra : rebase_source : 8c8d07b724bcd49dd4f4057fcbf0ccd46ed591ff
2018-07-21 12:00:26 -07:00
Ting-Yu Lin
582327218e Bug 1477533 - Use static const class variable to represent column-count: auto. r=heycam
NS_STYLE_COLUMN_COUNT_UNLIMITED is unused, so I remove it.

MozReview-Commit-ID: HLHLn9ZbkUY

--HG--
extra : rebase_source : 9bf00e1db00051c4454719e205633717fabde050
2018-07-20 17:09:31 -07:00
Emilio Cobos Álvarez
0c01140e18 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 17:27:17 +02:00
Cosmin Sabou
39220f357c Backed out 2 changesets (bug 1477553) for reftest failures on xulscroll.html.
Backed out changeset a5bebad6bb23 (bug 1477553)
Backed out changeset 8d4b97056365 (bug 1477553)
2018-07-23 18:03:10 +03:00
Emilio Cobos Álvarez
e8373c682f Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 15:31:30 +02:00
Cosmin Sabou
51ed9f0129 Backed out changeset d0cb9041aa08 (bug 1477553) for browser chrome mochitest failures on /browser_parsable_css.js. 2018-07-23 13:17:09 +03:00
Emilio Cobos Álvarez
6eb98a1602 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 10:33:32 +02:00
Emilio Cobos Álvarez
ecbdd3e854 Bug 1475511: Add @-moz-document media-document(image|video|plugin). r=xidorn
MozReview-Commit-ID: CD3O1vGLAoV
2018-07-21 23:02:17 +02:00
Emilio Cobos Álvarez
5c6cb85b41 Bug 1475511: Make document condition parsing a bit nicer. r=xidorn
MozReview-Commit-ID: Gi0FxrEAYcE
2018-07-21 23:02:15 +02:00
Emilio Cobos Álvarez
5bb3038c05 Bug 1475511: UrlMatchingFunction -> DocumentMatchingFunction. r=xidorn
MozReview-Commit-ID: HLcaVmehFW7
2018-07-21 23:02:12 +02:00
Emilio Cobos Álvarez
68f214df2a Bug 1450250: Make svg:use use an actual shadow tree. r=heycam
Summary:
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in
bug 1431255.

Unfortunately not as many hacks went away as I'd have hoped, since we still need
to match document rules, see the linked SVGWG issues.

But blocks_ancestor_combinators goes away, which is nice since it's on a very
hot path.

Test Plan: WPT for style invalidation, covered by existing tests otherwise.

Reviewers: heycam

Tags: #secure-revision

Bug #: 1450250

Differential Revision: https://phabricator.services.mozilla.com/D2154

MozReview-Commit-ID: C4mthjoSNFh
2018-07-20 14:44:51 +02:00
Xidorn Quan
b787149a33 Bug 1473180 part 5 - Remove DeclarationPushMode. r=emilio
MozReview-Commit-ID: LFgYeKE1SNk

--HG--
extra : rebase_source : 45fb9604be9385734826cf998270b495f9d0088b
extra : source : 4d6292b1edd2ab39dd0002f35de46a7120283dcf
2018-07-19 10:11:04 +10:00
Xidorn Quan
c4c124a4b7 Bug 1473180 part 4 - Remove DeclarationPushMode::Update and related code. r=emilio
MozReview-Commit-ID: 1fI5YRa54lQ

--HG--
extra : rebase_source : 489bfd938d60d47f8a839db7d7c999a8b1a678ed
extra : source : 05ce3e0531dcbe9da89d1a2ae4efe629cddc73d0
2018-07-19 10:11:04 +10:00
Xidorn Quan
114fa2263a Bug 1473180 part 2 - Add new algorithm for setting property to be used in later commit. r=emilio
MozReview-Commit-ID: CdM8hDB6rFj

--HG--
extra : rebase_source : 898635ecb98a27b5b3caff4bb809b96f64e1f45d
extra : source : 0c8cbf0f371c2598d67f92d36972534cf77c5e43
2018-07-19 10:11:04 +10:00
Xidorn Quan
203b718775 Bug 1473180 part 1 - Introduce a concept of logical group. r=emilio
MozReview-Commit-ID: GXlf8JNML4N

--HG--
extra : rebase_source : e64861316080064d19fd1dbd96ce075a8c0b811e
extra : source : 8831c486a9db5137251ba15c19be5d1e7673774a
2018-07-19 10:11:04 +10:00
Emilio Cobos Álvarez
7a19e88052 Bug 1474959: Remove IS_STYLE_IF_VISITED. r=xidorn
MozReview-Commit-ID: 8rnlaMOJisA
2018-07-18 22:15:10 +02:00
Emilio Cobos Álvarez
7fb0be4298 Bug 1474959: Push visited style computation a bit further down. r=xidorn
MozReview-Commit-ID: 1DILenWIw4D
2018-07-18 22:15:09 +02:00
Emilio Cobos Álvarez
243930608d Bug 1309752: Cleanup might_need_transitions_update. r=birtles
Thought I had to update this as well, but nope. When basically any style changes
we already update transitions.

needs_transitions_update already handles the physical mapping changing by
checking whether any transition for the physical property remain there or not.

MozReview-Commit-ID: 6vKwal4yzRU
2018-07-18 12:10:19 +02:00
Emilio Cobos Álvarez
12f787b7b4 Bug 1309752: Update animations if the logical to physical property mapping changes. r=birtles
MozReview-Commit-ID: 1lbOcniojVO
2018-07-18 12:10:17 +02:00
Emilio Cobos Álvarez
9b504cb749 Bug 1309752: Animate logical properties. r=birtles
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

MozReview-Commit-ID: 9dI20N0LFrk
2018-07-18 12:10:16 +02:00
Emilio Cobos Álvarez
476d05caeb Bug 1309752: Introduce PropertyDeclaration::to_physical. r=heycam
MozReview-Commit-ID: FAL04K5G948
2018-07-18 12:10:15 +02:00
Margareta Eliza Balazs
fb3762edac Merge inbound to mozilla-central. a=merge 2018-07-18 12:33:29 +03:00
Bobby Holley
6bd85a621e Bug 1476445 - Use an acquire load for is_unique in servo_arc. r=manishearth
MozReview-Commit-ID: Dv7Rql4KUgr

Differential Revision: https://phabricator.services.mozilla.com/D2205

--HG--
extra : moz-landing-system : lando
2018-07-17 22:23:26 +00:00
Philipp Klein
0d439e200e Bug 1473804: Add doc comments to specified float and clear CSS property. r=emilio
DONTBUILD, because comment-only change.

MozReview-Commit-ID: 1Ls9NKrDlES
2018-07-17 10:31:09 +02:00
Emilio Cobos Álvarez
10c9edc486 Bug 1476054: Remove a useless cfg. r=me
MozReview-Commit-ID: HrVqhA6FiIA
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez
adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Philipp Klein
b662e473ba Bug 1476054: Move clear CSS property outside mako. r=emilio
Imports servo/servo#21156.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: CLZN4FdUvDN
2018-07-17 10:15:47 +02:00
Emilio Cobos Álvarez
bbc6f5b7f2 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-17 10:15:46 +02:00
Philipp Klein
2c17f5a8ec Bug 1476054: Move float CSS property outside mako. r=emilio
Imports servo/servo#21139.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: EoLK36GMq3d
2018-07-17 10:15:45 +02:00
Gurzau Raul
c05f725b1e Backed out 6 changesets (bug 1476054) for failing on servo/ports/geckolib/glue.rs on a CLOSED TREE
Backed out changeset f4941fe345ad (bug 1476054)
Backed out changeset cc571c618e4c (bug 1476054)
Backed out changeset 0a712d7bcb66 (bug 1476054)
Backed out changeset 62293a989ed2 (bug 1476054)
Backed out changeset ef2a43e3fc6c (bug 1476054)
Backed out changeset a2bb0089cf1d (bug 1476054)
2018-07-16 23:56:23 +03:00
Emilio Cobos Álvarez
7dd15c8788 Bug 1476054: Remove a useless cfg. r=me
MozReview-Commit-ID: HrVqhA6FiIA
2018-07-16 21:38:49 +02:00
Emilio Cobos Álvarez
9325870208 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 21:38:46 +02:00
Philipp Klein
c501db36f9 Bug 1476054: Move clear CSS property outside mako. r=emilio
Imports servo/servo#21156.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: CLZN4FdUvDN
2018-07-16 21:38:45 +02:00
Emilio Cobos Álvarez
cd116a52c4 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-16 21:38:44 +02:00
Philipp Klein
2912d63914 Bug 1476054: Move float CSS property outside mako. r=emilio
Imports servo/servo#21139.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: EoLK36GMq3d
2018-07-16 21:38:43 +02:00
Sylvestre Ledru
13b20f9b86 Bug 1468273 - autopep8 on gfx/ r=ted
MozReview-Commit-ID: 8j8EU3E08GP

--HG--
extra : rebase_source : 1f38ac0b7283505622cc95a120a0a0d4cea96803
2018-06-10 14:13:44 +02:00
Dan Glastonbury
5cb001e979 Bug 1467622 - P4: Correct background/foreground ratio mixing. r=xidorn
MozReview-Commit-ID: InAZVcH2Vkt

--HG--
extra : rebase_source : 6fde424ad8e425c393c84457425da1f9188f4cfc
2018-07-03 14:15:06 +10:00
Dan Glastonbury
c9c954a337 Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 1631a71a78b0e6fbc4842ee14e11e946a5063afa
2018-06-27 17:07:37 +10:00
Emilio Cobos Álvarez
1bee1307a0 Bug 1475220: Cleanup push_applicable_declarations. r=xidorn
This patch changes the behavior to skipping XBL rules for
getDefaultComputedStyle.

MozReview-Commit-ID: 52cwDyBAXO
2018-07-13 14:09:34 +02:00
Xidorn Quan
2c5c2a4e44 Bug 1475229 - Remove unused parent parameter in ComputedValues::new. r=emilio
MozReview-Commit-ID: EBG0TS7tI4P

--HG--
extra : source : 9e548c6bf4a2c9f7795b30ac84e2251b86fb637f
2018-07-13 22:06:05 +10:00
Cameron McCormack
441af12cbe Bug 1475191 - Measure heap allocations hanging off selector components. r=emilio
MozReview-Commit-ID: D7vZQ7v8owS

--HG--
extra : rebase_source : c94ae45bdf2d39b1fdd5ee75b964db80989fadfa
2018-07-12 19:44:00 +10:00
Xidorn Quan
adb26a8735 Bug 1461285 followup - Remove a unused line to fix a warning. 2018-07-12 14:19:16 +10:00
Brindusan Cristian
232d35f4b9 Backed out 5 changesets (bug 1467622) for reftest failures on layout/reftests/svg/smil/style/anim-css-fill-1-from-by-curcol-hex.svg. CLOSED TREE
Backed out changeset 8694fe928b04 (bug 1467622)
Backed out changeset 74533cad9479 (bug 1467622)
Backed out changeset e1dbee410e98 (bug 1467622)
Backed out changeset 56142038cc7f (bug 1467622)
Backed out changeset 90cede21bad1 (bug 1467622)
2018-07-11 09:37:26 +03:00
Dan Glastonbury
ef55fbc2dd Bug 1467622 - P4: Correct background/foreground ratio mixing. r=xidorn
MozReview-Commit-ID: InAZVcH2Vkt

--HG--
extra : rebase_source : ab691a3b6ae2398b6b1f9913ce1a5cd0918b2791
2018-07-03 14:15:06 +10:00
Dan Glastonbury
0a83cfb70f Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 879e7d644f1dc3873cdfb352fce21e3d085db55a
2018-06-27 17:07:37 +10:00
Xidorn Quan
9a1b70328e Bug 1461285 part 3 - Have the CSSOM appending behavior behind a pref and only enable it on Nightly. r=emilio
MozReview-Commit-ID: 6BzPTNjXjyA

--HG--
extra : rebase_source : a109383ea2a55949da8d2ab3346940fa1eb76055
2018-07-11 10:54:47 +10:00
Xidorn Quan
c66d8c4ca5 Bug 1461285 part 2 - Add a declaration iterator to AllShorthand for simplify code. r=emilio
MozReview-Commit-ID: 9w2B3SpdkQo

--HG--
extra : rebase_source : e6b597f19f99a927c641d9aa123c5bc0248d46d2
2018-07-11 10:52:52 +10:00
Xidorn Quan
c237e1be0d Bug 1461285 part 1 - Rename DeclarationSource to DeclarationPushMode. r=emilio
MozReview-Commit-ID: Iyv9JrXrpzl

--HG--
extra : rebase_source : d0fac58c300bdde21a0225d7793f554487f48791
2018-07-09 16:03:32 +10:00
Cameron McCormack
8d5efb0c93 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 0902aff63e0db070d2fdda3568453975f752b988
2018-07-05 12:04:58 +10:00
Boris Chiou
c8d7bee5ff Bug 1467277 - Avoid getting zero normalized vector of rotate3d for animations. r=hiro
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).
The solution is: we scale the vector, so the length becomes a finite value,
and we could get a valid unit vector. Therefore, we use
a different normalization method, robust_normalize().

MozReview-Commit-ID: L8SteFe09aO

--HG--
extra : rebase_source : 4568c8bf906a9246e4ef13672a9ed541852b974a
2018-07-05 15:41:23 -07:00
Boris Chiou
f0bf583292 Bug 1467277 - Bump euclid to 0.18 for style, style_traits, malloc_size_of, and tests. r=emilio
In order to drop old euclid version, we still need to bump euclid for
plane-split and gfx/*. However, it needs more update and is not related to
this bug, so let's do that in other place. Here, we bump euclid to
0.18.1, and update style/values/generics/transform.rs for it.

MozReview-Commit-ID: JfNAxkR8wgs

--HG--
rename : third_party/rust/euclid/.cargo-checksum.json => third_party/rust/euclid-0.17.3/.cargo-checksum.json
rename : third_party/rust/euclid/Cargo.toml => third_party/rust/euclid-0.17.3/Cargo.toml
rename : third_party/rust/euclid/src/homogen.rs => third_party/rust/euclid-0.17.3/src/homogen.rs
rename : third_party/rust/euclid/src/length.rs => third_party/rust/euclid-0.17.3/src/length.rs
rename : third_party/rust/euclid/src/lib.rs => third_party/rust/euclid-0.17.3/src/lib.rs
rename : third_party/rust/euclid/src/macros.rs => third_party/rust/euclid-0.17.3/src/macros.rs
rename : third_party/rust/euclid/src/point.rs => third_party/rust/euclid-0.17.3/src/point.rs
rename : third_party/rust/euclid/src/rect.rs => third_party/rust/euclid-0.17.3/src/rect.rs
rename : third_party/rust/euclid/src/rotation.rs => third_party/rust/euclid-0.17.3/src/rotation.rs
rename : third_party/rust/euclid/src/scale.rs => third_party/rust/euclid-0.17.3/src/scale.rs
rename : third_party/rust/euclid/src/side_offsets.rs => third_party/rust/euclid-0.17.3/src/side_offsets.rs
rename : third_party/rust/euclid/src/size.rs => third_party/rust/euclid-0.17.3/src/size.rs
rename : third_party/rust/euclid/src/transform2d.rs => third_party/rust/euclid-0.17.3/src/transform2d.rs
rename : third_party/rust/euclid/src/transform3d.rs => third_party/rust/euclid-0.17.3/src/transform3d.rs
rename : third_party/rust/euclid/src/trig.rs => third_party/rust/euclid-0.17.3/src/trig.rs
rename : third_party/rust/euclid/src/vector.rs => third_party/rust/euclid-0.17.3/src/vector.rs
extra : rebase_source : 0594429c74c7391f80b4e291cd7fe9cbddd72b33
2018-07-09 12:10:50 -07:00
Andreea Pavel
721e84c658 Backed out changeset 641b02da5961 (bug 1473450) for failing xpchsell and mochitest on a CLOSED TREE 2018-07-10 09:28:59 +03:00
Cameron McCormack
e2ce31efc1 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 8c13a67086aedad73a642b5125bbb44f48068f5d
2018-07-05 12:04:58 +10:00
Oriol Brufau
281b4c08f4 Bug 1472567 - Honor logical border colors in visited links r=emilio
MozReview-Commit-ID: IF8yvkFmPc4

--HG--
extra : rebase_source : 56d82de88c9390007a7fea5f2f8ef99292ad61d8
2018-07-05 12:56:34 +02:00
Emilio Cobos Álvarez
0d461a5f71 No bug - Trivial indentation fix. r=me
MozReview-Commit-ID: JqBxF7i0HQZ
2018-07-08 03:23:43 +02:00
Emilio Cobos Álvarez
c6c50bd593 Bug 1473779: Make writing-mode and direction non-animatable. r=heycam
Per https://github.com/w3c/csswg-drafts/issues/2751

MozReview-Commit-ID: GCG3vJWNPfC
2018-07-06 10:19:02 +02:00
Emilio Cobos Álvarez
cbec672d29 Bug 1473779: Reformat most of inherited_box.mako.rs. r=heycam
image-orientation is being changed as we speak, so I left it there to avoid
bitrot.

MozReview-Commit-ID: IwpA5HEuVU
2018-07-06 10:19:01 +02:00
Emilio Cobos Álvarez
8305165582 Bug 1473793: Other minor properties.mako.rs cleanups and improvements. r=heycam
Also, add an is_logical method, which we'll use in a bit.

MozReview-Commit-ID: Hq63wgbiRRu
2018-07-06 09:45:37 +02:00
Emilio Cobos Álvarez
2a9c99acc0 Bug 1473793: Add a clone helper that works regardless of whether the property is logical. r=heycam
MozReview-Commit-ID: 74jdo8vPOAc
2018-07-06 09:45:24 +02:00
Emilio Cobos Álvarez
d62b4d6a71 Bug 1473793: Remove dead code. r=heycam
MozReview-Commit-ID: Ifx8tjAJSAM
2018-07-06 09:44:37 +02:00
Bobby Holley
a4d6a5ba57 Bug 1431285 - Cap the number of style threads at six. r=emilio
MozReview-Commit-ID: 3qI1mIvDn8j

Differential Revision: https://phabricator.services.mozilla.com/D1928

--HG--
extra : moz-landing-system : lando
2018-07-03 23:47:48 +00:00
Emilio Cobos Álvarez
291f42059a Bug 1472552 - Reformat font.mako.rs. r=xidorn
To be consistent, use the block indentation the rest of the Rust code uses.

Differential Revision: https://phabricator.services.mozilla.com/D1906

--HG--
extra : moz-landing-system : lando
2018-07-01 23:06:17 +00:00
Emilio Cobos Álvarez
3a5427ddbd Bug 1472538: Update bindgen. r=xidorn
Surprisingly painless.

I'll update to 0.37.4 instead of .3, but that only contains
https://github.com/rust-lang-nursery/rust-bindgen/pull/1343 on top to prevent
build warnings.

MozReview-Commit-ID: H0uMtdGnXvL
2018-07-01 16:04:49 +02:00
Emilio Cobos Álvarez
84cc9de89a No bug - Appease Servo's tidy lint.
MozReview-Commit-ID: 3PxU77BJFEB
2018-07-01 01:02:43 +02:00
Emilio Cobos Álvarez
9b5901a3b4 No bug - Fix servo build.
MozReview-Commit-ID: EEuyLgAv8LR
2018-07-01 00:52:09 +02:00
Emilio Cobos Álvarez
f73f11f891 No bug - Remove stray newline. r=me
MozReview-Commit-ID: 4oTHDBjMJHp
2018-06-30 17:19:50 +02:00
Emilio Cobos Álvarez
f36a3eac08 Bug 1472443: Serialize content properties using Servo. r=xidorn
... and cleanup unused keywords / getters using the scripts in
layout/style/tools

Differential Revision: https://phabricator.services.mozilla.com/D1901

MozReview-Commit-ID: BRUGcje7X0q
2018-06-30 17:14:12 +02:00
Emilio Cobos Álvarez
fac54cd7df Bug 1472443: Make StyleContentType an enum class. r=xidorn
Most of it is automated by:

  %s/eStyleContentType_/StyleContentType::/g
  %s/nsStyleContentType/StyleContentType/g

But I removed some parentheses by hand.

Differential Revision: https://phabricator.services.mozilla.com/D1900

MozReview-Commit-ID: 3IcirjIYX5p
2018-06-30 17:13:07 +02:00
Emilio Cobos Álvarez
97cf1e0c02 Bug 1116638: Expose logical props in computed style. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1862

--HG--
extra : moz-landing-system : lando
2018-06-30 13:45:43 +00:00
Olli Pettay
2e00f64ed1 Bug 1419661, if ExtendedDOMSlots are used before slots, use FatSlots to have fewer allocations, r=mrbkap 2018-06-30 01:30:37 +03:00
Gerald Squelart
fadefb87a2 Bug 1459524 - Removed layout.css.all-shorthand.enabled pref - r=heycam
The 'all' shorthand has shipped a long time ago, so this pref is not needed
anymore.

MozReview-Commit-ID: GND8qSVAfCG

--HG--
extra : rebase_source : 10708e749911fa95554ed423a5782db61df67cd0
2018-06-28 14:51:38 +10:00
Emilio Cobos Álvarez
b6ebd48752 Bug 1454165 - Make :host() and ::slotted() account for the inner selector's specificity. r=xidorn
As resolved in https://github.com/w3c/csswg-drafts/issues/1915.

Differential Revision: https://phabricator.services.mozilla.com/D1849

--HG--
extra : moz-landing-system : lando
2018-06-28 10:58:06 +00:00
shindli
d288e9cae7 Merge inbound to mozilla-central. a=merge 2018-06-29 00:53:32 +03:00
Olli Pettay
ecc23dbcc5 Bug 1471871 - Unconditionally enable :defined in chrome (but not unconditionally enabled for querySelector), r=emilio
--HG--
extra : rebase_source : d0d559d52dd09d8f4ce5a08e33dc0680b3ed62f1
2018-06-28 15:58:11 +03:00
Olli Pettay
d87b0df953 Bug 1331334 - Implement :defined pseudo-class for custom elements, r=emilio
--HG--
extra : rebase_source : 5f95c38166d00ae07ef523ab8ecb5b4cb59eceaf
2018-06-28 14:55:45 +03:00
Emilio Cobos Álvarez
688e2c1d75 Bug 1464782: Put offset-* aliases behind a pref. r=xidorn
MozReview-Commit-ID: Hl6Muim3wVH
2018-06-27 16:12:04 +02:00
Emilio Cobos Álvarez
d73b4b0679 Bug 1464782: Rename offset-* logical properties to inset-*. r=xidorn
MozReview-Commit-ID: BW44sru99RF
2018-06-27 16:12:01 +02:00
Xidorn Quan
dca9867a8f Bug 1471114 part 2 - Generate ComputedStyleMap entry list from property data. r=emilio
This changes the order of properties returned from gCS. The old order
doesn't make much sense, and other browsers don't agree on an identical
order either, so it should be trivial to change it. Also the spec isn't
super clear / useful in this case.

Several -moz-prefixed properties are excluded from the list due to their
being internal. I suspect they are never accessible anyway, so probably
nothing gets changed by this.

MozReview-Commit-ID: 9LfangjpJ3P

--HG--
extra : source : 879a7265c35f51c5954d8a44ccd374a606ecba0e
2018-06-27 15:34:29 +10:00
Xidorn Quan
46cae3d7aa Bug 1471104 followup - Upgrade cssparser and revendor.
MozReview-Commit-ID: 74rBgkJEcYd

--HG--
extra : rebase_source : a30d17b3d7e24f1a61c01d1dc442d6ce60c1dde3
extra : source : 8ff268ee87b7392391a6b6aa981f9180c45b27b6
2018-06-27 10:43:21 +10:00
Xidorn Quan
dadd7149ea Bug 1471104 - Remove location from preludes and take it from argument. r=emilio
MozReview-Commit-ID: HeJUQvkacaf

--HG--
extra : rebase_source : b63b2949249ddb6d8e063a98bfeaa7656e6183fe
extra : source : 6f32be6912db802563ad33ae1d70756f3b3dcd8a
2018-06-27 10:42:51 +10:00
Xidorn Quan
43c1228a41 Bug 1471486 part 2 - Use RUSTFMT env in stylo build script. r=emilio
MozReview-Commit-ID: JOg0xkmG5Yx

--HG--
extra : rebase_source : a4b45da2932518a7236f9f306a0edfc145c8038e
2018-06-27 15:28:22 +10:00
Emilio Cobos Álvarez
65c63991fb Bug 1471063: Simplify selector serialization. r=xidorn
MozReview-Commit-ID: 959U7yd5W9j
2018-06-26 14:15:58 +02:00
Emilio Cobos Álvarez
fac77fa281 Bug 1471063: Deindent the serialization loop. r=xidorn
MozReview-Commit-ID: GPlUAx7YXVb
2018-06-26 14:15:57 +02:00
Emilio Cobos Álvarez
5bb17d3cf9 Bug 1471063: Remove unneeded combinator check in selector-matching. r=xidorn
The combinator doesn't change during the loop, no need to check it.

MozReview-Commit-ID: KIAt0WiEOtI
2018-06-26 14:15:56 +02:00
Margareta Eliza Balazs
c866c30fcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
Hiroyuki Ikezoe
0b9b61abdd Bug 1418806 - Try to allocate possible size for AnimationValueMap before composing. r=birtles
The EffectSet count does not exactly represent the count what we really need
for AnimationValueMap, but in most cases it matches.  For example;

1) The element has two different keyframes animations

 @keyframes anim1 {
   to { opacity: 0; }
 }
 @keyframes anim2 {
   to { transform: rotate(360deg); }
 }

 In this case the number matches.

2) The element has two animations but both keyframes have the same CSS property

 @keyframes anim1 {
   to { opacity: 0; }
 }
 @keyframes anim2 {
   to { opacity: 0.1; }
 }

 In this case the number doesn't match, moreover it results more memory than we
 ever needed, but this case is presumably less common.

3) The element has an animation having keyframes for two different CSS
   properties.

 @keyframes anim {
   from { opacity: 0; transform: rotate(360deg); }
 }

 In this kind of cases, the number doesn't match.  But even so, this patch
 reduces the opportunities that the AnimationValueMap tries to allocate a new
 memory (i.e. less opportunities on expanding the map).

Note that when the hash map is expanded, we do allocate a new RawTable with the
new size then replace the old one with the new one [1], so I believe this
change will reduce the crash rate to some extent.

[1] https://hg.mozilla.org/mozilla-central/file/15c95df467be/servo/components/hashglobe/src/hash_map.rs#l734

MozReview-Commit-ID: 6tcF9aqXh7a

--HG--
extra : rebase_source : 366989d3a2756f5a5711503a57f42f3b746d93a5
2018-06-26 11:08:24 +09:00
Hiroyuki Ikezoe
8654430e5a Bug 1418806 - Introduce a constant variable to represents the number of all animatable longhands. r=xidorn
We will use this number to cap the pre-allocation AnimationValueMap in the next
patch.

MozReview-Commit-ID: Iqq9plbD8Vl

--HG--
extra : rebase_source : 81574095942879078b8289ef52e8e42ed5fa9c3c
2018-06-26 08:51:13 +09:00
Noemi Erli
aaac9a77dd Merge inbound to mozilla-central. a=merge 2018-06-25 22:02:08 +03:00
Emilio Cobos Álvarez
ac6fbf9730 Bug 1374017: Add namespace bucket for the selector map. r=heycam
After bug 1470163 we have some nasty selectors from mathml.css in every page.

We only want to match them against MathML elements.

This patch brings the global revalidation selectors from 14 to 2 in about:blank.
Also halves the ones from XUL documents.

MozReview-Commit-ID: nOVyknNcVm
2018-06-25 10:57:21 +02:00
Emilio Cobos Álvarez
49127cd488 No bug - Appease Servo's tidy lint. r=me
MozReview-Commit-ID: WPZYZPzuCK
2018-06-23 20:46:42 +02:00
Emilio Cobos Álvarez
17f89a30db No bug - Fix servo build. r=me
MozReview-Commit-ID: 5irg82k3o6m
2018-06-23 20:46:05 +02:00
Emilio Cobos Álvarez
05d56c8f7e Bug 1470145: Better debugging for media-query related code and ua-cache. r=xidorn
MozReview-Commit-ID: 3XHAxK2BOTS
2018-06-22 02:33:44 +02:00
Emilio Cobos Álvarez
cc409b08eb Bug 1470145: Better debugging for stylesheets and URLs. r=xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-22 02:33:07 +02:00
Nicholas Nethercote
60b1f563cb Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj
This reduces memory usage because we only need one allocation instead of two
for the dynamic atom and its chars, and because we don't need to store a
refcount and a size. It precludes sharing of chars between dynamic atoms, but
we weren't benefiting much from that anyway.

This reduces per-process memory usage by up to several hundred KiB on my
Linux64 box.

One consequence of this change is that we need to allocate + copy in
DOMString::SetKnownLiveAtom(), which could make some things slower.

--HG--
extra : rebase_source : ba4065ea31e509dd985c003614199f73def0596c
2018-06-22 09:38:42 +10:00
Emilio Cobos Álvarez
f9a58d501d Bug 1470105: Fix a typo in stylesheet cloning. r=jwatt
Summary: Just something I noticed while writing unrelated code.

Reviewers: jwatt

Bug #: 1470105

Differential Revision: https://phabricator.services.mozilla.com/D1747

MozReview-Commit-ID: 7KMTT9Kmdwc
2018-06-21 15:03:50 +02:00
Emilio Cobos Álvarez
621ad1408b Bug 1469957: Move the error reporter into ParserContext. r=xidorn
Summary:
This should make it easier to report errors, and also reduce codesize.

The reason this was so generic is that error reporting was unconditionally
enabled and was super-hot, but now that's no longer the case after bug 1452143,
so we can afford the virtual call in the "error reporting enabled" case.

This opens the possibility of simplifying a lot the error setup as well, though
this patch doesn't do it.

Test Plan: No behavior change, so no new tests.

Reviewers: xidorn

Bug #: 1469957

Differential Revision: https://phabricator.services.mozilla.com/D1734

MozReview-Commit-ID: F3wTdhX9MB5
2018-06-21 09:24:07 +02:00
Cosmin Sabou
4c18cd4036 Merge inbound to central. a=merge
--HG--
rename : servo/components/style/properties/longhand/box.mako.rs => servo/components/style/properties/longhands/box.mako.rs
2018-06-21 04:16:40 +03:00
Emilio Cobos Álvarez
364acbe20e No bug - Remove some cfgs. r=me
DONTBUILD, since this is not part of the build.

MozReview-Commit-ID: 90UkG6QJWq
2018-06-20 16:36:58 +02:00
Emilio Cobos Álvarez
fadfcf9b47 Bug 1468651: followup: Fix windows build bustage. r=me CLOSED TREE
MozReview-Commit-ID: 9Xj5lMFG4Ab
2018-06-20 12:10:49 +02:00
Emilio Cobos Álvarez
868eba5610 Bug 1468651: Generate different files for different structs. r=heycam
MozReview-Commit-ID: KEDJ1zJVwMx
2018-06-20 11:26:56 +02:00
Emilio Cobos Álvarez
83365c8ff0 Bug 1468651: Make StyleStruct.name_lower snake case. r=heycam
MozReview-Commit-ID: A3TpDTmFgF
2018-06-20 11:26:55 +02:00
Emilio Cobos Álvarez
7729757e0f Bug 1468651: Rename mask.mako.rs to svg.mako.rs for consistency. r=heycam
MozReview-Commit-ID: 6sqGxL8hhA0


--HG--
rename : servo/components/style/properties/shorthands/mask.mako.rs => servo/components/style/properties/shorthands/svg.mako.rs
2018-06-20 11:26:54 +02:00
Emilio Cobos Álvarez
c13219375d Bug 1468651: Rename the properties directories from "shorthand" to "shorthands", "longhand" to "longhands". r=heycam
MozReview-Commit-ID: CY4THCC4zkX


--HG--
rename : servo/components/style/properties/longhand/background.mako.rs => servo/components/style/properties/longhands/background.mako.rs
rename : servo/components/style/properties/longhand/border.mako.rs => servo/components/style/properties/longhands/border.mako.rs
rename : servo/components/style/properties/longhand/box.mako.rs => servo/components/style/properties/longhands/box.mako.rs
rename : servo/components/style/properties/longhand/color.mako.rs => servo/components/style/properties/longhands/color.mako.rs
rename : servo/components/style/properties/longhand/column.mako.rs => servo/components/style/properties/longhands/column.mako.rs
rename : servo/components/style/properties/longhand/counters.mako.rs => servo/components/style/properties/longhands/counters.mako.rs
rename : servo/components/style/properties/longhand/effects.mako.rs => servo/components/style/properties/longhands/effects.mako.rs
rename : servo/components/style/properties/longhand/font.mako.rs => servo/components/style/properties/longhands/font.mako.rs
rename : servo/components/style/properties/longhand/inherited_box.mako.rs => servo/components/style/properties/longhands/inherited_box.mako.rs
rename : servo/components/style/properties/longhand/inherited_svg.mako.rs => servo/components/style/properties/longhands/inherited_svg.mako.rs
rename : servo/components/style/properties/longhand/inherited_table.mako.rs => servo/components/style/properties/longhands/inherited_table.mako.rs
rename : servo/components/style/properties/longhand/inherited_text.mako.rs => servo/components/style/properties/longhands/inherited_text.mako.rs
rename : servo/components/style/properties/longhand/inherited_ui.mako.rs => servo/components/style/properties/longhands/inherited_ui.mako.rs
rename : servo/components/style/properties/longhand/list.mako.rs => servo/components/style/properties/longhands/list.mako.rs
rename : servo/components/style/properties/longhand/margin.mako.rs => servo/components/style/properties/longhands/margin.mako.rs
rename : servo/components/style/properties/longhand/outline.mako.rs => servo/components/style/properties/longhands/outline.mako.rs
rename : servo/components/style/properties/longhand/padding.mako.rs => servo/components/style/properties/longhands/padding.mako.rs
rename : servo/components/style/properties/longhand/position.mako.rs => servo/components/style/properties/longhands/position.mako.rs
rename : servo/components/style/properties/longhand/svg.mako.rs => servo/components/style/properties/longhands/svg.mako.rs
rename : servo/components/style/properties/longhand/table.mako.rs => servo/components/style/properties/longhands/table.mako.rs
rename : servo/components/style/properties/longhand/text.mako.rs => servo/components/style/properties/longhands/text.mako.rs
rename : servo/components/style/properties/longhand/ui.mako.rs => servo/components/style/properties/longhands/ui.mako.rs
rename : servo/components/style/properties/longhand/xul.mako.rs => servo/components/style/properties/longhands/xul.mako.rs
rename : servo/components/style/properties/shorthand/background.mako.rs => servo/components/style/properties/shorthands/background.mako.rs
rename : servo/components/style/properties/shorthand/border.mako.rs => servo/components/style/properties/shorthands/border.mako.rs
rename : servo/components/style/properties/shorthand/box.mako.rs => servo/components/style/properties/shorthands/box.mako.rs
rename : servo/components/style/properties/shorthand/column.mako.rs => servo/components/style/properties/shorthands/column.mako.rs
rename : servo/components/style/properties/shorthand/font.mako.rs => servo/components/style/properties/shorthands/font.mako.rs
rename : servo/components/style/properties/shorthand/inherited_svg.mako.rs => servo/components/style/properties/shorthands/inherited_svg.mako.rs
rename : servo/components/style/properties/shorthand/inherited_text.mako.rs => servo/components/style/properties/shorthands/inherited_text.mako.rs
rename : servo/components/style/properties/shorthand/list.mako.rs => servo/components/style/properties/shorthands/list.mako.rs
rename : servo/components/style/properties/shorthand/margin.mako.rs => servo/components/style/properties/shorthands/margin.mako.rs
rename : servo/components/style/properties/shorthand/mask.mako.rs => servo/components/style/properties/shorthands/mask.mako.rs
rename : servo/components/style/properties/shorthand/outline.mako.rs => servo/components/style/properties/shorthands/outline.mako.rs
rename : servo/components/style/properties/shorthand/padding.mako.rs => servo/components/style/properties/shorthands/padding.mako.rs
rename : servo/components/style/properties/shorthand/position.mako.rs => servo/components/style/properties/shorthands/position.mako.rs
rename : servo/components/style/properties/shorthand/text.mako.rs => servo/components/style/properties/shorthands/text.mako.rs
2018-06-20 11:26:53 +02:00
Emilio Cobos Álvarez
d6c4f58d3f Bug 1468651: remove shorthand/serialize.mako.rs. r=heycam
MozReview-Commit-ID: 8Xyep2Q7trR
2018-06-20 11:26:52 +02:00
Emilio Cobos Álvarez
e80b8667d5 Bug 1469076: Fix the broken invariants of the rule node cache. r=heycam
We were spuriously reframing the <shadow> because it initially shared style with
the <br>, which ended up being display: none, while the <shadow> should've been
display: contents from the beginning.

lookup_by_rules seems pretty prone to obscure bugs, and also it's pretty
complex... Probably we should try to get rid of it, I'm unconvinced that it's
worth it.

Even with that, in a normal restyle the <details> wouldn't have ended up with a
style. It of course never had it before the reframe because the <shadow> was
display: none, but that doesn't mean it shouldn't have gotten one, since we
detected we needed to go through kids in:

  https://searchfox.org/mozilla-central/rev/6eea08365e7386a2b81c044e7cc8a3daa51d8754/servo/components/style/matching.rs#500

That code did happen, but since it's an animation-only restyle, we don't look at
unstyled stuff.

That looks somewhat fishy, but I guess for now it's fine as long as display
isn't animatable.

MozReview-Commit-ID: B6NMSTNOKgK
2018-06-20 11:21:35 +02:00
Xidorn Quan
846d7b5617 Bug 1463917 part 1 - Add scrollcorner to -moz-appearance so that widget can render it. r=heycam
MozReview-Commit-ID: 1Za22ifONfG

--HG--
extra : rebase_source : f68ab7acae943c633299dd422a0587b22c2ba5e9
2018-05-11 10:12:17 +10:00
Emilio Cobos Álvarez
4bdd7b8cc4 Bug 1422225: Error reporting fixes. r=xidorn
Do it so that we always try to evaluate the media expression and the modern
syntax last, so that the most specific error message comes up.

MozReview-Commit-ID: 2tqdAsWh6Kh
2018-06-25 21:19:39 +02:00
Emilio Cobos Álvarez
af1c94eafb Bug 1422225: Evaluate MediaConditions, and glue it all together. r=xidorn
MozReview-Commit-ID: 3MThE2FvfDf
2018-06-25 21:19:37 +02:00
Emilio Cobos Álvarez
c14b62df44 Bug 1422225: Add serialization code for MediaCondition. r=xidorn
MozReview-Commit-ID: AxQQottV1hG
2018-06-25 21:19:36 +02:00
Emilio Cobos Álvarez
9b7d6f0fc9 Bug 1422225: Add code to parse media conditions. r=xidorn
Still unused.

MozReview-Commit-ID: IQfxObw9BV5
2018-06-25 21:19:34 +02:00
Emilio Cobos Álvarez
ca0fd99400 Bug 1422225: Rename Expression to MediaFeatureExpression. r=xidorn
Which is more appropriate, given it represents a `<media-feature>` per spec, and
expression is a bit overloaded :)

MozReview-Commit-ID: Fed1nJhHxDu
2018-06-25 21:19:33 +02:00
Emilio Cobos Álvarez
f00fcba204 Bug 1422225: Allow parsing operators in media feature expressions. r=xidorn
The only bit from the spec which I haven't implemented to my knowledge is the
bit that allows you to swap the position of the media feature and the value,
because it unnecessarily complicates parsing (we parse the value in terms of the
feature), and I don't think it's useful given how easy it is to switch from,
e.g., `(500px > width)` to `(width <= 500px)`.

I filed https://github.com/w3c/csswg-drafts/issues/2791 about it.

MozReview-Commit-ID: 6xrdVl87S9X
2018-06-25 21:19:32 +02:00
Emilio Cobos Álvarez
8d318c9b78 Bug 1468665: Don't call the before change closure with the locked declaration block. r=xidorn
Test Plan: No behavior change.

Reviewers: xidorn

Bug #: 1468665

Differential Revision: https://phabricator.services.mozilla.com/D1681

MozReview-Commit-ID: JI18xI6aHCh
2018-06-19 12:58:29 +02:00
Emilio Cobos Álvarez
b460130119 No bug - Appease Servo's tidy check. r=me
MozReview-Commit-ID: 1vFNTQmNpCf
2018-06-18 19:41:25 +02:00
Emilio Cobos Álvarez
664ac887f5 Bug 1469244: Remove stale servo/components/{servo,nonzero} directories. r=jwatt
Summary: Looks like I missed this in bug 1464834.

Test Plan: Not part of the build, so no tests.

Reviewers: jwatt

Subscribers: heycam, xidorn

Bug #: 1469244

Differential Revision: https://phabricator.services.mozilla.com/D1679

MozReview-Commit-ID: Bx14lTv6GDD
2018-06-18 11:09:33 +02:00
Emilio Cobos Álvarez
3f4fc69310 Bug 1469228: Cherry-pick malloc_size_of_derive and style_derive changes from servo/servo#20690. r=me
MozReview-Commit-ID: 7mPuoWwjX2Z
2018-06-18 10:43:05 +02:00
Jonathan Watt
367565f0a2 Bug 1429713 part 1 - Add a -webkit-appearance alias for -moz-appearance (behind a pref). r=emilio 2018-05-25 10:44:17 -07:00
Emilio Cobos Álvarez
3b50e4d260 Bug 1468640: Relax a bit an invalid assertion. r=me
We may end up looking at a non-flushed AuthorStyles object when looking at
whether attribute changes and such may affect style.

Check the styles are clean to preserve the assertion, since if that happens
before the first flush, we may not have updated the quirks_mode field (and
that's fine).

MozReview-Commit-ID: FgVpiTf4qMr
2018-06-16 03:32:50 -07:00
Ciure Andrei
6eea08365e Merge inbound to mozilla-central. a=merge 2018-06-15 12:49:01 +03:00
Emilio Cobos Álvarez
52893b8824 No bug - Minor indentation cleanup. r=me
MozReview-Commit-ID: 7MAVnsjXx63
2018-06-14 15:10:11 -07:00
Emilio Cobos Álvarez
94e05d4d76 Bug 1468846: Move MediaQuery and friends to its own module. r=xidorn
MozReview-Commit-ID: 3FRMnIHFwR3

--HG--
extra : rebase_source : 263a7e6c87bf7f31b0f64ae6742e1ed983c9de8d
2018-06-14 13:54:07 -07:00
Emilio Cobos Álvarez
14aa8e2993 Bug 1468846: Qualifier::parse. r=xidorn
MozReview-Commit-ID: 4IOJpaS9ijI

--HG--
extra : rebase_source : b82a6421cb04008c35db4b692f532e0a7638d148
2018-06-14 13:38:47 -07:00
Emilio Cobos Álvarez
1d7ab0614a Bug 1468846: Move MediaList to its own module. r=xidorn
And move the parsing from a free function to MediaList::parse.

MozReview-Commit-ID: 75ES6I2EEOE

--HG--
extra : rebase_source : acd2be1381409371bf4f151e5b21df713e5d9660
2018-06-14 13:22:07 -07:00
Emilio Cobos Álvarez
81e22e9e14 Bug 1468846: Move media_queries module to be a directory. r=xidorn
MozReview-Commit-ID: 7H93L6f0bAl

--HG--
rename : servo/components/style/media_queries.rs => servo/components/style/media_queries/mod.rs
extra : rebase_source : f4233c93595714c08110a3f207e899542f6f8ebd
2018-06-14 13:03:59 -07:00
Emilio Cobos Álvarez
8e327bbd75 Bug 1468846: Unify some #[derive]s between Servo and Gecko. r=xidorn
MozReview-Commit-ID: FqoNCuLcdm7

--HG--
extra : rebase_source : 854bf253189023aa5945465d11d45ef24e7b0373
2018-06-14 13:00:18 -07:00
Dan Glastonbury
7a5cb13bc2 Bug 1467379 - P1: nsStyleGradientStop - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: D9KQcv9uQ4S

--HG--
extra : rebase_source : 5a9bc69455c9c752a2be6a9579185400cce149df
2018-06-07 15:55:26 +10:00
Nazım Can Altınova
57afced2fc Bug 1451289 - Part 9: Merge ServoDocumentRule and CSSMozDocumentRule r=emilio
MozReview-Commit-ID: BkMMXBWdsfz

--HG--
extra : rebase_source : e14b5907769f45bb109ed4db08b2b3b444eb9c9f
2018-06-05 17:16:51 +02:00
Gurzau Raul
4a77089b27 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-13 00:53:34 +03:00
Hiroyuki Ikezoe
7cd41518c9 Bug 1468294 - Double f64::EPSILON for calculation error. r=birtles
It's possible that both this_weight and other_weght have calculation errors
which are approximately equal to f64::EPSILON.

MozReview-Commit-ID: 8OddG9rI3qd

--HG--
extra : rebase_source : 9c22d17dcfb8efea7276864502344dc4981c358a
2018-06-13 06:42:14 +09:00
Emilio Cobos Álvarez
317c1134e0 Bug 1468269: Derive Animate for ComplexColorRatios. r=kamidphish
It'd generate the same implementation.

MozReview-Commit-ID: Afpv0sjeWdj
2018-06-12 06:44:17 -07:00
Coroiu Cristina
4b2243fe17 Merge mozilla-inbound to mozilla-central a=merge 2018-06-12 12:19:21 +03:00
Emilio Cobos Álvarez
fea940533b Bug 1468266: Fix servo build and tidy lints. r=me
MozReview-Commit-ID: G1iVniPvdJw
2018-06-11 16:45:26 -07:00
Emilio Cobos Álvarez
8a2c2f0531 Bug 1468266: Import style changes from Servo PR #20935. r=me
MozReview-Commit-ID: EDVRsfTKZUB
2018-06-11 16:44:40 -07:00
Gerald Squelart
18af7d5170 Bug 1464091 - Ignore case in media feature names inside media query expressions - r=heycam
Media feature names are converted to lower case before being processed, making
them effectively case-insensitive.
Prefixes ("min-", etc.) and values are already treated in a case-insensitive
manner.

MozReview-Commit-ID: JUeeEQEMIi4

--HG--
extra : rebase_source : 2b990be5894f5575f37fb74a2f6d532c96d15957
2018-05-31 18:22:48 +10:00
Emilio Cobos Álvarez
b55b9bd209 Bug 1416282: Add diagnostics. r=xidorn
MozReview-Commit-ID: GTnFyZnXR84

--HG--
extra : rebase_source : 0949ff8a41d57e93b9355797d86e8a98d71df2e3
2018-06-10 01:08:43 +02:00
Emilio Cobos Álvarez
3cf45a2889 Bug 1467536: Add CssPropFlags::SerializedByServo and use it on some simple properties. r=xidorn
The idea is to turn the simple properties into a blacklist instead really soon,
and fix the offending ones soon after, so that only shorthands and properties
with layout dependence (and maybe the scrollbar properties, because the poke at
LookAndFeel) are not serialized by Servo.

MozReview-Commit-ID: JTLNnmXzny8
2018-06-10 00:41:50 +02:00
Emilio Cobos Álvarez
9dbe99473f Bug 1467536: Add a Servo API to get the serialized style of a property. r=xidorn
This is intended to be used by GetComputedStyle when there's no layout
dependency.

MozReview-Commit-ID: 3GAbjo1uQ34
2018-06-10 00:38:57 +02:00
Gurzau Raul
8235ee12de Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-09 10:49:29 +03:00
Gurzau Raul
74ffb16a12 Backed out 4 changesets (bug 1467536) for permafailing on layout/style/test/test_bug418986-2.html. a=backout
Backed out changeset 4e1cee0e0a48 (bug 1467536)
Backed out changeset 697892c54d63 (bug 1467536)
Backed out changeset 13b38c2d3251 (bug 1467536)
Backed out changeset 086eaeb69efa (bug 1467536)
2018-06-09 10:45:08 +03:00
Emilio Cobos Álvarez
a9104d20df Bug 1467536: Add CssPropFlags::SerializedByServo and use it on some simple properties. r=xidorn
The idea is to turn the simple properties into a blacklist instead really soon,
and fix the offending ones soon after, so that only shorthands and properties
with layout dependence (and maybe the scrollbar properties, because the poke at
LookAndFeel) are not serialized by Servo.

MozReview-Commit-ID: JTLNnmXzny8
2018-06-08 14:18:00 +02:00
Emilio Cobos Álvarez
aaae119167 Bug 1467536: Add a Servo API to get the serialized style of a property. r=xidorn
This is intended to be used by GetComputedStyle when there's no layout
dependency.

MozReview-Commit-ID: 3GAbjo1uQ34
2018-06-08 14:17:52 +02:00
Brindusan Cristian
dd385305f3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-09 01:01:52 +03:00
Coroiu Cristina
92d50008c6 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-06-07 13:00:49 +03:00
Coroiu Cristina
d2f82e1f42 Merge inbound to mozilla-central a=merge 2018-06-07 12:47:31 +03:00
Dan Glastonbury
a7c3c83d93 Bug 1465307 - P3: Extract {animated,computed}::Color common parts. r=xidorn
Extract the common parts of `animated::Color` and `computed::Color` out
into `generics::color::Color<T>` that is generic over the type of
RGBA color.

MozReview-Commit-ID: EymSr7aqnAP

--HG--
extra : rebase_source : fb4afe83fc9ab5167ef5d9ecd55cbbb0d3ea8c1d
2018-06-05 11:49:51 +10:00
Dan Glastonbury
81d488f721 Bug 1465307 - P2: Fix nsStyleBorder::mBorderColor for GCC. r=xidorn
GCC doesn't like StyleComplexColor with constructor in an anonymous
struct in an anonymous union.  Replace the use of a union to access
`mBorder[..]Color` fields as an array with an accessor methods.

MozReview-Commit-ID: 1Wulh1qKYCZ

--HG--
extra : rebase_source : 390b8f852d144a54d9d374bcf3ae70ab6d145d50
2018-06-05 11:24:12 +10:00
Emilio Cobos Álvarez
b894d6101b Bug 1466963: Trivially simplify a condition. r=xidorn
MozReview-Commit-ID: L9LzpPt4js4
2018-06-07 11:22:28 +02:00
Emilio Cobos Álvarez
42599b6c43 Bug 1466963: Add a before-change callback to remove_property. r=xidorn
MozReview-Commit-ID: 4vyN9iLT7e3
2018-06-07 11:22:27 +02:00
Emilio Cobos Álvarez
52999b3d14 Bug 1466963: Remove unused PropertyDeclarationBlock::set_importance. r=xidorn
MozReview-Commit-ID: 1YrlOvktag9
2018-06-07 11:22:26 +02:00
Emilio Cobos Álvarez
d65524bf1a Bug 1466963: Fix a typo. r=xidorn
Nobody looks at the result from parsing, but this is the right thing to return.

MozReview-Commit-ID: 9P5VARiPIAk
2018-06-07 11:22:24 +02:00
Emilio Cobos Álvarez
c133e05b01 Bug 1466963: Inline some trivial bits. r=xidorn
MozReview-Commit-ID: A219QehiMqZ
2018-06-07 11:22:23 +02:00
Dan Glastonbury
7811112058 Bug 1465307 - P1: Extend StyleComplexColor to support additive blending. r=hiro,xidorn
Refactored StyleComplexColor to support "complex" blending between
background (numeric) color and foreground color (currentColor).
Made explicit the distinction between numeric, currentColor and a
complex blend in Gecko and Stylo.

This is to support SMIL animation, for example, of the form:

     <animate from="rgb(10,20,30)" by="currentColor" ... />

MozReview-Commit-ID: IUAK8P07gtm

--HG--
extra : rebase_source : d3648101c6f65479b21e6f02945731cd5bb57663
2018-05-23 15:23:26 +10:00
Gurzau Raul
70a6147545 Backed out changeset 9bdd12949711 (bug 1465250) for multiple failures on /css-contain/contain-paint-002.html on a CLOSED TREE 2018-06-07 06:40:03 +03:00
Yusuf Sermet
f215910786 Bug 1465250 - Make contain:paint trigger clipping independent of the overflow property. r=mattwoodrow
MozReview-Commit-ID: 2QbfZD1jnWX

--HG--
extra : rebase_source : c3a61463a25d9160adde3f04abc4b6b59bf42b6a
2018-05-30 14:28:53 -07:00
Boris Zbarsky
5978e8417a Bug 1467134. Use Atomic<bool> for the staticpref version of layout.css.font-variations.enabled. r=emilio
Atomic<bool> is implemented in terms of AtomicBase<uint32_t>, because that way
you don't need to depend on atomic 1-byte operations.  That means that the rust
bindgen sees it as a u32, not a bool.

It's a bit concerning that the rust code seems to be doing an unsynchronized
read here, but given this is a RelaxedAtomic, that's probably ok.
2018-06-06 11:34:30 -04:00
Emilio Cobos Álvarez
27fa0a2a60 Bug 1466645: Remove PropertyId::name. r=xidorn
It's only used for the error path in property parsing, so most of the time is
not useful.

Use the just-introduced NonCustomPropertyId::name to preserve the alias name,
which we were doing by passing the name around.

MozReview-Commit-ID: 46xxZKCoeBB
2018-06-06 09:47:16 +02:00
Emilio Cobos Álvarez
0b1a34a94c Bug 1466645: Make getting a property name explicitly an indexing operation. r=xidorn
The six milliseconds spent in Olli's profile make me thing this is not getting
optimized and we expected.

Also move it to NonCustomPropertyId, so it works for aliases properly too.

MozReview-Commit-ID: 4d76Z55ZBEH
2018-06-06 09:47:11 +02:00
Emilio Cobos Álvarez
1c7654b71f Bug 1466645: Avoid useless allocations in custom property name serialization. r=xidorn
And make transition-property more correct by serializing --0 unescaped instead
of escaped.

MozReview-Commit-ID: CCBSe5Frd0d
2018-06-06 09:46:37 +02:00
Emilio Cobos Álvarez
cd02cd2dc3 Bug 1466609: Make clearing atoms slightly more ergonomic. r=xidorn
I prefer to do it this way because Atom has inline paths for static atoms and
such.

MozReview-Commit-ID: CFsBHl80KDY
2018-06-06 09:44:09 +02:00
Emilio Cobos Álvarez
4678543839 Bug 1466609: Make the threadsafe refcounting macros more reusable. r=xidorn
MozReview-Commit-ID: IanxqRksGqE
2018-06-06 09:44:04 +02:00
Emilio Cobos Álvarez
e4cbb53202 Bug 1466609: Move some parsing-only attributes to use #[parse(..)] instead of #[css(..)]. r=xidorn
I need to admit I'm ambivalent about this one :).

MozReview-Commit-ID: F1jlfnQKXwo
2018-06-06 09:43:39 +02:00
Emilio Cobos Álvarez
756460b3b5 Bug 1465291: Make pseudo-elements work with :host. r=xidorn
Imported WebKit's test as a WPT.

MozReview-Commit-ID: 19ZThuoqKLW
2018-06-05 02:51:43 +02:00
Emilio Cobos Álvarez
bb628e2970 Bug 1466406: Work around a bindgen bug on Android. r=xidorn
MozReview-Commit-ID: 2lltjH7IoZu
2018-06-05 01:57:31 +02:00
Emilio Cobos Álvarez
4189579107 Bug 1466136: Don't look at the rule type from value parsing. r=hiro
This would cause properties to change the value semantics between, e.g.,
@keyframes and non-@keyframes, which would be observable.

It happens not to be observable since the animation-* and transition-*
properties are not allowed in @keyframes, nor have bits in `contain`, and none
of the two properties are allowed in @page. But I think it's the right thing to
do.

This still causes a quirk like a property value in chrome / user origins being
potentially different if the value is specified via CSS var functions. But I
think that is fine.

MozReview-Commit-ID: GhoPt0I34oO
2018-06-05 01:38:11 +02:00
Emilio Cobos Álvarez
5a290fa7e0 No bug - Sprinkle some #[inline] on methods that have inline fast-paths. r=me
MozReview-Commit-ID: 5kOmctLTAX0
2018-06-04 21:48:43 +02:00
Emilio Cobos Álvarez
4c9a1fd0dd No bug - Sprinkle some inline in methods that are just pointer-chasing or function calls. r=me
MozReview-Commit-ID: 8G2NQPBVuXn
2018-06-04 21:46:22 +02:00
Emilio Cobos Álvarez
e2aa5b98a1 Bug 1466647: Update smallbitvec to v2.1.1. r=me
Actual code changes reviewed upstream in:

  https://github.com/servo/smallbitvec/pull/12

MozReview-Commit-ID: 3vKVPMovBj
2018-06-04 21:42:55 +02:00
Emilio Cobos Álvarez
8bdd1306a8 No bug - Minor indentation cleanup. r=me
MozReview-Commit-ID: JmilaCX3rNy
2018-06-04 21:16:33 +02:00
Emilio Cobos Álvarez
b09a776796 Bug 1288572: Don't hide -moz-box / -moz-inline-box yet. r=mats
I'd really prefer to not land this patch, but...

MozReview-Commit-ID: HzmvhTd32gz
2018-06-04 15:55:59 +02:00
Emilio Cobos Álvarez
ef20196c9a Bug 1288572: Hide -moz- display values from content behind a pref. r=xidorn
MozReview-Commit-ID: HDQPub043H1
2018-06-04 15:55:58 +02:00
Emilio Cobos Álvarez
43f298bc5f Bug 1288572: Introduce css(parse_condition). r=xidorn
This will allow us to add a pref for this, and to parse it only on chrome easily.

MozReview-Commit-ID: L1rsyc2A2hu
2018-06-04 15:55:57 +02:00
Emilio Cobos Álvarez
eafd9d2074 Bug 1419695: Use custom_properties::Name in TransitionProperty. r=xidorn
MozReview-Commit-ID: BUSWrcA5hkw
2018-06-04 15:55:56 +02:00
Emilio Cobos Álvarez
591fbf3a6a Bug 1419695: Move TransitionProperty where it belongs. r=xidorn
MozReview-Commit-ID: 9PN6VfbDbLA
2018-06-04 15:55:53 +02:00
Emilio Cobos Álvarez
7e9ae6f96f Bug 1419695: Hide multiple -moz-window-* properties from content. r=xidorn
MozReview-Commit-ID: Jsqt3kqjPiq
2018-06-04 15:55:52 +02:00
Emilio Cobos Álvarez
eef329bf9f Bug 1419695: Make the transition-property code make more sense. r=xidorn
We were working around the lack of alias support during parsing in
TransitionProperty by doing a Gecko lookup. That's a hack and is now gone.

MozReview-Commit-ID: EptUvJNTrZr
2018-06-04 15:55:50 +02:00
Emilio Cobos Álvarez
29985b3f24 Bug 1449243: Remove invalid assertion. r=me
We can look at stale styles while trying to figure out if we need any
invalidation, and that's ok.

MozReview-Commit-ID: 4mBIFNm9qJv
2018-06-04 14:51:47 +02:00
Emilio Cobos Álvarez
50afa7ac48 Bug 1466008: followup: set the rule type in the custom properties code, since we use it. r=me on a CLOSED TREE
Though I think it may be slightly fishy if used in, e.g., a @keyframes block.

For our purposes right now it doesn't make a difference, I think.

MozReview-Commit-ID: A7VCTOqaIuB
2018-06-01 16:15:14 +02:00
Emilio Cobos Álvarez
5c22d25db8 Bug 1466095: Make PropertyId::parse less of a footgun. r=xidorn
MozReview-Commit-ID: 2BmtSDPmHj9
2018-06-01 14:57:08 +02:00
Emilio Cobos Álvarez
50bc098041 Bug 1466008: Make will-change honor prefs properly, and clean it up while at it. r=xidorn
Will add a test, though in JSConf right now...

MozReview-Commit-ID: JyzwaRgf5Ct
2018-06-01 14:49:59 +02:00
Nazım Can Altınova
361380987c Bug 1464496 - Part 1: Merge ServoDeclarationBlock and DeclarationBlock r=emilio
MozReview-Commit-ID: By9fV70Oq0K

--HG--
extra : rebase_source : 837afe9c33b21d7db41ff19d3aaf6cf3e9eedbdf
2018-05-30 18:15:25 +02:00
Dan Glastonbury
68881da7dd Bug 1457353 - P1: Change nscolor to StyleComplexColor. r=xidorn
Change mStopColor, mFloodColor, and mLightingColor in nsStyleSVGReset.

MozReview-Commit-ID: KMRMtHk1jNK

--HG--
extra : rebase_source : c0c12fa811d17ab6fe0a5ceb31ff32ec585314e0
2018-04-27 12:07:20 +10:00
Morgan Rae Reschenberg
0403087901 Bug 1463589 - Add contain:size and contain:content parsing functionality. r=emilio
MozReview-Commit-ID: 4fOqln3oOpC

--HG--
extra : rebase_source : 3b2ac1116ea9399a8fbbaab158e7dda5fec3930d
2018-05-30 07:49:31 -07:00
Yusuf Sermet
de248c7ca7 Bug 1465250 - Make contain:paint trigger clipping independent of the overflow property. r=mattwoodrow
MozReview-Commit-ID: 2QbfZD1jnWX

--HG--
extra : rebase_source : 3c73973bd6373889ce1d147e348e584036782d1d
2018-05-30 14:28:53 -07:00
Csoregi Natalia
f3599e000e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-30 12:28:56 +03:00
Emilio Cobos Álvarez
d7bfa8a3bb Bug 1460382: Make element-backed pseudos inherit from NAC subtree roots and other NAC inherit from their parents. r=heycam
Currently, NAC always inherits from the closest non-NAC ancestor element,
regardless of whether it is for an element-backed pseudo or not.

This patch changes the inheritance so that for element-backed pseudos, we
inherit from the closest native anonymous root's parent, and for other NAC we
inherit from the parent.

This prevents the following two issues and allows us to remove the
NODE_IS_NATIVE_ANONYMOUS flag:

 * Avoiding inheriting from the non-NAC ancestor in XBL bindings bound to NAC.

   - This is no longer a problem since we apply the rule only if we're a
     pseudo-element, and all pseudo-elements are in native anonymous subtrees.

   - This also allows to remove the hack that propagates the
     NODE_IS_NATIVE_ANONYMOUS flag from the ::cue pseudo-element from
     BindToTree.

 * Inheriting from the wrong thing if we're a nested NAC subtree.

   - We no longer look past our NAC subtree, with the exception of
     ::-moz-number-text's pseudo-elements, for which we do want to propagate
     ::placeholder to.

A few rules from forms.css have been modified because they're useless or needed
to propagate stuff to the anonymous form control in input[type="number"] which
previously inherited from the input itself.

MozReview-Commit-ID: IDKYt3EJtSH
2018-05-30 10:14:46 +02:00
Emilio Cobos Álvarez
635baff295 Bug 1465066: Cleanup transform animation. r=hiro
MozReview-Commit-ID: D9rq8CZIgf5
2018-05-30 10:11:26 +02:00