gecko-dev/layout/inspector
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
..
tests Bug 1433175 - remove by hands some variations of Cc,Ci,Cu definitions, r=Standard8. 2018-02-28 18:51:34 +01:00
inDeepTreeWalker.cpp Bug 1434819 part 9. Remove nsIDOMNodeFilter. r=qdot 2018-02-01 14:26:13 -05:00
inDeepTreeWalker.h Bug 1427419 - Part 27: Remove inIDOMUtils. r=bz 2018-01-11 12:38:01 +08:00
inIDeepTreeWalker.idl Bug 1434819 part 9. Remove nsIDOMNodeFilter. r=qdot 2018-02-01 14:26:13 -05:00
inLayoutUtils.cpp Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug 2018-02-21 07:00:10 +09:00
inLayoutUtils.h Bug 1427419 - Part 21: Move content state methods from inIDOMUtils to InspectorUtils. r=bz 2018-01-11 12:38:01 +08:00
InspectorFontFace.cpp Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio 2018-04-04 08:42:10 +10:00
InspectorFontFace.h Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio 2018-04-04 08:42:10 +10:00
InspectorUtils.cpp Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio 2018-03-29 22:15:46 +11:00
InspectorUtils.h Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE 2018-03-22 20:06:24 +01:00
moz.build Bug 1436413 - Remove inDOMView as it is no longer used. r=bz 2018-02-07 15:46:30 +01:00
ServoStyleRuleMap.cpp Bug 1425759: Make Shadow DOM not use XBL anymore. r=smaug,xidorn 2018-02-27 12:39:35 +01:00
ServoStyleRuleMap.h Bug 1425759: Make Shadow DOM not use XBL anymore. r=smaug,xidorn 2018-02-27 12:39:35 +01:00