Support resolution features
<rdar://problem/101625468>
Created attachment 463270 [details] Patch
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`.
> 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.
(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)?
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.
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].