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