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