18bdef44860ff77141d2710082a5a170523c2c2f
[WebKit.git] / WebKit2 / ChangeLog
1 2010-12-09  Brady Eidson  <beidson@apple.com>
2
3         Reviewed by Maciej Stachowiak.
4
5         <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
6         WebKit2 Authentication Support
7
8         Implement authentication-related coders:
9         * Shared/WebCoreArgumentCoders.h:
10
11         Allow the ResourceResponse coders to handle null responses:
12         * Shared/mac/WebCoreArgumentCodersMac.mm:
13         (CoreIPC::encodeResourceResponse):
14         (CoreIPC::decodeResourceResponse):
15
16         Add new API and Impl casts for ProtectionSpace and Credential enums:
17         * UIProcess/API/C/WKAPICast.h:
18         (WebKit::toAPI):
19         (WebKit::toCredentialPersistence):
20
21         Move the DecisionListener to be accessed off the challenge itself, and fill in other
22         necessary API:
23         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
24         (WKAuthenticationChallengeGetDecisionListener):
25         (WKAuthenticationChallengeGetProtectionSpace):
26         (WKAuthenticationChallengeGetProposedCredential):
27         (WKAuthenticationChallengeGetPreviousFailureCount):
28         * UIProcess/API/C/WKAuthenticationChallenge.h:
29         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
30         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
31         (WebKit::AuthenticationChallengeProxy::proposedCredential):
32         (WebKit::AuthenticationChallengeProxy::protectionSpace):
33         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
34         (WebKit::AuthenticationChallengeProxy::previousFailureCount):
35
36         Fill in some credential API:
37         * UIProcess/API/C/WKCredential.cpp:
38         (WKCredentialCreate):
39         (WKCredentialCopyUser):
40         * UIProcess/API/C/WKCredential.h:
41         * UIProcess/API/C/WKCredentialTypes.h: Added.
42         * UIProcess/Authentication/WebCredential.cpp:
43         (WebKit::WebCredential::WebCredential):
44         (WebKit::WebCredential::user):
45         * UIProcess/Authentication/WebCredential.h:
46         (WebKit::WebCredential::create):
47
48         Fill in some protection space API:
49         * UIProcess/API/C/WKProtectionSpace.cpp:
50         (WKProtectionSpaceCopyHost):
51         (WKProtectionSpaceGetPort):
52         (WKProtectionSpaceCopyRealm):
53         (WKProtectionSpaceGetIsProxy):
54         (WKProtectionSpaceGetServerType):
55         (WKProtectionSpaceGetReceivesCredentialSecurely):
56         (WKProtectionSpaceGetAuthenticationScheme):
57         * UIProcess/API/C/WKProtectionSpace.h:
58         * UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
59         * UIProcess/Authentication/WebProtectionSpace.cpp:
60         (WebKit::WebProtectionSpace::WebProtectionSpace):
61         (WebKit::WebProtectionSpace::host):
62         (WebKit::WebProtectionSpace::port):
63         (WebKit::WebProtectionSpace::realm):
64         (WebKit::WebProtectionSpace::isProxy):
65         (WebKit::WebProtectionSpace::serverType):
66         (WebKit::WebProtectionSpace::receivesCredentialSecurely):
67         (WebKit::WebProtectionSpace::authenticationScheme):
68         * UIProcess/Authentication/WebProtectionSpace.h:
69
70         Change the authentication challenge callback to reflect the new ownership of
71         the DecisionListener:
72         * UIProcess/API/C/WKPage.h:
73         * UIProcess/WebLoaderClient.cpp:
74         (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
75         * UIProcess/WebLoaderClient.h:
76         * UIProcess/WebPageProxy.cpp:
77         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
78
79         * WebKit2.pro:
80         * WebKit2.xcodeproj/project.pbxproj:
81         * win/WebKit2.vcproj:
82         * win/WebKit2Generated.make:
83
84 2010-12-08  Sam Weinig  <sam@webkit.org>
85
86         Reviewed by Geoffrey "Error" Garen.
87
88         Fix typo: Diplaying -> Displaying
89
90         * UIProcess/API/C/WKFrame.cpp:
91         (WKFrameIsDisplayingStandaloneImageDocument):
92         (WKFrameIsDisplayingMarkupDocument):
93         * UIProcess/API/C/WKFrame.h:
94         * UIProcess/WebFrameProxy.cpp:
95         (WebKit::WebFrameProxy::canProvideSource):
96         (WebKit::WebFrameProxy::isDisplayingStandaloneImageDocument):
97         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
98         * UIProcess/WebFrameProxy.h:
99
100 2010-12-08  Sam Weinig  <sam@webkit.org>
101
102         Reviewed by Gavin Barraclough.
103
104         Add WebKit2 Preference for TabsToLinks behavior.
105         <rdar://problem/8664263>
106
107         * Shared/WebPreferencesStore.h:
108         * UIProcess/API/C/WKPreferences.cpp:
109         (WKPreferencesSetTabsToLinks):
110         (WKPreferencesGetTabsToLinks):
111         * UIProcess/API/C/WKPreferences.h:
112         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
113         (WebKit::WebChromeClient::tabsToLinks):
114         * WebProcess/WebPage/WebPage.cpp:
115         (WebKit::WebPage::WebPage):
116         (WebKit::WebPage::updatePreferences):
117         * WebProcess/WebPage/WebPage.h:
118         (WebKit::WebPage::tabsToLinks):
119
120 2010-12-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
121
122         Reviewed by Andreas Kling.
123
124         WebTouchEvent::isTouchEventType() does not take into account the type TouchCancel
125         https://bugs.webkit.org/show_bug.cgi?id=50680
126
127         Add the missing type check to WebTouchEvent::isTouchEventType().
128
129         * Shared/WebTouchEvent.cpp:
130         (WebKit::WebTouchEvent::isTouchEventType):
131
132 2010-12-08  Sam Weinig  <sam@webkit.org>
133
134         Reviewed by Darin Adler.
135
136         Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
137         https://bugs.webkit.org/show_bug.cgi?id=50726
138
139         Adds WKBundleNodeHandleCopyDocumentFrame, WKBundleNodeHandleCopyHTMLFrameElementContentFrame
140         and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame, to handle the document, <frame>
141         and <iframe> cases.
142
143         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
144         (WKBundleNodeHandleCopyDocumentFrame):
145         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
146         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
147         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
148         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
149         (WebKit::InjectedBundleNodeHandle::copyDocumentFrame):
150         (WebKit::InjectedBundleNodeHandle::copyHTMLFrameElementContentFrame):
151         (WebKit::InjectedBundleNodeHandle::copyHTMLIFrameElementContentFrame):
152         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
153
154 2010-12-08  Sam Weinig  <sam@webkit.org>
155
156         Reviewed by Gavin Barraclough.
157
158         Need a WebKit2 way to test whether a frame is displaying a standalone image
159         <rdar://problem/8443059>
160         WebKit2: Need a way to test whether a page or frame is showing HTML content
161         <rdar://problem/8642563>
162
163         Add WKFrameIsDiplayingStandaloneImageDocument and WKFrameIsDiplayingMarkupDocument.
164
165         * UIProcess/API/C/WKFrame.cpp:
166         (WKFrameIsDiplayingStandaloneImageDocument):
167         (WKFrameIsDiplayingMarkupDocument):
168         * UIProcess/API/C/WKFrame.h:
169         * UIProcess/WebFrameProxy.cpp:
170         (WebKit::WebFrameProxy::canProvideSource): This now just calls isDiplayingMarkupDocument.
171         (WebKit::WebFrameProxy::isDiplayingStandaloneImageDocument):
172         (WebKit::WebFrameProxy::isDiplayingMarkupDocument):
173         * UIProcess/WebFrameProxy.h:
174
175 2010-12-08  Anders Carlsson  <andersca@apple.com>
176
177         Reviewed by Darin Adler.
178
179         WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
180         https://bugs.webkit.org/show_bug.cgi?id=50724
181
182         * UIProcess/WebContext.cpp:
183         (WebKit::WebContext::pdfAndPostScriptMIMETypes):
184         * UIProcess/WebContext.h:
185         * UIProcess/WebFrameProxy.cpp:
186         (WebKit::WebFrameProxy::canShowMIMEType):
187
188 2010-12-08  Brian Weinstein  <bweinstein@apple.com>
189
190         Reviewed by Brady Eidson.
191
192         WebMenuTarget implemented in both WebKit and WebKit2
193         https://bugs.webkit.org/show_bug.cgi?id=50665
194         <rdar://problem/8742640>
195         
196         Rename WebMenuTarget to WKMenuTarget to prevent this warning and stay consistent with
197         other WebKit2 namings.
198
199         * UIProcess/mac/WebContextMenuProxyMac.mm:
200         (+[WKMenuTarget sharedMenuTarget]):
201         (WebKit::nsMenuItemVector):
202         (WebKit::WebContextMenuProxyMac::showContextMenu):
203
204 2010-12-08  Anders Carlsson  <andersca@apple.com>
205
206         Reviewed by Sam Weinig.
207
208         Move canShowMIMEType to Frame
209         https://bugs.webkit.org/show_bug.cgi?id=50723
210
211         * UIProcess/API/C/WKFrame.cpp:
212         (WKFrameCanShowMIMEType):
213         * UIProcess/API/C/WKFrame.h:
214         * UIProcess/API/C/WKPage.cpp:
215         * UIProcess/API/C/WKPage.h:
216         * UIProcess/WebFrameProxy.cpp:
217         (WebKit::WebFrameProxy::canShowMIMEType):
218         * UIProcess/WebFrameProxy.h:
219
220 2010-12-08  Sam Weinig  <sam@webkit.org>
221
222         Reviewed by Oliver Hunt.
223
224         Rename WKPreferencesGetFTPDirectoryTemplatePath to WKPreferencesCopyFTPDirectoryTemplatePath
225         since it copies the value.
226
227         * UIProcess/API/C/WKPreferences.cpp:
228         (WKPreferencesCopyFTPDirectoryTemplatePath):
229         * UIProcess/API/C/WKPreferencesPrivate.h:
230
231 2010-12-08  Sam Weinig  <sam@webkit.org>
232
233         Reviewed by Brady Eidson.
234
235         WebKit2: Can't open ftp directory
236         <rdar://problem/8489321>
237
238         * Shared/WebPreferencesStore.h:
239         * UIProcess/API/C/WKPreferences.cpp:
240         (WKPreferencesSetForceFTPDirectoryListings):
241         (WKPreferencesGetForceFTPDirectoryListings):
242         (WKPreferencesSetFTPDirectoryTemplatePath):
243         (WKPreferencesGetFTPDirectoryTemplatePath):
244         * UIProcess/API/C/WKPreferencesPrivate.h:
245         * WebProcess/WebPage/WebPage.cpp:
246         (WebKit::WebPage::updatePreferences):
247         Pipe through the FTP directory listing preferences.
248
249 2010-12-08  Chris Marrin  <cmarrin@apple.com>
250
251         Reviewed by Simon Fraser.
252
253         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
254         https://bugs.webkit.org/show_bug.cgi?id=49388
255
256         Fixes a build failure because WebChromeClient.cpp uses WebCore::Cursor.
257         This patch adds an include of QuartzCore/CATransform3D, which includes
258         a file that has a 'Cursor' object defined. So I had to qualify the
259         use of Cursor in WebChromeClient.cpp.
260
261         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
262         (WebKit::WebChromeClient::setCursor):
263
264 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
265
266         Reviewed by John Sullivan.
267
268         Layering Violation in ContextMenu - member variable of type HitTestResult
269         https://bugs.webkit.org/show_bug.cgi?id=50586
270         
271         Update users of ContextMenu and ContextMenuController to match where the new functions 
272         are located.
273
274         * Shared/WebContextMenuItemData.cpp:
275         (WebKit::WebContextMenuItemData::WebContextMenuItemData): Remove the call to checkOrEnableItem, that call will be made when
276             the ContextMenuItem is added to the ContextMenu through the ContextMenuController.
277         * WebProcess/WebPage/WebContextMenu.cpp:
278         (WebKit::WebContextMenu::show):
279
280 2010-12-08  Jessie Berlin  <jberlin@apple.com>
281
282         Reviewed by Adam Roben.
283
284         WebKit2: Implement WebChromeClient::exceededDatabaseQuota
285         https://bugs.webkit.org/show_bug.cgi?id=50656
286
287         The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous
288         because the new quota is checked directly after exceededDatabaseQuota returns in order to
289         determine if the new Database can be created.
290
291         Pass all of the details from the WebProcess to the UIProcess in order to inform the
292         decision in the UIProcess about the new quota. In WebKit1, these details were
293         fetched through an additional call to the API detailsForDatabase (which is infeasible in
294         WebKit2 since exceededDatabaseQuota is a synchronous call).
295
296         * Platform/CoreIPC/HandleMessage.h:
297         (CoreIPC::callMemberFunction):
298         Add a version that takes 7 parameters.
299
300         * UIProcess/API/C/WKPage.h:
301
302         * UIProcess/API/qt/qwkpage.cpp:
303         (QWKPage::QWKPage):
304         Indicate that exceededDatabaseQuota is not implemented.
305
306         * UIProcess/WebPageProxy.cpp:
307         (WebKit::WebPageProxy::exceededDatabaseQuota):
308         Call the UIClient's exceededDatabaseQuota
309         * UIProcess/WebPageProxy.h:
310         * UIProcess/WebPageProxy.messages.in:
311
312         * UIProcess/WebUIClient.cpp:
313         (WebKit::WebUIClient::exceededDatabaseQuota):
314         If the client does not implement exceededDatabaseQuota, return a the current quota.
315         * UIProcess/WebUIClient.h:
316
317         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
318         (WebKit::WebChromeClient::exceededDatabaseQuota):
319         Send a synchronous message to the UIProcess to ask for the new quota for the origin for the
320         given frame.
321
322 2010-12-07  Anders Carlsson  <andersca@apple.com>
323
324         Reviewed by Sam Weinig.
325
326         fast/loader/empty-embed-src-attribute.html asserts in debug builds
327         https://bugs.webkit.org/show_bug.cgi?id=50643
328
329         Just always ignore attempts to load requests with empty URLs.
330
331         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
332         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
333
334 2010-12-07  Jessie Berlin  <jberlin@apple.com>
335
336         Build fix. Unreviewed.
337
338         * WebKit2.pro:
339         Added WebDatabaseManagerQt.cpp.
340         * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Added.
341         (WebKit::WebDatabaseManager::databaseDirectory):
342         Added a FIXME to implement and return an empty string.
343
344 2010-12-07  Darin Adler  <darin@apple.com>
345
346         Get a bit closer to making Qt WebKit2 compile again.
347
348         * WebKit2.pro: Add the WebDatabaseManager source files.
349         Still missing: The Qt version of the databaseDirectory function.
350
351 2010-12-07  Jessie Berlin  <jberlin@apple.com>
352
353         Reviewed by Darin Adler.
354
355         WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
356         https://bugs.webkit.org/show_bug.cgi?id=50604
357
358         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Added.
359         (WebKit::WebDatabaseManager::shared):
360         (WebKit::WebDatabaseManager::WebDatabaseManager):
361         Initialize the DatabaseTracker with the Database directory.
362         * WebProcess/WebCoreSupport/WebDatabaseManager.h: Added.
363         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Added.
364         (WebKit::WebDatabaseManager::databaseDirectory):
365         Copied from WebKitInitializeDatabasesIfNecessary in WebKit/mac/Storage/WebDatabaseManager.mm.
366         * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Added.
367         (WebKit::WebDatabaseManager::databaseDirectory):
368         Copied from WebKitInitializeWebDatabasesIfNecessary in WebKit/win/WebDatabaseManager.cpp.
369
370         * WebProcess/WebProcess.cpp:
371         (WebKit::WebProcess::WebProcess):
372         Make sure that the Databases directory has been set by calling WebDatabaseManager::shared().
373
374         * WebKit2.xcodeproj/project.pbxproj:
375         Add WebDatabaseManager.cpp/.h/Mac.cpp
376         * win/WebKit2.vcproj:
377         Add WebDatabaseManager.cpp/.h/Win.cpp
378
379 2010-12-06  Darin Adler  <darin@apple.com>
380
381         Reviewed by Sam Weinig.
382
383         Pass security origin to make local file decision correctly
384         https://bugs.webkit.org/show_bug.cgi?id=48603
385
386         * WebProcess/Plugins/PluginView.cpp:
387         (WebKit::PluginView::loadURL): Pass security origin.
388         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
389         (WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.
390
391 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
392
393         Reviewed by Sam Weinig.
394
395         Fix two WebKit2 prefs issues.
396
397         * Shared/WebPreferencesStore.h: Include font-family preferences
398         in the FOR_EACH_WEBKIT_STRING_PREFERENCE macro, actually propagating
399         font family prefs to WebCore settings.
400         
401         * UIProcess/WebPageGroup.cpp:
402         (WebKit::WebPageGroup::WebPageGroup):
403         (WebKit::WebPageGroup::~WebPageGroup): Add and remove the WebPageGroup
404         from the preference object it creates. This allows preference changes
405         to actually be propagated to the web process.
406
407 2010-12-06  Anders Carlsson  <andersca@apple.com>
408
409         Reviewed by Sam Weinig.
410
411         The plug-in process crashes if it can't load the plug-in module
412         https://bugs.webkit.org/show_bug.cgi?id=50601
413         <rdar://problem/8692654>
414
415         * PluginProcess/PluginControllerProxy.cpp:
416         (WebKit::PluginControllerProxy::initialize):
417         Handle m_plugin being 0.
418
419         * PluginProcess/PluginProcess.cpp:
420         (WebKit::PluginProcess::netscapePluginModule):
421         Create the plug-in module if it doesn't exist.
422
423         (WebKit::PluginProcess::initialize):
424         Store the plug-in path.
425
426         * PluginProcess/PluginProcess.h:
427         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
428         (WebKit::NetscapePlugin::create):
429         Return null if the plug-in module doesn't exist.
430
431         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
432         * WebProcess/WebPage/WebPage.cpp:
433         (WebKit::WebPage::createPlugin):
434         Simplify code.
435
436 2010-12-06  Anders Carlsson  <andersca@apple.com>
437
438         Reviewed by Sam Weinig.
439
440         WebProcess crash in NPRemoteObjectMap::invalidate when closing tab
441         https://bugs.webkit.org/show_bug.cgi?id=50597
442         <rdar://problem/8655584>
443
444         When invalidating the NPRemoteObjectMap, we don't want NPObjectMessageReceiver to
445         release all objects NPObjects blindly because NPJSObjects have already been deallocated by the plug-in view.
446
447         This is not an ideal solution; an ideal solution would involve NPJSObjects notifying any NPObjectMessageReceiver objects
448         that the NPJSObject is being destroyed. The NPObjectMessageReceiver could then simply null out the NPObject pointer.
449
450         * Shared/Plugins/NPObjectMessageReceiver.cpp:
451         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
452         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
453         * Shared/Plugins/NPObjectMessageReceiver.h:
454         * Shared/Plugins/NPRemoteObjectMap.cpp:
455         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
456         (WebKit::NPRemoteObjectMap::invalidate):
457         * Shared/Plugins/NPRemoteObjectMap.h:
458         (WebKit::NPRemoteObjectMap::isInvalidating):
459
460 2010-12-06  Sam Weinig  <sam@webkit.org>
461
462         Reviewed by Anders Carlsson.
463
464         Generalize didChangeLocationWithinPageForFrame for all same document navigations
465         https://bugs.webkit.org/show_bug.cgi?id=50584
466
467           - Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
468           - Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
469           - Call didSameDocumentNavigationForFrame for HTML session state changes.
470
471         * Shared/API/c/WKPageLoadTypes.h: Added.
472         * Shared/API/c/WKSharedAPICast.h:
473         (WebKit::toAPI):
474         Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.
475
476         * Shared/SameDocumentNavigationType.h: Added.
477         * UIProcess/API/C/WKAPICast.h:
478         Moved WKFrameNavigationType conversion from here.
479
480         * UIProcess/API/C/WKPage.h:
481         * UIProcess/API/qt/qwkpage.cpp:
482         (QWKPage::QWKPage):
483         Update comment.
484
485         * UIProcess/WebFrameProxy.cpp:
486         (WebKit::WebFrameProxy::didSameDocumentNavigation):
487         * UIProcess/WebFrameProxy.h:
488         * UIProcess/WebLoaderClient.cpp:
489         (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
490         * UIProcess/WebLoaderClient.h:
491         * UIProcess/WebPageProxy.cpp:
492         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
493         * UIProcess/WebPageProxy.h:
494         * UIProcess/WebPageProxy.messages.in:
495         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
496         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
497         (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
498         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
499         Pipe new name through.
500
501         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
502         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
503         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
504         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
505         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
506         Call didChangeLocationWithinPageForFrame for session state changes.
507
508         * WebKit2.pro:
509         * WebKit2.xcodeproj/project.pbxproj:
510         * win/WebKit2.vcproj:
511         * win/WebKit2Generated.make:
512         Add new files.
513
514 2010-12-06  Jessie Berlin  <jberlin@apple.com>
515
516         Reviewed by Dan Bernstein.
517
518         WebKit2: Expose the preference to enable or disable HTML5 Databases.
519         https://bugs.webkit.org/show_bug.cgi?id=50411
520
521         * Shared/WebPreferencesStore.h:
522         Make the preference to enable HTML5 Databases default ot true.
523
524         * UIProcess/API/C/WKPreferences.cpp:
525         (WKPreferencesSetDatabasesEnabled):
526         (WKPreferencesGetDatabasesEnabled):
527         * UIProcess/API/C/WKPreferences.h:
528
529         * WebProcess/WebPage/WebPage.cpp:
530         (WebKit::WebPage::updatePreferences):
531         Set AbstractDatabase::isAvailable (mimicking how the preference is set in WebKit1).
532
533 2010-12-06  Mark Rowe  <mrowe@apple.com>
534
535         Build fix.
536
537         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
538         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Wrap Carbon-specific code in #ifndef NP_NO_CARBON.
539
540 2010-12-06  Anders Carlsson  <andersca@apple.com>
541
542         Reviewed by Adam Roben.
543
544         Add a shim for GetCurrentEventButtonState
545         https://bugs.webkit.org/show_bug.cgi?id=50583
546
547         * PluginProcess/mac/PluginProcessMac.mm:
548         (WebKit::getCurrentEventButtonState):
549         Get the event button state from the plug-in.
550
551         (WebKit::PluginProcess::initializeShim):
552         Add new shim callback.
553
554         * PluginProcess/mac/PluginProcessShim.cpp:
555         (WebKit::shimGetCurrentEventButtonState):
556         Add shim.
557
558         * PluginProcess/mac/PluginProcessShim.h:
559         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
560         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
561         (WebKit::NetscapePlugin::buttonState):
562         Return the button state.
563
564         (WebKit::NetscapePlugin::platformHandleMouseEvent):
565         Update the button state. Also, make sure to actually pass the modifiers to NPP_HandleEvent.
566         
567
568 2010-12-06  Anders Carlsson  <andersca@apple.com>
569
570         Reviewed by Adam Roben.
571
572         Add a shim for IsWindowActive
573         https://bugs.webkit.org/show_bug.cgi?id=50582
574
575         * PluginProcess/mac/PluginProcessMac.mm:
576         (WebKit::isWindowActive):
577         Get the NetscapePlugin from the WindowRef and check if the plug-in's window is active.
578
579         (WebKit::PluginProcess::initializeShim):
580         * PluginProcess/mac/PluginProcessShim.cpp        
581         (WebKit::shimIsWindowActive):
582         Call isWindowActive. If it returns true, return the result value. Otherwise, call the real
583         IsWindowActive function.
584
585         * PluginProcess/mac/PluginProcessShim.h:
586         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
587         (WebKit::NetscapePlugin::NetscapePlugin):
588         Initialize m_isWindowactive.
589
590         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
591         (WebKit::NetscapePlugin::isWindowActive):
592         Return whether the window is active.
593
594         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
595         (WebKit::windowMap):
596         (WebKit::NetscapePlugin::platformPostInitialize):
597         (WebKit::NetscapePlugin::platformDestroy):
598         (WebKit::NetscapePlugin::netscapePluginFromWindow):
599         Add a mapping between windows and the corresponding NetscapePlugin objects.
600
601         (WebKit::NetscapePlugin::windowFocusChanged):
602         Update the window focus member variable.
603
604 2010-12-06  Anders Carlsson  <andersca@apple.com>
605
606         Reviewed by Dan Bernstein.
607
608         REGERSSION (r73310?): Contents of <select> popup menus are upside-down on Windows
609         https://bugs.webkit.org/show_bug.cgi?id=50544
610         <rdar://problem/8732336>
611
612         * Shared/BackingStore.cpp:
613         * Shared/BackingStore.h:
614         * Shared/cairo/BackingStoreCairo.cpp:
615         Remove BackingStore::createFlippedGraphicsContext.
616
617         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
618         (WebKit::WebPopupMenu::setUpPlatformData):
619         Don't create a flipped graphics context.
620
621 2010-12-06  Anders Carlsson  <andersca@apple.com>
622
623         Reviewed by Dan Bernstein.
624
625         REGRESSION: Text in Find indicator is vertically flipped
626         https://bugs.webkit.org/show_bug.cgi?id=50524
627         <rdar://problem/8732978>
628
629         Don't flip the graphics context.
630
631         * UIProcess/FindIndicator.cpp:
632         (WebKit::FindIndicator::draw):
633
634 2010-12-03  Anders Carlsson  <andersca@apple.com>
635
636         Reviewed by Sam Weinig.
637
638         Dispatch keyboard events in the Carbon event model
639         https://bugs.webkit.org/show_bug.cgi?id=50503
640
641         * Shared/WebEvent.h:
642         (WebKit::WebKeyboardEvent::macCharCode):
643         * Shared/WebKeyboardEvent.cpp:
644         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
645         (WebKit::WebKeyboardEvent::encode):
646         (WebKit::WebKeyboardEvent::decode):
647         Add macCharCode field.
648
649         * Shared/mac/WebEventFactory.mm:
650         (WebKit::WebEventFactory::createWebKeyboardEvent):
651         * Shared/qt/WebEventFactoryQt.cpp:
652         (WebKit::WebEventFactory::createWebKeyboardEvent):
653         * Shared/win/WebEventFactory.cpp:
654         (WebKit::WebEventFactory::createWebKeyboardEvent):
655         Pass along the Mac char code.
656         
657         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
658         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
659         Convert the event to a Carobn event.
660
661 2010-12-03  John Sullivan  <sullivan@apple.com>
662
663         Reviewed by Adam Roben.
664
665         https://bugs.webkit.org/show_bug.cgi?id=50504
666         Expose some more WebCore settings in WebKit2 preferences
667
668         * Shared/WebPreferencesStore.h:
669         Changed name of existing FOR_EACH_WEBKIT_STRING_PREFERENCE macro to
670         FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE since it was all about platform-specific
671         font families, and I'm now introducing a non-platform-spacific string, and
672         I didn't want to put the new preference in two platform-specific lists. Then
673         added a new FOR_EACH_WEBKIT_STRING_PREFERENCE to hold the new preference. Note
674         that the other preferences exposed in this patch were already declared here.
675         
676         * UIProcess/API/C/WKPreferences.cpp:
677         (WKPreferencesSetDefaultFontSize):
678         New wrapper.
679         (WKPreferencesGetDefaultFontSize):
680         Ditto.
681         (WKPreferencesSetDefaultFixedFontSize):
682         Ditto.
683         (WKPreferencesGetDefaultFixedFontSize):
684         Ditto.
685         (WKPreferencesSetDefaultTextEncodingName):
686         Ditto.
687         (WKPreferencesCopyDefaultTextEncodingName):
688         Ditto.
689         
690         * UIProcess/API/C/WKPreferences.h:
691         Declare new wrappers.
692
693 2010-12-05  Adam Roben  <aroben@apple.com>
694
695         Windows production build fix
696
697         Put spaces after trailing backslashes when setting
698         %WebKitVSPropsRedirectionDir%. According to MSDN
699         <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
700
701            A backslash ( \ ) followed by a newline character is interpreted as
702            a space in the command; use a backslash at the end of a line to
703            continue a command onto the next line. NMAKE interprets the
704            backslash literally if any other character, including a space or
705            tab, follows the backslash.
706
707         * win/WebKit2.make:
708
709 2010-12-04  Sam Weinig  <sam@webkit.org>
710
711         Reviewed by Jon Honeycutt.
712
713         WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
714         https://bugs.webkit.org/show_bug.cgi?id=50511
715
716         Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
717         updating the WebFrameProxy's URL on the way.
718
719         Test: PageLoadDidChangeLocationWithinPageForFrame
720
721         * UIProcess/API/C/WKPage.h:
722         * UIProcess/API/qt/qwkpage.cpp:
723         (QWKPage::QWKPage):
724         * UIProcess/WebFrameProxy.cpp:
725         (WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
726         * UIProcess/WebFrameProxy.h:
727         * UIProcess/WebLoaderClient.cpp:
728         (WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
729         * UIProcess/WebLoaderClient.h:
730         * UIProcess/WebPageProxy.cpp:
731         (WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
732         * UIProcess/WebPageProxy.h:
733         * UIProcess/WebPageProxy.messages.in:
734         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
735         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
736         (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
737         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
738         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
739         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
740         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
741         (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
742         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
743
744 2010-12-03  Timothy Hatcher  <timothy@apple.com>
745
746         Make the Web Inspector window show and be usable on Mac.
747
748         https://webkit.org/b/50490
749
750         Reviewed by Sam Weinig.
751
752         * UIProcess/WebInspectorProxy.cpp:
753         (WebKit::WebInspectorProxy::invalidate): Call platformClose.
754         (WebKit::WebInspectorProxy::didLoadInspectorPage): Call platformOpen.
755         (WebKit::WebInspectorProxy::didClose): Call platformClose.
756         * UIProcess/WebInspectorProxy.h:
757         * UIProcess/WebInspectorProxy.messages.in: Added DidClose.
758         * UIProcess/mac/WebInspectorProxyMac.mm:
759         (-[WebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): Added.
760         (-[WebInspectorProxyObjCAdapter windowWillClose:]): Added. Call WebInspectorProxy::close.
761         (WebKit::WebInspectorProxy::platformOpen): Added.
762         (WebKit::WebInspectorProxy::platformClose): Added.
763         * UIProcess/qt/WebInspectorProxyQt.cpp:
764         (WebKit::WebInspectorProxy::platformOpen): Added stub.
765         (WebKit::WebInspectorProxy::platformClose): Added stub.
766         * UIProcess/win/WebInspectorProxyWin.cpp:
767         (WebKit::WebInspectorProxy::platformOpen): Added stub.
768         (WebKit::WebInspectorProxy::platformClose): Added stub.
769         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
770         (WebKit::WebInspectorClient::sendMessageToFrontend): Added more null checks to avoid a crash.
771         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
772         (WebKit::WebInspectorFrontendClient::closeWindow): Call WebInspector::didClose.
773         (WebKit::WebInspectorFrontendClient::disconnectFromBackend): Ditto.
774         (WebKit::WebInspectorFrontendClient::sendMessageToBackend): Removed. This does not need to be
775         implemented by our subclass since we are in a single process.
776         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed sendMessageToBackend.
777         * WebProcess/WebPage/WebInspector.cpp:
778         (WebKit::WebInspector::didClose): Added. Send a DidClose message to the UI process.
779         * WebProcess/WebPage/WebInspector.h:
780
781 2010-12-03  Anders Carlsson  <andersca@apple.com>
782
783         Reviewed by Sam Weinig and Dan Bernstein.
784
785         Clean up the BackingStore implementation
786         https://bugs.webkit.org/show_bug.cgi?id=50498
787
788         * Shared/BackingStore.cpp:
789         (WebKit::BackingStore::create):
790         (WebKit::BackingStore::createSharable):
791         (WebKit::BackingStore::resize):
792         Use new numBytesForSize helper function.
793
794         (WebKit::BackingStore::createFlippedGraphicsContext):
795         Make this function platform independent.
796
797         * Shared/BackingStore.h:
798         (WebKit::BackingStore::numBytesForSize):
799         Given a size, return the number of bytes needed for it.
800
801         (WebKit::BackingStore::sizeInBytes):
802         Implement.
803
804         * Shared/cg/BackingStoreCG.cpp:
805         (WebKit::BackingStore::paint):
806         Don't use CGBitmapContextCreateImage; it creates an extra copy of the image data.
807
808         * Shared/qt/BackingStoreQt.cpp:
809         Remove createFlippedGraphicsContext.
810
811 2010-12-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
812
813         Reviewed by Laszlo Gombos.
814
815         [Qt] [WK2] Build system improvements for non-Unix targets
816         https://bugs.webkit.org/show_bug.cgi?id=50257
817
818         * DerivedSources.pro:
819         Fix dir seperator errors on Windows build host. Thanks to Laszlo Gombos.
820
821 2010-12-03  Sam Weinig  <sam@webkit.org>
822
823         Reviewed by Maciej Stachowiak.
824
825         Enable <a ping> for Mac/Windows/WebKit2 builds
826         <rdar://problem/8504473>
827         https://bugs.webkit.org/show_bug.cgi?id=50488
828
829         * Shared/WebPreferencesStore.h:
830         * UIProcess/API/C/WKPreferences.cpp:
831         (WKPreferencesSetHyperlinkAuditingEnabled):
832         (WKPreferencesGetHyperlinkAuditingEnabled):
833         * UIProcess/API/C/WKPreferences.h:
834         Add "HyperlinkAuditing" preference and enabled it by default.
835
836 2010-12-03  Brady Eidson  <beidson@apple.com>
837
838         Reviewed by good sense in fixing builds.
839
840         Export the 4 new API headers I added today.
841
842         * WebKit2.xcodeproj/project.pbxproj:
843
844 2010-12-03  Brady Eidson  <beidson@apple.com>
845
846         Reviewed by Sam Weinig.
847
848         <rdar://problem/8725679> and https://bugs.webkit.org/show_bug.cgi?id=50482
849         Crash trying to empty caches with no WebProcess.
850
851         * Shared/WebProcessCreationParameters.h: Add the "clear this cache" flags.
852
853         * UIProcess/WebContext.cpp:
854         (WebKit::WebContext::WebContext):
855         (WebKit::WebContext::ensureWebProcess): If either of the clear cache flags are set when a new WebProcess is
856           created, include those flags in the parameters.
857         (WebKit::WebContext::clearResourceCaches): If the current process isn't valid, flag this action to be done later.
858         (WebKit::WebContext::clearApplicationCache): Ditto.
859         * UIProcess/WebContext.h:
860
861         * WebProcess/WebProcess.cpp:
862         (WebKit::WebProcess::initializeWebProcess): Clear the caches if told to.
863
864 2010-12-03  Sam Weinig  <sam@webkit.org>
865
866         Reviewed by Gavin Barraclough.
867
868         Fix failing API test. The default san serif font on the mac
869         should be Helvetica, not Courier.
870
871         * Shared/WebPreferencesStore.h:
872
873 2010-12-03  Jia Pu  <jpu@apple.com>
874
875         Reviewed by Darin Adler.
876
877         Need to move all code that applies correction into correction panel callback.
878         https://bugs.webkit.org/show_bug.cgi?id=50426
879         <rdar://problem/8720832>
880
881         Adopted new signature of dismissCorrectionPanel.
882
883         * WebProcess/WebCoreSupport/WebEditorClient.h:
884         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
885         (WebKit::WebEditorClient::dismissCorrectionPanel):
886
887 2010-12-03  Jessie Berlin  <jberlin@apple.com>
888
889         Windows build fix. Unreviewed.
890
891         * win/WebKit2Generated.make:
892         Add the new API files from http://trac.webkit.org/changeset/73281.
893
894 2010-12-03  Brady Eidson  <beidson@apple.com>
895
896         Reviewed by Anders Carlsson.
897
898         Groundwork for <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
899         WebKit2 Authentication Support
900
901         With this patch in place, authentication challenges are sent up from WebCore and shipped over the IPC layer.
902         Client apps can implement the related client methods to attempt to continue without credentials or cancel a
903         challenge.
904
905         There's not yet API to inspect a challenge or create a credential to use in reply - that will come later.
906
907         Build-system changes:
908         * DerivedSources.make:
909         * DerivedSources.pro:
910         * WebKit2.pro:
911         * WebKit2.xcodeproj/project.pbxproj:
912         * win/WebKit2.vcproj:
913         * win/WebKit2Common.vsprops:
914
915         Messages and casts for IPC and APIs:
916         * Platform/CoreIPC/MessageID.h:
917         * Shared/API/c/WKBase.h:
918         * Shared/APIObject.h:
919         * Shared/WebCoreArgumentCoders.h:
920         * UIProcess/API/C/WKAPICast.h:
921         * WebProcess/WebProcess.cpp:
922         (WebKit::WebProcess::didReceiveMessage):
923
924         Stub out the AuthenticationChallenge class family:
925         * UIProcess/API/C/WKAuthenticationChallenge.cpp: Added.
926         (WKAuthenticationChallengeGetTypeID):
927         * UIProcess/API/C/WKAuthenticationChallenge.h: Added.
928         * UIProcess/API/C/WKCredential.cpp: Added.
929         (WKCredentialGetTypeID):
930         * UIProcess/API/C/WKCredential.h: Added.
931         * UIProcess/API/C/WKProtectionSpace.cpp: Added.
932         (WKProtectionSpaceGetTypeID):
933         * UIProcess/API/C/WKProtectionSpace.h: Added.
934
935         Add an Authentication listener for the client app to respond to:
936         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp: Added.
937         (WKAuthenticationDecisionListenerGetTypeID):
938         (WKAuthenticationDecisionListenerUseCredential):
939         (WKAuthenticationDecisionListenerCancel):
940         * UIProcess/API/C/WKAuthenticationDecisionListener.h: Added.
941
942         Add Authentication related methods to the page loader client:
943         * UIProcess/API/C/WKPage.h:
944
945         Add empty implementations of the new API objects:
946         * UIProcess/Authentication: Added.
947         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: Added.
948         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
949         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
950         (WebKit::AuthenticationChallengeProxy::useCredential):
951         (WebKit::AuthenticationChallengeProxy::cancel):
952         * UIProcess/Authentication/AuthenticationChallengeProxy.h: Added.
953         (WebKit::AuthenticationChallengeProxy::create):
954         (WebKit::AuthenticationChallengeProxy::listener):
955         (WebKit::AuthenticationChallengeProxy::type):
956
957         * UIProcess/Authentication/WebCredential.cpp: Added.
958         (WebKit::WebCredential::core):
959         * UIProcess/Authentication/WebCredential.h: Added.
960         (WebKit::WebCredential::create):
961         (WebKit::WebCredential::type):
962         * UIProcess/Authentication/WebProtectionSpace.cpp: Added.
963         (WebKit::WebProtectionSpace::WebProtectionSpace):
964         * UIProcess/Authentication/WebProtectionSpace.h: Added.
965         (WebKit::WebProtectionSpace::create):
966         (WebKit::WebProtectionSpace::type):
967
968         Add implementation of the Authentication decision listener:
969         * UIProcess/Authentication/AuthenticationDecisionListener.cpp: Added.
970         (WebKit::AuthenticationDecisionListener::AuthenticationDecisionListener):
971         (WebKit::AuthenticationDecisionListener::useCredential):
972         (WebKit::AuthenticationDecisionListener::cancel):
973         (WebKit::AuthenticationDecisionListener::detachChallenge):
974         * UIProcess/Authentication/AuthenticationDecisionListener.h: Added.
975         (WebKit::AuthenticationDecisionListener::create):
976         (WebKit::AuthenticationDecisionListener::type):
977
978         WebPage and PageLoaderClient glue:
979         * UIProcess/WebLoaderClient.cpp:
980         (WebKit::WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
981         (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
982         * UIProcess/WebLoaderClient.h:
983         * UIProcess/WebPageProxy.cpp:
984         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
985         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
986         * UIProcess/WebPageProxy.h:
987         * UIProcess/WebPageProxy.messages.in:
988
989         Add a manager to map the actual platform authentication challenges to a challenge ID,
990         as at least some platforms require the object identity to persist:
991         * WebProcess/Authentication: Added.
992         * WebProcess/Authentication/AuthenticationManager.cpp: Added.
993         (WebKit::generateAuthenticationChallengeID):
994         (WebKit::AuthenticationManager::shared):
995         (WebKit::AuthenticationManager::AuthenticationManager):
996         (WebKit::AuthenticationManager::didReceiveMessage):
997         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
998         (WebKit::AuthenticationManager::useCredentialForChallenge):
999         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
1000         (WebKit::AuthenticationManager::cancelChallenge):
1001         * WebProcess/Authentication/AuthenticationManager.h: Added.
1002         * WebProcess/Authentication/AuthenticationManager.messages.in: Added.
1003
1004         Hand off Authentication challenges to the manager to be sent over IPC:
1005         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1006         (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
1007         (WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
1008
1009         * UIProcess/API/qt/qwkpage.cpp:
1010
1011 2010-12-03  Anders Carlsson  <andersca@apple.com>
1012
1013         Reviewed by Dan Bernstein.
1014
1015         Flip the destination context when painting a backing store into the destination
1016         https://bugs.webkit.org/show_bug.cgi?id=50491
1017
1018         * Shared/cg/BackingStoreCG.cpp:
1019         (WebKit::BackingStore::paint):
1020
1021 2010-12-03  Anders Carlsson  <andersca@apple.com>
1022
1023         Reviewed by Dan Bernstein.
1024
1025         The chunked update drawing area is flipped twice when drawing
1026         https://bugs.webkit.org/show_bug.cgi?id=50465
1027         <rdar://problem/8726836>
1028
1029         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1030         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
1031         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
1032         Flip the destination contexts, thus unflipping them. (Turns out two wrongs make a right here).
1033
1034 2010-12-03  Jessie Berlin  <jberlin@apple.com>
1035
1036         Reviewed by Sam Weinig.
1037
1038         Need a WebKit2 Equivalent of WebSecurityOrigin
1039         https://bugs.webkit.org/show_bug.cgi?id=50170
1040
1041         * Shared/API/c/WKBase.h:
1042         Add the WKSecurityOriginRef typedef.
1043
1044         * Shared/APIObject.h:
1045         Add the SecurityOrigin type as a Shared type.
1046
1047         * Shared/API/c/WKSharedAPICast.h::
1048         Add the mapping between WKSecurityOriginRef and WebSecurityOrigin.
1049
1050         * UIProcess/API/C/WKSecurityOrigin.cpp: Added.
1051         (WKSecurityOriginGetTypeID):
1052         (WKSecurityOriginCreate):
1053         (WKSecurityOriginGetProtocol):
1054         (WKSecurityOriginGetHost):
1055         (WKSecurityOriginGetPort):
1056         * UIProcess/API/C/WKSecurityOrigin.h: Added.
1057
1058         * UIProcess/WebSecurityOrigin.h: Added.
1059         (WebKit::WebSecurityOrigin::create):
1060         Create based on the database identifier, which contains the protocol, host and port.
1061         (WebKit::WebSecurityOrigin::protocol):
1062         (WebKit::WebSecurityOrigin::host):
1063         (WebKit::WebSecurityOrigin::port):
1064         (WebKit::WebSecurityOrigin::databaseIdentifier):
1065         (WebKit::WebSecurityOrigin::WebSecurityOrigin):
1066         (WebKit::WebSecurityOrigin::type):
1067
1068         * WebKit2.pro:
1069         Add WKSecurityOrigin.cpp/.h.
1070
1071         * WebKit2.xcodeproj/project.pbxproj:
1072         * win/WebKit2.vcproj:
1073         Add the WebSecurityOrigin.h and WKSecurityOrigin.cpp/.h.
1074
1075         * win/WebKit2Generated.make:
1076         Make sure WKSecurityOrigin.h file gets copied over to the WebKitBuild directory on Windows.
1077
1078 2010-12-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1079
1080         Reviewed by Csaba Osztrogonác.
1081
1082         [Qt] Fix compilation with !ENABLE(OFFLINE_WEB_APPLICATIONS) and 
1083         !ENABLE(TILED_BACKING_STORE) for WebKit2
1084         https://bugs.webkit.org/show_bug.cgi?id=50071
1085
1086         Add appropriate guards. No functional change if guards are set.
1087
1088         * UIProcess/API/qt/qwkpage.cpp:
1089         (QWKPage::setActualVisibleContentsRect):
1090         * UIProcess/TiledDrawingAreaProxy.cpp:
1091         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
1092         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
1093         * UIProcess/qt/WebContextQt.cpp:
1094         (WebKit::WebContext::applicationCacheDirectory):
1095         * WebProcess/WebProcess.cpp:
1096         (WebKit::WebProcess::initializeWebProcess):
1097
1098 2010-12-02  Sam Weinig  <sam@webkit.org>
1099
1100         Fix Qt.
1101
1102         * UIProcess/API/qt/qwkpreferences.cpp:
1103         (QWKPreferencesPrivate::createPreferences):
1104
1105 2010-12-02  Sam Weinig  <sam@webkit.org>
1106
1107         Reviewed by Anders Carlsson.
1108
1109         WebKit2 Preferences should be held off the PageGroup, not the Context
1110         https://bugs.webkit.org/show_bug.cgi?id=50414
1111
1112         - In addition, this now makes the preference held off the PageGroup have
1113           the identifier of the PageGroup and autosave to disk (only on the mac
1114           for now).
1115         - Adds ability to create an arbitrary preference that can be autosaved
1116           via a new WKPreferencesCreateWithIdentifier function.
1117
1118         * UIProcess/API/C/WKContext.cpp:
1119         * UIProcess/API/C/WKContext.h:
1120         Remove preference related code.
1121
1122         * UIProcess/API/C/WKPageGroup.cpp:
1123         (WKPageGroupSetPreferences):
1124         (WKPageGroupGetPreferences):
1125         * UIProcess/API/C/WKPageGroup.h:
1126         Add getter/setter for preferences.
1127
1128         * UIProcess/API/C/WKPreferences.cpp:
1129         (WKPreferencesCreateWithIdentifier):
1130         * UIProcess/API/C/WKPreferences.h:
1131         Add WKPreferencesCreateWithIdentifier and remove WKPreferencesCreateCopy which is
1132         unused.
1133
1134         * UIProcess/WebContext.cpp:
1135         (WebKit::WebContext::WebContext):
1136         (WebKit::WebContext::~WebContext):
1137         * UIProcess/WebContext.h:
1138         Remove preference related code.
1139
1140         * UIProcess/WebPageGroup.cpp:
1141         (WebKit::WebPageGroup::WebPageGroup):
1142         (WebKit::WebPageGroup::addPage):
1143         (WebKit::WebPageGroup::removePage):
1144         (WebKit::WebPageGroup::setPreferences):
1145         (WebKit::WebPageGroup::preferences):
1146         (WebKit::WebPageGroup::preferencesDidChange):
1147         * UIProcess/WebPageGroup.h:
1148         Add preference and page tracking.
1149
1150         * UIProcess/WebPageNamespace.cpp:
1151         * UIProcess/WebPageNamespace.h:
1152         Remove preference change notification code.
1153
1154         * UIProcess/WebPageProxy.cpp:
1155         (WebKit::WebPageProxy::WebPageProxy):
1156         (WebKit::WebPageProxy::~WebPageProxy):
1157         Add/remove self from page group set.
1158
1159         (WebKit::WebPageProxy::preferencesDidChange):
1160         (WebKit::WebPageProxy::creationParameters):
1161         Get preferences from the pageGroup.
1162
1163         * UIProcess/WebPreferences.cpp:
1164         (WebKit::WebPreferences::WebPreferences):
1165         (WebKit::WebPreferences::addPageGroup):
1166         (WebKit::WebPreferences::removePageGroup):
1167         (WebKit::WebPreferences::update):
1168         * UIProcess/WebPreferences.h:
1169         (WebKit::WebPreferences::create):
1170         Change to track page groups instead of contexts.
1171
1172         * UIProcess/mac/WebPreferencesMac.mm:
1173         (WebKit::makeKey): Add ".WebKit2" prefix for keys.
1174
1175 2010-12-02  Anders Carlsson  <andersca@apple.com>
1176
1177         Reviewed by Sam Weinig.
1178
1179         Flash videos on YouTube flicker
1180         https://bugs.webkit.org/show_bug.cgi?id=50409
1181         <rdar://problem/8668757>
1182
1183         When painting from a backing store, we need to add the source location
1184         to the destination point.
1185
1186         * WebProcess/Plugins/PluginProxy.cpp:
1187         (WebKit::PluginProxy::paint):
1188         (WebKit::PluginProxy::update):
1189
1190 2010-12-02  Sam Weinig  <sam@webkit.org>
1191
1192         Reviewed by Anders Carlsson.
1193
1194         WebKit2 needs API to turn on popup blocking
1195         https://bugs.webkit.org/show_bug.cgi?id=50407
1196
1197         Pipe-through a preference for javascript being able to open
1198         windows without user gesture.
1199
1200         * Shared/WebPreferencesStore.h:
1201         * UIProcess/API/C/WKPreferences.cpp:
1202         (WKPreferencesSetJavaScriptCanOpenWindowsAutomatically):
1203         (WKPreferencesGetJavaScriptCanOpenWindowsAutomatically):
1204         * UIProcess/API/C/WKPreferences.h:
1205         * WebProcess/WebPage/WebPage.cpp:
1206         (WebKit::WebPage::updatePreferences):
1207
1208 2010-12-02  Anders Carlsson  <andersca@apple.com>
1209
1210         Reviewed by Sam Weinig.
1211
1212         Plug-ins should be able to update the mouse cursor
1213         https://bugs.webkit.org/show_bug.cgi?id=50399
1214
1215         Call WKEnableSettingCursorWhenInBackground.
1216
1217         * PluginProcess/mac/PluginProcessMainMac.mm:
1218         (WebKit::PluginProcessMain):
1219
1220 2010-12-02  Sam Weinig  <sam@webkit.org>
1221
1222         Reviewed by Anders Carlsson.
1223
1224         https://bugs.webkit.org/show_bug.cgi?id=50368
1225         Overhaul WebKit2 preferences code
1226
1227         - Reduces the number of places you have to touch to add a new preference
1228           (From 9 down to 4, but with a bit of elbow grease, we should get that
1229            down to 2 or 3).
1230         - Add hooks so that platforms can initialize the preferences based on an
1231           identifier. This is currently only used on the Mac to initialize a
1232           preference store from NSUserDefaults and autosave the changes to disk.
1233           It is not yet enabled due to no way to set the identifier from client
1234           code.
1235
1236         * Shared/WebPageCreationParameters.cpp:
1237         Add necessary #include of WebCoreArgumentCoders.h which is now needed
1238         due to cleanup in WebPreferencesStore.h.
1239
1240         * Shared/WebPreferencesStore.cpp:
1241         (WebKit::WebPreferencesStore::WebPreferencesStore):
1242         (WebKit::WebPreferencesStore::encode):
1243         (WebKit::WebPreferencesStore::decode):
1244         (WebKit::defaultValueForKey):
1245         (WebKit::setValueForKey):
1246         (WebKit::valueForKey):
1247         (WebKit::WebPreferencesStore::setStringValueForKey):
1248         (WebKit::WebPreferencesStore::getStringValueForKey):
1249         (WebKit::WebPreferencesStore::setBoolValueForKey):
1250         (WebKit::WebPreferencesStore::getBoolValueForKey):
1251         (WebKit::WebPreferencesStore::setUInt32ValueForKey):
1252         (WebKit::WebPreferencesStore::getUInt32ValueForKey):
1253         * Shared/WebPreferencesStore.h:
1254         Complete overhaul of this class to store the preferences as
1255         a set of HashMaps and use macros to define the keys and default
1256         values.
1257
1258         * UIProcess/API/C/WKPreferences.cpp:
1259         (WKPreferencesGetFontSmoothingLevel):
1260         Add cast to keep conversion function working.
1261
1262         * UIProcess/WebPreferences.cpp:
1263         (WebKit::WebPreferences::WebPreferences): Add identifier constructor.
1264         (WebKit::WebPreferences::updateStringValueForKey):
1265         (WebKit::WebPreferences::updateBoolValueForKey):
1266         (WebKit::WebPreferences::updateUInt32ValueForKey):
1267         Add type based updaters. These currently give hooks to the platform and
1268         call the generic update, but in the future, we can use this to optimize
1269         updating preferences to not send the entire store for each change.
1270
1271         * UIProcess/WebPreferences.h:
1272         Generate the getters and setters via macro instantiation.
1273
1274         * UIProcess/cf/WebPreferencesCF.cpp: Added.
1275         (WebKit::WebPreferences::platformInitializeStore):
1276         (WebKit::WebPreferences::platformUpdateStringValueForKey):
1277         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1278         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1279         Stubbed out.
1280
1281         * UIProcess/mac/WebPreferencesMac.mm: Added.
1282         (WebKit::makeKey):
1283         (WebKit::setStringValueIfInUserDefaults):
1284         (WebKit::setBoolValueIfInUserDefaults):
1285         (WebKit::setUInt32ValueIfInUserDefaults):
1286         (WebKit::WebPreferences::platformInitializeStore):
1287         (WebKit::WebPreferences::platformUpdateStringValueForKey):
1288         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1289         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1290         Use the platform hooks to initialize and update the store from
1291         NSUserDefaults.
1292         
1293         * UIProcess/qt/WebPreferencesQt.cpp: Added.
1294         (WebKit::WebPreferences::platformInitializeStore):
1295         (WebKit::WebPreferences::platformUpdateStringValueForKey):
1296         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1297         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1298         Stubbed out.
1299
1300         * WebProcess/WebPage/WebPage.cpp:
1301         (WebKit::WebPage::updatePreferences):
1302         * WebProcess/WebPage/win/WebPageWin.cpp:
1303         (WebKit::WebPage::platformPreferencesDidChange):
1304         Update to pull the value using the new type based getters.
1305
1306         * WebKit2.pro:
1307         * WebKit2.xcodeproj/project.pbxproj:
1308         * win/WebKit2.vcproj:
1309         Add new files.
1310
1311 2010-12-02  Steve Falkenburg  <sfalken@apple.com>
1312
1313         Mac build fix.
1314
1315         * WebProcess/WebKitMain.cpp:
1316         (enableDataExecutionPrevention):
1317
1318 2010-11-30 Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
1319
1320         Reviewed by Martin Robinson.
1321
1322         [GTK] Implement RunLoop, WorkQueue, Connection classes for WebKit2
1323         https://bugs.webkit.org/show_bug.cgi?id=48507
1324
1325         * Platform/CoreIPC/Connection.h: UNIX_X11 specific changes for GTK port.
1326         (CoreIPC::Connection::messageProcessingCompleted):
1327         * Platform/CoreIPC/gtk: Added.
1328         * Platform/CoreIPC/gtk/ConnectionGtk.cpp: Added. Connection class implementation for GTK port (UNIX_X11 specific).
1329         (CoreIPC::readBytesFromSocket):
1330         (CoreIPC::writeBytesToSocket):
1331         (CoreIPC::Connection::platformInitialize):
1332         (CoreIPC::Connection::platformInvalidate):
1333         (CoreIPC::Connection::processCompletedMessage):
1334         (CoreIPC::Connection::readEventHandler):
1335         (CoreIPC::Connection::open):
1336         (CoreIPC::Connection::platformCanSendOutgoingMessages):
1337         (CoreIPC::Connection::sendOutgoingMessage):
1338         * Platform/PlatformProcessIdentifier.h: UNIX_X11 specific changes for GTK port.
1339         * Platform/RunLoop.h: GTK port specific changes.
1340         * Platform/WorkQueue.h: GTK port specific changes.
1341         * Platform/gtk/RunLoopGtk.cpp: Added. Runs an event loop using GMainLoop and handles the incoming messages.
1342         (RunLoop::RunLoop):
1343         (RunLoop::~RunLoop):
1344         (RunLoop::run):
1345         (RunLoop::mainLoop):
1346         (RunLoop::stop):
1347         (RunLoop::queueWork):
1348         (RunLoop::wakeUp):
1349         (RunLoop::TimerBase::TimerBase):
1350         (RunLoop::TimerBase::~TimerBase):
1351         (RunLoop::TimerBase::resetTimerSource):
1352         (RunLoop::TimerBase::oneShotTimerFired):
1353         (RunLoop::TimerBase::repeatingTimerFired):
1354         (RunLoop::TimerBase::start):
1355         (RunLoop::TimerBase::stop):
1356         (RunLoop::TimerBase::isActive):
1357         * Platform/gtk/WorkQueueGtk.cpp: Added. Creates a thread and polls on a given fd using GIOChannel. 
1358         Dispatches the obtained messages to RunLoop's GMainLoop.
1359         (WorkQueue::EventSource::EventSource):
1360         (WorkQueue::EventSource::dispatchSource):
1361         (WorkQueue::EventSource::performWorkOnce):
1362         (WorkQueue::EventSource::performWork):
1363         (WorkQueue::EventSource::deleteEventSource):
1364         (WorkQueue::platformInitialize):
1365         (WorkQueue::platformInvalidate):
1366         (WorkQueue::startWorkQueueThread):
1367         (WorkQueue::workQueueThreadBody):
1368         (WorkQueue::registerEventSourceHandler):
1369         (WorkQueue::unregisterEventSourceHandler):
1370         (WorkQueue::scheduleWork):
1371
1372 2010-12-02  Steve Falkenburg  <sfalken@apple.com>
1373
1374         Reviewed by Adam Roben.
1375
1376         Move enableExecutionPrevention to WebKitMain
1377         https://bugs.webkit.org/show_bug.cgi?id=50392
1378
1379         * WebProcess/WebKitMain.cpp:
1380         (enableDataExecutionPrevention):
1381         (WebKitMain):
1382         * WebProcess/win/WebProcessMainWin.cpp:
1383         (WebKit::WebProcessMain):
1384
1385 2010-12-02  Steve Falkenburg  <sfalken@apple.com>
1386
1387         Reviewed by Adam Roben.
1388
1389         Enable DEP at runtime to allow for compatibility with older versions of ATL
1390         https://bugs.webkit.org/show_bug.cgi?id=50378
1391
1392         * WebProcess/win/WebProcessMainWin.cpp:
1393         (WebKit::enableDataExecutionPrevention):
1394         (WebKit::WebProcessMain):
1395         * win/WebKit2WebProcessCommon.vsprops:
1396
1397 2010-12-01  Sam Weinig  <sam@webkit.org>
1398
1399         Fix 64-bit build.
1400
1401         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1402         (WebKit::NetscapePlugin::windowAndViewFramesChanged):
1403
1404 2010-12-01  Anders Carlsson  <andersca@apple.com>
1405
1406         Reviewed by Sam Weinig.
1407
1408         Give the fake Carbon window the right bounds
1409         https://bugs.webkit.org/show_bug.cgi?id=50361
1410
1411         * PluginProcess/PluginControllerProxy.cpp:
1412         (WebKit::PluginControllerProxy::windowAndViewFramesChanged):
1413         * PluginProcess/PluginControllerProxy.h:
1414         * PluginProcess/PluginControllerProxy.messages.in:
1415         * UIProcess/API/mac/WKView.mm:
1416         (-[WKView _updateWindowAndViewFrames]):
1417         Pass both the window frame and view frame along.
1418
1419         (-[WKView renewGState]):
1420         Call _updateWindowAndViewFrames.
1421
1422         * UIProcess/WebPageProxy.cpp:
1423         (WebKit::WebPageProxy::windowAndViewFramesChanged):
1424         Pass both the window frame and view frame along.
1425
1426         * UIProcess/WebPageProxy.h:
1427         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1428         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1429         (WebKit::NetscapePlugin::platformPostInitialize):
1430         We don't want a title bar in our fake window.
1431     
1432         (WebKit::computeFakeWindowBoundsRect):
1433         Compute the fake window bounds.
1434
1435         (WebKit::NetscapePlugin::windowAndViewFramesChanged):
1436         Update the fake window bounds.
1437
1438         * WebProcess/Plugins/Plugin.h:
1439         * WebProcess/Plugins/PluginProxy.cpp:
1440         (WebKit::PluginProxy::windowAndViewFramesChanged):
1441         * WebProcess/Plugins/PluginProxy.h:
1442         * WebProcess/Plugins/PluginView.cpp:
1443         (WebKit::PluginView::windowAndViewFramesChanged):
1444         (WebKit::PluginView::initializePlugin):
1445         * WebProcess/Plugins/PluginView.h:
1446         * WebProcess/WebPage/WebPage.cpp:
1447         (WebKit::WebPage::windowAndViewFramesChanged):
1448         * WebProcess/WebPage/WebPage.h:
1449         (WebKit::WebPage::windowFrameInScreenCoordinates):
1450         (WebKit::WebPage::viewFrameInWindowCoordinates):
1451         * WebProcess/WebPage/WebPage.messages.in:
1452         Pass both the window frame and view frame along.
1453
1454 2010-12-01  Jia Pu  <jpu@apple.com>
1455
1456         Reviewed by Darin Adler.
1457
1458         Support multiple correction candidates panel for misspelled word on Mac OS X.
1459         https://bugs.webkit.org/show_bug.cgi?id=50137
1460         <rdar://problem/8568059>
1461
1462         Adopted new function signatures defined in base class.
1463
1464         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1465         (WebKit::WebEditorClient::getGuessesForWord):
1466         * WebProcess/WebCoreSupport/WebEditorClient.h:
1467         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1468         (WebKit::WebEditorClient::showCorrectionPanel):
1469
1470 2010-12-01  Simon Fraser  <simon.fraser@apple.com>
1471
1472         Reviewed by John Sullivan.
1473
1474         Hit testing broken on sibling views of the WKView
1475         <rdar://problem/8718397>
1476         
1477         Make sure that hitView is not null when comparing with the
1478         _layerHostingView.
1479
1480         * UIProcess/API/mac/WKView.mm:
1481         (-[WKView hitTest:]):
1482
1483 2010-12-01  Anders Carlsson  <andersca@apple.com>
1484
1485         Reviewed by Sam Weinig.
1486
1487         Implement the remaining PluginController/Plugin member functions
1488         https://bugs.webkit.org/show_bug.cgi?id=50356
1489
1490         * PluginProcess/PluginControllerProxy.cpp:
1491         (WebKit::PluginControllerProxy::cancelStreamLoad):
1492         (WebKit::PluginControllerProxy::cancelManualStreamLoad):
1493         (WebKit::PluginControllerProxy::setStatusbarText):
1494         (WebKit::PluginControllerProxy::pluginProcessCrashed):
1495         (WebKit::PluginControllerProxy::frameDidFinishLoading):
1496         (WebKit::PluginControllerProxy::frameDidFail):
1497         (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
1498         (WebKit::PluginControllerProxy::manualStreamDidReceiveData):
1499         (WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
1500         (WebKit::PluginControllerProxy::manualStreamDidFail):
1501         * PluginProcess/PluginControllerProxy.h:
1502         * PluginProcess/PluginControllerProxy.messages.in:
1503         * WebProcess/Plugins/PluginProxy.cpp:
1504         (WebKit::PluginProxy::frameDidFinishLoading):
1505         (WebKit::PluginProxy::frameDidFail):
1506         (WebKit::PluginProxy::manualStreamDidReceiveResponse):
1507         (WebKit::PluginProxy::manualStreamDidReceiveData):
1508         (WebKit::PluginProxy::manualStreamDidFinishLoading):
1509         (WebKit::PluginProxy::manualStreamDidFail):
1510         (WebKit::PluginProxy::windowFrameChanged):
1511         (WebKit::PluginProxy::cancelStreamLoad):
1512         (WebKit::PluginProxy::cancelManualStreamLoad):
1513         (WebKit::PluginProxy::setStatusbarText):
1514         * WebProcess/Plugins/PluginProxy.h:
1515         * WebProcess/Plugins/PluginProxy.messages.in:
1516
1517 2010-12-01  Steve Falkenburg  <sfalken@apple.com>
1518
1519         Reviewed by Adam Roben.
1520
1521         WinCairo build should not use link-time code generation (LTCG)
1522         https://bugs.webkit.org/show_bug.cgi?id=50353
1523
1524         * win/WebKit2.vcproj:
1525         * win/WebKit2WebProcess.vcproj:
1526
1527 2010-12-01  Anders Carlsson  <andersca@apple.com>
1528
1529         Reviewed by Sam Weinig..
1530
1531         Fix <rdar://problem/8717674>.
1532
1533         * WebProcess/com.apple.WebProcess.sb:
1534         Allow the UI process to issue file-write extensions.
1535
1536 2010-12-01  Sam Weinig  <sam@webkit.org>
1537
1538         Another windows build fix.
1539
1540         * UIProcess/API/C/win/WKView.cpp:
1541         (WKViewCreate):
1542
1543 2010-12-01  Sam Weinig  <sam@webkit.org>
1544
1545         Attempt to fix Windows build.
1546
1547         * UIProcess/API/C/win/WKViewPrivate.cpp:
1548         * UIProcess/API/C/win/WKViewPrivate.h:
1549
1550 2010-12-01  Sam Weinig  <sam@webkit.org>
1551
1552         Reviewed by Anders Carlsson.
1553
1554         Add PageGrouping to WebKit2 API
1555         https://bugs.webkit.org/show_bug.cgi?id=50332
1556
1557         - Adds WKPageGroupRef and WKBundlePageGroupRef API objects
1558           (backed by WebPageGroup and WebPageGroupProxy respectively).
1559         - Moves visibleToInjectedBundle from page to PageGroup.
1560         - Make userScript/userStyleSheet functions take a page group parameter.
1561
1562         * Shared/API/c/WKBase.h:
1563         * Shared/APIObject.h:
1564         * Shared/WebPageCreationParameters.cpp:
1565         (WebKit::WebPageCreationParameters::encode):
1566         (WebKit::WebPageCreationParameters::decode):
1567         * Shared/WebPageCreationParameters.h:
1568         * Shared/WebPageGroupData.cpp: Added.
1569         (WebKit::WebPageGroupData::encode):
1570         (WebKit::WebPageGroupData::decode):
1571         * Shared/WebPageGroupData.h: Added.
1572         * UIProcess/API/C/WKAPICast.h:
1573         * UIProcess/API/C/WKPage.cpp:
1574         (WKPageGetPageGroup):
1575         * UIProcess/API/C/WKPage.h:
1576         * UIProcess/API/C/WKPageGroup.cpp: Added.
1577         (WKPageGroupGetTypeID):
1578         (WKPageGroupCreateWithIdentifier):
1579         (WKPageGroupCopyIdentifier):
1580         * UIProcess/API/C/WKPageGroup.h: Added.
1581         * UIProcess/API/C/WebKit2.h:
1582         * UIProcess/API/C/win/WKView.cpp:
1583         (WKViewCreate):
1584         * UIProcess/API/C/win/WKView.h:
1585         * UIProcess/API/mac/WKView.h:
1586         * UIProcess/API/mac/WKView.mm:
1587         (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
1588         (-[WKView initWithFrame:pageNamespaceRef:]):
1589         * UIProcess/API/mac/WKViewInternal.h:
1590         * UIProcess/API/qt/qwkpage.cpp:
1591         (QWKPagePrivate::QWKPagePrivate):
1592         * UIProcess/WebContext.cpp:
1593         (WebKit::WebContext::WebContext):
1594         (WebKit::WebContext::createWebPage):
1595         * UIProcess/WebContext.h:
1596         * UIProcess/WebContextUserMessageCoders.h:
1597         (WebKit::WebContextUserMessageEncoder::encode):
1598         (WebKit::WebContextUserMessageDecoder::decode):
1599         * UIProcess/WebInspectorProxy.cpp:
1600         (WebKit::WebInspectorProxy::inspectorPageGroup):
1601         * UIProcess/WebInspectorProxy.h:
1602         * UIProcess/WebPageGroup.cpp: Added.
1603         (WebKit::generatePageGroupID):
1604         (WebKit::webPageGroupMap):
1605         (WebKit::WebPageGroup::create):
1606         (WebKit::WebPageGroup::get):
1607         (WebKit::WebPageGroup::WebPageGroup):
1608         (WebKit::WebPageGroup::~WebPageGroup):
1609         * UIProcess/WebPageGroup.h: Added.
1610         (WebKit::WebPageGroup::identifier):
1611         (WebKit::WebPageGroup::pageGroupID):
1612         (WebKit::WebPageGroup::data):
1613         (WebKit::WebPageGroup::type):
1614         * UIProcess/WebPageNamespace.cpp:
1615         (WebKit::WebPageNamespace::createWebPage):
1616         * UIProcess/WebPageNamespace.h:
1617         * UIProcess/WebPageProxy.cpp:
1618         (WebKit::WebPageProxy::create):
1619         (WebKit::WebPageProxy::WebPageProxy):
1620         (WebKit::WebPageProxy::creationParameters):
1621         * UIProcess/WebPageProxy.h:
1622         (WebKit::WebPageProxy::pageGroup):
1623         * UIProcess/WebProcessProxy.cpp:
1624         (WebKit::WebProcessProxy::createWebPage):
1625         * UIProcess/WebProcessProxy.h:
1626         * UIProcess/mac/WebInspectorProxyMac.mm:
1627         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1628         * UIProcess/win/WebView.cpp:
1629         (WebKit::WebView::WebView):
1630         * UIProcess/win/WebView.h:
1631         (WebKit::WebView::create):
1632         * WebKit2.pro:
1633         * WebKit2.xcodeproj/project.pbxproj:
1634         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1635         (WKBundleAddUserScript):
1636         (WKBundleAddUserStyleSheet):
1637         (WKBundleRemoveUserScript):
1638         (WKBundleRemoveUserStyleSheet):
1639         (WKBundleRemoveUserScripts):
1640         (WKBundleRemoveUserStyleSheets):
1641         (WKBundleRemoveAllUserContent):
1642         (WKBundleOverrideXSSAuditorEnabledForTestRunner):
1643         * WebProcess/InjectedBundle/API/c/WKBundle.h:
1644         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1645         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1646         (WKBundlePageGetPageGroup):
1647         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1648         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp: Added.
1649         (WKBundlePageGroupGetTypeID):
1650         (WKBundlePageGroupCopyIdentifier):
1651         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h: Added.
1652         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1653         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1654         (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
1655         (WebKit::InjectedBundle::addUserScript):
1656         (WebKit::InjectedBundle::addUserStyleSheet):
1657         (WebKit::InjectedBundle::removeUserScript):
1658         (WebKit::InjectedBundle::removeUserStyleSheet):
1659         (WebKit::InjectedBundle::removeUserScripts):
1660         (WebKit::InjectedBundle::removeUserStyleSheets):
1661         (WebKit::InjectedBundle::removeAllUserContent):
1662         (WebKit::InjectedBundle::didInitializePageGroup):
1663         * WebProcess/InjectedBundle/InjectedBundle.h:
1664         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
1665         (WebKit::InjectedBundleClient::didInitializePageGroup):
1666         * WebProcess/InjectedBundle/InjectedBundleClient.h:
1667         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
1668         (WebKit::InjectedBundleUserMessageEncoder::encode):
1669         (WebKit::InjectedBundleUserMessageDecoder::decode):
1670         * WebProcess/WebPage/WebPage.cpp:
1671         (WebKit::WebPage::create):
1672         (WebKit::WebPage::WebPage):
1673         (WebKit::WebPage::close):
1674         * WebProcess/WebPage/WebPage.h:
1675         (WebKit::WebPage::pageGroup):
1676         * WebProcess/WebPage/WebPageGroupProxy.cpp: Added.
1677         (WebKit::WebPageGroupProxy::create):
1678         (WebKit::WebPageGroupProxy::~WebPageGroupProxy):
1679         * WebProcess/WebPage/WebPageGroupProxy.h: Added.
1680         (WebKit::WebPageGroupProxy::identifier):
1681         (WebKit::WebPageGroupProxy::pageGroupID):
1682         (WebKit::WebPageGroupProxy::isVisibleToInjectedBundle):
1683         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1684         (WebKit::WebPageGroupProxy::type):
1685         * WebProcess/WebProcess.cpp:
1686         (WebKit::WebProcess::webPageGroup):
1687         * WebProcess/WebProcess.h:
1688         * win/WebKit2.vcproj:
1689         * win/WebKit2Generated.make:
1690
1691 2010-12-01  Steve Falkenburg  <sfalken@apple.com>
1692
1693         Reviewed by Adam Roben.
1694
1695         vcproj changes can't be applied cleanly by the Windows EWS bot
1696         https://bugs.webkit.org/show_bug.cgi?id=50328
1697
1698         * win/WebKit2.submit.sln: Added property svn:eol-style.
1699         * win/WebKit2.vcproj: Added property svn:eol-style.
1700         * win/WebKit2Apple.vsprops: Added property svn:eol-style.
1701         * win/WebKit2CFLite.vsprops: Added property svn:eol-style.
1702         * win/WebKit2Common.vsprops: Added property svn:eol-style.
1703         * win/WebKit2DirectX.vsprops: Added property svn:eol-style.
1704         * win/WebKit2Generated.vcproj: Added property svn:eol-style.
1705         * win/WebKit2GeneratedCommon.vsprops: Added property svn:eol-style.
1706         * win/WebKit2WebProcess.vcproj: Added property svn:eol-style.
1707         * win/WebKit2WebProcessCommon.vsprops: Added property svn:eol-style.
1708
1709 2010-12-01  Simon Fraser  <simon.fraser@apple.com>
1710
1711         Reviewed by Anders Carlsson.
1712
1713         Size changes on layer-backed drawing areas don't always end up with the correct value
1714         https://bugs.webkit.org/show_bug.cgi?id=50351
1715         <rdar://problem/8692966>
1716         
1717         When the UI process does not receive didSetSize messages promptly, 
1718         LayerBackedDrawingAreaProxy::setSize() bails early based on the
1719         m_isWaitingForDidSetFrameNotification flag.
1720         
1721         In this situation, the final size may be incorrect. didSetSize()
1722         needs to compare the size that the web process has to the expected size,
1723         and send a final setSize if they differ.
1724
1725         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1726         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
1727         (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
1728         * UIProcess/LayerBackedDrawingAreaProxy.h:
1729         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1730         (WebKit::LayerBackedDrawingArea::setSize):
1731
1732 2010-12-01  Simon Fraser  <simon.fraser@apple.com>
1733
1734         Reviewed by Anders Carlsson.
1735
1736         Crash when closing WebKit2 window with accelerated composting content
1737         https://bugs.webkit.org/show_bug.cgi?id=50307
1738         <rdar://problem/8640126>
1739         
1740         When the web page is closing, notify the drawing area, so that
1741         the layer-backed drawing area can kill the runloop obsever,
1742         then clear it. Clearing it is not sufficient, since the drawing
1743         area is ref-counted.
1744
1745         * WebProcess/WebPage/DrawingArea.h:
1746         (WebKit::DrawingArea::onPageClose):
1747         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1748         * WebProcess/WebPage/WebPage.cpp:
1749         (WebKit::WebPage::close):
1750         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1751         (WebKit::LayerBackedDrawingArea::platformClear):
1752         (WebKit::LayerBackedDrawingArea::onPageClose):
1753
1754 2010-12-01  Anders Carlsson  <andersca@apple.com>
1755
1756         Reviewed by Darin Adler.
1757
1758         Return a correct user agent if NPN_UserAgent is called with a null NPP from NPP_New.
1759         https://bugs.webkit.org/show_bug.cgi?id=50336
1760
1761         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1762         (WebKit::NPN_UserAgent):
1763         Call the static NetscapePlugin::userAgent function instead.
1764
1765         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1766         (WebKit::NetscapePlugin::userAgent):
1767         If the passed in NPP is null, get the NetscapePlugin currently executing NPP_New.
1768
1769         (WebKit::NetscapePlugin::initialize):
1770         Keep track of the plug-in currently executing NPP_New.
1771
1772         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1773
1774 2010-12-01  Brian Weinstein  <bweinstein@apple.com>
1775
1776         One last Windows build fix.
1777
1778         * UIProcess/win/WebView.cpp:
1779         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
1780
1781 2010-12-01  Anders Carlsson  <andersca@apple.com>
1782
1783         Fix Windows build.
1784
1785         * UIProcess/win/WebView.cpp:
1786         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
1787         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
1788         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
1789
1790 2010-12-01  Anders Carlsson  <andersca@apple.com>
1791
1792         Fix build.
1793
1794         * UIProcess/win/WebView.h:
1795
1796 2010-12-01  Anders Carlsson  <andersca@apple.com>
1797
1798         Reviewed by Andreas Kling.
1799
1800         Get rid of DrawingAreaBase
1801         https://bugs.webkit.org/show_bug.cgi?id=50329
1802
1803         * Scripts/webkit2/messages.py:
1804         * Shared/DrawingAreaInfo.h:
1805         (WebKit::DrawingAreaInfo::DrawingAreaInfo):
1806         * Shared/WebPageCreationParameters.h:
1807         * UIProcess/API/mac/WKView.mm:
1808         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
1809         (-[WKView _pageDidEnterAcceleratedCompositing]):
1810         (-[WKView _pageDidLeaveAcceleratedCompositing]):
1811         * UIProcess/API/qt/qgraphicswkview.cpp:
1812         (QGraphicsWKView::takeSnapshot):
1813         (QGraphicsWKViewPrivate::commitScale):
1814         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1815         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
1816         (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
1817         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
1818         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
1819         * UIProcess/DrawingAreaProxy.cpp:
1820         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1821         (WebKit::DrawingAreaProxy::nextIdentifier):
1822         * UIProcess/DrawingAreaProxy.h:
1823         (WebKit::DrawingAreaProxy::info):
1824         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1825         (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
1826         (WebKit::LayerBackedDrawingAreaProxy::setSize):
1827         (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
1828         (WebKit::LayerBackedDrawingAreaProxy::update):
1829         * UIProcess/TiledDrawingAreaProxy.cpp:
1830         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
1831         * UIProcess/WebPageProxy.cpp:
1832         (WebKit::WebPageProxy::didChangeAcceleratedCompositing):
1833         * UIProcess/WebPageProxy.h:
1834         * UIProcess/WebPageProxy.messages.in:
1835         * UIProcess/win/WebView.cpp:
1836         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
1837         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1838         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1839         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1840         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1841         * WebProcess/WebPage/DrawingArea.cpp:
1842         (WebKit::DrawingArea::create):
1843         (WebKit::DrawingArea::DrawingArea):
1844         * WebProcess/WebPage/DrawingArea.h:
1845         (WebKit::DrawingArea::info):
1846         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1847         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1848         (WebKit::LayerBackedDrawingArea::didReceiveMessage):
1849         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1850         * WebProcess/WebPage/TiledDrawingArea.cpp:
1851         (WebKit::TiledDrawingArea::TiledDrawingArea):
1852         * WebProcess/WebPage/TiledDrawingArea.h:
1853         * WebProcess/WebPage/WebPage.cpp:
1854         (WebKit::WebPage::WebPage):
1855         (WebKit::WebPage::changeAcceleratedCompositingMode):
1856
1857 2010-11-30  Ryosuke Niwa  <rniwa@webkit.org>
1858
1859         Unreviewed speculative build fix for Windows.
1860
1861         * UIProcess/win/WebView.cpp:
1862         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
1863         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
1864         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
1865         * UIProcess/win/WebView.h:
1866
1867 2010-11-30  Anders Carlsson  <andersca@apple.com>
1868
1869         Fix Qt build.
1870
1871         * UIProcess/API/qt/qgraphicswkview.cpp:
1872         (QGraphicsWKView::takeSnapshot):
1873         (QGraphicsWKViewPrivate::commitScale):
1874
1875 2010-11-30  Anders Carlsson  <andersca@apple.com>
1876
1877         Reviewed by Sam Weinig.
1878
1879         Change DrawingArea and DrawingAreaProxy to not inherit from DrawingAreaBase
1880         https://bugs.webkit.org/show_bug.cgi?id=50300
1881
1882         * UIProcess/API/mac/WKView.mm:
1883         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaBase::]):
1884         (-[WKView _pageDidEnterAcceleratedCompositing]):
1885         (-[WKView _pageDidLeaveAcceleratedCompositing]):
1886         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1887         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
1888         * UIProcess/DrawingAreaProxy.cpp:
1889         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1890         (WebKit::DrawingAreaProxy::nextDrawingAreaID):
1891         * UIProcess/DrawingAreaProxy.h:
1892         (WebKit::DrawingAreaProxy::info):
1893         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1894         (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
1895         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1896         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1897         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1898         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1899         * WebProcess/WebPage/DrawingArea.cpp:
1900         (WebKit::DrawingArea::create):
1901         (WebKit::DrawingArea::DrawingArea):
1902         * WebProcess/WebPage/DrawingArea.h:
1903         (WebKit::DrawingArea::info):
1904         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1905         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1906         (WebKit::LayerBackedDrawingArea::didReceiveMessage):
1907         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1908         * WebProcess/WebPage/TiledDrawingArea.cpp:
1909         (WebKit::TiledDrawingArea::TiledDrawingArea):
1910         * WebProcess/WebPage/TiledDrawingArea.h:
1911         * WebProcess/WebPage/WebPage.cpp:
1912         (WebKit::WebPage::changeAcceleratedCompositingMode):
1913
1914 2010-11-30  Simon Fraser  <simon.fraser@apple.com>
1915
1916         Reviewed by Sam Weinig.
1917
1918         Context menus broken after WebKit2 goes into accelerated composting mode.
1919         https://bugs.webkit.org/show_bug.cgi?id=50296
1920         
1921         Override hitTest: on the WKView to exclude the child layer-backed view from
1922         hit testing, so that context menus work.
1923
1924         * UIProcess/API/mac/WKView.mm:
1925         (-[WKView hitTest:]):
1926
1927 2010-11-30  Mark Rowe  <mrowe@apple.com>
1928
1929         Reviewed by Sam Weinig.
1930
1931         Build fix.
1932
1933         * Configurations/BaseTarget.xcconfig: Don't run Copy Files and Run Script build phases
1934         during installhdrs. It's not necessary, and it results in Xcode attempting to copy the
1935         plug-in shim dylib when it has not yet been built.
1936         * WebKit2.xcodeproj/project.pbxproj: Stop copying the .xcconfig file in to the application
1937         wrapper.
1938
1939 2010-11-30  Anders Carlsson  <andersca@apple.com>
1940
1941         Fix build.
1942
1943         * Scripts/webkit2/messages.py:
1944
1945 2010-11-30  Anders Carlsson  <andersca@apple.com>
1946
1947         Reviewed by Sam Weinig.
1948
1949         Rename DrawingAreaBase.h to DrawingAreaInfo.h.
1950
1951         * Shared/DrawingAreaInfo.h: Renamed from WebKit2/Shared/DrawingAreaBase.h.
1952         (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
1953         (WebKit::DrawingAreaBase::~DrawingAreaBase):
1954         (WebKit::DrawingAreaBase::info):
1955         (WebKit::DrawingAreaBase::DrawingAreaBase):
1956         * Shared/WebPageCreationParameters.h:
1957         * UIProcess/DrawingAreaProxy.h:
1958         * WebKit2.xcodeproj/project.pbxproj:
1959         * WebProcess/WebPage/DrawingArea.h:
1960         * win/WebKit2.vcproj:
1961
1962 2010-11-30  Anders Carlsson  <andersca@apple.com>
1963
1964         Fix build.
1965
1966         * PluginProcess/mac/PluginProcessShim.cpp:
1967
1968 2010-11-30  Anders Carlsson  <andersca@apple.com>
1969
1970         Reviewed by Dan Bernstein.
1971
1972         Add a simple shim function for Debugger().
1973         https://bugs.webkit.org/show_bug.cgi?id=50268
1974
1975         * PluginProcess/PluginProcess.h:
1976         * PluginProcess/mac/PluginProcessMac.mm:
1977         (WebKit::initShouldCallRealDebugger):
1978         We only want to call the real Debugger() function when USERBREAK is set.
1979
1980         (WebKit::shouldCallRealDebugger):
1981         Return whether USERBREAK is set.
1982         
1983         (WebKit::PluginProcess::initializeShim):
1984         Initialize the shim.
1985
1986         * PluginProcess/mac/PluginProcessMainMac.mm:
1987         (WebKit::PluginProcessMain):
1988         Call PluginProcess::initializeShim.
1989
1990         * PluginProcess/mac/PluginProcessShim.cpp:
1991         (WebKit::WebKitPluginProcessShimInitialize):
1992         This now takes a struct of callbacks.
1993
1994         (WebKit::shimDebugger):
1995         Call the shouldCallDebugger function. If it returns true, the real Debugger() function should be called.
1996
1997         * PluginProcess/mac/PluginProcessShim.h:
1998         * WebKit2.xcodeproj/project.pbxproj:
1999
2000 2010-11-30  Anders Carlsson  <andersca@apple.com>
2001
2002         Reviewed by Sam Weinig.
2003
2004         Pass the plug-in process shim in DYLD_INSERT_LIBRARIES when launching the plug-in process
2005         https://bugs.webkit.org/show_bug.cgi?id=50262
2006
2007         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2008         Add an EnvironmentVariables class that allows for easy modification of the environment variables
2009         passed to posix_spawn.
2010
2011         (WebKit::ProcessLauncher::launchProcess):
2012         When spawning the plug-in process, insert the plug-in process shim.
2013
2014 2010-11-30  Anders Carlsson  <andersca@apple.com>
2015
2016         Reviewed by Sam Weinig.
2017
2018         Add plug-in process shim
2019         https://bugs.webkit.org/show_bug.cgi?id=50261
2020
2021         * Configurations/PluginProcessShim.xcconfig: Added.
2022         * PluginProcess/mac/PluginProcessShim.cpp: Added.
2023         (PluginProcessShimInitialize):
2024         * PluginProcess/mac/PluginProcessShim.h: Added.
2025         * WebKit2.xcodeproj/project.pbxproj:
2026
2027 2010-11-30  Brian Weinstein  <bweinstein@apple.com>
2028
2029         Fix the Windows build by copying WKFindOptions.h into WebKitOutputDir with the other headers.
2030
2031         * win/WebKit2Generated.make:
2032
2033 2010-11-30  Dan Bernstein  <mitz@apple.com>
2034
2035         Try to fix the Windows build.
2036
2037         * win/WebKit2.vcproj:
2038
2039 2010-11-30  Dan Bernstein  <mitz@apple.com>
2040
2041         Reviewed by Anders Carlsson.
2042
2043         Injected bundle support for <rdar://problem/8710645> WebKitTestRunner needs layoutTestController.findString
2044         https://bugs.webkit.org/show_bug.cgi?id=50238
2045
2046         * Shared/API/c/WKFindOptions.h: Added. Moved the definition of WKFindOptions here from WKPage.h.
2047         * Shared/API/c/WKSharedAPICast.h:
2048         (WebKit::toFindOptions): Moved from WKAPICast.h.
2049         * UIProcess/API/C/WKAPICast.h:
2050         * UIProcess/API/C/WKPage.h:
2051         * WebKit2.xcodeproj/project.pbxproj: Added WKFindOptions.h.
2052         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2053         (WKBundlePageFindString): Added.
2054         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2055         * WebProcess/WebPage/WebPage.cpp:
2056         (WebKit::WebPage::findStringFromInjectedBundle): Added.
2057         * WebProcess/WebPage/WebPage.h:
2058
2059 2010-11-30  Andreas Kling  <kling@webkit.org>
2060
2061         Reviewed by Dirk Schulze.
2062
2063         GraphicsContext: Remove "current path" and have strokePath, fillPath and clipPath take a Path argument
2064         https://bugs.webkit.org/show_bug.cgi?id=48516
2065
2066         * UIProcess/FindIndicator.cpp:
2067         (WebKit::FindIndicator::draw):
2068
2069 2010-11-30  Steve Falkenburg  <sfalken@apple.com>
2070
2071         Reviewed by Adam Roben.
2072
2073         All projects on Windows should use cmd files for build events
2074         https://bugs.webkit.org/show_bug.cgi?id=50213
2075
2076         * win/WebKit2Common.vsprops:
2077         * win/WebKit2WebProcessCommon.vsprops:
2078         * win/WebKit2WebProcessPostBuild.cmd: Added.
2079         * win/WebKit2WebProcessPreBuild.cmd: Added.
2080         * win/WebKitPostBuild.cmd: Added.
2081         * win/WebKitPreBuild.cmd: Added.
2082         * win/WebKitPreLink.cmd: Added.
2083
2084 2010-11-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2085
2086         Reviewed by Andreas Kling.
2087
2088         [Qt] Early return if setResizesToContentsUsingLayoutSize() is called with already-set size
2089
2090         * WebProcess/WebPage/WebPage.cpp:
2091         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2092
2093 2010-11-29  Dan Bernstein  <mitz@apple.com>
2094
2095         Reviewed by Darin Adler.
2096
2097         WebKit2 part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
2098         https://bugs.webkit.org/show_bug.cgi?id=50038
2099         Based on a patch from Darin Adler.
2100
2101         * Shared/WebFindOptions.h: Renamed FindOptions.h to this to account for WebCore’s new private
2102         FindOptions.h. Added and reordered FindOptions and rolled FindDirection into FindOptions.
2103         * UIProcess/API/C/WKAPICast.h: Removed toFindDirection().
2104         (WebKit::toFindOptions): Updated for new values.
2105         * UIProcess/API/C/WKPage.cpp:
2106         (WKPageFindString): Removed separate WKFindDirection.
2107         (WKPageCountStringMatches): Replaces caseInsensitive boolean with WKFindOptions.
2108         * UIProcess/API/C/WKPage.h: Removed WKFindDirection and updated WKFindOptions.
2109         * UIProcess/WebPageProxy.cpp:
2110         (WebKit::WebPageProxy::findString): Removed separate FindDirection.
2111         (WebKit::WebPageProxy::countStringMatches): Replaced caseInsensitive boolean with FindOptions.
2112         * UIProcess/WebPageProxy.h:
2113         * WebKit2.xcodeproj/project.pbxproj: Updated for the header rename.
2114         * WebProcess/WebPage/FindController.cpp:
2115         (WebKit::core): Added. Converts WebKit2 FindOptions to WebCore FindOptions.
2116         (WebKit::FindController::countStringMatches): Changed to use FindOptions.
2117         (WebKit::FindController::findString): Ditto.
2118         * WebProcess/WebPage/FindController.h:
2119         * WebProcess/WebPage/WebPage.cpp:
2120         (WebKit::WebPage::findString): Ditto.
2121         (WebKit::WebPage::countStringMatches): Ditto.
2122         * WebProcess/WebPage/WebPage.h:
2123         * WebProcess/WebPage/WebPage.messages.in: Ditto.
2124
2125 2010-11-29  Brent Fulgham  <bfulgham@webkit.org>
2126
2127         Unreviewed build fix.
2128
2129         * win/WebKit2.vcproj: Add missing vsprops association for
2130         Debug_Cairo_CFLite target.
2131
2132 2010-11-29  Anders Carlsson  <andersca@apple.com>
2133
2134         Reviewed by Sam Weinig.
2135
2136         Cursor does not always change back to arrow when exiting image document
2137         https://bugs.webkit.org/show_bug.cgi?id=50190
2138         <rdar://problem/8665265>
2139
2140         * Shared/mac/WebEventFactory.mm:
2141         (WebKit::mouseEventTypeForEvent):
2142         (WebKit::globalPointForEvent):
2143         (WebKit::pointForEvent):
2144         Handle the NSMouseEntered and NSMouseExited events.
2145
2146         * UIProcess/API/mac/WKView.mm:
2147         (-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]):
2148         We want entered and exited events for this tracking area.
2149         Add mouseEntered and mouseExited handlers.
2150
2151 2010-11-29  Anders Carlsson  <andersca@apple.com>
2152
2153         Reviewed by Darin Adler.
2154
2155         Should be able to pause and resume downloads
2156         https://bugs.webkit.org/show_bug.cgi?id=50185
2157         <rdar://problem/8691135>
2158
2159         * UIProcess/API/C/WKContext.h:
2160         Add didCancel callback.
2161
2162         * UIProcess/API/C/WKDownload.cpp:
2163         (WKDownloadGetResumeData):
2164         (WKDownloadCancel):
2165         Call the respective DownloadProxy member functions.
2166
2167         * UIProcess/API/C/WKDownload.h:
2168         * UIProcess/Downloads/DownloadProxy.cpp:
2169         (WebKit::DownloadProxy::cancel):
2170         Send Cancel to the WebProcess.
2171
2172         (WebKit::DownloadProxy::didFail):
2173         This now takes a resumeData reference.
2174
2175         (WebKit::DownloadProxy::didCancel):
2176         Set the resume data and call didCancel.
2177
2178         * UIProcess/Downloads/DownloadProxy.h:
2179         (WebKit::DownloadProxy::resumeData):
2180         Return the resume data.
2181
2182         * UIProcess/Downloads/DownloadProxy.messages.in:
2183         Add DidCancel message, Add resume data to DidFail.
2184
2185         * UIProcess/WebDownloadClient.cpp:
2186         (WebKit::WebDownloadClient::didCancel):
2187         Call the didCancel context client function.
2188
2189         * WebProcess/Downloads/Download.cpp:
2190         (WebKit::Download::didFail):
2191         This now takes a resume data argument as well.
2192         
2193         (WebKit::Download::didCancel):
2194         Send DidCancel.
2195
2196         * WebProcess/Downloads/DownloadManager.cpp:
2197         (WebKit::DownloadManager::cancelDownload):
2198         Look up the download and cancel it.
2199
2200         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2201         (WebKit::Download::cancel):
2202         Add stub.
2203
2204         * WebProcess/Downloads/mac/DownloadMac.mm:
2205         (WebKit::Download::cancel):
2206         Cancel the download.
2207
2208         (-[WKDownloadAsDelegate download:didFailWithError:]):
2209         Pass the resume data along.
2210
2211         * WebProcess/Downloads/qt/DownloadQt.cpp:
2212         (WebKit::Download::cancel):
2213         Add stub.
2214
2215         * WebProcess/WebProcess.cpp:
2216         (WebKit::WebProcess::cancelDownload):
2217         Ask the download manager to cancel the download.
2218
2219         * WebProcess/WebProcess.h:
2220         * WebProcess/WebProcess.messages.in:
2221         Add CancelDownload message.
2222
2223 2010-11-29  Balazs Kelemen  <kbalazs@webkit.org>
2224
2225         Reviewed by Adam Roben.
2226
2227         [WK2] Support repeating timers
2228         https://bugs.webkit.org/show_bug.cgi?id=50024
2229
2230         Added boolean member for TimerBase on PLATFORM(WIN)
2231         and PLATFORM(QT) to be able to differentiate between
2232         repeating and one shot operating mode. Change the confusing
2233         signature of TimerBase::start: use a bool for selecting
2234         operating mode.
2235         * Platform/RunLoop.h:
2236         (RunLoop::TimerBase::startRepeating):
2237         (RunLoop::TimerBase::startOneShot):
2238         * Platform/mac/RunLoopMac.mm:
2239         (RunLoop::TimerBase::start):
2240         * Platform/qt/RunLoopQt.cpp:
2241         (RunLoop::TimerBase::timerFired): Only stop the timer if it
2242         is not in repeating mode.
2243         (RunLoop::TimerBase::TimerBase): 
2244         (RunLoop::TimerBase::start):
2245         * Platform/win/RunLoopWin.cpp:
2246         (RunLoop::TimerBase::timerFired):  Only stop the timer if it
2247         is not in repeating mode.
2248         (RunLoop::TimerBase::TimerBase):
2249         (RunLoop::TimerBase::start):
2250
2251 2010-11-29  Anders Carlsson  <andersca@apple.com>
2252
2253         Reviewed by Sam Weinig.
2254
2255         Downloads: When the web process crashes, call error callbacks for pending downloads
2256         https://bugs.webkit.org/show_bug.cgi?id=50164
2257         <rdar://problem/8691170>
2258
2259         * UIProcess/API/C/WKContext.h:
2260         Add processDidCrash callback.
2261
2262         * UIProcess/Downloads/DownloadProxy.cpp:
2263         (WebKit::DownloadProxy::~DownloadProxy):
2264         Assert that the web context is null.
2265
2266         (WebKit::DownloadProxy::processDidClose):
2267         Call the processDidCrash callback.
2268
2269         (WebKit::DownloadProxy::didFinish):
2270         (WebKit::DownloadProxy::didFail):
2271         Call downloadFinished.
2272
2273         * UIProcess/WebContext.cpp:
2274         (WebKit::WebContext::processDidClose):
2275         Call processDidClose on all pending downloads.
2276
2277         (WebKit::WebContext::downloadFinished):
2278         Remove the download proxy from the map.
2279
2280         * UIProcess/WebDownloadClient.cpp:
2281         (WebKit::WebDownloadClient::processDidCrash):
2282         Call the processDidCrash callback function.
2283
2284 2010-11-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2285
2286         Reviewed by Kenneth Rohde Christiansen.
2287
2288         [Qt] Allow pre-generation for package builds for WebKit2
2289         https://bugs.webkit.org/show_bug.cgi?id=50139
2290
2291         Use a build variable for the generated directory path and set the
2292         value based on CONFIG just like for WebKit1.
2293
2294         For non-package builds use a relative base path for the
2295         genrated directory just like for WebKit1.
2296
2297         * DerivedSources.pro:
2298         * WebKit2.pro:
2299
2300 2010-11-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2301
2302         Reviewed by Kenneth Rohde Christiansen.
2303
2304         [Qt] Move some build logic from Qt to platform independent code
2305         https://bugs.webkit.org/show_bug.cgi?id=50134
2306
2307         Remove the creation of the directories under $$OUTPUT_DIR/include
2308         as these will be handled by the fwheader_generator target.
2309
2310         Remove the explicit generation of $$OUTPUT_DIR/WebKit2/generated as
2311         this is not required.
2312
2313         * DerivedSources.pro:
2314
2315 2010-11-24  Brady Eidson  <beidson@apple.com>
2316
2317         Reviewed implicitly by John Sullivan.
2318
2319         https://bugs.webkit.org/show_bug.cgi?id=50042
2320
2321         * UIProcess/mac/WebContextMenuProxyMac.mm:
2322         (-[WebUserDataWrapper initWithUserData:WebKit::]): Do the proper self = [super init] dance here.
2323
2324 2010-11-24  Brady Eidson  <beidson@apple.com>
2325
2326         Reviewed by Dan Bernstein.
2327
2328         More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=50042
2329         WK2 Context Menu Items need a user data object and a client callback for selection.
2330
2331         * Shared/API/c/WKContextMenuItem.cpp:
2332         (WKContextMenuItemGetUserData):
2333         (WKContextMenuItemSetUserData):
2334         * Shared/API/c/WKContextMenuItem.h:
2335
2336         * Shared/WebContextMenuItem.cpp:
2337         (WebKit::WebContextMenuItem::userData):
2338         (WebKit::WebContextMenuItem::setUserData):
2339         * Shared/WebContextMenuItem.h:
2340
2341         * Shared/WebContextMenuItemData.cpp:
2342         (WebKit::WebContextMenuItemData::userData):
2343         (WebKit::WebContextMenuItemData::setUserData):
2344         * Shared/WebContextMenuItemData.h:
2345
2346         * UIProcess/API/C/WKPage.h:
2347
2348         * UIProcess/WebPageContextMenuClient.cpp:
2349         (WebKit::WebPageContextMenuClient::customContextMenuItemSelected): Added for WK2 apps to get a callback.
2350         * UIProcess/WebPageContextMenuClient.h:
2351
2352         * UIProcess/WebPageProxy.cpp:
2353         (WebKit::WebPageProxy::contextMenuItemSelected):
2354         * UIProcess/mac/WebContextMenuProxyMac.mm:
2355         (-[WebUserDataWrapper initWithUserData:WebKit::]): Add an "APIObject" user data wrapper class to associate with the NSMenuItem.
2356         (-[WebUserDataWrapper WebKit::]):
2357         (-[WebMenuTarget forwardContextMenuAction:]): Include the user data object in the created ContextMenuItemData.
2358         (WebKit::nsMenuItemVector):
2359
2360 2010-11-24  Andras Becsi  <abecsi@inf.u-szeged.hu>
2361
2362         Reviewed by Kenneth Rohde Christiansen.
2363
2364         Make WebKit2 compile with !ENABLE(INSPECTOR).
2365         https://bugs.webkit.org/show_bug.cgi?id=49973
2366
2367         * Shared/API/c/WKSharedAPICast.h:
2368         (WebKit::toAPI):
2369         (WebKit::toImpl):
2370         * UIProcess/API/C/WKAPICast.h:
2371         * UIProcess/API/C/WKInspector.cpp:
2372         * UIProcess/API/C/WKInspector.h:
2373         * UIProcess/API/C/WKPage.cpp:
2374         * UIProcess/API/C/WKPage.h:
2375         * UIProcess/WebInspectorProxy.cpp:
2376         * UIProcess/WebInspectorProxy.h:
2377         * UIProcess/WebInspectorProxy.messages.in:
2378         * UIProcess/WebPageProxy.cpp:
2379         (WebKit::WebPageProxy::close):
2380         (WebKit::WebPageProxy::didReceiveMessage):
2381         (WebKit::WebPageProxy::didReceiveSyncMessage):
2382         (WebKit::WebPageProxy::processDidCrash):
2383         * UIProcess/WebPageProxy.h:
2384         * UIProcess/mac/WebInspectorProxyMac.mm:
2385         * UIProcess/qt/WebInspectorProxyQt.cpp:
2386         * UIProcess/win/WebInspectorProxyWin.cpp:
2387         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2388         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2389         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2390         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2391         * WebProcess/WebPage/WebInspector.cpp:
2392         * WebProcess/WebPage/WebInspector.h:
2393         * WebProcess/WebPage/WebInspector.messages.in:
2394         * WebProcess/WebPage/WebPage.cpp:
2395         (WebKit::WebPage::WebPage):
2396         (WebKit::WebPage::close):
2397         (WebKit::WebPage::windowIsFocused):
2398         (WebKit::WebPage::didReceiveMessage):
2399         * WebProcess/WebPage/WebPage.h:
2400         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2401         * WebProcess/WebPage/win/WebInspectorWin.cpp:
2402
2403 2010-11-24  Andreas Kling  <kling@webkit.org>
2404
2405         Reviewed by Kenneth Rohde Christiansen.
2406
2407         [Qt][WK2] Make deep copies of tile images
2408
2409         We need the tile images we get from UpdateChunk::createImage() to persist,
2410         so we should take a copy() of them.
2411
2412         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
2413         (WebKit::TiledDrawingAreaTile::updateFromChunk):
2414
2415 2010-11-24  Andreas Kling  <kling@webkit.org>
2416
2417         Reviewed by Kenneth Rohde Christiansen.
2418
2419         [Qt] Fix uninitialized variable in QGraphicsWKViewPrivate
2420
2421         Always initialize QGWKVP::m_isChangingScale in the constructor.
2422
2423         * UIProcess/API/qt/qgraphicswkview.cpp:
2424         (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
2425
2426 2010-11-23  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2427
2428         Reviewed by Andreas Kling.
2429
2430         Adapt to setShouldDelegateScrolling not being a real setting anymore.
2431         We now similarily to setUseFixedLayout and setPaintEntireContents
2432         set it on the FrameView wen transitioning to a new page, etc.
2433
2434         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2435         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2436         * WebProcess/WebPage/WebPage.cpp:
2437         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2438
2439 2010-11-22  Adam Roben  <aroben@apple.com>
2440
2441         Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
2442
2443         Apple's Windows build allows placing header files and import libraries for WebKit's
2444         dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
2445         $WebKitLibrariesDir environment variable. This is both required for production builds and
2446         convenient for Apple-internal developer builds. Apple's production builds also require that
2447         WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
2448         builds, the files are copied into that directory tree by the
2449         WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
2450         copying is done by
2451         JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
2452
2453         This .vsprops copying is problematic in one very important case: when a developer updates
2454         their source tree and then tries to build. Visual Studio only reads .vsprops files when a
2455         project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
2456         updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
2457         build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
2458         $WebKitLibrariesDir, but Visual Studio will not pick up the changes.  The rest of the build
2459         will proceed with out-of-date .vsprops files, which will likely result in a build failure.
2460
2461         To fix this, we now use normal relative paths to access the .vsprops files in the source
2462         tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
2463         variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
2464         unset, so the normal relative paths are used to read the .vsprops files out of the source
2465         tree directly. In production builds, this environment variable is set to a fake directory
2466         that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
2467         is resolved.
2468         
2469         For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
2470
2471         $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2472
2473         In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
2474         files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
2475         JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
2476         "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
2477         FeatureDefines.vsprops becomes:
2478
2479         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2480
2481         which resolves to:
2482
2483         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2484
2485         (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
2486         actually exist since they are matched by an equal number of ".." path components.)
2487
2488         Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
2489         Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
2490
2491         Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
2492         updated
2493
2494         Reviewed by Dave Hyatt.
2495
2496         * win/WebKit2.make: Set $WebKitVSPropsRedirectionDir so that production builds can
2497         find the .vsprops files.
2498
2499         * win/WebKit2.vcproj:
2500         * win/WebKit2WebProcess.vcproj:
2501         Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
2502         files.
2503
2504 2010-11-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2505
2506         Reviewed by Andreas Kling.
2507
2508         Make WebKit2 compile with ENABLE_JAVASCRIPT_DEBUGGER=0
2509
2510         * WebProcess/WebPage/WebInspector.cpp: Add missing ENABLE(JAVASCRIPT_DEBUGGER) guards.
2511         (WebKit::WebInspector::startJavaScriptDebugging):
2512         (WebKit::WebInspector::stopJavaScriptDebugging):
2513         (WebKit::WebInspector::startJavaScriptProfiling):
2514         (WebKit::WebInspector::stopJavaScriptProfiling):
2515
2516 2010-11-21  Sam Weinig  <sam@webkit.org>
2517
2518         Reviewed by Dan Bernstein.
2519
2520         Textareas should be resizable by default
2521         https://bugs.webkit.org/show_bug.cgi?id=49892
2522
2523         Test: WebKit2/WKPreferences
2524
2525         * Shared/WebPreferencesStore.cpp:
2526         (WebKit::WebPreferencesStore::WebPreferencesStore):
2527         (WebKit::WebPreferencesStore::encode):
2528         (WebKit::WebPreferencesStore::decode):
2529         * Shared/WebPreferencesStore.h:
2530         Add textAreasAreResizable bit.
2531
2532         * UIProcess/API/C/WKPreferences.cpp:
2533         (WKPreferencesSetJavaEnabled):
2534         (WKPreferencesGetJavaEnabled):
2535         Fix typo, WKPRe... -> WKPre...
2536
2537         (WKPreferencesSetMinimumFontSize):
2538         (WKPreferencesGetMinimumFontSize):
2539         Fix comment to correctly reflect that the default minimumFontSize is 0, not 1.
2540
2541         (WKPreferencesSetTextAreasAreResizable):
2542         (WKPreferencesGetTextAreasAreResizable):
2543         * UIProcess/API/C/WKPreferences.h:
2544         Add API.
2545
2546         * UIProcess/API/C/WKPreferencesPrivate.h:
2547         Don't use PLATFORM in API headers.
2548
2549         * UIProcess/WebPreferences.cpp:
2550         (WebKit::WebPreferences::setTextAreasAreResizable):
2551         (WebKit::WebPreferences::textAreasAreResizable):
2552         * UIProcess/WebPreferences.h:
2553         * WebProcess/WebPage/WebPage.cpp:
2554         (WebKit::WebPage::updatePreferences):
2555         Pipe bit through to the WebProcess and onto WebCore::Settings.
2556
2557 2010-11-19  Zalan Bujtas  <zbujtas@gmail.com>
2558
2559         Reviewed by Andreas Kling.
2560
2561         WebUIClient::createNewPage() expects a retained WKPageRef. 
2562         https://bugs.webkit.org/show_bug.cgi?id=48549
2563
2564         * UIProcess/API/qt/ClientImpl.cpp:
2565         (qt_wk_createNewPage):
2566
2567 2010-11-19  Anders Carlsson  <andersca@apple.com>
2568
2569         Reviewed by Sam Weinig.
2570
2571         Add a didFail WKContextDownloadClient callback
2572         https://bugs.webkit.org/show_bug.cgi?id=49847
2573
2574         * UIProcess/API/C/WKContext.h:
2575         Add didFail callback.
2576
2577         * UIProcess/Downloads/DownloadProxy.cpp:
2578         (WebKit::DownloadProxy::didFail):
2579         Call WebDownloadClient::didFail.
2580
2581         * UIProcess/WebDownloadClient.cpp:
2582         (WebKit::WebDownloadClient::didFail):
2583         Call the didFail client function.
2584
2585
2586 2010-11-19  Anders Carlsson  <andersca@apple.com>
2587
2588         Reviewed by Sam Weinig.
2589
2590         Extend sandbox when downloading files
2591         https://bugs.webkit.org/show_bug.cgi?id=49844
2592
2593         * Platform/CoreIPC/HandleMessage.h:
2594         (CoreIPC::callMemberFunction):
2595         Add new overload.
2596
2597         * UIProcess/Downloads/DownloadProxy.cpp:
2598         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
2599         Create a sandbox extension handle if necessary.
2600
2601         * UIProcess/Downloads/DownloadProxy.messages.in:
2602         Add a sandbox extension handle out parameter to the DecideDestinationWithSuggestedFilename message.
2603
2604         * WebProcess/Downloads/Download.cpp:
2605         (WebKit::Download::decideDestinationWithSuggestedFilename):
2606         Create and consume the returned sandbox extension handle.
2607
2608         (WebKit::Download::didFinish):
2609         (WebKit::Download::didFail):
2610         Invalidate the sandbox extension handles.
2611
2612         * WebProcess/Downloads/mac/DownloadMac.mm:
2613         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
2614         Whoops, fix inverted logic.
2615
2616 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
2617
2618         Reviewed by Adam Roben.
2619
2620         Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
2621         https://bugs.webkit.org/show_bug.cgi?id=49819
2622
2623         * win/WebKit2.vcproj:
2624         * win/WebKit2Generated.vcproj:
2625         * win/WebKit2WebProcess.vcproj:
2626         * win/WebKit2WebProcessCommon.vsprops:
2627
2628 2010-11-19  Brady Eidson  <beidson@apple.com>
2629
2630         Reviewed by Darin Adler.
2631
2632         More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
2633         Add WebKit2 API relevant to customization of context menus
2634
2635         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2636         (WKBundleFrameAllowsFollowingLink):
2637         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2638
2639         * WebProcess/WebPage/WebFrame.cpp:
2640         (WebKit::WebFrame::allowsFollowingLink):
2641         * WebProcess/WebPage/WebFrame.h:
2642
2643 2010-11-19  Brady Eidson  <beidson@apple.com>
2644
2645         Reviewed by Darin Adler.
2646
2647         <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
2648         Add WebKit2 API relevant to customization of context menus
2649
2650         Most of this is just exposing already-existing concepts in API.
2651
2652         * Shared/API/c/WKURLRequest.cpp:
2653         (WKURLRequestCreateWithWKURL):
2654         * Shared/API/c/WKURLRequest.h:
2655
2656         * Shared/WebURLRequest.cpp:
2657         (WebKit::WebURLRequest::create):
2658         * Shared/WebURLRequest.h:
2659
2660         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2661         (WKBundleHitTestResultCopyAbsoluteImageURL):
2662         (WKBundleHitTestResultCopyAbsoluteMediaURL):
2663         (WKBundleHitTestResultGetImageRect):
2664         (WKBundleHitTestResultGetIsSelected):
2665         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2666
2667         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2668         (WKBundlePageHasLocalDataForURL):
2669         (WKBundlePageCanHandleRequest):
2670         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2671
2672         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2673         (WebKit::InjectedBundleHitTestResult::absoluteImageURL):
2674         (WebKit::InjectedBundleHitTestResult::absoluteMediaURL):
2675         (WebKit::InjectedBundleHitTestResult::imageRect):
2676         (WebKit::InjectedBundleHitTestResult::isSelected):
2677         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2678
2679         * WebProcess/WebPage/WebContextMenu.cpp:
2680         (WebKit::WebContextMenu::show):
2681
2682         * WebProcess/WebPage/WebPage.h:
2683         * WebProcess/WebPage/mac/WebPageMac.mm:
2684         (WebKit::WebPage::hasLocalDataForURL):
2685         (WebKit::WebPage::canHandleRequest):
2686         * WebProcess/WebPage/qt/WebPageQt.cpp:
2687         (WebKit::WebPage::hasLocalDataForURL): Stubbed for now.
2688         (WebKit::WebPage::canHandleRequest): Ditto.
2689         * WebProcess/WebPage/win/WebPageWin.cpp:
2690         (WebKit::WebPage::hasLocalDataForURL): Ditto.
2691         (WebKit::WebPage::canHandleRequest): Ditto.
2692
2693 2010-11-19  Darin Adler  <darin@apple.com>
2694
2695         Reviewed by Sam Weinig.
2696
2697         Need a way to clear disk cache from WebContext
2698         https://bugs.webkit.org/show_bug.cgi?id=49820
2699
2700         * UIProcess/API/C/WKContext.cpp:
2701         (WKContextClearResourceCaches): Added.
2702         (WKContextClearApplicationCache): Added.
2703         * UIProcess/API/C/WKContext.h:
2704         * UIProcess/WebContext.cpp:
2705         (WebKit::WebContext::clearResourceCaches): Added.
2706         (WebKit::WebContext::clearApplicationCache): Added.
2707         * UIProcess/WebContext.h:
2708         * WebProcess/WebProcess.cpp:
2709         (WebKit::WebProcess::clearResourceCaches): Added.
2710         (WebKit::WebProcess::clearApplicationCache): Added.
2711         * WebProcess/WebProcess.h:
2712         * WebProcess/WebProcess.messages.in: Added messages.
2713         * WebProcess/mac/WebProcessMac.mm:
2714         (WebKit::WebProcess::platformClearResourceCaches): Added.
2715         * WebProcess/qt/WebProcessQt.cpp:
2716         (WebKit::WebProcess::platformClearResourceCaches): Added.
2717         * WebProcess/win/WebProcessWin.cpp:
2718         (WebKit::WebProcess::platformClearResourceCaches): Added.
2719
2720 2010-11-19  Anders Carlsson  <andersca@apple.com>
2721
2722         Reviewed by Sam Weinig.
2723
2724         Implement support for loading local files
2725         https://bugs.webkit.org/show_bug.cgi?id=49828
2726         <rdar://problem/8447121>
2727
2728         * UIProcess/WebPageProxy.cpp:
2729         (WebKit::initializeSandboxExtensionHandle):
2730         Given an URL, create a sandbox extension if it's a local file URL.
2731
2732         (WebKit::WebPageProxy::loadURL):
2733         (WebKit::WebPageProxy::loadURLRequest):
2734         Pass along sandbox extension handles to the LoadURL and LoadURLRequest messages.
2735         
2736         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2737         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2738         Call SandboxExtensionTracker::didStartProvisionalLoad.
2739
2740         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2741         Call SandboxExtensionTracker::didCommitProvisionalLoad.
2742
2743         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2744         Call SandboxExtensionTracker::didFailProvisionalLoad.
2745
2746         * WebProcess/WebPage/WebPage.cpp:
2747         (WebKit::WebPage::~WebPage):
2748         Invalidate the sandbox extension tracker.
2749
2750         (WebKit::WebPage::close):
2751         Invalidate the sandbox extension tracker.
2752
2753         (WebKit::WebPage::loadURL):
2754         (WebKit::WebPage::loadURLRequest):
2755         Pass the sandbox extension handle to the sandbox extension tracker.
2756
2757         (WebKit::WebPage::SandboxExtensionTracker::~SandboxExtensionTracker):
2758         Invalidate the sandbox extension tracker.
2759
2760         (WebKit::WebPage::SandboxExtensionTracker::invalidate):
2761         invalidate ell the sandbox extensions.
2762         
2763         (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
2764         Create a sandbox extension and store it as the "pending provisional extension".
2765
2766         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
2767         Consume the pending provisional extension and make it the provisional extension.
2768
2769         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
2770         Invalidate the committed extension and make the provisional extension the committed extension.
2771
2772         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
2773         Invalidate the provisional extension.
2774
2775         * WebProcess/WebPage/WebPage.messages.in:
2776         Add SandboxExtension::Handle parameters to LoadURL and LoadURLRequest.
2777
2778 2010-11-19  Anders Carlsson  <andersca@apple.com>
2779
2780         Reviewed by Darin Adler.
2781
2782         Make it possible to encode null SandboxExtension handles
2783         https://bugs.webkit.org/show_bug.cgi?id=49825
2784
2785         * Shared/mac/SandboxExtensionMac.mm:
2786         (WebKit::SandboxExtension::Handle::encode):
2787         If there's no underlying sandbox extension, just encode an empty byte array.
2788
2789         (WebKit::SandboxExtension::Handle::decode):
2790         If the decoded byte array is empty, don't try to create a sandbox extension.
2791
2792         (WebKit::SandboxExtension::create):
2793         If the handle is null, return null.
2794
2795         (WebKit::SandboxExtension::consume):
2796         Consuming shuld not null out the underlying sandbox extension object.
2797
2798 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
2799
2800         Reviewed by Darin Adler.
2801
2802         Normalize Cairo/CFLite project/solution configuration names
2803         https://bugs.webkit.org/show_bug.cgi?id=49818
2804
2805         * win/WebKit2.vcproj:
2806         * win/WebKit2WebProcess.vcproj:
2807
2808 2010-11-19  Anders Carlsson  <andersca@apple.com>
2809
2810         Reviewed by Sam Weinig.
2811
2812         Add SandboxExtension abstraction and use it for the injected bundle extension
2813         https://bugs.webkit.org/show_bug.cgi?id=49817
2814
2815         * Shared/SandboxExtension.h:
2816         Add SandboxExtension abstraction.
2817         
2818         * Shared/WebProcessCreationParameters.cpp:
2819         (WebKit::WebProcessCreationParameters::encode):
2820         (WebKit::WebProcessCreationParameters::decode):
2821         * Shared/WebProcessCreationParameters.h:
2822         Instead of encoding/decoding a token, encode/decode the sandbox extension handle.
2823
2824         * Shared/mac/SandboxExtensionMac.mm: Added.
2825         Add Mac implementation of SandboxExtension.
2826
2827         * UIProcess/WebContext.cpp:
2828         (WebKit::WebContext::ensureWebProcess):
2829         Create a SandboxExtension::Handle object.
2830
2831         * WebKit2.xcodeproj/project.pbxproj:
2832         Add new files.
2833         
2834         * WebProcess/InjectedBundle/InjectedBundle.h:
2835         (WebKit::InjectedBundle::setSandboxExtension):
2836         Set the sandbox extension.
2837
2838         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
2839         (WebKit::InjectedBundle::load):
2840         Consume the sandbox extension.
2841
2842         * WebProcess/WebProcess.cpp:
2843         (WebKit::WebProcess::initializeWebProcess):
2844         Create a sandbox extension and set it on the injected bundle.
2845
2846 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
2847
2848         Reviewed by Adam Roben.
2849
2850         Windows vcproj configuration names should be normalized across projects
2851         https://bugs.webkit.org/show_bug.cgi?id=49776
2852
2853         * win/WebKit2.submit.sln:
2854         * win/WebKit2Generated.vcproj:
2855         * win/WebKit2GeneratedCommon.vsprops: Added.
2856
2857 2010-11-18  Anders Carlsson  <andersca@apple.com>
2858
2859         Reviewed by Adam Roben.
2860
2861         Crash in WebKit::PluginView::manualLoadDidReceiveResponse when navigating to a .wav file in WebKit2 on Mac
2862         https://bugs.webkit.org/show_bug.cgi?id=48559
2863         <rdar://problem/8606622>
2864
2865         Add null checks for m_plugin.
2866
2867         * WebProcess/Plugins/PluginView.cpp:
2868         (WebKit::PluginView::manualLoadDidReceiveResponse):
2869         (WebKit::PluginView::manualLoadDidReceiveData):
2870         (WebKit::PluginView::manualLoadDidFinishLoading):
2871         (WebKit::PluginView::manualLoadDidFail):
2872
2873 2010-11-18  Mark Rowe  <mrowe@apple.com>
2874
2875         Rubber-stamped by Adam Roben.
2876
2877         <rdar://problem/8602509&8602717&8602724> Enable compaction support.
2878
2879         * Configurations/WebKit2.xcconfig:
2880
2881 2010-11-18  Brian Weinstein  <bweinstein@apple.com>
2882
2883         Reviewed by Adam Roben.
2884
2885          WebKit2: Safari shouldn't auto-activate plug-ins in background tabs.
2886          https://bugs.webkit.org/show_bug.cgi?id=49770
2887          <rdar://problem/8482424>
2888          
2889          Add an API on Windows to call setIsInWindow, which calls through to WebPage::setIsInWindow.
2890          Remove the !PLATFORM(WIN) check in WebPage, so we don't automatically start plugins that are
2891          loaded in background tabs.
2892
2893         * UIProcess/API/C/win/WKView.cpp:
2894         (WKViewSetIsInWindow): Call through to WebView::setIsInWindow.
2895         * UIProcess/API/C/win/WKView.h:
2896         * UIProcess/win/WebView.cpp:
2897         (WebKit::WebView::setIsInWindow): Call through to WebPage::setIsInWindow.
2898         * UIProcess/win/WebView.h:
2899         * WebProcess/WebPage/WebPage.cpp:
2900         (WebKit::WebPage::WebPage): Remove the !PLATFORM(WIN) check and update the comment.
2901
2902 2010-11-18  Darin Adler  <darin@apple.com>
2903
2904         * WebProcess/WebPage/WebPage.cpp: Fix build by rolling out a change.
2905
2906 2010-11-18  Darin Adler  <darin@apple.com>
2907
2908         Reviewed by Kevin Decker.
2909
2910         REGRESSION (WebKit2): Plug-ins and <video> start playing immediately in background tabs
2911         https://bugs.webkit.org/show_bug.cgi?id=49766
2912
2913         Test: manual-tests/resources/video-tab.html
2914
2915         * WebProcess/WebPage/WebPage.cpp:
2916         (WebKit::WebPage::WebPage): Call setCanStartMedia(false) since the rest of the code
2917         starts out treating the page as "not in a window".
2918
2919 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
2920
2921         Reviewed by Adam Roben.
2922
2923         Remove leftover Windows Debug_Internal configurations
2924         https://bugs.webkit.org/show_bug.cgi?id=49758
2925
2926         * win/WebKit2.vcproj:
2927         * win/WebKit2WebProcess.vcproj:
2928
2929 2010-11-18  Anders Carlsson  <andersca@apple.com>
2930
2931         Reviewed by John Sullivan.
2932
2933         Page overlays should be able to handle mouse events
2934         https://bugs.webkit.org/show_bug.cgi?id=49756
2935
2936         * Shared/API/c/WKSharedAPICast.h:
2937         (WebKit::toAPI):
2938         Add API cast function for converting an IntPoint to a WKPoint.
2939
2940         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2941         (PageOverlayClientImpl::mouseEvent):
2942         Call the appropriate callbacks.
2943
2944         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2945         Add new callbacks.
2946
2947 2010-11-18  Anders Carlsson  <andersca@apple.com>
2948
2949         Reviewed by Sam Weinig.
2950
2951         Keep the web process alive if there are active downloads
2952         https://bugs.webkit.org/show_bug.cgi?id=49755
2953
2954         Make sure that Download objects are destroyed when the download finishes or fails.
2955         Don't close the web process if there are live Download objects.
2956         
2957         * UIProcess/Downloads/DownloadProxy.cpp:
2958         (WebKit::DownloadProxy::didFail):
2959         Add stub.
2960
2961         * UIProcess/Downloads/DownloadProxy.h:
2962         * UIProcess/Downloads/DownloadProxy.messages.in:
2963         Add DidFail message.
2964
2965         * WebProcess/Downloads/Download.cpp:
2966         (WebKit::Download::didFinish):
2967         Call DownloadManager::downloadFinished.
2968
2969         (WebKit::Download::didFail):
2970         Send DidFail message and call DownloadManager::downloadFinished.
2971         
2972         * WebProcess/Downloads/Download.h:
2973         (WebKit::Download::destinationID):
2974         Call downloadID().
2975
2976         (WebKit::Download::downloadID):
2977         Return the download ID.
2978
2979         * WebProcess/Downloads/DownloadManager.cpp:
2980         (WebKit::DownloadManager::downloadFinished):
2981         Delete the Download object and call WebProcess::shutdownIfPossible.
2982
2983         * WebProcess/Downloads/DownloadManager.h:
2984         (WebKit::DownloadManager::isDownloading):
2985         Return whether the download manager has any active downloads.
2986
2987         * WebProcess/Downloads/mac/DownloadMac.mm:
2988         (-[WKDownloadAsDelegate download:didFailWithError:]):
2989         Call Download::didFail.
2990
2991         * WebProcess/WebProcess.cpp:
2992         (WebKit::WebProcess::removeWebPage):
2993         Call shutdownIfPossible.
2994
2995         (WebKit::WebProcess::shutdownIfPossible):
2996         New function. Don't shutdown if there are live pages or active downloads.
2997
2998         * WebProcess/WebProcess.h:
2999
3000 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
3001
3002         Reviewed by Adam Roben.
3003
3004         Debug_Internal Windows configuration is unnecessary, should be removed
3005         https://bugs.webkit.org/show_bug.cgi?id=49753
3006
3007         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3008         * WebKit2Prefix.h:
3009
3010 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
3011
3012         Reviewed by Adam Roben.
3013
3014         Clean up vcproj errors
3015         https://bugs.webkit.org/show_bug.cgi?id=49741
3016
3017         * win/WebKit2WebProcess.vcproj:
3018
3019 2010-11-18  Benjamin Poulain  <benjamin.poulain@nokia.com>
3020
3021         Reviewed by Laszlo Gombos.
3022
3023         [Qt] [WK2] WebKit 2 would not compile for Qt without ENABLE_TOUCH_EVENT
3024         https://bugs.webkit.org/show_bug.cgi?id=49664
3025
3026         Move the ENABLE(TOUCH_EVENTS) to the code where internal WebKit touch
3027         types are used.
3028
3029         * UIProcess/API/qt/qgraphicswkview.cpp:
3030         (QGraphicsWKView::touchEvent):
3031         * UIProcess/API/qt/qwkpage.cpp:
3032         (QWKPagePrivate::touchEvent):
3033
3034 2010-11-17  Andreas Kling  <kling@webkit.org>
3035
3036         Reviewed by Kenneth Rohde Christiansen.
3037
3038         Reuse the size of the actualVisibleContentRect when loading a new page
3039         or navigating session history.
3040
3041         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3042         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3043
3044 2010-11-17  Dimitri Glazkov  <dglazkov@chromium.org>
3045
3046         Reviewed by Darin Adler.
3047
3048         Converge means of querying a parent node into one way, which is Node::parentNode.
3049         https://bugs.webkit.org/show_bug.cgi?id=49686
3050
3051         * WebProcess/WebPage/WebPage.cpp: Changed to use parentNode.
3052         (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
3053
3054 2010-11-17  Timothy Hatcher  <timothy@apple.com>
3055
3056         Remove duplicate Web Inspector message handeling in WebPage::didReceiveMessage.
3057
3058         https://webkit.org/b/49689
3059
3060         Reviewed by Andreas Kling.
3061
3062         * WebProcess/WebPage/WebPage.cpp:
3063         (WebKit::WebPage::didReceiveMessage): Remove duplicate code.
3064
3065 2010-11-17  Timothy Hatcher  <timothy@apple.com>
3066
3067         Fix a crash when closing the inspected page when the Web Inspector
3068         page was never created.
3069
3070         https://bugs.webkit.org/show_bug.cgi?id=49687
3071
3072         Reviewed by John Sullivan.
3073
3074         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3075         (WebKit::WebInspectorClient::sendMessageToFrontend): Null check the Inspector WebPage.
3076
3077 2010-11-17  Anders Carlsson  <andersca@apple.com>
3078
3079         Reviewed by John Sullivan.
3080
3081         Don't crash when invalidating a page overlay that hasn't been installed yet
3082         https://bugs.webkit.org/show_bug.cgi?id=49685
3083
3084         Null check the web page.
3085
3086         * WebProcess/WebPage/PageOverlay.cpp:
3087         (WebKit::PageOverlay::setNeedsDisplay):
3088
3089 2010-11-17  Brady Eidson  <beidson@apple.com>
3090
3091         Reviewed by Darin Adler.
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=49682 - Expose "removeItemAtIndex" in WKMutableArray
3094
3095         * Shared/API/c/WKMutableArray.cpp:
3096         (WKArrayRemoveItemAtIndex):
3097         * Shared/API/c/WKMutableArray.h:
3098
3099         * Shared/MutableArray.cpp:
3100         (WebKit::MutableArray::removeItemAtIndex):
3101         * Shared/MutableArray.h:
3102
3103 2010-11-17  Brady Eidson  <beidson@apple.com>
3104
3105         Reviewed by Anders Carlsson.
3106
3107         https://bugs.webkit.org/show_bug.cgi?id=49683 - Export WKContextMenuItem and WKContextMenuItemTypes as public headers
3108
3109         * WebKit2.xcodeproj/project.pbxproj:
3110
3111 2010-11-17  Anders Carlsson  <andersca@apple.com>
3112
3113         Reviewed by Darin Adler.
3114
3115         Need way to invalidate part of a WKOverlayRef so it will be redrawn
3116         https://bugs.webkit.org/show_bug.cgi?id=49679
3117         <rdar://problem/8679152>
3118
3119         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3120         (WKBundlePageOverlaySetNeedsDisplay):
3121         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3122         * WebProcess/WebPage/PageOverlay.cpp:
3123         (WebKit::PageOverlay::setNeedsDisplay):
3124         * WebProcess/WebPage/PageOverlay.h:
3125
3126 2010-11-17  Timothy Hatcher  <timothy@apple.com>
3127
3128         Provide a way to create a WKView (WebPage) that is hidden from
3129         the InjectedBundle. This is needed for the Web Inspector.
3130
3131         https://webkit.org/b/49670
3132
3133         Reviewed by Sam Weinig.
3134
3135         * Shared/WebPageCreationParameters.cpp:
3136         (WebKit::WebPageCreationParameters::encode): Added visibleToInjectedBundle.
3137         (WebKit::WebPageCreationParameters::decode): Ditto.
3138         * Shared/WebPageCreationParameters.h: Ditto.
3139         * UIProcess/API/C/win/WKView.cpp:
3140         (WKViewCreate): Pass VisibleToInjectedBundle to the WebView create function.
3141         * UIProcess/API/C/win/WKViewPrivate.cpp:
3142         (WKViewCreateForWebInspector): Added. Not used yet. Passes HiddenFromInjectedBundle
3143         to the WebView create function.
3144         * UIProcess/API/C/win/WKViewPrivate.h: Added WKViewCreateForWebInspector.
3145         * UIProcess/API/mac/WKView.mm:
3146         (-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]): Added hiddenFromInjectedBundle
3147         parameter and calls WebPageProxy::setVisibleToInjectedBundle.
3148         (-[WKView initWithFrame:pageNamespaceRef:]): Calls initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:
3149         and passes NO for hiddenFromInjectedBundle.
3150         (-[WKView initWithFrame:]): Cleaned up by removing the local assignment to self and just returns the result.
3151         * UIProcess/API/mac/WKViewInternal.h: Added initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:.
3152         * UIProcess/WebPageProxy.cpp:
3153         (WebKit::WebPageProxy::WebPageProxy): Initialize m_visibleToInjectedBundle from the creation parameters.
3154         (WebKit::WebPageProxy::creationParameters): Set visibleToInjectedBundle using m_visibleToInjectedBundle.
3155         * UIProcess/WebPageProxy.h: Added m_visibleToInjectedBundle.
3156         (WebKit::WebPageProxy::visibleToInjectedBundle): Added. Return m_visibleToInjectedBundle.
3157         (WebKit::WebPageProxy::setVisibleToInjectedBundle): Added. Set m_visibleToInjectedBundle.
3158         * UIProcess/win/WebView.cpp:
3159         (WebKit::WebView::WebView): Added InjectedBundleVisibility parameter and calls
3160         WebPageProxy::setVisibleToInjectedBundle.
3161         * UIProcess/win/WebView.h: Added InjectedBundleVisibility enum.
3162         (WebKit::WebView::create): Added InjectedBundleVisibility parameter.
3163         * WebProcess/WebPage/WebPage.cpp:
3164         (WebKit::WebPage::create): Checks visibleToInjectedBundle before talking to the injected bundle.
3165         (WebKit::WebPage::WebPage): Initialize m_isVisibleToInjectedBundle from the creation parameters.
3166         (WebKit::WebPage::close): Checks m_isVisibleToInjectedBundle before talking to the injected bundle.
3167         * WebProcess/WebPage/WebPage.h: Added m_isVisibleToInjectedBundle.
3168
3169 2010-11-17  Andras Becsi  <abecsi@webkit.org>
3170
3171         Unreviewed buildfix.
3172
3173         [Qt] D'oh! I screwed up the dependencies.
3174
3175         * DerivedSources.pro:
3176
3177 2010-11-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3178
3179         Reviewed by Andreas Kling.
3180
3181         [WK2] Set paintsEntireContents for "resizes to contents" mode
3182
3183         Only relevant for the tiled backing store.
3184
3185         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3186         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3187         * WebProcess/WebPage/WebPage.cpp:
3188         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
3189
3190 2010-11-17  Andras Becsi  <abecsi@webkit.org>
3191
3192         Reviewed by Andreas Kling.
3193
3194         [Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
3195         https://bugs.webkit.org/show_bug.cgi?id=49627
3196
3197         Copy the MiniBrowser.qrc and QtTestBrowser's useragentlist.txt file
3198         to the build directory of MiniBrowser because it has to be in a
3199         subdirectory of the resource file.
3200         Add a method to QWKPage to retrieve the custom user agent string.
3201
3202         * DerivedSources.pro:
3203         * UIProcess/API/qt/qwkpage.cpp:
3204         (QWKPage::customUserAgent):
3205         * UIProcess/API/qt/qwkpage.h:
3206
3207 2010-11-17  Simon Fraser  <simon.fraser@apple.com>
3208
3209         Reviewed by Adam Roben.
3210
3211         https://bugs.webkit.org/show_bug.cgi?id=45567
3212         Add stubbed-out layer-backed drawing area for Windows.
3213
3214         Add implementations of LayerBackedDrawingArea and
3215         LayerBackedDrawingAreaProxy for Windows, and add them
3216         to the vcproj.
3217
3218         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
3219         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
3220         (WebKit::LayerBackedDrawingAreaProxy::page):
3221         (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
3222         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
3223         (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
3224         (WebKit::LayerBackedDrawingAreaProxy::paint):
3225         * UIProcess/win/WebView.cpp:
3226         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
3227         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
3228         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
3229         * UIProcess/win/WebView.h:
3230         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3231         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
3232         (WebKit::LayerBackedDrawingArea::platformInit):
3233         (WebKit::LayerBackedDrawingArea::platformClear):
3234         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
3235         (WebKit::LayerBackedDrawingArea::detachCompositingContext):
3236         (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
3237         (WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
3238         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
3239         * win/WebKit2.vcproj:
3240
3241 2010-11-17  Benjamin Poulain  <benjamin.poulain@nokia.com>
3242
3243         Reviewed by Kenneth Rohde Christiansen.
3244
3245         [Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
3246         https://bugs.webkit.org/show_bug.cgi?id=49545
3247
3248         Implement focus switching with Tab. This is now done asynchronously,
3249         waiting for webkit to call takeFocus() and switching the widget.
3250
3251         Since the focus can change between the Tab press and the callback,
3252         QGraphicsWKView::focusNextPrevChildCallback() make sure the view still has
3253         focus before passing it to the next widget.
3254
3255         * UIProcess/API/qt/qgraphicswkview.cpp:
3256         (QGraphicsWKView::QGraphicsWKView):
3257         (QGraphicsWKView::focusNextPrevChildCallback):
3258         (QGraphicsWKView::focusNextPrevChild):
3259         * UIProcess/API/qt/qgraphicswkview.h:
3260         * UIProcess/API/qt/qwkpage.cpp:
3261         (QWKPagePrivate::takeFocus):
3262         * UIProcess/API/qt/qwkpage.h:
3263         * UIProcess/API/qt/qwkpage_p.h:
3264
3265 2010-11-17  Andreas Kling  <kling@webkit.org>
3266
3267         Reviewed by Kenneth Rohde Christiansen.
3268
3269         Don't prohibit scrolling in tiled backing store mode.
3270
3271         We delegate scrolling instead.
3272
3273         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3274         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3275
3276 2010-11-17  Simon Hausmann  <simon.hausmann@nokia.com>
3277
3278         Reviewed by Kenneth Christiansen.
3279
3280         [Qt] Improve painting performance on 16-bit displays
3281
3282         When the default pixmap depth is 16-bit, then use RGB16 instead of
3283         RGB32 for the chunks, to avoid unnecessary conversions and reduce
3284         chunk size. The conversions happen as images as QPixmaps have 16-bit
3285         depth and the tiles on the ui process are also backed by QPixmaps.
3286
3287         * Shared/qt/UpdateChunk.cpp:
3288         (WebKit::UpdateChunk::size):
3289         (WebKit::UpdateChunk::createImage):
3290         * Shared/qt/UpdateChunk.h:
3291
3292 2010-11-16  Sam Weinig  <sam@webkit.org>
3293
3294         Reviewed by Adam Roben.
3295
3296         WebKit2: Support enabling site-specific quirks
3297         <rdar://problem/8451371>
3298         https://bugs.webkit.org/show_bug.cgi?id=46076
3299
3300         * Shared/WebPreferencesStore.cpp:
3301         (WebKit::WebPreferencesStore::WebPreferencesStore):
3302         (WebKit::WebPreferencesStore::encode):
3303         (WebKit::WebPreferencesStore::decode):
3304         * Shared/WebPreferencesStore.h:
3305         Add needsSiteSpecificQuirks;
3306
3307         * UIProcess/API/C/WKAPICast.h:
3308         (WebKit::toFontSmoothingLevel):
3309         (WebKit::toAPI):
3310         Move FontSmoothing conversion functions here.
3311
3312         * UIProcess/API/C/WKPreferences.cpp:
3313         (WKPreferencesSetFontSmoothingLevel):
3314         (WKPreferencesGetFontSmoothingLevel):
3315         (WKPreferencesSetAcceleratedCompositingEnabled):
3316         (WKPreferencesGetAcceleratedCompositingEnabled):
3317         (WKPreferencesSetCompositingBordersVisible):
3318         (WKPreferencesGetCompositingBordersVisible):
3319         (WKPreferencesSetCompositingRepaintCountersVisible):
3320         (WKPreferencesGetCompositingRepaintCountersVisible):
3321         (WKPreferencesSetNeedsSiteSpecificQuirks):
3322         (WKPreferencesGetNeedsSiteSpecificQuirks):
3323         Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks
3324         and move implementations from WKPreferencesPrivate.cpp here.
3325
3326         * UIProcess/API/C/WKPreferencesPrivate.cpp: Removed.
3327
3328         * UIProcess/API/C/WKPreferencesPrivate.h:
3329         Add Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks.
3330
3331         * UIProcess/WebPreferences.cpp:
3332         (WebKit::WebPreferences::setNeedsSiteSpecificQuirks):
3333         (WebKit::WebPreferences::needsSiteSpecificQuirks):
3334         * UIProcess/WebPreferences.h:
3335         * WebProcess/WebPage/WebPage.cpp:
3336         (WebKit::WebPage::updatePreferences):
3337         Pipe through needsSiteSpecificQuirks.
3338
3339         * WebKit2.xcodeproj/project.pbxproj:
3340         * WebKit2.pro:
3341         * win/WebKit2.vcproj:
3342         Update for removed files.
3343
3344 2010-11-16  Adam Roben  <aroben@apple.com>
3345
3346         Fix horizontal scrolling via the mousewheel/trackpad on Windows
3347
3348         Reviewed by Mark Rowe.
3349
3350         * Shared/win/WebEventFactory.cpp: Fixed typo in the
3351         WM_VISTA_MOUSEHWHEEL constant.
3352
3353 2010-11-16  Steve Falkenburg  <sfalken@apple.com>
3354
3355         Reviewed by Adam Roben.
3356
3357         Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
3358         https://bugs.webkit.org/show_bug.cgi?id=49632
3359
3360         * win/WebKit2.make:
3361         * win/WebKit2.submit.sln:
3362         * win/WebKit2.vcproj:
3363         * win/WebKit2WebProcess.vcproj:
3364
3365 2010-11-16  Anders Carlsson  <andersca@apple.com>
3366
3367         Reviewed by Sam Weinig.
3368
3369         Handle converting a ResourceHandle to a download
3370         https://bugs.webkit.org/show_bug.cgi?id=49631
3371
3372         * WebProcess/Downloads/Download.h:
3373         Add startWithHandle.
3374
3375         * WebProcess/Downloads/DownloadManager.h:
3376         * WebProcess/Downloads/DownloadManager.cpp:
3377         (WebKit::DownloadManager::convertHandleToDownload):
3378         Create a new Download object and call startWithHandle on it.
3379
3380         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3381         (WebKit::Download::startWithHandle):
3382         Add stub.
3383
3384         * WebProcess/Downloads/mac/DownloadMac.mm:
3385         (WebKit::Download::startWithHandle):
3386         Create an NSURLDownload object from passed in ResourceHandle.
3387
3388         * WebProcess/Downloads/qt/DownloadQt.cpp:
3389         (WebKit::Download::startWithHandle):
3390         Add stub.
3391
3392         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3393         (WebKit::WebFrameLoaderClient::download):
3394         Call WebFrame::convertHandleToDownload.
3395
3396         * WebProcess/WebPage/WebFrame.cpp:
3397         (WebKit::WebFrame::convertHandleToDownload):
3398         Call DownloadManager::convertHandleToDownload.
3399
3400 2010-11-16  Anders Carlsson  <andersca@apple.com>
3401
3402         Reviewed by John Sullivan.
3403
3404         Set the original URL for downloads
3405         https://bugs.webkit.org/show_bug.cgi?id=49628
3406
3407         * WebProcess/Downloads/DownloadManager.cpp:
3408         (WebKit::DownloadManager::startDownload):
3409         * WebProcess/Downloads/DownloadManager.h:
3410         startDownload now takes the originating web page.
3411
3412         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3413         (WebKit::Download::start):
3414         start now takes the originating web page.
3415
3416         * WebProcess/Downloads/mac/DownloadMac.mm:
3417         (WebKit::originatingURL):
3418         (WebKit::setOriginalURLForDownload):
3419         Port code over from WebKit1 that sets the download URL.
3420
3421         (WebKit::Download::start):
3422         Call setOriginalURLForDownload.
3423
3424         * WebProcess/Downloads/qt/DownloadQt.cpp:
3425         (WebKit::Download::start):
3426         start now takes the originating web page.
3427
3428         * WebProcess/WebPage/WebFrame.cpp:
3429         (WebKit::WebFrame::startDownload):
3430         Pass the web page to DownloadManager::startDownload.
3431
3432 2010-11-16  Dave Hyatt  <hyatt@apple.com>
3433
3434         Reviewed by Dan Bernstein.
3435
3436         https://bugs.webkit.org/show_bug.cgi?id=11004
3437         
3438         font-size:0 is ignored.  Remove the minimum font size of 1 in CSSStyleSelector.
3439         Change the pref value for minimum font size from 1 to 0.  Make sure to never use the NSFont's size,
3440         since it doesn't honor a size of 0.  Instead pass the size in to the FontPlatformData(NSFont*) version
3441         of the constructor rather than using [NSFont pointSize].
3442
3443         https://bugs.webkit.org/show_bug.cgi?id=49582
3444         
3445         Negative leading is not handled correctly.  There are two bugs here.  The first is that
3446         maxAscent and maxDescent can be negative, so we need a notion of whether or not we have
3447         set them before so that we can allow them to be < 0.
3448         
3449         The second issue is that we should understand where fonts will end up relative to
3450         our baseline (excluding line height), and only allow those boxes to impact ascent and
3451         descent if the actual font box (without factoring in line height) is above or below the
3452         root line box baseline.
3453
3454         Added fast/css/negative-leading.html
3455         
3456         These two bug fixes have to land together to keep the Acid 3 test rendering correctly.
3457
3458         * Shared/WebPreferencesStore.cpp:
3459         (WebKit::WebPreferencesStore::WebPreferencesStore):
3460
3461 2010-11-16  Anders Carlsson  <andersca@apple.com>
3462
3463         Fix clang++ build.
3464
3465         * Scripts/webkit2/messages.py:
3466         * WebProcess/WebPage/WebInspector.h:
3467
3468 2010-11-16  Anders Carlsson  <andersca@apple.com>
3469
3470         Reviewed by Sam Weinig.
3471
3472         Add WKPageCanShowMIMEType
3473         https://bugs.webkit.org/show_bug.cgi?id=49612
3474
3475         * UIProcess/API/C/WKPage.cpp:
3476         (WKPageCanShowMIMEType):
3477         * UIProcess/API/C/WKPage.h:
3478         * UIProcess/WebPageProxy.cpp:
3479         (WebKit::WebPageProxy::canShowMIMEType):
3480         * UIProcess/WebPageProxy.h:
3481
3482 2010-11-16  Anders Carlsson  <andersca@apple.com>
3483
3484         Reviewed by Sam Weinig.
3485
3486         Make WebPageProxy::decidePolicyForMIMEType a tad synchronous
3487         https://bugs.webkit.org/show_bug.cgi?id=49605
3488
3489         Change the DecidePolicyForMIMEType message to be synchronous, and if the policy listener is
3490         invoked from within the decidePolicyForMIMEType callback return the policy information as out
3491         parameters. This is needed in order to convert a loading connection to a download.
3492
3493         * Platform/CoreIPC/HandleMessage.h:
3494         (CoreIPC::callMemberFunction):
3495         * UIProcess/WebPageProxy.cpp:
3496         (WebKit::WebPageProxy::WebPageProxy):
3497         (WebKit::WebPageProxy::receivedPolicyDecision):
3498         (WebKit::WebPageProxy::decidePolicyForMIMEType):
3499         * UIProcess/WebPageProxy.h:
3500         * UIProcess/WebPageProxy.messages.in:
3501         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3502         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
3503
3504 2010-11-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>, Zalan Bujtas  <zbujtas@gmail.com>
3505
3506         Reviewed by Andreas Kling.
3507
3508         [WK2][Qt] Add API for finding a zoomable area for a given point
3509
3510         This is useful for implementing e.g "double tap zoom"
3511
3512         Only enabled for Qt.
3513
3514         * UIProcess/API/qt/qwkpage.cpp:
3515         (QWKPage::findZoomableAreaForPoint):
3516         (QWKPagePrivate::didFindZoomableArea):
3517         * UIProcess/API/qt/qwkpage.h:
3518         * UIProcess/API/qt/qwkpage_p.h:
3519         * UIProcess/PageClient.h:
3520         * UIProcess/WebPageProxy.cpp:
3521         (WebKit::WebPageProxy::didFindZoomableArea):
3522         (WebKit::WebPageProxy::findZoomableAreaForPoint):
3523         * UIProcess/WebPageProxy.h:
3524         * UIProcess/WebPageProxy.messages.in:
3525         * WebProcess/WebPage/WebPage.cpp:
3526         (WebKit::WebPage::findZoomableAreaForPoint):
3527         * WebProcess/WebPage/WebPage.h:
3528         * WebProcess/WebPage/WebPage.messages.in:
3529
3530 2010-11-16  Andreas Kling  <kling@webkit.org>
3531
3532         Rubber-stamped by Simon Hausmann.
3533
3534         Revert !ENABLE(INSPECTOR) fix- we don't need it right now,
3535         and it was less maintainable than I had though.
3536
3537         * Shared/API/c/WKSharedAPICast.h:
3538         (WebKit::toAPI):
3539         (WebKit::toImpl):
3540         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3541         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3542         * WebProcess/WebPage/WebInspector.cpp:
3543
3544 2010-11-16  Andreas Kling  <kling@webkit.org>
3545
3546         Reviewed by Simon Hausmann.
3547
3548         Fix compilation with !ENABLE(INSPECTOR)
3549
3550         * Shared/API/c/WKSharedAPICast.h:
3551         (WebKit::toAPI):
3552         (WebKit::toImpl):
3553         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3554         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3555         * WebProcess/WebPage/WebInspector.cpp:
3556
3557 2010-11-16  Andras Becsi  <abecsi@webkit.org>
3558
3559         Reviewed by Andreas Kling.
3560
3561         [Qt] Use SIGINT instead of SIGKILL to let the web process clean up after itself.
3562
3563         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3564         (WebKit::QtWebProcess::setupChildProcess):
3565
3566 2010-11-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3567
3568         Reviewed by Andreas Kling.
3569
3570         [WK2][Qt] Expose resizes-to-contents mode in WebKit2
3571
3572         Only available with ENABLE(TILED_BACKING_STORE)
3573
3574         Based on a patch by Antti Koivisto.
3575
3576         * UIProcess/API/qt/qwkpage.cpp:
3577         (QWKPage::setResizesToContentsUsingLayoutSize):
3578         * UIProcess/API/qt/qwkpage.h:
3579         * UIProcess/WebPageProxy.cpp:
3580         (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize):
3581         * UIProcess/WebPageProxy.h:
3582         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3583         (WebKit::WebChromeClient::contentsSizeChanged):
3584         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3585         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3586         * WebProcess/WebPage/WebPage.cpp:
3587         (WebKit::WebPage::setSize):
3588         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
3589         (WebKit::WebPage::resizeToContentsIfNeeded):
3590         * WebProcess/WebPage/WebPage.h:
3591         (WebKit::WebPage::resizesToContentsEnabled):
3592         (WebKit::WebPage::resizesToContentsLayoutSize):
3593         * WebProcess/WebPage/WebPage.messages.in:
3594
3595 2010-11-16  Andreas Kling  <kling@webkit.org>
3596
3597         Reviewed by Kenneth Rohde Christiansen.
3598
3599         [Qt][WK2] Get proxy settings from environment (http[s]_proxy)
3600
3601         If http_proxy and/or https_proxy are set in the environment,
3602         pass those in to QNetworkAccessManager.
3603
3604         * WebProcess/qt/WebProcessMainQt.cpp:
3605         (WebKit::EnvHttpProxyFactory::EnvHttpProxyFactory):
3606         (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
3607         (WebKit::EnvHttpProxyFactory::queryProxy):
3608         (WebKit::initializeProxy):
3609         (WebKit::WebProcessMainQt):
3610
3611 2010-11-16  Andreas Kling  <kling@webkit.org>
3612
3613         Reviewed by Kenneth Rohde Christiansen.
3614
3615         [Qt][WK2] Emit windowCloseRequested signal on window.close()
3616
3617         Original patch by Zalan Bujtas.
3618
3619         * UIProcess/API/qt/ClientImpl.cpp:
3620         (qt_wk_close):
3621         * UIProcess/API/qt/qwkpage.h:
3622
3623 2010-11-15  Andreas Kling  <kling@webkit.org>
3624
3625         Reviewed by Kenneth Rohde Christiansen.
3626
3627         [Qt] Kill the web process if the UI process dies
3628
3629         Connect UI (parent) process death signal to SIGKILL of the web
3630         process (child). This ensures that there's no stale web processes
3631         after the UI process has crashed.
3632
3633         Original patch by Kimmo Kinnunen.
3634
3635         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3636         (WebKit::QtWebProcess::QtWebProcess):
3637         (WebKit::QtWebProcess::setupChildProcess):
3638         (WebKit::ProcessLauncherHelper::launch):
3639
3640 2010-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
3641
3642         Rubber-stamped by Andreas Kling.
3643
3644         [Qt] Trivial build fix for building WebKit2 inside Qt Creator
3645
3646         Similar to WebCore.pro, define a fallback for OUTPUT_DIR.
3647
3648         * WebKit2.pro:
3649
3650 2010-11-15  Andreas Kling  <kling@webkit.org>
3651
3652         Reviewed by Tor Arne Vestbø.
3653
3654         [Qt] Make sure qwkpage.h and qwkpreferences.h are copied into includes/WebKit2
3655
3656         * UIProcess/API/qt/WKView.h:
3657
3658 2010-11-15  Andreas Kling  <kling@webkit.org>
3659
3660         Reviewed by Tor Arne Vestbø.
3661
3662         [Qt] Use $${PYTHON} rather than "python" to execute Python scripts
3663
3664         Fixes building with the old Python that currently ships with Scratchbox.
3665
3666         * DerivedSources.pro:
3667
3668 2010-11-15  Brady Eidson  <beidson@apple.com>
3669
3670         Reviewed by a better attempt at a Windows build fix.
3671
3672         * win/WebKit2Generated.make:
3673
3674 2010-11-15  Brady Eidson  <beidson@apple.com>
3675
3676         Reviewed by my attempt to fix the Windows build
3677
3678         * win/WebKit2Generated.make: Add new API headers here.
3679
3680 2010-11-15  Brady Eidson  <beidson@apple.com>
3681
3682         Reviewed by Sam Weinig.
3683
3684         Finish off <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
3685         Customizable context menu support in WebKit2.
3686
3687         - Adds an API-level WKContextMenuItem.
3688         - Round trips through both the InjectedBundle client and the new PageContextMenuClient before
3689           actually displaying the menu.
3690
3691         * WebKit2.pro:
3692         * WebKit2.xcodeproj/project.pbxproj:
3693         * win/WebKit2.vcproj:
3694
3695         * Shared/API/c/WKBase.h:
3696         * Shared/API/c/WKContextMenuItem.cpp: Added.
3697         (WKContextMenuItemGetTypeID):
3698         (WKContextMenuItemCreateAsAction):
3699         (WKContextMenuItemCreateAsCheckableAction):
3700         (WKContextMenuItemCreateAsSubmenu):
3701         (WKContextMenuItemSeparatorItem):
3702         (WKContextMenuItemGetTag):
3703         (WKContextMenuItemGetType):
3704         (WKContextMenuItemCopyTitle):
3705         (WKContextMenuItemGetEnabled):
3706         (WKContextMenuItemGetChecked):
3707         (WKContextMenuCopySubmenuItems):
3708         * Shared/API/c/WKContextMenuItem.h: Added.
3709         * Shared/API/c/WKContextMenuItemTypes.h: Added.
3710
3711         * Shared/API/c/WKSharedAPICast.h:
3712         (WebKit::toAPI):
3713         (WebKit::toImpl):
3714
3715         * Shared/WebContextMenuItem.cpp:
3716         (WebKit::WebContextMenuItem::create):
3717         (WebKit::WebContextMenuItem::separatorItem):
3718         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
3719         * Shared/WebContextMenuItem.h:
3720
3721         * UIProcess/API/C/WKPage.cpp:
3722         (WKPageSetPageContextMenuClient):
3723         (WKPageSetPageFindClient):
3724         (WKPageSetPageLoaderClient):
3725         (WKPageSetPagePolicyClient):
3726         (WKPageSetPageUIClient):
3727         * UIProcess/API/C/WKPage.h:
3728
3729         * UIProcess/WebPageContextMenuClient.cpp: Added.
3730         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
3731         * UIProcess/WebPageContextMenuClient.h: Added.
3732
3733         * UIProcess/WebPageProxy.cpp:
3734         (WebKit::WebPageProxy::initializeContextMenuClient):
3735         (WebKit::WebPageProxy::showContextMenu):
3736         * UIProcess/WebPageProxy.h:
3737         * UIProcess/WebPageProxy.messages.in:
3738
3739         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3740         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
3741         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
3742         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
3743
3744         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3745         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems):
3746         * WebProcess/WebPage/WebContextMenu.cpp:
3747         (WebKit::WebContextMenu::show):
3748
3749 2010-11-15  Anders Carlsson  <andersca@apple.com>
3750
3751         Reviewed by Sam Weinig.
3752
3753         Add shouldDecodeSourceDataOfMIMEType WKContextDownloadClient callback
3754         https://bugs.webkit.org/show_bug.cgi?id=49558
3755
3756         * UIProcess/API/C/WKContext.h:
3757         Add shouldDecodeSourceDataOfMIMEType callback.
3758
3759         * UIProcess/Downloads/DownloadProxy.cpp:
3760         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
3761         Call WebDownloadClient::shouldDecodeSourceDataOfMIMEType.
3762
3763         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3764         Add allowOverwrite out parameter.
3765
3766         * UIProcess/Downloads/DownloadProxy.h:
3767         * UIProcess/Downloads/DownloadProxy.messages.in:
3768         Add ShouldDecodeSourceDataOfMIMEType message.
3769
3770         * UIProcess/WebDownloadClient.cpp:
3771         (WebKit::WebDownloadClient::shouldDecodeSourceDataOfMIMEType):
3772         Call the WKContextDownloadClient.
3773
3774         (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
3775         Add allowOverwrite out parameter.
3776
3777         * UIProcess/WebDownloadClient.h:
3778         * WebProcess/Downloads/Download.cpp:
3779         (WebKit::Download::shouldDecodeSourceDataOfMIMEType):
3780         Send the ShouldDecodeSourceDataOfMIMEType message.
3781
3782         (WebKit::Download::decideDestinationWithSuggestedFilename):
3783         Add allowOverwrite reply parameter.
3784
3785         * WebProcess/Downloads/mac/DownloadMac.mm:
3786         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
3787         Call Download::shouldDecodeSourceDataOfMIMEType.
3788
3789         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
3790         Add allowOverwrite parameter.
3791
3792 2010-11-15  Anders Carlsson  <andersca@apple.com>
3793
3794         Reviewed by Sam Weinig.
3795
3796         Add decideDestinationWithSuggestedFilename WKContextDownloadClient callback
3797         https://bugs.webkit.org/show_bug.cgi?id=49554
3798
3799         * Platform/CoreIPC/MessageSender.h:
3800         (CoreIPC::MessageSender::sendSync):
3801         Add sendSync capabilities to Messagesender.
3802         
3803         * UIProcess/API/C/WKContext.h:
3804         Add decideDestinationWithSuggestedFilename callback.
3805
3806         * UIProcess/Downloads/DownloadProxy.cpp:
3807         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3808         Call WebDownloadClient::decideDestinationWithSuggestedFilename.
3809
3810         * UIProcess/Downloads/DownloadProxy.messages.in:
3811         Add DecideDestinationWithSuggestedFilename.
3812
3813         * UIProcess/WebContext.cpp:
3814         (WebKit::WebContext::didReceiveSyncMessage):
3815         Process MessageClassDownloadProxy messages.
3816
3817         * UIProcess/WebDownloadClient.cpp:
3818         (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
3819         Ask the WKContextDownloadClient for the destination.
3820
3821         * UIProcess/WebProcessProxy.cpp:
3822         (WebKit::WebProcessProxy::didReceiveSyncMessage):
3823         MessageClassDownloadProxy messages should go to the WebContext.
3824
3825         * WebProcess/Downloads/Download.cpp:
3826         (WebKit::Download::decideDestinationWithSuggestedFilename):
3827         Send the DecideDestinationWithSuggestedFilename message.
3828
3829         * WebProcess/Downloads/Download.h:
3830         * WebProcess/Downloads/mac/DownloadMac.mm:
3831         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
3832         call Download::decideDestinationWithSuggestedFilename and set the destination.
3833
3834 2010-11-15  Andreas Kling  <kling@webkit.org>
3835
3836         Reviewed by Kenneth Rohde Christiansen.
3837
3838         [WK2][Qt] Add "page snapshot" functionality to tiled backing store
3839
3840         Original patch by Antti Koivisto.
3841
3842         Add a way to take a snapshot of a specific part of the page, at a specific scale.
3843         Only implemented for the tiled drawing area.
3844
3845         * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
3846         New message: TakeSnapshot.
3847
3848         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
3849         New message: SnapshotTaken.
3850
3851         * UIProcess/API/qt/qgraphicswkview.h:
3852         * UIProcess/API/qt/qgraphicswkview.cpp:
3853         (QGraphicsWKView::takeSnapshot):
3854         Expose the snapshot functionality.
3855
3856         * UIProcess/TiledDrawingAreaProxy.cpp:
3857         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
3858         (WebKit::TiledDrawingAreaProxy::takeSnapshot):
3859         * UIProcess/TiledDrawingAreaProxy.h:
3860         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
3861         (WebKit::TiledDrawingAreaProxy::snapshotTaken):
3862         * WebProcess/WebPage/TiledDrawingArea.cpp:
3863         (WebKit::TiledDrawingArea::didReceiveMessage):
3864
3865 2010-11-15  Andreas Kling  <andreas.kling@nokia.com>
3866
3867         Reviewed by Kenneth Rohde Christiansen.
3868
3869         [WK2][Qt] WebKit2 implementation of tiled backing store
3870         https://bugs.webkit.org/show_bug.cgi?id=49526
3871
3872         Basic opt-in tiling implementation for WebKit2/Qt.
3873
3874         Original patch by Antti Koivisto.
3875
3876         * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
3877         New messages: RequestTileUpdate and CancelTileUpdate.
3878
3879         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
3880         New messages: Invalidate, TileUpdated, AllTileUpdatesProcessed.
3881
3882         * Shared/DrawingAreaBase.h:
3883         New area type: TiledDrawingAreaType.
3884
3885         * UIProcess/API/qt/qgraphicswkview.h:
3886         * UIProcess/API/qt/qgraphicswkview.cpp:
3887         (QGraphicsWKView::QGraphicsWKView):
3888         (QGraphicsWKView::setGeometry):
3889         (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
3890         (QGraphicsWKView::prepareScaleChange):
3891         (QGraphicsWKView::commitScaleChange):
3892         (QGraphicsWKViewPrivate::onScaleChanged):
3893         (QGraphicsWKViewPrivate::commitScale):
3894         Support for tiled backing store.
3895
3896         * UIProcess/TiledDrawingAreaProxy.cpp: Added.
3897         (WebKit::TiledDrawingAreaProxy::create):
3898         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
3899         (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
3900         (WebKit::TiledDrawingAreaProxy::setSize):
3901         (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
3902         (WebKit::TiledDrawingAreaProxy::didSetSize):
3903         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
3904         (WebKit::TiledDrawingAreaProxy::didReceiveSyncMessage):
3905         (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
3906         (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
3907         (WebKit::TiledDrawingAreaProxy::createTile):
3908         (WebKit::TiledDrawingAreaProxy::setTileSize):
3909         (WebKit::TiledDrawingAreaProxy::setTileCreationDelay):
3910         (WebKit::TiledDrawingAreaProxy::setKeepAndCoverAreaMultipliers):
3911         (WebKit::TiledDrawingAreaProxy::invalidate):
3912         (WebKit::TiledDrawingAreaProxy::updateTileBuffers):
3913         (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
3914         (WebKit::TiledDrawingAreaProxy::paint):
3915         (WebKit::TiledDrawingAreaProxy::adjustVisibleRect):
3916         (WebKit::TiledDrawingAreaProxy::setContentsScale):
3917         (WebKit::TiledDrawingAreaProxy::removeAllTiles):
3918         (WebKit::TiledDrawingAreaProxy::tileDistance):
3919         (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
3920         (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
3921         (WebKit::TiledDrawingAreaProxy::createTiles):
3922         (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
3923         (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
3924         (WebKit::TiledDrawingAreaProxy::tileAt):
3925         (WebKit::TiledDrawingAreaProxy::setTile):
3926         (WebKit::TiledDrawingAreaProxy::removeTile):
3927         (WebKit::TiledDrawingAreaProxy::mapToContents):
3928         (WebKit::TiledDrawingAreaProxy::mapFromContents):
3929         (WebKit::TiledDrawingAreaProxy::contentsRect):
3930         (WebKit::TiledDrawingAreaProxy::tileRectForCoordinate):
3931         (WebKit::TiledDrawingAreaProxy::tileCoordinateForPoint):
3932         (WebKit::TiledDrawingAreaProxy::startTileBufferUpdateTimer):
3933         (WebKit::TiledDrawingAreaProxy::tileBufferUpdateTimerFired):
3934         (WebKit::TiledDrawingAreaProxy::startTileCreationTimer):
3935         (WebKit::TiledDrawingAreaProxy::tileCreationTimerFired):
3936         (WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
3937         * UIProcess/TiledDrawingAreaProxy.h: Added.
3938         (WebKit::TiledDrawingAreaProxy::contentsScale):
3939         (WebKit::TiledDrawingAreaProxy::attachCompositingContext):
3940         (WebKit::TiledDrawingAreaProxy::detachCompositingContext):
3941         (WebKit::TiledDrawingAreaProxy::tileSize):
3942         (WebKit::TiledDrawingAreaProxy::tileCreationDelay):
3943         (WebKit::TiledDrawingAreaProxy::getKeepAndCoverAreaMultipliers):
3944         * UIProcess/TiledDrawingAreaTile.h: Added.
3945         (WebKit::TiledDrawingAreaTile::create):
3946         (WebKit::TiledDrawingAreaTile::hasBackBufferUpdatePending):
3947         (WebKit::TiledDrawingAreaTile::coordinate):
3948         (WebKit::TiledDrawingAreaTile::rect):
3949         (WebKit::TiledDrawingAreaTile::ID):
3950         * WebProcess/WebPage/DrawingArea.cpp:
3951         (WebKit::DrawingArea::create):
3952         * WebProcess/WebPage/TiledDrawingArea.cpp: Added.
3953         (WebKit::TiledDrawingArea::TiledDrawingArea):
3954         (WebKit::TiledDrawingArea::~TiledDrawingArea):
3955         (WebKit::TiledDrawingArea::invalidateWindow):
3956         (WebKit::TiledDrawingArea::invalidateContentsAndWindow):
3957         (WebKit::TiledDrawingArea::invalidateContentsForSlowScroll):
3958         (WebKit::TiledDrawingArea::scroll):
3959         (WebKit::TiledDrawingArea::setNeedsDisplay):
3960         (WebKit::TiledDrawingArea::display):
3961         (WebKit::TiledDrawingArea::scheduleDisplay):
3962         (WebKit::TiledDrawingArea::setSize):
3963         (WebKit::TiledDrawingArea::suspendPainting):
3964         (WebKit::TiledDrawingArea::resumePainting):
3965         (WebKit::TiledDrawingArea::didUpdate):
3966         (WebKit::TiledDrawingArea::updateTile):
3967         (WebKit::TiledDrawingArea::tileUpdateTimerFired):
3968         (WebKit::TiledDrawingArea::didReceiveMessage):
3969         * WebProcess/WebPage/TiledDrawingArea.h: Added.
3970         (WebKit::TiledDrawingArea::attachCompositingContext):
3971         (WebKit::TiledDrawingArea::detachCompositingContext):
3972         (WebKit::TiledDrawingArea::setRootCompositingLayer):
3973         (WebKit::TiledDrawingArea::scheduleCompositingLayerSync):
3974         (WebKit::TiledDrawingArea::syncCompositingLayers):
3975         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Added.
3976         (WebKit::TiledDrawingArea::paintIntoUpdateChunk):
3977         * WebKit2.pro:
3978         * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Added.
3979         (WebKit::checkeredPixmap):
3980         (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
3981         (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
3982         (WebKit::TiledDrawingAreaTile::isDirty):
3983         (WebKit::TiledDrawingAreaTile::isReadyToPaint):
3984         (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
3985         (WebKit::TiledDrawingAreaTile::invalidate):
3986         (WebKit::TiledDrawingAreaTile::resize):
3987         (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
3988         (WebKit::TiledDrawingAreaTile::paint):
3989         (WebKit::TiledDrawingAreaTile::paintCheckerPattern):
3990         (WebKit::TiledDrawingAreaTile::updateFromChunk):
3991         (WebKit::TiledDrawingAreaTile::updateBackBuffer):
3992         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Added.
3993         (WebKit::TiledDrawingAreaProxy::updateWebView):
3994         (WebKit::TiledDrawingAreaProxy::webViewVisibleRect):
3995         (WebKit::TiledDrawingAreaProxy::page):
3996
3997 2010-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
3998
3999         Reviewed by Andreas Kling.
4000
4001         [Qt] Need to implement WebKit::pluginWillHandleLoadError for WebKit2
4002         https://bugs.webkit.org/show_bug.cgi?id=48764
4003
4004         Add the missing error to Qt support.
4005
4006         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
4007         (WebKit::pluginWillHandleLoadError):
4008
4009 2010-11-12  John Sullivan  <sullivan@apple.com>
4010
4011         Reviewed by Anders Carlsson.
4012
4013         Fixed Target for WKBundlePageOverlay.cpp.
4014
4015         * WebKit2.xcodeproj/project.pbxproj:
4016         Changed Target for WKBundlePageOverlay.cpp from WebProcess to WebKit2.
4017
4018 2010-11-12  Anders Carlsson  <andersca@apple.com>
4019
4020         Reviewed by John Sullivan.
4021
4022         Need a way that WKBundlePageOverlayRef clients can make sure they only uninstall the overlay they installed
4023         https://bugs.webkit.org/show_bug.cgi?id=49461
4024         <rdar://problem/8662760>
4025
4026         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
4027         (WKBundlePageUninstallPageOverlay):
4028         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
4029         * WebProcess/WebPage/FindController.cpp:
4030         (WebKit::FindController::findString):
4031         (WebKit::FindController::hideFindUI):
4032         * WebProcess/WebPage/WebPage.cpp:
4033         (WebKit::WebPage::uninstallPageOverlay):
4034         * WebProcess/WebPage/WebPage.h:
4035
4036 2010-11-12  Anders Carlsson  <andersca@apple.com>
4037
4038         Reviewed by Sam Weinig.
4039
4040         Allow MessageSender to override sendMessage
4041         https://bugs.webkit.org/show_bug.cgi?id=49457
4042
4043         Change MessageSender::send to encode the message and then call sendMessage.
4044         This allows for clients to override sendMessage, something which WebProcessProxy
4045         will be able to take advantage of.
4046
4047         * Platform/CoreIPC/MessageSender.h:
4048         (CoreIPC::MessageSender::send):
4049         (CoreIPC::MessageSender::sendMessage):
4050
4051 2010-11-12  Anders Carlsson  <andersca@apple.com>
4052
4053         Reviewed by Sam Weinig.
4054
4055         CoreIPC cleanup
4056         https://bugs.webkit.org/show_bug.cgi?id=49455
4057
4058         Add a static create function to ArgumentEncoder. 
4059         Factor sync message argument encoder creation out into a new function,
4060         createSyncMessageArgumentEncoder.
4061         
4062         * Platform/CoreIPC/ArgumentEncoder.cpp:
4063         (CoreIPC::ArgumentEncoder::create):
4064         * Platform/CoreIPC/ArgumentEncoder.h:
4065         * Platform/CoreIPC/Connection.cpp:
4066         (CoreIPC::Connection::createSyncMessageArgumentEncoder):
4067         (CoreIPC::Connection::dispatchSyncMessage):
4068         * Platform/CoreIPC/Connection.h:
4069         (CoreIPC::Connection::send):
4070         (CoreIPC::Connection::sendSync):
4071         * UIProcess/WebProcessProxy.h:
4072         (WebKit::WebProcessProxy::send):
4073
4074 2010-11-12  Sam Weinig  <sam@webkit.org>
4075
4076         Reviewed by Anders Carlsson.
4077
4078         ASSERTION when converting some WKStringRefs returned from willSubmitForm to CFStringRef
4079         <rdar://problem/8662180>
4080         https://bugs.webkit.org/show_bug.cgi?id=49454
4081
4082         Enforce the invariant that a WebString never contains a null WTF::String at a
4083         lower level, in the WebString constructor, instead of relying on the callers of
4084         WebString::create to do it.
4085
4086         * Shared/API/c/WKSharedAPICast.h:
4087         (WebKit::toAPI):
4088         (WebKit::toCopiedAPI): Remove null string check...
4089
4090         * Shared/WebString.h:
4091         (WebKit::WebString::WebString): ... and move it to the constructor.
4092
4093         * Shared/API/c/WKURL.cpp:
4094         (WKURLCopyString): Use toCopiedAPI() instead of calling WebString directly
4095         to match other similar uses.
4096
4097 2010-11-12  Andreas Kling  <kling@webkit.org>
4098
4099         Reviewed by Antonio Gomes.
4100
4101         [Qt][WK2] Fix leaking of mapped files
4102
4103         MappedMemory::fileName was never set on the receiving side, which led
4104         the MappedMemoryPool to call QFile::map() again when reusing an existing file.
4105
4106         * Platform/qt/MappedMemoryPool.cpp:
4107         (WebKit::MappedMemoryPool::mapFile):
4108
4109 2010-11-12  Adam Roben  <aroben@apple.com>
4110
4111         Windows build fix
4112
4113         * win/WebKit2Generated.make: Copy WKBundlePageOverlay.h.
4114
4115 2010-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
4116
4117         Unreviewed fix after r71857.
4118
4119         * UIProcess/qt/WebInspectorProxyQt.cpp:
4120         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
4121
4122 2010-11-11  Anders Carlsson  <andersca@apple.com>
4123
4124         Reviewed by Darin Adler.
4125
4126         Add didReceiveResponse and didReceiveData to the download client
4127         https://bugs.webkit.org/show_bug.cgi?id=49418
4128
4129         * UIProcess/API/C/WKContext.h:
4130         Add didReceiveResponse and didReceiveData to WKContextDownloadClient.
4131
4132         * UIProcess/Downloads/DownloadProxy.cpp:
4133         (WebKit::DownloadProxy::didReceiveResponse):
4134         (WebKit::DownloadProxy::didReceiveData):
4135         Call WebDownloadClient member functions.
4136
4137         * UIProcess/Downloads/DownloadProxy.messages.in:
4138         Add DidReceiveResponse and DidReceiveData messages.
4139
4140         * UIProcess/WebDownloadClient.cpp:
4141         (WebKit::WebDownloadClient::didReceiveResponse):
4142         (WebKit::WebDownloadClient::didReceiveData):
4143         Call client functions.
4144
4145         * WebKit2.xcodeproj/project.pbxproj:
4146         Let Xcode update the file.
4147
4148         * WebProcess/Downloads/Download.cpp:
4149         (WebKit::Download::didReceiveResponse):
4150         (WebKit::Download::didReceiveData):
4151         Send messages.
4152
4153         * WebProcess/Downloads/mac/DownloadMac.mm:
4154         (WebKit::Download::start):
4155         Set deletesFileUponFailure to NO.
4156
4157         (-[WKDownloadAsDelegate download:didReceiveResponse:]):
4158         Call didReceiveResponse.
4159
4160 2010-11-11  Anders Carlsson  <andersca@apple.com>
4161
4162         Reviewed by Sam Weinig.
4163
4164         Add an argument coder for ResourceResponse.
4165         https://bugs.webkit.org/show_bug.cgi?id=49415
4166
4167         * Shared/WebCoreArgumentCoders.h:
4168         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
4169         (CoreIPC::encodeResourceResponse):
4170         (CoreIPC::decodeResourceResponse):
4171         * Shared/mac/WebCoreArgumentCodersMac.mm:
4172         (CoreIPC::encodeResourceResponse):
4173         (CoreIPC::decodeResourceResponse):
4174         * Shared/qt/WebCoreArgumentCodersQt.cpp:
4175         (CoreIPC::encodeResourceResponse):
4176         (CoreIPC::decodeResourceResponse):
4177         * Shared/win/WebCoreArgumentCodersWin.cpp:
4178         (CoreIPC::encodeResourceResponse):
4179         (CoreIPC::decodeResourceResponse):
4180
4181 2010-11-11  Ryosuke Niwa  <rniwa@webkit.org>
4182
4183         Unreviewed build fix for r71587.
4184
4185         * WebKit2.xcodeproj/project.pbxproj: No longer uses absolute path.
4186
4187 2010-11-11  Csaba Osztrogonác  <ossy@webkit.org>
4188
4189         [Qt] Unreviewed WebKit2 buildfix after r71587.
4190
4191         * UIProcess/qt/WebInspectorProxyQt.cpp:
4192         * WebKit2.pro:
4193
4194 2010-11-11  Brian Weinstein  <bweinstein@apple.com>
4195
4196         More Windows build fixing. Change another #import to a #include, and remove an unneeded
4197         namespace.
4198
4199         * UIProcess/win/WebInspectorProxyWin.cpp:
4200         * WebProcess/WebPage/win/WebInspectorWin.cpp:
4201
4202 2010-11-11  Brent Fulgham  <bfulgham@webkit.org>
4203
4204         Windows [Cairo] build fix. Unreviewed.
4205
4206         Provide stubs for two BackingStore methods.
4207
4208         * Shared/cairo/BackingStoreCairo.cpp:
4209         (WebKit::BackingStore::createFlippedGraphicsContext):
4210         (WebKit::BackingStore::paint):
4211
4212 2010-11-11  Brian Weinstein  <bweinstein@apple.com>
4213
4214         Windows Build Fix. Change #imports to #includes.
4215
4216         * UIProcess/win/WebInspectorProxyWin.cpp:
4217
4218 2010-11-08  Timothy Hatcher  <timothy@apple.com>
4219
4220         Create and load the Web Inspector page.
4221
4222         https://webkit.org/b/49207
4223
4224         Reviewed by Anders Carlsson.
4225
4226         * UIProcess/WebInspectorProxy.cpp:
4227         (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
4228         call WebPageProxy::loadURL with inspectorPageURL.
4229         (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
4230         * UIProcess/WebInspectorProxy.h:
4231         * UIProcess/WebInspectorProxy.messages.in: Added.
4232         * UIProcess/WebPageProxy.cpp:
4233         (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
4234         (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
4235         * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
4236
4237         * UIProcess/mac/WebInspectorProxyMac.mm:
4238         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
4239         (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
4240         * UIProcess/qt/WebInspectorProxyQt.cpp:
4241         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
4242         (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
4243         * UIProcess/win/WebInspectorProxyWin.cpp:
4244         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
4245         (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
4246
4247         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
4248         (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
4249         (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
4250         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
4251         (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
4252         (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
4253         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
4254
4255         * WebProcess/WebPage/WebInspector.cpp:
4256         (WebKit::WebInspector::WebInspector):
4257         (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
4258         the WebPage using the result page ID.
4259         (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
4260         * WebProcess/WebPage/WebInspector.h:
4261         (WebKit::WebInspector::inspectorPage): Added.
4262         * WebProcess/WebPage/WebPage.cpp:
4263         (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
4264
4265         * WebProcess/WebPage/mac/WebInspectorMac.mm:
4266         (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
4267         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
4268         (WebKit::WebInspector::localizedStringsURL): Added stub.
4269         * WebProcess/WebPage/win/WebInspectorWin.cpp:
4270         (WebKit::WebInspector::localizedStringsURL): Added stub.
4271
4272         * DerivedSources.make: Added WebInspectorProxy.messages.in.
4273         * DerivedSources.pro: Ditto.
4274
4275         * WebKit2.pro: Added new files.
4276         * WebKit2.xcodeproj/project.pbxproj: Ditto.
4277         * win/WebKit2.vcproj: Ditto.
4278
4279 2010-11-11  Sam Weinig  <sam@webkit.org>
4280
4281         Reviewed by Anders Carlsson.
4282
4283         Move the remaining API client classes to use the APIClient base class.
4284         https://bugs.webkit.org/show_bug.cgi?id=49404
4285
4286         Also moves InjectedBundleClient into its own class to match other API clients.
4287
4288         * UIProcess/WebContextInjectedBundleClient.cpp:
4289         * UIProcess/WebContextInjectedBundleClient.h:
4290         * UIProcess/WebHistoryClient.cpp:
4291         (WebKit::WebHistoryClient::didNavigateWithNavigationData):
4292         (WebKit::WebHistoryClient::didPerformClientRedirect):
4293         (WebKit::WebHistoryClient::didPerformServerRedirect):
4294         (WebKit::WebHistoryClient::didUpdateHistoryTitle):
4295         (WebKit::WebHistoryClient::populateVisitedLinks):
4296         * UIProcess/WebHistoryClient.h:
4297         (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
4298         * WebKit2.pro:
4299         * WebKit2.xcodeproj/project.pbxproj:
4300         * WebProcess/InjectedBundle/InjectedBundle.cpp:
4301         (WebKit::InjectedBundle::initializeClient):
4302         (WebKit::InjectedBundle::reportException):
4303         (WebKit::InjectedBundle::didCreatePage):
4304         (WebKit::InjectedBundle::willDestroyPage):
4305         (WebKit::InjectedBundle::didReceiveMessage):
4306         * WebProcess/InjectedBundle/InjectedBundle.h:
4307         * WebProcess/InjectedBundle/InjectedBundleClient.cpp: Added.
4308         (WebKit::InjectedBundleClient::didCreatePage):
4309         (WebKit::InjectedBundleClient::willDestroyPage):
4310         (WebKit::InjectedBundleClient::didReceiveMessage):
4311         * WebProcess/InjectedBundle/InjectedBundleClient.h: Added.
4312         * win/WebKit2.vcproj:
4313
4314 2010-11-11  Anders Carlsson  <andersca@apple.com>
4315
4316         Reviewed by Adam Roben.
4317
4318         Remove an unneeded CFAllocatorRef parameter.
4319
4320         * Shared/API/c/mac/WKURLResponseNS.h:
4321         * Shared/API/c/mac/WKURLResponseNS.mm:
4322         (WKURLResponseCopyNSURLResponse):
4323
4324 2010-11-11  Anders Carlsson  <andersca@apple.com>
4325
4326         Reviewed by Adam Roben.
4327
4328         Add and implement WKDownloadCopyRequest
4329         https://bugs.webkit.org/show_bug.cgi?id=49393
4330
4331         * Shared/API/c/mac/WKURLRequestNS.h:
4332         * Shared/API/c/mac/WKURLRequestNS.mm:
4333         (WKURLRequestCopyNSURLRequest):
4334         Remove unneeded CFAllocator parameter.
4335
4336         * Shared/WebURLRequest.cpp:
4337         (WebKit::WebURLRequest::WebURLRequest):
4338         * Shared/WebURLRequest.h:
4339         (WebKit::WebURLRequest::create):
4340         Change create to take a ResourceRequest instead.
4341
4342         * UIProcess/API/C/WKDownload.cpp:
4343         (WKDownloadCopyRequest):
4344         Return a copied WKURLRequest.
4345
4346         * UIProcess/API/C/WKDownload.h:
4347         * UIProcess/Downloads/DownloadProxy.cpp:
4348         (WebKit::DownloadProxy::didStart):
4349         Set the request.
4350
4351         * UIProcess/Downloads/DownloadProxy.h:
4352         (WebKit::DownloadProxy::request):
4353         Return the request.
4354
4355         * UIProcess/Downloads/DownloadProxy.messages.in:
4356         * WebProcess/Downloads/Download.cpp:
4357         (WebKit::Download::didStart):
4358         Pass the request along when sending the DidStart message.
4359
4360 2010-11-11  John Sullivan  <sullivan@apple.com>
4361
4362         Rubber-stamped by Anders Carlsson.
4363
4364         * WebKit2.xcodeproj/project.pbxproj:
4365         Added WKBundlePageOverlay.h to the WebKit2 Target and made it public.
4366
4367 2010-11-11  Anders Carlsson  <andersca@apple.com>
4368
4369         Reviewed by John Sullivan.
4370
4371         Move GraphicsContext setup code to PageOverlay::drawRect
4372         https://bugs.webkit.org/show_bug.cgi?id=49389
4373
4374         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
4375         * WebProcess/WebPage/FindController.cpp:
4376         (WebKit::FindController::drawRect):
4377         * WebProcess/WebPage/PageOverlay.cpp:
4378         (WebKit::PageOverlay::drawRect):
4379
4380 2010-11-11  Adam Roben  <aroben@apple.com>
4381
4382         Build fix after r71816
4383
4384         * WebProcess/WebPage/WebPage.messages.in: Compile out
4385         SetActualVisibleContentRect when ENABLE(TILED_BACKING_STORE) is
4386         turned off.
4387
4388 2010-11-11  Balazs Kelemen  <kbalazs@webkit.org>
4389
4390         Reviewed by Andreas Kling.
4391
4392         [Qt][WK2] Implement BackingStore
4393         https://bugs.webkit.org/show_bug.cgi?id=49377
4394
4395         * Shared/qt/BackingStoreQt.cpp:
4396         (WebKit::createQImage): Added static helper. Creates a QImage
4397         from the shared memory buffer.
4398         (WebKit::BackingStore::createGraphicsContext):
4399         (WebKit::BackingStore::createFlippedGraphicsContext): Leave
4400         unimplemented with an ASSERT_NOT_REACHED since this is only
4401         needed for the CoreGraphics backend.
4402         (WebKit::BackingStore::paint):
4403
4404 2010-11-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
4405
4406         Reviewed by Andreas Kling.
4407
4408         [Qt] Add a Qt WebKit2 API for overriding the actual visible content rect
4409         https://bugs.webkit.org/show_bug.cgi?id=49381
4410
4411         Add an Qt WebKit2 API for overriding the actual visible content rect in
4412         WebCore. This is supposed to be used in combination with tiling.
4413
4414         * UIProcess/API/qt/qwkpage.cpp:
4415         (QWKPage::setActualVisibleContentsRect):
4416         * UIProcess/API/qt/qwkpage.h:
4417         * UIProcess/WebPageProxy.cpp:
4418         (WebKit::WebPageProxy::setActualVisibleContentRect):
4419         * UIProcess/WebPageProxy.h:
4420         * WebProcess/WebPage/WebPage.cpp:
4421         (WebKit::WebPage::setActualVisibleContentRect):
4422         * WebProcess/WebPage/WebPage.h:
4423         * WebProcess/WebPage/WebPage.messages.in:
4424
4425 2010-11-10  Beth Dakin  <bdakin@apple.com>
4426
4427         Reviewed by Simon Fraser.
4428
4429         Fix for https://bugs.webkit.org/show_bug.cgi?id=49356 
4430         -[WebView _scaleWebView:] shoul