OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 | 51 |
52 virtual void disconnectContentFrame(); | 52 virtual void disconnectContentFrame(); |
53 | 53 |
54 // Most subclasses use LayoutPart (either LayoutEmbeddedObject or LayoutIFra me) | 54 // Most subclasses use LayoutPart (either LayoutEmbeddedObject or LayoutIFra me) |
55 // except for HTMLObjectElement and HTMLEmbedElement which may return any | 55 // except for HTMLObjectElement and HTMLEmbedElement which may return any |
56 // LayoutObject when using fallback content. | 56 // LayoutObject when using fallback content. |
57 LayoutPart* layoutPart() const; | 57 LayoutPart* layoutPart() const; |
58 | 58 |
59 Document* getSVGDocument(ExceptionState&) const; | 59 Document* getSVGDocument(ExceptionState&) const; |
60 | 60 |
61 virtual ScrollbarMode scrollingMode() const { return ScrollbarAuto; } | |
62 | |
63 virtual bool loadedNonEmptyDocument() const { return false; } | 61 virtual bool loadedNonEmptyDocument() const { return false; } |
64 virtual void didLoadNonEmptyDocument() { } | 62 virtual void didLoadNonEmptyDocument() { } |
65 | 63 |
66 void setWidget(PassRefPtrWillBeRawPtr<Widget>); | 64 void setWidget(PassRefPtrWillBeRawPtr<Widget>); |
67 Widget* ownedWidget() const; | 65 Widget* ownedWidget() const; |
68 | 66 |
69 class UpdateSuspendScope { | 67 class UpdateSuspendScope { |
70 STACK_ALLOCATED(); | 68 STACK_ALLOCATED(); |
71 public: | 69 public: |
72 UpdateSuspendScope(); | 70 UpdateSuspendScope(); |
73 ~UpdateSuspendScope(); | 71 ~UpdateSuspendScope(); |
74 | 72 |
75 private: | 73 private: |
76 void performDeferredWidgetTreeOperations(); | 74 void performDeferredWidgetTreeOperations(); |
77 }; | 75 }; |
78 | 76 |
79 // FrameOwner overrides: | 77 // FrameOwner overrides: |
80 bool isLocal() const override { return true; } | 78 bool isLocal() const override { return true; } |
81 void dispatchLoad() override; | 79 void dispatchLoad() override; |
82 SandboxFlags sandboxFlags() const override { return m_sandboxFlags; } | 80 SandboxFlags sandboxFlags() const override { return m_sandboxFlags; } |
83 void renderFallbackContent() override { } | 81 void renderFallbackContent() override { } |
82 ScrollbarMode scrollingMode() const override { return m_scrollingMode; } | |
83 int marginWidth() const { return m_marginWidth; } | |
alexmos
2015/09/02 21:37:05
override? (same for marginHeight)
lazyboy
2015/09/15 01:40:32
Done.
| |
84 int marginHeight() const { return m_marginHeight; } | |
84 | 85 |
85 DECLARE_VIRTUAL_TRACE(); | 86 DECLARE_VIRTUAL_TRACE(); |
86 | 87 |
87 protected: | 88 protected: |
88 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); | 89 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); |
89 void setSandboxFlags(SandboxFlags); | 90 void setSandboxFlags(SandboxFlags); |
91 void setScrollingMode(ScrollbarMode); | |
92 void setMarginWidth(int); | |
93 void setMarginHeight(int); | |
90 | 94 |
91 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool replaceCurrentItem); | 95 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool replaceCurrentItem); |
92 | 96 |
93 private: | 97 private: |
94 bool isKeyboardFocusable() const override; | 98 bool isKeyboardFocusable() const override; |
95 bool isFrameOwnerElement() const final { return true; } | 99 bool isFrameOwnerElement() const final { return true; } |
96 | 100 |
97 RawPtrWillBeMember<Frame> m_contentFrame; | 101 RawPtrWillBeMember<Frame> m_contentFrame; |
98 RefPtrWillBeMember<Widget> m_widget; | 102 RefPtrWillBeMember<Widget> m_widget; |
99 SandboxFlags m_sandboxFlags; | 103 SandboxFlags m_sandboxFlags; |
104 ScrollbarMode m_scrollingMode; | |
105 int m_marginWidth; | |
106 int m_marginHeight; | |
100 }; | 107 }; |
101 | 108 |
102 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); | 109 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); |
103 | 110 |
104 class SubframeLoadingDisabler { | 111 class SubframeLoadingDisabler { |
105 STACK_ALLOCATED(); | 112 STACK_ALLOCATED(); |
106 public: | 113 public: |
107 explicit SubframeLoadingDisabler(Node& root) | 114 explicit SubframeLoadingDisabler(Node& root) |
108 : m_root(root) | 115 : m_root(root) |
109 { | 116 { |
(...skipping 20 matching lines...) Expand all Loading... | |
130 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots(); | 137 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots(); |
131 | 138 |
132 RawPtrWillBeMember<Node> m_root; | 139 RawPtrWillBeMember<Node> m_root; |
133 }; | 140 }; |
134 | 141 |
135 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal()); | 142 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal()); |
136 | 143 |
137 } // namespace blink | 144 } // namespace blink |
138 | 145 |
139 #endif // HTMLFrameOwnerElement_h | 146 #endif // HTMLFrameOwnerElement_h |
OLD | NEW |