Граф коммитов

7768 Коммитов

Автор SHA1 Сообщение Дата
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
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