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 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. |
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. |
11 * | 11 * |
12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
21 * | 21 * |
22 */ | 22 */ |
23 | 23 |
24 #ifndef HTMLIFrameElement_h | 24 #ifndef HTMLIFrameElement_h |
25 #define HTMLIFrameElement_h | 25 #define HTMLIFrameElement_h |
26 | 26 |
27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
28 #include "core/html/HTMLFrameElementBase.h" | 28 #include "core/html/HTMLFrameElementBase.h" |
29 #include "core/html/HTMLIFrameElementAllow.h" | |
29 #include "core/html/HTMLIFrameElementPermissions.h" | 30 #include "core/html/HTMLIFrameElementPermissions.h" |
30 #include "core/html/HTMLIFrameElementSandbox.h" | 31 #include "core/html/HTMLIFrameElementSandbox.h" |
31 #include "platform/Supplementable.h" | 32 #include "platform/Supplementable.h" |
33 #include "public/platform/WebFeaturePolicy.h" | |
32 #include "public/platform/WebVector.h" | 34 #include "public/platform/WebVector.h" |
33 #include "public/platform/modules/permissions/permission.mojom-blink.h" | 35 #include "public/platform/modules/permissions/permission.mojom-blink.h" |
34 | 36 |
35 namespace blink { | 37 namespace blink { |
36 | 38 |
37 class CORE_EXPORT HTMLIFrameElement final | 39 class CORE_EXPORT HTMLIFrameElement final |
38 : public HTMLFrameElementBase, | 40 : public HTMLFrameElementBase, |
39 public Supplementable<HTMLIFrameElement> { | 41 public Supplementable<HTMLIFrameElement> { |
40 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
41 USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElement); | 43 USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElement); |
42 | 44 |
43 public: | 45 public: |
44 DECLARE_NODE_FACTORY(HTMLIFrameElement); | 46 DECLARE_NODE_FACTORY(HTMLIFrameElement); |
45 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
46 ~HTMLIFrameElement() override; | 48 ~HTMLIFrameElement() override; |
47 DOMTokenList* sandbox() const; | 49 DOMTokenList* sandbox() const; |
48 DOMTokenList* permissions() const; | 50 DOMTokenList* permissions() const; |
51 DOMTokenList* allow() const; | |
49 | 52 |
50 void sandboxValueWasSet(); | 53 void sandboxValueWasSet(); |
51 void permissionsValueWasSet(); | 54 void permissionsValueWasSet(); |
55 void allowValueWasSet(); | |
56 | |
57 // Helper function used to process error message for sandbox, permissions, and | |
58 // allow. | |
59 static void addTokenError(StringBuilder& tokenErrors, | |
Rick Byers
2017/02/10 22:09:20
I think hanging this off HTMLIFrameElement is fine
lunalu1
2017/02/10 23:04:12
It is not as trivial as it seems.
parseSandboxPol
Rick Byers
2017/02/11 04:09:19
Thanks for digging into this! Ok, I see how this
| |
60 const StringView& token) { | |
61 tokenErrors.append(tokenErrors.isEmpty() ? "'" : ", '"); | |
62 tokenErrors.append(token); | |
63 tokenErrors.append("'"); | |
64 } | |
52 | 65 |
53 private: | 66 private: |
54 explicit HTMLIFrameElement(Document&); | 67 explicit HTMLIFrameElement(Document&); |
55 | 68 |
56 void parseAttribute(const AttributeModificationParams&) override; | 69 void parseAttribute(const AttributeModificationParams&) override; |
57 bool isPresentationAttribute(const QualifiedName&) const override; | 70 bool isPresentationAttribute(const QualifiedName&) const override; |
58 void collectStyleForPresentationAttribute(const QualifiedName&, | 71 void collectStyleForPresentationAttribute(const QualifiedName&, |
59 const AtomicString&, | 72 const AtomicString&, |
60 MutableStylePropertySet*) override; | 73 MutableStylePropertySet*) override; |
61 | 74 |
(...skipping 22 matching lines...) Expand all Loading... | |
84 | 97 |
85 bool initializePermissionsAttribute(); | 98 bool initializePermissionsAttribute(); |
86 | 99 |
87 AtomicString m_name; | 100 AtomicString m_name; |
88 AtomicString m_csp; | 101 AtomicString m_csp; |
89 bool m_didLoadNonEmptyDocument; | 102 bool m_didLoadNonEmptyDocument; |
90 bool m_allowFullscreen; | 103 bool m_allowFullscreen; |
91 bool m_allowPaymentRequest; | 104 bool m_allowPaymentRequest; |
92 Member<HTMLIFrameElementSandbox> m_sandbox; | 105 Member<HTMLIFrameElementSandbox> m_sandbox; |
93 Member<HTMLIFrameElementPermissions> m_permissions; | 106 Member<HTMLIFrameElementPermissions> m_permissions; |
107 Member<HTMLIFrameElementAllow> m_allow; | |
94 | 108 |
95 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; | 109 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; |
110 HashSet<WebFeaturePolicyFeature> m_allowedFeatureNames; | |
96 | 111 |
97 ReferrerPolicy m_referrerPolicy; | 112 ReferrerPolicy m_referrerPolicy; |
98 }; | 113 }; |
99 | 114 |
100 } // namespace blink | 115 } // namespace blink |
101 | 116 |
102 #endif // HTMLIFrameElement_h | 117 #endif // HTMLIFrameElement_h |
OLD | NEW |