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
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
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
Emilio Cobos Álvarez
a17751eb93
No bug - re-use the mode_to_origin function. r=me
...
MozReview-Commit-ID: AcDR6KcrbWI
2018-06-14 10:08:37 -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