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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove duplication in const overload Created 4 years, 7 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
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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 bool hasMutationObservers() const { return m_mutationObserverTypes; } 687 bool hasMutationObservers() const { return m_mutationObserverTypes; }
688 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; } 688 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; }
689 689
690 IntersectionObserverController* intersectionObserverController(); 690 IntersectionObserverController* intersectionObserverController();
691 IntersectionObserverController& ensureIntersectionObserverController(); 691 IntersectionObserverController& ensureIntersectionObserverController();
692 NodeIntersectionObserverData& ensureIntersectionObserverData(); 692 NodeIntersectionObserverData& ensureIntersectionObserverData();
693 693
694 void updateViewportDescription(); 694 void updateViewportDescription();
695 void processReferrerPolicy(const String& policy); 695 void processReferrerPolicy(const String& policy);
696 696
697 // Returns the owning element in the parent document. 697 // Returns the owning element in the parent document. Returns nullptr if
698 // Returns nullptr if this is the top level document. 698 // this is the top level document or the owner is remote.
699 HTMLFrameOwnerElement* ownerElement() const; 699 HTMLFrameOwnerElement* localOwnerElement() const;
dcheng 2016/05/07 06:09:08 Thinking about this more, 'Element' ought to imply
bokan 2016/05/09 20:43:58 sgtm, done.
700 700
701 // Returns true if this document belongs to a frame that the parent document 701 // Returns true if this document belongs to a frame that the parent document
702 // made invisible (for instance by setting as style display:none). 702 // made invisible (for instance by setting as style display:none).
703 bool isInInvisibleSubframe() const; 703 bool isInInvisibleSubframe() const;
704 704
705 String title() const { return m_title; } 705 String title() const { return m_title; }
706 void setTitle(const String&); 706 void setTitle(const String&);
707 707
708 Element* titleElement() const { return m_titleElement.get(); } 708 Element* titleElement() const { return m_titleElement.get(); }
709 void setTitleElement(Element*); 709 void setTitleElement(Element*);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 void enforceStrictMixedContentChecking(); 1064 void enforceStrictMixedContentChecking();
1065 1065
1066 bool mayContainV0Shadow() const { return m_mayContainV0Shadow; } 1066 bool mayContainV0Shadow() const { return m_mayContainV0Shadow; }
1067 1067
1068 ShadowCascadeOrder shadowCascadeOrder() const { return m_shadowCascadeOrder; } 1068 ShadowCascadeOrder shadowCascadeOrder() const { return m_shadowCascadeOrder; }
1069 void setShadowCascadeOrder(ShadowCascadeOrder); 1069 void setShadowCascadeOrder(ShadowCascadeOrder);
1070 1070
1071 void setRootScroller(Element*, ExceptionState&); 1071 void setRootScroller(Element*, ExceptionState&);
1072 Element* rootScroller(); 1072 Element* rootScroller();
1073 1073
1074 bool isInMainFrame() const;
1075
1074 protected: 1076 protected:
1075 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1077 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1076 1078
1077 void didUpdateSecurityOrigin() final; 1079 void didUpdateSecurityOrigin() final;
1078 1080
1079 void clearXMLVersion() { m_xmlVersion = String(); } 1081 void clearXMLVersion() { m_xmlVersion = String(); }
1080 1082
1081 virtual Document* cloneDocumentWithoutChildren(); 1083 virtual Document* cloneDocumentWithoutChildren();
1082 1084
1083 bool importContainerNodeChildren(ContainerNode* oldContainerNode, ContainerN ode* newContainerNode, ExceptionState&); 1085 bool importContainerNodeChildren(ContainerNode* oldContainerNode, ContainerN ode* newContainerNode, ExceptionState&);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1438 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1437 1439
1438 } // namespace blink 1440 } // namespace blink
1439 1441
1440 #ifndef NDEBUG 1442 #ifndef NDEBUG
1441 // Outside the WebCore namespace for ease of invocation from gdb. 1443 // Outside the WebCore namespace for ease of invocation from gdb.
1442 CORE_EXPORT void showLiveDocumentInstances(); 1444 CORE_EXPORT void showLiveDocumentInstances();
1443 #endif 1445 #endif
1444 1446
1445 #endif // Document_h 1447 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698