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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Ericsson AB. All rights reserved. 7 * Copyright (C) 2009 Ericsson AB. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidt h, 0, CSSPrimitiveValue::UnitType::Pixels); 89 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidt h, 0, CSSPrimitiveValue::UnitType::Pixels);
90 } 90 }
91 } else { 91 } else {
92 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value, style); 92 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value, style);
93 } 93 }
94 } 94 }
95 95
96 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value) 96 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value)
97 { 97 {
98 if (name == nameAttr) { 98 if (name == nameAttr) {
99 if (inShadowIncludingDocument() && document().isHTMLDocument() && !isInS hadowTree()) { 99 if (isConnected() && document().isHTMLDocument() && !isInShadowTree()) {
100 HTMLDocument& document = toHTMLDocument(this->document()); 100 HTMLDocument& document = toHTMLDocument(this->document());
101 document.removeExtraNamedItem(m_name); 101 document.removeExtraNamedItem(m_name);
102 document.addExtraNamedItem(value); 102 document.addExtraNamedItem(value);
103 } 103 }
104 m_name = value; 104 m_name = value;
105 } else if (name == sandboxAttr) { 105 } else if (name == sandboxAttr) {
106 m_sandbox->setValue(value); 106 m_sandbox->setValue(value);
107 UseCounter::count(document(), UseCounter::SandboxViaIFrame); 107 UseCounter::count(document(), UseCounter::SandboxViaIFrame);
108 } else if (name == referrerpolicyAttr) { 108 } else if (name == referrerpolicyAttr) {
109 m_referrerPolicy = ReferrerPolicyDefault; 109 m_referrerPolicy = ReferrerPolicyDefault;
(...skipping 20 matching lines...) Expand all
130 } 130 }
131 131
132 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&) 132 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&)
133 { 133 {
134 return new LayoutIFrame(this); 134 return new LayoutIFrame(this);
135 } 135 }
136 136
137 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode * insertionPoint) 137 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode * insertionPoint)
138 { 138 {
139 InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(ins ertionPoint); 139 InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(ins ertionPoint);
140 if (insertionPoint->inShadowIncludingDocument() && document().isHTMLDocument () && !insertionPoint->isInShadowTree()) 140 if (insertionPoint->isConnected() && document().isHTMLDocument() && !inserti onPoint->isInShadowTree())
141 toHTMLDocument(document()).addExtraNamedItem(m_name); 141 toHTMLDocument(document()).addExtraNamedItem(m_name);
142 logAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr); 142 logAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr);
143 return result; 143 return result;
144 } 144 }
145 145
146 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint) 146 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
147 { 147 {
148 HTMLFrameElementBase::removedFrom(insertionPoint); 148 HTMLFrameElementBase::removedFrom(insertionPoint);
149 if (insertionPoint->inShadowIncludingDocument() && document().isHTMLDocument () && !insertionPoint->isInShadowTree()) 149 if (insertionPoint->isConnected() && document().isHTMLDocument() && !inserti onPoint->isInShadowTree())
150 toHTMLDocument(document()).removeExtraNamedItem(m_name); 150 toHTMLDocument(document()).removeExtraNamedItem(m_name);
151 } 151 }
152 152
153 bool HTMLIFrameElement::isInteractiveContent() const 153 bool HTMLIFrameElement::isInteractiveContent() const
154 { 154 {
155 return true; 155 return true;
156 } 156 }
157 157
158 void HTMLIFrameElement::permissionsValueWasSet() 158 void HTMLIFrameElement::permissionsValueWasSet()
159 { 159 {
(...skipping 26 matching lines...) Expand all
186 { 186 {
187 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) 187 if (!RuntimeEnabledFeatures::permissionDelegationEnabled())
188 return false; 188 return false;
189 189
190 if (!m_permissions) 190 if (!m_permissions)
191 m_permissions = HTMLIFrameElementPermissions::create(this); 191 m_permissions = HTMLIFrameElementPermissions::create(this);
192 return true; 192 return true;
193 } 193 }
194 194
195 } // namespace blink 195 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameSetElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698