| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 { | 698 { |
| 699 if (!frame()) | 699 if (!frame()) |
| 700 return 0; | 700 return 0; |
| 701 | 701 |
| 702 return &domWindow()->location(); | 702 return &domWindow()->location(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 void Document::childrenChanged(bool changedByParser, Node* beforeChange, Node* a
fterChange, int childCountDelta) | 705 void Document::childrenChanged(bool changedByParser, Node* beforeChange, Node* a
fterChange, int childCountDelta) |
| 706 { | 706 { |
| 707 ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, c
hildCountDelta); | 707 ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, c
hildCountDelta); |
| 708 | 708 m_documentElement = ElementTraversal::firstWithin(*this); |
| 709 Element* newDocumentElement = ElementTraversal::firstWithin(*this); | |
| 710 if (newDocumentElement == m_documentElement) | |
| 711 return; | |
| 712 m_documentElement = newDocumentElement; | |
| 713 // The root style used for media query matching depends on the document elem
ent. | |
| 714 clearStyleResolver(); | |
| 715 } | 709 } |
| 716 | 710 |
| 717 PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
tate& exceptionState) | 711 PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
tate& exceptionState) |
| 718 { | 712 { |
| 719 if (!isValidName(name)) { | 713 if (!isValidName(name)) { |
| 720 exceptionState.throwDOMException(InvalidCharacterError, "The tag name pr
ovided ('" + name + "') is not a valid name."); | 714 exceptionState.throwDOMException(InvalidCharacterError, "The tag name pr
ovided ('" + name + "') is not a valid name."); |
| 721 return nullptr; | 715 return nullptr; |
| 722 } | 716 } |
| 723 | 717 |
| 724 if (isXHTMLDocument() || isHTMLDocument()) | 718 if (isXHTMLDocument() || isHTMLDocument()) |
| (...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 } | 5495 } |
| 5502 | 5496 |
| 5503 void Document::invalidateNodeListCaches(const QualifiedName* attrName) | 5497 void Document::invalidateNodeListCaches(const QualifiedName* attrName) |
| 5504 { | 5498 { |
| 5505 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); | 5499 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); |
| 5506 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) | 5500 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) |
| 5507 (*it)->invalidateCache(attrName); | 5501 (*it)->invalidateCache(attrName); |
| 5508 } | 5502 } |
| 5509 | 5503 |
| 5510 } // namespace WebCore | 5504 } // namespace WebCore |
| OLD | NEW |