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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2416423003: Fix unscrollable scrollers after closing a <dialog>. (Closed)
Patch Set: address review comments 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 5632 matching lines...) Expand 10 before | Expand all | Expand 10 after
5643 element->setIsInTopLayer(true); 5643 element->setIsInTopLayer(true);
5644 } 5644 }
5645 5645
5646 void Document::removeFromTopLayer(Element* element) { 5646 void Document::removeFromTopLayer(Element* element) {
5647 if (!element->isInTopLayer()) 5647 if (!element->isInTopLayer())
5648 return; 5648 return;
5649 size_t position = m_topLayerElements.find(element); 5649 size_t position = m_topLayerElements.find(element);
5650 DCHECK_NE(position, kNotFound); 5650 DCHECK_NE(position, kNotFound);
5651 m_topLayerElements.remove(position); 5651 m_topLayerElements.remove(position);
5652 element->setIsInTopLayer(false); 5652 element->setIsInTopLayer(false);
5653
5654 // Any scrollers that were laid out from addToTopLayer need to be laid out
5655 // again now to keep FrameView::m_scrollableAreas up to date. To that end,
5656 // force normal layout instead of simplified layout on the document.
5657 // See crbug.com/633520 for details.
5658 layoutView()->setNeedsLayout(LayoutInvalidationReason::TopLayerChanged);
5653 } 5659 }
5654 5660
5655 HTMLDialogElement* Document::activeModalDialog() const { 5661 HTMLDialogElement* Document::activeModalDialog() const {
5656 if (m_topLayerElements.isEmpty()) 5662 if (m_topLayerElements.isEmpty())
5657 return 0; 5663 return 0;
5658 return toHTMLDialogElement(m_topLayerElements.last().get()); 5664 return toHTMLDialogElement(m_topLayerElements.last().get());
5659 } 5665 }
5660 5666
5661 void Document::exitPointerLock() { 5667 void Document::exitPointerLock() {
5662 if (!page()) 5668 if (!page())
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 } 6407 }
6402 6408
6403 void showLiveDocumentInstances() { 6409 void showLiveDocumentInstances() {
6404 WeakDocumentSet& set = liveDocumentSet(); 6410 WeakDocumentSet& set = liveDocumentSet();
6405 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6411 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6406 for (Document* document : set) 6412 for (Document* document : set)
6407 fprintf(stderr, "- Document %p URL: %s\n", document, 6413 fprintf(stderr, "- Document %p URL: %s\n", document,
6408 document->url().getString().utf8().data()); 6414 document->url().getString().utf8().data());
6409 } 6415 }
6410 #endif 6416 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698