Closed Bug 1351262 Opened 6 years ago Closed 6 years ago

stylo: Unquoted font-family should be serialized without quote


(Core :: CSS Parsing and Computation, enhancement, P1)




Tracking Status
firefox55 --- fixed


(Reporter: canova, Assigned: canova)




(1 file)

family-name can be either `<string>` or `<custom-ident>+` The parsing is correct but we assume they are all strings and all `font-family` names are serializing with quotes(except generics). We should serialize string and ident font families as they are.
Priority: -- → P1
Comment on attachment 8851951 [details]
Bug 1351262 - Serialize unquoted font-family without quote

Looks good modulo one issue. Fix it, split, make a Servo PR, and r=me. Make sure that the servo bits have been removed from this patch before r=me'ing the servo side (and try to let folks in #servo know so that they can land this immediately after)

::: layout/style/ServoBindings.h:218
(Diff revision 1)
>  bool Gecko_AtomEqualsUTF8(nsIAtom* aAtom, const char* aString, uint32_t aLength);
>  bool Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom* aAtom, const char* aString, uint32_t aLength);
>  // Font style
>  void Gecko_FontFamilyList_Clear(FontFamilyList* aList);
> -void Gecko_FontFamilyList_AppendNamed(FontFamilyList* aList, nsIAtom* aName);
> +void Gecko_FontFamilyList_AppendNamed(FontFamilyList* aList, nsIAtom* aName, bool aQuoted);

The generated line in should be copied over, otherwise servo CI will fail. You can find the generated in `<objdir>/toolkit/library/<target>/<debug or release>/build/style-<somehash>/out/gecko/`.

You can also just add the bool arg manually.
Attachment #8851951 - Flags: review?(manishearth) → review+
I generally do binding update while splitting servo side changes but thanks for the heads up :) I'll do this before I push here next.
Oh, that's totally fine too, this was more of a heads up in case you PRd as is and got a test failure.
Pushed by
Serialize unquoted font-family without quote r=manishearth
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.