| 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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 4648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4659 | 4659 |
| 4660 void Document::enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObjec
t) | 4660 void Document::enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObjec
t) |
| 4661 { | 4661 { |
| 4662 if (!ContextFeatures::pushStateEnabled(this)) | 4662 if (!ContextFeatures::pushStateEnabled(this)) |
| 4663 return; | 4663 return; |
| 4664 | 4664 |
| 4665 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36202 Popstate event needs
to fire asynchronously | 4665 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36202 Popstate event needs
to fire asynchronously |
| 4666 dispatchWindowEvent(PopStateEvent::create(stateObject, domWindow() ? domWind
ow()->history() : 0)); | 4666 dispatchWindowEvent(PopStateEvent::create(stateObject, domWindow() ? domWind
ow()->history() : 0)); |
| 4667 } | 4667 } |
| 4668 | 4668 |
| 4669 void Document::addToTopLayer(Element* element) | 4669 void Document::addToTopLayer(Element* element, const Element* before) |
| 4670 { | 4670 { |
| 4671 if (element->isInTopLayer()) | 4671 if (element->isInTopLayer()) |
| 4672 return; | 4672 return; |
| 4673 |
| 4673 ASSERT(!m_topLayerElements.contains(element)); | 4674 ASSERT(!m_topLayerElements.contains(element)); |
| 4674 m_topLayerElements.append(element); | 4675 ASSERT(!before || m_topLayerElements.contains(before)); |
| 4676 if (before) { |
| 4677 size_t beforePosition = m_topLayerElements.find(before); |
| 4678 m_topLayerElements.insert(beforePosition, element); |
| 4679 } else { |
| 4680 m_topLayerElements.append(element); |
| 4681 } |
| 4675 element->setIsInTopLayer(true); | 4682 element->setIsInTopLayer(true); |
| 4676 } | 4683 } |
| 4677 | 4684 |
| 4678 void Document::removeFromTopLayer(Element* element) | 4685 void Document::removeFromTopLayer(Element* element) |
| 4679 { | 4686 { |
| 4680 if (!element->isInTopLayer()) | 4687 if (!element->isInTopLayer()) |
| 4681 return; | 4688 return; |
| 4682 size_t position = m_topLayerElements.find(element); | 4689 size_t position = m_topLayerElements.find(element); |
| 4683 ASSERT(position != notFound); | 4690 ASSERT(position != notFound); |
| 4684 m_topLayerElements.remove(position); | 4691 m_topLayerElements.remove(position); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5230 { | 5237 { |
| 5231 return DocumentLifecycleNotifier::create(this); | 5238 return DocumentLifecycleNotifier::create(this); |
| 5232 } | 5239 } |
| 5233 | 5240 |
| 5234 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5241 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
| 5235 { | 5242 { |
| 5236 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5243 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
| 5237 } | 5244 } |
| 5238 | 5245 |
| 5239 } // namespace WebCore | 5246 } // namespace WebCore |
| OLD | NEW |