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

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

Issue 176763009: Have DOMWindow deal with references instead of pointers when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | Annotate | Revision Log
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 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 bool Document::hasManifest() const 686 bool Document::hasManifest() const
687 { 687 {
688 return documentElement() && documentElement()->hasTagName(htmlTag) && docume ntElement()->hasAttribute(manifestAttr); 688 return documentElement() && documentElement()->hasTagName(htmlTag) && docume ntElement()->hasAttribute(manifestAttr);
689 } 689 }
690 690
691 Location* Document::location() const 691 Location* Document::location() const
692 { 692 {
693 if (!frame()) 693 if (!frame())
694 return 0; 694 return 0;
695 695
696 return domWindow()->location(); 696 return &domWindow()->location();
697 } 697 }
698 698
699 void Document::childrenChanged(bool changedByParser, Node* beforeChange, Node* a fterChange, int childCountDelta) 699 void Document::childrenChanged(bool changedByParser, Node* beforeChange, Node* a fterChange, int childCountDelta)
700 { 700 {
701 ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, c hildCountDelta); 701 ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, c hildCountDelta);
702 702
703 Element* newDocumentElement = ElementTraversal::firstWithin(*this); 703 Element* newDocumentElement = ElementTraversal::firstWithin(*this);
704 if (newDocumentElement == m_documentElement) 704 if (newDocumentElement == m_documentElement)
705 return; 705 return;
706 m_documentElement = newDocumentElement; 706 m_documentElement = newDocumentElement;
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
5483 } 5483 }
5484 5484
5485 void Document::invalidateNodeListCaches(const QualifiedName* attrName) 5485 void Document::invalidateNodeListCaches(const QualifiedName* attrName)
5486 { 5486 {
5487 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( ); 5487 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( );
5488 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it) 5488 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it)
5489 (*it)->invalidateCache(attrName); 5489 (*it)->invalidateCache(attrName);
5490 } 5490 }
5491 5491
5492 } // namespace WebCore 5492 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698