OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999-2001 Lars Knoll <knoll@kde.org> | 3 * 1999-2001 Lars Knoll <knoll@kde.org> |
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> | 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> |
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> | 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> |
6 * 2000-2001 Dirk Mueller <mueller@kde.org> | 6 * 2000-2001 Dirk Mueller <mueller@kde.org> |
7 * 2000 Stefan Schimanski <1Stein@gmx.de> | 7 * 2000 Stefan Schimanski <1Stein@gmx.de> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 class DragImage; | 44 class DragImage; |
45 class Editor; | 45 class Editor; |
46 class Element; | 46 class Element; |
47 class EventHandler; | 47 class EventHandler; |
48 class FetchContext; | 48 class FetchContext; |
49 class FloatSize; | 49 class FloatSize; |
50 class FrameConsole; | 50 class FrameConsole; |
51 class FrameDestructionObserver; | 51 class FrameDestructionObserver; |
52 class FrameSelection; | 52 class FrameSelection; |
53 class FrameView; | 53 class FrameView; |
54 class HTMLPlugInElement; | |
54 class InputMethodController; | 55 class InputMethodController; |
55 class IntPoint; | 56 class IntPoint; |
56 class IntSize; | 57 class IntSize; |
57 class Node; | 58 class Node; |
58 class Range; | 59 class Range; |
59 class RenderView; | 60 class RenderView; |
60 class TreeScope; | 61 class TreeScope; |
61 class ScriptController; | 62 class ScriptController; |
62 class SpellChecker; | 63 class SpellChecker; |
63 class TreeScope; | 64 class TreeScope; |
64 class VisiblePosition; | 65 class VisiblePosition; |
65 | 66 |
66 class LocalFrame : public Frame, public WillBeHeapSupplementable<LocalFrame> { | 67 class LocalFrame : public Frame, public WillBeHeapSupplementable<LocalFrame> { |
67 public: | 68 public: |
68 static PassRefPtrWillBeRawPtr<LocalFrame> create(FrameLoaderClient*, Fra meHost*, FrameOwner*); | 69 static PassRefPtrWillBeRawPtr<LocalFrame> create(FrameLoaderClient*, Fra meHost*, FrameOwner*); |
69 | 70 |
70 virtual bool isLocalFrame() const override { return true; } | 71 virtual bool isLocalFrame() const override { return true; } |
71 | 72 |
72 void init(); | 73 void init(); |
73 void setView(PassRefPtr<FrameView>); | 74 void setView(PassRefPtrWillBeRawPtr<FrameView>); |
74 void createView(const IntSize&, const Color&, bool, | 75 void createView(const IntSize&, const Color&, bool, |
75 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, | 76 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, |
76 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); | 77 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); |
77 | 78 |
78 virtual ~LocalFrame(); | 79 virtual ~LocalFrame(); |
79 virtual void trace(Visitor*) override; | 80 virtual void trace(Visitor*) override; |
80 | 81 |
81 virtual void navigate(Document& originDocument, const KURL&, bool lockBa ckForwardList) override; | 82 virtual void navigate(Document& originDocument, const KURL&, bool lockBa ckForwardList) override; |
82 virtual void detach() override; | 83 virtual void detach() override; |
83 | 84 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 String selectedTextForClipboard() const; | 150 String selectedTextForClipboard() const; |
150 | 151 |
151 VisiblePosition visiblePositionForPoint(const IntPoint& framePoint); | 152 VisiblePosition visiblePositionForPoint(const IntPoint& framePoint); |
152 Document* documentAtPoint(const IntPoint& windowPoint); | 153 Document* documentAtPoint(const IntPoint& windowPoint); |
153 PassRefPtrWillBeRawPtr<Range> rangeForPoint(const IntPoint& framePoint); | 154 PassRefPtrWillBeRawPtr<Range> rangeForPoint(const IntPoint& framePoint); |
154 | 155 |
155 bool isURLAllowed(const KURL&) const; | 156 bool isURLAllowed(const KURL&) const; |
156 bool shouldReuseDefaultView(const KURL&) const; | 157 bool shouldReuseDefaultView(const KURL&) const; |
157 void removeSpellingMarkersUnderWords(const Vector<String>& words); | 158 void removeSpellingMarkersUnderWords(const Vector<String>& words); |
158 | 159 |
160 #if ENABLE(OILPAN) | |
161 void registerPluginElement(HTMLPlugInElement*); | |
162 void unregisterPluginElement(HTMLPlugInElement*); | |
163 void clearWeakMembers(Visitor*); | |
164 #endif | |
165 | |
159 // ======== | 166 // ======== |
160 | 167 |
161 private: | 168 private: |
162 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*); | 169 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*); |
163 | 170 |
164 String localLayerTreeAsText(unsigned flags) const; | 171 String localLayerTreeAsText(unsigned flags) const; |
165 | 172 |
166 void detachView(); | 173 void detachView(); |
167 | 174 |
168 WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver> > m_d estructionObservers; | 175 WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver> > m_d estructionObservers; |
169 mutable FrameLoader m_loader; | 176 mutable FrameLoader m_loader; |
170 mutable NavigationScheduler m_navigationScheduler; | 177 mutable NavigationScheduler m_navigationScheduler; |
171 | 178 |
172 RefPtr<FrameView> m_view; | 179 RefPtrWillBeMember<FrameView> m_view; |
173 // Usually 0. Non-null if this is the top frame of PagePopup. | 180 // Usually 0. Non-null if this is the top frame of PagePopup. |
174 RefPtrWillBeMember<Element> m_pagePopupOwner; | 181 RefPtrWillBeMember<Element> m_pagePopupOwner; |
175 | 182 |
176 const OwnPtrWillBeMember<ScriptController> m_script; | 183 const OwnPtrWillBeMember<ScriptController> m_script; |
177 const OwnPtrWillBeMember<Editor> m_editor; | 184 const OwnPtrWillBeMember<Editor> m_editor; |
178 const OwnPtrWillBeMember<SpellChecker> m_spellChecker; | 185 const OwnPtrWillBeMember<SpellChecker> m_spellChecker; |
179 const OwnPtrWillBeMember<FrameSelection> m_selection; | 186 const OwnPtrWillBeMember<FrameSelection> m_selection; |
180 const OwnPtrWillBeMember<EventHandler> m_eventHandler; | 187 const OwnPtrWillBeMember<EventHandler> m_eventHandler; |
181 const OwnPtrWillBeMember<FrameConsole> m_console; | 188 const OwnPtrWillBeMember<FrameConsole> m_console; |
182 OwnPtrWillBeMember<InputMethodController> m_inputMethodController; | 189 const OwnPtrWillBeMember<InputMethodController> m_inputMethodController; |
190 | |
191 #if ENABLE(OILPAN) | |
192 // Oilpan: in order to reliably finalize plugin elements with | |
193 // renderer-less plugins, the frame keeps track of them. When | |
194 // the frame is detached and disposed, these will be disposed | |
195 // of in the process. This is needed as the plugin element | |
196 // might not itself be attached to a DOM tree and be | |
197 // explicitly detached&disposed of. | |
198 // | |
199 // A weak reference is all wanted; the plugin element must | |
200 // otherwise be referenced and kept alive. | |
201 HeapHashSet<WeakMember<HTMLPlugInElement> > m_pluginElements; | |
haraken
2014/10/10 02:50:32
This idea looks nice!
However, I want to understa
sof
2014/10/10 05:22:18
dispose() of the plugin might trigger unbounded am
| |
202 #endif | |
183 | 203 |
184 float m_pageZoomFactor; | 204 float m_pageZoomFactor; |
185 float m_textZoomFactor; | 205 float m_textZoomFactor; |
186 | 206 |
187 bool m_inViewSourceMode; | 207 bool m_inViewSourceMode; |
188 }; | 208 }; |
189 | 209 |
190 inline void LocalFrame::init() | 210 inline void LocalFrame::init() |
191 { | 211 { |
192 m_loader.init(); | 212 m_loader.init(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(), localFrame.isLocalFrame()); | 276 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(), localFrame.isLocalFrame()); |
257 | 277 |
258 } // namespace blink | 278 } // namespace blink |
259 | 279 |
260 // During refactoring, there are some places where we need to do type conversion s that | 280 // During refactoring, there are some places where we need to do type conversion s that |
261 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte d out. | 281 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte d out. |
262 // At that time this #define will be removed and all the uses of it will need to be corrected. | 282 // At that time this #define will be removed and all the uses of it will need to be corrected. |
263 #define toLocalFrameTemporary toLocalFrame | 283 #define toLocalFrameTemporary toLocalFrame |
264 | 284 |
265 #endif // LocalFrame_h | 285 #endif // LocalFrame_h |
OLD | NEW |