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