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/html/HTMLFrameElementBase.h" | 28 #include "core/html/HTMLFrameElementBase.h" |
29 #include "core/html/HTMLIFrameElementPermissions.h" | |
28 #include "core/html/HTMLIFrameElementSandbox.h" | 30 #include "core/html/HTMLIFrameElementSandbox.h" |
31 #include "public/platform/WebVector.h" | |
32 #include "public/platform/modules/permissions/WebPermissionType.h" | |
29 | 33 |
30 namespace blink { | 34 namespace blink { |
31 | 35 |
32 class HTMLIFrameElement final : public HTMLFrameElementBase, public DOMTokenList Observer { | 36 class CORE_EXPORT HTMLIFrameElement final : public HTMLFrameElementBase { |
33 DEFINE_WRAPPERTYPEINFO(); | 37 DEFINE_WRAPPERTYPEINFO(); |
34 USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElement); | |
35 public: | 38 public: |
36 DECLARE_NODE_FACTORY(HTMLIFrameElement); | 39 DECLARE_NODE_FACTORY(HTMLIFrameElement); |
37 DECLARE_VIRTUAL_TRACE(); | 40 DECLARE_VIRTUAL_TRACE(); |
38 ~HTMLIFrameElement() override; | 41 ~HTMLIFrameElement() override; |
39 DOMTokenList* sandbox() const; | 42 DOMTokenList* sandbox() const; |
43 DOMTokenList* permissions() const; | |
44 | |
45 void sandboxValueWasSet(); | |
46 void permissionsValueWasSet(); | |
40 | 47 |
41 private: | 48 private: |
42 explicit HTMLIFrameElement(Document&); | 49 explicit HTMLIFrameElement(Document&); |
43 | 50 |
44 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; | 51 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; |
45 bool isPresentationAttribute(const QualifiedName&) const override; | 52 bool isPresentationAttribute(const QualifiedName&) const override; |
46 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override; | 53 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override; |
47 | 54 |
48 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 55 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
49 void removedFrom(ContainerNode*) override; | 56 void removedFrom(ContainerNode*) override; |
50 | 57 |
51 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 58 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
52 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 59 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
53 | 60 |
54 bool loadedNonEmptyDocument() const override { return m_didLoadNonEmptyDocum ent; } | 61 bool loadedNonEmptyDocument() const override { return m_didLoadNonEmptyDocum ent; } |
55 void didLoadNonEmptyDocument() override { m_didLoadNonEmptyDocument = true; } | 62 void didLoadNonEmptyDocument() override { m_didLoadNonEmptyDocument = true; } |
56 bool isInteractiveContent() const override; | 63 bool isInteractiveContent() const override; |
57 | 64 |
58 void valueWasSet() override; | |
59 | |
60 ReferrerPolicy referrerPolicyAttribute() override; | 65 ReferrerPolicy referrerPolicyAttribute() override; |
61 | 66 |
62 bool allowFullscreen() const override { return m_allowFullscreen; } | 67 bool allowFullscreen() const override { return m_allowFullscreen; } |
63 | 68 |
69 const WebVector<WebPermissionType>* delegatedPermissions() const override { return &m_delegatedPermissions; } | |
sof
2016/06/28 05:29:00
What is the assumed lifetime of this value? i.e.,
raymes
2016/06/28 06:49:46
The pointer is just used to reduce copied but the
sof
2016/06/28 06:57:48
ok, it seems unnecessary to resort to returning a
raymes
2016/06/29 05:54:47
I was trying to reduce copies :) I've returned a c
sof
2016/06/29 06:10:28
When & where to optimize is a perennial question,
| |
70 | |
71 bool initializePermissionsAttribute(); | |
72 | |
64 AtomicString m_name; | 73 AtomicString m_name; |
65 bool m_didLoadNonEmptyDocument; | 74 bool m_didLoadNonEmptyDocument; |
66 bool m_allowFullscreen; | 75 bool m_allowFullscreen; |
67 Member<HTMLIFrameElementSandbox> m_sandbox; | 76 Member<HTMLIFrameElementSandbox> m_sandbox; |
77 Member<HTMLIFrameElementPermissions> m_permissions; | |
78 | |
79 WebVector<WebPermissionType> m_delegatedPermissions; | |
68 | 80 |
69 ReferrerPolicy m_referrerPolicy; | 81 ReferrerPolicy m_referrerPolicy; |
70 }; | 82 }; |
71 | 83 |
72 } // namespace blink | 84 } // namespace blink |
73 | 85 |
74 #endif // HTMLIFrameElement_h | 86 #endif // HTMLIFrameElement_h |
OLD | NEW |