summaryrefslogtreecommitdiff
path: root/layout/style/nsCSSParser.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-03-02 21:23:45 +0000
committerMoonchild <moonchild@palemoon.org>2022-03-02 21:23:45 +0000
commit5fe31b024217a7057db60c52d8fb535cc2bc05a3 (patch)
tree1d8272b66c35248b34d2df6f172c10a9ed1c57d3 /layout/style/nsCSSParser.cpp
parent39e80ed9afe2e5bba65a2786c7eff7c3189d49e8 (diff)
parent872bfa373ddfc184e17caf1ba38dbb02ed9c37f0 (diff)
downloadGRE-5fe31b024217a7057db60c52d8fb535cc2bc05a3.tar.gz
Merge branch 'remove-hacks'
Diffstat (limited to 'layout/style/nsCSSParser.cpp')
-rw-r--r--layout/style/nsCSSParser.cpp39
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