| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } else if (name == onbeforeunloadAttr) { | 157 } else if (name == onbeforeunloadAttr) { |
| 158 // FIXME: should <frame> elements have beforeunload handlers? | 158 // FIXME: should <frame> elements have beforeunload handlers? |
| 159 SetAttributeEventListener( | 159 SetAttributeEventListener( |
| 160 EventTypeNames::beforeunload, | 160 EventTypeNames::beforeunload, |
| 161 CreateAttributeEventListener(this, name, value, EventParameterName())); | 161 CreateAttributeEventListener(this, name, value, EventParameterName())); |
| 162 } else { | 162 } else { |
| 163 HTMLFrameOwnerElement::ParseAttribute(params); | 163 HTMLFrameOwnerElement::ParseAttribute(params); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 RefPtr<SecurityOrigin> HTMLFrameElementBase::GetOriginForFeaturePolicy() const { |
| 168 // Sandboxed frames have a unique origin. |
| 169 if (GetSandboxFlags() & kSandboxOrigin) |
| 170 return SecurityOrigin::CreateUnique(); |
| 171 |
| 172 // If the frame will inherit its origin from the owner, then use the owner's |
| 173 // origin when constructing the container policy. |
| 174 KURL url = GetDocument().CompleteURL(url_); |
| 175 if (Document::ShouldInheritSecurityOriginFromOwner(url)) |
| 176 return GetDocument().GetSecurityOrigin(); |
| 177 |
| 178 // Other frames should use the origin defined by the absolute URL (this will |
| 179 // be a unique origin for data: URLs) |
| 180 return SecurityOrigin::Create(url); |
| 181 } |
| 182 |
| 167 void HTMLFrameElementBase::SetNameAndOpenURL() { | 183 void HTMLFrameElementBase::SetNameAndOpenURL() { |
| 168 frame_name_ = GetNameAttribute(); | 184 frame_name_ = GetNameAttribute(); |
| 169 OpenURL(); | 185 OpenURL(); |
| 170 } | 186 } |
| 171 | 187 |
| 172 Node::InsertionNotificationRequest HTMLFrameElementBase::InsertedInto( | 188 Node::InsertionNotificationRequest HTMLFrameElementBase::InsertedInto( |
| 173 ContainerNode* insertion_point) { | 189 ContainerNode* insertion_point) { |
| 174 HTMLFrameOwnerElement::InsertedInto(insertion_point); | 190 HTMLFrameOwnerElement::InsertedInto(insertion_point); |
| 175 return kInsertionShouldCallDidNotifySubtreeInsertions; | 191 return kInsertionShouldCallDidNotifySubtreeInsertions; |
| 176 } | 192 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 288 |
| 273 if (contentDocument()) { | 289 if (contentDocument()) { |
| 274 contentDocument()->WillChangeFrameOwnerProperties( | 290 contentDocument()->WillChangeFrameOwnerProperties( |
| 275 margin_width_, margin_height, scrolling_mode_, IsDisplayNone()); | 291 margin_width_, margin_height, scrolling_mode_, IsDisplayNone()); |
| 276 } | 292 } |
| 277 margin_height_ = margin_height; | 293 margin_height_ = margin_height; |
| 278 FrameOwnerPropertiesChanged(); | 294 FrameOwnerPropertiesChanged(); |
| 279 } | 295 } |
| 280 | 296 |
| 281 } // namespace blink | 297 } // namespace blink |
| OLD | NEW |