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