WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
248871
[@property] Initial syntax parsing
https://bugs.webkit.org/show_bug.cgi?id=248871
Summary
[@property] Initial syntax parsing
Antti Koivisto
Reported
2022-12-07 06:06:23 PST
Initial support for parsing syntax strings.
Attachments
Patch
(84.15 KB, patch)
2022-12-07 08:38 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(84.22 KB, patch)
2022-12-07 09:40 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(84.21 KB, patch)
2022-12-07 09:43 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(84.21 KB, patch)
2022-12-07 09:48 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(84.21 KB, patch)
2022-12-07 09:51 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(84.22 KB, patch)
2022-12-07 09:55 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Patch for landing
(86.99 KB, patch)
2022-12-07 13:57 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2022-12-07 08:38:02 PST
Created
attachment 463918
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2022-12-07 08:38:16 PST
<
rdar://problem/103075062
>
Darin Adler
Comment 3
2022-12-07 09:23:17 PST
Comment on
attachment 463918
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=463918&action=review
> Source/WebCore/css/parser/CSSPropertySyntax.cpp:86 > + auto string = syntax.stripWhiteSpace();
This should be using a function that strips the appropriate definition of space for CSS, not String::stripWhiteSpace, which strips all Unicode whitespace. I’m guessing the stripLeadingAndTrailingHTMLSpaces function is the right one to use. Once nice thing about that is that it returns a StringView and so it’s more efficient.
> Source/WebCore/css/parser/CSSPropertySyntax.h:51 > + AtomString ident { };
No need for the braces here.
> Source/WebCore/css/parser/CSSPropertySyntax.h:56 > + static Definition parse(const String&);
I suggest this take a StringView, unless there’s some reason it can’t.
Antti Koivisto
Comment 4
2022-12-07 09:40:05 PST
Created
attachment 463920
[details]
Patch for landing
Antti Koivisto
Comment 5
2022-12-07 09:43:06 PST
Created
attachment 463921
[details]
Patch for landing
Antti Koivisto
Comment 6
2022-12-07 09:46:14 PST
> No need for the braces here.
Some compilers fail when initialising the struct without providing the field value if it does not have braces. We talked about this in some earlier bug. But maybe those compilers are no longer relevant?
Antti Koivisto
Comment 7
2022-12-07 09:48:02 PST
Created
attachment 463922
[details]
Patch for landing
Antti Koivisto
Comment 8
2022-12-07 09:50:52 PST
> This should be using a function that strips the appropriate definition of > space for CSS, not String::stripWhiteSpace, which strips all Unicode > whitespace. I’m guessing the stripLeadingAndTrailingHTMLSpaces function is > the right one to use. Once nice thing about that is that it returns a > StringView and so it’s more efficient.
Moved this inside the parsing callback so it can use proper isCSSSpace skipping.
Antti Koivisto
Comment 9
2022-12-07 09:51:13 PST
Created
attachment 463923
[details]
Patch for landing
Antti Koivisto
Comment 10
2022-12-07 09:55:00 PST
Created
attachment 463924
[details]
Patch for landing
Antti Koivisto
Comment 11
2022-12-07 13:57:45 PST
Created
attachment 463928
[details]
Patch for landing
EWS
Comment 12
2022-12-07 17:21:19 PST
Committed
257525@main
(be0b82ecc746): <
https://commits.webkit.org/257525@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 463928
[details]
.
Tim Nguyen (:ntim)
Comment 13
2023-01-01 22:29:38 PST
***
Bug 192325
has been marked as a duplicate of this bug. ***
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