WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
247118
[MQ4] Add schemas for resolution and -webkit-device-pixel-ratio features
https://bugs.webkit.org/show_bug.cgi?id=247118
Summary
[MQ4] Add schemas for resolution and -webkit-device-pixel-ratio features
Antti Koivisto
Reported
2022-10-27 02:11:50 PDT
Support resolution features
Attachments
Patch
(10.06 KB, patch)
2022-10-27 02:22 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-10-27 02:13:03 PDT
<
rdar://problem/101625468
>
Antti Koivisto
Comment 2
2022-10-27 02:22:57 PDT
Created
attachment 463270
[details]
Patch
Tim Nguyen (:ntim)
Comment 3
2022-10-27 07:04:13 PDT
Comment on
attachment 463270
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=463270&action=review
> Source/WebCore/css/query/GenericMediaQueryParser.cpp:64 > + if (name.startsWith("-webkit-min-"_s)) > + return { "-webkit-"_s + StringView(name).substring(12), ComparisonOperator::GreaterThanOrEqual }; > + if (name.startsWith("-webkit-max-"_s)) > + return { "-webkit-"_s + StringView(name).substring(12), ComparisonOperator::LessThanOrEqual };
Does this make us support -webkit-min/max for _all_ the range based media queries? If so, I think we should just check specific names here. Also, how does this even work? As implemented, it sounds like this would just work for `-webkit-min--webkit-device-pixel-ratio` as opposed to `-webkit-min-device-pixel-ratio`.
Antti Koivisto
Comment 4
2022-10-27 07:08:44 PDT
> Does this make us support -webkit-min/max for _all_ the range based media > queries? If so, I think we should just check specific names here.
The generated name contains -webkit- prefix which won't match any known feature and the parsing will fail during validation.
> Also, how does this even work? As implemented, it sounds like this would > just work for `-webkit-min--webkit-device-pixel-ratio` as opposed to > `-webkit-min-device-pixel-ratio`.
I don't understand.
Tim Nguyen (:ntim)
Comment 5
2022-10-27 07:11:47 PDT
(In reply to Antti Koivisto from
comment #4
)
> > Also, how does this even work? As implemented, it sounds like this would > > just work for `-webkit-min--webkit-device-pixel-ratio` as opposed to > > `-webkit-min-device-pixel-ratio`. > > I don't understand.
Isn't the schema name `-webkit-device-pixel-ratio`, how does it match `device-pixel-ratio` (e.g. without the -webkit- prefix)?
Antti Koivisto
Comment 6
2022-10-27 07:12:54 PDT
The idea here is to replace -webkit-max- prefix with -webkit- prefix to get the actual feature name. This is equivalent to stripping away min-/max- prefix in the usual case.
EWS
Comment 7
2022-10-27 07:49:11 PDT
Committed
256064@main
(b0723e965bf6): <
https://commits.webkit.org/256064@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 463270
[details]
.
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