mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239799 part 2: Add support for @media(-webkit-transform-3d) media query, for web compatibility. r=heycam
This commit is contained in:
parent
e037620319
commit
45a9745978
@ -1222,6 +1222,7 @@ GK_ATOM(tr, "tr")
|
||||
GK_ATOM(track, "track")
|
||||
GK_ATOM(trailing, "trailing")
|
||||
GK_ATOM(transform, "transform")
|
||||
GK_ATOM(transform_3d, "transform-3d")
|
||||
GK_ATOM(transformiix, "transformiix")
|
||||
GK_ATOM(translate, "translate")
|
||||
GK_ATOM(transparent, "transparent")
|
||||
|
@ -324,6 +324,15 @@ GetDevicePixelRatio(nsPresContext* aPresContext, const nsMediaFeature*,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
GetTransform3d(nsPresContext* aPresContext, const nsMediaFeature*,
|
||||
nsCSSValue& aResult)
|
||||
{
|
||||
// Gecko supports 3d transforms, so this feature is always 1.
|
||||
aResult.SetIntValue(1, eCSSUnit_Integer);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
GetSystemMetric(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
|
||||
nsCSSValue& aResult)
|
||||
@ -533,6 +542,15 @@ nsMediaFeatures::features[] = {
|
||||
{ nullptr },
|
||||
GetDevicePixelRatio
|
||||
},
|
||||
// -webkit-transform-3d:
|
||||
{
|
||||
&nsGkAtoms::transform_3d,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eBoolInteger,
|
||||
nsMediaFeature::eHasWebkitPrefix,
|
||||
{ nullptr },
|
||||
GetTransform3d
|
||||
},
|
||||
|
||||
// Mozilla extensions
|
||||
{
|
||||
|
@ -440,6 +440,8 @@ function run() {
|
||||
expression_should_be_parseable("-webkit-max-device-pixel-ratio: 1.0");
|
||||
expression_should_not_be_parseable("max-device-pixel-ratio: 1.0");
|
||||
|
||||
should_apply("(-webkit-transform-3d)");
|
||||
|
||||
features = [ "max-aspect-ratio", "device-aspect-ratio" ];
|
||||
for (i in features) {
|
||||
feature = features[i];
|
||||
|
Loading…
Reference in New Issue
Block a user