Closed Bug 1351262 Opened 6 years ago Closed 6 years ago

stylo: Unquoted font-family should be serialized without quote

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: canova, Assigned: canova)

References

Details

Attachments

(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

https://reviewboard.mozilla.org/r/124196/#review127416

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 bindings.rs should be copied over, otherwise servo CI will fail. You can find the generated bindings.rs in `<objdir>/toolkit/library/<target>/<debug or release>/build/style-<somehash>/out/gecko/bindings.rs`.

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 manishearth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c4295aaaee61
Serialize unquoted font-family without quote r=manishearth
https://hg.mozilla.org/mozilla-central/rev/c4295aaaee61
Status: NEW → RESOLVED
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.