Commit Graph

11754 Commits

Author SHA1 Message Date
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
352d3ea810 Bug 1476054: Fix Servo build and unit tests build. r=me
MozReview-Commit-ID: Azyet6aYLez
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
1e1dcdda64 Bug 1476054: Fix Servo build and unit tests build. r=me
MozReview-Commit-ID: Azyet6aYLez
2018-07-16 21:38:47 +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
Cameron McCormack
81599f34a7 Bug 1473735 - Add memory reporting for MediaQueryLists. r=emilio
MozReview-Commit-ID: 87rgRtQOOyG

--HG--
extra : rebase_source : a2ba4e1ed29fd7249378f9496c2059fa26316c3c
2018-07-06 11:09:12 +10: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
0f194fedad No bug - Fix Servo unit tests. r=me
MozReview-Commit-ID: E87qwt1XHEO
2018-07-01 00:52:10 +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
562ca1ee4d No bug - Fix or remove some unit tests that are not building.
Unit tests removed have WPT equivalents.

MozReview-Commit-ID: H3EyQVMicSG
2018-06-23 20:46:14 +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