webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
WebView.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
3  * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved.
4  * Copyright (C) 2011 Brent Fulgham. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
16  * EXPRESS OR IMPLIED WARRANTIES, INCfLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABIuLITY AND FITNESS FOR A PARTICULAR
18  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
19  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef WebView_H
29 #define WebView_H
30 
31 #include "WebKit.h"
32 #include "WebFrame.h"
33 #include "WebPreferences.h"
34 #include <WebCore/COMPtr.h>
35 #include <WebCore/DragActions.h>
36 #include <WebCore/GraphicsLayer.h>
37 #include <WebCore/GraphicsLayerClient.h>
38 #include <WebCore/IntRect.h>
39 #include <WebCore/SharedGDIObject.h>
40 #include <WebCore/SuspendableTimer.h>
41 #include <WebCore/WindowMessageListener.h>
42 #include <wtf/HashSet.h>
43 #include <wtf/RefPtr.h>
44 
45 #if USE(CA)
46 #include <WebCore/CACFLayerTreeHostClient.h>
47 #endif
48 
49 #if ENABLE(FULLSCREEN_API)
50 #include <WebCore/FullScreenControllerClient.h>
51 #endif
52 
53 namespace WebCore {
54 #if USE(CA)
55  class CACFLayerTreeHost;
56 #endif
57  class FullScreenController;
58 #if PLATFORM(WIN) && USE(AVFOUNDATION)
59  struct GraphicsDeviceAdapter;
60 #endif
61  class HTMLVideoElement;
62  class HistoryItem;
63  class KeyboardEvent;
64 }
65 
66 class FullscreenVideoController;
67 class WebBackForwardList;
68 class WebFrame;
69 class WebInspector;
70 class WebInspectorClient;
71 #if USE(TEXTURE_MAPPER_GL)
72 class AcceleratedCompositingContext;
73 #endif
74 class WebViewGroup;
75 
78 
79 interface IDropTargetHelper;
80 #if USE(DIRECT2D)
81 interface ID2D1Bitmap;
82 interface ID2D1BitmapRenderTarget;
83 interface ID2D1GdiInteropRenderTarget;
84 interface ID2D1HwndRenderTarget;
85 interface ID2D1RenderTarget;
86 #endif
87 
88 class WebView
89  : public IWebView
90  , public IWebViewPrivate4
91  , public IWebIBActions
92  , public IWebViewCSS
93  , public IWebViewEditing
95  , public IWebViewEditingActions
97  , public IDropTarget
100 #if USE(CA)
102 #endif
103 #if ENABLE(FULLSCREEN_API)
104  , WebCore::FullScreenControllerClient
105 #endif
106 {
107 public:
108  static WebView* createInstance();
109 protected:
110  WebView();
111  ~WebView();
112 
113 public:
114  // IUnknown
115  virtual HRESULT STDMETHODCALLTYPE QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject);
116  virtual ULONG STDMETHODCALLTYPE AddRef();
117  virtual ULONG STDMETHODCALLTYPE Release();
118 
119  // IWebView
120  virtual HRESULT STDMETHODCALLTYPE canShowMIMEType(_In_ BSTR mimeType, _Out_ BOOL*);
121  virtual HRESULT STDMETHODCALLTYPE canShowMIMETypeAsHTML(_In_ BSTR mimeType, _Out_ BOOL*);
122  virtual HRESULT STDMETHODCALLTYPE MIMETypesShownAsHTML(_COM_Outptr_opt_ IEnumVARIANT**);
123  virtual HRESULT STDMETHODCALLTYPE setMIMETypesShownAsHTML(__inout_ecount_full(cMimeTypes) BSTR* mimeTypes, int cMimeTypes);
124  virtual HRESULT STDMETHODCALLTYPE URLFromPasteboard(_In_opt_ IDataObject* pasteboard, _Deref_opt_out_ BSTR* url);
125  virtual HRESULT STDMETHODCALLTYPE URLTitleFromPasteboard(_In_opt_ IDataObject* pasteboard, _Deref_opt_out_ BSTR* urlTitle);
126  virtual HRESULT STDMETHODCALLTYPE initWithFrame(RECT frame, _In_ BSTR frameName, _In_ BSTR groupName);
127  virtual HRESULT STDMETHODCALLTYPE setAccessibilityDelegate(_In_opt_ IAccessibilityDelegate*);
128  virtual HRESULT STDMETHODCALLTYPE accessibilityDelegate(_COM_Outptr_opt_ IAccessibilityDelegate**);
129  virtual HRESULT STDMETHODCALLTYPE setUIDelegate(_In_opt_ IWebUIDelegate*);
130  virtual HRESULT STDMETHODCALLTYPE uiDelegate(_COM_Outptr_opt_ IWebUIDelegate**);
131  virtual HRESULT STDMETHODCALLTYPE setResourceLoadDelegate(_In_opt_ IWebResourceLoadDelegate*);
132  virtual HRESULT STDMETHODCALLTYPE resourceLoadDelegate(_COM_Outptr_opt_ IWebResourceLoadDelegate**);
133  virtual HRESULT STDMETHODCALLTYPE setDownloadDelegate(_In_opt_ IWebDownloadDelegate*);
134  virtual HRESULT STDMETHODCALLTYPE downloadDelegate(_COM_Outptr_opt_ IWebDownloadDelegate**);
135  virtual HRESULT STDMETHODCALLTYPE setFrameLoadDelegate(_In_opt_ IWebFrameLoadDelegate*);
136  virtual HRESULT STDMETHODCALLTYPE frameLoadDelegate(_COM_Outptr_opt_ IWebFrameLoadDelegate**);
137  virtual HRESULT STDMETHODCALLTYPE setPolicyDelegate(_In_opt_ IWebPolicyDelegate*);
138  virtual HRESULT STDMETHODCALLTYPE policyDelegate(_COM_Outptr_opt_ IWebPolicyDelegate**);
139  virtual HRESULT STDMETHODCALLTYPE mainFrame(_COM_Outptr_opt_ IWebFrame**);
140  virtual HRESULT STDMETHODCALLTYPE focusedFrame(_COM_Outptr_opt_ IWebFrame**);
141  virtual HRESULT STDMETHODCALLTYPE backForwardList(_COM_Outptr_opt_ IWebBackForwardList**);
142  virtual HRESULT STDMETHODCALLTYPE setMaintainsBackForwardList(BOOL);
143  virtual HRESULT STDMETHODCALLTYPE goBack(_Out_ BOOL* succeeded);
144  virtual HRESULT STDMETHODCALLTYPE goForward(_Out_ BOOL* succeeded);
145  virtual HRESULT STDMETHODCALLTYPE goToBackForwardItem(_In_opt_ IWebHistoryItem*, _Out_ BOOL* succeeded);
146  virtual HRESULT STDMETHODCALLTYPE setTextSizeMultiplier(float);
147  virtual HRESULT STDMETHODCALLTYPE textSizeMultiplier(_Out_ float*);
148  virtual HRESULT STDMETHODCALLTYPE setApplicationNameForUserAgent(_In_ BSTR);
149  virtual HRESULT STDMETHODCALLTYPE applicationNameForUserAgent(_Deref_opt_out_ BSTR*);
150  virtual HRESULT STDMETHODCALLTYPE setCustomUserAgent(_In_ BSTR);
151  virtual HRESULT STDMETHODCALLTYPE customUserAgent(_Deref_opt_out_ BSTR*);
152  virtual HRESULT STDMETHODCALLTYPE userAgentForURL(_In_ BSTR url, _Deref_opt_out_ BSTR* userAgent);
153  virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding(_Out_ BOOL*);
154  virtual HRESULT STDMETHODCALLTYPE setCustomTextEncodingName(_In_ BSTR);
155  virtual HRESULT STDMETHODCALLTYPE customTextEncodingName(_Deref_opt_out_ BSTR*);
156  virtual HRESULT STDMETHODCALLTYPE setMediaStyle(_In_ BSTR);
157  virtual HRESULT STDMETHODCALLTYPE mediaStyle(_Deref_opt_out_ BSTR*);
158  virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptFromString(_In_ BSTR script, _Deref_opt_out_ BSTR* result);
159  virtual HRESULT STDMETHODCALLTYPE windowScriptObject(_COM_Outptr_opt_ IWebScriptObject**);
160  virtual HRESULT STDMETHODCALLTYPE setPreferences(_In_opt_ IWebPreferences*);
161  virtual HRESULT STDMETHODCALLTYPE preferences(_COM_Outptr_opt_ IWebPreferences**);
162  virtual HRESULT STDMETHODCALLTYPE setPreferencesIdentifier(_In_ BSTR);
163  virtual HRESULT STDMETHODCALLTYPE preferencesIdentifier(_Deref_opt_out_ BSTR*);
164  virtual HRESULT STDMETHODCALLTYPE setHostWindow(_In_ HWND);
165  virtual HRESULT STDMETHODCALLTYPE hostWindow(_Deref_opt_out_ HWND*);
166  virtual HRESULT STDMETHODCALLTYPE searchFor(_In_ BSTR, BOOL forward, BOOL caseFlag, BOOL wrapFlag, _Out_ BOOL *found);
167  virtual HRESULT STDMETHODCALLTYPE registerViewClass(_In_opt_ IWebDocumentView*, _In_opt_ IWebDocumentRepresentation*, _In_ BSTR forMIMEType);
168  virtual HRESULT STDMETHODCALLTYPE setGroupName(_In_ BSTR);
169  virtual HRESULT STDMETHODCALLTYPE groupName(_Deref_opt_out_ BSTR*);
170  virtual HRESULT STDMETHODCALLTYPE estimatedProgress(_Out_ double*);
171  virtual HRESULT STDMETHODCALLTYPE isLoading(_Out_ BOOL*);
172  virtual HRESULT STDMETHODCALLTYPE elementAtPoint(_In_ LPPOINT, _COM_Outptr_opt_ IPropertyBag** elementDictionary);
173  virtual HRESULT STDMETHODCALLTYPE pasteboardTypesForSelection(_COM_Outptr_opt_ IEnumVARIANT**);
174  virtual HRESULT STDMETHODCALLTYPE writeSelectionWithPasteboardTypes(__inout_ecount_full(cTypes) BSTR* types, int cTypes, _In_opt_ IDataObject* pasteboard);
175  virtual HRESULT STDMETHODCALLTYPE pasteboardTypesForElement(_In_opt_ IPropertyBag* elementDictionary, _COM_Outptr_opt_ IEnumVARIANT**);
176  virtual HRESULT STDMETHODCALLTYPE writeElement(_In_opt_ IPropertyBag* elementDictionary, __inout_ecount_full(cWithPasteboardTypes) BSTR* withPasteboardTypes, int cWithPasteboardTypes, _In_opt_ IDataObject* pasteboard);
177  virtual HRESULT STDMETHODCALLTYPE selectedText(_Deref_opt_out_ BSTR*);
178  virtual HRESULT STDMETHODCALLTYPE centerSelectionInVisibleArea(_In_opt_ IUnknown* sender);
179  virtual HRESULT STDMETHODCALLTYPE moveDragCaretToPoint(_In_ LPPOINT);
180  virtual HRESULT STDMETHODCALLTYPE removeDragCaret();
181  virtual HRESULT STDMETHODCALLTYPE setDrawsBackground(BOOL);
182  virtual HRESULT STDMETHODCALLTYPE drawsBackground(_Out_ BOOL*);
183  virtual HRESULT STDMETHODCALLTYPE setMainFrameURL(_In_ BSTR urlString);
184  virtual HRESULT STDMETHODCALLTYPE mainFrameURL(_Deref_opt_out_ BSTR*);
185  virtual HRESULT STDMETHODCALLTYPE mainFrameDocument(_COM_Outptr_opt_ IDOMDocument**);
186  virtual HRESULT STDMETHODCALLTYPE mainFrameTitle(_Deref_opt_out_ BSTR*);
187  virtual HRESULT STDMETHODCALLTYPE mainFrameIcon(_Deref_opt_out_ HBITMAP*);
188  virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsLocal(_In_ BSTR scheme);
189  virtual HRESULT STDMETHODCALLTYPE close();
190 
191  // IWebIBActions
192  virtual HRESULT STDMETHODCALLTYPE takeStringURLFrom(_In_opt_ IUnknown* sender);
193  virtual HRESULT STDMETHODCALLTYPE stopLoading(_In_opt_ IUnknown* sender);
194  virtual HRESULT STDMETHODCALLTYPE reload(_In_opt_ IUnknown* sender);
195  virtual HRESULT STDMETHODCALLTYPE canGoBack(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
196  virtual HRESULT STDMETHODCALLTYPE goBack(_In_opt_ IUnknown* sender);
197  virtual HRESULT STDMETHODCALLTYPE canGoForward(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
198  virtual HRESULT STDMETHODCALLTYPE goForward(_In_opt_ IUnknown* sender);
199  virtual HRESULT STDMETHODCALLTYPE canMakeTextLarger(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
200  virtual HRESULT STDMETHODCALLTYPE makeTextLarger(_In_opt_ IUnknown* sender);
201  virtual HRESULT STDMETHODCALLTYPE canMakeTextSmaller(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
202  virtual HRESULT STDMETHODCALLTYPE makeTextSmaller(_In_opt_ IUnknown* sender);
203  virtual HRESULT STDMETHODCALLTYPE canMakeTextStandardSize(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
204  virtual HRESULT STDMETHODCALLTYPE makeTextStandardSize(_In_opt_ IUnknown* sender);
205  virtual HRESULT STDMETHODCALLTYPE toggleContinuousSpellChecking(_In_opt_ IUnknown* sender);
206  virtual HRESULT STDMETHODCALLTYPE toggleSmartInsertDelete(_In_opt_ IUnknown* sender);
207  virtual HRESULT STDMETHODCALLTYPE toggleGrammarChecking(_In_opt_ IUnknown* sender);
208  virtual HRESULT STDMETHODCALLTYPE reloadFromOrigin(_In_opt_ IUnknown* sender);
209 
210  // IWebViewCSS
211  virtual HRESULT STDMETHODCALLTYPE computedStyleForElement(_In_opt_ IDOMElement*, _In_ BSTR pseudoElement, _COM_Outptr_opt_ IDOMCSSStyleDeclaration**);
212 
213  // IWebViewEditing
214  virtual HRESULT STDMETHODCALLTYPE editableDOMRangeForPoint(_In_ LPPOINT, _COM_Outptr_opt_ IDOMRange**);
215  virtual HRESULT STDMETHODCALLTYPE setSelectedDOMRange(_In_opt_ IDOMRange*, WebSelectionAffinity);
216  virtual HRESULT STDMETHODCALLTYPE selectedDOMRange(_COM_Outptr_opt_ IDOMRange**);
217  virtual HRESULT STDMETHODCALLTYPE selectionAffinity(_Out_ WebSelectionAffinity*);
218  virtual HRESULT STDMETHODCALLTYPE setEditable(BOOL);
219  virtual HRESULT STDMETHODCALLTYPE isEditable(_Out_ BOOL*);
220  virtual HRESULT STDMETHODCALLTYPE setTypingStyle(_In_opt_ IDOMCSSStyleDeclaration*);
221  virtual HRESULT STDMETHODCALLTYPE typingStyle(_COM_Outptr_opt_ IDOMCSSStyleDeclaration**);
222  virtual HRESULT STDMETHODCALLTYPE setSmartInsertDeleteEnabled(BOOL);
223  virtual HRESULT STDMETHODCALLTYPE smartInsertDeleteEnabled(_Out_ BOOL*);
224  virtual HRESULT STDMETHODCALLTYPE setSelectTrailingWhitespaceEnabled(BOOL);
225  virtual HRESULT STDMETHODCALLTYPE isSelectTrailingWhitespaceEnabled(_Out_ BOOL*);
226  virtual HRESULT STDMETHODCALLTYPE setContinuousSpellCheckingEnabled(BOOL);
227  virtual HRESULT STDMETHODCALLTYPE isContinuousSpellCheckingEnabled(_Out_ BOOL*);
228  virtual HRESULT STDMETHODCALLTYPE spellCheckerDocumentTag(_Out_ int* tag);
229  virtual HRESULT STDMETHODCALLTYPE undoManager(_COM_Outptr_opt_ IWebUndoManager**);
230  virtual HRESULT STDMETHODCALLTYPE setEditingDelegate(_In_opt_ IWebEditingDelegate*);
231  virtual HRESULT STDMETHODCALLTYPE editingDelegate(_COM_Outptr_opt_ IWebEditingDelegate**);
232  virtual HRESULT STDMETHODCALLTYPE styleDeclarationWithText(_In_ BSTR text, _COM_Outptr_opt_ IDOMCSSStyleDeclaration**);
233  virtual HRESULT STDMETHODCALLTYPE hasSelectedRange(_Out_ BOOL*);
234  virtual HRESULT STDMETHODCALLTYPE cutEnabled(_Out_ BOOL*);
235  virtual HRESULT STDMETHODCALLTYPE copyEnabled(_Out_ BOOL*);
236  virtual HRESULT STDMETHODCALLTYPE pasteEnabled(_Out_ BOOL*);
237  virtual HRESULT STDMETHODCALLTYPE deleteEnabled(_Out_ BOOL*);
238  virtual HRESULT STDMETHODCALLTYPE editingEnabled(_Out_ BOOL*);
239  virtual HRESULT STDMETHODCALLTYPE isGrammarCheckingEnabled(_Out_ BOOL*);
240  virtual HRESULT STDMETHODCALLTYPE setGrammarCheckingEnabled(BOOL);
241  virtual HRESULT STDMETHODCALLTYPE setPageSizeMultiplier(float);
242  virtual HRESULT STDMETHODCALLTYPE pageSizeMultiplier(_Out_ float*);
243  virtual HRESULT STDMETHODCALLTYPE canZoomPageIn(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
244  virtual HRESULT STDMETHODCALLTYPE zoomPageIn(_In_opt_ IUnknown* sender);
245  virtual HRESULT STDMETHODCALLTYPE canZoomPageOut(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
246  virtual HRESULT STDMETHODCALLTYPE zoomPageOut(_In_opt_ IUnknown* sender);
247  virtual HRESULT STDMETHODCALLTYPE canResetPageZoom(_In_opt_ IUnknown* sender, _Out_ BOOL* result);
248  virtual HRESULT STDMETHODCALLTYPE resetPageZoom(_In_opt_ IUnknown* sender);
249 
250  // IWebViewUndoableEditing
251  virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithNode(_In_opt_ IDOMNode*);
252  virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithText(_In_ BSTR);
253  virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithMarkupString(_In_ BSTR);
254  virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithArchive(_In_opt_ IWebArchive*);
255  virtual HRESULT STDMETHODCALLTYPE deleteSelection();
256  virtual HRESULT STDMETHODCALLTYPE clearSelection();
257  virtual HRESULT STDMETHODCALLTYPE applyStyle(_In_opt_ IDOMCSSStyleDeclaration*);
258 
259  // IWebViewEditingActions
260  virtual HRESULT STDMETHODCALLTYPE copy(_In_opt_ IUnknown* sender);
261  virtual HRESULT STDMETHODCALLTYPE cut(_In_opt_ IUnknown* sender);
262  virtual HRESULT STDMETHODCALLTYPE paste(_In_opt_ IUnknown* sender);
263  virtual HRESULT STDMETHODCALLTYPE copyURL(_In_ BSTR url);
264  virtual HRESULT STDMETHODCALLTYPE copyFont(_In_opt_ IUnknown* sender);
265  virtual HRESULT STDMETHODCALLTYPE pasteFont(_In_opt_ IUnknown* sender);
266  virtual HRESULT STDMETHODCALLTYPE delete_(_In_opt_ IUnknown* sender);
267  virtual HRESULT STDMETHODCALLTYPE pasteAsPlainText(_In_opt_ IUnknown* sender);
268  virtual HRESULT STDMETHODCALLTYPE pasteAsRichText(_In_opt_ IUnknown* sender);
269  virtual HRESULT STDMETHODCALLTYPE changeFont(_In_opt_ IUnknown* sender);
270  virtual HRESULT STDMETHODCALLTYPE changeAttributes(_In_opt_ IUnknown* sender);
271  virtual HRESULT STDMETHODCALLTYPE changeDocumentBackgroundColor(_In_opt_ IUnknown* sender);
272  virtual HRESULT STDMETHODCALLTYPE changeColor(_In_opt_ IUnknown* sender);
273  virtual HRESULT STDMETHODCALLTYPE alignCenter(_In_opt_ IUnknown* sender);
274  virtual HRESULT STDMETHODCALLTYPE alignJustified(_In_opt_ IUnknown* sender);
275  virtual HRESULT STDMETHODCALLTYPE alignLeft(_In_opt_ IUnknown* sender);
276  virtual HRESULT STDMETHODCALLTYPE alignRight(_In_opt_ IUnknown* sender);
277  virtual HRESULT STDMETHODCALLTYPE checkSpelling(_In_opt_ IUnknown* sender);
278  virtual HRESULT STDMETHODCALLTYPE showGuessPanel(_In_opt_ IUnknown* sender);
279  virtual HRESULT STDMETHODCALLTYPE performFindPanelAction(_In_opt_ IUnknown* sender);
280  virtual HRESULT STDMETHODCALLTYPE startSpeaking(_In_opt_ IUnknown* sender);
281  virtual HRESULT STDMETHODCALLTYPE stopSpeaking(_In_opt_ IUnknown* sender);
282 
283  // IWebNotificationObserver
284  virtual HRESULT STDMETHODCALLTYPE onNotify(_In_opt_ IWebNotification*);
285 
286  // IWebViewPrivate
287  virtual HRESULT STDMETHODCALLTYPE MIMETypeForExtension(_In_ BSTR extension, _Deref_opt_out_ BSTR *mimeType);
288  virtual HRESULT STDMETHODCALLTYPE setCustomDropTarget(_In_opt_ IDropTarget*);
289  virtual HRESULT STDMETHODCALLTYPE removeCustomDropTarget();
290  virtual HRESULT STDMETHODCALLTYPE setInViewSourceMode(BOOL);
291  virtual HRESULT STDMETHODCALLTYPE inViewSourceMode(_Out_ BOOL*);
292  virtual HRESULT STDMETHODCALLTYPE viewWindow(_Deref_opt_out_ HWND*);
293  virtual HRESULT STDMETHODCALLTYPE setFormDelegate(_In_opt_ IWebFormDelegate*);
294  virtual HRESULT STDMETHODCALLTYPE formDelegate(_COM_Outptr_opt_ IWebFormDelegate**);
295  virtual HRESULT STDMETHODCALLTYPE setFrameLoadDelegatePrivate(_In_opt_ IWebFrameLoadDelegatePrivate*);
296  virtual HRESULT STDMETHODCALLTYPE frameLoadDelegatePrivate(_COM_Outptr_opt_ IWebFrameLoadDelegatePrivate**);
297  virtual HRESULT STDMETHODCALLTYPE scrollOffset(_Out_ LPPOINT);
298  virtual HRESULT STDMETHODCALLTYPE scrollBy(_In_ LPPOINT);
299  virtual HRESULT STDMETHODCALLTYPE visibleContentRect(_Out_ LPRECT);
300  virtual HRESULT STDMETHODCALLTYPE updateFocusedAndActiveState();
301  virtual HRESULT STDMETHODCALLTYPE executeCoreCommandByName(_In_ BSTR name, _In_ BSTR value);
302  virtual HRESULT STDMETHODCALLTYPE clearMainFrameName();
303  virtual HRESULT STDMETHODCALLTYPE markAllMatchesForText(_In_ BSTR search, BOOL caseSensitive, BOOL highlight, UINT limit, _Out_ UINT* matches);
304  virtual HRESULT STDMETHODCALLTYPE unmarkAllTextMatches();
305  virtual HRESULT STDMETHODCALLTYPE rectsForTextMatches(_COM_Outptr_opt_ IEnumTextMatches**);
306  virtual HRESULT STDMETHODCALLTYPE generateSelectionImage(BOOL forceWhiteText, _Deref_opt_out_ HBITMAP* hBitmap);
307  virtual HRESULT STDMETHODCALLTYPE selectionRect(_Inout_ RECT*);
308  virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject*, DWORD grfKeyState, POINTL, DWORD* pdwEffect);
309  virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD* pdwEffect);
310  virtual HRESULT STDMETHODCALLTYPE DragLeave();
311  virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject*, DWORD grfKeyState, POINTL, DWORD* pdwEffect);
312  virtual HRESULT STDMETHODCALLTYPE canHandleRequest(_In_opt_ IWebURLRequest*, _Out_ BOOL*);
313  virtual HRESULT STDMETHODCALLTYPE standardUserAgentWithApplicationName(_In_ BSTR applicationName, _Deref_opt_out_ BSTR *groupName);
314  virtual HRESULT STDMETHODCALLTYPE clearFocusNode();
315  virtual HRESULT STDMETHODCALLTYPE setInitialFocus(BOOL forward);
316  virtual HRESULT STDMETHODCALLTYPE setTabKeyCyclesThroughElements(BOOL);
317  virtual HRESULT STDMETHODCALLTYPE tabKeyCyclesThroughElements(_Out_ BOOL*);
318  virtual HRESULT STDMETHODCALLTYPE setAllowSiteSpecificHacks(BOOL);
319  virtual HRESULT STDMETHODCALLTYPE addAdditionalPluginDirectory(_In_ BSTR);
320  virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView(_In_opt_ IWebView*);
321  virtual HRESULT STDMETHODCALLTYPE inspector(_COM_Outptr_opt_ IWebInspector**);
322  virtual HRESULT STDMETHODCALLTYPE clearUndoRedoOperations( void);
323  virtual HRESULT STDMETHODCALLTYPE shouldClose(_Out_ BOOL*);
324  virtual HRESULT STDMETHODCALLTYPE setProhibitsMainFrameScrolling(BOOL);
325  virtual HRESULT STDMETHODCALLTYPE setShouldApplyMacFontAscentHack(BOOL);
326  virtual HRESULT STDMETHODCALLTYPE windowAncestryDidChange();
327  virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(RECT, _In_ HDC);
328  virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(RECT, POINT, _In_ HDC);
329  virtual HRESULT STDMETHODCALLTYPE reportException(_In_ JSContextRef, _In_ JSValueRef exception);
330  virtual HRESULT STDMETHODCALLTYPE elementFromJS(_In_ JSContextRef, _In_ JSValueRef nodeObject, _COM_Outptr_opt_ IDOMElement**);
331  virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerTimeDelay(double);
332  virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerChunkSize(int);
333  virtual HRESULT STDMETHODCALLTYPE backingStore(_Deref_opt_out_ HBITMAP*);
334  virtual HRESULT STDMETHODCALLTYPE setTransparent(BOOL);
335  virtual HRESULT STDMETHODCALLTYPE transparent(_Out_ BOOL*);
336  virtual HRESULT STDMETHODCALLTYPE setDefersCallbacks(BOOL);
337  virtual HRESULT STDMETHODCALLTYPE defersCallbacks(_Out_ BOOL*);
338  virtual HRESULT STDMETHODCALLTYPE globalHistoryItem(_COM_Outptr_opt_ IWebHistoryItem**);
339  virtual HRESULT STDMETHODCALLTYPE setAlwaysUsesComplexTextCodePath(BOOL);
340  virtual HRESULT STDMETHODCALLTYPE alwaysUsesComplexTextCodePath(_Out_ BOOL*);
341  virtual HRESULT STDMETHODCALLTYPE setCookieEnabled(BOOL);
342  virtual HRESULT STDMETHODCALLTYPE cookieEnabled(_Out_ BOOL*);
343  virtual HRESULT STDMETHODCALLTYPE setMediaVolume(float);
344  virtual HRESULT STDMETHODCALLTYPE mediaVolume(_Out_ float* volume);
345  virtual HRESULT STDMETHODCALLTYPE registerEmbeddedViewMIMEType(_In_ BSTR);
346  virtual HRESULT STDMETHODCALLTYPE setMemoryCacheDelegateCallsEnabled(BOOL);
347  virtual HRESULT STDMETHODCALLTYPE setJavaScriptURLsAreAllowed(BOOL);
348  virtual HRESULT STDMETHODCALLTYPE setCanStartPlugins(BOOL);
349  virtual HRESULT STDMETHODCALLTYPE addUserScriptToGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR source, _In_ BSTR url,
350  unsigned whitelistCount, __inout_ecount_full(whitelistCount) BSTR* whitelist, unsigned blacklistCount,
351  __inout_ecount_full(blacklistCount) BSTR* blacklist, WebUserScriptInjectionTime);
352  virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR source, _In_ BSTR url,
353  unsigned whitelistCount, __inout_ecount_full(whitelistCount) BSTR* whitelist, unsigned blacklistCount, __inout_ecount_full(blacklistCount) BSTR* blacklist);
354  virtual HRESULT STDMETHODCALLTYPE removeUserScriptFromGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR url);
355  virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetFromGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR url);
356  virtual HRESULT STDMETHODCALLTYPE removeUserScriptsFromGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*);
357  virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetsFromGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*);
358  virtual HRESULT STDMETHODCALLTYPE removeAllUserContentFromGroup(_In_ BSTR groupName);
359  virtual HRESULT STDMETHODCALLTYPE unused1();
360  virtual HRESULT STDMETHODCALLTYPE unused2();
361  virtual HRESULT STDMETHODCALLTYPE invalidateBackingStore(_In_opt_ const RECT*);
362  virtual HRESULT STDMETHODCALLTYPE addOriginAccessWhitelistEntry(_In_ BSTR sourceOrigin, _In_ BSTR destinationProtocol, _In_ BSTR destinationHost, BOOL allowDestinationSubdomains);
363  virtual HRESULT STDMETHODCALLTYPE removeOriginAccessWhitelistEntry(_In_ BSTR sourceOrigin, _In_ BSTR destinationProtocol, _In_ BSTR destinationHost, BOOL allowDestinationSubdomains);
364  virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhitelists();
365  virtual HRESULT STDMETHODCALLTYPE setHistoryDelegate(_In_ IWebHistoryDelegate*);
366  virtual HRESULT STDMETHODCALLTYPE historyDelegate(_COM_Outptr_opt_ IWebHistoryDelegate**);
367  virtual HRESULT STDMETHODCALLTYPE addVisitedLinks(__inout_ecount_full(visitedURLCount) BSTR* visitedURLs, unsigned visitedURLCount);
368  virtual HRESULT STDMETHODCALLTYPE unused3();
369  virtual HRESULT STDMETHODCALLTYPE unused4();
370  virtual HRESULT STDMETHODCALLTYPE unused5();
371  virtual HRESULT STDMETHODCALLTYPE setGeolocationProvider(_In_opt_ IWebGeolocationProvider*);
372  virtual HRESULT STDMETHODCALLTYPE geolocationProvider(_COM_Outptr_opt_ IWebGeolocationProvider**);
373  virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(_In_opt_ IWebGeolocationPosition* position);
374  virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(_In_opt_ IWebError* error);
375  virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, _In_ BSTR scheme);
376  virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(_In_ BSTR);
377  virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing(_In_ BSTR);
378  virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(_In_ BSTR);
379  virtual HRESULT STDMETHODCALLTYPE nextDisplayIsSynchronous();
380  virtual HRESULT STDMETHODCALLTYPE defaultMinimumTimerInterval(_Out_ double*);
381  virtual HRESULT STDMETHODCALLTYPE setMinimumTimerInterval(double);
382  virtual HRESULT STDMETHODCALLTYPE httpPipeliningEnabled(_Out_ BOOL*);
383  virtual HRESULT STDMETHODCALLTYPE setHTTPPipeliningEnabled(BOOL);
384  virtual HRESULT STDMETHODCALLTYPE setUsesLayeredWindow(BOOL);
385  virtual HRESULT STDMETHODCALLTYPE usesLayeredWindow(_Out_ BOOL*);
386 
387  // IWebViewPrivate2
388  HRESULT STDMETHODCALLTYPE setLoadResourcesSerially(BOOL);
389  HRESULT STDMETHODCALLTYPE scaleWebView(double scale, POINT origin);
390  HRESULT STDMETHODCALLTYPE dispatchPendingLoadRequests();
391  virtual HRESULT STDMETHODCALLTYPE setCustomBackingScaleFactor(double);
392  virtual HRESULT STDMETHODCALLTYPE backingScaleFactor(_Out_ double*);
393  virtual HRESULT STDMETHODCALLTYPE addUserScriptToGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR source, _In_ BSTR url,
394  unsigned whitelistCount, __inout_ecount_full(whitelistCount) BSTR* whitelist, unsigned blacklistCount, __inout_ecount_full(blacklistCount) BSTR* blacklist, WebUserScriptInjectionTime, WebUserContentInjectedFrames);
395  virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(_In_ BSTR groupName, _In_opt_ IWebScriptWorld*, _In_ BSTR source, _In_ BSTR url,
396  unsigned whitelistCount, __inout_ecount_full(whitelistCount) BSTR* whitelist, unsigned blacklistCount, __inout_ecount_full(blacklistCount) BSTR* blacklist, WebUserContentInjectedFrames);
397 
398  // IWebViewPrivate3
399  HRESULT STDMETHODCALLTYPE layerTreeAsString(_Deref_opt_out_ BSTR*);
400  HRESULT STDMETHODCALLTYPE findString(_In_ BSTR, WebFindOptions, _Deref_opt_out_ BOOL*);
401 
402  // IWebViewPrivate4
403  HRESULT STDMETHODCALLTYPE setVisibilityState(WebPageVisibilityState);
404 
405  // WebView
406  bool shouldUseEmbeddedView(const WTF::String& mimeType) const;
407 
408  WebCore::Page* page();
409  bool handleMouseEvent(UINT, WPARAM, LPARAM);
410  void setMouseActivated(bool flag) { m_mouseActivated = flag; }
411  bool handleContextMenuEvent(WPARAM, LPARAM);
412  HMENU createContextMenu();
413  bool onMeasureItem(WPARAM, LPARAM);
414  bool onDrawItem(WPARAM, LPARAM);
415  bool onInitMenuPopup(WPARAM, LPARAM);
416  bool onUninitMenuPopup(WPARAM, LPARAM);
417  void onMenuCommand(WPARAM, LPARAM);
418  bool mouseWheel(WPARAM, LPARAM, bool isMouseHWheel);
419  bool verticalScroll(WPARAM, LPARAM);
420  bool horizontalScroll(WPARAM, LPARAM);
421  bool gesture(WPARAM, LPARAM);
422  bool gestureNotify(WPARAM, LPARAM);
423  bool execCommand(WPARAM wParam, LPARAM lParam);
424  bool keyDown(WPARAM, LPARAM, bool systemKeyDown = false);
425  bool keyUp(WPARAM, LPARAM, bool systemKeyDown = false);
426  bool keyPress(WPARAM, LPARAM, bool systemKeyDown = false);
427  void paintWithDirect2D();
428  void paint(HDC, LPARAM);
429  void paintIntoWindow(HDC bitmapDC, HDC windowDC, const WebCore::IntRect& dirtyRect);
430  bool ensureBackingStore();
431  void addToDirtyRegion(const WebCore::IntRect&);
432  void addToDirtyRegion(GDIObject<HRGN>);
433  void scrollBackingStore(WebCore::FrameView*, int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect);
434  void deleteBackingStore();
435  void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
436  void frameRect(RECT* rect);
437  void closeWindow();
438  void closeWindowSoon();
439  void closeWindowTimerFired();
440  bool didClose() const { return m_didClose; }
441 
442  bool transparent() const { return m_transparent; }
443  bool usesLayeredWindow() const { return m_usesLayeredWindow; }
444  bool needsDisplay() const { return m_needsDisplay; }
445 
446  bool onIMEStartComposition();
447  bool onIMEComposition(LPARAM);
448  bool onIMEEndComposition();
449  bool onIMEChar(WPARAM, LPARAM);
450  bool onIMENotify(WPARAM, LPARAM, LRESULT*);
451  LRESULT onIMERequest(WPARAM, LPARAM);
452  bool onIMESelect(WPARAM, LPARAM);
453  bool onIMESetContext(WPARAM, LPARAM);
454  void selectionChanged();
455  void resetIME(WebCore::Frame*);
456  void setInputMethodState(bool);
457 
458  HRESULT registerDragDrop();
459  HRESULT revokeDragDrop();
460 
461  // Convenient to be able to violate the rules of COM here for easy movement to the frame.
462  WebFrame* topLevelFrame() const { return m_mainFrame; }
463  const WTF::String& userAgentForKURL(const WebCore::URL& url);
464 
465  static bool canHandleRequest(const WebCore::ResourceRequest&);
466 
468 
469  void setIsBeingDestroyed();
470  bool isBeingDestroyed() const { return m_isBeingDestroyed; }
471 
472  const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
473  bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
474 
475  bool isPainting() const { return m_paintCount > 0; }
476 
477  void setToolTip(const WTF::String&);
478 
479  void registerForIconNotification(bool listen);
480  void dispatchDidReceiveIconFromWebFrame(WebFrame*);
481 
482  HRESULT notifyDidAddIcon(IWebNotification*);
483  HRESULT notifyPreferencesChanged(IWebNotification*);
484 
485  static void setCacheModel(WebCacheModel);
486  static WebCacheModel cacheModel();
487  static bool didSetCacheModel();
488  static WebCacheModel maxCacheModelInAnyInstance();
489 
490  void updateActiveStateSoon() const;
491  void deleteBackingStoreSoon();
492  void cancelDeleteBackingStoreSoon();
493 
494  HWND topLevelParent() const { return m_topLevelParent; }
495  HWND viewWindow() const { return m_viewWindow; }
496 
497  void updateActiveState();
498 
499  bool onGetObject(WPARAM, LPARAM, LRESULT&) const;
500  static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject);
501 
502  void downloadURL(const WebCore::URL&);
503 
504  void flushPendingGraphicsLayerChangesSoon();
505  void setRootChildLayer(WebCore::GraphicsLayer*);
506 
507 #if PLATFORM(WIN) && USE(AVFOUNDATION)
508  WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const;
509 #endif
510 
511  void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&);
512  void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&);
513 
514  void setLastCursor(HCURSOR cursor) { m_lastSetCursor = cursor; }
515 
516  void setGlobalHistoryItem(WebCore::HistoryItem*);
517 
518 #if ENABLE(FULLSCREEN_API)
519  bool supportsFullScreenForElement(const WebCore::Element*, bool withKeyboard) const;
520  bool isFullScreen() const;
521  WebCore::FullScreenController* fullScreenController();
522  void setFullScreenElement(PassRefPtr<WebCore::Element>);
523  WebCore::Element* fullScreenElement() const { return m_fullScreenElement.get(); }
524 #endif
525 
526  bool canShowMIMEType(const String& mimeType);
527  bool canShowMIMETypeAsHTML(const String& mimeType);
528 
529  // Used by TextInputController in DumpRenderTree
530  HRESULT STDMETHODCALLTYPE setCompositionForTesting(_In_ BSTR composition, UINT from, UINT length);
531  HRESULT STDMETHODCALLTYPE hasCompositionForTesting(_Out_ BOOL*);
532  HRESULT STDMETHODCALLTYPE confirmCompositionForTesting(_In_ BSTR composition);
533  HRESULT STDMETHODCALLTYPE compositionRangeForTesting(_Out_ UINT* startPosition, _Out_ UINT* length);
534  HRESULT STDMETHODCALLTYPE firstRectForCharacterRangeForTesting(UINT location, UINT length, _Out_ RECT* resultRect);
535  HRESULT STDMETHODCALLTYPE selectedRangeForTesting(_Out_ UINT* location, _Out_ UINT* length);
536 
537  float deviceScaleFactor() const;
538 
539 private:
540  void setZoomMultiplier(float multiplier, bool isTextOnly);
541  float zoomMultiplier(bool isTextOnly);
542  bool canZoomIn(bool isTextOnly);
543  HRESULT zoomIn(bool isTextOnly);
544  bool canZoomOut(bool isTextOnly);
545  HRESULT zoomOut(bool isTextOnly);
546  bool canResetZoom(bool isTextOnly);
547  HRESULT resetZoom(bool isTextOnly);
548  bool active();
549 
550  void sizeChanged(const WebCore::IntSize&);
551  bool dpiChanged(float, const WebCore::IntSize&);
552 
553  enum WindowsToPaint { PaintWebViewOnly, PaintWebViewAndChildren };
554  void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect, WindowsToPaint);
555  void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false, WindowsToPaint = PaintWebViewOnly);
556 
557  void performLayeredWindowUpdate();
558 
559  WebCore::DragOperation keyStateToDragOperation(DWORD grfKeyState) const;
560 
561  // FIXME: This variable is part of a workaround. The drop effect (pdwEffect) passed to Drop is incorrect.
562  // We set this variable in DragEnter and DragOver so that it can be used in Drop to set the correct drop effect.
563  // Thus, on return from DoDragDrop we have the correct pdwEffect for the drag-and-drop operation.
564  // (see https://bugs.webkit.org/show_bug.cgi?id=29264)
565  DWORD m_lastDropEffect { 0 };
566 
567  // GraphicsLayerClient
568  virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
569  virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
571 
572  // CACFLayerTreeHostClient
573  virtual void flushPendingGraphicsLayerChanges();
574 
575  bool m_shouldInvertColors { false };
576  void setShouldInvertColors(bool);
577 
578 protected:
579  static bool registerWebViewWindowClass();
580  static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
581 
582  void updateWindowIfNeeded(HWND hWnd, UINT message);
583  bool paintCompositedContentToHDC(HDC);
584 
585  HIMC getIMMContext();
586  void releaseIMMContext(HIMC);
587  static bool allowSiteSpecificHacks() { return s_allowSiteSpecificHacks; }
588  void preflightSpellChecker();
589  bool continuousCheckingAllowed();
590  void initializeToolTipWindow();
591  void prepareCandidateWindow(WebCore::Frame*, HIMC);
592  void updateSelectionForIME();
593  LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*);
594  LRESULT onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*);
595  bool developerExtrasEnabled() const;
596 
597  bool shouldInitializeTrackPointHack();
598 
599  // AllWebViewSet functions
600  void addToAllWebViewsSet();
601  void removeFromAllWebViewsSet();
602 
603  virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM);
604 
605 #if ENABLE(FULLSCREEN_API)
606  virtual HWND fullScreenClientWindow() const;
607  virtual HWND fullScreenClientParentWindow() const;
608  virtual void fullScreenClientSetParentWindow(HWND);
609  virtual void fullScreenClientWillEnterFullScreen();
610  virtual void fullScreenClientDidEnterFullScreen();
611  virtual void fullScreenClientWillExitFullScreen();
612  virtual void fullScreenClientDidExitFullScreen();
613  virtual void fullScreenClientForceRepaint();
614  virtual void fullScreenClientSaveScrollPosition();
615  virtual void fullScreenClientRestoreScrollPosition();
616 #endif
617 
618  ULONG m_refCount { 0 };
619 #if !ASSERT_DISABLED
620  bool m_deletionHasBegun { false };
621 #endif
622  HWND m_hostWindow { nullptr };
623  HWND m_viewWindow { nullptr };
624  WebFrame* m_mainFrame { nullptr };
625  WebCore::Page* m_page { nullptr };
626  WebInspectorClient* m_inspectorClient { nullptr };
627 
628  HMENU m_currentContextMenu { nullptr };
629  RefPtr<WebCore::SharedGDIObject<HBITMAP>> m_backingStoreBitmap;
630 #if USE(DIRECT2D)
631  COMPtr<ID2D1HwndRenderTarget> m_renderTarget;
632  COMPtr<ID2D1Bitmap> m_backingStoreD2DBitmap;
633  COMPtr<ID2D1BitmapRenderTarget> m_backingStoreRenderTarget;
634  COMPtr<ID2D1GdiInteropRenderTarget> m_backingStoreGdiInterop;
635 #endif
637  RefPtr<WebCore::SharedGDIObject<HRGN>> m_backingStoreDirtyRegion;
638 
653 
654  bool m_userAgentOverridden { false };
655  bool m_useBackForwardList { true };
658  float m_zoomMultiplier { 1.0f };
659  float m_customDeviceScaleFactor { 0 };
660  bool m_zoomsTextOnly { false };
663  bool m_mouseActivated { false };
664  // WebCore dragging logic needs to be able to inspect the drag data
665  // this is updated in DragEnter/Leave/Drop
668  UChar m_currentCharacterCode { 0 };
669  bool m_isBeingDestroyed { false };
670  unsigned m_paintCount { 0 };
671  bool m_hasSpellCheckerDocumentTag { false };
672  bool m_didClose { false };
673  bool m_hasCustomDropTarget { false };
674  unsigned m_inIMEComposition { 0 };
675  HWND m_toolTipHwnd { nullptr };
677  bool m_deleteBackingStoreTimerActive { false };
678 
679  bool m_transparent { false };
680 
682 
683  WebCore::SuspendableTimer* m_closeWindowTimer { nullptr };
684  std::unique_ptr<TRACKMOUSEEVENT> m_mouseOutTracker;
685 
686  HWND m_topLevelParent { nullptr };
687 
688  std::unique_ptr<HashSet<WTF::String>> m_embeddedViewMIMETypes;
689 
690  //Variables needed to store gesture information
691  RefPtr<WebCore::Node> m_gestureTargetNode;
692  long m_lastPanX { 0 };
693  long m_lastPanY { 0 };
694  long m_xOverpan { 0 };
695  long m_yOverpan { 0 };
696 
697 #if ENABLE(VIDEO)
698  std::unique_ptr<FullscreenVideoController> m_fullScreenVideoController;
699 #endif
700 
701  bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; }
702  void setAcceleratedCompositing(bool);
703 #if USE(CA)
704  RefPtr<WebCore::CACFLayerTreeHost> m_layerTreeHost;
705  std::unique_ptr<WebCore::GraphicsLayer> m_backingLayer;
706 #elif USE(TEXTURE_MAPPER_GL)
707  std::unique_ptr<AcceleratedCompositingContext> m_acceleratedCompositingContext;
708 #endif
709  bool m_isAcceleratedCompositing { false };
710 
711  bool m_nextDisplayIsSynchronous { false };
712  bool m_usesLayeredWindow { false };
713  bool m_needsDisplay { false };
714 
715  HCURSOR m_lastSetCursor { nullptr };
716 
717  RefPtr<WebCore::HistoryItem> m_globalHistoryItem;
718 
719 #if ENABLE(FULLSCREEN_API)
720  RefPtr<WebCore::Element> m_fullScreenElement;
721  std::unique_ptr<WebCore::FullScreenController> m_fullscreenController;
722  WebCore::IntPoint m_scrollPosition;
723 #endif
724 
725  RefPtr<WebViewGroup> m_webViewGroup;
726 };
727 
728 #endif
COMPtr< IWebUIDelegatePrivate > m_uiDelegatePrivate
Definition: WebView.h:644
bool active
Definition: screen_capturer_mac.mm:125
WTF::String m_overrideEncoding
Definition: WebView.h:661
NSUInteger WebFindOptions
Definition: WebViewPrivate.h:150
OBJC_CLASS WebView
Definition: BackForwardList.h:34
Definition: ResourceRequest.h:41
Definition: IWebHistoryItem.idl:45
GLsizei GLsizei GLchar * source
Definition: gl2.h:451
Definition: IWebURLRequest.idl:46
Definition: AccessibilityDelegate.idl:39
Definition: IWebGeolocationProvider.idl:39
Definition: IntPoint.h:67
Definition: WebFrame.h:48
uint32_t flag
Definition: ssl_lib.c:2732
Definition: XMLHttpRequest.idl:39
Definition: BlobLineEndings.idl:27
Definition: IWebNotification.idl:37
bool isAcceleratedCompositing() const
Definition: WebView.h:701
RefPtr< WebViewGroup > m_webViewGroup
Definition: WebView.h:725
Definition: IWebView.idl:1127
unsigned GraphicsLayerPaintingPhase
Definition: GraphicsLayerClient.h:53
std::unique_ptr< HashSet< WTF::String > > m_embeddedViewMIMETypes
Definition: WebView.h:688
Definition: xmlparse.c:181
bool didClose() const
Definition: WebView.h:440
Definition: rtpw.c:144
unsigned long ULONG
Definition: MD5.h:32
WTF::String m_userAgentCustom
Definition: WebView.h:656
Definition: IWebEditingDelegate.idl:101
Definition: IntRect.h:70
COMPtr< IWebEditingDelegate > m_editingDelegate
Definition: WebView.h:640
Definition: FloatRect.h:59
Definition: IWebDownload.idl:133
Definition: IWebViewPrivate.idl:347
Definition: IWebBackForwardList.idl:49
Definition: IWebScriptObject.idl:63
struct HWND__ * HWND
Definition: DumpRenderTreeWin.h:38
Definition: IWebError.idl:130
Definition: GraphicsContext.h:245
Definition: WebBackForwardList.h:43
Definition: IWebDocument.idl:48
HRESULT
Definition: ScrollbarThemeWin.cpp:74
WebUserContentInjectedFrames
Definition: WebViewPrivate.h:137
WEBCORE_EXPORT AuthenticationChallenge core(NSURLAuthenticationChallenge *)
Definition: AuthenticationMac.mm:214
static bool s_allowSiteSpecificHacks
Definition: WebView.h:681
VoEVolumeControl * volume
Definition: voe_cmd_test.cc:55
Definition: IWebUIDelegate.idl:188
Received complete frame timestamp frame type frame size at time
Definition: plotReceiveTrace.m:7
const struct OpaqueJSContext * JSContextRef
Definition: JSBase.h:43
Definition: WTFString.h:78
Definition: WebInspectorClient.h:52
COMPtr< IWebResourceLoadDelegate > m_resourceLoadDelegate
Definition: WebView.h:647
COMPtr< IDataObject > m_dragData
Definition: WebView.h:666
USVString origin
Definition: MessageEvent.idl:50
RefPtr< WebCore::Node > m_gestureTargetNode
Definition: WebView.h:691
WebFrame * topLevelFrame() const
Definition: WebView.h:462
WEBCORE_EXPORT String standardUserAgentWithApplicationName(const String &applicationName, const String &webkitVersionString)
Definition: UserAgentIOS.mm:68
typename detail::non_empty_find< Sequence, Predicate > found
Definition: Brigand.h:1090
COMPtr< IDropTargetHelper > m_dropTargetHelper
Definition: WebView.h:667
sender AddRef()
GLint location
Definition: gl2.h:455
COMPtr< IWebFrameLoadDelegate > m_frameLoadDelegate
Definition: WebView.h:641
Definition: IWebFrameLoadDelegatePrivate.idl:42
def exception(msg, args)
Definition: __init__.py:1148
COMPtr< IWebFormDelegate > m_formDelegate
Definition: WebView.h:645
Definition: IWebView.idl:1080
Definition: DOMCSS.idl:125
PolicyDelegate * policyDelegate
Definition: DumpRenderTree.mm:202
Definition: SuspendableTimer.h:34
COMPtr< IWebHistoryDelegate > m_historyDelegate
Definition: WebView.h:649
Definition: IWebFormDelegate.idl:73
HWND viewWindow() const
Definition: WebView.h:495
WebUserScriptInjectionTime
Definition: WebViewPrivate.h:132
enum _WebSelectionAffinity WebSelectionAffinity
Definition: IWebResourceLoadDelegate.idl:62
Definition: IWebUndoManager.idl:40
Definition: FetchRequest.idl:29
wchar_t * BSTR
Definition: BString.h:36
std::unique_ptr< TRACKMOUSEEVENT > m_mouseOutTracker
Definition: WebView.h:684
EGLAttrib * value
Definition: eglext.h:120
void setMouseActivated(bool flag)
Definition: WebView.h:410
RefPtr< WebCore::SharedGDIObject< HBITMAP > > m_backingStoreBitmap
Definition: WebView.h:629
AVCFPlayerLayerRef CGRect rect
Definition: AVFoundationCFSoftLinking.h:201
Definition: EncryptedMediaExtensions.idl:80
Definition: HistoryItem.h:60
COMPtr< IWebFrameLoadDelegatePrivate > m_frameLoadDelegatePrivate
Definition: WebView.h:642
const struct OpaqueJSValue * JSValueRef
Definition: JSBase.h:66
Definition: DOMCore.idl:512
Definition: IWebNotificationObserver.idl:39
EGLImageKHR EGLint * name
Definition: eglext.h:851
AudioFrame frame
Definition: audio_processing_impl_locking_unittest.cc:105
Definition: WebView.h:127
pt
Definition: parse_delay_file.m:32
Definition: IWebFrame.idl:66
bool usesLayeredWindow() const
Definition: WebView.h:443
HWND topLevelParent() const
Definition: WebView.h:494
DOMString pseudoElement
Definition: TransitionEvent.idl:38
bool isBeingDestroyed() const
Definition: WebView.h:470
COMPtr< ResourceLoadDelegate > resourceLoadDelegate
Definition: DumpRenderTree.cpp:116
Definition: KeyboardEvent.idl:23
Definition: IWebPreferences.idl:69
COMPtr< WebPreferences > m_preferences
Definition: WebView.h:650
Definition: GraphicsLayer.h:229
int Release(RepeatedCompositeContainer *self)
Definition: repeated_composite_container.cc:458
const AtomicString & search()
Definition: InputTypeNames.cpp:130
Definition: IWebArchive.idl:48
Definition: WebViewGroup.h:39
WebFrame * mainFrame
Definition: DumpRenderTree.mm:182
Definition: FetchRequest.idl:33
COMPtr< IAccessibilityDelegate > m_accessibilityDelegate
Definition: WebView.h:639
WebPageVisibilityState
Definition: WebViewPrivate.h:172
WebCacheModel
Definition: IWebPreferences.idl:56
Definition: IWebView.idl:110
Definition: KeyboardEvent.h:37
COMPtr< IWebDownloadDelegate > m_downloadDelegate
Definition: WebView.h:648
result
Definition: target-blank-opener-post-window.php:5
Definition: Page.h:148
Definition: IWebView.idl:933
Definition: IWebInspector.idl:40
bool needsDisplay() const
Definition: WebView.h:444
Definition: DOMRange.idl:67
Definition: IWebFrameLoadDelegate.idl:55
WebView * kit(WebCore::Page *)
Definition: WebView.cpp:240
Definition: FrameView.h:68
WTF::String m_userAgentStandard
Definition: WebView.h:657
WEBCORE_EXPORT void reportException(JSC::ExecState *, JSC::JSValue exception, CachedScript *=nullptr)
Definition: JSDOMExceptionHandling.cpp:49
Definition: DOMCore.idl:326
url
Definition: setup.py:223
Definition: IWebView.idl:774
Definition: IWebPolicyDelegate.idl:154
WTF::String m_toolTip
Definition: WebView.h:676
bool transparent() const
Definition: WebView.h:442
SIZE m_backingStoreSize
Definition: WebView.h:636
COMPtr< IWebGeolocationProvider > m_geolocationProvider
Definition: WebView.h:652
Definition: IWebDocument.idl:188
Definition: xmltok.h:112
Definition: URL.h:52
COMPtr< IWebPolicyDelegate > m_policyDelegate
Definition: WebView.h:646
WTF::String m_applicationName
Definition: WebView.h:662
Definition: IWebView.idl:916
Definition: IWebView.idl:161
uint16_t UChar
Definition: umachine.h:278
Definition: IWebGeolocationPosition.idl:36
const char * extension
Definition: MIMETypeRegistry.cpp:58
Definition: COMPtr.h:50
HANDLE hTheme BOOL
Definition: ScrollbarThemeWin.cpp:76
void setLastCursor(HCURSOR cursor)
Definition: WebView.h:514
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
Definition: GraphicsLayerClient.h:79
This file is generated by create-http-header-name-table, do not edit.
Definition: CharsetData.cpp:6
bool isPainting() const
Definition: WebView.h:475
Definition: Frame.h:113
Definition: DOMCore.idl:95
Definition: CACFLayerTreeHostClient.h:31
def listen(port=DEFAULT_LOGGING_CONFIG_PORT)
Definition: config.py:194
Definition: Element.h:72
DragOperation
Definition: DragActions.h:55
Definition: WebInspector.h:37
RefPtr< WebCore::HistoryItem > m_globalHistoryItem
Definition: WebView.h:717
Definition: IntSize.h:69
GLuint GLsizei GLsizei * length
Definition: gl2.h:435
COMPtr< IWebUIDelegate > m_uiDelegate
Definition: WebView.h:643
RefPtr< WebCore::SharedGDIObject< HRGN > > m_backingStoreDirtyRegion
Definition: WebView.h:637
COMPtr< WebInspector > m_webInspector
Definition: WebView.h:651
Definition: IWebScriptWorld.idl:37
static bool allowSiteSpecificHacks()
Definition: WebView.h:587
Definition: WindowMessageListener.h:36
Definition: IWebHistoryDelegate.idl:42
Definition: HTMLVideoElement.idl:29