| 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 |
| 126 void HTMLFrameElementBase::parseAttribute( | 133 void HTMLFrameElementBase::parseAttribute( |
| 127 const AttributeModificationParams& params) { | 134 const AttributeModificationParams& params) { |
| 128 const QualifiedName& name = params.name; | 135 const QualifiedName& name = params.name; |
| 129 const AtomicString& value = params.newValue; | 136 const AtomicString& value = params.newValue; |
| 130 if (name == srcdocAttr) { | 137 if (name == srcdocAttr) { |
| 131 if (!value.isNull()) { | 138 if (!value.isNull()) { |
| 132 setLocation(srcdocURL().getString()); | 139 setLocation(srcdocURL().getString()); |
| 133 } else { | 140 } else { |
| 134 const AtomicString& srcValue = fastGetAttribute(srcAttr); | 141 const AtomicString& srcValue = fastGetAttribute(srcAttr); |
| 135 if (!srcValue.isNull()) | 142 if (!srcValue.isNull()) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 } | 258 } |
| 252 HTMLFrameOwnerElement::defaultEventHandler(event); | 259 HTMLFrameOwnerElement::defaultEventHandler(event); |
| 253 } | 260 } |
| 254 | 261 |
| 255 void HTMLFrameElementBase::setScrollingMode(ScrollbarMode scrollbarMode) { | 262 void HTMLFrameElementBase::setScrollingMode(ScrollbarMode scrollbarMode) { |
| 256 if (m_scrollingMode == scrollbarMode) | 263 if (m_scrollingMode == scrollbarMode) |
| 257 return; | 264 return; |
| 258 | 265 |
| 259 if (contentDocument()) { | 266 if (contentDocument()) { |
| 260 contentDocument()->willChangeFrameOwnerProperties( | 267 contentDocument()->willChangeFrameOwnerProperties( |
| 261 m_marginWidth, m_marginHeight, scrollbarMode, isDisplayNone()); | 268 m_marginWidth, m_marginHeight, scrollbarMode); |
| 262 } | 269 } |
| 263 m_scrollingMode = scrollbarMode; | 270 m_scrollingMode = scrollbarMode; |
| 264 frameOwnerPropertiesChanged(); | 271 frameOwnerPropertiesChanged(); |
| 265 } | 272 } |
| 266 | 273 |
| 267 void HTMLFrameElementBase::setMarginWidth(int marginWidth) { | 274 void HTMLFrameElementBase::setMarginWidth(int marginWidth) { |
| 268 if (m_marginWidth == marginWidth) | 275 if (m_marginWidth == marginWidth) |
| 269 return; | 276 return; |
| 270 | 277 |
| 271 if (contentDocument()) { | 278 if (contentDocument()) { |
| 272 contentDocument()->willChangeFrameOwnerProperties( | 279 contentDocument()->willChangeFrameOwnerProperties( |
| 273 marginWidth, m_marginHeight, m_scrollingMode, isDisplayNone()); | 280 marginWidth, m_marginHeight, m_scrollingMode); |
| 274 } | 281 } |
| 275 m_marginWidth = marginWidth; | 282 m_marginWidth = marginWidth; |
| 276 frameOwnerPropertiesChanged(); | 283 frameOwnerPropertiesChanged(); |
| 277 } | 284 } |
| 278 | 285 |
| 279 void HTMLFrameElementBase::setMarginHeight(int marginHeight) { | 286 void HTMLFrameElementBase::setMarginHeight(int marginHeight) { |
| 280 if (m_marginHeight == marginHeight) | 287 if (m_marginHeight == marginHeight) |
| 281 return; | 288 return; |
| 282 | 289 |
| 283 if (contentDocument()) { | 290 if (contentDocument()) { |
| 284 contentDocument()->willChangeFrameOwnerProperties( | 291 contentDocument()->willChangeFrameOwnerProperties( |
| 285 m_marginWidth, marginHeight, m_scrollingMode, isDisplayNone()); | 292 m_marginWidth, marginHeight, m_scrollingMode); |
| 286 } | 293 } |
| 287 m_marginHeight = marginHeight; | 294 m_marginHeight = marginHeight; |
| 288 frameOwnerPropertiesChanged(); | 295 frameOwnerPropertiesChanged(); |
| 289 } | 296 } |
| 290 | 297 |
| 291 } // namespace blink | 298 } // namespace blink |
| OLD | NEW |