| 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, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 frame_border_set_ = !params.new_value.IsNull(); | 69 frame_border_set_ = !params.new_value.IsNull(); |
| 70 // FIXME: If we are already attached, this has no effect. | 70 // FIXME: If we are already attached, this has no effect. |
| 71 } else if (params.name == noresizeAttr) { | 71 } else if (params.name == noresizeAttr) { |
| 72 if (GetLayoutObject()) | 72 if (GetLayoutObject()) |
| 73 GetLayoutObject()->UpdateFromElement(); | 73 GetLayoutObject()->UpdateFromElement(); |
| 74 } else { | 74 } else { |
| 75 HTMLFrameElementBase::ParseAttribute(params); | 75 HTMLFrameElementBase::ParseAttribute(params); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 Vector<WebParsedFeaturePolicyDeclaration> |
| 80 HTMLFrameElement::ConstructContainerPolicy() const { |
| 81 WebParsedFeaturePolicy base_container_policy = |
| 82 HTMLFrameOwnerElement::ConstructContainerPolicy(); |
| 83 // Frame elements are not allowed to enable the fullscreen feature. Remove any |
| 84 // fullscreen policy which was added by the generic ConstructContainerPolicy |
| 85 // algorithm. |
| 86 Vector<WebParsedFeaturePolicyDeclaration> filtered_container_policy; |
| 87 for (size_t i = 0; i < base_container_policy.size(); ++i) { |
| 88 if (base_container_policy[i].feature != |
| 89 WebFeaturePolicyFeature::kFullscreen) { |
| 90 filtered_container_policy.push_back(base_container_policy[i]); |
| 91 } |
| 92 } |
| 93 // Add an empty whitelist for the fullscreen feature so that the framed |
| 94 // content is unable to use the API, regardless of origin. |
| 95 WebParsedFeaturePolicyDeclaration whitelist; |
| 96 whitelist.feature = WebFeaturePolicyFeature::kFullscreen; |
| 97 whitelist.matches_all_origins = false; |
| 98 whitelist.origins = Vector<WebSecurityOrigin>(0UL); |
| 99 filtered_container_policy.push_back(whitelist); |
| 100 return filtered_container_policy; |
| 101 } |
| 102 |
| 79 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |