diff options
author | Moonchild <moonchild@palemoon.org> | 2022-03-02 18:19:24 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-03-02 18:19:24 +0000 |
commit | 5790af6c8bbe8acd82cb0db4fc6f49dca301985a (patch) | |
tree | df508244b46e7b6ecdffca4bcb539c26610a4e49 /layout | |
parent | 39e80ed9afe2e5bba65a2786c7eff7c3189d49e8 (diff) | |
download | GRE-5790af6c8bbe8acd82cb0db4fc6f49dca301985a.tar.gz |
Issue #15 - Part 1: remove a number of old GCC hacks.
Diffstat (limited to 'layout')
-rw-r--r-- | layout/style/nsCSSParser.cpp | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 6187b08e0..8b9e25066 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -9843,7 +9843,22 @@ CSSParserImpl::ParseGridLine(nsCSSValue& aValue) // Make the contained value be defined even though we really want a // Nothing here. This works around an otherwise difficult to avoid // Memcheck false positive when this is compiled by gcc-5.3 -O2. - // See bug 1301856. + // The problem is that gcc 5.4 and later, when using high + // optimization, inline Maybe::{isSome,ref} here + // + // if (integer.isSome() && integer.ref() < 0) { + // + // and then proceed to evaluate the expression right-to-left, as if it + // had been written + // + // integer.ref() < 0 && integer.isSome() + // + // This is a legitimate transformation because gcc presumably can prove + // via dataflow analysis that integer.isSome() is false whenever integer.ref() + // is undefined, so the overall expression result is still defined. + // Valgrind/Memcheck assumes that all conditional branches in the program + // are important, and that assumption is deeply wired in, so there is no + // easy way to avoid the warning apart from to force-initialise |integer|. integer.emplace(0); integer.reset(); #endif @@ -15314,17 +15329,17 @@ CSSParserImpl::ParseFontFeatureSettings(nsCSSValue& aValue) return true; } -bool
-CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue)
-{
- // TODO: Actually implement this.
-
- // This stub is here because websites insist on considering this
- // very hardware-dependent and O.S.-variable low-level font-control
- // as a "critical feature" which it isn't as there is 0 guarantee
- // that font variation settings are supported or honored by any
- // operating system used by the client.
- return true;
+bool +CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue) +{ + // TODO: Actually implement this. + + // This stub is here because websites insist on considering this + // very hardware-dependent and O.S.-variable low-level font-control + // as a "critical feature" which it isn't as there is 0 guarantee + // that font variation settings are supported or honored by any + // operating system used by the client. + return true; } bool |