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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2416423003: Fix unscrollable scrollers after closing a <dialog>. (Closed)
Patch Set: add null check Created 4 years, 2 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 88e8ddba1d5c4b64bf97c45c03775722e611459a..8b28babed7e89b01c541aca486a53c51d50d2890 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5646,6 +5646,13 @@ void Document::removeFromTopLayer(Element* element) {
DCHECK_NE(position, kNotFound);
m_topLayerElements.remove(position);
element->setIsInTopLayer(false);
+
+ // Any scrollers that were laid out from addToTopLayer need to be laid out
+ // again now to keep FrameView::m_scrollableAreas up to date. To that end,
+ // force normal layout instead of simplified layout on the document.
+ // See crbug.com/633520 for details.
+ if (layoutView())
+ layoutView()->setNeedsLayout(LayoutInvalidationReason::TopLayerChanged);
}
HTMLDialogElement* Document::activeModalDialog() const {

Powered by Google App Engine
This is Rietveld 408576698