webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
WebHTMLRepresentation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2007, 2015 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 
26 #ifndef WebHTMLRepresentation_H
27 #define WebHTMLRepresentation_H
28 
29 #include "WebKit.h"
30 
31 class WebFrame;
32 
34 {
35 public:
37 protected:
40 public:
41 
42  // IUnknown
43  virtual HRESULT STDMETHODCALLTYPE QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject);
44  virtual ULONG STDMETHODCALLTYPE AddRef();
45  virtual ULONG STDMETHODCALLTYPE Release();
46 
47  // IWebHTMLRepresentation
48  virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes(__deref_opt_inout BSTR* types, _Inout_ int* cTypes);
49  virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes(__deref_opt_inout BSTR* types, _Inout_ int* cTypes);
50  virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes(__deref_opt_inout BSTR* types, _Inout_ int* cTypes);
51  virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes(_In_opt_ IDOMNode* startNode, int startOffset,
52  _In_opt_ IDOMNode* endNode, int endOffset, _COM_Outptr_opt_ IDataObject** attributedString);
53  virtual HRESULT STDMETHODCALLTYPE elementWithName(_In_ BSTR name, _In_opt_ IDOMElement* form, _COM_Outptr_opt_ IDOMElement**);
54  virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete(_In_opt_ IDOMElement*, _Out_ BOOL* result);
55  virtual HRESULT STDMETHODCALLTYPE elementIsPassword(_In_opt_ IDOMElement*, _Out_ BOOL* result);
56  virtual HRESULT STDMETHODCALLTYPE formForElement(_In_opt_ IDOMElement*, _COM_Outptr_opt_ IDOMElement** form);
57  virtual HRESULT STDMETHODCALLTYPE currentForm(_COM_Outptr_opt_ IDOMElement** form);
58  virtual HRESULT STDMETHODCALLTYPE controlsInForm(_In_opt_ IDOMElement* form, __deref_inout_opt IDOMElement** controls, _Out_ int* cControls);
59 
60  /* Deprecated. Use the variant that includes resultDistance and resultIsInCellAbove instead. */
61  virtual HRESULT STDMETHODCALLTYPE deprecatedSearchForLabels(__inout_ecount_full(cLabels) BSTR* labels, int cLabels, _In_opt_ IDOMElement* beforeElement, __deref_opt_out BSTR* result);
62  virtual HRESULT STDMETHODCALLTYPE matchLabels(__inout_ecount_full(cLabels) BSTR* labels, int cLabels, _In_opt_ IDOMElement* againstElement, __deref_opt_out BSTR* result);
63  virtual HRESULT STDMETHODCALLTYPE searchForLabels(__inout_ecount_full(cLabels) BSTR* labels, unsigned cLabels, _In_opt_ IDOMElement* beforeElement,
64  _Out_ unsigned* resultDistance, _Out_ BOOL* resultIsInCellAbove, __deref_opt_out BSTR* result);
65 
66  // IWebDocumentRepresentation
67  virtual HRESULT STDMETHODCALLTYPE setDataSource(_In_opt_ IWebDataSource*);
68  virtual HRESULT STDMETHODCALLTYPE receivedData(_In_opt_ IStream* data, _In_opt_ IWebDataSource*);
69  virtual HRESULT STDMETHODCALLTYPE receivedError(_In_opt_ IWebError*, _In_opt_ IWebDataSource*);
70  virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource(_In_opt_ IWebDataSource*);
71  virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource(_Out_ BOOL*);
72  virtual HRESULT STDMETHODCALLTYPE documentSource(__deref_opt_out BSTR*);
73  virtual HRESULT STDMETHODCALLTYPE title(__deref_opt_out BSTR*);
74 
75 protected:
77  WebFrame* m_frame { nullptr };
78 };
79 
80 #endif
virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource(_Out_ BOOL *)
Definition: WebHTMLRepresentation.cpp:235
virtual HRESULT STDMETHODCALLTYPE setDataSource(_In_opt_ IWebDataSource *)
Definition: WebHTMLRepresentation.cpp:211
WebFrame * m_frame
Definition: WebHTMLRepresentation.h:77
BOOL
Definition: PlatformScreenIOS.mm:46
NSArray * supportedImageMIMETypes()
Definition: WebHTMLRepresentation.mm:117
Definition: WebFrame.h:48
static WebHTMLRepresentation * createInstance(WebFrame *frame)
Definition: WebHTMLRepresentation.cpp:60
virtual HRESULT STDMETHODCALLTYPE documentSource(__deref_opt_out BSTR *)
Definition: WebHTMLRepresentation.cpp:243
unsigned long ULONG
Definition: MD5.h:32
virtual HRESULT STDMETHODCALLTYPE searchForLabels(__inout_ecount_full(cLabels) BSTR *labels, unsigned cLabels, _In_opt_ IDOMElement *beforeElement, _Out_ unsigned *resultDistance, _Out_ BOOL *resultIsInCellAbove, __deref_opt_out BSTR *result)
Definition: WebHTMLRepresentation.cpp:203
NSArray * supportedMIMETypes()
Definition: WebHTMLRepresentation.mm:97
Definition: IWebError.idl:130
HRESULT
Definition: RenderThemeWin.cpp:150
virtual HRESULT STDMETHODCALLTYPE controlsInForm(_In_opt_ IDOMElement *form, __deref_inout_opt IDOMElement **controls, _Out_ int *cControls)
Definition: WebHTMLRepresentation.cpp:186
virtual HRESULT STDMETHODCALLTYPE elementIsPassword(_In_opt_ IDOMElement *, _Out_ BOOL *result)
Definition: WebHTMLRepresentation.cpp:154
virtual HRESULT STDMETHODCALLTYPE formForElement(_In_opt_ IDOMElement *, _COM_Outptr_opt_ IDOMElement **form)
Definition: WebHTMLRepresentation.cpp:164
Definition: form.py:1
Definition: IWebHTMLRepresentation.idl:44
wchar_t * BSTR
Definition: BString.h:36
virtual HRESULT STDMETHODCALLTYPE receivedError(_In_opt_ IWebError *, _In_opt_ IWebDataSource *)
Definition: WebHTMLRepresentation.cpp:223
Definition: DOMCore.idl:512
EGLImageKHR EGLint * name
Definition: eglext.h:851
AudioFrame frame
Definition: audio_processing_impl_locking_unittest.cc:105
virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource(_In_opt_ IWebDataSource *)
Definition: WebHTMLRepresentation.cpp:229
virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete(_In_opt_ IDOMElement *, _Out_ BOOL *result)
Definition: WebHTMLRepresentation.cpp:144
virtual HRESULT STDMETHODCALLTYPE matchLabels(__inout_ecount_full(cLabels) BSTR *labels, int cLabels, _In_opt_ IDOMElement *againstElement, __deref_opt_out BSTR *result)
Definition: WebHTMLRepresentation.cpp:197
EGLStreamKHR EGLint EGLint EGLint const void * data
Definition: eglext.h:984
~WebHTMLRepresentation()
Definition: WebHTMLRepresentation.cpp:48
result
Definition: target-blank-opener-post-window.php:5
Definition: WebHTMLRepresentation.h:46
ULONG m_refCount
Definition: WebHTMLRepresentation.h:76
WebHTMLRepresentation()
Definition: WebHTMLRepresentation.cpp:41
virtual HRESULT STDMETHODCALLTYPE deprecatedSearchForLabels(__inout_ecount_full(cLabels) BSTR *labels, int cLabels, _In_opt_ IDOMElement *beforeElement, __deref_opt_out BSTR *result)
Definition: WebHTMLRepresentation.cpp:191
Definition: IWebDocument.idl:188
Definition: IWebDataSource.idl:62
virtual HRESULT STDMETHODCALLTYPE elementWithName(_In_ BSTR name, _In_opt_ IDOMElement *form, _COM_Outptr_opt_ IDOMElement **)
Definition: WebHTMLRepresentation.cpp:133
virtual ULONG STDMETHODCALLTYPE Release()
Definition: WebHTMLRepresentation.cpp:94
virtual HRESULT STDMETHODCALLTYPE title(__deref_opt_out BSTR *)
Definition: WebHTMLRepresentation.cpp:293
Definition: DOMCore.idl:95
DOMElement * currentForm()
Definition: WebHTMLRepresentation.mm:322
NSArray * supportedNonImageMIMETypes()
Definition: WebHTMLRepresentation.mm:111
virtual HRESULT STDMETHODCALLTYPE receivedData(_In_opt_ IStream *data, _In_opt_ IWebDataSource *)
Definition: WebHTMLRepresentation.cpp:217
virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes(_In_opt_ IDOMNode *startNode, int startOffset, _In_opt_ IDOMNode *endNode, int endOffset, _COM_Outptr_opt_ IDataObject **attributedString)
Definition: WebHTMLRepresentation.cpp:123
virtual ULONG STDMETHODCALLTYPE AddRef()
Definition: WebHTMLRepresentation.cpp:89
virtual HRESULT STDMETHODCALLTYPE QueryInterface(_In_ REFIID riid, _COM_Outptr_ void **ppvObject)
Definition: WebHTMLRepresentation.cpp:71