OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual LocalFrame* frame() const override; | 84 virtual LocalFrame* frame() const override; |
85 Screen* screen() const override; | 85 Screen* screen() const override; |
86 History* history() const override; | 86 History* history() const override; |
87 BarProp* locationbar() const override; | 87 BarProp* locationbar() const override; |
88 BarProp* menubar() const override; | 88 BarProp* menubar() const override; |
89 BarProp* personalbar() const override; | 89 BarProp* personalbar() const override; |
90 BarProp* scrollbars() const override; | 90 BarProp* scrollbars() const override; |
91 BarProp* statusbar() const override; | 91 BarProp* statusbar() const override; |
92 BarProp* toolbar() const override; | 92 BarProp* toolbar() const override; |
93 Navigator* navigator() const override; | 93 Navigator* navigator() const override; |
94 Location* location() const override; | |
95 bool offscreenBuffering() const override; | 94 bool offscreenBuffering() const override; |
96 int outerHeight() const override; | 95 int outerHeight() const override; |
97 int outerWidth() const override; | 96 int outerWidth() const override; |
98 int innerHeight() const override; | 97 int innerHeight() const override; |
99 int innerWidth() const override; | 98 int innerWidth() const override; |
100 int screenX() const override; | 99 int screenX() const override; |
101 int screenY() const override; | 100 int screenY() const override; |
102 double scrollX() const override; | 101 double scrollX() const override; |
103 double scrollY() const override; | 102 double scrollY() const override; |
104 const AtomicString& name() const override; | 103 const AtomicString& name() const override; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&) override; | 139 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&) override; |
141 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> getComputedStyle(Element*, const
String& pseudoElt) const override; | 140 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> getComputedStyle(Element*, const
String& pseudoElt) const override; |
142 PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, const Strin
g& pseudoElt) const override; | 141 PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, const Strin
g& pseudoElt) const override; |
143 int requestAnimationFrame(RequestAnimationFrameCallback*) override; | 142 int requestAnimationFrame(RequestAnimationFrameCallback*) override; |
144 int webkitRequestAnimationFrame(RequestAnimationFrameCallback*) override; | 143 int webkitRequestAnimationFrame(RequestAnimationFrameCallback*) override; |
145 void cancelAnimationFrame(int id) override; | 144 void cancelAnimationFrame(int id) override; |
146 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor
tArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&) ov
erride; | 145 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor
tArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&) ov
erride; |
147 String crossDomainAccessErrorMessage(LocalDOMWindow* callingWindow) override
; | 146 String crossDomainAccessErrorMessage(LocalDOMWindow* callingWindow) override
; |
148 String sanitizedCrossDomainAccessErrorMessage(LocalDOMWindow* callingWindow)
override; | 147 String sanitizedCrossDomainAccessErrorMessage(LocalDOMWindow* callingWindow)
override; |
149 | 148 |
150 void registerProperty(DOMWindowProperty*); | 149 void reset() override; |
151 void unregisterProperty(DOMWindowProperty*); | |
152 | |
153 void reset(); | |
154 | 150 |
155 unsigned pendingUnloadEventListeners() const; | 151 unsigned pendingUnloadEventListeners() const; |
156 | 152 |
157 static FloatRect adjustWindowRect(LocalFrame&, const FloatRect& pendingChang
es); | 153 static FloatRect adjustWindowRect(LocalFrame&, const FloatRect& pendingChang
es); |
158 | 154 |
159 bool allowPopUp(); // Call on first window, not target window. | 155 bool allowPopUp(); // Call on first window, not target window. |
160 static bool allowPopUp(LocalFrame& firstFrame); | 156 static bool allowPopUp(LocalFrame& firstFrame); |
161 static bool canShowModalDialogNow(const LocalFrame*); | 157 static bool canShowModalDialogNow(const LocalFrame*); |
162 | 158 |
163 Element* frameElement() const; | 159 Element* frameElement() const; |
(...skipping 24 matching lines...) Expand all Loading... |
188 void dispatchLoadEvent(); | 184 void dispatchLoadEvent(); |
189 | 185 |
190 void finishedLoading(); | 186 void finishedLoading(); |
191 | 187 |
192 ApplicationCache* optionalApplicationCache() const { return m_applicationCac
he.get(); } | 188 ApplicationCache* optionalApplicationCache() const { return m_applicationCac
he.get(); } |
193 | 189 |
194 // Dispatch the (deprecated) orientationchange event to this DOMWindow and | 190 // Dispatch the (deprecated) orientationchange event to this DOMWindow and |
195 // recurse on its child frames. | 191 // recurse on its child frames. |
196 void sendOrientationChangeEvent(); | 192 void sendOrientationChangeEvent(); |
197 | 193 |
198 void willDetachDocumentFromFrame(); | |
199 | |
200 bool isInsecureScriptAccess(DOMWindow& callingWindow, const String& urlStrin
g) override; | 194 bool isInsecureScriptAccess(DOMWindow& callingWindow, const String& urlStrin
g) override; |
201 | 195 |
202 PassOwnPtr<LifecycleNotifier<LocalDOMWindow>> createLifecycleNotifier(); | 196 PassOwnPtr<LifecycleNotifier<LocalDOMWindow>> createLifecycleNotifier(); |
203 | 197 |
204 EventQueue* eventQueue() const; | 198 EventQueue* eventQueue() const; |
205 void enqueueWindowEvent(PassRefPtrWillBeRawPtr<Event>); | 199 void enqueueWindowEvent(PassRefPtrWillBeRawPtr<Event>); |
206 void enqueueDocumentEvent(PassRefPtrWillBeRawPtr<Event>); | 200 void enqueueDocumentEvent(PassRefPtrWillBeRawPtr<Event>); |
207 void enqueuePageshowEvent(PageshowEventPersistence); | 201 void enqueuePageshowEvent(PageshowEventPersistence); |
208 void enqueueHashchangeEvent(const String& oldURL, const String& newURL); | 202 void enqueueHashchangeEvent(const String& oldURL, const String& newURL); |
209 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); | 203 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 239 |
246 RawPtrWillBeMember<LocalDOMWindow> m_window; | 240 RawPtrWillBeMember<LocalDOMWindow> m_window; |
247 }; | 241 }; |
248 friend WTF::OwnedPtrDeleter<WindowFrameObserver>; | 242 friend WTF::OwnedPtrDeleter<WindowFrameObserver>; |
249 | 243 |
250 explicit LocalDOMWindow(LocalFrame&); | 244 explicit LocalDOMWindow(LocalFrame&); |
251 | 245 |
252 Page* page(); | 246 Page* page(); |
253 | 247 |
254 void clearDocument(); | 248 void clearDocument(); |
255 void willDestroyDocumentInFrame(); | |
256 | 249 |
257 // FIXME: Oilpan: the need for this internal method will fall | 250 // FIXME: Oilpan: the need for this internal method will fall |
258 // away when EventTargets are no longer using refcounts and | 251 // away when EventTargets are no longer using refcounts and |
259 // window properties are also on the heap. Inline the minimal | 252 // window properties are also on the heap. Inline the minimal |
260 // do-not-broadcast handling then and remove the enum + | 253 // do-not-broadcast handling then and remove the enum + |
261 // removeAllEventListenersInternal(). | 254 // removeAllEventListenersInternal(). |
262 enum BroadcastListenerRemoval { | 255 enum BroadcastListenerRemoval { |
263 DoNotBroadcastListenerRemoval, | 256 DoNotBroadcastListenerRemoval, |
264 DoBroadcastListenerRemoval | 257 DoBroadcastListenerRemoval |
265 }; | 258 }; |
266 | 259 |
267 void willDetachFrameHost(); | 260 void willDetachFrameHost(); |
268 void removeAllEventListenersInternal(BroadcastListenerRemoval); | 261 void removeAllEventListenersInternal(BroadcastListenerRemoval); |
269 | 262 |
270 OwnPtrWillBeMember<WindowFrameObserver> m_frameObserver; | 263 OwnPtrWillBeMember<WindowFrameObserver> m_frameObserver; |
271 RefPtrWillBeMember<Document> m_document; | 264 RefPtrWillBeMember<Document> m_document; |
272 | 265 |
273 bool m_shouldPrintWhenFinishedLoading; | 266 bool m_shouldPrintWhenFinishedLoading; |
274 #if ENABLE(ASSERT) | 267 #if ENABLE(ASSERT) |
275 bool m_hasBeenReset; | 268 bool m_hasBeenReset; |
276 #endif | 269 #endif |
277 | 270 |
278 WillBeHeapHashSet<RawPtrWillBeWeakMember<DOMWindowProperty>> m_properties; | |
279 | |
280 mutable RefPtrWillBeMember<Screen> m_screen; | 271 mutable RefPtrWillBeMember<Screen> m_screen; |
281 mutable RefPtrWillBeMember<History> m_history; | 272 mutable RefPtrWillBeMember<History> m_history; |
282 mutable RefPtrWillBeMember<BarProp> m_locationbar; | 273 mutable RefPtrWillBeMember<BarProp> m_locationbar; |
283 mutable RefPtrWillBeMember<BarProp> m_menubar; | 274 mutable RefPtrWillBeMember<BarProp> m_menubar; |
284 mutable RefPtrWillBeMember<BarProp> m_personalbar; | 275 mutable RefPtrWillBeMember<BarProp> m_personalbar; |
285 mutable RefPtrWillBeMember<BarProp> m_scrollbars; | 276 mutable RefPtrWillBeMember<BarProp> m_scrollbars; |
286 mutable RefPtrWillBeMember<BarProp> m_statusbar; | 277 mutable RefPtrWillBeMember<BarProp> m_statusbar; |
287 mutable RefPtrWillBeMember<BarProp> m_toolbar; | 278 mutable RefPtrWillBeMember<BarProp> m_toolbar; |
288 mutable RefPtrWillBeMember<Console> m_console; | 279 mutable RefPtrWillBeMember<Console> m_console; |
289 mutable RefPtrWillBeMember<Navigator> m_navigator; | 280 mutable RefPtrWillBeMember<Navigator> m_navigator; |
290 mutable RefPtrWillBeMember<Location> m_location; | |
291 mutable RefPtrWillBeMember<StyleMedia> m_media; | 281 mutable RefPtrWillBeMember<StyleMedia> m_media; |
292 | 282 |
293 String m_status; | 283 String m_status; |
294 String m_defaultStatus; | 284 String m_defaultStatus; |
295 | 285 |
296 mutable RefPtrWillBeMember<ApplicationCache> m_applicationCache; | 286 mutable RefPtrWillBeMember<ApplicationCache> m_applicationCache; |
297 | 287 |
298 mutable RefPtrWillBeMember<Performance> m_performance; | 288 mutable RefPtrWillBeMember<Performance> m_performance; |
299 | 289 |
300 mutable RefPtrWillBeMember<DOMWindowCSS> m_css; | 290 mutable RefPtrWillBeMember<DOMWindowCSS> m_css; |
(...skipping 12 matching lines...) Expand all Loading... |
313 } | 303 } |
314 | 304 |
315 inline String LocalDOMWindow::defaultStatus() const | 305 inline String LocalDOMWindow::defaultStatus() const |
316 { | 306 { |
317 return m_defaultStatus; | 307 return m_defaultStatus; |
318 } | 308 } |
319 | 309 |
320 } // namespace blink | 310 } // namespace blink |
321 | 311 |
322 #endif // LocalDOMWindow_h | 312 #endif // LocalDOMWindow_h |
OLD | NEW |