WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
230273
CSSFontFaceSrcValue.cssText should be quoted consistently with other browsers
https://bugs.webkit.org/show_bug.cgi?id=230273
Summary
CSSFontFaceSrcValue.cssText should be quoted consistently with other browsers
Myles C. Maxfield
Reported
2021-09-14 12:43:04 PDT
CSSFontFaceSrcValue.cssText should be quoted consistently with other browsers
Attachments
Patch
(4.25 KB, patch)
2021-09-14 12:44 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(4.25 KB, patch)
2021-09-14 12:45 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(7.97 KB, patch)
2021-09-14 13:53 PDT
,
Myles C. Maxfield
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2021-09-14 12:44:58 PDT
Created
attachment 438157
[details]
Patch
Myles C. Maxfield
Comment 2
2021-09-14 12:45:01 PDT
<
rdar://problem/79644124
>
Myles C. Maxfield
Comment 3
2021-09-14 12:45:35 PDT
Created
attachment 438158
[details]
Patch
EWS Watchlist
Comment 4
2021-09-14 12:46:38 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Myles C. Maxfield
Comment 5
2021-09-14 13:53:39 PDT
Created
attachment 438165
[details]
Patch
Darin Adler
Comment 6
2021-09-14 14:02:35 PDT
Comment on
attachment 438165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438165&action=review
> Source/WebCore/ChangeLog:11 > + In a src: line like "src: local(foobar)", Firefox and Chrome will both quote > + "foobar" when reading out of the OM. Same thing with "src: url(foobar)". > + We should match them.
Should we add tests cases for format strings that have unusual characters in them, like a double quote mark? Exotic, but we are not attempting to correctly handle such cases it seems.
Myles C. Maxfield
Comment 7
2021-09-14 14:09:48 PDT
Comment on
attachment 438165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438165&action=review
>> Source/WebCore/ChangeLog:11 >> + We should match them. > > Should we add tests cases for format strings that have unusual characters in them, like a double quote mark? > > Exotic, but we are not attempting to correctly handle such cases it seems.
This is a good idea. I'll do this.
Myles C. Maxfield
Comment 8
2021-09-14 14:45:43 PDT
Comment on
attachment 438165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438165&action=review
>>> Source/WebCore/ChangeLog:11 >>> + We should match them. >> >> Should we add tests cases for format strings that have unusual characters in them, like a double quote mark? >> >> Exotic, but we are not attempting to correctly handle such cases it seems. > > This is a good idea. I'll do this.
It's a good thing you caught this - this patch is actually wrong. It should be using serializeString() instead.
Myles C. Maxfield
Comment 9
2021-09-14 15:19:50 PDT
Committed
r282415
(
241674@main
): <
https://commits.webkit.org/241674@main
>
Darin Adler
Comment 10
2021-09-14 15:54:28 PDT
To fix the URL serialization, we need to consider an approach like the one in CSSImageValue, which uses the ResolvedURL structure to work with both the original specified URL string and a resolved URL.
Myles C. Maxfield
Comment 11
2021-09-14 16:13:17 PDT
(In reply to Darin Adler from
comment #10
)
> To fix the URL serialization, we need to consider an approach like the one > in CSSImageValue, which uses the ResolvedURL structure to work with both the > original specified URL string and a resolved URL.
Oh, cool!!!
Darin Adler
Comment 12
2021-09-14 16:14:26 PDT
Comment on
attachment 438165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438165&action=review
> LayoutTests/fast/css/font-face-src-parsing-expected.txt:3 > Valid rules form the stylesheet:
I thin this is a typo and should be "from".
> LayoutTests/fast/css/font-face-src-parsing-expected.txt:19 > Expected result for valid rules: > > @font-face { src: url(font.ttf); }
Looks like these are now wrong. Worth updating or maybe just deleting?
Darin Adler
Comment 13
2021-09-14 16:20:27 PDT
(In reply to Myles C. Maxfield from
comment #11
)
> (In reply to Darin Adler from
comment #10
) > > To fix the URL serialization, we need to consider an approach like the one > > in CSSImageValue, which uses the ResolvedURL structure to work with both the > > original specified URL string and a resolved URL. > > Oh, cool!!!
The reason I had to do that is that the same object, CSSImageValue, is used in the CSS object model both for style rules, where it needs to be the original specified URL, and for computed style where it needs to be the complete URL. And yet the completion needs to be based on where it was specified. Currently this class is used both as part of the "truth" for the style rule, and as the interface to query both original and computed style. Some day we might separate those functions, but in the mean time we need this, and the valueWithStylesResolved function, called by Style::BuilderState::resolveImageStyles, has a key role in how this is used for computed style.
Myles C. Maxfield
Comment 14
2021-09-15 00:19:16 PDT
Committed
r282442
(
241695@main
): <
https://commits.webkit.org/241695@main
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug