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