| 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 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return; | 116 return; |
| 117 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame()) | 117 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame()) |
| 118 return; | 118 return; |
| 119 if (contentFrame()->owner()->getSandboxFlags() & SandboxOrigin) | 119 if (contentFrame()->owner()->getSandboxFlags() & SandboxOrigin) |
| 120 return; | 120 return; |
| 121 toLocalFrame(contentFrame()) | 121 toLocalFrame(contentFrame()) |
| 122 ->script() | 122 ->script() |
| 123 .executeScriptIfJavaScriptURL(scriptURL, this); | 123 .executeScriptIfJavaScriptURL(scriptURL, this); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void HTMLFrameElementBase::frameOwnerPropertiesChanged() { | |
| 127 // Don't notify about updates if contentFrame() is null, for example when | |
| 128 // the subframe hasn't been created yet. | |
| 129 if (contentFrame()) | |
| 130 document().frame()->loader().client()->didChangeFrameOwnerProperties(this); | |
| 131 } | |
| 132 | |
| 133 void HTMLFrameElementBase::parseAttribute( | 126 void HTMLFrameElementBase::parseAttribute( |
| 134 const AttributeModificationParams& params) { | 127 const AttributeModificationParams& params) { |
| 135 const QualifiedName& name = params.name; | 128 const QualifiedName& name = params.name; |
| 136 const AtomicString& value = params.newValue; | 129 const AtomicString& value = params.newValue; |
| 137 if (name == srcdocAttr) { | 130 if (name == srcdocAttr) { |
| 138 if (!value.isNull()) { | 131 if (!value.isNull()) { |
| 139 setLocation(srcdocURL().getString()); | 132 setLocation(srcdocURL().getString()); |
| 140 } else { | 133 } else { |
| 141 const AtomicString& srcValue = fastGetAttribute(srcAttr); | 134 const AtomicString& srcValue = fastGetAttribute(srcAttr); |
| 142 if (!srcValue.isNull()) | 135 if (!srcValue.isNull()) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 251 } |
| 259 HTMLFrameOwnerElement::defaultEventHandler(event); | 252 HTMLFrameOwnerElement::defaultEventHandler(event); |
| 260 } | 253 } |
| 261 | 254 |
| 262 void HTMLFrameElementBase::setScrollingMode(ScrollbarMode scrollbarMode) { | 255 void HTMLFrameElementBase::setScrollingMode(ScrollbarMode scrollbarMode) { |
| 263 if (m_scrollingMode == scrollbarMode) | 256 if (m_scrollingMode == scrollbarMode) |
| 264 return; | 257 return; |
| 265 | 258 |
| 266 if (contentDocument()) { | 259 if (contentDocument()) { |
| 267 contentDocument()->willChangeFrameOwnerProperties( | 260 contentDocument()->willChangeFrameOwnerProperties( |
| 268 m_marginWidth, m_marginHeight, scrollbarMode); | 261 m_marginWidth, m_marginHeight, scrollbarMode, isDisplayNone()); |
| 269 } | 262 } |
| 270 m_scrollingMode = scrollbarMode; | 263 m_scrollingMode = scrollbarMode; |
| 271 frameOwnerPropertiesChanged(); | 264 frameOwnerPropertiesChanged(); |
| 272 } | 265 } |
| 273 | 266 |
| 274 void HTMLFrameElementBase::setMarginWidth(int marginWidth) { | 267 void HTMLFrameElementBase::setMarginWidth(int marginWidth) { |
| 275 if (m_marginWidth == marginWidth) | 268 if (m_marginWidth == marginWidth) |
| 276 return; | 269 return; |
| 277 | 270 |
| 278 if (contentDocument()) { | 271 if (contentDocument()) { |
| 279 contentDocument()->willChangeFrameOwnerProperties( | 272 contentDocument()->willChangeFrameOwnerProperties( |
| 280 marginWidth, m_marginHeight, m_scrollingMode); | 273 marginWidth, m_marginHeight, m_scrollingMode, isDisplayNone()); |
| 281 } | 274 } |
| 282 m_marginWidth = marginWidth; | 275 m_marginWidth = marginWidth; |
| 283 frameOwnerPropertiesChanged(); | 276 frameOwnerPropertiesChanged(); |
| 284 } | 277 } |
| 285 | 278 |
| 286 void HTMLFrameElementBase::setMarginHeight(int marginHeight) { | 279 void HTMLFrameElementBase::setMarginHeight(int marginHeight) { |
| 287 if (m_marginHeight == marginHeight) | 280 if (m_marginHeight == marginHeight) |
| 288 return; | 281 return; |
| 289 | 282 |
| 290 if (contentDocument()) { | 283 if (contentDocument()) { |
| 291 contentDocument()->willChangeFrameOwnerProperties( | 284 contentDocument()->willChangeFrameOwnerProperties( |
| 292 m_marginWidth, marginHeight, m_scrollingMode); | 285 m_marginWidth, marginHeight, m_scrollingMode, isDisplayNone()); |
| 293 } | 286 } |
| 294 m_marginHeight = marginHeight; | 287 m_marginHeight = marginHeight; |
| 295 frameOwnerPropertiesChanged(); | 288 frameOwnerPropertiesChanged(); |
| 296 } | 289 } |
| 297 | 290 |
| 298 } // namespace blink | 291 } // namespace blink |
| OLD | NEW |