WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 223141
Runtime-disabled CSS features still still appear enabled via two-arg CSS.supports()
https://bugs.webkit.org/show_bug.cgi?id=223141
Summary
Runtime-disabled CSS features still still appear enabled via two-arg CSS.supp...
Sam Sneddon [:gsnedders]
Reported
2021-03-12 14:15:47 PST
bug 222280
fixed:
> CSS.supports("overscroll-behavior: inherit")
< true however, even after that:
> CSS.supports("overscroll-behavior: inherit")
< false
> CSS.supports("overscroll-behavior", "inherit")
< true
Attachments
Patch
(10.10 KB, patch)
2021-03-16 11:14 PDT
,
Simon Fraser (smfr)
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-03-12 14:16:09 PST
<
rdar://problem/75377891
>
Simon Fraser (smfr)
Comment 2
2021-03-16 10:49:40 PDT
There's a different entry point for the comma separated list version: DOMCSSNamespace::supports(Document& document, const String& property, const String& value)
Simon Fraser (smfr)
Comment 3
2021-03-16 11:14:23 PDT
Created
attachment 423362
[details]
Patch
Antti Koivisto
Comment 4
2021-03-16 11:28:48 PDT
Comment on
attachment 423362
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423362&action=review
> Source/WebCore/css/DOMCSSNamespace.cpp:67 > > + CSSParserContext parserContext(document); > + if (parserContext.isPropertyRuntimeDisabled(propertyID)) > + propertyID = CSSPropertyInvalid; > + > if (propertyID == CSSPropertyInvalid) > return false;
You can just return false in the first branch
Simon Fraser (smfr)
Comment 5
2021-03-16 14:40:56 PDT
https://trac.webkit.org/changeset/274520/webkit
Darin Adler
Comment 6
2021-03-16 14:58:09 PDT
Comment on
attachment 423362
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423362&action=review
Tiny clean-up suggestions on moved code.
> Source/WebCore/css/parser/CSSParserContext.cpp:161 > +#if ENABLE(TEXT_AUTOSIZING) > + case CSSPropertyWebkitTextSizeAdjust: > +#if !PLATFORM(IOS_FAMILY) > + return !textAutosizingEnabled; > +#endif > + return false; > +#endif // ENABLE(TEXT_AUTOSIZING)
This can be written in a less strange way: #if ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY) case CSSPropertyWebkitTextSizeAdjust: return !textAutosizingEnabled; #endif No need for the nested #if and double return statements.
> Source/WebCore/css/parser/CSSParserContext.cpp:169 > + return false;
This unreachable code should be removed.
Darin Adler
Comment 7
2021-03-16 14:58:10 PDT
Comment on
attachment 423362
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423362&action=review
Tiny clean-up suggestions on moved code.
> Source/WebCore/css/parser/CSSParserContext.cpp:161 > +#if ENABLE(TEXT_AUTOSIZING) > + case CSSPropertyWebkitTextSizeAdjust: > +#if !PLATFORM(IOS_FAMILY) > + return !textAutosizingEnabled; > +#endif > + return false; > +#endif // ENABLE(TEXT_AUTOSIZING)
This can be written in a less strange way: #if ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY) case CSSPropertyWebkitTextSizeAdjust: return !textAutosizingEnabled; #endif No need for the nested #if and double return statements.
> Source/WebCore/css/parser/CSSParserContext.cpp:169 > + return false;
This unreachable code should be removed.
Simon Fraser (smfr)
Comment 8
2021-03-22 11:57:02 PDT
Followups in
https://trac.webkit.org/changeset/274725/webkit
and
https://trac.webkit.org/changeset/274756/webkit
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