Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_font_face_block should not reject a @font-face rule when it lacks font-family or src #16165

Closed
upsuper opened this issue Mar 28, 2017 · 2 comments

Comments

@upsuper
Copy link
Member

@upsuper upsuper commented Mar 28, 2017

parse_font_face_block currently rejects a @font-face rule if it lacks font-family or src descriptor. 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

@highfive
Copy link

@highfive highfive commented Mar 28, 2017

cc @emilio

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Mar 28, 2017

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.