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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 if (name == nameAttr) { | 113 if (name == nameAttr) { |
114 if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) { | 114 if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) { |
115 HTMLDocument& document = toHTMLDocument(this->document()); | 115 HTMLDocument& document = toHTMLDocument(this->document()); |
116 document.removeExtraNamedItem(m_name); | 116 document.removeExtraNamedItem(m_name); |
117 document.addExtraNamedItem(value); | 117 document.addExtraNamedItem(value); |
118 } | 118 } |
119 m_name = value; | 119 m_name = value; |
120 } else if (name == sandboxAttr) { | 120 } else if (name == sandboxAttr) { |
121 m_sandbox->setValue(value); | 121 m_sandbox->setValue(value); |
122 UseCounter::count(document(), UseCounter::SandboxViaIFrame); | 122 UseCounter::count(document(), UseCounter::SandboxViaIFrame); |
123 } else if (name == marginwidthAttr) { | |
dcheng
2015/09/02 06:38:26
I believe these attributes are supported on <frame
lazyboy
2015/09/02 16:56:30
Right, I forgot to move these back to FrameElement
| |
124 setMarginWidth(value.toInt()); | |
125 // FIXME: If we are already attached, this has no effect. | |
126 } else if (name == marginheightAttr) { | |
127 setMarginHeight(value.toInt()); | |
128 // FIXME: If we are already attached, this has no effect. | |
129 } else if (name == scrollingAttr) { | |
130 // Auto and yes both simply mean "allow scrolling." No means "don't allo w scrolling." | |
131 if (equalIgnoringCase(value, "auto") || equalIgnoringCase(value, "yes")) | |
132 setScrollingMode(ScrollbarAuto); | |
133 else if (equalIgnoringCase(value, "no")) | |
134 setScrollingMode(ScrollbarAlwaysOff); | |
135 // FIXME: If we are already attached, this has no effect. | |
123 } else { | 136 } else { |
124 HTMLFrameElementBase::parseAttribute(name, value); | 137 HTMLFrameElementBase::parseAttribute(name, value); |
125 } | 138 } |
126 } | 139 } |
127 | 140 |
128 bool HTMLIFrameElement::layoutObjectIsNeeded(const ComputedStyle& style) | 141 bool HTMLIFrameElement::layoutObjectIsNeeded(const ComputedStyle& style) |
129 { | 142 { |
130 return isURLAllowed() && HTMLElement::layoutObjectIsNeeded(style); | 143 return isURLAllowed() && HTMLElement::layoutObjectIsNeeded(style); |
131 } | 144 } |
132 | 145 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 void HTMLIFrameElement::valueChanged() | 180 void HTMLIFrameElement::valueChanged() |
168 { | 181 { |
169 String invalidTokens; | 182 String invalidTokens; |
170 setSandboxFlags(m_sandbox->value().isNull() ? SandboxNone : parseSandboxPoli cy(m_sandbox->tokens(), invalidTokens)); | 183 setSandboxFlags(m_sandbox->value().isNull() ? SandboxNone : parseSandboxPoli cy(m_sandbox->tokens(), invalidTokens)); |
171 if (!invalidTokens.isNull()) | 184 if (!invalidTokens.isNull()) |
172 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke ns)); | 185 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke ns)); |
173 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); | 186 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); |
174 } | 187 } |
175 | 188 |
176 } | 189 } |
OLD | NEW |