summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-24 21:29:08 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-24 21:29:08 -0500
commit33ba1e8f1b45d5f758c8148b3118bd369dbd48a3 (patch)
tree4375d217ef7d522a159929cdb08cd127479d03cb
parent6885e352c0527e10dfc1bdfe3f52c8ece1945a0b (diff)
downloadaura-central-33ba1e8f1b45d5f758c8148b3118bd369dbd48a3.tar.gz
Revert "[DOM:Base] Interpret empty margin string as a zero root"
This reverts commit c89bbcef39fb605460edc2f8d3b447eff72b074d.
-rw-r--r--dom/base/DOMIntersectionObserver.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/dom/base/DOMIntersectionObserver.cpp b/dom/base/DOMIntersectionObserver.cpp
index 1d236c23e..bc8f030d0 100644
--- a/dom/base/DOMIntersectionObserver.cpp
+++ b/dom/base/DOMIntersectionObserver.cpp
@@ -118,14 +118,7 @@ DOMIntersectionObserver::SetRootMargin(const nsAString& aString)
// mode so that pixel/percent and unit-less values will be differentiated.
nsCSSParser parser(nullptr);
nsCSSValue value;
-
- // Use a zero margin if the input string is empty after trimming whitespace
- const nsAString& stringNoWS =
- nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespaceOrNBSP>(aString, true);
- if (stringNoWS.IsEmpty()) {
- nsCSSRect& zeroRootMargin = value.SetRectValue();
- zeroRootMargin.SetAllSidesTo(nsCSSValue(0.0f, eCSSUnit_Pixel));
- } else if (!parser.ParseMarginString(aString, nullptr, 0, value, true)) {
+ if (!parser.ParseMarginString(aString, nullptr, 0, value, true)) {
return false;
}