Resizing Cappuccino is very laggy on WebKit since Safari 5.1
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.messages.in
1 # Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
5 # are met:
6 # 1.  Redistributions of source code must retain the above copyright
7 #     notice, this list of conditions and the following disclaimer.
8 # 2.  Redistributions in binary form must reproduce the above copyright
9 #     notice, this list of conditions and the following disclaimer in the
10 #     documentation and/or other materials provided with the distribution.
11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 messages -> WebPage LegacyReceiver {
24     SetActive(bool active)
25     SetFocused(bool focused)
26     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
27     SetIsInWindow(bool isInWindow)
28
29     SetDrawsBackground(bool drawsBackground)
30     SetDrawsTransparentBackground(bool drawsTransparentBackground)
31
32     SetUnderlayColor(WebCore::Color color)
33
34     ViewWillStartLiveResize()
35     ViewWillEndLiveResize()
36
37     KeyEvent(WebKit::WebKeyboardEvent event)
38     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
39     MouseEvent(WebKit::WebMouseEvent event)
40     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
41     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
42 #if ENABLE(TOUCH_EVENTS)
43     TouchEvent(WebKit::WebTouchEvent event)
44     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
45 #endif
46 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
47     HighlightPotentialActivation(WebCore::IntPoint point, WebCore::IntSize area)
48 #endif
49
50 #if ENABLE(INPUT_TYPE_COLOR)
51     DidEndColorChooser()
52     DidChooseColor(WebCore::Color color)
53 #endif
54
55 #if ENABLE(CONTEXT_MENUS)
56     ContextMenuHidden()
57 #endif
58
59     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
60     CenterSelectionInVisibleArea()
61
62     GoBack(uint64_t backForwardItemID)
63     GoForward(uint64_t backForwardItemID)
64     GoToBackForwardItem(uint64_t backForwardItemID)
65     TryRestoreScrollPosition()
66     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
67     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL)
68     LoadPlainTextString(WTF::String string)
69     LoadWebArchiveData(CoreIPC::DataReference webArchiveData)
70     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
71     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
72     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
73     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
74     StopLoading()
75
76 #if PLATFORM(QT)
77     ApplicationSchemeReply(WebKit::QtNetworkReplyData reply)
78     RegisterApplicationScheme(WTF::String scheme)
79 #endif
80
81     StopLoadingFrame(uint64_t frameID)
82     
83     RestoreSession(WebKit::SessionState state)
84     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
85
86     DidRemoveBackForwardItem(uint64_t backForwardItemID)
87     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
88
89     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
90
91     ClearSelection()
92
93     # Callbacks.
94     GetContentsAsString(uint64_t callbackID)
95 #if ENABLE(MHTML)
96     GetContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
97 #endif
98     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
99     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
100     GetRenderTreeExternalRepresentation(uint64_t callbackID)
101     GetSelectionOrContentsAsString(uint64_t callbackID)
102     GetSelectionAsWebArchiveData(uint64_t callbackID)
103     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
104     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
105     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
106     ForceRepaint(uint64_t callbackID)
107
108 #if PLATFORM(MAC)
109     # Dictionary support.
110     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
111 #endif
112
113     PreferencesDidChange(WebKit::WebPreferencesStore store)
114
115     SetUserAgent(WTF::String userAgent)
116     SetCustomTextEncodingName(WTF::String encodingName)
117
118     SuspendActiveDOMObjectsAndAnimations()
119     ResumeActiveDOMObjectsAndAnimations()
120
121     Close()
122     TryClose()
123
124     ValidateCommand(WTF::String name, uint64_t callbackID)
125     ExecuteEditCommand(WTF::String name)
126
127     DidRemoveEditCommand(uint64_t commandID)
128     ReapplyEditCommand(uint64_t commandID)
129     UnapplyEditCommand(uint64_t commandID)
130
131     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
132     SetPageZoomFactor(double zoomFactor)
133     SetTextZoomFactor(double zoomFactor)
134     WindowScreenDidChange(uint64_t displayID)
135
136     ScalePage(double scale, WebCore::IntPoint origin)
137
138     SetUseFixedLayout(bool fixed)
139     SetFixedLayoutSize(WebCore::IntSize size)
140     ListenForLayoutMilestones(uint32_t milestones)
141     SetSuppressScrollbarAnimations(bool suppressAnimations)
142
143     SetRubberBandsAtBottom(bool rubberBandsAtBottom)
144     SetRubberBandsAtTop(bool rubberBandsAtTop)
145
146     SetPaginationMode(uint32_t mode)
147     SetPaginationBehavesLikeColumns(bool behavesLikeColumns)
148     SetPageLength(double pageLength)
149     SetGapBetweenPages(double gap)
150
151     PostInjectedBundleMessage(WTF::String messageName, WebKit::WebContextUserMessageEncoder messageBody) Variadic
152
153     # Find.
154     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
155     FindStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
156     GetImageForFindMatch(uint32_t matchIndex)
157     SelectFindMatch(uint32_t matchIndex)
158     HideFindUI()
159     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
160
161     # Drag and drop.
162 #if (PLATFORM(QT) || PLATFORM(GTK)) && ENABLE(DRAG_SUPPORT)
163     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
164 #endif
165 #if !PLATFORM(QT) && !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
166     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
167 #endif
168 #if ENABLE(DRAG_SUPPORT)
169     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
170 #endif
171
172     # Popup menu.
173     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
174     SetTextForActivePopupMenu(int32_t index)
175 #if PLATFORM(GTK)
176     FailedToShowPopupMenu()
177 #endif
178 #if PLATFORM(QT)
179     HidePopupMenu()
180     SelectedIndex(int32_t newIndex)
181 #endif
182     
183 #if ENABLE(CONTEXT_MENUS)
184     # Context menu.
185     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem)
186 #endif
187
188     # Open panel.
189     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
190     DidCancelForOpenPanel()
191 #if ENABLE(WEB_PROCESS_SANDBOX)
192     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
193 #endif
194
195     # Spelling and grammar.
196     AdvanceToNextMisspelling(bool startBeforeSelection)
197     ChangeSpellingToWord(WTF::String word)
198     DidFinishCheckingText(uint64_t requestID, WTF::Vector<WebCore::TextCheckingResult> result)
199     DidCancelCheckingText(uint64_t requestID)
200 #if USE(APPKIT)
201     UppercaseWord()
202     LowercaseWord()
203     CapitalizeWord()
204 #endif
205 #if PLATFORM(MAC)
206     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled)
207 #endif
208
209 #if ENABLE(GEOLOCATION)
210     # Geolocation
211     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
212 #endif
213
214     # Notification
215     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
216
217     SetWindowResizerSize(WebCore::IntSize intersectsView)
218
219     # Printing.
220     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
221     EndPrinting()
222     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
223 #if PLATFORM(MAC)
224     DrawRectToImage(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, uint64_t callbackID)
225     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
226 #endif
227 #if PLATFORM(GTK)
228     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
229 #endif
230
231     # Media
232     SetMediaVolume(float volume)
233     SetMayStartMediaWhenInWindow(bool mayStartMedia)
234
235     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
236
237     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
238     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
239     Dummy() -> (bool dummyReturn)
240
241     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
242     SetCanRunModal(bool canRunModal)
243
244 #if PLATFORM(EFL)
245     SetThemePath(WTF::String themePath)
246 #endif
247
248 #if USE(TILED_BACKING_STORE)
249     CommitPageTransitionViewport()
250 #endif
251
252 #if PLATFORM(QT) || PLATFORM(GTK)
253     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
254     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
255     CancelComposition()
256 #endif
257
258 #if PLATFORM(MAC)
259     # Complex text input support for plug-ins.
260     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
261
262     SetWindowIsVisible(bool windowIsVisible)
263     WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
264     ViewExposedRectChanged(WebCore::FloatRect exposedRect)
265     SetMainFrameIsScrollable(bool isScrollable)
266     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
267     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
268     GetDataSelectionForPasteboard(WTF::String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
269     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
270
271     # Text input.
272     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
273     ConfirmComposition() -> (WebKit::EditorState newState)
274     CancelComposition() -> (WebKit::EditorState newState)
275     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
276     GetMarkedRange() -> (uint64_t location, uint64_t length)
277     GetSelectedRange() -> (uint64_t location, uint64_t length)
278     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
279     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
280     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
281     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
282     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
283     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
284     InsertDictatedText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, WTF::Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, WebKit::EditorState newState)
285 #endif
286
287     SetMinimumLayoutWidth(double minimumLayoutWidth)
288
289 #if PLATFORM(EFL)
290     ConfirmComposition(WTF::String compositionString)
291     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
292     CancelComposition()
293 #endif
294 #if PLATFORM(QT)
295     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
296 #endif
297
298 #if PLATFORM(MAC)
299     HandleAlternativeTextUIResult(String result)
300 #endif
301
302 #if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
303     SetVisibilityState(uint32_t visibilityState, bool isInitialState)
304 #endif
305
306 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
307     SetAcceleratedCompositingWindowId(int64_t id)
308 #endif
309
310     SetMainFrameInViewSourceMode(bool inViewSourceMode)
311 }