mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1728670. Restore null check accidentally removed in previous patch. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124513
This commit is contained in:
parent
bb61392c9b
commit
26dd73646b
@ -959,17 +959,14 @@ nsRect Element::GetClientAreaRect() {
|
||||
if (overlayScrollbars &&
|
||||
!doc->StyleOrLayoutObservablyDependsOnParentDocumentLayout() &&
|
||||
doc->IsScrollingElement(this)) {
|
||||
// We will always have a pres shell if we have a pres context, and we will
|
||||
// only get here if we have a pres context from the root content document
|
||||
// check
|
||||
PresShell* presShell = doc->GetPresShell();
|
||||
|
||||
// Ensure up to date dimensions, but don't reflow
|
||||
RefPtr<nsViewManager> viewManager = presShell->GetViewManager();
|
||||
if (viewManager) {
|
||||
viewManager->FlushDelayedResize(false);
|
||||
if (PresShell* presShell = doc->GetPresShell()) {
|
||||
// Ensure up to date dimensions, but don't reflow
|
||||
RefPtr<nsViewManager> viewManager = presShell->GetViewManager();
|
||||
if (viewManager) {
|
||||
viewManager->FlushDelayedResize(false);
|
||||
}
|
||||
return nsRect(nsPoint(), presContext->GetVisibleArea().Size());
|
||||
}
|
||||
return nsRect(nsPoint(), presContext->GetVisibleArea().Size());
|
||||
}
|
||||
|
||||
nsIFrame* frame;
|
||||
|
12
dom/base/crashtests/1728670-1-child.html
Normal file
12
dom/base/crashtests/1728670-1-child.html
Normal file
@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<script>
|
||||
document.documentElement.clientHeight;
|
||||
document.body.clientHeight;
|
||||
</script>
|
||||
<body>
|
||||
<script>
|
||||
document.documentElement.clientHeight;
|
||||
document.body.clientHeight;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
3
dom/base/crashtests/1728670-1.html
Normal file
3
dom/base/crashtests/1728670-1.html
Normal file
@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<iframe src="http://example.org/1728670-1-child.html" style="display: none;">
|
||||
</html>
|
@ -263,3 +263,4 @@ skip-if(ThreadSanitizer) load 1681729.html
|
||||
skip-if(ThreadSanitizer) load 1693049.html
|
||||
skip-if(ThreadSanitizer||Android) load 1697525.html
|
||||
skip-if(ThreadSanitizer||Android) load 1712198.html # Mysterious failure that should be investigated (bug 1712866).
|
||||
skip-if(Android) HTTP load 1728670-1.html
|
||||
|
Loading…
Reference in New Issue
Block a user