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

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

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 addPropertyToPresentationAttributeStyle( 90 addPropertyToPresentationAttributeStyle(
91 style, CSSPropertyBorderWidth, 0, 91 style, CSSPropertyBorderWidth, 0,
92 CSSPrimitiveValue::UnitType::Pixels); 92 CSSPrimitiveValue::UnitType::Pixels);
93 } 93 }
94 } else { 94 } else {
95 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value, 95 HTMLFrameElementBase::collectStyleForPresentationAttribute(name, value,
96 style); 96 style);
97 } 97 }
98 } 98 }
99 99
100 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, 100 void HTMLIFrameElement::parseAttribute(
101 const AtomicString& oldValue, 101 const AttributeModificationParams& params) {
102 const AtomicString& value) { 102 const QualifiedName& name = params.name;
103 const AtomicString& value = params.newValue;
103 if (name == nameAttr) { 104 if (name == nameAttr) {
104 if (isInDocumentTree() && document().isHTMLDocument()) { 105 if (isInDocumentTree() && document().isHTMLDocument()) {
105 HTMLDocument& document = toHTMLDocument(this->document()); 106 HTMLDocument& document = toHTMLDocument(this->document());
106 document.removeExtraNamedItem(m_name); 107 document.removeExtraNamedItem(m_name);
107 document.addExtraNamedItem(value); 108 document.addExtraNamedItem(value);
108 } 109 }
109 m_name = value; 110 m_name = value;
110 } else if (name == sandboxAttr) { 111 } else if (name == sandboxAttr) {
111 m_sandbox->setValue(value); 112 m_sandbox->setValue(value);
112 UseCounter::count(document(), UseCounter::SandboxViaIFrame); 113 UseCounter::count(document(), UseCounter::SandboxViaIFrame);
(...skipping 24 matching lines...) Expand all
137 OtherMessageSource, ErrorMessageLevel, 138 OtherMessageSource, ErrorMessageLevel,
138 "'csp' attribute contains non-ASCII characters: " + value)); 139 "'csp' attribute contains non-ASCII characters: " + value));
139 return; 140 return;
140 } 141 }
141 AtomicString oldCSP = m_csp; 142 AtomicString oldCSP = m_csp;
142 m_csp = value; 143 m_csp = value;
143 if (m_csp != oldCSP) 144 if (m_csp != oldCSP)
144 frameOwnerPropertiesChanged(); 145 frameOwnerPropertiesChanged();
145 } else { 146 } else {
146 if (name == srcAttr) 147 if (name == srcAttr)
147 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", srcAttr, 148 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", params);
148 oldValue, value); 149 HTMLFrameElementBase::parseAttribute(params);
149 HTMLFrameElementBase::parseAttribute(name, oldValue, value);
150 } 150 }
151 } 151 }
152 152
153 bool HTMLIFrameElement::layoutObjectIsNeeded(const ComputedStyle& style) { 153 bool HTMLIFrameElement::layoutObjectIsNeeded(const ComputedStyle& style) {
154 return contentFrame() && HTMLElement::layoutObjectIsNeeded(style); 154 return contentFrame() && HTMLElement::layoutObjectIsNeeded(style);
155 } 155 }
156 156
157 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&) { 157 LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&) {
158 return new LayoutIFrame(this); 158 return new LayoutIFrame(this);
159 } 159 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool HTMLIFrameElement::initializePermissionsAttribute() { 212 bool HTMLIFrameElement::initializePermissionsAttribute() {
213 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) 213 if (!RuntimeEnabledFeatures::permissionDelegationEnabled())
214 return false; 214 return false;
215 215
216 if (!m_permissions) 216 if (!m_permissions)
217 m_permissions = HTMLIFrameElementPermissions::create(this); 217 m_permissions = HTMLIFrameElementPermissions::create(this);
218 return true; 218 return true;
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.h ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698