| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidt
h, 0, CSSPrimitiveValue::UnitType::Pixels); | 87 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidt
h, 0, CSSPrimitiveValue::UnitType::Pixels); |
| 88 } | 88 } |
| 89 } else { | 89 } else { |
| 90 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value,
style); | 90 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value,
style); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) | 94 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) |
| 95 { | 95 { |
| 96 if (name == nameAttr) { | 96 if (name == nameAttr) { |
| 97 if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) { | 97 if (inShadowIncludingDocument() && document().isHTMLDocument() && !isInS
hadowTree()) { |
| 98 HTMLDocument& document = toHTMLDocument(this->document()); | 98 HTMLDocument& document = toHTMLDocument(this->document()); |
| 99 document.removeExtraNamedItem(m_name); | 99 document.removeExtraNamedItem(m_name); |
| 100 document.addExtraNamedItem(value); | 100 document.addExtraNamedItem(value); |
| 101 } | 101 } |
| 102 m_name = value; | 102 m_name = value; |
| 103 } else if (name == sandboxAttr) { | 103 } else if (name == sandboxAttr) { |
| 104 m_sandbox->setValue(value); | 104 m_sandbox->setValue(value); |
| 105 UseCounter::count(document(), UseCounter::SandboxViaIFrame); | 105 UseCounter::count(document(), UseCounter::SandboxViaIFrame); |
| 106 } else if (name == referrerpolicyAttr) { | 106 } else if (name == referrerpolicyAttr) { |
| 107 m_referrerPolicy = ReferrerPolicyDefault; | 107 m_referrerPolicy = ReferrerPolicyDefault; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 } | 120 } |
| 121 | 121 |
| 122 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&) | 122 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&) |
| 123 { | 123 { |
| 124 return new LayoutIFrame(this); | 124 return new LayoutIFrame(this); |
| 125 } | 125 } |
| 126 | 126 |
| 127 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode
* insertionPoint) | 127 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode
* insertionPoint) |
| 128 { | 128 { |
| 129 InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(ins
ertionPoint); | 129 InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(ins
ertionPoint); |
| 130 if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertio
nPoint->isInShadowTree()) | 130 if (insertionPoint->inShadowIncludingDocument() && document().isHTMLDocument
() && !insertionPoint->isInShadowTree()) |
| 131 toHTMLDocument(document()).addExtraNamedItem(m_name); | 131 toHTMLDocument(document()).addExtraNamedItem(m_name); |
| 132 logAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr); | 132 logAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr); |
| 133 return result; | 133 return result; |
| 134 } | 134 } |
| 135 | 135 |
| 136 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint) | 136 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint) |
| 137 { | 137 { |
| 138 HTMLFrameElementBase::removedFrom(insertionPoint); | 138 HTMLFrameElementBase::removedFrom(insertionPoint); |
| 139 if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertio
nPoint->isInShadowTree()) | 139 if (insertionPoint->inShadowIncludingDocument() && document().isHTMLDocument
() && !insertionPoint->isInShadowTree()) |
| 140 toHTMLDocument(document()).removeExtraNamedItem(m_name); | 140 toHTMLDocument(document()).removeExtraNamedItem(m_name); |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool HTMLIFrameElement::isInteractiveContent() const | 143 bool HTMLIFrameElement::isInteractiveContent() const |
| 144 { | 144 { |
| 145 return true; | 145 return true; |
| 146 } | 146 } |
| 147 | 147 |
| 148 void HTMLIFrameElement::valueWasSet() | 148 void HTMLIFrameElement::valueWasSet() |
| 149 { | 149 { |
| 150 String invalidTokens; | 150 String invalidTokens; |
| 151 setSandboxFlags(m_sandbox->value().isNull() ? SandboxNone : parseSandboxPoli
cy(m_sandbox->tokens(), invalidTokens)); | 151 setSandboxFlags(m_sandbox->value().isNull() ? SandboxNone : parseSandboxPoli
cy(m_sandbox->tokens(), invalidTokens)); |
| 152 if (!invalidTokens.isNull()) | 152 if (!invalidTokens.isNull()) |
| 153 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource,
ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke
ns)); | 153 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource,
ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke
ns)); |
| 154 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); | 154 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); |
| 155 } | 155 } |
| 156 | 156 |
| 157 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute() | 157 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute() |
| 158 { | 158 { |
| 159 return m_referrerPolicy; | 159 return m_referrerPolicy; |
| 160 } | 160 } |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |