Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upparse_font_face_block should not reject a @font-face rule when it lacks font-family or src #16165
Labels
Milestone
Comments
|
cc @emilio |
|
I’ve commented on w3c/csswg-drafts#1133 (comment) : it looks like other implementations are treating such rules as not invalid. |
SimonSapin
added a commit
that referenced
this issue
Apr 1, 2017
Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`.
bors-servo
added a commit
that referenced
this issue
Apr 1, 2017
Make the parser accept @font-face rules without font-family or src. Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`.
SimonSapin
added a commit
that referenced
this issue
Apr 1, 2017
Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`.
bors-servo
added a commit
that referenced
this issue
Apr 1, 2017
Make the parser accept @font-face rules without font-family or src. Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16224) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Apr 1, 2017
Make the parser accept @font-face rules without font-family or src. Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16224) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Apr 3, 2017
Make the parser accept @font-face rules without font-family or src. Fix #16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16224) <!-- Reviewable:end -->
clementmiao
added a commit
to clementmiao/servo
that referenced
this issue
Apr 7, 2017
Fix servo#16165. Also, it turns out that the CSSFontFaceRule IDL specified in the css-fonts spec is not web-compatible. Instead browsers implement a .style attribute like in CSSStyleRule: w3c/csswg-drafts#825 This in turn requires preserving data about which descriptors were set or not (distinguishing unset from set to a value that happens to be the initial value), so this commit also makes every field `Option<_>`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
parse_font_face_blockcurrently rejects a@font-facerule if it lacksfont-familyorsrcdescriptor. The spec says that makes the rule invalid, but it doesn't make it clear how to handle invalid rule (see w3c/csswg-drafts#1133).All modern browsers agree on that the parser should accept such invalid rule, so I suppose the spec would follow this way as well. That said, Servo should change the behavior to match other browsers.
(This is the reason why many
@font-face-related mochitests are still failing even after bug 1345696.)cc @SimonSapin