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

377 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 2a42c4ed18 Bug 1457920: Merge ServoStyleSheet and StyleSheet. r=xidorn
These are the most minimal changes I could make. More cleanups incoming.

MozReview-Commit-ID: AdMOA1acQIH
2018-05-02 04:13:10 +02:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Bobby Holley 38a23e8931 Bug 1346988 - Parse sheets on the thread pool. r=bz,r=emilio
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

MozReview-Commit-ID: KddpGFdaqEe
2018-04-18 13:52:57 -07:00
Jonathan Watt 1e7f76576a Bug 1436048 part 1 - Use a user defined type for font weight everywhere. r=jfkthame,emilio
--HG--
extra : rebase_source : 2e267ff99de6f52484e34ac15c39e5ca8b473394
2018-04-13 20:34:37 +01:00
Cameron McCormack 9e26b4d88e Bug 1375536 - Remove nsStyleVariables. r=emilio,xidorn
MozReview-Commit-ID: BqyhXc4W4Aq

--HG--
extra : rebase_source : f2e00ba1e52437a9e7041aa35e2095038812fc4d
2018-04-10 15:11:12 +10:00
Bobby Holley 5c354190dc Bug 1451421 - Stop using Gecko namespace ids in servo. r=xidorn
MozReview-Commit-ID: 2532dHCGPXW
2018-04-06 15:30:58 -07:00
Xidorn Quan d7f3530f07 Bug 1449068 part 2 - Use Servo data to back @counter-style rule. r=emilio
This patch basically does:
* Add descriptor setters and generation count to CounterStyleRule in
  Servo. (This code is mostly based on the old code inside
  nsCSSCounterStyleRule for handling mutation.)
* Use RawServoCounterStyleRule in CounterStyleManager.
* Add ServoCounterStyleRule and remove nsCSSCounterStyleRule.

Test change:
* "fixed" was parsed as and thus serialized to "fixed 1", but Servo
  doesn't do so. It preserves whether the number presents. Either way
  is probably fine.

MozReview-Commit-ID: EtKTeu32isi

--HG--
extra : rebase_source : ec44f01c581003ce4b6ef69435a05de7f3da5469
2018-04-05 08:41:28 +10:00
Xidorn Quan 67fd806b66 Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio
This patch does the following things:
* Create a new class ServoFontFaceRule for CSSOM of @font-face rule
  which mostly follows how nsCSSFontFaceRule was implemented.
* Remove the old nsCSSFontFaceRule and binding code to create it.
* Have FontFace backed by Servo data via making mRule and mDescriptors
  of the class hold RawServoFontFaceRule like ServoFontFaceRule.

To keep this patch small, it effectively just delays the conversion
from Servo data to nsCSSValue from parsing to using. This may cause
worse performance if the font set is flushed repeatedly. Supposing we
don't flush font set very frequently, it may not be a big deal.

We may still want to remove the intermediate nsCSSValue conversion at
some point, and have everything converted to their final form directly
when used, but that can happen in followups.

There are some unfortunate bits from this change:
* We lose style sheet for logging in FontFaceSet. This is probably not
  all that worse, because we wouldn't have that before either if the
  page doesn't use CSSOM to visit it. But we should figure out some
  approach to fix it anyway.
* InspectorFontFace no longer shares the same rule object as CSSOM.
  This isn't really a problem if the @font-face rule isn't very mutable.
  Unless we want to make the rule returned from InspectorFontFace to be
  mutable (i.e. via inspector), not using the same object probably isn't
  too bad.

This patch switches the code we use to serialize stuff in FontFace and
CSSFontFaceRule, which leads to some failures in tests. Specifically,
the expected changes including:
* Value of font-family now can be serialized to identifier sequence like
  font-family property. The old code always serializes it to string,
  but it doesn't seem to have different requirement than the property.
  Blink can serialize to identifier as well.
* Family name inside local() is also changed to use the same way as
  family names elsewhere (i.e. can be identifier sequence). Blink has
  the same behavior as the old code, but I don't think it's a big deal.
* The order of descriptors serialized gets changed. I don't think it
  matters at all.
* Empty string as font-family via using string syntax is no longer
  considered invalid for FontFace. I don't find it is mentioned anywhere
  that it should be specifically treated invalid.


MozReview-Commit-ID: 32Fk3Fi9uTs

--HG--
extra : rebase_source : 6221ec8fc56de357b06dd27e770fb175348a2f77
2018-04-04 08:42:10 +10:00
Xidorn Quan 0cd2404617 Bug 1449089 part 5 - Remove nsCSSPseudoClasses.{h,cpp} and nsCSSPseudoClassList.h. r=emilio
MozReview-Commit-ID: 7KYFiQ5vUxg

--HG--
extra : rebase_source : 9f3a61b3cb240d2fdf23ccc056762c169eaf42e2
2018-03-28 09:41:04 +11:00
Xidorn Quan 395e66570e Bug 1449089 part 2 - Move matching logic of :-moz-table-border-nonzero and :-moz-browser-frame into individual binding functions. r=emilio
MozReview-Commit-ID: Ic3EjtwSve0

--HG--
extra : rebase_source : 6365e8a9f727842b7c4cc3547a102d6300600e38
2018-03-28 09:41:04 +11:00
Xidorn Quan 051a0fc278 Bug 1448526 part 2 - Make nsStyleStructList.h not generated. r=emilio
nsStyleStructList.h was initially made generated in bug 873368 to avoid
manually maintaining boilerplate for if-dispatch, while the if-dispatch
was replaced by jump table in bug 1171842, so the boilerplate went away.

However, in bug 1122781 (before bug 1171842), boilerplate for dependency
check, so it still needs to be generated.

The dependency table is removed in the previous patch, so we no longer
have any boilerplate in the style struct list, and thus it doesn't need
to be generated anymore.

MozReview-Commit-ID: GkbJZ98ojbE

--HG--
extra : rebase_source : a148b97c051bb6c88846cf6ba617c4edef70ca24
extra : source : f1c7d19cde195fb90ac2627d16ed69d020de01b9
2018-03-26 20:09:17 +11:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez ba8a820351 Bug 1444507: Remove unused binding functions. r=bholley
MozReview-Commit-ID: EGceLrhKVIm

--HG--
extra : rebase_source : ce46652a15b9e7700cd2f1c5235f77439ffeb246
2018-03-09 20:10:22 +01:00
Xidorn Quan ae0176dff3 Bug 1443046 - Construct URLValue eagerly and share it between specified value and style structs. r=emilio
MozReview-Commit-ID: CxbAsRzTNYm

--HG--
extra : rebase_source : 51136b3b596fa03b0814a82485399a7dad41c458
2018-03-08 15:08:13 +11:00
Xidorn Quan f276e38c01 Bug 1375913 - Do not disable thread pool in the parent process. r=bholley
MozReview-Commit-ID: 2EMq1IdlEof

--HG--
extra : source : cca6b27458bc7ffaaf59765907bd9ef8f62ee87d
extra : intermediate-source : 22231bda44877a5a5c17b65e1c9b750118eabe5d
2018-03-07 14:30:11 +11:00
Emilio Cobos Álvarez 844c66e0c8 Bug 1442246: Copy less URLs on stylo. r=jdm
MozReview-Commit-ID: NmHue1mGDq
2018-03-03 20:37:52 +01:00
Xidorn Quan 5b522decf1 Bug 1441729 - Remove aTextIsSignificant param from nsStyleUtil::IsSignificantChild and its friends. r=emilio
MozReview-Commit-ID: CEZmAwcnglg

--HG--
extra : rebase_source : 4b5526baaf6a5fdee658ae5bdecb46e719bb2d38
2018-02-28 12:54:01 +11:00
Bobby Holley 2ba333893c Bug 1441896 - Pass an explicit parent SheetLoadData for child stylesheet loads. r=bz CLOSED TREE
MozReview-Commit-ID: 7XNu42NtITm
2018-02-28 10:09:00 +02:00
Emilio Cobos Álvarez ba08cbdbdd Bug 1438811: Remove the remaining bits of the traversal telemetry stuff. r=manishearth
MozReview-Commit-ID: 2dA5usbGQRt

--HG--
extra : rebase_source : 47cc26f581e6b774de3ac27ef47d749ad1944dfe
2018-02-16 13:14:13 +01:00
Emilio Cobos Álvarez d39c5388fc Bug 1436059: Make XBL / Shadow DOM use AuthorStyles. r=xidorn
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode
parameter because XBL sucks so bad.

MozReview-Commit-ID: 7q99tSNXo0K
2018-02-16 16:54:34 +01:00
Xidorn Quan a1e51ad3ec Bug 1435984 - patch 0 - Add binding function for setting float value to nsCSSValue. r=emilio
--HG--
extra : source : fbdfaaa58005e1dbd45d34de5a6429a7557a20f2
2018-02-14 22:02:05 +11:00
Emilio Cobos Álvarez c2f6e9ff37 Bug 1435939: Process all the MediumFeatureChanges at the same time. r=xidorn
This avoids resetting the computed values all the time, and paves the way to
avoid using a StyleSet on XBL bindings / Shadow DOM, which we should really
really do because it's super overkill.

There are some XBL bits that are kind of hacky, in particular the mStylistDirty,
but they'll go away soon, since I want to redo how we store styles in XBL.

The alternative, which was returning an array of indices or something was even
more hacky I think.

MozReview-Commit-ID: 6tEl5gebXVF
2018-02-07 15:27:56 +01:00
Emilio Cobos Álvarez beaed0f565 Bug 1435214: Optimize @keyframes rule insertions. r=xidorn,hiro
Also add some missing test for the tag name invalidations (bug 1407522) and an
empty stylesheet just for sanity.

MozReview-Commit-ID: AHwhZynLBv
2018-02-05 20:01:32 +01:00
Jonathan Kew 0d85e1fefe Bug 1435285 - Remove invalid fwd-declaration of enum without explicit base type; while we're here, also remove an obsolete comment. r=emilio 2018-02-02 15:49:10 +00:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Emilio Cobos Álvarez 437775c0ed Bug 1431421: Make GeckoElement::has_class more specialized. r=xidorn
MozReview-Commit-ID: 7LiSEamTCkX
2018-01-31 12:40:06 +01:00
Emilio Cobos Álvarez a2c0cd700d Bug 1429723: Remove -moz-border-*-colors. r=xidorn
MozReview-Commit-ID: 3P6f7rFcDa6
2018-01-22 18:14:07 +01:00
Bobby Holley 1ce8eb2531 Bug 1398119 - Add machinery to assert single-threadedness from geckolib. r=emilio
MozReview-Commit-ID: 9LBNm2h5Ct3
2018-01-12 12:05:01 -08:00
Emilio Cobos Álvarez 526d5c1370 No bug: Remove some unused functions. r=me
MozReview-Commit-ID: 3sUI1K0dIeA
2018-01-12 13:08:44 +01:00
Emilio Cobos Álvarez 1cda1ad876 Bug 1427511: Make GetFlattenedTreeParent more straight-forward. r=smaug
Now that accessing nsIContent slots is not a blob of virtual function calls, we
should be able to unify logic here, and speed up the not-so-rare case for
chrome, while keeping the usual case fast.

MozReview-Commit-ID: 87iY5Cbhx4T
2018-01-02 18:00:25 +01:00
Manish Goregaokar f87b01d03b Bug 1421195 - Add weighted telemetry probes for parallel restyles ; r=emilio
MozReview-Commit-ID: sVN7CWjgni
2017-12-12 11:30:34 -06:00
Manish Goregaokar b92ab8df04 Bug 1421195 - Add telemetry probe for fraction of restyles that are parallel ; r=emilio
MozReview-Commit-ID: sVN7CWjgni
2017-12-12 11:30:24 -06:00
Xidorn Quan 60d327216d Bug 1267890 part 1 - Add @supports -moz-bool-pref() support for stylo. r=emilio
MozReview-Commit-ID: C9Pq2zLLaGp

--HG--
extra : source : b7c8a25d84695de47acda8065b21c0a96759f87b
2017-12-08 20:03:34 -06:00
Emilio Cobos Álvarez 360e05f6eb Bug 1422641: Inline Gecko_GetSMILOverrideDeclarationBlock. r=Manishearth,xidorn
MozReview-Commit-ID: E8cM7zRZHn1
2017-12-05 14:20:26 +01:00
Emilio Cobos Álvarez 0deac30454 Bug 1422636: Inline Gecko_Namespace. r=xidorn
MozReview-Commit-ID: FFdmaYCDxnv
2017-12-05 14:20:18 +01:00
Emilio Cobos Álvarez 08252773dc Bug 1422633: Inline the Rust bits of GetDocumentState too. r=xidorn
MozReview-Commit-ID: 9zvZF72ljS
2017-12-05 14:20:11 +01:00
Ting-Yu Lin 80fee1a237 Bug 1418224 Part 3 - Add shape-outside: <image> support to style system. r=heycam
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.

MozReview-Commit-ID: GuxAeCTz0xx

--HG--
extra : rebase_source : 2342085d13a50535836be46d75a731641d0fc49e
2017-11-17 16:34:37 +08:00
dluca 627438bf3c Backed out 4 changesets (bug 1418224) for build bustages r=backout on a CLOSED TREE
Backed out changeset 3ef8715cb8d7 (bug 1418224)
Backed out changeset 0d58d9fed90d (bug 1418224)
Backed out changeset faad7f275749 (bug 1418224)
Backed out changeset 1e86ff6b95ae (bug 1418224)
2017-11-27 07:42:50 +02:00
Ting-Yu Lin 0a432576a1 Bug 1418224 Part 3 - Add shape-outside: <image> support to style system. r=heycam
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.

MozReview-Commit-ID: GuxAeCTz0xx

--HG--
extra : rebase_source : 97c8b3900e4492ac03158a38aa03f7c044b71e0f
2017-11-17 16:34:37 +08:00
Cameron McCormack 630cd9c74f Bug 1418899 - Part 3: Use a single image layer array filling function. r=cjku
We were accidentally using the background one for the mask layers list anyway,
and I don't think the overhead of filling the arrays for the two properties
mask layers don't use is a problem.

MozReview-Commit-ID: 7LDiYGrnUd5

--HG--
extra : rebase_source : 573d70e0e8c4d110ca6da2846e6fd2887b1fded2
2017-11-20 13:44:22 +08:00
Cameron McCormack 99c87da38a Bug 1418217 - Move visited links pref to StylePrefs. r=TYLin
On a CLOSED TREE to fix Servo bustage.

MozReview-Commit-ID: HLukaX0EFFv
2017-11-17 14:08:22 +01:00
Emilio Cobos Álvarez 79635409a0 Bug 1410624: Add a Document::elements_with_id API. r=xidorn
MozReview-Commit-ID: BNtbJp0RI68
2017-11-04 12:36:22 +01:00
Emilio Cobos Álvarez 2d5df88155 Bug 1410624: Add some declarations and bindings so the build isn't busted when servo-vcs-sync goes back alive. r=me,heycam
https://github.com/servo/servo/pull/18988 has merged a while ago in servo, but
since the sync service is down, I haven't been able to land the relevant patches
today.

This at least ensures that the build isn't busted when servo-vcs-sync goes back
up.

MozReview-Commit-ID: 9ohgwcnMc5T
2017-10-23 22:46:02 +02:00
Xidorn Quan e175680895 Bug 1397644 part 1 - Implement XUL tree pseudo style resolution for stylo. r=emilio
MozReview-Commit-ID: 5JqvLv3tt5m

--HG--
extra : source : 23a7db4b7938b095947abeb41edb0cb6375f95da
2017-10-20 21:31:13 +11:00
Bobby Holley 7c241c0f84 Bug 1407080 - Add an API to annotate crash reports from stylo. r=Manishearth
MozReview-Commit-ID: KuD4SbVrdYH
2017-10-10 13:30:57 -07:00
Hiroyuki Ikezoe 5e34bc1f57 Bug 1329169 - Use atom for animation-name property. r=xidorn
MozReview-Commit-ID: 9yVWXVi1oXf

--HG--
extra : rebase_source : f0d8a731c3e6caaf248a0b0e25ef96370af3ecd8
2017-10-10 17:00:28 +09:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Bobby Holley a519863205 Bug 1406220 - Add canary and journaling. r=Manishearth,r=dmajor
MozReview-Commit-ID: 582ZiTmcvgs
2017-10-07 12:35:24 -07:00