| 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) 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |