From 1da0e8a095d82dd6b9ad0c0a45a7ee3b9d80ded7 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 13 Feb 2018 19:26:43 +0100 Subject: Never shrink line heights as a result of minimumFontSize. See: MoonchildProductions/Pale-Moon#1614. --- layout/style/nsRuleNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layout/style') diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index b22002d87..fa29fe0f1 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -4686,7 +4686,8 @@ nsRuleNode::ComputeTextData(void* aStartStruct, if (font->mSize != 0) { lh = nscoord(float(lh) * float(font->mFont.size) / float(font->mSize)); } else { - lh = minimumFontSize; + // Never shrink line heights as a result of minFontSize + lh = std::max(lh, minimumFontSize); } } text->mLineHeight.SetCoordValue(lh); -- cgit v1.2.3 From 4c697043da9fe3f58a7e070dad74eab6972695a0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 20 Feb 2018 14:01:05 +0100 Subject: Remove windows-xp and windows-vista from @media(-moz-os-version) --- layout/style/nsMediaFeatures.cpp | 2 -- layout/style/test/chrome/bug418986-2.js | 2 -- layout/style/test/test_media_queries.html | 2 -- 3 files changed, 6 deletions(-) (limited to 'layout/style') diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp index 052ce58e8..5a54d5455 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -70,8 +70,6 @@ struct OperatingSystemVersionInfo { // Os version identities used in the -moz-os-version media query. const OperatingSystemVersionInfo osVersionStrings[] = { - { LookAndFeel::eOperatingSystemVersion_WindowsXP, L"windows-xp" }, - { LookAndFeel::eOperatingSystemVersion_WindowsVista, L"windows-vista" }, { LookAndFeel::eOperatingSystemVersion_Windows7, L"windows-win7" }, { LookAndFeel::eOperatingSystemVersion_Windows8, L"windows-win8" }, { LookAndFeel::eOperatingSystemVersion_Windows10, L"windows-win10" } diff --git a/layout/style/test/chrome/bug418986-2.js b/layout/style/test/chrome/bug418986-2.js index 4336f4abd..b083f48ee 100644 --- a/layout/style/test/chrome/bug418986-2.js +++ b/layout/style/test/chrome/bug418986-2.js @@ -53,8 +53,6 @@ var suppressed_toggles = [ // Possible values for '-moz-os-version' var windows_versions = [ - "windows-xp", - "windows-vista", "windows-win7", "windows-win8", "windows-win10", diff --git a/layout/style/test/test_media_queries.html b/layout/style/test/test_media_queries.html index 479306a55..d503fad0b 100644 --- a/layout/style/test/test_media_queries.html +++ b/layout/style/test/test_media_queries.html @@ -713,8 +713,6 @@ function run() { expression_should_not_be_parseable("-moz-windows-theme: "); // os version media queries (currently windows only) - expression_should_be_parseable("-moz-os-version: windows-xp"); - expression_should_be_parseable("-moz-os-version: windows-vista"); expression_should_be_parseable("-moz-os-version: windows-win7"); expression_should_be_parseable("-moz-os-version: windows-win8"); expression_should_be_parseable("-moz-os-version: windows-win10"); -- cgit v1.2.3 From 017797de494cffd76e31e62dbec3234ecabfb75b Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 17 Aug 2017 20:30:45 +0200 Subject: CSS - Grid - fit-content unexpectedly reserves space for full clamp size in repeat() --- layout/style/nsCSSParser.cpp | 4 ++++ layout/style/test/property_database.js | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'layout/style') diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 1108ce5b5..cd996230e 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -8918,6 +8918,10 @@ CSSParserImpl::ParseGridTrackSize(nsCSSValue& aValue, return CSSParseResult::NotFound; } if (mToken.mIdent.LowerCaseEqualsLiteral("fit-content")) { + if (requireFixedSize) { + UngetToken(); + return CSSParseResult::Error; + } nsCSSValue::Array* func = aValue.InitFunction(eCSSKeyword_fit_content, 1); if (ParseGridTrackBreadth(func->Item(1)) == CSSParseResult::Ok && func->Item(1).IsLengthPercentCalcUnit() && diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 9c69e7d10..4389d0cd0 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -6270,6 +6270,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.grid.enabled")) { "repeat(auto-fill,minmax(1%,auto))", "repeat(auto-fill,minmax(1em,min-content)) minmax(min-content,0)", "repeat(auto-fill,minmax(max-content,1mm))", + "repeat(2, fit-content(1px))", "fit-content(1px) 1fr", "[a] fit-content(calc(1px - 99%)) [b]", "[a] fit-content(10%) [b c] fit-content(1em)", @@ -6314,6 +6315,8 @@ if (IsCSSPropertyPrefEnabled("layout.css.grid.enabled")) { "repeat(1, repeat(1, 20px))", "repeat(auto-fill, auto)", "repeat(auto-fit,auto)", + "repeat(auto-fill, fit-content(1px))", + "repeat(auto-fit, fit-content(1px))", "repeat(auto-fit,[])", "repeat(auto-fill, 0) repeat(auto-fit, 0) ", "repeat(auto-fit, 0) repeat(auto-fill, 0) ", @@ -6335,6 +6338,8 @@ if (IsCSSPropertyPrefEnabled("layout.css.grid.enabled")) { "fit-content(-1px)", "fit-content(auto)", "fit-content(min-content)", + "fit-content(1px) repeat(auto-fit, 1px)", + "fit-content(1px) repeat(auto-fill, 1px)", ], unbalanced_values: [ "(foo] 40px", -- cgit v1.2.3 From 505edf1ba4f6907c236b4876eefea606fa7b9cd0 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 17 Aug 2017 20:34:01 +0200 Subject: [draft] CSS - linear-gradient - zero (0) angle value without degree unit is not correctly interpreted --- layout/style/nsCSSParser.cpp | 3 ++- layout/style/test/property_database.js | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'layout/style') diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index cd996230e..b361cf0c2 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -10404,7 +10404,8 @@ CSSParserImpl::ParseLinearGradient(nsCSSValue& aValue, UngetToken(); // , - if (ParseSingleTokenVariant(cssGradient->mAngle, VARIANT_ANGLE, nullptr) && + if (ParseSingleTokenVariant(cssGradient->mAngle, + VARIANT_ANGLE_OR_ZERO, nullptr) && !ExpectSymbol(',', true)) { SkipUntil(')'); return false; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 4389d0cd0..62d413d98 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -132,6 +132,9 @@ var validGradientAndElementValues = [ "linear-gradient(to right bottom, red, 50%, green 50%, 50%, blue)", "linear-gradient(to right bottom, red, 0%, green 50%, 100%, blue)", + /* Unitless 0 is valid as an */ + "linear-gradient(0, red, blue)", + "-moz-linear-gradient(red, blue)", "-moz-linear-gradient(red, yellow, blue)", "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)", @@ -388,10 +391,8 @@ var invalidGradientAndElementValues = [ "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", "linear-gradient(red -99, yellow, green, blue 120%)", - /* Unitless 0 is invalid as an */ - "-moz-linear-gradient(top left 0, red, blue)", - "-moz-linear-gradient(5px 5px 0, red, blue)", - "linear-gradient(0, red, blue)", + /* Unitless nonzero numbers are valid as an */ + "linear-gradient(30, red, blue)", /* Invalid color, calc() or -moz-image-rect() function */ "linear-gradient(red, rgb(0, rubbish, 0) 50%, red)", "linear-gradient(red, red calc(50% + rubbish), red)", -- cgit v1.2.3