Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2218703002: [mapToVisualRectInAncestorSpace] Check for detached iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index a1f5a977f9e3d31fe10640850ec1b03bf95a1455..f42cfed39a8535ededb414b25fbfd431a66283ab 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -477,9 +477,12 @@ bool LayoutView::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ance
// Adjust for frame border.
rect.move(obj->contentBoxOffset());
return obj->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);
+ return true;
}
- return true;
+ // This can happen, e.g., if the iframe element has display:none.
+ rect = LayoutRect();
+ return false;
}
void LayoutView::adjustOffsetForFixedPosition(LayoutRect& rect) const

Powered by Google App Engine
This is Rietveld 408576698