| 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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 } | 988 } |
| 989 default: | 989 default: |
| 990 if (source->isShadowRoot()) { | 990 if (source->isShadowRoot()) { |
| 991 // ShadowRoot cannot disconnect itself from the host node. | 991 // ShadowRoot cannot disconnect itself from the host node. |
| 992 exceptionState.throwDOMException(HierarchyRequestError, "The node pr
ovided is a shadow root, which may not be adopted."); | 992 exceptionState.throwDOMException(HierarchyRequestError, "The node pr
ovided is a shadow root, which may not be adopted."); |
| 993 return nullptr; | 993 return nullptr; |
| 994 } | 994 } |
| 995 | 995 |
| 996 if (source->isFrameOwnerElement()) { | 996 if (source->isFrameOwnerElement()) { |
| 997 HTMLFrameOwnerElement* frameOwnerElement = toHTMLFrameOwnerElement(s
ource.get()); | 997 HTMLFrameOwnerElement* frameOwnerElement = toHTMLFrameOwnerElement(s
ource.get()); |
| 998 if (frame() && frame()->tree().isDescendantOf(frameOwnerElement->con
tentFrame())) { | 998 if (frame() && frame()->tree().isDescendantOf(toLocalFrame(frameOwne
rElement->contentFrame()))) { |
| 999 exceptionState.throwDOMException(HierarchyRequestError, "The nod
e provided is a frame which contains this document."); | 999 exceptionState.throwDOMException(HierarchyRequestError, "The nod
e provided is a frame which contains this document."); |
| 1000 return nullptr; | 1000 return nullptr; |
| 1001 } | 1001 } |
| 1002 } | 1002 } |
| 1003 if (source->parentNode()) { | 1003 if (source->parentNode()) { |
| 1004 source->parentNode()->removeChild(source.get(), exceptionState); | 1004 source->parentNode()->removeChild(source.get(), exceptionState); |
| 1005 if (exceptionState.hadException()) | 1005 if (exceptionState.hadException()) |
| 1006 return nullptr; | 1006 return nullptr; |
| 1007 } | 1007 } |
| 1008 } | 1008 } |
| (...skipping 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5443 return body(); | 5443 return body(); |
| 5444 } | 5444 } |
| 5445 | 5445 |
| 5446 bool Document::hasFocus() const | 5446 bool Document::hasFocus() const |
| 5447 { | 5447 { |
| 5448 Page* page = this->page(); | 5448 Page* page = this->page(); |
| 5449 if (!page) | 5449 if (!page) |
| 5450 return false; | 5450 return false; |
| 5451 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5451 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
| 5452 return false; | 5452 return false; |
| 5453 if (LocalFrame* focusedFrame = page->focusController().focusedFrame()) { | 5453 if (LocalFrame* focusedFrame = toLocalFrame(page->focusController().focusedF
rame())) { |
| 5454 if (focusedFrame->tree().isDescendantOf(frame())) | 5454 if (focusedFrame->tree().isDescendantOf(frame())) |
| 5455 return true; | 5455 return true; |
| 5456 } | 5456 } |
| 5457 return false; | 5457 return false; |
| 5458 } | 5458 } |
| 5459 | 5459 |
| 5460 // FIXME: Remove this code once we have input routing in the browser | 5460 // FIXME: Remove this code once we have input routing in the browser |
| 5461 // process. See http://crbug.com/339659. | 5461 // process. See http://crbug.com/339659. |
| 5462 void Document::defaultEventHandler(Event* event) | 5462 void Document::defaultEventHandler(Event* event) |
| 5463 { | 5463 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5496 } | 5496 } |
| 5497 | 5497 |
| 5498 void Document::invalidateNodeListCaches(const QualifiedName* attrName) | 5498 void Document::invalidateNodeListCaches(const QualifiedName* attrName) |
| 5499 { | 5499 { |
| 5500 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); | 5500 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); |
| 5501 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) | 5501 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) |
| 5502 (*it)->invalidateCache(attrName); | 5502 (*it)->invalidateCache(attrName); |
| 5503 } | 5503 } |
| 5504 | 5504 |
| 5505 } // namespace WebCore | 5505 } // namespace WebCore |
| OLD | NEW |