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 HTMLFrameletElement_h |
25 #define HTMLIFrameElement_h | 25 #define HTMLFrameletElement_h |
26 | 26 |
| 27 #include "core/CoreExport.h" |
27 #include "core/html/HTMLFrameElementBase.h" | 28 #include "core/html/HTMLFrameElementBase.h" |
| 29 #include "core/html/HTMLFrameOwnerElement.h" |
28 #include "core/html/HTMLIFrameElementSandbox.h" | 30 #include "core/html/HTMLIFrameElementSandbox.h" |
29 | 31 |
30 namespace blink { | 32 namespace blink { |
31 | 33 |
32 class HTMLIFrameElement final : public HTMLFrameElementBase, public DOMSettableT
okenListObserver { | 34 class Framelet; |
| 35 class WebLayer; |
| 36 |
| 37 class HTMLFrameletElement final : public HTMLFrameOwnerElement { |
33 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
34 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElement); | 39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLFrameletElement); |
| 40 |
35 public: | 41 public: |
36 DECLARE_NODE_FACTORY(HTMLIFrameElement); | 42 DECLARE_NODE_FACTORY(HTMLFrameletElement); |
37 DECLARE_VIRTUAL_TRACE(); | 43 ~HTMLFrameletElement() override; |
38 ~HTMLIFrameElement() override; | 44 |
39 DOMSettableTokenList* sandbox() const; | 45 BLINK_EXPORT void setWebLayer(WebLayer*); |
| 46 WebLayer* webLayer() { return m_webLayer; } |
| 47 |
| 48 BLINK_EXPORT void setFramelet(Framelet*); |
| 49 Framelet* framelet() { return m_framelet; } |
| 50 |
| 51 void attach(const AttachContext& = AttachContext()) final; |
| 52 void defaultEventHandler(Event*) final; |
| 53 void detach(const AttachContext& = AttachContext()) final; |
| 54 bool isKeyboardFocusable() const final; |
| 55 bool supportsFocus() const final; |
| 56 |
| 57 // Node overrides |
| 58 bool isFrameletElement() const override { return true; } |
40 | 59 |
41 private: | 60 private: |
42 explicit HTMLIFrameElement(Document&); | 61 explicit HTMLFrameletElement(Document&); |
| 62 |
| 63 void setURL(const String&); |
43 | 64 |
44 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 65 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
45 bool isPresentationAttribute(const QualifiedName&) const override; | |
46 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; | 66 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; |
47 | 67 |
48 InsertionNotificationRequest insertedInto(ContainerNode*) override; | |
49 void removedFrom(ContainerNode*) override; | |
50 | |
51 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 68 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
52 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 69 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
53 | 70 |
54 bool loadedNonEmptyDocument() const override { return m_didLoadNonEmptyDocum
ent; } | 71 bool isInteractiveContent() const override { return true; } |
55 void didLoadNonEmptyDocument() override { m_didLoadNonEmptyDocument = true;
} | |
56 bool isInteractiveContent() const override; | |
57 | 72 |
58 void valueWasSet() override; | 73 Node::InsertionNotificationRequest insertedInto(ContainerNode* insertionPoin
t) override; |
| 74 void didNotifySubtreeInsertionsToDocument() final; |
59 | 75 |
60 ReferrerPolicy referrerPolicyAttribute() override; | 76 WebLayer* m_webLayer; |
61 | 77 Framelet* m_framelet; |
62 AtomicString m_name; | 78 KURL m_URL; |
63 bool m_didLoadNonEmptyDocument; | |
64 RefPtrWillBeMember<HTMLIFrameElementSandbox> m_sandbox; | |
65 | |
66 ReferrerPolicy m_referrerPolicy; | |
67 }; | 79 }; |
68 | 80 |
69 } // namespace blink | 81 } // namespace blink |
70 | 82 |
71 #endif // HTMLIFrameElement_h | 83 #endif // HTMLFrameletElement_h |
OLD | NEW |