forked from Lainports/opnsense-ports
29 lines
1.1 KiB
Text
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();
|
|
+ }
|
|
}
|
|
}
|
|
}
|