diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 08ffe7873be..64bdbd3bf14 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -1750,4 +1750,3 @@ GK_ATOM(_moz_windows_classic, "-moz-windows-classic") GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled") GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic") GK_ATOM(_moz_menubar_drag, "-moz-menubar-drag") -GK_ATOM(_moz_device_pixel_ratio, "-moz-device-pixel-ratio") diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 588e9a6d265..4f512fdeed8 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -1791,9 +1791,6 @@ CSSParserImpl::ParseMediaQueryExpression(nsMediaQuery* aQuery) expr->mValue.GetIntValue() > 1) rv = PR_FALSE; break; - case nsMediaFeature::eFloat: - rv = ParseNonNegativeVariant(expr->mValue, VARIANT_NUMBER, nsnull); - break; case nsMediaFeature::eIntRatio: { // Two integers separated by '/', with optional whitespace on diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp index 2a755eaaf53..c1f2489b4b6 100644 --- a/layout/style/nsCSSStyleSheet.cpp +++ b/layout/style/nsCSSStyleSheet.cpp @@ -249,15 +249,6 @@ nsMediaExpression::Matches(nsPresContext *aPresContext, cmp = DoCompare(actual.GetIntValue(), required.GetIntValue()); } break; - case nsMediaFeature::eFloat: - { - NS_ASSERTION(actual.GetUnit() == eCSSUnit_Number, - "bad actual value"); - NS_ASSERTION(required.GetUnit() == eCSSUnit_Number, - "bad required value"); - cmp = DoCompare(actual.GetFloatValue(), required.GetFloatValue()); - } - break; case nsMediaFeature::eIntRatio: { NS_ASSERTION(actual.GetUnit() == eCSSUnit_Array && @@ -431,15 +422,6 @@ nsMediaQuery::AppendToString(nsAString& aString) const // written without anything extra. expr.mValue.AppendToString(eCSSProperty_z_index, aString); break; - case nsMediaFeature::eFloat: - { - NS_ASSERTION(expr.mValue.GetUnit() == eCSSUnit_Number, - "bad unit"); - // Use 'line-height' as a property that takes float values - // written in the normal way. - expr.mValue.AppendToString(eCSSProperty_line_height, aString); - } - break; case nsMediaFeature::eIntRatio: { NS_ASSERTION(expr.mValue.GetUnit() == eCSSUnit_Array, diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp index a222b63b306..c88fb187a00 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -185,6 +185,7 @@ GetDeviceAspectRatio(nsPresContext* aPresContext, const nsMediaFeature*, return MakeArray(GetDeviceSize(aPresContext), aResult); } + static nsresult GetColor(nsPresContext* aPresContext, const nsMediaFeature*, nsCSSValue& aResult) @@ -260,15 +261,6 @@ GetGrid(nsPresContext* aPresContext, const nsMediaFeature*, return NS_OK; } -static nsresult -GetDevicePixelRatio(nsPresContext* aPresContext, const nsMediaFeature*, - nsCSSValue& aResult) -{ - float ratio = aPresContext->CSSPixelsToDevPixels(1.0f); - aResult.SetFloatValue(ratio, eCSSUnit_Number); - return NS_OK; -} - static nsresult GetSystemMetric(nsPresContext* aPresContext, const nsMediaFeature* aFeature, nsCSSValue& aResult) @@ -385,13 +377,6 @@ nsMediaFeatures::features[] = { }, // Mozilla extensions - { - &nsGkAtoms::_moz_device_pixel_ratio, - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eFloat, - { nsnull }, - GetDevicePixelRatio - }, { &nsGkAtoms::_moz_scrollbar_start_backward, nsMediaFeature::eMinMaxNotAllowed, diff --git a/layout/style/nsMediaFeatures.h b/layout/style/nsMediaFeatures.h index 8fa7f289215..0cacd230d51 100644 --- a/layout/style/nsMediaFeatures.h +++ b/layout/style/nsMediaFeatures.h @@ -63,7 +63,6 @@ struct nsMediaFeature { // was given (in addition to the types listed below). eLength, // values are such that nsCSSValue::IsLengthUnit() is true eInteger, // values are eCSSUnit_Integer - eFloat, // values are eCSSUnit_Number eBoolInteger,// values are eCSSUnit_Integer (0, -0, or 1 only) eIntRatio, // values are eCSSUnit_Array of two eCSSUnit_Integer eResolution, // values are in eCSSUnit_Inch (for dpi) or diff --git a/layout/style/test/Makefile.in b/layout/style/test/Makefile.in index 0aa2b945a1b..9815d73d837 100644 --- a/layout/style/test/Makefile.in +++ b/layout/style/test/Makefile.in @@ -153,7 +153,6 @@ _TEST_FILES = test_acid3_test46.html \ test_media_queries.html \ test_media_queries_dynamic.html \ test_media_queries_dynamic_xbl.html \ - test_moz_device_pixel_ratio.html \ test_namespace_rule.html \ test_of_type_selectors.xhtml \ test_parse_rule.html \ diff --git a/layout/style/test/test_media_queries.html b/layout/style/test/test_media_queries.html index 5a3dd78430f..c13b3bac9bb 100644 --- a/layout/style/test/test_media_queries.html +++ b/layout/style/test/test_media_queries.html @@ -26,13 +26,6 @@ SimpleTest.waitForExplicitFinish(); var iframe; -function getZoomRatio() { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) - .getInterface(Components.interfaces.nsIDOMWindowUtils); - return utils.screenPixelsPerCSSPixel; -} - function run() { iframe = document.getElementById("subdoc"); var subdoc = iframe.contentDocument; @@ -336,26 +329,6 @@ function run() { should_apply("not all and (max-device-aspect-ratio: " + low_dar_2 + ")"); expression_should_not_be_parseable("max-device-aspect-ratio"); - var real_dpr = 1.0 * getZoomRatio(); - var high_dpr = 1.1 * getZoomRatio(); - var low_dpr = 0.9 * getZoomRatio(); - should_apply("all and (max--moz-device-pixel-ratio: " + real_dpr + ")"); - should_apply("all and (min--moz-device-pixel-ratio: " + real_dpr + ")"); - should_not_apply("not all and (max--moz-device-pixel-ratio: " + real_dpr + ")"); - should_not_apply("not all and (min--moz-device-pixel-ratio: " + real_dpr + ")"); - should_apply("all and (min--moz-device-pixel-ratio: " + low_dpr + ")"); - should_apply("all and (max--moz-device-pixel-ratio: " + high_dpr + ")"); - should_not_apply("all and (max--moz-device-pixel-ratio: " + low_dpr + ")"); - should_not_apply("all and (min--moz-device-pixel-ratio: " + high_dpr + ")"); - should_apply("not all and (max--moz-device-pixel-ratio: " + low_dpr + ")"); - should_apply("not all and (min--moz-device-pixel-ratio: " + high_dpr + ")"); - should_apply("(-moz-device-pixel-ratio: " + real_dpr + ")"); - should_not_apply("(-moz-device-pixel-ratio: " + high_dpr + ")"); - should_not_apply("(-moz-device-pixel-ratio: " + low_dpr + ")"); - should_apply("(-moz-device-pixel-ratio)"); - expression_should_not_be_parseable("min--moz-device-pixel-ratio"); - expression_should_not_be_parseable("max--moz-device-pixel-ratio"); - features = [ "max-aspect-ratio", "device-aspect-ratio" ]; for (i in features) { feature = features[i]; diff --git a/layout/style/test/test_moz_device_pixel_ratio.html b/layout/style/test/test_moz_device_pixel_ratio.html deleted file mode 100644 index 24a80950bd6..00000000000 --- a/layout/style/test/test_moz_device_pixel_ratio.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Test for Bug 474356 - - - - - - - -Mozilla Bug 474356 - - -
-
-
-
- -
- -