2011-04-20 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-04-20  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Reproducible crash under WebPageProxy::didReceiveEvent
6         https://bugs.webkit.org/show_bug.cgi?id=59036
7         <rdar://problem/9252083>
8
9         * UIProcess/API/mac/WKView.mm:
10         (-[WKView _resendKeyDownEvent:]): Protect against self-destruction
11         when re-dispatching the event.        
12         * UIProcess/WebProcessProxy.cpp:
13         (WebKit::WebProcessProxy::createWebPage): Fixed a type mismatch
14         I noticed while debugging.
15
16 2011-04-20  Timothy Hatcher  <timothy@apple.com>
17
18         Make the Web Insepctor come to the front when a breakpoint is hit.
19
20         <https://webkit.org/b/57480> REGRESSION (WebKit2): Inspector doesn't come to the front when a breakpoint is hit in the debugger
21         <rdar://problem/9209472>
22
23         Reviewed by Adam Roben.
24
25         * UIProcess/WebInspectorProxy.cpp:
26         (WebKit::WebInspectorProxy::bringToFront): Added. Call platformBringToFront.
27         * UIProcess/WebInspectorProxy.h:
28         * UIProcess/WebInspectorProxy.messages.in: Added BringToFront.
29         * UIProcess/mac/WebInspectorProxyMac.mm:
30         (WebKit::WebInspectorProxy::platformBringToFront): Added. Call orderFront:.
31         * UIProcess/win/WebInspectorProxyWin.cpp:
32         (WebKit::WebInspectorProxy::platformBringToFront): Added. Call ShowWindow.
33         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
34         (WebKit::WebInspectorFrontendClient::bringToFront): Call WebInspector::bringToFront.
35         * WebProcess/WebPage/WebInspector.cpp:
36         (WebKit::WebInspector::bringToFront): Added. Send WebInspectorProxy::BringToFront message.
37         * WebProcess/WebPage/WebInspector.h: Added bringToFront.
38
39 2011-04-20  Chris Marrin  <cmarrin@apple.com>
40
41         Reviewed by Adam Roben.
42
43         REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
44         https://bugs.webkit.org/show_bug.cgi?id=57868
45         
46         Subclassed setRootCompositingLayer so it can call ensureAnimationsSubmitted on Win.
47
48         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
49             Make setRootCompositingLayer protected so it can be called from subclass
50         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
51             Override setRootCompositingLayer to add call to root layer's
52             PlatformCALayer::ensureAnimationsSubmitted method
53         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
54
55 2011-04-18  Eric Carlson  <eric.carlson@apple.com>
56
57         Reviewed by Dan Bernstein.
58
59         Adopt QTKit API for listing and deleting file in its media cache.
60         <rdar://problem/9130029> 
61
62         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
63         (InitWebCoreSystemInterface): Initialize new functions.
64
65 2011-04-20  Alejandro G. Castro  <alex@igalia.com>
66
67         Fixed GTK+ compilation after r84206.
68
69         * GNUmakefile.am:
70
71 2011-04-20  Adam Roben  <aroben@apple.com>
72
73         Remove some unnecessary VS junk related to NativeWebMouseEventWin.cpp
74
75         * win/WebKit2.vcproj:
76
77 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
78
79         Reviewed by Csaba Osztrogonác.
80
81         [Qt] Cleanup includepath adjustment for generated files
82         https://bugs.webkit.org/show_bug.cgi?id=58869
83
84         * WebKit2.pri: Add the directory of generated files to the include
85         path with absolute path to make it valid in the final build step.
86
87 2011-04-19  Anders Carlsson  <andersca@apple.com>
88
89         Reviewed by Sam Weinig.
90
91         UI process thinks the page is unresponsive when a plug-in is showing a context menu
92         https://bugs.webkit.org/show_bug.cgi?id=58943
93         <rdar://problem/9299901>
94
95         Change the HandleMouseEvent message to have a delayed reply and make the PluginControllerProxy
96         respond to it immediately, before even passing the event to the plug-in. Since it doesn't matter
97         for mouse events whether the plug-in handled them or not we can do this.
98
99         Another solution could have been to make handleMouseEvent an asynchronous message, but that could
100         mess up the message ordering so this seemed like the least intrusive change.
101
102         * PluginProcess/PluginControllerProxy.cpp:
103         (WebKit::PluginControllerProxy::handleMouseEvent):
104         * PluginProcess/PluginControllerProxy.h:
105         * PluginProcess/PluginControllerProxy.messages.in:
106
107 2011-04-19  Anders Carlsson  <andersca@apple.com>
108
109         Reviewed by Dan Bernstein.
110
111         Terminate hung plug-in processes after 45 seconds
112         https://bugs.webkit.org/show_bug.cgi?id=58932
113         <rdar://problem/8083219>
114
115         * UIProcess/Plugins/PluginProcessManager.cpp:
116         (WebKit::PluginProcessManager::pluginSyncMessageSendTimedOut):
117         Find the plug-in process proxy and terminate it.
118
119         (WebKit::PluginProcessManager::pluginProcessWithPath):
120         Add new helper function.
121
122         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
123         Call pluginProcessWithPath.
124
125         * UIProcess/Plugins/PluginProcessProxy.cpp:
126         (WebKit::PluginProcessProxy::terminate):
127         Terminate the process.
128
129         * UIProcess/Plugins/PluginProcessProxy.h:
130         * UIProcess/WebProcessProxy.cpp:
131         (WebKit::WebProcessProxy::pluginSyncMessageSendTimedOut):
132         Call PluginProcessManager::pluginSyncMessageSendTimedOut.
133
134         * UIProcess/WebProcessProxy.h:
135         * UIProcess/WebProcessProxy.messages.in:
136         Add PluginSyncMessageSendTimedOut message.
137
138         * WebProcess/Plugins/PluginProcessConnection.cpp:
139         (WebKit::defaultSyncMessageTimeout):
140         (WebKit::PluginProcessConnection::PluginProcessConnection):
141         Set a sync message timeout on the plug-in process connection.
142
143         (WebKit::PluginProcessConnection::syncMessageSendTimedOut):
144         Send a message to the web process proxy.
145
146 2011-04-19  Alexey Proskuryakov  <ap@apple.com>
147
148         Reviewed by Adele Peterson.
149
150         WebKit2: Merge SelectionState and TextInputState
151         https://bugs.webkit.org/show_bug.cgi?id=58919
152
153         Combined TextInputState and EditorState in one structure, which is updated whenever we get
154         a chance to. There is no sense to keep possibly stale SelectionState data when we have already
155         requested the most recent data synchronously.
156
157         This also simplifies the code, as we don't need to pass the state around in a separate variable.
158
159         * GNUmakefile.am:
160         * Scripts/webkit2/messages.py:
161         * Shared/EditorState.h: Copied from Source/WebKit2/Shared/SelectionState.h.
162         (WebKit::EditorState::EditorState):
163         * Shared/SelectionState.h: Removed.
164         * Shared/mac/TextInputState.h: Removed.
165         * UIProcess/API/mac/PageClientImpl.h:
166         * UIProcess/API/mac/PageClientImpl.mm:
167         (WebKit::PageClientImpl::interpretKeyEvent):
168         * UIProcess/API/mac/WKView.mm:
169         (-[WKView validRequestorForSendType:returnType:]):
170         (-[WKView validateUserInterfaceItem:]):
171         (-[WKView shouldDelayWindowOrderingForEvent:]):
172         (-[WKView doCommandBySelector:]):
173         (-[WKView insertText:replacementRange:]):
174         (-[WKView _handleStyleKeyEquivalent:]):
175         (-[WKView _executeSavedKeypressCommands]):
176         (-[WKView inputContext]):
177         (-[WKView hasMarkedText]):
178         (-[WKView unmarkText]):
179         (-[WKView setMarkedText:selectedRange:replacementRange:]):
180         (-[WKView attributedSubstringForProposedRange:actualRange:]):
181         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]):
182         (-[WKView _updateSecureInputState]):
183         * UIProcess/API/mac/WKViewInternal.h:
184         * UIProcess/PageClient.h:
185         * UIProcess/WebPageProxy.cpp:
186         (WebKit::WebPageProxy::editorStateChanged):
187         * UIProcess/WebPageProxy.h:
188         (WebKit::WebPageProxy::editorState):
189         (WebKit::WebPageProxy::hasSelectedRange):
190         (WebKit::WebPageProxy::isContentEditable):
191         * UIProcess/WebPageProxy.messages.in:
192         * UIProcess/mac/WebPageProxyMac.mm:
193         (WebKit::WebPageProxy::setComposition):
194         (WebKit::WebPageProxy::confirmComposition):
195         (WebKit::WebPageProxy::insertText):
196         (WebKit::WebPageProxy::executeKeypressCommands):
197         (WebKit::WebPageProxy::writeSelectionToPasteboard):
198         (WebKit::WebPageProxy::readSelectionFromPasteboard):
199         (WebKit::WebPageProxy::interpretQueuedKeyEvent):
200         * UIProcess/win/WebView.cpp:
201         (WebKit::WebView::compositionSelectionChanged):
202         (WebKit::WebView::onIMEComposition):
203         (WebKit::WebView::onIMEEndComposition):
204         (WebKit::WebView::onIMERequestCharPosition):
205         (WebKit::WebView::onIMERequest):
206         * WebKit2.xcodeproj/project.pbxproj:
207         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
208         (WebKit::WebEditorClient::respondToChangedSelection):
209         * WebProcess/WebPage/WebPage.cpp:
210         (WebKit::WebPage::editorState):
211         * WebProcess/WebPage/WebPage.h:
212         * WebProcess/WebPage/WebPage.messages.in:
213         * WebProcess/WebPage/mac/WebPageMac.mm:
214         (WebKit::WebPage::handleEditingKeyboardEvent):
215         (WebKit::WebPage::setComposition):
216         (WebKit::WebPage::confirmComposition):
217         (WebKit::WebPage::insertText):
218         (WebKit::WebPage::executeKeypressCommands):
219         * win/WebKit2.vcproj:
220
221 2011-04-19  Alexey Proskuryakov  <ap@apple.com>
222
223         Reviewed by Timothy Hatcher.
224
225         100% reproducible crash when right-clicking any element in Web Inspector on any page
226         https://bugs.webkit.org/show_bug.cgi?id=58822
227
228         Web Inspector changes selection from JavaScript, and checks in UI process are insufficient
229         when selection is changing asynchronously.
230
231         * WebProcess/WebPage/mac/WebPageMac.mm:
232         (WebKit::WebPage::writeSelectionToPasteboard): Check that there is a selection, matching WK1
233         and UI process side. Perhaps the check should really be in WebCore, but for now, it's a
234         WebKit responsibility.
235         (WebKit::WebPage::readSelectionFromPasteboard): Same check, for no other reason but consistency.
236
237 2011-04-19  Anders Carlsson  <andersca@apple.com>
238
239         Reviewed by Sam Weinig.
240
241         Add syncMessageSendTimedOut CoreIPC Connection::Client member function
242         https://bugs.webkit.org/show_bug.cgi?id=58928
243
244         * Platform/CoreIPC/Connection.cpp:
245         (CoreIPC::Connection::waitForSyncReply):
246         Call syncMessageSendTimedOut.
247
248         * Platform/CoreIPC/Connection.h:
249         Add syncMessageSendTimedOut to Connection::Client.
250
251         * PluginProcess/PluginProcess.cpp:
252         * PluginProcess/PluginProcess.h:
253         * PluginProcess/WebProcessConnection.cpp:
254         * PluginProcess/WebProcessConnection.h:
255         * UIProcess/Plugins/PluginProcessProxy.cpp:
256         * UIProcess/Plugins/PluginProcessProxy.h:
257         * UIProcess/WebProcessProxy.cpp:
258         * UIProcess/WebProcessProxy.h:
259         * WebProcess/Plugins/PluginProcessConnection.cpp:
260         * WebProcess/Plugins/PluginProcessConnection.h:
261         * WebProcess/WebProcess.cpp:
262         * WebProcess/WebProcess.h:
263         Add syncMessageSendTimedOut stubs.
264
265 2011-04-19  Anders Carlsson  <andersca@apple.com>
266
267         Reviewed by Alexey Proskuryakov.
268
269         Replace the didFailToSendSyncMessage Connection::Client function with a flag
270         https://bugs.webkit.org/show_bug.cgi?id=58923
271
272         * Platform/CoreIPC/Connection.cpp:
273         (CoreIPC::Connection::Connection):
274         Initialize m_shouldExitOnSyncMessageSendFailure to false.
275
276         (CoreIPC::Connection::setShouldExitOnSyncMessageSendFailure):
277         Set m_didCloseOnConnectionWorkQueueCallback.
278
279         (CoreIPC::Connection::sendSyncMessage):
280         Call didFailToSendSyncMessage if we fail to send the sync message for some reason.
281
282         (CoreIPC::Connection::didFailToSendSyncMessage):
283         if m_shouldExitOnSyncMessageSendFailure is true, exit.
284
285         * Platform/CoreIPC/Connection.h:
286         Remove didFailToSendSyncMessage from Connection::Client.
287
288         * PluginProcess/PluginProcess.cpp:
289         * PluginProcess/PluginProcess.h:
290         Remove didFailToSendSyncMessage.
291
292         * WebProcess/WebProcess.cpp:
293         (WebKit::WebProcess::initialize):
294         * WebProcess/WebProcess.h:
295         Remove didFailToSendSyncMessage. Call setShouldExitOnSyncMessageSendFailure on our
296         UI process connection.
297
298 2011-04-19  Anders Carlsson  <andersca@apple.com>
299
300         Reviewed by Sam Weinig.
301
302         Add a way to set the default sync message timeout for a CoreIPC connection
303         https://bugs.webkit.org/show_bug.cgi?id=58908
304
305         * Platform/CoreIPC/Connection.cpp:
306         (CoreIPC::Connection::Connection):
307         Initialize m_defaultSyncMessageTimeout.
308
309         (CoreIPC::Connection::setDefaultSyncMessageTimeout):
310         Set the m_defaultSyncMessageTimeout member variable.
311
312         (CoreIPC::Connection::waitForSyncReply):
313         Handle the timeout being one of our two special magic values.
314
315         * Platform/CoreIPC/Connection.h:
316         Add a DefaultTimeout constant and change the NoTimeout constant to be -1.
317
318 2011-04-19  Vsevolod Vlasov  <vsevik@chromium.org>
319
320         Reviewed by Pavel Feldman.
321
322         Web Inspector: Rename lengthReceived to encodedDataLength/dataLength
323         https://bugs.webkit.org/show_bug.cgi?id=58883
324
325         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
326         (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
327         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
328
329 2011-04-19  Andreas Kling  <andreas.kling@nokia.com>
330
331         Reviewed by Antonio Gomes.
332
333         WebKit2: Typo fix in WebPopupMenu::Type.
334         https://bugs.webkit.org/show_bug.cgi?id=58891
335
336         Fixed a typo, Seperator -> Separator.
337         Also removed m_ prefix on an argument variable name.
338
339         * Shared/WebPopupItem.h:
340         * UIProcess/mac/WebPopupMenuProxyMac.mm:
341         (WebKit::WebPopupMenuProxyMac::populate):
342         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
343         (WebKit::WebPopupMenu::populateItems):
344
345 2011-04-19  Jon Honeycutt  <jhoneycutt@apple.com>
346
347         WKContextDownloadURLRequest() should return a WKDownloadRef
348         https://bugs.webkit.org/show_bug.cgi?id=58867
349         Part of <rdar://problem/8931717>
350
351         Reviewed by Steve Falkenburg.
352
353         * UIProcess/API/C/WKContext.cpp:
354         (WKContextDownloadURLRequest):
355         Return the result of calling WebContext::download().
356
357         * UIProcess/API/C/WKContext.h:
358         Updated return type of WKContextDownloadURLRequest().
359
360         * UIProcess/WebContext.cpp:
361         (WebKit::WebContext::download):
362         Return the DownloadProxy returned by createDownloadProxy().
363         (WebKit::WebContext::createDownloadProxy):
364         Return the DownloadProxy.
365
366         * UIProcess/WebContext.h:
367         Changed return type of download() and createDownloadProxy().
368
369         * UIProcess/WebPageProxy.cpp:
370         (WebKit::WebPageProxy::receivedPolicyDecision):
371         Call the DownloadProxy's downloadID() function to get the ID.
372
373 2011-04-18  Jia Pu  <jpu@apple.com>
374
375         Reviewed by Mark Rowe.
376
377         WebKit needs to stop importing <AppKit/NSTextChecker.h>
378         https://bugs.webkit.org/show_bug.cgi?id=58798
379         <rdar://problem/9294938>
380
381         Use public header <AppKit/NSSpellChecker.h> instead.
382
383         * UIProcess/mac/CorrectionPanel.h:
384         * UIProcess/mac/CorrectionPanel.mm:
385         (correctionIndicatorType):
386         (WebKit::CorrectionPanel::show):
387         (WebKit::CorrectionPanel::dismissInternal):
388         (WebKit::CorrectionPanel::handleAcceptedReplacement):
389         * UIProcess/mac/TextCheckerMac.mm:
390         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
391
392 2011-04-05  Jer Noble  <jer.noble@apple.com>
393
394         Reviewed by Sam Weinig.
395
396         WebKit2: WKTR should support WebKit2 full screen APIs
397         https://bugs.webkit.org/show_bug.cgi?id=56318
398
399         Add a new WKBundlePage API for Full Screen events, and move some of the implementation
400         of WebFullScreenManager into the new InjectedBundlePageFullScreenClient class, so that
401         the default behavior can be overridden by a WKBundlePageFullScreenClient.
402
403         * WebKit2.xcodeproj/project.pbxproj:
404         * WebProcess/FullScreen/WebFullScreenManager.cpp:
405         (WebKit::WebFullScreenManager::supportsFullScreen): Moved contents into InjectedBundlePageFullScreenClient.
406         (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
407         (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
408         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
409         (WKBundlePageSetFullScreenClient): Added.
410         (WKBundlePageWillEnterFullScreenForElement): Added.
411         (WKBundlePageDidEnterFullScreenForElement): Added.
412         (WKBundlePageWillExitFullScreenForElement): Added.
413         (WKBundlePageDidExitFullScreenForElement): Added.
414         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
415         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: Added.
416         (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen): Added. 
417         (WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement): Added.
418         (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Added.
419         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: Added.
420         * WebProcess/WebPage/WebPage.cpp:
421         (WebKit::WebPage::initializeInjectedBundleFullScreenClient): Added.
422         * WebProcess/WebPage/WebPage.h:
423         (WebKit::WebPage::injectedBundleFullScreenClient): Added.
424
425 2011-04-18  Alexey Proskuryakov  <ap@apple.com>
426
427         Reviewed by Maciej Stachowiak.
428
429         Re-add a null check lost in r83081
430         https://bugs.webkit.org/show_bug.cgi?id=58846
431
432         * WebProcess/WebPage/mac/WebPageMac.mm:
433         (WebKit::WebPage::getSelectedRange):
434
435 2011-04-18  Andreas Kling  <kling@webkit.org>
436
437         Reviewed by Kenneth Rohde Christiansen.
438
439         [Qt][WK2] Clean up tool-tip/status-bar confusion.
440         https://bugs.webkit.org/show_bug.cgi?id=58844
441
442         Tool-tips were incorrectly hooked up to the status bar text.
443         Chrome::setStatusbarText() now correctly causes the QWKPage::statusBarMessage() signal.
444
445         New API:
446         - QWKPage::toolTipChanged(const QString& toolTip) [signal]
447
448         QGraphicsWKView will automatically listen for this and set its own toolTip().
449
450         * UIProcess/API/qt/ClientImpl.cpp:
451         (qt_wk_setStatusText):
452         * UIProcess/API/qt/ClientImpl.h:
453         * UIProcess/API/qt/qgraphicswkview.cpp:
454         (QGraphicsWKView::QGraphicsWKView):
455         (QGraphicsWKViewPrivate::onToolTipChanged):
456         * UIProcess/API/qt/qgraphicswkview.h:
457         * UIProcess/API/qt/qwkpage.cpp:
458         (QWKPagePrivate::toolTipChanged):
459         (QWKPage::QWKPage):
460         * UIProcess/API/qt/qwkpage.h:
461
462 2011-04-18  Maciej Stachowiak  <mjs@apple.com>
463
464         Reviewed by Dan Bernstein.
465
466         sandbox violation for ~/Library/Dictionaries
467         https://bugs.webkit.org/show_bug.cgi?id=58841
468         <rdar://problem/9294770>
469
470         * WebProcess/com.apple.WebProcess.sb: Add to sandbox profile.
471         No obvious harm from allowing this, though it's not 100% clear
472         why it's needed.
473
474 2011-04-18  Anders Carlsson  <andersca@apple.com>
475
476         Try to fix the Windows build.
477
478         * Scripts/webkit2/messages.py:
479
480 2011-04-18  Anders Carlsson  <andersca@apple.com>
481
482         Reviewed by Dan Bernstein.
483
484         Get rid of WebProcessProxyLegacyMessage
485         https://bugs.webkit.org/show_bug.cgi?id=58825
486
487         * GNUmakefile.am:
488         * Platform/CoreIPC/MessageID.h:
489         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h: Removed.
490         * UIProcess/WebProcessProxy.cpp:
491         * WebKit2.xcodeproj/project.pbxproj:
492         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
493         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
494         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
495         * WebProcess/WebPage/WebPage.cpp:
496         * win/WebKit2.vcproj:
497
498 2011-04-18  Anders Carlsson  <andersca@apple.com>
499
500         Fix build.
501
502         * UIProcess/Plugins/PluginInfoStore.h:
503
504 2011-04-18  Anders Carlsson  <andersca@apple.com>
505
506         Reviewed by Sam Weinig.
507
508         Use the message generator for the GetPluginProcessConnection message
509         https://bugs.webkit.org/show_bug.cgi?id=58815
510
511         * Platform/CoreIPC/HandleMessage.h:
512         (CoreIPC::callMemberFunction):
513         (CoreIPC::handleMessageDelayed):
514         Add helper functions.
515
516         * UIProcess/Plugins/PluginInfoStore.h:
517         Mark class noncopyable.
518
519         * UIProcess/Plugins/PluginProcessManager.cpp:
520         (WebKit::PluginProcessManager::getPluginProcessConnection):
521         This now takes a delayed reply.
522
523         * UIProcess/Plugins/PluginProcessProxy.cpp:
524         (WebKit::PluginProcessProxy::getPluginProcessConnection):
525         This now takes a delayed reply.
526
527         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
528         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
529         Call DelayedReply::send.
530
531         * UIProcess/WebProcessProxy.cpp:
532         (WebKit::WebProcessProxy::getPluginProcessConnection):
533         This now takes a delayed reply.
534         
535         (WebKit::WebProcessProxy::didReceiveSyncMessage):
536         No need to handle this message here.
537
538         * UIProcess/WebProcessProxy.messages.in:
539         Add GetPluginProcessConnection message.
540
541         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
542         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
543         Don't use deprecatedSendSync.
544
545 2011-04-18  Anders Carlsson  <andersca@apple.com>
546
547         Reviewed by Adam Roben.
548
549         Finish implementing delayed sync replies in the CoreIPC message generator
550         https://bugs.webkit.org/show_bug.cgi?id=58814
551
552         Put the DelayedReply function definitions in the .cpp file and fix bugs found by
553         actually trying to compile the generated files.
554
555         * Scripts/webkit2/messages.py:
556         * Scripts/webkit2/messages_unittest.py:
557
558 2011-04-18  Anders Carlsson  <andersca@apple.com>
559
560         Reviewed by Adam Roben.
561
562         Reproducible crash in Find on Page, on pages that use accelerated compositing
563         https://bugs.webkit.org/show_bug.cgi?id=58793
564         <rdar://problem/9295870>
565
566         Move the call to PageOverlay::setNeedsDisplay() back to WebPage::installPageOverlay;
567         it needs to be called after we've told the drawing area that a page overlay has been installed.
568
569         * WebProcess/WebPage/PageOverlay.cpp:
570         (WebKit::PageOverlay::setPage):
571         * WebProcess/WebPage/WebPage.cpp:
572         (WebKit::WebPage::installPageOverlay):
573
574 2011-04-18  Jeff Miller  <jeffm@apple.com>
575
576         Reviewed by Timothy Hatcher.
577
578         WKFrameLoadState should be a uint32_t to match our API conventions
579         https://bugs.webkit.org/show_bug.cgi?id=58785
580
581         * UIProcess/API/C/WKFrame.h: typedef WKFrameLoadState as a uint32_t and define its values as an anonymous enum.
582
583 2011-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
584
585         Unreviewed. Fix WebKit2 GTK build after 84017.
586
587         * GNUmakefile.am:
588         * Shared/NativeWebMouseEvent.h:
589         (WebKit::NativeWebMouseEvent::nativeEvent):
590         * Shared/gtk/NativeWebMouseEventGtk.cpp: Copied from Source/WebKit2/Shared/NativeWebMouseEvent.h.
591         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
592         * UIProcess/gtk/WebView.cpp:
593         (WebKit::WebView::handleMouseEvent):
594
595 2011-04-17  David Kilzer  <ddkilzer@apple.com>
596
597         <http://webkit.org/b/58463> Switch HTTP pipelining from user default to private setting
598         <rdar://problem/9268729>
599
600         Reviewed by Dan Bernstein.
601
602         This replaces support for the WebKitEnableHTTPPipelining user
603         default with methods on the WebCore::ResourceRequest class in
604         WebCore, the WebView class in WebKit1, and the WebContext class
605         in WebKit2.  It also removes support for the
606         WebKitForceHTTPPipeliningPriorityHigh user default which was not
607         needed.
608
609         * UIProcess/API/C/WKContext.cpp:
610         (_WKContextSetHTTPPipeliningEnabled): Added.
611         * UIProcess/API/C/WKContextPrivate.h:
612         (_WKContextSetHTTPPipeliningEnabled): Added declaration.
613         * UIProcess/WebContext.cpp:
614         (WebKit::WebContext::setHTTPPipeliningEnabled): Added.
615         (WebKit::WebContext::httpPipeliningEnabled): Added.
616         * UIProcess/WebContext.h:
617         (WebKit::WebContext::setHTTPPipeliningEnabled): Added declaration.
618         (WebKit::WebContext::httpPipeliningEnabled): Added declaration.
619
620 2011-04-17  Sam Weinig  <sam@webkit.org>
621
622         Reviewed by Geoffrey Garen.
623
624         Make more strings in WebKit2 localizable
625         https://bugs.webkit.org/show_bug.cgi?id=58757
626
627         * UIProcess/API/mac/PDFViewController.mm:
628         (-[WKPDFView menuForEvent:]):
629         * UIProcess/API/mac/PageClientImpl.mm:
630         (WebKit::PageClientImpl::setViewportArguments):
631         (WebKit::PageClientImpl::registerEditCommand):
632         * UIProcess/WebEditCommandProxy.cpp:
633         (WebKit::WebEditCommandProxy::nameForEditAction):
634         * UIProcess/WebEditCommandProxy.h:
635         Use WebCore's localization macro to make more strings localizable.
636
637 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
638
639         Reviewed by Adam Barth.
640
641         Rename PLATFORM(CA) to USE(CA)
642         https://bugs.webkit.org/show_bug.cgi?id=58742
643
644         * WebProcess/WebPage/LayerTreeHost.cpp:
645         * WebProcess/WebPage/win/LayerTreeHostWin.cpp:
646         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
647
648 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
649
650         Reviewed by Adam Barth.
651
652         Rename PLATFORM(CG) to USE(CG)
653         https://bugs.webkit.org/show_bug.cgi?id=58729
654
655         * Shared/ShareableBitmap.h:
656         * Shared/WebCoreArgumentCoders.cpp:
657         * Shared/WebCoreArgumentCoders.h:
658         * Shared/WebGraphicsContext.cpp:
659         (WebKit::WebGraphicsContext::WebGraphicsContext):
660         * Shared/WebGraphicsContext.h:
661         * Shared/win/PlatformCertificateInfo.cpp:
662         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
663         * UIProcess/win/WebView.cpp:
664         (WebKit::WebView::setFindIndicator):
665         * WebProcess/WebPage/WebPage.cpp:
666         (WebKit::WebPage::drawRectToPDF):
667         (WebKit::WebPage::drawPagesToPDF):
668         * WebProcess/WebPage/win/WebPageWin.cpp:
669         (WebKit::WebPage::platformPreferencesDidChange):
670         * config.h:
671
672 2011-04-16  Anders Carlsson  <andersca@apple.com>
673
674         Reviewed by Sam Weinig.
675
676         Crash when NPP_Write returns -1 when writing the manual stream
677         https://bugs.webkit.org/show_bug.cgi?id=58735
678         <rdar://problem/9124993>
679
680         If NPP_Write returns -1 we must cancel the stream.
681
682         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
683         (WebKit::NetscapePluginStream::deliverDataToPlugin):
684
685 2011-04-16  Sam Weinig  <sam@webkit.org>
686
687         Reviewed by Simon Fraser.
688
689         Pages in the PageCache don't have the correct visited link coloring after being restored
690         https://bugs.webkit.org/show_bug.cgi?id=58721
691
692         * WebProcess/WebProcess.cpp:
693         (WebKit::WebProcess::visitedLinkStateChanged):
694         (WebKit::WebProcess::allVisitedLinkStateChanged):
695         Mark all pages in the page cache as needing visited link style recalc
696         whenever visited link information changes.
697
698 2011-04-15  Daniel Bates  <dbates@webkit.org>
699
700         Attempt to fix the Qt Linux Release build after changeset 84064 <http://trac.webkit.org/changeset/84064>
701         (https://bugs.webkit.org/show_bug.cgi?id=58686).
702
703         * UIProcess/API/qt/qwkpage_p.h: Remove takeFocus().
704
705 2011-04-15  Shishir Agrawal  <shishir@chromium.org>
706
707         Reviewed by James Robinson.
708
709         Add a flag to guard Page Visibility API changes.
710         https://bugs.webkit.org/show_bug.cgi?id=58464
711
712         * Configurations/FeatureDefines.xcconfig:
713
714 2011-04-15  Jeff Miller  <jeffm@apple.com>
715
716         Reviewed by Sam Weinig.
717
718         Add takeFocus callback to WKPageUIClient
719         https://bugs.webkit.org/show_bug.cgi?id=58686
720
721         On Windows, we need to handle moving focus out of the web view in the client, so add a takeFocus callback to WKPageUIClient
722         and stop handling taking focus in the framework in WKView.mm on the Mac.
723
724         * UIProcess/API/C/WKPage.h: Added WKFocusDirection enum and takeFocus to WKPageUIClient.
725         * UIProcess/API/mac/PageClientImpl.h: Removed takeFocus().
726         * UIProcess/API/mac/PageClientImpl.mm: Removed takeFocus().
727         * UIProcess/API/mac/WKView.mm: Removed _takeFocus().
728         * UIProcess/API/mac/WKViewInternal.h: Removed _takeFocus().
729         * UIProcess/API/qt/ClientImpl.cpp:
730         (qt_wk_takeFocus): Added.
731         * UIProcess/API/qt/ClientImpl.h: Added qt_wk_takeFocus.
732         * UIProcess/API/qt/qwkpage.cpp: Remove takeFocus().
733         (QWKPage::QWKPage): Added takeFocus() callback.
734         * UIProcess/PageClient.h: Removed takeFocus().
735         * UIProcess/WebPageProxy.cpp:
736         (WebKit::WebPageProxy::takeFocus): Call m_uiClient to take focus.
737         * UIProcess/WebPageProxy.h: Pass FocusDirection as a uint32_t to takeFocus().
738         * UIProcess/WebPageProxy.messages.in: Pass FocusDirection as a uint32_t in TakeFocus message.
739         * UIProcess/WebUIClient.cpp:
740         (WebKit::WebUIClient::takeFocus): Added.
741         * UIProcess/WebUIClient.h: Added takeFocus().
742         * UIProcess/win/WebView.cpp: Removed takeFocus(), which was never implemented on Windows.
743         * UIProcess/win/WebView.h: Removed takeFocus().
744         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
745         (WebKit::WebChromeClient::takeFocus): Pass FocusDirection as a uint32_t in TakeFocus message.
746
747 2011-04-15  Alexey Proskuryakov  <ap@apple.com>
748
749         Reviewed by Sam Weinig.
750
751         WebKit2: Stop using deprecated NSInputManager
752         https://bugs.webkit.org/show_bug.cgi?id=58709
753
754         Changed all mouse related functions to give NSInputContext a chance to handle the event,
755         added logging. Removed -rightMouseMoved: method, which was added by accident.
756
757         * UIProcess/API/mac/WKView.mm:
758         (-[WKView mouseMoved:]):
759         (-[WKView mouseDown:]):
760         (-[WKView mouseUp:]):
761         (-[WKView mouseDragged:]):
762
763 2011-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
764
765         Potential crash getting a JS wrapper.
766
767         <rdar://problem/8988741>
768
769         Reviewed by Brian Weinstein.
770
771         * WebProcess/WebPage/WebFrame.cpp:
772         (WebKit::WebFrame::jsWrapperForWorld):
773         Ensure that we have a valid m_coreFrame, because it can be cleared by
774         invalidate().
775
776 2011-04-08  Luiz Agostini  <luiz.agostini@openbossa.org>
777
778         Reviewed by Kenneth Rohde Christiansen.
779
780         [Qt] QWebPage MIME type handling inconsistency with other web browsers
781         https://bugs.webkit.org/show_bug.cgi?id=46968
782
783         Implementing mime type sniffing based on
784         http://tools.ietf.org/html/draft-abarth-mime-sniff-06.
785
786         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
787         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
788         (WebCore::WebFrameNetworkingContext::MIMESniffingEnabled):
789         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
790
791 2011-04-15  Oliver Hunt  <oliver@apple.com>
792
793         GC allocate Structure
794         https://bugs.webkit.org/show_bug.cgi?id=58483
795
796         Rolling r83894 r83827 r83810 r83809 r83808 back in with
797         a workaround for the gcc bug seen by the gtk bots
798
799         * WebProcess/Plugins/Netscape/JSNPMethod.h:
800         (WebKit::JSNPMethod::createStructure):
801         * WebProcess/Plugins/Netscape/JSNPObject.h:
802         (WebKit::JSNPObject::createStructure):
803
804 2011-04-15  Anders Carlsson  <andersca@apple.com>
805
806         Reviewed by Sam Weinig.
807
808         Add API to get the bundle page overlay fade in fraction.
809
810         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
811         (WKBundlePageOverlayFractionFadedIn):
812         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
813
814 2011-04-15  Anders Carlsson  <andersca@apple.com>
815
816         Reviewed by Dan Bernstein.
817
818         Fade the find page overlay
819         https://bugs.webkit.org/show_bug.cgi?id=58697
820
821         * WebProcess/WebPage/FindController.cpp:
822         Make the color components floats.
823
824         (WebKit::overlayBackgroundColor):
825         (WebKit::holeShadowColor):
826         (WebKit::holeFillColor):
827         Add helper functions for returning the colors given the fraction faded in.
828
829         (WebKit::FindController::drawRect):
830         Use the new helper functions.
831
832         * WebProcess/WebPage/WebPage.cpp:
833         (WebKit::WebPage::installPageOverlay):
834         Start the fade animation unless we're replacing an already existing page overlay
835         with another.
836
837 2011-04-15  Anders Carlsson  <andersca@apple.com>
838
839         Fix Windows build.
840
841         * WebProcess/WebPage/PageOverlay.cpp:
842         (WebKit::PageOverlay::fadeAnimationTimerFired):
843
844 2011-04-15  Anders Carlsson  <andersca@apple.com>
845
846         Reviewed by Sam Weinig.
847
848         Add the ability for PageOverlays to fade in and out
849         https://bugs.webkit.org/show_bug.cgi?id=58694
850
851         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
852         (WKBundlePageUninstallPageOverlay):
853         WebPage::uninstallPageOverlay now takes a boolean. Default to false for now.
854
855         * WebProcess/WebPage/FindController.cpp:
856         (WebKit::FindController::findString):
857         Pass false to uninstallPageOverlay.
858
859         (WebKit::FindController::hideFindUI):
860         Pass true to uninstallPageOverlay.
861         
862         * WebProcess/WebPage/PageOverlay.cpp:
863         (WebKit::PageOverlay::PageOverlay):
864         Initialize new member variables.
865
866         (WebKit::PageOverlay::bounds):
867         Get rid of an unnecessary webPage() getter.
868
869         (WebKit::PageOverlay::setPage):
870         Stop the animation timer.
871
872         (WebKit::PageOverlay::startFadeInAnimation):
873         Update m_fractionFadedIn and call startFadeAnimation.
874
875         (WebKit::PageOverlay::startFadeOutAnimation):
876         Ditto.
877         
878         (WebKit::PageOverlay::startFadeAnimation):
879         Initialize m_fadeAnimationStartTime and start the fade animation timer.
880
881         (WebKit::PageOverlay::fadeAnimationTimerFired):
882         Update m_fractionFadedIn and call setNeedsDisplay().
883
884         * WebProcess/WebPage/PageOverlay.h:
885         * WebProcess/WebPage/WebPage.cpp:
886         (WebKit::WebPage::uninstallPageOverlay):
887         If fadeOut is true, tell the page overlay to start the fade out animation.
888         When the fade animation is complete, the page overlay will uninstall itself.
889
890 2011-04-15  Brian Weinstein  <bweinstein@apple.com>
891
892         Reviewed by Adam Roben.
893
894         Views should be made visible before painting in WM_PRINTCLIENT messages
895         https://bugs.webkit.org/show_bug.cgi?id=58676
896         <rdar://problem/9279211>
897
898         * UIProcess/win/WebView.cpp:
899         (WebKit::WebView::onPrintClientEvent): If our view isn't currently visible set it to visible
900             before painting, then reset it back to not visible after painting.
901         (WebKit::WebView::onShowWindowEvent): Call setIsVisible instead of duplicating logic.
902         (WebKit::WebView::setIsVisible): Set the m_isVisible flag and call viewStateDidChange.
903         * UIProcess/win/WebView.h:
904
905 2011-04-15  Jon Lee  <jonlee@apple.com>
906
907         Reviewed by Anders Carlsson.
908
909         onClick does not function with <select> elements in WebKit2
910         https://bugs.webkit.org/show_bug.cgi?id=57904
911         <rdar://problem/9217757>
912
913         Reviewed by Anders Carlsson.
914
915         * Shared/NativeWebMouseEvent.h: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
916         (WebKit::NativeWebMouseEvent::nativeEvent):
917         * Shared/mac/NativeWebMouseEventMac.mm: Added.
918         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
919         * Shared/qt/NativeWebMouseEventQt.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
920         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
921         * Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
922         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
923         * UIProcess/API/mac/WKView.mm:
924         (-[WKView mouseMoved:]):
925         (-[WKView _mouseHandler:]): Pre-compiler mouse handler calls need to use the new NativeWebMouseEvent class
926         * UIProcess/API/qt/qwkpage.cpp:
927         (QWKPagePrivate::mouseMoveEvent):
928         (QWKPagePrivate::mousePressEvent):
929         (QWKPagePrivate::mouseReleaseEvent):
930         (QWKPagePrivate::mouseDoubleClickEvent):
931         * UIProcess/WebPageProxy.cpp:
932         (WebKit::WebPageProxy::handleMouseEvent): keep track of mouse down event in order to be able to send a fake mouse up event on the select element
933         (WebKit::WebPageProxy::currentMouseDownEvent): for access by the popup menu proxy to dispatch the fake mouse up event
934         (WebKit::WebPageProxy::didReceiveEvent): clear out the cached mouse down event
935         (WebKit::WebPageProxy::processDidCrash): clear out the cached events since we assume that didReceiveEvent did not called prior to the crash
936         * UIProcess/WebPageProxy.h:
937         * UIProcess/WebPopupMenuProxy.h:
938         * UIProcess/mac/WebPopupMenuProxyMac.mm:
939         (WebKit::WebPopupMenuProxyMac::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
940         * UIProcess/win/WebPopupMenuProxyWin.cpp:
941         (WebKit::WebPopupMenuProxyWin::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
942         * UIProcess/win/WebView.cpp:
943         (WebKit::WebView::onMouseEvent):
944         * WebKit2.pro:
945         * WebKit2.xcodeproj/project.pbxproj:
946         * win/WebKit2.vcproj:
947
948 2011-04-15  Alexey Proskuryakov  <ap@apple.com>
949
950         Qt build fix.
951
952         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::selectionStateChanged): Wrap the variable
953         in PLATFORM(MAC), too, as it's unused on other platforms.
954
955 2011-04-15  Brady Eidson  <beidson@apple.com>
956
957         Reviewed by Dan Bernstein.
958
959         <rdar://problem/9287880> and https://bugs.webkit.org/show_bug.cgi?id=58596
960         WK2: Past searches not remembered for <input type=search results="5" autosave="foo">
961
962         Add SaveRecentSearches and LoadRecentSearches messages:
963         * UIProcess/WebPageProxy.messages.in:
964         * UIProcess/WebPageProxy.h:
965
966         Message up to the UIProcess for the save/load operations:
967         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
968         (WebKit::WebSearchPopupMenu::saveRecentSearches):
969         (WebKit::WebSearchPopupMenu::loadRecentSearches):
970         * WebProcess/WebCoreSupport/WebPopupMenu.h:
971         (WebKit::WebPopupMenu::page):
972
973         Save the values to disk CFPreference-style:
974         * UIProcess/cf/WebPageProxyCF.cpp:
975         (WebKit::autosaveKey):
976         (WebKit::WebPageProxy::saveRecentSearches):
977         (WebKit::WebPageProxy::loadRecentSearches):
978
979         Stubbed out for non-CF platforms:
980         * UIProcess/gtk/WebPageProxyGtk.cpp:
981         (WebKit::WebPageProxy::saveRecentSearches):
982         (WebKit::WebPageProxy::loadRecentSearches):
983         * UIProcess/qt/WebPageProxyQt.cpp:
984         (WebKit::WebPageProxy::saveRecentSearches):
985         (WebKit::WebPageProxy::loadRecentSearches):
986
987 2011-04-14  Alexey Proskuryakov  <ap@apple.com>
988
989         Reviewed by Dan Bernstein.
990
991         WebKit2: Password field input does not switch to ASCII-compatible source
992         https://bugs.webkit.org/show_bug.cgi?id=58583
993         <rdar://problem/9059651>
994
995         The implementation is more modern than what we have in WK1. Instead of returning a null
996         input context (as in non-editable content), we now set page context's properties.
997
998         * UIProcess/PageClient.h:
999         * UIProcess/API/mac/PageClientImpl.h:
1000         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::updateSecureInputState):
1001         Forward updateSecureInputState() call from WebPageProxy to WKView.
1002
1003         * UIProcess/API/mac/WKView.mm:
1004         (-[WKView dealloc]): ASSERT that we didn't somehow leave secure input events enabled.
1005         (-[WKView becomeFirstResponder]): Update secure event mode.
1006         (-[WKView resignFirstResponder]): Disable secure event mode.
1007         (-[WKView setMarkedText:selectedRange:replacementRange:]): Prevent most advanced editing
1008         behaviors in password fields, matching NSSecureTextInputField.
1009         (-[WKView attributedSubstringForProposedRange:actualRange:]): Disable TSM Document Access
1010         in password fields. There is also a check in web process, but it doest't hurt to check twice.
1011         (-[WKView _windowDidBecomeKey:]): Call _updateSecureInputState.
1012         (-[WKView _windowDidResignKey:]): Call _updateSecureInputState.
1013         (-[WKView _updateSecureInputState]): Update secure event mode and allowed input sources.
1014
1015         * UIProcess/API/mac/WKViewInternal.h: Added _updateSecureInputState.
1016
1017         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::selectionStateChanged): Update secure
1018         input state when going in or out a password field.
1019
1020 2011-04-14  Jer Noble  <jer.noble@apple.com>
1021
1022         Reviewed by Eric Carlson.
1023
1024         REGRESSION: Rendering in <video> element appears to render quickly to catch up if it has been playing in a background tab
1025         https://bugs.webkit.org/show_bug.cgi?id=58637
1026
1027         Notify AVFoundation that no one will be rendering when the view or window moves off screen.
1028
1029         * UIProcess/API/mac/PageClientImpl.mm:
1030         (WebKit::PageClientImpl::isViewVisible): Return false if the view's window is not visible.
1031         * UIProcess/API/mac/WKView.mm:
1032         (-[WKView addWindowObserversForWindow:]): Observe orderOut and orderIn events.
1033         (-[WKView removeWindowObservers]): Ditto.
1034         (-[WKView _windowDidOrderOffScreen:]): Added.
1035         (-[WKView _windowDidOrderOnScreen:]): Added.
1036         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1037         (WebKit::DrawingAreaImpl::suspendPainting): Call LayerTreeHost::pauseRendering.
1038         (WebKit::DrawingAreaImpl::resumePainting): Call LayerTreeHost::resumeRendering.
1039         * WebProcess/WebPage/LayerTreeHost.h:
1040         (WebKit::LayerTreeHost::pauseRendering): Added stub.
1041         (WebKit::LayerTreeHost::resumeRendering): Added stub.
1042         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
1043         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
1044         (WebKit::LayerTreeHostCAMac::pauseRendering): Added. Post a notification with our
1045             intention to stop rendering.
1046         (WebKit::LayerTreeHostCAMac::resumeRendering): Added. Post a notification with our
1047             intention to start rendering.
1048
1049 2011-04-15  Jessie Berlin  <jberlin@apple.com>
1050
1051         Reviewed by Sam Weinig.
1052
1053         WebKit2: Need a way to keep the WebProcess alive for testing purposes.
1054         https://bugs.webkit.org/show_bug.cgi?id=58592
1055
1056         * UIProcess/API/C/WKContext.cpp:
1057         (WKContextDisableProcessTermination):
1058         (WKContextEnableProcessTermination):
1059         * UIProcess/API/C/WKContextPrivate.h:
1060
1061         * UIProcess/WebContext.cpp:
1062         (WebKit::WebContext::WebContext):
1063         Initialize m_processTerminationEnabled to true.
1064         (WebKit::WebContext::enableProcessTermination):
1065         Set m_processTerminationEnabled to true, and try to terminate the web process.
1066         (WebKit::WebContext::shouldTerminate):
1067         If !m_processTerminationEnabled, return false.
1068         * UIProcess/WebContext.h:
1069         (WebKit::WebContext::disableProcessTermination):
1070         Set m_processTerminationEnabled to false;
1071
1072 2011-04-15  Nancy Piedra  <nancy.piedra@nokia.com>
1073
1074         Reviewed by Laszlo Gombos.
1075
1076         [Qt][Symbian] Need to export ViewportAttributes class
1077         https://bugs.webkit.org/show_bug.cgi?id=58651
1078
1079         On Symbian, if the ViewportAttributes class is not exported we get
1080         linking errors.
1081
1082         Since this is a compilation issue, no new tests added.
1083
1084         * UIProcess/API/qt/qwkpage.h:
1085
1086 2011-04-15  Anna Cavender  <annacc@chromium.org>
1087
1088         Reviewed by Eric Carlson.
1089
1090         Renaming TRACK feature define to VIDEO_TRACK
1091         https://bugs.webkit.org/show_bug.cgi?id=53556
1092
1093         * Configurations/FeatureDefines.xcconfig:
1094
1095 2011-04-14  Anders Carlsson  <andersca@apple.com>
1096
1097         Reviewed by Sam Weinig.
1098
1099         Select All context menu item doesn't work in Flash
1100         https://bugs.webkit.org/show_bug.cgi?id=58615
1101         <rdar://problem/9225761>
1102
1103         In some cases, -[NSWindow isKeyWindow] will return false even if
1104         a window is the key window, so we have to compare our window
1105         against -[NSApplication keyWindow].
1106
1107         * UIProcess/API/mac/PageClientImpl.mm:
1108         (WebKit::PageClientImpl::isViewWindowActive):
1109
1110 2011-04-14  Sam Weinig  <sam@webkit.org>
1111
1112         Reviewed by Anders Carlsson.
1113
1114         Add CFPreference based backend for WebKit2 preferences
1115         https://bugs.webkit.org/show_bug.cgi?id=58605
1116
1117         * UIProcess/cf/WebPreferencesCF.cpp:
1118         (WebKit::cfStringFromWebCoreString):
1119         (WebKit::makeKey):
1120         (WebKit::setStringValueIfInUserDefaults):
1121         (WebKit::setBoolValueIfInUserDefaults):
1122         (WebKit::setUInt32ValueIfInUserDefaults):
1123         (WebKit::setDoubleValueIfInUserDefaults):
1124         (WebKit::WebPreferences::platformInitializeStore):
1125         (WebKit::WebPreferences::platformUpdateStringValueForKey):
1126         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1127         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1128         (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
1129         Implement platform functions using CFPreferences API.
1130
1131 2011-04-14  Brady Eidson  <beidson@apple.com>
1132
1133         Reviewed by Sam Weinig.
1134
1135         <rdar://problem/8665102> and https://bugs.webkit.org/show_bug.cgi?id=58595
1136         Menu is not displayed for <input type=search results="5">
1137
1138         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1139         (WebKit::WebSearchPopupMenu::enabled): Return true, like all good search popup menus should.
1140
1141         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1142         (WebKit::WebPopupMenu::setUpPlatformData): Remember the shouldPopOver-ness.
1143
1144         * Shared/PlatformPopupMenuData.cpp:
1145         (WebKit::PlatformPopupMenuData::encode): Remember the shouldPopOver-ness.
1146         (WebKit::PlatformPopupMenuData::decode): Remember the shouldPopOver-ness.
1147         * Shared/PlatformPopupMenuData.h:
1148
1149         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1150         (WebKit::WebPopupMenuProxyMac::showPopupMenu): Use the shouldPopOver-ness to adjust display position.
1151
1152 2011-04-14  Anders Carlsson  <andersca@apple.com>
1153
1154         Reviewed by Dan Bernstein.
1155
1156         Crash in NetscapePluginModule::tryGetSitesWithData when NPP_GetSitesWithData returns null
1157         https://bugs.webkit.org/show_bug.cgi?id=58578
1158         <rdar://problem/9275201>
1159
1160         It's OK for NPP_GetSitesWithData to return null.
1161
1162         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1163         (WebKit::NetscapePluginModule::tryGetSitesWithData):
1164
1165 2011-04-14  Sam Weinig  <sam@webkit.org>
1166
1167         Reviewed by Anders Carlsson.
1168
1169         Make creating WebPreferences lazy
1170         https://bugs.webkit.org/show_bug.cgi?id=58570
1171
1172         * UIProcess/WebPageGroup.cpp:
1173         (WebKit::WebPageGroup::WebPageGroup):
1174         (WebKit::WebPageGroup::~WebPageGroup):
1175         (WebKit::WebPageGroup::setPreferences):
1176         (WebKit::WebPageGroup::preferences):
1177         * UIProcess/WebPageGroup.h:
1178         Don't create the WebPreference object until it is requested.
1179
1180 2011-04-14  Pratik Solanki  <psolanki@apple.com>
1181
1182         Reviewed by David Kilzer.
1183
1184         Set minimum priority for fast lane connections
1185         https://bugs.webkit.org/show_bug.cgi?id=58353
1186
1187         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1188         (InitWebCoreSystemInterface): Support for new WKSI method WKSetHTTPPipeliningMinimumFastLanePriority.
1189
1190 2011-04-14  Anders Carlsson  <andersca@apple.com>
1191
1192         Clang warning fixes.
1193
1194         * UIProcess/API/mac/PageClientImpl.h:
1195         * UIProcess/mac/TextCheckerMac.mm:
1196         * WebProcess/Downloads/mac/DownloadMac.mm:
1197
1198 2011-04-14  Jessie Berlin  <jberlin@apple.com>
1199
1200         Reviewed by Timothy Hatcher.
1201
1202         WebKit2: Add an option for a PageGroup to be invisible to the History Client.
1203         https://bugs.webkit.org/show_bug.cgi?id=58547
1204
1205         * Shared/WebPageGroupData.cpp:
1206         (WebKit::WebPageGroupData::encode):
1207         (WebKit::WebPageGroupData::decode):
1208         * Shared/WebPageGroupData.h:
1209
1210         * UIProcess/WebInspectorProxy.cpp:
1211         (WebKit::WebInspectorProxy::inspectorPageGroup):
1212         The Web Inspector should not be visible to the History Client, because its HTML-based nature
1213         should not be exposed through the API.
1214
1215         * UIProcess/WebPageGroup.cpp:
1216         (WebKit::WebPageGroup::create):
1217         (WebKit::WebPageGroup::WebPageGroup):
1218         * UIProcess/WebPageGroup.h:
1219
1220         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1221         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1222         Do not send the message to the WebContent for the history client.
1223         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1224         Ditto.
1225         (WebKit::WebFrameLoaderClient::setTitle):
1226         Ditto.
1227
1228         * WebProcess/WebPage/WebPageGroupProxy.h:
1229         (WebKit::WebPageGroupProxy::isVisibleToHistoryClient):
1230
1231 2011-04-14  Balazs Kelemen  <kbalazs@webkit.org>
1232
1233         Reviewed by Andreas Kling.
1234
1235         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1
1236         https://bugs.webkit.org/show_bug.cgi?id=55719
1237
1238         Guard functionality related to complex text and implementations
1239         that rely on MachPort with PLATFORM(MAC).
1240         Based on Oleg Romashin's patch.
1241
1242         * PluginProcess/PluginControllerProxy.cpp:
1243         * PluginProcess/PluginControllerProxy.messages.in:
1244         * PluginProcess/PluginProcess.cpp:
1245         (WebKit::PluginProcess::createWebProcessConnection):
1246         * PluginProcess/WebProcessConnection.cpp:
1247         (WebKit::WebProcessConnection::createPlugin):
1248         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1249         (WebKit::PluginProcessCreationParameters::decode): Fix bad C++ that
1250         does not compile with gcc-linux.
1251         * UIProcess/Plugins/PluginProcessProxy.cpp:
1252         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1253         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
1254         * UIProcess/Plugins/PluginProcessProxy.h:
1255         * UIProcess/Plugins/PluginProcessProxy.messages.in:
1256         * WebKit2.pro: Move implementation that does not need external
1257         visibility from WebKit2API.pri. Adding the headers as well.
1258         * WebKit2API.pri:
1259         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1260         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1261         * WebProcess/WebPage/WebPage.cpp:
1262
1263 2011-04-13  James Robinson  <jamesr@chromium.org>
1264
1265         Reviewed by Simon Fraser.
1266
1267         Allow setting composited backing stores for scrollbars and scroll corners
1268         https://bugs.webkit.org/show_bug.cgi?id=57202
1269
1270         Update WebPopupMenuProxyWin to reflect ScrollableArea interface changes.
1271
1272         * UIProcess/win/WebPopupMenuProxyWin.h:
1273         (WebKit::WebPopupMenuProxyWin::invalidateScrollCornerRect):
1274         (WebKit::WebPopupMenuProxyWin::scrollCornerPresent):
1275         (WebKit::WebPopupMenuProxyWin::scrollCornerRect):
1276
1277 2011-04-13  Jon Lee  <jonlee@apple.com>
1278
1279         Reviewed by Maciej Stachowiak.
1280
1281         REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
1282         https://bugs.webkit.org/show_bug.cgi?id=58284
1283         <rdar://problem/9246149>
1284
1285         * WebProcess/WebPage/WebPage.cpp:
1286         (WebKit::WebPage::setFocused): Check for whether we are not supposed to be focused AND whether our platform behavior dictates to clear out the selection
1287
1288 2011-04-13  Dan Bernstein  <mitz@apple.com>
1289
1290         Reviewed by Sam Weinig.
1291
1292         Fixed a bug where WKView changed the cursor when the mouse was moving over other views.
1293
1294         * UIProcess/API/mac/WKView.mm:
1295         (-[WKView mouseMoved:]): If getting this message because this view is the first responder,
1296         ignore it unless it is inside the visible rect.
1297
1298 2011-04-13  Enrica Casucci  <enrica@apple.com>
1299
1300         Reviewed by Dan Bernstein.
1301
1302         Should not rely on WKEditableLinkBehavior being in synch
1303         with WebCore::EditableLinkBehavior.
1304         https://bugs.webkit.org/show_bug.cgi?id=58473
1305
1306         Adding conversion routines.
1307
1308         * UIProcess/API/C/WKAPICast.h:
1309         (WebKit::toAPI):
1310         (WebKit::toEditableLinkBehavior):
1311         * UIProcess/API/C/WKPreferences.cpp:
1312         (WKPreferencesSetEditableLinkBehavior):
1313         (WKPreferencesGetEditableLinkBehavior):
1314
1315 2011-04-13  Anders Carlsson  <andersca@apple.com>
1316
1317         Reviewed by Dan Bernstein.
1318
1319         After closing the last window, re-opening my last visited website is over 2X slower
1320         https://bugs.webkit.org/show_bug.cgi?id=58488
1321         <rdar://problem/9233518>
1322
1323         Give the web process a 60 second termination timeout.
1324
1325         * WebProcess/WebProcess.cpp:
1326         (WebKit::WebProcess::WebProcess):
1327
1328 2011-04-13  Anders Carlsson  <andersca@apple.com>
1329
1330         Reviewed by Adam Roben.
1331
1332         Convert WebProcess over to using disableTermination/enableTermination
1333         https://bugs.webkit.org/show_bug.cgi?id=58485
1334
1335         * PluginProcess/PluginProcess.cpp:
1336         (WebKit::PluginProcess::getSitesWithData):
1337         (WebKit::PluginProcess::clearSiteData):
1338         Use the LocalTerminationDisabler RAII class.
1339
1340         * Shared/ChildProcess.h:
1341         (WebKit::ChildProcess::LocalTerminationDisabler::LocalTerminationDisabler):
1342         (WebKit::ChildProcess::LocalTerminationDisabler::~LocalTerminationDisabler):
1343         Add RAII class for calling disableTermination/enableTermination.
1344
1345         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1346         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
1347         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
1348         (WebKit::WebApplicationCacheManager::deleteAllEntries):
1349         Use the LocalTerminationDisabler RAII class.
1350
1351         * WebProcess/Cookies/WebCookieManager.cpp:
1352         (WebKit::WebCookieManager::getHostnamesWithCookies):
1353         (WebKit::WebCookieManager::deleteCookiesForHostname):
1354         (WebKit::WebCookieManager::deleteAllCookies):
1355         (WebKit::WebCookieManager::startObservingCookieChanges):
1356         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
1357         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
1358         Use the LocalTerminationDisabler RAII class.
1359
1360         * WebProcess/Downloads/Download.cpp:
1361         (WebKit::Download::Download):
1362         Call disableTermination().
1363
1364         (WebKit::Download::~Download):
1365         Call enableTermination().
1366
1367         * WebProcess/Downloads/DownloadManager.cpp:
1368         (WebKit::DownloadManager::downloadFinished):
1369         Remove call to terminateIfPossible.
1370
1371         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
1372         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1373         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1374         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1375         Use the LocalTerminationDisabler RAII class.
1376         
1377         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
1378         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
1379         (WebKit::WebMediaCacheManager::clearCacheForHostname):
1380         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
1381         Use the LocalTerminationDisabler RAII class.
1382         
1383         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1384         (WebKit::WebResourceCacheManager::getCacheOrigins):
1385         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1386         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
1387         Use the LocalTerminationDisabler RAII class.
1388         
1389         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1390         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
1391         (WebKit::WebDatabaseManager::getDatabaseOrigins):
1392         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
1393         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
1394         (WebKit::WebDatabaseManager::deleteAllDatabases):
1395         (WebKit::WebDatabaseManager::setQuotaForOrigin):
1396         Use the LocalTerminationDisabler RAII class.
1397         
1398         * WebProcess/WebProcess.cpp:
1399         (WebKit::WebProcess::createWebPage):
1400         Call disableTermination().
1401
1402         (WebKit::WebProcess::removeWebPage):
1403         Call enableTermination().
1404
1405         (WebKit::WebProcess::shouldTerminate):
1406         Move logic from terminateIfPossible over here.
1407
1408         (WebKit::WebProcess::terminate):
1409         Move logic from terminateIfPossible over here.
1410
1411         (WebKit::WebProcess::getSitesWithPluginData):
1412         (WebKit::WebProcess::clearPluginSiteData):
1413         Use the LocalTerminationDisabler RAII class.
1414
1415         * WebProcess/WebProcess.h:
1416         Publically inherit from ChildProcess, LocalTerminationDisabler needs to be accessible
1417         from the WebProcess class.
1418
1419 2011-04-13  Steve Falkenburg  <sfalken@apple.com>
1420
1421         Reviewed by Adam Roben.
1422
1423         Follow-up to: WebKit2 will load two copies of the same plugin, but should not
1424         https://bugs.webkit.org/show_bug.cgi?id=49075
1425         
1426         Use pathGetFileName instead of Win32 PathFindFileNameW.
1427
1428         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1429         (WebKit::PluginInfoStore::shouldUsePlugin):
1430
1431 2011-04-13  Sam Weinig  <sam@webkit.org>
1432
1433         Reviewed by Gavin Barraclough.
1434
1435         WebKit2 doesn't keep overlay scrollers shown while scroll gesture held
1436         <rdar://problem/9260518>
1437
1438         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1439         (InitWebCoreSystemInterface):
1440         Initialize new WKSI functions.
1441
1442 2011-04-13  Steve Falkenburg  <sfalken@apple.com>
1443
1444         Reviewed by Oliver Hunt.
1445
1446         WebKit2 will load two copies of the same plugin, but should not
1447         https://bugs.webkit.org/show_bug.cgi?id=49075
1448         <rdar://problem/8635947>
1449
1450         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1451         (WebKit::PluginInfoStore::shouldUsePlugin): Don't use a plug-in if we've already allowed a plug-in with the same filename.
1452
1453 2011-04-13  Timothy Hatcher  <timothy@apple.com>
1454
1455         Hide the dictionary panel when navigating or crashing.
1456
1457         <rdar://problem/9261202>
1458
1459         Reviewed by Sam Weinig.
1460
1461         * UIProcess/API/mac/PageClientImpl.h:
1462         * UIProcess/API/mac/PageClientImpl.mm:
1463         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added. Call WKHideWordDefinitionWindow.
1464         * UIProcess/PageClient.h:
1465         * UIProcess/WebPageProxy.cpp:
1466         (WebKit::WebPageProxy::didCommitLoadForFrame): Call PageClient::dismissDictionaryLookupPanel.
1467         (WebKit::WebPageProxy::processDidCrash): Call dismissCorrectionPanel and PageClient::dismissDictionaryLookupPanel.
1468
1469 2011-04-13  Anders Carlsson  <andersca@apple.com>
1470
1471         Reviewed by Adam Roben.
1472
1473         Add support for disabling/enabling termination to ChildProcess
1474         https://bugs.webkit.org/show_bug.cgi?id=58476
1475
1476         Add ChildProcess::disableTermination and ChildProcess::enableTermination and convert
1477         the PluginProcess class over to using them.
1478
1479         * PluginProcess/PluginProcess.cpp:
1480         (WebKit::PluginProcess::PluginProcess):
1481         The child process now takes a terminationTimeout argument. Get rid of the shutdown timer.
1482
1483         (WebKit::PluginProcess::removeWebProcessConnection):
1484         Call enableTermination().
1485
1486         (WebKit::PluginProcess::shouldTerminate):
1487         Always return true.
1488
1489         (WebKit::PluginProcess::createWebProcessConnection):
1490         Call disableTermination().
1491
1492         (WebKit::PluginProcess::getSitesWithData):
1493         Call disableTermination()/enableTermination().
1494
1495         (WebKit::PluginProcess::clearSiteData):
1496         Ditto.
1497
1498         * Shared/ChildProcess.cpp:
1499         (WebKit::ChildProcess::disableTermination):
1500         Increment the counter and stop the timer.
1501
1502         (WebKit::ChildProcess::enableTermination):
1503         Decrement the counter; if it's zero, start the timer.
1504
1505         (WebKit::ChildProcess::terminationTimerFired):
1506         Call shouldTerminate(). If it returns true, call terminate().
1507
1508         (WebKit::ChildProcess::terminate):
1509         Call RunLoop::quit().
1510
1511         * WebProcess/WebProcess.cpp:
1512         (WebKit::WebProcess::WebProcess):
1513         Just initialize the termination timeout to 0 for now.
1514
1515         (WebKit::WebProcess::shouldTerminate):
1516         Always return true; this isn't used yet.
1517
1518         * WebProcess/WebProcess.h:
1519
1520 2011-04-13  Enrica Casucci  <enrica@apple.com>
1521
1522         Reviewed by Dan Bernstein.
1523
1524         REGRESSION: Links are clickable when a contentEditable is set to true.
1525         https://bugs.webkit.org/show_bug.cgi?id=58473
1526         <rdar://problem/9256793>
1527         
1528         Added support for editable link behavior property.
1529
1530         * Shared/WebPreferencesStore.cpp:
1531         * Shared/WebPreferencesStore.h:
1532         * UIProcess/API/C/WKPreferences.cpp:
1533         (WKPreferencesSetEditableLinkBehavior):
1534         (WKPreferencesGetEditableLinkBehavior):
1535         * UIProcess/API/C/WKPreferencesPrivate.h:
1536         * WebProcess/WebPage/WebPage.cpp:
1537         (WebKit::WebPage::updatePreferences):
1538
1539 2011-04-12  Alexey Proskuryakov  <ap@apple.com>
1540
1541         Reviewed by Oliver Hunt.
1542
1543         REGRESSION (WebKit2): Input methods are active in non-editable content
1544         https://bugs.webkit.org/show_bug.cgi?id=58404
1545         <rdar://problem/9275940>
1546
1547         * UIProcess/API/mac/WKView.mm:
1548         (-[WKView insertText:]): Re-add the old variant of this function, because it's not only part
1549         of deprecated NSTextInput protocol, but it's also part of NSResponder, and it's called when
1550         the input context in nil.
1551         (-[WKView inputContext]): Return nil when not in editable content.
1552
1553 2011-04-12  Brady Eidson  <beidson@apple.com>
1554
1555         Reviewed by Maciej Stachowiak.
1556
1557         <rdar://problem/9029193> and https://bugs.webkit.org/show_bug.cgi?id=58406
1558         Bringing up the context menu on a link might also follow the link.
1559
1560         This patch adds a flag that is set just before the WebProcess tells the UIProcess to show a context menu.
1561
1562         As long as this flag is set, the WebProcess will ignore any other mouse events that might have queued up
1563         by the time the UIProcess gets around to showing the menu.
1564
1565         After the UIProcess is done showing the menu, it messages back telling the WebProcess to clear the flag
1566         and resume normal MouseEvent handling.
1567
1568         * UIProcess/WebPageProxy.cpp:
1569         (WebKit::WebPageProxy::showContextMenu): No matter what internalShowContextMenu does, always notify
1570           the WebProcess that any context menu is now hidden.
1571         (WebKit::WebPageProxy::internalShowContextMenu):
1572         * UIProcess/WebPageProxy.h:
1573
1574         * WebProcess/WebPage/WebContextMenu.cpp:
1575         (WebKit::WebContextMenu::show): Since we're telling the UIProcess to show the menu, tell the WebPage a
1576           context menu is showing so it will stop handling mouse events.
1577
1578         * WebProcess/WebPage/WebPage.cpp:
1579         (WebKit::WebPage::WebPage):
1580         (WebKit::WebPage::mouseEvent): Don't try to handle mouse events if a context menu is flagged as showing.
1581
1582         Add accessors to twiddle the "context menu showing" flag:
1583         * WebProcess/WebPage/WebPage.h:
1584         (WebKit::WebPage::contextMenuShowing):
1585         (WebKit::WebPage::contextMenuHidden):
1586         * WebProcess/WebPage/WebPage.messages.in: Add the ContextMenuHidden message.
1587
1588 2011-04-12  Sam Weinig  <sam@webkit.org>
1589
1590         Reviewed by Maciej Stachowiak.
1591
1592         Quarantine related sandbox denial when downloading files
1593         <rdar://problem/9203736>
1594
1595         * WebProcess/com.apple.WebProcess.sb:
1596
1597 2011-04-12  Sam Weinig  <sam@webkit.org>
1598
1599         Reviewed by Anders Carlsson.
1600
1601         Sandbox violations dragging an image to the desktop.
1602         <rdar://problem/9261834>
1603
1604         * WebProcess/com.apple.WebProcess.sb:
1605
1606 2011-04-12  Sam Weinig  <sam@webkit.org>
1607
1608         Reviewed by Cameron Zwarich.
1609
1610         Sandbox violations trying to access ~/Library/Keyboard Layouts and ~/Library/Input Methods
1611         <rdar://problem/8973159> 
1612
1613         * WebProcess/com.apple.WebProcess.sb:
1614
1615 2011-04-12  Enrica Casucci  <enrica@apple.com>
1616
1617         Reviewed by Alexey Proskuryakov and Sam Weinig.
1618
1619         Implement non-activating clicks to allow dragging out of a background window.
1620         https://bugs.webkit.org/show_bug.cgi?id=55053
1621         <rdar://problem/9042197>
1622
1623         Added methods to WKView to support non activating click. Unfortunately both
1624         methods require a synchronous call to the WebProcess to decide what to do.
1625         acceptFirstMouse is called only if shouldDelayWindowOrderingForEvent returns
1626         true. In order to minimize the number of synchronous calls, we send the request
1627         only if our window is not the key window.
1628
1629         * UIProcess/API/mac/WKView.mm:
1630         (-[WKView acceptsFirstMouse:]):
1631         (-[WKView shouldDelayWindowOrderingForEvent:]):
1632         * UIProcess/WebPageProxy.h:
1633         * UIProcess/mac/WebPageProxyMac.mm:
1634         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
1635         (WebKit::WebPageProxy::acceptsFirstMouse):
1636         * WebProcess/WebPage/WebPage.h:
1637         * WebProcess/WebPage/WebPage.messages.in:
1638         * WebProcess/WebPage/mac/WebPageMac.mm:
1639         (WebKit::WebPage::shouldDelayWindowOrderingEvent):
1640         (WebKit::WebPage::acceptsFirstMouse):
1641
1642 2011-04-12  Alexey Proskuryakov  <ap@apple.com>
1643
1644         Reviewed by Oliver Hunt.
1645
1646         Crash when serializing a null AttributedString
1647         https://bugs.webkit.org/show_bug.cgi?id=58393
1648         <rdar://problem/9275326>
1649
1650         * Shared/mac/AttributedString.mm:
1651         (WebKit::AttributedString::encode):
1652         (WebKit::AttributedString::decode):
1653         Prefix the serialized value with an isNull tag.
1654
1655 2011-04-12  Enrica Casucci  <enrica@apple.com>
1656
1657         Reviewed by Alexey Proskuryakov.
1658
1659         Infinite recursion in WebHTMLView executeSavedKeypressCommands.
1660         https://bugs.webkit.org/show_bug.cgi?id=58382
1661         <rdar://problem/9239370>
1662
1663         Execution of some editing commands could trigger a call to selectedRange that
1664         internally calls executeSavedKeypressCommands creating an infinite recursion.
1665
1666         * UIProcess/API/mac/WKView.mm:
1667         (-[WKView _executeSavedKeypressCommands]): Added flag to avoid recursion.
1668         (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
1669         Added flag initialization.
1670
1671 2011-04-12  Chris Marrin  <cmarrin@apple.com>
1672
1673         Reviewed by Simon Fraser.
1674
1675         Page tears and stutters in WebKit2 when page is > 2048 pixels wide
1676         https://bugs.webkit.org/show_bug.cgi?id=58330
1677
1678         Turn off tiling for nonCompositedContentLayer to avoid tearing when
1679         scrolling very wide (> 2048) windows.
1680
1681         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1682         (WebKit::LayerTreeHostCA::initialize):
1683
1684 2011-04-12  Anders Carlsson  <andersca@apple.com>
1685
1686         Reviewed by Adam Roben.
1687
1688         Assertion in DrawingAreaImpl::resumePainting() (m_isPaintingSuspended) when clicking a link at twitter.com
1689         https://bugs.webkit.org/show_bug.cgi?id=58377
1690         <rdar://problem/8976531>
1691
1692         Remove the assertion.
1693
1694         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1695         (WebKit::DrawingAreaImpl::resumePainting):
1696
1697 2011-04-11  Stephanie Lewis  <slewis@apple.com>
1698
1699         Reviewed by Oliver Hunt.
1700
1701         https://bugs.webkit.org/show_bug.cgi?id=58280
1702         <rdar://problem/9252824> javascript in an inconsistent state due to serialization returning an un-handled exception
1703         Change use of SerializedScriptValue::Create to use the same api as the rest of WebKit2.  This has the benefit
1704         of handling any exceptions so Javascript is not in an inconsistent state.
1705
1706         * Shared/API/c/WKSerializedScriptValue.h: fix a typo
1707         * WebProcess/WebPage/WebPage.cpp:
1708         (WebKit::WebPage::runJavaScriptInMainFrame):
1709
1710 2011-04-12  Jeff Miller  <jeffm@apple.com>
1711
1712         Reviewed by Adam Roben.
1713
1714         WebKit2: Pressing Tab in Web Inspector's console does not cycle through completion options
1715         https://bugs.webkit.org/show_bug.cgi?id=56020
1716
1717         Safari was always calling TranslateMessage() on key events since it has no way to know whether
1718         WebKit handled the event without a PageUIClient (which Safari only installs on pages inside
1719         a Safari window), which was generating a WM_CHAR message containing the tab in this case.  The fix
1720         is for Safari to never call TranslateMessage() on key events outside of a Safari window, but this
1721         means the WebPageProxy needs to do this for unhandled key events if there is no didNotHandleKeyEvent
1722         callback in the PageUIClient.
1723
1724         * UIProcess/WebPageProxy.cpp:
1725         (WebKit::WebPageProxy::didReceiveEvent): Call TranslateMessage() on Windows for unhandled key events that can't be handled by the PageUIClient.
1726         * UIProcess/WebUIClient.cpp:
1727         (WebKit::WebUIClient::canNotHandleKeyEvent): Added.
1728         * UIProcess/WebUIClient.h: Added canNotHandleKeyEvent().
1729
1730 2011-04-12  Alice Liu  <alice.liu@apple.com>
1731
1732         Reviewed by Sam Weinig.
1733
1734         https://bugs.webkit.org/show_bug.cgi?id=58292
1735         Provide new setting to allow site icon loading despite disabling automatic image loading in general.
1736
1737         * Shared/WebPreferencesStore.h: Add macro for setting default value.
1738         * UIProcess/API/C/WKPreferences.cpp:
1739         (WKPreferencesSetLoadsSiteIconsIgnoringImageLoadingPreference): Added setter.
1740         (WKPreferencesGetLoadsSiteIconsIgnoringImageLoadingPreference): Added getter.
1741         * UIProcess/API/C/WKPreferences.h:
1742         * WebProcess/WebPage/WebPage.cpp:
1743         (WebKit::WebPage::updatePreferences): Add to list of WebCore settings that get propagated to WebKit preferences.
1744
1745 2011-04-12  Jessie Berlin  <jberlin@apple.com>
1746
1747         Reviewed by Anders Carlsson.
1748
1749         WebKit2: Spelling and Grammar Checking: Make sure to remove the markings from the document
1750         when spelling and/or grammar checking is disabled.
1751         https://bugs.webkit.org/show_bug.cgi?id=58350
1752
1753         * UIProcess/API/mac/WKView.mm:
1754         (-[WKView toggleContinuousSpellChecking:]):
1755         Move the call to unmark the errors to the WebProcess.
1756         (-[WKView setGrammarCheckingEnabled:]):
1757         Ditto.
1758         (-[WKView toggleGrammarChecking:]):
1759         Ditto.
1760
1761         * UIProcess/WebPageProxy.cpp:
1762         Remove unused functions.
1763         * UIProcess/WebPageProxy.h:
1764         Ditto.
1765         * WebProcess/WebPage/WebPage.messages.in:
1766         Ditto.
1767         * WebProcess/WebPage/WebPage.h:
1768
1769         * WebProcess/WebProcess.cpp:
1770         (WebKit::WebProcess::setTextCheckerState):
1771         If grammar or spelling checking is disabled, unmark all the pages.
1772         Doing it here allows makes it possible to unmark all pages in a cross-platform way that is
1773         triggered both by selecting the the context menu items and by any other methods of updating
1774         the enabled / disabled state.
1775
1776 2011-04-12  Anders Carlsson  <andersca@apple.com>
1777
1778         Reviewed by Sam Weinig.
1779
1780         Cisco Meeting Center will not download or launch from Safari
1781         https://bugs.webkit.org/show_bug.cgi?id=58366
1782         <rdar://problem/8987139>
1783
1784         It's OK if a plug-in has less (or more) MIME type descriptions than actual MIME types.
1785         
1786         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1787         (WebKit::getPluginInfoFromCarbonResources):
1788
1789 2011-04-12  Anders Carlsson  <andersca@apple.com>
1790
1791         Reviewed by Sam Weinig.
1792
1793         Call PluginControllerProxy::platformGeometryDidChange before Plugin::geometryDidChange
1794         https://bugs.webkit.org/show_bug.cgi?id=58361
1795
1796         Since Plugin::geometryDidChange ends up calling plug-in code it can resize the plug-in which causes
1797         platformGeometryDidChange to be called with the wrong rect.
1798
1799         * PluginProcess/PluginControllerProxy.cpp:
1800         (WebKit::PluginControllerProxy::geometryDidChange):
1801         Call platformGeometryDidChange.
1802
1803         * PluginProcess/PluginControllerProxy.h:
1804         * PluginProcess/mac/PluginControllerProxyMac.mm:
1805         (WebKit::PluginControllerProxy::platformGeometryDidChange):
1806         Remove the parameters to platformGeometryDidChange and just use m_frameRect instead.
1807
1808 2011-04-12  Anders Carlsson  <andersca@apple.com>
1809
1810         Reviewed by Sam Weinig.
1811
1812         Move three Mac specific functions to PluginControllerProxyMac.mm.
1813         
1814 2011-04-12  Anders Carlsson  <andersca@apple.com>
1815
1816         Reviewed by Sam Weinig.
1817
1818         Cache the window and plug-in element NPObjects
1819         https://bugs.webkit.org/show_bug.cgi?id=58355
1820
1821         * PluginProcess/PluginControllerProxy.cpp:
1822         (WebKit::PluginControllerProxy::PluginControllerProxy):
1823         (WebKit::PluginControllerProxy::~PluginControllerProxy):
1824         (WebKit::PluginControllerProxy::windowScriptNPObject):
1825         (WebKit::PluginControllerProxy::pluginElementNPObject):
1826         * PluginProcess/PluginControllerProxy.h:
1827
1828 2011-04-12  Alejandro G. Castro  <alex@igalia.com>
1829
1830         Fixed GTK compilation after r83454.
1831
1832         * UIProcess/gtk/WebView.cpp:
1833         (WebKit::WebView::findStringInCustomRepresentation):
1834         (WebKit::WebView::countStringMatchesInCustomRepresentation):
1835         * UIProcess/gtk/WebView.h:
1836
1837 2011-04-11  Daniel Bates  <dbates@webkit.org>
1838
1839         Attempt to fix the Qt Linux Release build after changeset 83550 <http://trac.webkit.org/changeset/83550>
1840         (https://bugs.webkit.org/show_bug.cgi?id=54159).
1841
1842         * WebKit2API.pri: Append UIProcess/API/C/WKResourceCacheManager.cpp to the list WEBKIT2_API_SOURCES.
1843
1844 2011-04-11  Sam Weinig  <sam@webkit.org>
1845
1846         Reviewed by Anders Carlsson.
1847
1848         Move focus management out of WebKit via  the UIClient
1849         <rdar://problem/8784068>
1850         https://bugs.webkit.org/show_bug.cgi?id=58278
1851
1852         * UIProcess/API/C/WKPage.h:
1853         * UIProcess/API/mac/PageClientImpl.h:
1854         * UIProcess/API/mac/PageClientImpl.mm:
1855         * UIProcess/API/qt/qwkpage.cpp:
1856         (QWKPage::QWKPage):
1857         * UIProcess/API/qt/qwkpage_p.h:
1858         * UIProcess/PageClient.h:
1859         * UIProcess/WebPageProxy.cpp:
1860         (WebKit::WebPageProxy::setFocus):
1861         * UIProcess/WebUIClient.cpp:
1862         (WebKit::WebUIClient::focus):
1863         (WebKit::WebUIClient::unfocus):
1864         * UIProcess/WebUIClient.h:
1865         * UIProcess/gtk/WebView.cpp:
1866         * UIProcess/gtk/WebView.h:
1867         * UIProcess/win/WebView.h:
1868         Remove PageClient::setFocus() in favor of WebUIClient::focus and WebUIClient::unfocus. 
1869
1870 2011-04-11  Alexey Proskuryakov  <ap@apple.com>
1871
1872         Reviewed by Maciej Stachowiak.
1873
1874         WebKit2: Cannot use Ctrl-Delete as a custom keyboard shortcut
1875         https://bugs.webkit.org/show_bug.cgi?id=58265
1876         <rdar://problem/9221468>
1877
1878         * WebProcess/WebPage/WebPage.cpp:
1879         (WebKit::WebPage::keyEvent): Added a comment explaining that doing work after DOM event
1880         dispatch isn't great.
1881         * WebProcess/WebPage/mac/WebPageMac.mm:
1882         (WebKit::WebPage::performNonEditingBehaviorForSelector): Added a comment explaining how this
1883         might be moved down to WebCore.
1884         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): This is now empty, since both Space
1885         and Backspace behaviors are implemented in WebCore.
1886
1887 2011-04-11  Anders Carlsson  <andersca@apple.com>
1888
1889         Try to fix the Windows build.
1890
1891         * UIProcess/win/WebInspectorProxyWin.cpp:
1892         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1893
1894 2011-04-11  Alexey Proskuryakov  <ap@apple.com>
1895
1896         Reviewed by Dan Bernstein.
1897
1898         REGRESSION (r83081): Esc key no longer removes current Kotoeri text operation
1899         https://bugs.webkit.org/show_bug.cgi?id=58274
1900         <rdar://problem/9263683>
1901
1902         * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getMarkedRange): Wrap the returned
1903         temporary in RefPtr.
1904
1905 2011-04-11  Anders Carlsson  <andersca@apple.com>
1906
1907         Reviewed by Sam Weinig.
1908
1909         Remove m_urlAtProcessExit from WebPageProxy
1910         https://bugs.webkit.org/show_bug.cgi?id=58275
1911
1912         Get rid of m_urlAtProcessExit and replace some zeros with nullptrs.
1913
1914         * UIProcess/WebPageProxy.cpp:
1915         (WebKit::WebPageProxy::processDidCrash):
1916         * UIProcess/WebPageProxy.h:
1917
1918 2011-04-11  Anders Carlsson  <andersca@apple.com>
1919
1920         Reviewed by Adam Roben.
1921
1922         Remove the WebContext member variable from WebPageProxy
1923         https://bugs.webkit.org/show_bug.cgi?id=58271
1924         <rdar://problem/9148125>
1925
1926         * UIProcess/API/C/WKPage.cpp:
1927         (WKPageGetContext):
1928         * UIProcess/WebPageProxy.cpp:
1929         (WebKit::WebPageProxy::create):
1930         (WebKit::WebPageProxy::WebPageProxy):
1931         (WebKit::WebPageProxy::process):
1932         (WebKit::WebPageProxy::reattachToWebProcess):
1933         (WebKit::WebPageProxy::canShowMIMEType):
1934         (WebKit::WebPageProxy::receivedPolicyDecision):
1935         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1936         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1937         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1938         (WebKit::WebPageProxy::didCommitLoadForFrame):
1939         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1940         (WebKit::WebPageProxy::didFinishLoadForFrame):
1941         (WebKit::WebPageProxy::didFailLoadForFrame):
1942         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1943         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1944         (WebKit::WebPageProxy::didFirstLayoutForFrame):
1945         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1946         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
1947         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1948         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1949         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1950         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1951         (WebKit::WebPageProxy::decidePolicyForResponse):
1952         (WebKit::WebPageProxy::unableToImplementPolicy):
1953         (WebKit::WebPageProxy::willSubmitForm):
1954         (WebKit::WebPageProxy::mouseDidMoveOverElement):
1955         (WebKit::WebPageProxy::showContextMenu):
1956         (WebKit::WebPageProxy::contextMenuItemSelected):
1957         * UIProcess/WebPageProxy.h:
1958         * UIProcess/WebProcessProxy.cpp:
1959         (WebKit::WebProcessProxy::createWebPage):
1960         * UIProcess/mac/WebInspectorProxyMac.mm:
1961         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1962
1963 2011-04-11  Eric Carlson  <eric.carlson@apple.com>
1964
1965         Reviewed by Adam Roben.
1966
1967         Ignore context change callbacks when not on the main thread
1968         https://bugs.webkit.org/show_bug.cgi?id=58256
1969         <rdar://problem/9266090>
1970
1971         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
1972         (WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Do nothing when not called
1973             on the main thread. This should only happen when no changes have actually 
1974             been committed to the context, eg. when a video frame has been added to an image
1975             queue, so return without triggering animations etc.
1976
1977 2011-04-11  Anders Carlsson  <andersca@apple.com>
1978
1979         Reviewed by Sam Weinig.
1980
1981         First step towards simplifying WebPageProxy/WebProcessProxy/WebContext ownership
1982         https://bugs.webkit.org/show_bug.cgi?id=58266
1983         <rdar://problem/9148125>
1984
1985         With this patch, the WKView holds a strong reference to a WebPageProxy. The 
1986         WebPageProxy in turn holds a strong reference to its WebProcessProxy. Finally,
1987         The WebProcessProxy holds a strong reference to its WebContext.
1988
1989         The WebContext holds a strong reference to the running WebProcessProxy which results
1990         in a reference cycle that's broken when the web process exits.
1991
1992         The reason for is to avoid crashes where WebPageProxy::process() returns null if the web process
1993         has crashed but has not yet been relaunched.
1994
1995         * UIProcess/WebContext.cpp:
1996         (WebKit::WebContext::disconnectProcess):
1997         Add comment.
1998
1999         (WebKit::WebContext::createWebPage):
2000         Return a PassRefPtr.
2001
2002         (WebKit::WebContext::relaunchProcessIfNecessary):
2003         Change this to return a WebPageProxy.
2004
2005         * UIProcess/WebPageProxy.cpp:
2006         (WebKit::WebPageProxy::create):
2007         This now takes a PassRefPtr<WebProcessProxy>.
2008
2009         (WebKit::WebPageProxy::WebPageProxy):
2010         Ditto.
2011
2012         (WebKit::WebPageProxy::~WebPageProxy):
2013         Call close() if necessary.
2014
2015         (WebKit::WebPageProxy::reattachToWebProcess):
2016         Replace the current process with the new process.
2017
2018         * UIProcess/WebProcessProxy.cpp:
2019         (WebKit::WebProcessProxy::create):
2020         Take a PassRefPtr<WebContext>.
2021         
2022         (WebKit::WebProcessProxy::WebProcessProxy):
2023         Ditto.
2024
2025         (WebKit::WebProcessProxy::webPage):
2026         Remove .get() now that the page map uses weak references.
2027
2028         (WebKit::WebProcessProxy::createWebPage):
2029         This now returns the created web page proxy.
2030
2031 2011-04-11  Adam Roben  <aroben@apple.com>
2032
2033         Dispatch sent messages to windows owned by the web process when waiting a sync CoreIPC reply
2034
2035         On Windows, windowed plugins' HWNDs are created as children of the WKView's window. This
2036         creates a cross-process window hierarchy, which in turn attaches the input states of the UI
2037         process's and web process's main threads (as if ::AttachThreadInput has been called). Having
2038         the input states attached means that changes to the input state (e.g., changing the focus
2039         window) can result in synchronous window messages being sent between the processes. This can
2040         result in deadlocks if the UI process changes the input state while handling a synchronous
2041         CoreIPC message from the web process. Since the web process isn't running its message loop
2042         while waiting for the reply, it never processes the messages Windows is sending it from the
2043         UI process.
2044
2045         The solution taken in this patch is to continue to dispatch sent (not posted) messages to
2046         windows created by the web process while waiting for a sync CoreIPC reply. Someday we can
2047         hopefully reduce the number of cases in which the UI process modifies the thread's input
2048         state while handling a synchronous message; see the bug for details.
2049
2050         Fixes <http://webkit.org/b/58239> <rdar://problem/8769302> REGRESSION (WebKit2): Deadlock
2051         clicking Flash plugin
2052
2053         Reviewed by Anders Carlsson.
2054
2055         * Platform/CoreIPC/BinarySemaphore.h:
2056         (CoreIPC::BinarySemaphore::event): Added. Simple getter to expose the underlying event
2057         HANDLE.
2058
2059         * Platform/CoreIPC/Connection.cpp:
2060         (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentMessages): New Windows-only
2061         function that is used instead of wait() so that sent messages will continue to be
2062         dispatched.
2063         (CoreIPC::Connection::waitForSyncReply): Use waitWhileDispatchingSentMessages instead of
2064         wait on Windows. Our Client gives us the set of windows that need to have windows delivered
2065         to them.
2066
2067         * Platform/CoreIPC/Connection.h: Added new
2068         windowsToReceiveSentMessagesWhileWaitingForSyncReply function to Client.
2069
2070         * Platform/RunLoop.h: Added new dispatchSentMessagesUntil function to be used while waiting
2071         for a sync CoreIPC reply.
2072
2073         * Platform/win/RunLoopWin.cpp:
2074         (RunLoop::dispatchSentMessagesUntil): Added. If we have no windows to dispatch messages to,
2075         then just wait on the semaphore. Otherwise spin a ::MsgWaitForMultipleObjectsEx loop to
2076         detect when the semaphore is signaled, the timeout elapses, or sent messages are available,
2077         and handle each case appropriately.
2078
2079         * UIProcess/WebProcessProxy.h: Added new CoreIPC::Connection::Client function.
2080
2081         * UIProcess/win/WebProcessProxyWin.cpp: Added.
2082         (WebKit::WebProcessProxy::windowsToReceiveSentMessagesWhileWaitingForSyncReply): Just return
2083         an empty Vector. The web process never modifies the thread's input state while responding to
2084         a synchronous message, so we don't have anything to worry about here.
2085
2086         * WebProcess/WebProcess.h: Added new CoreIPC::Connection::Client function.
2087
2088         * WebProcess/win/WebProcessWin.cpp:
2089         (WebKit::addWindowToVectorIfOwnedByCurrentThread): New helper function to be called by
2090         ::EnumThreadWindows/::EnumChildWindows. Does what it says.
2091         (WebKit::WebProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply): Added. Returns
2092         all top-level windows created by this thread, descendants of those windows created by this
2093         thread, and descendants of WKViews' windows created by this thread.
2094
2095         * win/WebKit2.vcproj: Added WebProcessProxyWin.cpp.
2096
2097 2011-04-11  Jessie Berlin  <jberlin@apple.com>
2098
2099         Reviewed by Anders Carlsson.
2100
2101         WebKit2: Implement TextChecker on Windows
2102         https://bugs.webkit.org/show_bug.cgi?id=57862
2103
2104         Part 7: Implement getGuessesForWord, learnWord, and ignoreWord.
2105
2106         * UIProcess/API/C/win/WKTextChecker.cpp:
2107         (WKTextCheckerChangeSpellingToWord):
2108         * UIProcess/API/C/win/WKTextChecker.h:
2109
2110         * UIProcess/WebPageProxy.cpp:
2111         (WebKit::WebPageProxy::changeSpellingToWord):
2112         Make this function const since it does not modify the WebPageProxy and making it const
2113         allows WebTextChecker::changeSpellingToWord to take a const WebPageProxy.
2114         (WebKit::WebPageProxy::learnWord):
2115         * UIProcess/WebPageProxy.h:
2116
2117         * UIProcess/TextChecker.h:
2118         * UIProcess/win/TextCheckerWin.cpp:
2119         (WebKit::TextChecker::getGuessesForWord):
2120         Ask the TextCheckerClient for the guesses.
2121         (WebKit::TextChecker::learnWord):
2122         Tell the TextCheckerClient.
2123         (WebKit::TextChecker::ignoreWord):
2124         Ditto.
2125         * UIProcess/gtk/TextCheckerGtk.cpp:
2126         (WebKit::TextChecker::learnWord):
2127         Add an unused param that is necessary for Windows.
2128         * UIProcess/mac/TextCheckerMac.mm:
2129         (WebKit::TextChecker::learnWord):
2130         Ditto.
2131         * UIProcess/qt/TextCheckerQt.cpp:
2132         (WebKit::TextChecker::learnWord):
2133         Ditto.
2134
2135         * UIProcess/win/WebTextChecker.cpp:
2136         (WebKit::WebTextChecker::changeSpellingToWord):
2137         Tell the page.
2138         * UIProcess/win/WebTextChecker.h:
2139
2140         * UIProcess/win/WebTextCheckerClient.cpp:
2141         (WebKit::WebTextCheckerClient::guessesForWord):
2142         (WebKit::WebTextCheckerClient::learnWord):
2143         (WebKit::WebTextCheckerClient::ignoreWord):
2144         * UIProcess/win/WebTextCheckerClient.h:
2145
2146 2011-04-11  Anders Carlsson  <andersca@apple.com>
2147
2148         Reviewed by Sam Weinig.
2149
2150         Remove unused WebProcessProxy functions
2151         https://bugs.webkit.org/show_bug.cgi?id=58262
2152
2153         * UIProcess/WebProcessProxy.cpp:
2154         * UIProcess/WebProcessProxy.h:
2155
2156 2011-04-11  Anders Carlsson  <andersca@apple.com>
2157
2158         Reviewed by Sam Weinig.
2159
2160         Crash in WebPageProxy::countStringMatches
2161         https://bugs.webkit.org/show_bug.cgi?id=58255
2162         <rdar://problem/9243837>
2163
2164         * UIProcess/WebPageProxy.cpp:
2165         (WebKit::WebPageProxy::countStringMatches):
2166         Return early if the page is not valid.
2167
2168 2011-04-11  Sam Weinig  <sam@webkit.org>
2169
2170         Reviewed by Anders Carlsson.
2171
2172         WebKit2: links don’t update to look visited
2173         <rdar://problem/8806254>
2174         https://bugs.webkit.org/show_bug.cgi?id=58252
2175
2176         * WebProcess/WebProcess.cpp:
2177         (WebKit::WebProcess::visitedLinkStateChanged):
2178         (WebKit::WebProcess::allVisitedLinkStateChanged):
2179         * WebProcess/WebProcess.h:
2180         Remove use of vestigial sharedPageGroup and instead iterate set of
2181         page groups in use by the process.
2182
2183 2011-04-11  Brian Weinstein  <bweinstein@apple.com>
2184
2185         Reviewed by Adam Roben.
2186
2187         WebKit2: Windows 7 Gestures Window Bounce shouldn't require a sync message
2188         https://bugs.webkit.org/show_bug.cgi?id=58167
2189         <rdar://problem/9259813>
2190         
2191         Instead of making GestureDidScroll sync, have WebPageWin call from WebProcess ->
2192         UIProcess when the gesture causes the page to scroll to the beginning or the
2193         end of the document.
2194
2195         * UIProcess/PageClient.h:
2196         * UIProcess/WebPageProxy.cpp:
2197         (WebKit::WebPageProxy::gestureDidScroll): Not a sync message anymore.
2198         (WebKit::WebPageProxy::setGestureScrollingLimitReached): Tell the page client that the gesture
2199             scrolling limnit was reached.
2200         * UIProcess/WebPageProxy.h:
2201         * UIProcess/WebPageProxy.messages.in: Add a new message.
2202         * UIProcess/win/WebView.cpp:
2203         (WebKit::WebView::WebView): Initialize new variable.
2204         (WebKit::WebView::onGesture): Use the state of the member variable, not the response from
2205             the sync message.
2206         * UIProcess/win/WebView.h:
2207         (WebKit::WebView::setGestureScrollingLimitReached):
2208         * WebProcess/WebPage/WebPage.h:
2209         * WebProcess/WebPage/WebPage.messages.in:
2210         * WebProcess/WebPage/win/WebPageWin.cpp:
2211         (WebKit::scrollbarAtTopOfBottomOrDocument): Returns whether or not the scrollbar is at the
2212             top or bottom of the document.
2213         (WebKit::WebPage::gestureDidScroll): Track whether or not we started at the beginning
2214             or end of the document, and whether or not we ended at the beginning or end of the document,
2215             and send a message if the value changed.
2216
2217 2011-04-04  Jer Noble  <jer.noble@apple.com>
2218
2219         Reviewed by Maciej Stachowiak.
2220
2221         WK2: PDF: Find in page
2222         https://bugs.webkit.org/show_bug.cgi?id=57765
2223
2224         Support searching text within PDF documents.  Find requests must be routed from the
2225         WebPageProxy, through the PageClient, and to the WKView, where they can be passed to 
2226         the PDFViewController.
2227
2228         * UIProcess/API/mac/PDFViewController.h:
2229         * UIProcess/API/mac/PDFViewController.mm:
2230         (_PDFSelectionsAreEqual): Copied from WebPDFView.
2231         (-[WKPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]): Copied from WebPDFView.
2232         (-[WKPDFView _countMatches:caseSensitive:]): Added.
2233         (WebKit::PDFViewController::findString): Added.
2234         (WebKit::PDFViewController::countStringMatches): Added.
2235         * UIProcess/PageClient.h:
2236         * UIProcess/API/mac/PageClientImpl.h:
2237         * UIProcess/API/mac/PageClientImpl.mm:
2238         (WebKit::PageClientImpl::findStringInCustomRepresentation): Added.
2239         (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): Added.
2240         * UIProcess/API/mac/WKViewInternal.h:
2241         * UIProcess/API/mac/WKView.mm:
2242         (-[WKView _findStringInCustomRepresentation:withFindOptions:maxMatchCount:]): Added.
2243         (-[WKView _countStringMatchesInCustomRepresentation:withFindOptions:maxMatchCount:]): Added.
2244         * UIProcess/WebPageProxy.h: Moved a number of find-related functions from private: to public: so
2245             they could be called from PDFViewController.
2246         * UIProcess/WebPageProxy.cpp:
2247         (WebKit::WebPageProxy::findString): Added. 
2248         (WebKit::WebPageProxy::countStringMatches): Added.
2249         * UIProcess/win/WebView.cpp:
2250         (WebKit::WebView::findStringInCustomRepresentation): Added stub.
2251         (WebKit::WebView::countStringMatchesInCustomRepresentation): Ditto.
2252         * UIProcess/win/WebView.h:
2253         * UIProcess/API/qt/qwkpage_p.h:
2254         (QWKPagePrivate::findStringInCustomRepresentation): Added stub.
2255         (QWKPagePrivate::countStringMatchesInCustomRepresentation): Added stub.
2256
2257 2011-04-11  Jessie Berlin  <jberlin@apple.com>
2258
2259         Reviewed by Anders Carlsson.
2260
2261         WebKit2: Implement TextChecker on Windows
2262         https://bugs.webkit.org/show_bug.cgi?id=57862
2263
2264         Part 6: Update the Spelling UI with the spelling and grammar mistakes.
2265
2266         * UIProcess/API/C/win/WKAPICastWin.h:
2267         (WebKit::toAPI):
2268         Make it possible to go from a WebCore::GrammarDetail to a WebGrammarDetail.
2269  
2270         * UIProcess/API/C/win/WKGrammarDetail.cpp:
2271         (WKGrammarDetailCreate):
2272         (WKGrammarDetailGetLocation):
2273         (WKGrammarDetailGetLength):
2274         (WKGrammarDetailCopyGuesses):
2275         (WKGrammarDetailCopyUserDescription):
2276         * UIProcess/API/C/win/WKGrammarDetail.h:
2277
2278         * UIProcess/API/C/win/WKTextChecker.cpp:
2279         (WKTextCheckerCheckSpelling):
2280         Tell the WebTextChecker.
2281         * UIProcess/API/C/win/WKTextChecker.h:
2282
2283         * UIProcess/WebPageProxy.cpp:
2284         (WebKit::WebPageProxy::contextMenuItemSelected):
2285         If the show/hide spelling UI is selected and the spelling UI is not showing, make sure to
2286         advance to the next misspelling (in this case, the first).
2287         This behavior matches that in WebCore and WKView.mm.
2288         (WebKit::WebPageProxy::advanceToNextMisspelling):
2289         Make this function const since it does not modify the WebPageProxy and making it const
2290         allows WebTextChecker::checkSpelling to take a const WebPageProxy.
2291         (WebKit::WebPageProxy::spellDocumentTag):
2292         (WebKit::WebPageProxy::updateSpellingUIWithMisspelledWord):
2293         (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
2294         * UIProcess/WebPageProxy.h:
2295
2296         * UIProcess/TextChecker.h:
2297         * UIProcess/win/TextCheckerWin.cpp:
2298         (WebKit::TextChecker::uniqueSpellDocumentTag):
2299         Tell the TextCheckerClient which WebPageProxy this tag is for.
2300         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2301         Tell the TextCheckerClient.
2302         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2303         Ditto.
2304         * UIProcess/mac/TextCheckerMac.mm:
2305         (WebKit::TextChecker::uniqueSpellDocumentTag):
2306         Add the new argument that is unused by this port.
2307         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2308         Ditto.
2309         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2310         Ditto.
2311         * UIProcess/gtk/TextCheckerGtk.cpp:
2312         (WebKit::TextChecker::uniqueSpellDocumentTag):
2313         Ditto.
2314         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2315         Ditto.
2316         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2317         Ditto.
2318         * UIProcess/qt/TextCheckerQt.cpp:
2319         (WebKit::TextChecker::uniqueSpellDocumentTag):
2320         Ditto.
2321         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2322         Ditto.
2323         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2324         Ditto.
2325
2326         * UIProcess/win/WebGrammarDetail.cpp:
2327         (WebKit::WebGrammarDetail::create):
2328         (WebKit::WebGrammarDetail::WebGrammarDetail):
2329         (WebKit::WebGrammarDetail::guesses):
2330         * UIProcess/win/WebGrammarDetail.h:
2331         (WebKit::WebGrammarDetail::location):
2332         (WebKit::WebGrammarDetail::length):
2333         (WebKit::WebGrammarDetail::userDescription):
2334
2335         * UIProcess/win/WebTextChecker.cpp:
2336         (WebKit::WebTextChecker::checkSpelling):
2337         Tell the page to advance to the next misspelling. This matches the WK1 WebView.cpp logic.
2338
2339         * UIProcess/win/WebTextChecker.h:
2340         * UIProcess/win/WebTextCheckerClient.cpp:
2341         (WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
2342         (WebKit::WebTextCheckerClient::toggleSpellingUIIsShowing):
2343         (WebKit::WebTextCheckerClient::updateSpellingUIWithMisspelledWord):
2344         (WebKit::WebTextCheckerClient::updateSpellingUIWithGrammarString):
2345         * UIProcess/win/WebTextCheckerClient.h:
2346
2347 2011-04-10  Maciej Stachowiak  <mjs@apple.com>
2348
2349         Not reviewed.
2350
2351         Remove extra inadvertantly commiteed changes from last change.
2352
2353         * WebProcess/com.apple.WebProcess.sb:
2354
2355 2011-04-10  Maciej Stachowiak  <mjs@apple.com>
2356
2357         Reviewed by Dan Bernstein.
2358
2359         REGRESSION: WebProcess spews sandboxing violations for outbound network traffic
2360         https://bugs.webkit.org/show_bug.cgi?id=58215
2361         <rdar://problem/9251695>
2362         
2363         * WebProcess/com.apple.WebProcess.sb: Restore some previously removed rules.
2364
2365 2011-04-10  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2366
2367         Reviewed by Eric Seidel.
2368
2369         Require no undefined symbols during compilation.
2370
2371         [Qt] [WK2] WebKitTestRunner, QtWebProcess and WTRInjectBundle should fail to compile when there's undefined symbols
2372         https://bugs.webkit.org/show_bug.cgi?id=54896
2373         
2374         Add -Wl,--no-undefined to catch missing symbols early.
2375
2376         * WebProcess.pro:
2377
2378 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
2379
2380         Not reviewed.
2381         
2382         Try recommitting some things svn left out of my last commit.
2383
2384         * WebProcess/Plugins/Netscape/NPJSObject.h:
2385
2386 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
2387
2388         Not reviewed.
2389         
2390         Try recommitting some things svn left out of my last commit.
2391
2392         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2393         (WebKit::NPRuntimeObjectMap::evaluate):
2394
2395 2011-04-08  Alexey Proskuryakov  <ap@apple.com>
2396
2397         Reviewed by Darin Adler.
2398
2399         WebKit2: Safari doesn't respect cmd-arrows (and variations) as custom keyboard shortcuts
2400         https://bugs.webkit.org/show_bug.cgi?id=58175
2401         <rdar://problem/9060555>
2402
2403         The problem is that command handling should be different for events that come as keyDown:
2404         and those that come as performKeyEquivalent:. WebKit1 only tries custom "key bindings"
2405         when handling a keyDown:, letting a performKeyEquivalent: run through the whole responder
2406         chain first.
2407
2408         This would be very difficult to implement in WebKit2 because of how it re-sends the same
2409         event after web process handling. Luckily, we can both fix the bug and make the behavior
2410         more robust by not hardcoding key combinations.
2411
2412         * WebProcess/WebPage/WebPage.h: Edit performNonEditingBehaviorForSelector.
2413         * WebProcess/WebPage/mac/WebPageMac.mm:
2414         (WebKit::WebPage::executeKeypressCommandsInternal): When executing commands, also try
2415         executing editor commands in their non-editing meaning, which is usually scrolling.
2416         (WebKit::WebPage::performNonEditingBehaviorForSelector): Naive implementation with a chain
2417         of ifs, which is hopefully ok performance-wise for a dozen check.
2418         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Only kept two commands here that I
2419         couldn't easily move.
2420
2421 2011-04-08  Jessie Berlin  <jberlin@apple.com>
2422
2423         Reviewed by Anders Carlsson.
2424
2425         WebKit2: Show the substitutions panel on Mac and make sure the menu items titles are
2426         updated correctly.
2427         https://bugs.webkit.org/show_bug.cgi?id=58179
2428
2429         * UIProcess/API/mac/WKView.mm:
2430         (-[WKView validateUserInterfaceItem:]):
2431         The title of the context menu item should be opposite of whether or not the spelling panel
2432         is visible.
2433
2434         * UIProcess/WebPageProxy.cpp:
2435         (WebKit::WebPageProxy::contextMenuItemSelected):
2436         If the "Show/Hide" Substitutions item is selected, call toggleSubstitutionsPanelIsShowing.
2437         (WebKit::WebPageProxy::substitutionsPanelIsShowing):
2438         Ask the TextChecker.
2439         * UIProcess/WebPageProxy.h:
2440         * UIProcess/WebPageProxy.messages.in:
2441
2442         * UIProcess/TextChecker.h:
2443         * UIProcess/mac/TextCheckerMac.mm:
2444         (WebKit::TextChecker::substitutionsPanelIsShowing):
2445         As the shared NSSpellChecker if the substitutionsPanel is visible.
2446         (WebKit::TextChecker::toggleSubstitutionsPanelIsShowing):
2447         Order the substitutionsPanel out or front (copied from WKView.mm).
2448
2449         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2450         (WebKit::WebEditorClient::substitutionsPanelIsShowing):
2451         Send a sync message to the UI process to find out.
2452         It needs to be sync because the editor code relies on the value returned.
2453
2454 2011-04-08  Dan Bernstein  <mitz@apple.com>
2455
2456         Reviewed by Adele Peterson.
2457
2458         Fixed a bug where right-to-left frames incorrectly reported that they were pinned to the left
2459         when they were actually not.
2460
2461         * WebProcess/WebPage/WebPage.cpp:
2462         (WebKit::WebPage::didChangeScrollOffsetForMainFrame): Do not assume that the minimum scroll offset
2463         is zero, because it is not.
2464
2465 2011-04-08  Anders Carlsson  <andersca@apple.com>
2466
2467         Fix the Windows build.
2468
2469         * UIProcess/win/WebView.cpp:
2470         (WebKit::WebView::Drop):
2471
2472 2011-04-08  Jessie Berlin  <jberlin@apple.com>
2473
2474         Reviewed by Anders Carlsson.
2475
2476         WebKit2: Implement TextChecker on Windows
2477         https://bugs.webkit.org/show_bug.cgi?id=57862
2478
2479         Part 5: Implement the code show and hide the Spelling UI via the context menu item (both
2480         Windows and Mac).
2481
2482         * UIProcess/API/C/win/WKTextChecker.h:
2483         Add the new WKTextCheckerClient funtions.
2484
2485         * UIProcess/API/mac/WKView.mm:
2486         (-[WKView validateUserInterfaceItem:]):
2487         The title of the context menu item should be opposite of whether or not the spelling panel
2488         is visible.
2489
2490         * UIProcess/WebPageProxy.cpp:
2491         (WebKit::WebPageProxy::contextMenuItemSelected):
2492         If the "Show/Hide Spelling and Grammar" item is selected, call toggleSpellingUIIsShowing.
2493         (WebKit::WebPageProxy::spellingUIIsShowing):
2494         Call through to TextChecker.
2495         * UIProcess/WebPageProxy.h:
2496         * UIProcess/WebPageProxy.messages.in:
2497
2498         * UIProcess/TextChecker.h:
2499        * UIProcess/win/TextCheckerWin.cpp:
2500         (WebKit::TextChecker::spellingUIIsShowing):
2501         Call the TextCheckerClient.
2502         (WebKit::TextChecker::toggleSpellingUIIsShowing):
2503         Ditto.
2504         * UIProcess/mac/TextCheckerMac.mm:
2505         (WebKit::TextChecker::spellingUIIsShowing):
2506         Ask the shared NSSpellChecker if the spellingPanel is visible.
2507         (WebKit::TextChecker::toggleSpellingUIIsShowing):
2508         Order the spellingPanel out or front (copied from WKView.mm).
2509         * UIProcess/qt/TextCheckerQt.cpp:
2510         (WebKit::TextChecker::spellingUIIsShowing):
2511         Call notImplemented.
2512         (WebKit::TextChecker::toggleSpellingUIIsShowing):
2513         Ditto.
2514         * UIProcess/gtk/TextCheckerGtk.cpp:
2515         (WebKit::TextChecker::spellingUIIsShowing):
2516         Ditto.
2517         (WebKit::TextChecker::toggleSpellingUIIsShowing):
2518         Ditto.
2519  
2520         * UIProcess/win/WebTextCheckerClient.cpp:
2521         (WebKit::WebTextCheckerClient::spellingUIIsShowing):
2522         Call the client.
2523         (WebKit::WebTextCheckerClient::toggleSpellingUIIsShowing):
2524         Ditto.
2525         * UIProcess/win/WebTextCheckerClient.h:
2526
2527         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2528         (WebKit::WebEditorClient::spellingUIIsShowing):
2529         Send a sync message to the UI process to find out.
2530         It needs to be sync because the Editor code relies on the value returned.
2531
2532 2011-04-08  Anders Carlsson  <andersca@apple.com>
2533
2534         Reviewed by Dan Bernstein.
2535
2536         Sandboxing doesn't work if a local file is dropped on the content area
2537         https://bugs.webkit.org/show_bug.cgi?id=58177
2538         <rdar://problem/9019253>
2539
2540         When performing a drag and the dragging pasteboard contains a local file, create a
2541         sandbox extension and pass it along. If we end up loading the file, the sandbox extension
2542         tracker will consume the extension.
2543
2544         * UIProcess/API/mac/WKView.mm:
2545         (maybeCreateSandboxExtensionFromPasteboard):
2546         Add helper function.
2547
2548         (-[WKView performDragOperation:]):
2549         Create a sandbox extension handle and pass it to performDrag.
2550
2551         * UIProcess/WebPageProxy.cpp:
2552         (WebKit::WebPageProxy::dragEntered):
2553         (WebKit::WebPageProxy::dragUpdated):
2554         (WebKit::WebPageProxy::dragExited):
2555         Pass an empty sandbox extension handle to performDragControllerAction.
2556
2557         (WebKit::WebPageProxy::performDrag):
2558         Pass the sandbox extension handle along to performDragControllerAction.
2559
2560         (WebKit::WebPageProxy::performDragControllerAction):
2561         Send along the sandbox extension handle.
2562
2563         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2564         (WebKit::WebDragClient::willPerformDragDestinationAction):
2565         If the destination action is a load action, call WebPage::willPerformLoadDragDestinationAction.
2566
2567         * WebProcess/WebPage/WebPage.cpp:
2568         (WebKit::WebPage::performDragControllerAction):
2569         Create a sandbox extension.
2570
2571         (WebKit::WebPage::willPerformLoadDragDestinationAction):
2572         If we have a sandbox extension, pass it along to the sandbox extension tracker.
2573
2574         (WebKit::WebPage::SandboxExtensionTracker::willPerformLoadDragDestinationAction):
2575         Call setPendingProvisionalSandboxExtension.
2576
2577         (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
2578         Call setPendingProvisionalSandboxExtension.
2579
2580         (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
2581         Factor code from beginLoad out into a separate function.
2582
2583         * WebProcess/WebPage/WebPage.messages.in:
2584         PerformDragControllerAction now takes a sandbox extension handle.
2585
2586 2011-04-08  Alice Liu  <alice.liu@apple.com>
2587
2588         Reviewed by Adam Roben.
2589
2590         https://bugs.webkit.org/show_bug.cgi?id=58151
2591         Crash after closing a Webview, in WebKit!WebCore::WindowMessageBroadcaster::SubclassedWndProc
2592
2593         * UIProcess/win/WebView.cpp:
2594         (WebKit::WebView::close):
2595         Resolve a difference between old WebKit WebView and WebKit2 WebView by destroying and clearing
2596         out WebKit2 WebView's HWND when closing. Not doing so was causing the WebView to remain in the
2597         list of WindowMessageBroadcaster listeners, and after closing the WebView, WindowMessageBroadcaster
2598         would message a dead WebView and crash.
2599
2600 2011-04-08  Anders Carlsson  <andersca@apple.com>
2601
2602         Reviewed by Adam Roben.
2603
2604         Make the drag operations be different functions
2605         https://bugs.webkit.org/show_bug.cgi?id=58169
2606
2607         Since we want performDrag to take a sandbox extension, separate the four
2608         drag operations out into different functions. No functionality change.
2609
2610         * UIProcess/API/mac/WKView.mm:
2611         (-[WKView draggingEntered:]):
2612         (-[WKView draggingUpdated:]):
2613         (-[WKView draggingExited:]):
2614         (-[WKView performDragOperation:]):
2615         * UIProcess/WebPageProxy.cpp:
2616         (WebKit::WebPageProxy::dragEntered):
2617         (WebKit::WebPageProxy::dragUpdated):
2618         (WebKit::WebPageProxy::dragExited):
2619         (WebKit::WebPageProxy::performDrag):
2620         * UIProcess/WebPageProxy.h:
2621         * UIProcess/win/WebView.cpp:
2622         (WebKit::WebView::DragEnter):
2623         (WebKit::WebView::DragOver):
2624         (WebKit::WebView::DragLeave):
2625         (WebKit::WebView::Drop):
2626
2627 2011-04-08  Anders Carlsson  <andersca@apple.com>
2628
2629         Reviewed by Adam Roben.
2630
2631         Parse 'DispatchOnConnectionQueue' in messages.in files
2632         https://bugs.webkit.org/show_bug.cgi?id=58168
2633
2634         Handle parsing multiple, space-separated attributes in .messages.in files. Keep track of
2635         'DispatchOnConnectionQueue' and rename 'delayed' to 'Delayed'.
2636
2637         * Scripts/webkit2/messages.py:
2638         * Scripts/webkit2/messages_unittest.py:
2639
2640 2011-04-08  Alpha Lam  <hclam@chromium.org>
2641
2642         Unreviewed, rolling out r83335.
2643         http://trac.webkit.org/changeset/83335
2644         https://bugs.webkit.org/show_bug.cgi?id=53556
2645
2646         GTK and QT bots are broken
2647
2648         * Configurations/FeatureDefines.xcconfig:
2649
2650 2011-04-07  Anna Cavender  <annacc@chromium.org>
2651
2652         Reviewed by Eric Carlson.
2653
2654         Setup ENABLE(TRACK) feature define
2655         https://bugs.webkit.org/show_bug.cgi?id=53556
2656
2657         * Configurations/FeatureDefines.xcconfig:
2658
2659 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
2660
2661         Reviewed by Darin Alder.
2662
2663         REGRESSION (WebKit2): AppKit thinks that web views don't support DocumentAccess
2664         https://bugs.webkit.org/show_bug.cgi?id=58102
2665         <rdar://problem/9223246>
2666
2667         * UIProcess/API/mac/WKView.h:
2668         * UIProcess/API/mac/WKView.mm:
2669         (-[WKView doCommandBySelector:]):
2670         (-[WKView insertText:replacementRange:]):
2671         (-[WKView validAttributesForMarkedText]):
2672         (-[WKView setMarkedText:selectedRange:replacementRange:]):
2673         (-[WKView attributedSubstringForProposedRange:actualRange:]):
2674         (-[WKView firstRectForCharacterRange:actualRange:]):
2675         Switch to NSTextInputClient, opting out of optimizations and optional features for now.
2676
2677 2011-04-08  Siddharth Mathur  <siddharth.mathur@nokia.com>
2678
2679         Reviewed by Martin Robinson.
2680
2681         [Qt][WK2][Symbian] Remove use of stack arrays with variable size
2682         https://bugs.webkit.org/show_bug.cgi?id=57877
2683
2684         For better compiler portability, use new/delete for arrays when size
2685         isn't known at compile time. Also fix one compiler warning about bitshift
2686         operations on signed integer
2687         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2688         (CoreIPC::Connection::readyReadHandler):
2689         (CoreIPC::Connection::sendOutgoingMessage):
2690
2691 2011-04-08  Martin Robinson  <mrobinson@igalia.com>
2692
2693         Reviewed by Xan Lopez.
2694
2695         [GTK] Fix the WebKit2 build for older versions of GTK+
2696         https://bugs.webkit.org/show_bug.cgi?id=58095
2697
2698         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Include the GtkVersioning.h header.
2699
2700 2011-04-07  Balazs Kelemen  <kbalazs@webkit.org>
2701
2702         Reviewed by Kenneth Rohde Christiansen.
2703
2704         [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
2705         https://bugs.webkit.org/show_bug.cgi?id=58030
2706
2707         Replace "PLATFORM(QT) || PLATFORM(GTK)" conditions in IPC code with
2708         USE(UNIX_DOMAIN_SOCKETS).
2709
2710         * Platform/CoreIPC/Attachment.h:
2711         * Platform/CoreIPC/Connection.h:
2712         * Platform/SharedMemory.h:
2713
2714 2011-04-07  Anders Carlsson  <andersca@apple.com>
2715
2716         Reviewed by Simon Fraser.
2717
2718         Clicks not recognized on http://www.nibblestutorials.net/ which uses Silverlight
2719         https://bugs.webkit.org/show_bug.cgi?id=58108
2720         <rdar://problem/9167611>
2721
2722         Change platformHandleMouseEvent to return true, which means that the plug-in has handled the
2723         event. Some plug-ins (like Silverlight) will return false from NPP_HandleEvent even though the
2724         event has been handled. In this case it lead to a very subtle bug where the plug-in element would
2725         lose focus right after a mouse down even had been sent.
2726
2727         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2728         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2729
2730 2011-04-07  Adam Roben  <aroben@apple.com>
2731
2732         Pass NPP_SetWindow a null window handle during plugin destruction on non-Mac platforms
2733
2734         This matches WebKit1.
2735
2736         Fixes <http://webkit.org/b/47009> WebKit2 needs to call NPP_SetWindow when destroying a
2737         plugin
2738
2739         Reviewed by Anders Carlsson.
2740
2741         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2742         (WebKit::NetscapePlugin::destroy): Null out our NPWindow's window handle and pass it to
2743         NPP_SetWindow (unless we're on Mac).
2744
2745 2011-04-08  Jamie Cooley  <james.cooley@nokia.com>
2746
2747         Reviewed by Benjamin Poulain.
2748
2749         [Qt][WK2] Make sure qwkhistory.h is copied into includes/WebKit2
2750         https://bugs.webkit.org/show_bug.cgi?id=57945
2751
2752         * UIProcess/API/qt/WKView.h:
2753         * UIProcess/API/qt/qwkhistory.h:
2754
2755 2011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2756
2757         Reviewed by Martin Robinson.
2758
2759         [GTK] Do not destroy WorkQueue event sources unless they have been cancelled
2760         https://bugs.webkit.org/show_bug.cgi?id=57611
2761
2762         * Platform/WorkQueue.h:
2763         * Platform/gtk/WorkQueueGtk.cpp:
2764         (WorkQueue::EventSource::EventSource): Remove unused member
2765         m_dispatchSource.
2766         (WorkQueue::EventSource::executeEventSource): Make it return void
2767         instead of boolean since we are always ignoring the return value.
2768         (WorkQueue::EventSource::performWork): Return FALSE from the
2769         callback only when the source has been cancelled (condition = 0)
2770         to make sure it's destroyed when the even source handler is
2771         unregistered.
2772         (WorkQueue::registerEventSourceHandler): Use GRefPtr for the
2773         source, to avoid leaking it.
2774         (WorkQueue::scheduleWorkOnSource): Receive the source callback as
2775         parameter so that it can be used by scheduleWorkOnTermination() too.
2776         (WorkQueue::scheduleWork):
2777         (WorkQueue::scheduleWorkAfterDelay):
2778         (WorkQueue::scheduleWorkOnTermination): Use
2779         scheduleWorkOnSource().
2780
2781 2011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2782
2783         Reviewed by Martin Robinson.
2784
2785         [GTK] Close connection when web process finishes
2786         https://bugs.webkit.org/show_bug.cgi?id=57540
2787
2788         * Platform/CoreIPC/Connection.h:
2789         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2790         * Platform/PlatformProcessIdentifier.h: Use GPid as process
2791         identifier.
2792         * Platform/WorkQueue.h:
2793         * Platform/gtk/WorkQueueGtk.cpp:
2794         (WorkQueue::EventSource::EventSource): Add cancellable parameter.
2795         (WorkQueue::EventSource::cancel): New method to cancel the source.
2796         (WorkQueue::EventSource::performWorkOnTermination): New method to
2797         execute a work item called when child process has finished.
2798         (WorkQueue::registerEventSourceHandler): Create a GCancellable for
2799         the socket source.
2800         (WorkQueue::unregisterEventSourceHandler): Cancel the source
2801         instead of destroying it, this will cause the source to trigger
2802         with condition = 0, which makes the callback return FALSE and the
2803         source is destroyed.
2804         (WorkQueue::scheduleWorkOnSource): Pass NULL as cancellable for
2805         idle and timeout sources.
2806         (WorkQueue::scheduleWorkOnTermination): Create a child watch
2807         source to monitor the child process.
2808         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2809         (WebKit::ProcessLauncher::launchProcess): Use GPid instead of int
2810         as process identifier.
2811         * UIProcess/WebProcessProxy.cpp:
2812         (WebKit::WebProcessProxy::didFinishLaunching): Call
2813         WorkQueue::scheduleWorkOnTermination() for GTK platform too when
2814         web process has been launched.
2815
2816 2011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2817
2818         Reviewed by Martin Robinson.
2819
2820         [GTK] Implement scheduleWorkAfterDelay() in WorkQueueGtk
2821         https://bugs.webkit.org/show_bug.cgi?id=57434
2822
2823         * Platform/WorkQueue.h:
2824         * Platform/gtk/WorkQueueGtk.cpp:
2825         (WorkQueue::EventSource::executeEventSource): This new method
2826         contains the common code to execute a work item.
2827         (WorkQueue::EventSource::performWorkOnce): Use
2828         executeEventSource() to execute the work item.
2829         (WorkQueue::EventSource::performWork): Use executeEventSource() to
2830         execute the work item.
2831         (WorkQueue::registerEventSourceHandler): Use a GSocket instead of
2832         a GIOChannel since the API is newer and allows us to pass a
2833         cancellable object to be able to cancel the source.
2834         (WorkQueue::scheduleWorkOnSource): This new method contains the
2835         common code to attach a source to a context. It doesn't use a lock
2836         anymore, since g_source_attach() uses its own mutex internally.
2837         (WorkQueue::scheduleWork): Use an idle source instead of a timeout
2838         one, changing the priority to G_PRIORITY_DEFAULT.
2839         (WorkQueue::scheduleWorkAfterDelay): Implement it using a timeout
2840         source with the given delay.
2841
2842 2011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2843
2844         Reviewed by Martin Robinson.
2845
2846         [GTK] Use glib API instead of fork + execl in ProcessLauncherGtk
2847         https://bugs.webkit.org/show_bug.cgi?id=57234
2848
2849         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2850         (WebKit::childSetupFunction): close the socket and use prctl()
2851         when platform is Linux to kill the child process when the parent
2852         finishes.
2853         (WebKit::ProcessLauncher::launchProcess): Use g_spawn_async() to
2854         launch the web process.
2855
2856 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
2857
2858         Some Handle<T> cleanup
2859         https://bugs.webkit.org/show_bug.cgi?id=58109
2860
2861         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2862         (WebKit::NPJSObject::NPJSObject): Updated for new null constructor.
2863
2864 2011-04-07  Jessie Berlin  <jberlin@apple.com>
2865
2866         Max build fix.
2867
2868         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2869         (WebKit::WebEditorClient::checkSpellingOfString):
2870         Do not risk an overflow.
2871         (WebKit::WebEditorClient::checkGrammarOfString):
2872         Ditto.
2873
2874 2011-04-07  Jessie Berlin  <jberlin@apple.com>
2875
2876         Reviewed by Brian Weinstein.
2877
2878         WebKit2: Implement TextChecker on Windows
2879         https://bugs.webkit.org/show_bug.cgi?id=57862
2880
2881         Part 4: Implement checkGrammarOfString.
2882
2883         * Scripts/webkit2/messages.py:
2884         The generated files should include TextCheckerClient.h for WebCore::GrammarDetail.
2885
2886         * Shared/API/c/win/WKBaseWin.h:
2887         * Shared/APIObject.h:
2888         * UIProcess/API/C/win/WKAPICastWin.h:
2889
2890         * UIProcess/API/C/win/WKGrammarDetail.cpp: Added.
2891         (WKGrammarDetailGetTypeID):
2892         (WKGrammarDetailCreate):
2893         * UIProcess/API/C/win/WKGrammarDetail.h: Added.
2894
2895         * UIProcess/API/C/win/WKTextChecker.h:
2896         Add the checkGrammarOfString WKTextCheckerClient function.
2897
2898         * UIProcess/WebPageProxy.cpp:
2899         (WebKit::WebPageProxy::checkGrammarOfString):
2900         * UIProcess/WebPageProxy.h:
2901         * UIProcess/WebPageProxy.messages.in:
2902
2903         * UIProcess/TextChecker.h:
2904         * UIProcess/win/TextCheckerWin.cpp:
2905         (WebKit::TextChecker::checkGrammarOfString):
2906         Call the TextCheckerClient.
2907         * UIProcess/mac/TextCheckerMac.mm:
2908         (WebKit::TextChecker::checkSpellingOfString):
2909         Add a comment about this not being used on Mac.
2910         (WebKit::TextChecker::checkGrammarOfString):
2911         Ditto, and call notImplemented.
2912         * UIProcess/gtk/TextCheckerGtk.cpp:
2913         (WebKit::TextChecker::checkGrammarOfString):
2914         Call notImplemented.
2915         * UIProcess/qt/TextCheckerQt.cpp:
2916         (WebKit::TextChecker::checkGrammarOfString):
2917         Ditto.
2918
2919         * UIProcess/win/WebGrammarDetail.cpp: Added.
2920         (WebKit::WebGrammarDetail::create):
2921         (WebKit::WebGrammarDetail::WebGrammarDetail):
2922         Initialize the underlying WebCore::GrammarDetail.
2923         * UIProcess/win/WebGrammarDetail.h: Added.
2924         (WebKit::WebGrammarDetail::grammarDetail):
2925         (WebKit::WebGrammarDetail::type):
2926
2927         * UIProcess/win/WebTextCheckerClient.cpp:
2928         (WebKit::WebTextCheckerClient::checkGrammarOfString):
2929         Populate the Vector of WebCore::GrammarDetails with the WebGrammarDetails.
2930         * UIProcess/win/WebTextCheckerClient.h:
2931
2932         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2933         (WebKit::WebEditorClient::checkSpellingOfString):
2934         Use WTF::notFound as the initial value for resultLocation.
2935         (WebKit::WebEditorClient::checkGrammarOfString):
2936         Send a sync message to the UI Process (similar to checkSpellingOfString and checkTextOfParagraph).
2937
2938         * win/WebKit2.vcproj:
2939         Add WKGrammarDetail.h/.cpp and WebGrammarDetail.h/.cpp.
2940         * win/WebKit2Generated.make:
2941         Copy over WKGrammarDetail.h.
2942
2943 2011-04-07  Enrica Casucci  <enrica@apple.com>
2944
2945         Reviewed by Oliver Hunt.
2946
2947         REGRESSION(WebKit2): execCommand('undo') doesn't work (Windows).
2948         https://bugs.webkit.org/show_bug.cgi?id=58056
2949         <rdar://problem/8862023>
2950         
2951         Adding support for execCommand('undo') and execCommand('redo')
2952         in WebKit2 for Windows.
2953
2954         * UIProcess/API/C/win/WKView.h:
2955         * UIProcess/win/WebUndoClient.cpp:
2956         (WebKit::WebUndoClient::canUndoRedo):
2957         (WebKit::WebUndoClient::executeUndoRedo):
2958         * UIProcess/win/WebUndoClient.h:
2959         * UIProcess/win/WebView.cpp:
2960         (WebKit::WebView::canUndoRedo):
2961         (WebKit::WebView::executeUndoRedo):
2962
2963 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
2964
2965         Revert ENABLE_TRACK patch due to compile failures.
2966
2967         * Configurations/FeatureDefines.xcconfig:
2968
2969 2011-04-07  Martin Robinson  <mrobinson@igalia.com>
2970
2971         Fix the WebKit2 GTK+ build for older versions of GTK+.
2972
2973         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Include the GtkVersioning.h header.
2974
2975 2011-04-07   Amruth Raj  <amruthraj@motorola.com> and Martin Robinson  <mrobinson@igalia.com>
2976
2977         Reviewed by Kenneth Rohde Christiansen.
2978
2979         [GTK] Implement SharedMemory for WebKit2
2980         https://bugs.webkit.org/show_bug.cgi?id=49791
2981
2982         Share the SharedMemory, Attachment and Connection implementations with the Qt port.
2983         Both implementation are, in fact, general Unix implementations using standard Unix
2984         domain sockets and sendmsg / recvmsg. This should reduce the amount of duplicated code
2985         greatly and lay the groundwork for GTK+/Qt implementations for other operating systems.
2986
2987         * GNUmakefile.am: Replaced GTK+ versions of files with the Unix ones.
2988         * Platform/CoreIPC/ArgumentDecoder.cpp: Extended Qt #ifdefs to include GTK.
2989         (CoreIPC::ArgumentDecoder::~ArgumentDecoder):
2990         * Platform/CoreIPC/ArgumentEncoder.cpp: Ditto.
2991         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
2992         * Platform/CoreIPC/Attachment.h: Ditto.
2993         * Platform/CoreIPC/Connection.h: Combined the GTK+ and Qt sections.
2994         * Platform/CoreIPC/unix/AttachmentUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/qt/AttachmentQt.cpp.
2995         * Platform/CoreIPC/unix/ConnectionUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp.
2996         * Platform/unix/SharedMemoryUnix.cpp: Renamed from Source/WebKit2/Platform/qt/SharedMemoryQt.cpp.
2997         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2998         (WebKit::ProcessLauncher::launchProcess): Use SOCK_DGRAM instead of SOCK_STREAM to match Qt.
2999         * WebKit2.pro: Updated source list to reflect file renaming.
3000
3001 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
3002
3003         Reviewed by Brian Weinstein.
3004
3005         REGRESSION (r83081): Use of deallocated memory in WebEditorClient::respondToChangedSelection()
3006         https://bugs.webkit.org/show_bug.cgi?id=58082
3007
3008         * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection):
3009         Now that the Range is used outside the full expression where it's created, it needs to be
3010         protected with RefPtr.
3011
3012 2011-04-07  Mark Rowe  <mrowe@apple.com>
3013
3014         Reviewed by Dan Bernstein.
3015
3016         <rdar://problem/9251566> WebBackForwardList::createCFDictionaryRepresentation's current item index
3017         doesn't account for items removed by filter callback.
3018
3019         * UIProcess/cf/WebBackForwardListCF.cpp:
3020         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Update the current item index
3021         when we omit an item due to the filter callback.
3022
3023 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
3024
3025         Reviewed by Anders Carlsson.
3026
3027         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
3028         https://bugs.webkit.org/show_bug.cgi?id=58066
3029         <rdar://problem/8965302>
3030
3031         * Scripts/webkit2/messages.py:
3032         * Shared/mac/AttributedString.h: Added.
3033         * Shared/mac/AttributedString.mm: Added.
3034         (WebKit::AttributedString::encode):
3035         (WebKit::AttributedString::decode):
3036         Added an class that wraps NSAttributedString. As far as I can tell, one can't pass a CF
3037         or NS object to another process without wrapping it in a C++ one.
3038         
3039         * Shared/mac/ArgumentCodersMac.h: Added.
3040         * Shared/mac/ArgumentCodersMac.mm: Added.
3041         Added coders for Foundation objects, similar to ArgumentCodersCF. There are two reasons why
3042         these are needed:
3043         1) Even though most Foundation objects are toll free bridged with CF, CFGetTypeID() doesn't
3044         work properly for them (I've been just getting 1).
3045         2) NSColor isn't toll free bridged to CF.
3046         This adds just the types necessary for editing NSAttributedString (and I don't yet know what
3047         happens with attachments).
3048
3049         * UIProcess/API/mac/WKView.mm: (-[WKView attributedSubstringFromRange:]):
3050         * UIProcess/WebPageProxy.h:
3051         * UIProcess/mac/WebPageProxyMac.mm:
3052         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
3053         * WebKit2.xcodeproj/project.pbxproj:
3054         * WebProcess/WebPage/WebPage.h:
3055         * WebProcess/WebPage/WebPage.messages.in:
3056         Boilerplate code for making a sync call to web process.
3057
3058         * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getAttributedSubstringFromRange):
3059         Ported from WebHTMLView.
3060
3061 2011-04-07  Jeff Miller  <jeffm@apple.com>
3062
3063         Mac build fix.
3064
3065         * Shared/WebString.h:
3066         (WebKit::WebString::getCharacters): Add explict cast when using std::min().
3067
3068 2011-04-07  Jeff Miller  <jeffm@apple.com>
3069
3070         Reviewed by Adam Roben.
3071
3072         Replace WKStringGetCharactersPtr() with WKStringGetCharacters()
3073         https://bugs.webkit.org/show_bug.cgi?id=58058
3074         
3075         WKStringGetCharactersPtr() exposes the internal implementation of WKString, so change this to WKStringGetCharacters(), which makes a UTF-16 copy.
3076
3077         * Shared/API/c/WKString.cpp:
3078         (WKStringGetCharacters): Added, replaces WKStringGetCharactersPtr().
3079         * Shared/API/c/WKString.h: Replaced WKStringGetCharactersPtr() with WKStringGetCharacters().
3080         * Shared/WebString.h:
3081         (WebKit::WebString::getCharacters): Added.
3082
3083 2011-04-07  Brian Weinstein  <bweinstein@apple.com>
3084
3085         Reviewed by Adam Roben.
3086
3087         WebKit2: Support window bounce when panning.
3088         https://bugs.webkit.org/show_bug.cgi?id=58065
3089         <rdar://problem/9244367>
3090         
3091         Make gestureDidScroll synchronous, as once we scroll, we need to know
3092         whether or not we are at the beginning or end of the scrollable document.
3093         
3094         If we are at either end of the scrollable document, we call the Windows 7
3095         API to bounce the window to give an indication that you are past an end
3096         of the document.
3097
3098         * UIProcess/WebPageProxy.cpp:
3099         (WebKit::WebPageProxy::gestureDidScroll): Pass a boolean for the reply, and return it.
3100         * UIProcess/WebPageProxy.h:
3101         * UIProcess/win/WebView.cpp:
3102         (WebKit::WebView::WebView): Inititalize a new variable.
3103         (WebKit::WebView::onGesture): Once we send the message to scroll, check if have gone to
3104             an end of the document, and if we have, bounce the window.
3105         * UIProcess/win/WebView.h:
3106         * WebProcess/WebPage/WebPage.h:
3107         * WebProcess/WebPage/WebPage.messages.in: GestureDidScroll is now sync.
3108         * WebProcess/WebPage/win/WebPageWin.cpp:
3109         (WebKit::WebPage::gestureDidScroll): When we are done scrolling, check if we have a vertical
3110             scrollbar and if we are at the beginning or the end of the scrollable document.
3111
3112 2011-04-07  Chang Shu  <cshu@webkit.org>
3113
3114         Reviewed by Darin Adler.
3115
3116         WebKitTestRunner needs layoutTestController.isPageBoxVisible
3117         https://bugs.webkit.org/show_bug.cgi?id=42695
3118
3119         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3120         (WKBundleIsPageBoxVisible):
3121         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3122         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3123         (WebKit::InjectedBundle::isPageBoxVisible):
3124         * WebProcess/InjectedBundle/InjectedBundle.h:
3125
3126 2011-04-07  Enrica Casucci  <enrica@apple.com>
3127
3128         Reviewed by Oliver Hunt.
3129
3130         REGRESSION(WebKit2): execCommand('undo') doesn't work (Mac).
3131         https://bugs.webkit.org/show_bug.cgi?id=58055
3132         <rdar://problem/8862023>
3133         
3134         Adding support for execCommand('undo') and execCommand('redo')
3135         in WebKit2 for Mac.
3136
3137         * UIProcess/API/mac/PageClientImpl.h:
3138         * UIProcess/API/mac/PageClientImpl.mm:
3139         (WebKit::PageClientImpl::canUndoRedo): Added interaction with undomanager.
3140         (WebKit::PageClientImpl::executeUndoRedo): Added interaction with undomanager.
3141         
3142         Added new empty PageClient methods for other platforms.
3143         * UIProcess/API/qt/qwkpage.cpp:
3144         (QWKPagePrivate::canUndoRedo):
3145         (QWKPagePrivate::executeUndoRedo):
3146         * UIProcess/API/qt/qwkpage_p.h:
3147         * UIProcess/PageClient.h:
3148         * UIProcess/gtk/WebView.cpp:
3149         (WebKit::WebView::canUndoRedo):
3150         (WebKit::WebView::executeUndoRedo):
3151         * UIProcess/gtk/WebView.h:
3152         * UIProcess/win/WebView.cpp:
3153         (WebKit::WebView::canUndoRedo):
3154         (WebKit::WebView::executeUndoRedo):
3155         * UIProcess/win/WebView.h:
3156
3157         * UIProcess/WebEditCommandProxy.cpp:
3158         (WebKit::WebEditCommandProxy::unapply): Added flag to allow dispatching
3159         of asychronous messages while waiting for a sync message reply.
3160         (WebKit::WebEditCommandProxy::reapply): Same as above.
3161         * UIProcess/WebPageProxy.cpp:
3162         (WebKit::WebPageProxy::canUndoRedo):
3163         (WebKit::WebPageProxy::executeUndoRedo):
3164         * UIProcess/WebPageProxy.h:
3165         * UIProcess/WebPageProxy.messages.in:
3166         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Added missing implementation.
3167         (WebKit::WebEditorClient::canUndo):
3168         (WebKit::WebEditorClient::canRedo):
3169         (WebKit::WebEditorClient::undo):
3170         (WebKit::WebEditorClient::redo):
3171
3172 2011-04-07  Brady Eidson  <beidson@apple.com>
3173
3174         Reviewed by Maciej Stachowiak.
3175
3176         <rdar://problem/9250368> and https://bugs.webkit.org/show_bug.cgi?id=58062
3177
3178         * UIProcess/API/C/WKIconDatabase.cpp:
3179         (WKIconDatabaseClose):
3180         * UIProcess/API/C/WKIconDatabase.h:
3181         
3182         * UIProcess/WebIconDatabase.cpp:
3183         (WebKit::WebIconDatabase::close):
3184         * UIProcess/WebIconDatabase.h:
3185
3186 2011-04-07  Jessie Berlin  <jberlin@apple.com>
3187
3188         Reviewed by Adam Roben.
3189
3190         WebKit2: Implement TextChecker on Windows
3191         https://bugs.webkit.org/show_bug.cgi?id=57862
3192  
3193         Part 3: Implement checkSpellingOfString
3194
3195         In WebCore, checkTextOfParagraph is only defined and used on platforms where
3196         WTF_USE_UNIFIED_TEXT_CHECKING is defined (which right now is only non-Leopard and non-Tiger
3197         Mac builds).
3198  
3199         On other platforms, checkSpellingOfString and checkGrammarOfString (coming in a separate
3200         patch in an attempt to keep things easier to review) are used.
3201
3202         * UIProcess/API/C/win/WKTextChecker.h:
3203         * UIProcess/TextChecker.h:
3204         Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
3205         checkSpellingOfString.
3206
3207         * UIProcess/WebPageProxy.cpp:
3208         (WebKit::WebPageProxy::checkTextOfParagraph):
3209         Surround this by #if USE(UNIFIED_TEXT_CHECKING).
3210         (WebKit::WebPageProxy::checkSpellingOfString):
3211         Call through to the client.
3212         * UIProcess/WebPageProxy.h:
3213         * UIProcess/WebPageProxy.messages.in:
3214         Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
3215         checkSpellingOfString.
3216
3217         * UIProcess/win/TextCheckerWin.cpp:
3218         (WebKit::TextChecker::checkSpellingOfString):
3219         Call through to the WebTextCheckerClient.
3220         * UIProcess/mac/TextCheckerMac.mm:
3221         (WebKit::TextChecker::checkTextOfParagraph):
3222         Surround this by #if USE(UNIFIED_TEXT_CHECKING) for clarity.
3223         (WebKit::TextChecker::checkSpellingOfString):
3224         Add a call to notImplemented.
3225         * UIProcess/qt/TextCheckerQt.cpp:
3226         (WebKit::TextChecker::checkSpellingOfString):
3227         Ditto, and remove the implementation for checkTextOfParagraph.
3228         * UIProcess/gtk/TextCheckerGtk.cpp:
3229         (WebKit::TextChecker::checkSpellingOfString):
3230         Ditto.
3231
3232         * UIProcess/win/WebTextCheckerClient.cpp:
3233         (WebKit::WebTextCheckerClient::checkSpellingOfString):
3234         * UIProcess/win/WebTextCheckerClient.h:
3235
3236         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3237         (WebKit::WebEditorClient::checkSpellingOfString):
3238         Send a sync message to the UI Process (similar to the sync message used for
3239         checkTextOfParagraph).
3240
3241 2011-04-07  Siddharth Mathur  <siddharth.mathur@nokia.com>
3242
3243         Reviewed by Laszlo Gombos.
3244
3245         [Qt][WK2][Symbian] Temporary build fix until native Symbian IPC is done. Implement fake socketpair() as it's not available. 
3246         https://bugs.webkit.org/show_bug.cgi?id=57877
3247
3248         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3249         (WebKit::socketpair): socketpair() which returns -1
3250
3251 2011-04-07  Michael Saboff  <msaboff@apple.com>
3252
3253         Reviewed by Maciej Stachowiak.
3254
3255         WebKit2: Memory leak in decodeResourceError
3256         https://bugs.webkit.org/show_bug.cgi?id=58004
3257
3258         Release the local NSError after it is used to create a ResourceError
3259         object assigned to the reference argument.
3260
3261         * Shared/mac/WebCoreArgumentCodersMac.mm:
3262         (CoreIPC::decodeResourceError):
3263
3264 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
3265
3266         Reviewed by Adam Barth.
3267
3268         Remove temporary WebProcess sandbox rules that are unnecessary now that plugins are in their own process
3269         https://bugs.webkit.org/show_bug.cgi?id=58023
3270
3271         * WebProcess/com.apple.WebProcess.sb:
3272
3273 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
3274
3275         Reviewed by Dan Bernstein.
3276
3277         Remove some no longer needed WebProcess sandbox allowances
3278         https://bugs.webkit.org/show_bug.cgi?id=58015
3279         <rdar://problem/9232592>
3280
3281         * WebProcess/com.apple.WebProcess.sb: Remove no-longer needed extra network
3282         and launching privileges, since the bugs that required them are fixed.
3283
3284 2011-04-06  Chang Shu  <cshu@webkit.org>
3285
3286         Reviewed by Darin Adler.
3287
3288         WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
3289         https://bugs.webkit.org/show_bug.cgi?id=57984
3290
3291         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3292         (WKBundlePageSizeAndMarginsInPixels):
3293         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3294         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3295         (WebKit::InjectedBundle::pageSizeAndMarginsInPixels):
3296         * WebProcess/InjectedBundle/InjectedBundle.h:
3297
3298 2011-04-06  Siddharth Mathur  <siddharth.mathur@nokia.com>
3299
3300         Reviewed by Benjamin Poulain.
3301
3302         [Qt][WK2][Symbian] Remove use of stack arrays with variable size
3303         https://bugs.webkit.org/show_bug.cgi?id=57877
3304         
3305         For better compiler portability, use new/delete for arrays when size
3306         isn't known at compile time. Also fix one compiler warning about bitshift
3307         operations on signed integers. 
3308         * Platform/CoreIPC/qt/ConnectionQt.cpp: 
3309         (CoreIPC::Connection::readyReadHandler): 
3310         (CoreIPC::Connection::sendOutgoingMessage):
3311
3312 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
3313
3314         Reviewed by Adam Roben.
3315
3316         WebKit2: Support Windows 7 Gestures
3317         https://bugs.webkit.org/show_bug.cgi?id=49824
3318         <rdar://problem/8689728>
3319         
3320         Port code from WebKit1 -> WebKit2 to handle Windows 7 gestures.
3321         
3322         The UIProcess gets a WM_GESTURENOTIFY message, it sends a sync message to the WebProcess to ask
3323         if we should allow panning. The WebProcess checks if we're in a scrollable area, and the mouse
3324         isn't over a scrollbar.
3325
3326         The UIProcess then gets a WM_GESTURE message, and if it is a pan gesture, it sends a message to
3327         the WebProcess to scroll by the amount fingers have moved since the last WM_GESTURE messeage. The
3328         X and Y are reversed because panning up -> moving the page down, and vice versa.
3329
3330         * UIProcess/WebPageProxy.cpp:
3331         (WebKit::WebPageProxy::gestureWillBegin): Send a sync message to the WebProcess
3332             to initialize the gesture. The WebProcess returns whether or not we can start a pan
3333             gesture from where we are.
3334         (WebKit::WebPageProxy::gestureDidScroll): Send a message to the WebProcess to scroll by
3335             pan gesture.
3336         (WebKit::WebPageProxy::gestureDidEnd): Send a message to the WebProcess that the gesture has ended.
3337         * UIProcess/WebPageProxy.h:
3338         * UIProcess/win/WebView.cpp:
3339         (WebKit::WebView::wndProc): Add WM_GESTURE and WM_GESTURENOTIFY handlers.
3340         (WebKit::WebView::WebView): Initialize two new variables.
3341         (WebKit::WebView::onGestureNotify): Figure out which gestures we should support based on where
3342             the gesture is beginning.
3343         (WebKit::WebView::onGesture): Support starting a gesture, ending a gesture, and panning.
3344         * UIProcess/win/WebView.h:
3345         * WebProcess/WebPage/WebPage.h:
3346         * WebProcess/WebPage/WebPage.messages.in: Add messages needed for gestures.
3347         * WebProcess/WebPage/win/WebPageWin.cpp:
3348         (WebKit::WebPage::gestureWillBegin): Set the node that the gesture started on (so we 
3349             know which layer to scroll if the user pans), and determine whether or not we should allow
3350             panning. If the page can't scroll, or the user is on a scrollbar, disallow panning.
3351         (WebKit::WebPage::gestureDidScroll): Scroll the enclosing layer of the element the gesture
3352             started on.
3353         (WebKit::WebPage::gestureDidEnd): Clear the node the gesture started on.
3354
3355 2011-04-06  Jeff Miller  <jeffm@apple.com>
3356
3357         Reviewed by Adam Roben.
3358
3359         Add WKStringGetCharactersPtr() and WKStringGetLength() to WebKit2 C API
3360         https://bugs.webkit.org/show_bug.cgi?id=57989
3361         
3362         Note that WKChar, which is returned by WKStringGetCharactersPtr(), is defined the same way we define JSChar in JSStringRef.h.
3363
3364         * Shared/API/c/WKString.cpp:
3365         (WKStringGetLength): Added.
3366         (WKStringGetCharactersPtr): Added.
3367         * Shared/API/c/WKString.h: Define WKChar and added WKStringGetLength() and WKStringGetCharactersPtr().
3368         * Shared/WebString.h:
3369         (WebKit::WebString::length): Added.
3370         (WebKit::WebString::characters): Added.
3371
3372 2011-04-06  Anders Carlsson  <andersca@apple.com>
3373
3374         Reviewed by Oliver Hunt.
3375
3376         Dock stays in front of Hulu.com full screen video output
3377         https://bugs.webkit.org/show_bug.cgi?id=57988
3378         <rdar://problem/9216260>
3379
3380         Instead of using -[NSMenu setMenuBarVisible:] to toggle full screen, use
3381         -[NSApp setPresentationOptions:]. Also, make the UI process the front most app before
3382         setting the presentation options when exiting full screen, otherwise the dock won't
3383         be restored correctly.
3384
3385         * PluginProcess/mac/PluginProcessShim.mm:
3386         Remove some shim functions that aren't needed.
3387
3388         * UIProcess/Plugins/PluginProcessProxy.cpp:
3389         (WebKit::PluginProcessProxy::PluginProcessProxy):
3390         Initialize m_preFullscreenAppPresentationOptions.
3391
3392         * UIProcess/Plugins/PluginProcessProxy.h:
3393         Add m_preFullscreenAppPresentationOptions.
3394
3395         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3396         (WebKit::PluginProcessProxy::enterFullscreen):
3397         Change the presentation options for the app.
3398
3399         (WebKit::PluginProcessProxy::exitFullscreen):
3400         Restore the presentation options.
3401
3402 2011-04-06  Mark Rowe  <mrowe@apple.com>
3403
3404         Reviewed by Darin Adler.
3405
3406         Expose the original URL of a WKBackForwardListItem.
3407
3408         Needed for <rdar://problem/9074651>.
3409
3410         * UIProcess/API/C/WKBackForwardListItem.cpp:
3411         (WKBackForwardListItemCopyOriginalURL):
3412         * UIProcess/API/C/WKBackForwardListItem.h:
3413
3414 2011-04-06  Brady Eidson  <beidson@apple.com>
3415
3416         Reviewed by Anders Carlsson.
3417
3418         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
3419         WK2 icon database should be able to get a CGImage of a specific size
3420
3421         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
3422         (WKIconDatabaseTryGetCGImageForURL): Change this API to take a requested size, and find the first matching
3423           CGImage in the icon.
3424         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
3425
3426 2011-04-06  Jessie Berlin  <jberlin@apple.com>
3427
3428         Reviewed by Anders Carlsson.
3429
3430         WebKit2: Implement TextChecker on Windows
3431         https://bugs.webkit.org/show_bug.cgi?id=57862
3432
3433         Part 2: Implement uniqueSpellDocumentTag and closeSpellDocumentWithTag.
3434
3435         * UIProcess/API/C/win/WKTextChecker.h:
3436         * UIProcess/win/TextCheckerWin.cpp:
3437         (WebKit::TextChecker::uniqueSpellDocumentTag):
3438         (WebKit::TextChecker::closeSpellDocumentWithTag):
3439         * UIProcess/win/WebTextCheckerClient.cpp:
3440         (WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
3441         (WebKit::WebTextCheckerClient::closeSpellDocumentWithTag):
3442         * UIProcess/win/WebTextCheckerClient.h:
3443
3444 2011-04-06  Robert Sesek  <rsesek@chromium.org>
3445
3446         Reviewed by Alexey Proskuryakov.
3447
3448         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
3449         https://bugs.webkit.org/show_bug.cgi?id=54969
3450
3451         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3452         (WebKit::WebEditorClient::respondToChangedSelection): Moved duplicated code to WebCore
3453         * WebProcess/WebPage/mac/WebPageMac.mm: Moved duplicated code to WebCore
3454         (WebKit::WebPage::getMarkedRange):
3455         (WebKit::WebPage::getSelectedRange):
3456         (WebKit::WebPage::characterIndexForPoint):
3457         (WebKit::WebPage::performDictionaryLookupAtLocation):
3458
3459 2011-04-06  Chang Shu  <cshu@webkit.org>
3460
3461         Reviewed by Darin Adler.
3462
3463         WebKitTestRunner needs layoutTestController.pageNumberForElementById
3464         https://bugs.webkit.org/show_bug.cgi?id=42329
3465
3466         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3467         (WKBundlePageNumberForElementById):
3468         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3469         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3470         (WebKit::InjectedBundle::pageNumberForElementById):
3471         * WebProcess/InjectedBundle/InjectedBundle.h:
3472
3473 2011-04-05  Enrica Casucci  <enrica@apple.com>
3474
3475         Reviewed by Darin Adler.
3476
3477         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
3478         https://bugs.webkit.org/show_bug.cgi?id=57909
3479         <rdar://problem/9103220>
3480
3481         Added _hitTest method to support drag and drop when the drag types cannot be matched.
3482         This is the case for elements that do not place content
3483         in the drag pasteboard automatically when the drag start (i.e. dragging a DIV element).
3484                
3485         * UIProcess/API/mac/WKView.mm:
3486         (-[WKView _hitTest:dragTypes:]): Added.
3487
3488 2011-04-06  Csaba Osztrogonác  <ossy@webkit.org>
3489
3490         Reviewed by Darin Adler.
3491
3492         Fix using UNUSED_PARAM introduced in r82907
3493         https://bugs.webkit.org/show_bug.cgi?id=57940
3494
3495         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3496         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
3497
3498 2011-04-06  Jessie Berlin  <jberlin@apple.com>
3499
3500         Reviewed by Anders Carlsson.
3501
3502         WebKit2: Implement TextChecker on Windows
3503         https://bugs.webkit.org/show_bug.cgi?id=57862
3504
3505         Part 1: Get and set the state.
3506
3507         * Shared/API/c/win/WKBaseWin.h:
3508         * Shared/APIObject.h:
3509         * UIProcess/API/C/win/WKAPICastWin.h:
3510  
3511         * UIProcess/API/C/win/WKTextChecker.cpp: Added.
3512         (WKTextCheckerSetClient):
3513         (WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
3514         (WKTextCheckerGrammarCheckingEnabledStateChanged):
3515         * UIProcess/API/C/win/WKTextChecker.h: Added.
3516  
3517         * UIProcess/TextChecker.h:
3518         * UIProcess/win/TextCheckerWin.cpp:
3519         (WebKit::TextChecker::state):
3520         Do the initalization for the state only once so that it is not necessary to call the client
3521         every time the state is requested.
3522         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
3523         Call the client.
3524         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3525         Update the state and tell the client.
3526         (WebKit::TextChecker::setGrammarCheckingEnabled):
3527         Ditto.
3528         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
3529         Update the state.
3530         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
3531         Update the state.
3532
3533         * UIProcess/win/WebTextChecker.cpp: Added.
3534         (WebKit::WebTextChecker::shared):
3535         Make the WebTextChecker available globally.
3536         (WebKit::WebTextChecker::WebTextChecker):
3537         (WebKit::WebTextChecker::setClient):
3538         (WebKit::updateStateForAllWebProcesses):
3539         (WebKit::WebTextChecker::continuousSpellCheckingEnabledStateChanged):
3540         Tell the TextChecker that the state has changed, and then tell the
3541         WebProcessProxies to send the new state to the WebProcesses.
3542         (WebKit::WebTextChecker::grammarCheckingEnabledStateChanged):
3543         Ditto.
3544         * UIProcess/win/WebTextChecker.h: Added.
3545         (WebKit::WebTextChecker::client):
3546         (WebKit::WebTextChecker::type):
3547
3548         * UIProcess/win/WebTextCheckerClient.cpp: Added.
3549         (WebKit::WebTextCheckerClient::continuousSpellCheckingAllowed):
3550         (WebKit::WebTextCheckerClient::continuousSpellCheckingEnabled):
3551         (WebKit::WebTextCheckerClient::setContinuousSpellCheckingEnabled):
3552         (WebKit::WebTextCheckerClient::grammarCheckingEnabled):
3553         (WebKit::WebTextCheckerClient::setGrammarCheckingEnabled):
3554         * UIProcess/win/WebTextCheckerClient.h: Added.
3555  
3556         * win/WebKit2.vcproj:
3557         Add WKTextChecker.h/.cpp, WebTextChecker.h/.cpp, and WebTextCheckerClient.h/.cpp.
3558         * win/WebKit2Generated.make:
3559         Copy over WKTextChecker.h.
3560
3561 2011-04-05  Chang Shu  <cshu@webkit.org>
3562
3563         Reviewed by Darin Adler.
3564
3565         WebKitTestRunner needs layoutTestController.numberOfPages
3566         https://bugs.webkit.org/show_bug.cgi?id=42694
3567
3568         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3569         (WKBundleNumberOfPages):
3570         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3571         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3572         (WebKit::InjectedBundle::numberOfPages):
3573         * WebProcess/InjectedBundle/InjectedBundle.h:
3574
3575 2011-04-05  Darin Adler  <darin@apple.com>
3576
3577         Reviewed by Alexey Proskuryakov.
3578
3579         [Mac] WebKit2: Escape key does not stop page loads when focus is on the web page
3580         https://bugs.webkit.org/show_bug.cgi?id=57893
3581         <rdar://problem/9130486>
3582
3583         * UIProcess/API/mac/PageClientImpl.h: Added executeSavedCommandBySelector.
3584         * UIProcess/API/mac/PageClientImpl.mm: Renamed internal Objective-C classes to use
3585         the WebKit2 Objective-C class prefix, WK, rather than the WebKit1 Objective-C class
3586         prefix, Web. Removed some unneeded explicit WebKit namespace prefixes.
3587         (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Removed unneeded WebKit
3588