| OLD | NEW |
| 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 5628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5639 element->setIsInTopLayer(true); | 5639 element->setIsInTopLayer(true); |
| 5640 } | 5640 } |
| 5641 | 5641 |
| 5642 void Document::removeFromTopLayer(Element* element) { | 5642 void Document::removeFromTopLayer(Element* element) { |
| 5643 if (!element->isInTopLayer()) | 5643 if (!element->isInTopLayer()) |
| 5644 return; | 5644 return; |
| 5645 size_t position = m_topLayerElements.find(element); | 5645 size_t position = m_topLayerElements.find(element); |
| 5646 DCHECK_NE(position, kNotFound); | 5646 DCHECK_NE(position, kNotFound); |
| 5647 m_topLayerElements.remove(position); | 5647 m_topLayerElements.remove(position); |
| 5648 element->setIsInTopLayer(false); | 5648 element->setIsInTopLayer(false); |
| 5649 |
| 5650 // Any scrollers that were laid out from addToTopLayer need to be laid out |
| 5651 // again now to keep FrameView::m_scrollableAreas up to date. To that end, |
| 5652 // force normal layout instead of simplified layout on the document. |
| 5653 // See crbug.com/633520 for details. |
| 5654 if (layoutView()) |
| 5655 layoutView()->setNeedsLayout(LayoutInvalidationReason::TopLayerChanged); |
| 5649 } | 5656 } |
| 5650 | 5657 |
| 5651 HTMLDialogElement* Document::activeModalDialog() const { | 5658 HTMLDialogElement* Document::activeModalDialog() const { |
| 5652 if (m_topLayerElements.isEmpty()) | 5659 if (m_topLayerElements.isEmpty()) |
| 5653 return 0; | 5660 return 0; |
| 5654 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5661 return toHTMLDialogElement(m_topLayerElements.last().get()); |
| 5655 } | 5662 } |
| 5656 | 5663 |
| 5657 void Document::exitPointerLock() { | 5664 void Document::exitPointerLock() { |
| 5658 if (!page()) | 5665 if (!page()) |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6397 } | 6404 } |
| 6398 | 6405 |
| 6399 void showLiveDocumentInstances() { | 6406 void showLiveDocumentInstances() { |
| 6400 WeakDocumentSet& set = liveDocumentSet(); | 6407 WeakDocumentSet& set = liveDocumentSet(); |
| 6401 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6408 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6402 for (Document* document : set) | 6409 for (Document* document : set) |
| 6403 fprintf(stderr, "- Document %p URL: %s\n", document, | 6410 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6404 document->url().getString().utf8().data()); | 6411 document->url().getString().utf8().data()); |
| 6405 } | 6412 } |
| 6406 #endif | 6413 #endif |
| OLD | NEW |