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 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 bool use_fallback = false; | 261 bool use_fallback = false; |
262 LoadPlugin(url, service_type_, param_names, param_values, use_fallback, | 262 LoadPlugin(url, service_type_, param_names, param_values, use_fallback, |
263 false); | 263 false); |
264 } | 264 } |
265 | 265 |
266 bool HTMLPlugInElement::ShouldAccelerate() const { | 266 bool HTMLPlugInElement::ShouldAccelerate() const { |
267 PluginView* plugin = OwnedPlugin(); | 267 PluginView* plugin = OwnedPlugin(); |
268 return plugin && plugin->PlatformLayer(); | 268 return plugin && plugin->PlatformLayer(); |
269 } | 269 } |
270 | 270 |
| 271 Vector<WebParsedFeaturePolicyDeclaration> |
| 272 HTMLPlugInElement::ConstructContainerPolicy() const { |
| 273 // Plugin elements (<object> and <embed>) are not allowed to enable the |
| 274 // fullscreen feature. Add an empty whitelist for the fullscreen feature so |
| 275 // that the nested browsing context is unable to use the API, regardless of |
| 276 // origin. |
| 277 // https://fullscreen.spec.whatwg.org/#model |
| 278 Vector<WebParsedFeaturePolicyDeclaration> container_policy; |
| 279 WebParsedFeaturePolicyDeclaration whitelist; |
| 280 whitelist.feature = WebFeaturePolicyFeature::kFullscreen; |
| 281 whitelist.matches_all_origins = false; |
| 282 whitelist.origins = Vector<WebSecurityOrigin>(0UL); |
| 283 container_policy.push_back(whitelist); |
| 284 return container_policy; |
| 285 } |
| 286 |
271 void HTMLPlugInElement::DetachLayoutTree(const AttachContext& context) { | 287 void HTMLPlugInElement::DetachLayoutTree(const AttachContext& context) { |
272 // Update the FrameViewBase the next time we attach (detaching destroys the | 288 // Update the FrameViewBase the next time we attach (detaching destroys the |
273 // plugin). | 289 // plugin). |
274 // FIXME: None of this "needsPluginUpdate" related code looks right. | 290 // FIXME: None of this "needsPluginUpdate" related code looks right. |
275 if (GetLayoutObject() && !UseFallbackContent()) | 291 if (GetLayoutObject() && !UseFallbackContent()) |
276 SetNeedsPluginUpdate(true); | 292 SetNeedsPluginUpdate(true); |
277 | 293 |
278 if (is_delaying_load_event_) { | 294 if (is_delaying_load_event_) { |
279 is_delaying_load_event_ = false; | 295 is_delaying_load_event_ = false; |
280 GetDocument().DecrementLoadEventDelayCount(); | 296 GetDocument().DecrementLoadEventDelayCount(); |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 689 |
674 void HTMLPlugInElement::LazyReattachIfNeeded() { | 690 void HTMLPlugInElement::LazyReattachIfNeeded() { |
675 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && | 691 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && |
676 !IsImageType()) { | 692 !IsImageType()) { |
677 LazyReattachIfAttached(); | 693 LazyReattachIfAttached(); |
678 SetPersistedPlugin(nullptr); | 694 SetPersistedPlugin(nullptr); |
679 } | 695 } |
680 } | 696 } |
681 | 697 |
682 } // namespace blink | 698 } // namespace blink |
OLD | NEW |