opnsense-ports/www/waterfox/files/patch-bug1401416
Franco Fichtner 80ff625a02 */*: sync with upstream
Taken from: HardenedBSD
2018-02-09 08:42:27 +01:00

29 lines
1.1 KiB
Text

commit c5123938eb1e
Author: Tobias Schneider <schneider@jancona.com>
Date: Thu Sep 21 12:43:35 2017 -0700
Bug 1401416 - [intersection-observer] Let intersection rect be empty if do_QueryFrame(rootFrame) returns null. r=dholbert, a=sledru
--HG--
extra : source : 90be30b5206c2b2724d61f4f6782197bfa768428
---
dom/base/DOMIntersectionObserver.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git dom/base/DOMIntersectionObserver.cpp dom/base/DOMIntersectionObserver.cpp
index 606a1de5ed8c..1ca909e3cfbf 100644
--- dom/base/DOMIntersectionObserver.cpp
+++ dom/base/DOMIntersectionObserver.cpp
@@ -308,7 +308,11 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
}
root = rootFrame->GetContent()->AsElement();
nsIScrollableFrame* scrollFrame = do_QueryFrame(rootFrame);
- rootRect = scrollFrame->GetScrollPortRect();
+ // If we end up with a null root frame for some reason, we'll proceed
+ // with an empty root intersection rect.
+ if (scrollFrame) {
+ rootRect = scrollFrame->GetScrollPortRect();
+ }
}
}
}