[Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2
3         Reviewed by Andreas Kling.
4
5         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
6         https://bugs.webkit.org/show_bug.cgi?id=57087
7
8         Use explicit conversion for string to avoid depending on the default codec
9         installed by the user code.
10
11         * Platform/qt/SharedMemoryQt.cpp:
12         (WebKit::SharedMemory::create):
13         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
14         (WebKit::initializeGTK):
15         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
16         (tst_QGraphicsWKView::loadEmptyPage):
17         (tst_QGraphicsWKView::loadEmptyUrl):
18         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp:
19         (tst_QWKPage::loadEmptyUrl):
20         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
21         (WebKit::ProcessLauncher::launchProcess):
22         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
23         (WebKit::getPluginDisplay):
24         * WebProcess/qt/WebProcessMainQt.cpp:
25         (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
26         (WebKit::WebProcessMainQt):
27
28 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
29
30         Correct project file missing $(WebKitVSPropsRedirectionDir)s
31         after r81924.
32
33         * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir)
34
35 2011-03-25  Alejandro G. Castro  <alex@igalia.com>
36
37         Reviewed by Martin Robinson.
38
39         [WK2] Consider .c files in the generate-forwarding-headers script
40         https://bugs.webkit.org/show_bug.cgi?id=56680
41
42         * Scripts/generate-forwarding-headers.pl:
43
44 2011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
45
46         Unreviewed, rolling out r81916 and r81917.
47         http://trac.webkit.org/changeset/81916
48         http://trac.webkit.org/changeset/81917
49         https://bugs.webkit.org/show_bug.cgi?id=57071
50
51         broke a test on platforms that do not have QuickTime installed
52         (Requested by estes on #webkit).
53
54         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
55         (WebKit::WebFrameLoaderClient::objectContentType):
56         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
57
58 2011-03-24  Brady Eidson  <beidson@apple.com>
59
60         Reviewed by Darin Adler.
61
62         https://bugs.webkit.org/show_bug.cgi?id=57069
63         Add WKIconDatabase api to the project files, and expose accessor on WKContext.
64
65         Project file stuffs:
66         * GNUmakefile.am:
67         * WebKit2.xcodeproj/project.pbxproj:
68         * win/WebKit2.vcproj:
69
70         * Shared/API/c/WKBase.h:
71         * UIProcess/API/C/WKAPICast.h:
72
73         * UIProcess/API/C/WKContext.cpp:
74         (WKContextGetIconDatabase):
75         * UIProcess/API/C/WKContext.h:
76
77         * UIProcess/API/C/WKIconDatabase.cpp: Added.
78         (WKIconDatabaseGetTypeID):
79         * UIProcess/API/C/WKIconDatabase.h: Added.
80
81         * UIProcess/WebContext.h:
82         (WebKit::WebContext::iconDatabase):
83
84 2011-03-24  Brent Fulgham  <bfulgham@webkit.org>
85
86         Build correction.
87
88         Disable the CA Layer stuff when building with Cairo.
89
90         * win/WebKit2.vcproj:
91
92 2011-03-24  Brady Eidson  <beidson@apple.com>
93
94         Reviewed by Sam Weinig.
95
96         https://bugs.webkit.org/show_bug.cgi?id=57058
97         Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
98
99         * UIProcess/WebIconDatabase.cpp:
100         (WebKit::WebIconDatabase::WebIconDatabase):
101         (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path.
102         (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl.
103         (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl.
104         (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl.
105         (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl.
106         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with.
107         (WebKit::WebIconDatabase::performImport):
108         (WebKit::WebIconDatabase::didImportIconURLForPageURL):
109         (WebKit::WebIconDatabase::didImportIconDataForPageURL):
110         (WebKit::WebIconDatabase::didChangeIconForPageURL):
111         (WebKit::WebIconDatabase::didRemoveAllIcons):
112         (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions
113           are now that they're available.
114         * UIProcess/WebIconDatabase.h:
115
116         Add an IconDatabase logging channel:
117         * Platform/Logging.cpp:
118         (WebKit::initializeLogChannelsIfNecessary):
119         * Platform/Logging.h:
120
121         * UIProcess/WebContext.cpp:
122         (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
123           opening it.
124         * UIProcess/WebContext.h:
125
126 2011-03-24  Andy Estes  <aestes@apple.com>
127
128         Reviewed by Darin Adler.
129
130         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
131         https://bugs.webkit.org/show_bug.cgi?id=49016
132
133         Update objectContentType() implementation to handle the
134         shouldPreferPlugInsForImages flag.
135
136         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
137         (WebKit::WebFrameLoaderClient::objectContentType):
138         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
139
140 2011-03-24  Adam Roben  <aroben@apple.com>
141
142         Start compiling LayerTreeHostCA on Windows
143
144         Fixes <http://webkit.org/b/57060> WebKit2.vcproj should compile LayerTreeHostCA
145
146         Reviewed by Anders Carlsson.
147
148         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: Added.
149         (WebKit::LayerTreeHostCA::platformInitialize):
150         (WebKit::LayerTreeHostCA::scheduleLayerFlush):
151         (WebKit::LayerTreeHostCA::platformInvalidate):
152         (WebKit::LayerTreeHostCA::platformSizeDidChange):
153         (WebKit::LayerTreeHostCA::platformForceRepaint):
154         (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
155         Stubbed out.
156
157         * win/WebKit2.vcproj: Added new files. Let VS reorder existing files.
158
159         * win/WebKit2Apple.vsprops: Added WebProcess\WebPage\ca to the include path.
160
161 2011-03-24  Jer Noble  <jer.noble@apple.com>
162
163         Unreviewed build fix.
164
165         Remove reference to LayerTreeHostMac.h from WebFullScreenManagerMac.mm.
166
167         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
168
169 2011-03-24  Adam Roben  <aroben@apple.com>
170
171         Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm
172
173         Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows
174
175         Reviewed by Anders Carlsson.
176
177         * WebKit2.xcodeproj/project.pbxproj:
178
179         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.mm.
180         (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some Mac-specific code to
181         LayerTreeHostCAMac.mm.
182         (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Wrapped some Mac-specific code in
183         PLATFORM(MAC).
184
185         (WebKit::LayerTreeHostCA::invalidate):
186         (WebKit::LayerTreeHostCA::sizeDidChange):
187         (WebKit::LayerTreeHostCA::forceRepaint):
188         Moved some Mac-specific code to LayerTreeHostCAMac.mm.
189
190         (WebKit::LayerTreeHostCA::performScheduledLayerFlush): Renamed from
191         flushPendingLayerChangesRunLoopObserverCallback. Moved some code from here...
192         (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush): ...to here. Moved some
193         Mac-specific code to LayerTreeHostCAMac.mm.
194
195         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific
196         declarations in PLATFORM(MAC).
197
198         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: Added.
199         (WebKit::LayerTreeHostCA::platformInitialize):
200         (WebKit::LayerTreeHostCA::scheduleLayerFlush):
201         (WebKit::LayerTreeHostCA::platformInvalidate):
202         (WebKit::LayerTreeHostCA::platformSizeDidChange):
203         (WebKit::LayerTreeHostCA::platformForceRepaint):
204         (WebKit::LayerTreeHostCA::flushPendingLayerChangesRunLoopObserverCallback):
205         (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
206         Code was extracted from LayerTreeHostCA.cpp.
207
208 2011-03-24  Adam Roben  <aroben@apple.com>
209
210         Rename LayerTreeHostMac to LayerTreeHostCA
211
212         This is the first step toward sharing code with Windows.
213
214         Fixes <http://webkit.org/b/57051>.
215
216         Reviewed by Anders Carlsson.
217
218         * WebKit2.xcodeproj/project.pbxproj:
219         * WebProcess/WebPage/LayerTreeHost.cpp:
220         (WebKit::LayerTreeHost::create):
221         Updated for rename.
222
223         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h.
224         * WebProcess/WebPage/ca/LayerTreeHostCA.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm.
225
226 2011-03-17  Jer Noble  <jer.noble@apple.com>
227
228         Reviewed by Maciej Stachowiak.
229
230         WebKit2: Cancelling full screen early leaves full screen window up.
231         https://bugs.webkit.org/show_bug.cgi?id=56589
232
233         No new tests, as WebKitTestRunner does not currently support the new Full Screen API.
234
235         Notify the UIProcess when it needs to tear down its layer hosting view, turn off
236         the background layer when not in accelerated rendering mode and don't swap out 
237         the web view unnecessarily 
238
239         * UIProcess/mac/WKFullScreenWindowController.mm:
240         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Check before swapping _webView.
241         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:]): Add the _layerHostingView
242             to the full screen window's animationView, not its contentsView.
243         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Hide the background layer.
244         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
245         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): If given a null rootLayer, tell
246             the client to exit accelerated mode.
247
248 2011-03-24  Enrica Casucci  <enrica@apple.com>
249
250         Reviewed by Alexey Proskuryakov.
251
252         WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working.
253         https://bugs.webkit.org/show_bug.cgi?id=56975
254         <rdar://problem/8915066>
255         
256         Adding missing entry point to support Mac OS X services in WebKit2.
257
258         * UIProcess/API/mac/WKView.mm:
259         (-[WKView readSelectionFromPasteboard:]): Added.
260         * UIProcess/WebPageProxy.h:
261         * UIProcess/mac/WebPageProxyMac.mm:
262         (WebKit::WebPageProxy::readSelectionFromPasteboard): Added.
263         * WebProcess/WebPage/WebPage.h:
264         * WebProcess/WebPage/WebPage.messages.in: Added synchronous
265         message.
266         * WebProcess/WebPage/mac/WebPageMac.mm:
267         (WebKit::WebPage::readSelectionFromPasteboard): Added.
268
269 2011-03-24  Jia Pu  <jpu@apple.com>
270
271         Reviewed by Darin Adler.
272
273         Dismissed reversion suggestion is incorrectly learned.
274         https://bugs.webkit.org/show_bug.cgi?id=57039
275
276         CorrectionPanel should always use [NSSpellChecker dismissCorrectionBubbleForView].
277         [NSSpellChecker cancelCorrectionBubbleForView] is reserved for situation where correction panel
278         is dismissed explicitly by ESC key or clicking the dimiss button. Misusing these causes
279         incorrect automatic learning.
280
281         * UIProcess/mac/CorrectionPanel.mm:
282         (WebKit::CorrectionPanel::dismissInternal):
283
284 2011-03-24  Brian Weinstein  <bweinstein@apple.com>
285
286         Reviewed by Adam Roben.
287
288         WebKit2: Add Trackpoint driver hack to support IBM trackpads
289         https://bugs.webkit.org/show_bug.cgi?id=49830
290         <rdar://problem/8705951>
291
292         Copy code from WebKit1 to WebKit2 to handle initializing fake scrollbars so 
293         IBM machines with a trackpad send us WM_VSCROLL and WM_HSCROLL messages.
294
295         Listen for the WM_VSCROLL and WM_HSCROLL messages, and turn the values into
296         ScrollDirection and ScrollGranularity, and send a scroll command to the
297         WebProcess.
298
299         * UIProcess/WebPageProxy.cpp:
300         (WebKit::WebPageProxy::scrollBy): Send a message to the WebProcess.
301         * UIProcess/WebPageProxy.h:
302         * UIProcess/win/WebView.cpp:
303         (WebKit::WebView::wndProc): Add WM_VSCROLL and WM_HSCROLL message handling.
304         (WebKit::WebView::initialize): Call shouldInitializeTrackPointHack.
305         (WebKit::WebView::onHorizontalScroll): Turn wParam into a ScrollDirection and ScrollGranularity. 
306         (WebKit::WebView::onVerticalScroll): Ditto.
307         (WebKit::WebView::shouldInitializeTrackPointHack): Check the registry for keys that indicate
308             the machine has a IBM Trackpoint driver.
309         * UIProcess/win/WebView.h:
310         * WebProcess/WebPage/WebPage.cpp:
311         (WebKit::WebPage::scrollBy): Call scroll method.
312         (WebKit::WebPage::scroll): Moved from WebPageMac and WebPageWin.
313         (WebKit::WebPage::logicalScroll): Ditto.
314         * WebProcess/WebPage/WebPage.h:
315         * WebProcess/WebPage/WebPage.messages.in: Add a new scrollBy message. 
316         * WebProcess/WebPage/mac/WebPageMac.mm: Remove scroll and logicalScroll, they are now in WebPage.cpp.
317         * WebProcess/WebPage/win/WebPageWin.cpp: Ditto.
318
319 2011-03-24  Sam Weinig  <sam@webkit.org>
320
321         Reviewed by Darin Adler.
322
323         Dictionary text extraction is not correctly detecting word boundaries on bing.com
324         <rdar://problem/9078569>
325         https://bugs.webkit.org/show_bug.cgi?id=56995
326
327         * Shared/DictionaryPopupInfo.cpp:
328         (WebKit::DictionaryPopupInfo::encode):
329         (WebKit::DictionaryPopupInfo::decode):
330         * Shared/DictionaryPopupInfo.h:
331         Add options dictionary.
332
333         * UIProcess/API/mac/PageClientImpl.mm:
334         (WebKit::PageClientImpl::didPerformDictionaryLookup):
335         Add path that can pass options through.
336
337         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
338         (WebKit::WebContextMenuClient::lookUpInDictionary):
339         Use the new performDictionaryLookupForSelection which can extract context
340         if supported.
341
342         * WebProcess/WebPage/WebPage.h:
343         * WebProcess/WebPage/mac/WebPageMac.mm:
344         (WebKit::characterRangeAtPositionForPoint):
345         (WebKit::characterRangeAtPoint):
346         Split functionality out of characterRangeAtPoint and into 
347         characterRangeAtPositionForPoint to avoid doing duplicate work 
348         if you already have the position.
349
350         (WebKit::isPositionInRange):
351         (WebKit::shouldUseSelection):
352         Add predicate to determine if we should use the selection instead
353         of expanding to find the word we are over.
354
355         (WebKit::WebPage::performDictionaryLookupAtLocation):
356         If available, use the surrounding paragraph as context to get better extraction
357         and to get lexicographical information about the word. Also, clean up and use 
358         editing APIs to make the code more concise and understandable.
359
360         (WebKit::WebPage::performDictionaryLookupForSelection):
361         Use similar logic as in performDictionaryLookupAtLocation to extract additional
362         details from a selection for use in the dictionary popup.
363
364         (WebKit::WebPage::performDictionaryLookupForRange):
365         Pass options to WebProcess if available.
366
367 2011-03-24  Jon Lee  <jonlee@apple.com>
368
369         Reviewed by Darin Adler.
370
371         WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
372         <rdar://problem/8553962>
373
374         * WebProcess/WebPage/WebPage.cpp:
375         (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame
376
377 2011-03-24  Brian Weinstein  <bweinstein@apple.com>
378
379         Rubber-stamped by Sam Weinig.
380
381         Fix a typo in the VK_LEFT case of performDefaultBehaviorForKeyEvent.
382
383         * WebProcess/WebPage/mac/WebPageMac.mm:
384         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): It should be a logical or,
385             not a bitwise or.
386
387 2011-03-24  Jeff Miller  <jeffm@apple.com>
388
389         Fix typo - USE(CF_NETWORK) should be USE(CFNETWORK).
390
391         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
392         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): USE(CF_NETWORK) should be USE(CFNETWORK)
393
394 2011-03-23  Jia Pu  <jpu@apple.com>
395
396         Reviewed by Darin Adler.
397
398         Hook up new AppKit autocorrection UI with WK2.
399         https://bugs.webkit.org/show_bug.cgi?id=56055
400         <rdar://problem/8947463>
401
402         Please see WebCore/ChangeLog for detail.
403
404         The calls to AppKit are implemented in PageClientImpl. Other changes are necessary for the
405         plumbing work.
406
407         * UIProcess/API/mac/PageClientImpl.h:
408         * UIProcess/API/mac/PageClientImpl.mm:
409         (WebKit::PageClientImpl::showCorrectionPanel):
410         (WebKit::PageClientImpl::dismissCorrectionPanel):
411         (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
412         (WebKit::PageClientImpl::recordAutocorrectionResponse):
413         * UIProcess/API/mac/WKView.mm:
414         (-[WKView spellCheckerDocumentTag]):
415         (-[WKView handleCorrectionPanelResult:]):
416         * UIProcess/API/mac/WKViewPrivate.h:
417         * UIProcess/PageClient.h:
418         * UIProcess/WebPageProxy.cpp:
419         (WebKit::WebPageProxy::didCommitLoadForFrame):
420         (WebKit::WebPageProxy::showCorrectionPanel):
421         (WebKit::WebPageProxy::dismissCorrectionPanel):
422         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
423         (WebKit::WebPageProxy::recordAutocorrectionResponse):
424         (WebKit::WebPageProxy::handleCorrectionPanelResult):
425         * UIProcess/WebPageProxy.h:
426         * UIProcess/WebPageProxy.messages.in:
427         * UIProcess/mac/CorrectionPanel.h: Added.
428         (WebKit::CorrectionPanel::isShowing):
429         * UIProcess/mac/CorrectionPanel.mm: Added.
430         (correctionBubbleType):
431         (WebKit::CorrectionPanel::CorrectionPanel):
432         (WebKit::CorrectionPanel::~CorrectionPanel):
433         (WebKit::CorrectionPanel::show):
434         (WebKit::CorrectionPanel::dismiss):
435         (WebKit::CorrectionPanel::dismissSoon):
436         (WebKit::CorrectionPanel::dismissInternal):
437         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
438         * WebKit2.xcodeproj/project.pbxproj:
439         * WebProcess/WebCoreSupport/WebEditorClient.h:
440         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
441         (WebKit::WebEditorClient::showCorrectionPanel):
442         (WebKit::WebEditorClient::dismissCorrectionPanel):
443         (WebKit::WebEditorClient::dismissCorrectionPanelSoon):
444         (WebKit::WebEditorClient::recordAutocorrectionResponse):
445         * WebProcess/WebPage/WebPage.cpp:
446         (WebKit::WebPage::handleCorrectionPanelResult):
447         * WebProcess/WebPage/WebPage.h:
448         * WebProcess/WebPage/WebPage.messages.in:
449
450 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
451
452         Reviewed by Maciej Stachowiak.
453
454         WebKit2: Need API to manage the Media Cache
455         https://bugs.webkit.org/show_bug.cgi?id=56878
456         <rdar://problem/9082503>
457
458         Call through to HTMLMediaElement functions to manage the WebCore media cache.
459
460         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
461         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
462         (WebKit::WebMediaCacheManager::clearCacheForHostname):
463         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
464
465 2011-03-23  Jeff Miller  <jeffm@apple.com>
466
467         Reviewed by Darin Adler.
468
469         Add WKBundleSetHostAllowsAnyHTTPSCertificate() for Windows
470         https://bugs.webkit.org/show_bug.cgi?id=56972
471         
472         This is the WebKit2 equivalent to the WebKit1 API IWebMutableURLRequest::setAllowsAnyHTTPSCertificate().
473
474         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
475         (WKBundleSetHostAllowsAnyHTTPSCertificate): Added.
476         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetHostAllowsAnyHTTPSCertificate().
477         * WebProcess/InjectedBundle/InjectedBundle.h: Added setHostAllowsAnyHTTPSCertificate().
478         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
479         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
480         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
481         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
482         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
483         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
484         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
485         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added.
486
487 2011-03-23  Sam Weinig  <sam@webkit.org>
488
489         Reviewed by Anders Carlsson.
490
491         Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
492
493         This API is not necessary.
494
495         * Shared/WebPageCreationParameters.cpp:
496         (WebKit::WebPageCreationParameters::encode):
497         (WebKit::WebPageCreationParameters::decode):
498         * Shared/WebPageCreationParameters.h:
499         * UIProcess/API/mac/WKView.h:
500         * UIProcess/API/mac/WKView.mm:
501         (-[WKView initWithFrame:]):
502         (-[WKView initWithFrame:contextRef:]):
503         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
504         * UIProcess/WebPageProxy.cpp:
505         (WebKit::WebPageProxy::creationParameters):
506         * UIProcess/WebPageProxy.h:
507         * WebProcess/WebPage/WebFrame.cpp:
508         (WebKit::WebFrame::createMainFrame):
509         * WebProcess/WebPage/WebFrame.h:
510         * WebProcess/WebPage/WebPage.cpp:
511         (WebKit::WebPage::WebPage):
512
513 2011-03-23  Balazs Kelemen  <kbalazs@webkit.org>
514
515         Reviewed by Andreas Kling.
516
517         [WK2] Handle keyboard and mouse events on X11
518         https://bugs.webkit.org/show_bug.cgi?id=56103
519
520         Propagate keyboard and mouse events to the plugin
521         as XEvent's.
522
523         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
524         (WebKit::initializeXEvent):
525         (WebKit::xTimeStamp):
526         (WebKit::xKeyModifiers):
527         (WebKit::setCommonMouseEventFields):
528         (WebKit::setXMotionEventFields):
529         (WebKit::setXButtonEventFields):
530         (WebKit::setXCrossingEventFields):
531         (WebKit::NetscapePlugin::platformHandleMouseEvent):
532         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
533         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
534         (WebKit::setXKeyEventFields):
535         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
536
537 2011-03-23  Anders Carlsson  <andersca@apple.com>
538
539         Reviewed by Sam Weinig.
540
541         Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not
542         https://bugs.webkit.org/show_bug.cgi?id=56954
543
544         This is so we'll eventually be able to send sync messages that aren't processed immediately if the 
545         destination is waiting for a reply to another synchronous message.
546
547         * Platform/CoreIPC/Connection.cpp:
548         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
549         Only check for the DispatchMessageWhenWaitingForSyncReply flag.
550
551         (CoreIPC::Connection::sendSyncMessage):
552         Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID.
553
554         * Platform/CoreIPC/Connection.h:
555         (CoreIPC::Connection::sendSync):        
556         (CoreIPC::Connection::deprecatedSendSync):
557         No need to add SyncMessage here anymore.
558
559 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
560
561         Qt Build Fix.
562
563         * DerivedSources.pro:
564
565 2011-03-22  Brian Weinstein  <bweinstein@apple.com>
566
567         Reviewed by Darin Adler.
568
569         WebKit2: Need API to manage the Media Cache
570         https://bugs.webkit.org/show_bug.cgi?id=56878
571         <rdar://problem/9082503>
572
573         Project File Fun:
574         * GNUmakefile.am:
575         * WebKit2.pri:
576         * WebKit2.pro:
577         * WebKit2.xcodeproj/project.pbxproj:
578         * win/WebKit2.vcproj:
579         * win/WebKit2Common.vsprops:
580         * win/WebKit2Generated.make:
581         
582         Derived Sources and API fun:
583         * DerivedSources.make:
584         * DerivedSources.pro:
585         * Platform/CoreIPC/MessageID.h:
586         * Shared/API/c/WKBase.h:
587         * Shared/APIObject.h:
588         * UIProcess/API/C/WKAPICast.h:
589         
590         * UIProcess/WebProcessProxy.cpp:
591         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages.
592         * WebProcess/WebProcess.cpp:
593         (WebKit::WebProcess::didReceiveMessage): Ditto.
594         
595         * UIProcess/WebContext.cpp:
596         (WebKit::WebContext::WebContext): Initialize the WebMediaCacheManagerProxy member variable.
597         (WebKit::WebContext::~WebContext): Invalidate the WebMediaCacheManagerProxy.
598         (WebKit::WebContext::disconnectProcess): Ditto.
599         (WebKit::WebContext::didReceiveMessage): Add a case for MediaCache messages.
600         * UIProcess/WebContext.h:
601         (WebKit::WebContext::mediaCacheManagerProxy):
602
603         * UIProcess/API/C/WKContext.cpp:
604         (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager.
605         * UIProcess/API/C/WKContext.h:
606
607         * UIProcess/API/C/WKMediaCacheManager.cpp: Added.
608         (WKMediaCacheManagerGetTypeID): Returns the WebMediaCacheManagerProxy type.
609         (WKMediaCacheManagerGetHostnamesWithMediaCache): Calls down to the WebMediaCacheManagerProxy.
610         (WKMediaCacheManagerClearCacheForHostname): Ditto.
611         (WKMediaCacheManagerClearCacheForAllHostnames): Ditto.
612         * UIProcess/API/C/WKMediaCacheManager.h: Added.
613
614         * UIProcess/WebMediaCacheManagerProxy.cpp: Added.
615         (WebKit::WebMediaCacheManagerProxy::create):
616         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
617         (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy):
618         (WebKit::WebMediaCacheManagerProxy::invalidate):
619         (WebKit::WebMediaCacheManagerProxy::didReceiveMessage):
620         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Call through to the WebProcess.
621         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Process the WebProcess response,
622             and call the callback.
623         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Call through to the WebProcess.
624         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Call through to the WebProcess.
625         * UIProcess/WebMediaCacheManagerProxy.h: Added.
626         (WebKit::WebMediaCacheManagerProxy::clearContext):
627         (WebKit::WebMediaCacheManagerProxy::type):
628         * UIProcess/WebMediaCacheManagerProxy.messages.in: Added.
629
630         * WebProcess/MediaCache: Added.
631         * WebProcess/MediaCache/WebMediaCacheManager.cpp: Added.
632         (WebKit::WebMediaCacheManager::shared):
633         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
634         (WebKit::WebMediaCacheManager::didReceiveMessage):
635         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Added a FIXME to call through to WebCore.
636         (WebKit::WebMediaCacheManager::clearCacheForHostname): Ditto.
637         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Ditto.
638         * WebProcess/MediaCache/WebMediaCacheManager.h: Added.
639         * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Added.
640
641 2011-03-22  Brady Eidson  <beidson@apple.com>
642
643         Reviewed by Sam Weinig.
644
645         Add asynchronous load decision call to WebKit2 IconDatabase
646         https://bugs.webkit.org/show_bug.cgi?id=56887
647
648         * UIProcess/WebIconDatabase.cpp:
649         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): In the future, get the actual load decision from the database.
650           For now, always message "IconLoadNo" back to the WebProcess.
651         * UIProcess/WebIconDatabase.h:
652         * UIProcess/WebIconDatabase.messages.in:
653         
654         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
655         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Message the UIProcess for the load decision.
656         (WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Callback into WebCore with the received load decision.
657         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
658         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
659
660 2011-03-23  Chris Fleizach  <cfleizach@apple.com>
661
662         Reviewed by Darin Adler.
663
664         REGRESSION: WK2: AX: PDF in Safari no longer accessible.
665         https://bugs.webkit.org/show_bug.cgi?id=56849
666
667         The WKView needs to know when to return the WKPDFView and when to return
668         the remote web process connection.
669
670         * UIProcess/API/mac/PDFViewController.h:
671         (WebKit::PDFViewController::pdfView):
672         * UIProcess/API/mac/WKView.mm:
673         (-[WKView accessibilityFocusedUIElement]):
674         (-[WKView accessibilityHitTest:]):
675         (-[WKView accessibilityAttributeValue:]):
676
677 2011-03-21  Stephanie Lewis  <slewis@apple.com>
678
679         Reviewed by Simon Fraser.
680
681         https://bugs.webkit.org/show_bug.cgi?id=56798
682         Wrap autorelease pools around calls that can have pathological memory growth on Membuster.  
683         Only wrap the main runloop because some background threads are not expected to call into 
684         objc and an autorelease pool could mask bugs.
685
686         * Platform/mac/RunLoopMac.mm:
687         (RunLoop::performWork):
688         (RunLoop::TimerBase::timerFired):
689         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
690         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
691
692 2011-03-22  Anders Carlsson  <andersca@apple.com>
693
694         Reviewed by Sam Weinig.
695
696         OBJECT element with DivX source is always downloaded
697         https://bugs.webkit.org/show_bug.cgi?id=56879
698
699         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
700         (WebKit::getPluginInfoFromPropertyLists):
701         Always try to split every element in the "WebPluginExtensions" array, since the DivX plug-in
702         specifies multiple file extensions in a single element.
703         
704         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
705         (WebKit::pluginSupportsExtension):
706         Add a new helper function.
707
708         (WebKit::WebFrameLoaderClient::objectContentType):
709         If we can't find the MIME for an extension, explicitly check if there's a plugin that claims to
710         handle the given extension.
711
712 2011-03-22  Brady Eidson  <beidson@apple.com>
713
714         Reviewed by Sam Weinig.
715
716         Rename the synchronous icon database messages to be prefixed with "synchronous"
717
718         * UIProcess/WebIconDatabase.cpp:
719         (WebKit::WebIconDatabase::synchronousIconDataForPageURL):
720         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
721         (WebKit::WebIconDatabase::synchronousIconDataKnownForIconURL):
722         (WebKit::WebIconDatabase::synchronousLoadDecisionForIconURL):
723         * UIProcess/WebIconDatabase.h:
724         * UIProcess/WebIconDatabase.messages.in:
725
726         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
727         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
728
729 2011-03-22  Sam Weinig  <sam@webkit.org>
730
731         Rubber-stamped by Anders Carlsson.
732
733         Loading a new tab does not dismiss Lookup
734         <rdar://problem/9138391> 
735
736         * UIProcess/API/mac/WKView.mm:
737         (-[WKView viewDidMoveToWindow]):
738         Hide the dictionary popup when moving the WKView out of a window.
739
740 2011-03-22  Anders Carlsson  <andersca@apple.com>
741
742         Reviewed by Sam Weinig.
743
744         Microsoft Silverlight playback shows artifacts
745         https://bugs.webkit.org/show_bug.cgi?id=56863
746         <rdar://problem/9103136>
747
748         * PluginProcess/PluginControllerProxy.cpp:
749         (WebKit::PluginControllerProxy::paint):
750         If the plug-in is transparent, clear the dirty rect before painting.
751
752         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
753         (WebKit::NetscapePluginModule::determineQuirks):
754         Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins.
755
756         * Shared/Plugins/PluginQuirks.h:
757         Add MakeTransparentIfBackgroundAttributeExists quirk.
758
759         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
760         (WebKit::NPN_SetValue):
761         Handle NPPVpluginTransparentBool.
762
763         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
764         (WebKit::NetscapePlugin::NetscapePlugin):
765         Initialize m_isTransparent to false.
766
767         (WebKit::NetscapePlugin::setIsTransparent):
768         Set m_isTransparent.
769
770         (WebKit::NetscapePlugin::initialize):
771         If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent
772         if there's a 'background' attribute.
773
774         (WebKit::NetscapePlugin::isTransparent):
775         Add getter.
776
777         * WebProcess/Plugins/Plugin.h:
778         Add isTransparent().
779
780         * WebProcess/Plugins/PluginProxy.cpp:
781         (WebKit::PluginProxy::paint):
782         Always copy the plug-in backing store to the plug-in proxy backing store.
783
784         (WebKit::PluginProxy::isTransparent):
785         Add getter that should never be called.
786
787         (WebKit::PluginProxy::update):
788         Always copy the plug-in backing store to the plug-in proxy backing store.
789
790 2011-03-22  Anders Carlsson  <andersca@apple.com>
791
792         Reviewed by Sam Weinig.
793
794         Crash when calling PluginProxy::evaluate on a destroyed plug-in
795         https://bugs.webkit.org/show_bug.cgi?id=56848
796         <rdar://problem/9168975>
797
798         Return early if the NPObject doesn't exist anymore.
799
800         * WebProcess/Plugins/PluginProxy.cpp:
801         (WebKit::PluginProxy::evaluate):
802
803 2011-03-22  Sam Weinig  <sam@webkit.org>
804
805         Reviewed by Adam Roben.
806
807         WebKit2: Cannot make a selection past the end of the visible page (no autoscrolling)
808         <rdar://problem/8823874>
809         https://bugs.webkit.org/show_bug.cgi?id=56847
810
811         * Shared/mac/WebEventFactory.mm:
812         (WebKit::currentMouseButton):
813         (WebKit::mouseButtonForEvent):
814         Add mouse button for mouseEnter/Exit events. [NSEvent buttonNumber] doesn't seem to give the right result
815         for these events, but getting the currentMouseButton does work.
816
817 2011-03-21  Brady Eidson  <beidson@apple.com>
818
819         Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783
820
821         * Platform/mac/Logging.mac.mm:
822
823 2011-03-21  Brady Eidson  <beidson@apple.com>
824
825         Reviewed by Brian Weinstein.
826
827         https://bugs.webkit.org/show_bug.cgi?id=56783
828         Actually hook up WebKit2 logging on Mac.
829
830         * Platform/Logging.cpp:
831         (WebKit::initializeLogChannel):
832         * Platform/Logging.h:
833         * Platform/mac/Logging.mac.mm: Added.
834         (WebKit::initializeLogChannel):
835  
836        * UIProcess/WebContext.cpp:
837         (WebKit::WebContext::WebContext): Initialize logging if necessary.
838
839         * WebKit2.xcodeproj/project.pbxproj:
840
841 2011-03-21  Alexey Proskuryakov  <ap@apple.com>
842
843         Reviewed by Darin Adler.
844
845         REGRESSION (r81269): WebKit2 gets into an infinite recursion after an unhandled command key
846         https://bugs.webkit.org/show_bug.cgi?id=56782
847         <rdar://problem/9151993>
848
849         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
850         Factored out code for resending an event and moved it to WKView.
851
852         * UIProcess/API/mac/WKView.mm:
853         (-[WKView performKeyEquivalent:]): Don't zero out _keyDownEventBeingResent, it's easier
854         to just do that in _resendKeyDownEvent:.
855         (-[WKView keyDown:]): Ditto.
856         (-[WKView _resendKeyDownEvent:]): Moved from PageClientImpl.mm. Added an assertion that we
857         are not already resending an event - it would be too confusing if we ever had to do that,
858         but looks like this never happens.
859
860         * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent.
861
862 2011-03-21  Anders Carlsson  <andersca@apple.com>
863
864         Reviewed by Sam Weinig.
865
866         QT plug-in fails to load contextual menu
867         https://bugs.webkit.org/show_bug.cgi?id=56777
868         <rdar://problem/8979033>
869
870         Open a Carbon resource map and make it the current map when calling NP_Initialize.
871
872         * Platform/Module.cpp:
873         (WebKit::Module::Module):
874         Initialize m_bundleResourceMap to -1.
875
876         * Platform/Module.h:
877         Add m_bundleResourceMap.
878
879         * Platform/mac/ModuleMac.mm:
880         (WebKit::Module::unload):
881         Close the resource map.
882
883         (WebKit::Module::bundleResourceMap):
884         Open a resource map if necessary.
885
886         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
887         (WebKit::NetscapePluginModule::tryLoad):
888         Get the resource map and make it current before calling NP_Initialize.
889
890 2011-03-21  Anders Carlsson  <andersca@apple.com>
891
892         Reviewed by Sam Weinig.
893
894         Plug-in process crashes if it fails to load a plug-in module
895         https://bugs.webkit.org/show_bug.cgi?id=56775
896
897         * PluginProcess/PluginControllerProxy.cpp:
898         (WebKit::PluginControllerProxy::initialize):
899         If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in.
900
901         * PluginProcess/WebProcessConnection.cpp:
902         (WebKit::WebProcessConnection::removePluginControllerProxy):
903         Remove an incorrect assertion. Don't invalidate the remote object map if the plug-in is null.
904
905 2011-03-21  Anders Carlsson  <andersca@apple.com>
906
907         Reviewed by Sam Weinig.
908
909         QT plug-in loads controller at top of movie not bottom
910         https://bugs.webkit.org/show_bug.cgi?id=56764
911         <rdar://problem/8979037>
912
913         Create a layer with geometryFlipped set and add the plug-in layer as a sublayer,
914         matching WebKit1.
915
916         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
917         (WebKit::NetscapePlugin::platformPostInitialize):
918
919 2011-03-21  Sam Weinig  <sam@webkit.org>
920
921         Reviewed by Anders Carlsson.
922
923         WebKit2 needs preferences to change security knobs
924         https://bugs.webkit.org/show_bug.cgi?id=56762
925
926         Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed
927         and FileAccessFromFileURLsAllowed.
928
929         * Shared/WebPreferencesStore.h:
930         * UIProcess/API/C/WKPreferences.cpp:
931         (WKPreferencesSetWebSecurityEnabled):
932         (WKPreferencesGetWebSecurityEnabled):
933         (WKPreferencesSetUniversalAccessFromFileURLsAllowed):
934         (WKPreferencesGetUniversalAccessFromFileURLsAllowed):
935         (WKPreferencesSetFileAccessFromFileURLsAllowed):
936         (WKPreferencesGetFileAccessFromFileURLsAllowed):
937         * UIProcess/API/C/WKPreferencesPrivate.h:
938         * WebProcess/WebPage/WebPage.cpp:
939         (WebKit::WebPage::updatePreferences):
940
941 2011-03-21  Sam Weinig  <sam@webkit.org>
942
943         Reviewed by Anders Carlsson.
944
945         Remove old DrawingArea and LayerHostingView code from WKView.
946
947         * UIProcess/API/mac/WKView.mm:
948         (-[WKView drawRect:]):
949         (-[WKView hitTest:]):
950         (-[WKView WebKit::]):
951
952 2011-03-21  Sam Weinig  <sam@webkit.org>
953
954         Reviewed by Anders Carlsson.
955
956         Need WebKit2 API for creating a page with a specific main frame name
957         https://bugs.webkit.org/show_bug.cgi?id=56759
958
959         * Shared/WebPageCreationParameters.cpp:
960         (WebKit::WebPageCreationParameters::encode):
961         (WebKit::WebPageCreationParameters::decode):
962         * Shared/WebPageCreationParameters.h:
963         Add mainFrameName to creation parameters.
964
965         * UIProcess/API/mac/WKView.h:
966         * UIProcess/API/mac/WKView.mm:
967         (-[WKView initWithFrame:]):
968         (-[WKView initWithFrame:contextRef:]):
969         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
970         (-[WKView initWithFrame:contextRef:pageGroupRef:mainFrameName:]):
971         Add new initializer which takes a main frame name.
972
973         * UIProcess/WebPageProxy.cpp:
974         (WebKit::WebPageProxy::setMainFrameName):
975         (WebKit::WebPageProxy::creationParameters):
976         * UIProcess/WebPageProxy.h:
977         Store the main frame name for initialization/re-initialization.
978
979         * WebProcess/WebPage/WebFrame.cpp:
980         (WebKit::WebFrame::createMainFrame):
981         * WebProcess/WebPage/WebFrame.h:
982         * WebProcess/WebPage/WebPage.cpp:
983         (WebKit::WebPage::WebPage):
984         Pass the name to main frame creation.
985
986 2011-03-20  Bill Budge  <bbudge@chromium.org>
987
988         Reviewed by Adam Barth.
989
990         Rename ThreadSafeShared to ThreadSafeRefCounted
991         https://bugs.webkit.org/show_bug.cgi?id=56714
992
993         No new tests. Exposes no new functionality.
994
995         * Platform/CoreIPC/Connection.h:
996         * Platform/WorkQueue.h:
997         * Platform/win/WorkQueueWin.cpp:
998         * UIProcess/Launcher/ProcessLauncher.h:
999         * UIProcess/Launcher/ThreadLauncher.h:
1000
1001 2011-03-19  Anton D'Auria  <adauria@apple.com>
1002
1003         Reviewed by Alexey Proskuryakov.
1004
1005         ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
1006         https://bugs.webkit.org/show_bug.cgi?id=56415
1007
1008         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin
1009         instead of ApplicationCacheStorage::deleteEntriesForOrigin.
1010         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
1011
1012 2011-03-18  Sam Weinig  <sam@webkit.org>
1013
1014         Attempt to fix the WinCairo build.
1015
1016         * win/WebKit2.vcproj:
1017
1018 2011-03-18  Anders Carlsson  <andersca@apple.com>
1019
1020         Reviewed by Dan Bernstein.
1021
1022         Empty gray page after going back from a PDF
1023         https://bugs.webkit.org/show_bug.cgi?id=56694
1024         <rdar://problem/8811854>
1025
1026         Update m_frameHasCustomRepresentation when loading a page that's in the page cache.
1027
1028         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1029         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1030
1031 2011-03-18  Anders Carlsson  <andersca@apple.com>
1032
1033         Reviewed by Sam Weinig.
1034
1035         Crash when sending a sync message ends up invalidating the connection
1036         https://bugs.webkit.org/show_bug.cgi?id=56686
1037         <rdar://problem/9048781>
1038
1039         Guard against a null client.
1040
1041         * Platform/CoreIPC/Connection.cpp:
1042         (CoreIPC::Connection::sendSyncMessage):
1043
1044 2011-03-18  Balazs Kelemen  <kbalazs@webkit.org>
1045
1046         Reviewed by Benjamin Poulain.
1047
1048         [Qt][WK2] Need a way to debug the web process after the UI process dies
1049         https://bugs.webkit.org/show_bug.cgi?id=56116
1050
1051         Allow the web process to outlive it's parent process
1052         in debug builds if the QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS
1053         environment variable is set.
1054
1055         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1056         (WebKit::QtWebProcess::setupChildProcess): Used getenv
1057         since the prctl call is already in a Linux-only block
1058         and the implementation in this file is a candidate
1059         for sharing across ports in the future.
1060
1061 2011-03-18  Darin Adler  <darin@apple.com>
1062
1063         Reviewed by Anders Carlsson.
1064
1065         Command-period does not stop load when page has focus in WebKit2
1066         https://bugs.webkit.org/show_bug.cgi?id=56601
1067
1068         * UIProcess/API/mac/WKView.mm:
1069         (-[WKView doCommandBySelector:]): If called outside interpretKeyEvents,
1070         call through to super.
1071         (-[WKView insertText:]): Assert that we are inside interpretKeyEvents.
1072         (-[WKView unmarkText]): Ditto.
1073         (-[WKView setMarkedText:selectedRange:]): Ditto.
1074         (-[WKView _interceptKeyEvent:]): Set a flag to indicate we are inside
1075         interpretKeyEvents for use by the above.
1076
1077 2011-03-18  Brady Eidson  <beidson@apple.com>
1078
1079         Reviewed by Sam Weinig.
1080
1081         https://bugs.webkit.org/show_bug.cgi?id=56425
1082         More groundwork for WebKit2 IconDatabase
1083
1084         -Update the synchronous method names to be prefixed with "synchronous."
1085         -Add empty implementations for the asynchronous accessors.
1086
1087         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1088         (WebKit::WebIconDatabaseProxy::setEnabled):
1089         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
1090         (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
1091         (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
1092         (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
1093         (WebKit::WebIconDatabaseProxy::supportsAsynchronousMode):
1094         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
1095         (WebKit::WebIconDatabaseProxy::iconDataForIconURL):
1096         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1097
1098 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
1099
1100         Reviewed by Martin Robinson.
1101
1102         Fixed compilation after r80925.
1103
1104         * GNUmakefile.am:
1105         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: Added.
1106         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
1107         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
1108         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
1109         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
1110         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
1111         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
1112         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
1113         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
1114         (WebKit::WebFullScreenManagerProxy::getFullScreenRect):
1115         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Added.
1116         (WebKit::WebFullScreenManagerGtk::WebFullScreenManagerGtk):
1117         (WebKit::WebFullScreenManager::create):
1118         (WebKit::WebFullScreenManagerGtk::setRootFullScreenLayer):
1119         (WebKit::WebFullScreenManagerGtk::beginEnterFullScreenAnimation):
1120         (WebKit::WebFullScreenManagerGtk::beginExitFullScreenAnimation):
1121         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Added.
1122
1123 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
1124
1125         Unreviewed, fixed compilation after r81208.
1126
1127         * GNUmakefile.am:
1128
1129 2011-03-18  John Sullivan  <sullivan@apple.com>
1130
1131         Reviewed by Dan Bernstein.
1132
1133         https://bugs.webkit.org/show_bug.cgi?id=56645
1134         Assertion fires when hidden Find-on-Page matches are encountered in WebKit2
1135
1136         * WebProcess/WebPage/FindController.cpp:
1137         (WebKit::FindController::updateFindIndicator):
1138         Bail out if the selection rect is empty, before trying to generate an appropriately-sized
1139         bitmap. (Previously it was bailing out afterwards, but encountering an assertion in debug
1140         builds along the way.)
1141
1142 2011-03-18  Mark Rowe  <mrowe@apple.com>
1143
1144         Rubber-stamped by Jon Honeycutt.
1145
1146         <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only
1147
1148         Fix a bogus change from r81392 that made PluginProcessShim.xcconfig import DebugRelease.xcconfig.
1149         As its name suggests, DebugRelease.xcconfig is only applicable for the debug and release configurations.
1150         It overrides the valid build architectures and also restricts the build to only the active architecture.
1151         
1152         * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what
1153         each target-specific .xcconfig file should import.
1154
1155 2011-03-17  Mark Rowe  <mrowe@apple.com>
1156
1157         Fix the build.
1158
1159         * WebKit2.xcodeproj/project.pbxproj:
1160
1161 2011-03-17  Anders Carlsson  <andersca@apple.com>
1162
1163         Reviewed by Sam Weinig.
1164
1165         Implement PluginProcessProxy::setFullscreenWindowIsShowing
1166         https://bugs.webkit.org/show_bug.cgi?id=56618
1167
1168         * UIProcess/Plugins/PluginProcessProxy.cpp:
1169         (WebKit::PluginProcessProxy::PluginProcessProxy):
1170         Initialize m_fullscreenWindowIsShowing.
1171
1172         (WebKit::PluginProcessProxy::didClose):
1173         if m_fullscreenWindowIsShowing is true, call exitFullscreen.
1174
1175         * UIProcess/Plugins/PluginProcessProxy.h:
1176         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1177         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
1178         Add helper function for getting a PSN for the plug-in process.
1179
1180         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
1181         Make the plug-in process the front process.
1182
1183         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
1184         Make the current process (the UI process) the front process.
1185
1186         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
1187         Call enterFullscreen or exitFullscreen.
1188
1189         (WebKit::PluginProcessProxy::enterFullscreen):
1190         Make the plug-in process the front process and hide the menu bar.
1191
1192         (WebKit::PluginProcessProxy::exitFullscreen):
1193         Show the menu bar and if necessary make the UI process the front process.
1194
1195         (WebKit::PluginProcessProxy::endModal):
1196         call makeUIProcessTheFrontProcess.
1197
1198         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
1199         Call makePluginProcessTheFrontProcess.
1200
1201 2011-03-17  Adam Roben  <aroben@apple.com>
1202
1203         Make bidi text in <select> menus in WebKit2 on Windows match WebKit1
1204
1205         Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release
1206         (WebKit2 Tests)
1207
1208         Reviewed by Sam Weinig.
1209
1210         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1211         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1212         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
1213         On Windows, return the same values we return in WebKit1.
1214
1215 2011-03-17  Anders Carlsson  <andersca@apple.com>
1216
1217         Reviewed by Sam Weinig.
1218
1219         Implement PluginProcessProxy::setModalWindowIsShowing
1220         https://bugs.webkit.org/show_bug.cgi?id=56615
1221
1222         * UIProcess/Plugins/PluginProcessProxy.cpp:
1223         (WebKit::PluginProcessProxy::PluginProcessProxy):
1224         Initialize m_modalWindowIsShowing.
1225
1226         (WebKit::PluginProcessProxy::didClose):
1227         If m_modalWindowIsShowing is true, we must call endModal.
1228
1229         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1230         (-[WKPlaceholderModalWindow _wantsUserAttention]):
1231         Add a WKPlaceholderModalWindow.
1232
1233         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
1234         Call beginModal or endModal depending on whether we're showing a modal window or not.
1235
1236         (WebKit::PluginProcessProxy::beginModal):
1237         Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications.
1238
1239         (WebKit::PluginProcessProxy::endModal):
1240         Tear down the window and the run loop.
1241
1242         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
1243         Make sure that the plug-in process is frontmost.
1244
1245 2011-03-17  Jeff Miller  <jeffm@apple.com>
1246
1247         Reviewed by Adam Roben.
1248
1249         Web page shouldn't swallow alt-key combinations on Windows
1250         https://bugs.webkit.org/show_bug.cgi?id=56612
1251         
1252         Make Alt+Left Arrow and Alt+Right Arrow go back and forward, but make
1253         sure any alt-key combinations bubble up to the client.
1254
1255         * WebProcess/WebPage/win/WebPageWin.cpp:
1256         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Make Alt+Left Arrow and Alt+Right Arrow go back and forward, ignore any other alt-key combinations.
1257
1258 2011-03-17  Anders Carlsson  <andersca@apple.com>
1259
1260         Reviewed by Sam Weinig.
1261
1262         Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process
1263         https://bugs.webkit.org/show_bug.cgi?id=56610
1264
1265         * PluginProcess/mac/PluginProcessMac.mm:
1266         (WebKit::FullscreenWindowTracker::FullscreenWindowTracker):
1267         Add fullscreen window tracker class.
1268
1269         (WebKit::rectCoversAnyScreen):
1270         Return whether the given rect covers any screen.
1271
1272         (WebKit::windowCoversAnyScreen):
1273         Return whether the given window covers any screen.
1274
1275         (WebKit::FullscreenWindowTracker::windowShown):
1276         If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
1277
1278         (WebKit::FullscreenWindowTracker::windowHidden):
1279         If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
1280
1281         (WebKit::cocoaWindowShown):
1282         (WebKit::cocoaWindowHidden):
1283         (WebKit::carbonWindowShown):
1284         (WebKit::carbonWindowHidden):
1285         Call the window tracking functions.
1286
1287         (WebKit::setModal):
1288         Call PluginProcess::setModalWindowIsShowing.
1289
1290         (WebKit::PluginProcess::setModalWindowIsShowing):
1291         (WebKit::PluginProcess::setFullscreenWindowIsShowing):
1292         Send CoreIPC messages.
1293
1294         * UIProcess/Plugins/PluginProcessProxy.h:
1295         * UIProcess/Plugins/PluginProcessProxy.messages.in:
1296         Add new messages.
1297
1298         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1299         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
1300         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
1301         Add stubs.
1302
1303 2011-03-17  Sam Weinig  <sam@webkit.org>
1304
1305         Reviewed by Brady Eidson.
1306
1307         Allow passing a certificate chain as a user message
1308         <rdar://problem/8951709>
1309         https://bugs.webkit.org/show_bug.cgi?id=56605
1310
1311         * Shared/API/c/mac/WKCertificateInfoMac.h:
1312         * Shared/API/c/mac/WKCertificateInfoMac.mm:
1313         (WKCertificateInfoCreateWithCertficateChain):
1314         Added. Creates a WKCertificate from a certificate chain.
1315
1316         * Shared/UserMessageCoders.h:
1317         (WebKit::UserMessageEncoder::baseEncode):
1318         (WebKit::UserMessageDecoder::baseDecode):
1319         Add encoding/decoding of WebCertificateInfo.
1320
1321 2011-03-17  Anders Carlsson  <andersca@apple.com>
1322
1323         Reviewed by Sam Weinig.
1324
1325         Add PluginProcessShim hooks for when windows are shown and hidden
1326         https://bugs.webkit.org/show_bug.cgi?id=56597
1327
1328         * Configurations/PluginProcessShim.xcconfig:
1329         Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h.
1330
1331         * PluginProcess/mac/PluginProcessMac.mm:
1332         (WebKit::cocoaWindowShown):
1333         (WebKit::cocoaWindowHidden):
1334         (WebKit::carbonWindowShown):
1335         (WebKit::carbonWindowHidden):
1336         (WebKit::setModal):
1337         (WebKit::PluginProcess::initializeShim):
1338         Add empty stubs.
1339
1340         * PluginProcess/mac/PluginProcessShim.h:
1341         * PluginProcess/mac/PluginProcessShim.mm:
1342         (WebKit::beginModal):
1343         (WebKit::endModal):
1344         Keep a modal count and call setModal accordingly.
1345
1346         (WebKit::shim_NSApplication_RunModalForWindow):
1347         (WebKit::shimModalDialog):
1348         (WebKit::shimAlert):
1349         Call beginModal/endModal.
1350
1351         (WebKit::shimShowWindow):
1352         (WebKit::shimHideWindow):
1353         Call the shim functions.
1354         
1355         (WebKit::WebKitPluginProcessShimInitialize):
1356         Listen for notifications and call the necessary shim functions.
1357
1358         * WebKit2.xcodeproj/project.pbxproj:
1359         Link the plug-in process shim with AppKit and QuartzCore and WKSI.
1360
1361 2011-03-17  Jeff Miller  <jeffm@apple.com>
1362
1363         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
1364         
1365         *.mode*
1366         *.pbxuser
1367         *.perspective*
1368         project.xcworkspace
1369         xcuserdata
1370
1371         * WebKit2.xcodeproj: Modified property svn:ignore.
1372
1373 2011-03-17  Sam Weinig  <sam@webkit.org>
1374
1375         Reviewed by Anders Carlsson.
1376
1377         WKErrors need the PeerCertificateChain for certificate errors
1378         <rdar://problem/8951784>
1379         https://bugs.webkit.org/show_bug.cgi?id=56592
1380
1381         * Shared/WebCoreArgumentCoders.h:
1382         Special case encoding/decoding of ResourceErrors for the mac.
1383
1384         * Shared/mac/PlatformCertificateInfo.h:
1385         * Shared/mac/PlatformCertificateInfo.mm:
1386         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
1387         Add constructor that take the PeerCertificateChain as CFArrayRef.
1388
1389         * Shared/mac/WebCoreArgumentCodersMac.mm:
1390         (CoreIPC::encodeResourceError):
1391         (CoreIPC::decodeResourceError):
1392         Add encode/decode for ResourceError using the underlying NSError
1393         and encoding/decoding as much of the userInfo as we know how to.
1394         Right now this includes all string values and the PeerCertificateChain.
1395
1396 2011-03-17  John Sullivan  <sullivan@apple.com>
1397
1398         Reviewed by Adam Roben.
1399
1400         https://bugs.webkit.org/show_bug.cgi?id=56574
1401         Dealloc'ing a WKView can leave a stale reference to it in NSWindow
1402
1403         * UIProcess/API/mac/WKView.mm:
1404         (-[WKView viewWillMoveToWindow:]):
1405         Clear the outgoing window's growBoxOwner if it is this view.
1406
1407 2011-03-17  Anders Carlsson  <andersca@apple.com>
1408
1409         Rubber-stamped by John Sullivan.
1410
1411         Rename PluginProcessShim.cpp to PluginProcessShim.mm.
1412
1413         * PluginProcess/mac/PluginProcessShim.cpp: Removed.
1414         * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp.
1415         * WebKit2.xcodeproj/project.pbxproj:
1416
1417 2011-03-17  Anders Carlsson  <andersca@apple.com>
1418
1419         Reviewed by Darin Adler.
1420
1421         Invalidate all NPObjects for a plug-in when that plug-in is destroyed
1422         https://bugs.webkit.org/show_bug.cgi?id=56511
1423         <rdar://problem/8993491>
1424
1425         Before this change, we would invalidate NPObjectProxy objects and delete NPObjectMessageReceiver
1426         objects when the last plug-in of a certain type was destroyed. Doing so caused us to hold on to memory
1427         which we don't need, and could also lead to crashes if the NPObjectMessageReceiver would get a message and
1428         tried to invoke it on a already deallocated NPObject.
1429
1430         * PluginProcess/PluginControllerProxy.cpp:
1431         (WebKit::PluginControllerProxy::initialize):
1432         If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so.
1433
1434         (WebKit::PluginControllerProxy::destroy):
1435         Pass the plug-in to removePluginControllerProxy.
1436
1437         * PluginProcess/WebProcessConnection.cpp:
1438         (WebKit::WebProcessConnection::removePluginControllerProxy):
1439         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
1440
1441         (WebKit::WebProcessConnection::createPlugin):
1442         Don't call removePluginControllerProxy if the plug-in fails to initialize. PluginControllerProxy::initialize now
1443         takes care of doing this.
1444
1445         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1446         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1447         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1448         * Shared/Plugins/NPObjectMessageReceiver.h:
1449         Remove m_shouldReleaseObjectWhenInvalidating, we now know that no NPObjects will have been deallocated
1450         by the time the NPObjectMessageReceiver is destroyed.
1451
1452         (WebKit::NPObjectMessageReceiver::plugin):
1453         Add getter.
1454         
1455         * Shared/Plugins/NPObjectProxy.h:
1456         (WebKit::NPObjectProxy::plugin):
1457         Add getter.
1458         
1459         * Shared/Plugins/NPRemoteObjectMap.cpp:
1460         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
1461         Remove m_isInvalidating.
1462
1463         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
1464         Simplify code.
1465
1466         (WebKit::NPRemoteObjectMap::pluginDestroyed):
1467         Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in.
1468
1469         * Shared/Plugins/NPRemoteObjectMap.h:
1470         Remove m_isInvalidating.
1471         
1472         * WebProcess/Plugins/PluginProcessConnection.cpp:
1473         (WebKit::PluginProcessConnection::removePluginProxy):
1474         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
1475
1476 2011-03-17  Oleg Romashin  <oleg.romashin@nokia.com>
1477
1478         Reviewed by Anders Carlsson.
1479
1480         Teach WebKit2 messages.py generator to ifdef headers include
1481         which are related to ifdef-ed methods/types
1482         https://bugs.webkit.org/show_bug.cgi?id=55658
1483
1484         * Scripts/webkit2/messages.py:
1485         * Scripts/webkit2/messages_unittest.py:
1486
1487 2011-03-16  Joseph Pecoraro  <joepeck@webkit.org>
1488
1489         Reviewed by Kenneth Rohde Christiansen.
1490
1491         Viewport no longer allows an auto value for "user-scalable"
1492         https://bugs.webkit.org/show_bug.cgi?id=55416
1493
1494         Make the default value for userScalable be true.
1495
1496         * UIProcess/API/qt/qwkpage.cpp:
1497         (QWKPage::viewportAttributesForSize):
1498
1499 2011-03-16  Anders Carlsson  <andersca@apple.com>
1500
1501         Reviewed by Dan Bernstein.
1502
1503         NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object
1504         https://bugs.webkit.org/show_bug.cgi?id=56506
1505
1506         * PluginProcess/PluginControllerProxy.cpp:
1507         (WebKit::PluginControllerProxy::windowScriptNPObject):
1508         (WebKit::PluginControllerProxy::pluginElementNPObject):
1509         (WebKit::PluginControllerProxy::evaluate):
1510         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
1511         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1512         (WebKit::NPObjectMessageReceiver::create):
1513         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1514         (WebKit::NPObjectMessageReceiver::invoke):
1515         (WebKit::NPObjectMessageReceiver::invokeDefault):
1516         (WebKit::NPObjectMessageReceiver::getProperty):
1517         (WebKit::NPObjectMessageReceiver::setProperty):
1518         (WebKit::NPObjectMessageReceiver::construct):
1519         * Shared/Plugins/NPObjectMessageReceiver.h:
1520         * Shared/Plugins/NPObjectProxy.cpp:
1521         (WebKit::NPObjectProxy::create):
1522         (WebKit::NPObjectProxy::NPObjectProxy):
1523         (WebKit::NPObjectProxy::invalidate):
1524         (WebKit::NPObjectProxy::initialize):
1525         (WebKit::NPObjectProxy::invoke):
1526         (WebKit::NPObjectProxy::invokeDefault):
1527         (WebKit::NPObjectProxy::getProperty):
1528         (WebKit::NPObjectProxy::setProperty):
1529         (WebKit::NPObjectProxy::construct):
1530         * Shared/Plugins/NPObjectProxy.h:
1531         * Shared/Plugins/NPRemoteObjectMap.cpp:
1532         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1533         (WebKit::NPRemoteObjectMap::registerNPObject):
1534         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
1535         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
1536         * Shared/Plugins/NPRemoteObjectMap.h:
1537         * WebProcess/Plugins/PluginProxy.cpp:
1538         (WebKit::PluginProxy::pluginScriptableNPObject):
1539         (WebKit::PluginProxy::getWindowScriptNPObject):
1540         (WebKit::PluginProxy::getPluginElementNPObject):
1541         (WebKit::PluginProxy::evaluate):
1542
1543 2011-03-16  Beth Dakin  <bdakin@apple.com>
1544
1545         Reviewed by Darin Adler.
1546
1547         Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath 
1548         WebPageProxy::viewWillStartLiveResize when resizing window after web process 
1549         crashed
1550         -and corresponding-
1551         <rdar://problem/9037685>
1552
1553         Just need simple isValid() checks here. 
1554         * UIProcess/WebPageProxy.cpp:
1555         (WebKit::WebPageProxy::initializeUIClient):
1556         (WebKit::WebPageProxy::viewWillStartLiveResize):
1557         (WebKit::WebPageProxy::viewWillEndLiveResize):
1558
1559 2011-03-16  Damian Kaleta  <dkaleta@apple.com>
1560
1561         Reviewed by Kevin Decker.
1562
1563         Add a user default that will force all plugins to opt in to non-executable data
1564         https://bugs.webkit.org/show_bug.cgi?id=56487
1565         <rdar://problem/9109095>
1566
1567         * UIProcess/Plugins/PluginProcessProxy.cpp:
1568         (WebKit::PluginProcessProxy::PluginProcessProxy):
1569         * UIProcess/Plugins/PluginProcessProxy.h:
1570         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1571         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
1572
1573 2011-03-16  Chris Fleizach  <cfleizach@apple.com>
1574
1575         Reviewed by Darin Adler.
1576
1577         WK2: Need to propagate enhanced accessibility flag from UI -> web process
1578         https://bugs.webkit.org/show_bug.cgi?id=56379
1579
1580         Support sending the enhanced accessibility flag between processes.
1581
1582         * UIProcess/WebContext.cpp:
1583         (WebKit::WebContext::~WebContext):
1584         (WebKit::WebContext::setEnhancedAccessibility):
1585         * UIProcess/WebContext.h:
1586         * UIProcess/gtk/WebContextGtk.cpp:
1587         (WebKit::WebContet::platformInvalidateContext):
1588         * UIProcess/mac/WebContextMac.mm:
1589         (WebKit::WebContext::platformInitializeWebProcess):
1590         (WebKit::WebContext::platformInvalidateContext):
1591         * UIProcess/qt/WebContextQt.cpp:
1592         (WebKit::WebContext::platformInvalidateContext):
1593         * UIProcess/win/WebContextWin.cpp:
1594         (WebKit::WebContext::platformInvalidateContext):
1595         * WebProcess/WebProcess.cpp:
1596         (WebKit::WebProcess::setEnhancedAccessibility):
1597         * WebProcess/WebProcess.h:
1598         * WebProcess/WebProcess.messages.in:
1599
1600 2011-03-15  Oliver Hunt  <oliver@apple.com>
1601
1602         Reviewed by Geoffrey Garen.
1603
1604         Make Structure creation require a JSGlobalData
1605         https://bugs.webkit.org/show_bug.cgi?id=56438
1606
1607         Mechanical change to make all Structure creation use a JSGlobalData&.
1608
1609         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1610         (WebKit::JSNPMethod::JSNPMethod):
1611         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1612         (WebKit::JSNPMethod::createStructure):
1613         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1614         (WebKit::JSNPObject::JSNPObject):
1615         * WebProcess/Plugins/Netscape/JSNPObject.h:
1616         (WebKit::JSNPObject::createStructure):
1617
1618 2011-03-16  Alexey Proskuryakov  <ap@apple.com>
1619
1620         Reviewed by Dan Bernstein.
1621
1622         WebKit2: Sometimes Command-[ opens a new tab and loads the back page in it
1623         https://bugs.webkit.org/show_bug.cgi?id=56477
1624         <rdar://problem/8806664>
1625
1626         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
1627         Set NSApplication current event when re-dispatching a key event that returned from the web
1628         process unhandled. That way, code that looks at current event modifiers won't be confused.
1629
1630 2011-03-16  Sam Weinig  <sam@webkit.org>
1631
1632         Reviewed by Adam Roben.
1633
1634         Add WebKit2 API to figure out if an input or textarea was edited
1635         https://bugs.webkit.org/show_bug.cgi?id=56474
1636
1637         Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and
1638         WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time,
1639         I will work on giving these functions longer names.
1640
1641         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1642         (WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit):
1643         (WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit):
1644         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1645         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1646         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
1647         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
1648         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1649
1650 2011-03-16  Brady Eidson  <beidson@apple.com>
1651
1652         Reviewed by Adam Roben.
1653
1654         https://bugs.webkit.org/show_bug.cgi?id=56467
1655         IconDatabase-related crash seen in WK2 tests
1656
1657         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1658         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case.
1659
1660 2011-03-16  Benjamin Poulain  <benjamin.poulain@nokia.com>
1661
1662         Reviewed by Kenneth Rohde Christiansen.
1663
1664         [Qt][WK2] Loading an empty URL crashes
1665         https://bugs.webkit.org/show_bug.cgi?id=55501
1666
1667         A null WKURLRef is created in the API of WebKit 2 when converting a null string. The code
1668         of WKPageLoadURL assume the WKPageRef is not null which causes crashes if it is.
1669
1670         This patch uses the converter toWTFString() to pass from WKPageRef to WTFString. This converter
1671         ensure the returned string is a valid null string.
1672
1673         Tested through the Qt API tests.
1674
1675         * UIProcess/API/C/WKPage.cpp:
1676         (WKPageLoadURL):
1677         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
1678         (tst_QGraphicsWKView::loadEmptyUrl):
1679         * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Added.
1680         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: Added.
1681         (tst_QWKPage::init):
1682         (tst_QWKPage::cleanup):
1683         (tst_QWKPage::loadEmptyUrl):
1684         * UIProcess/API/qt/tests/tests.pro:
1685
1686 2011-03-15  Brady Eidson  <beidson@apple.com>
1687
1688         Reviewed by Sam Weinig.
1689
1690         https://bugs.webkit.org/show_bug.cgi?id=56425
1691         WebKit2 icon database.
1692
1693         Project file paperwork:
1694         * DerivedSources.make:
1695         * DerivedSources.pro:
1696         * GNUmakefile.am:
1697         * WebKit2.pri:
1698         * WebKit2.pro:
1699         * WebKit2.xcodeproj/project.pbxproj:
1700         * win/WebKit2.vcproj:
1701         * win/WebKit2Common.vsprops:
1702         * Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased
1703           to "url" instead of "uRL".
1704
1705         Add messaging-related stuff:
1706         * Platform/CoreIPC/MessageID.h:
1707         * UIProcess/WebIconDatabase.messages.in: Added.
1708         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added.
1709         * UIProcess/WebProcessProxy.cpp:
1710         (WebKit::WebProcessProxy::didReceiveMessage):
1711         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1712
1713         Prep to make WebIconDatabase an API object:
1714         * Shared/APIObject.h:
1715
1716         Add an "icon DB is enabled" flag to WebProcessCreationParameters:
1717         * Shared/WebProcessCreationParameters.cpp:
1718         (WebKit::WebProcessCreationParameters::encode):
1719         (WebKit::WebProcessCreationParameters::decode):
1720         * Shared/WebProcessCreationParameters.h:
1721
1722         Add SPI for client apps to set the icon database path:
1723         * UIProcess/API/C/WKContext.cpp:
1724         (WKContextSetIconDatabasePath):
1725         * UIProcess/API/C/WKContextPrivate.h:
1726         * UIProcess/WebContext.h:
1727         (WebKit::WebContext::setIconDatabasePath):
1728
1729         Hook up initialization, clearing, and messaging for the icon database:
1730         * UIProcess/WebContext.cpp:
1731         (WebKit::WebContext::WebContext):
1732         (WebKit::WebContext::~WebContext):
1733         (WebKit::WebContext::ensureWebProcess):
1734         (WebKit::WebContext::didReceiveMessage):
1735         (WebKit::WebContext::didReceiveSyncMessage):
1736         (WebKit::WebContext::iconDatabasePath):
1737         * UIProcess/gtk/WebContextGtk.cpp:
1738         (WebKit::WebContext::platformDefaultIconDatabasePath):
1739         * UIProcess/mac/WebContextMac.mm:
1740         (WebKit::WebContext::platformDefaultIconDatabasePath):
1741         * UIProcess/qt/WebContextQt.cpp:
1742         (WebKit::WebContext::platformDefaultIconDatabasePath):
1743         * UIProcess/win/WebContextWin.cpp:
1744         (WebKit::WebContext::platformDefaultIconDatabasePath):
1745
1746         Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object:
1747         * UIProcess/WebIconDatabase.cpp: Added.
1748         (WebKit::WebIconDatabase::create):
1749         (WebKit::WebIconDatabase::~WebIconDatabase):
1750         (WebKit::WebIconDatabase::WebIconDatabase):
1751         (WebKit::WebIconDatabase::invalidate):
1752         (WebKit::WebIconDatabase::retainIconForPageURL):
1753         (WebKit::WebIconDatabase::releaseIconForPageURL):
1754         (WebKit::WebIconDatabase::setIconURLForPageURL):
1755         (WebKit::WebIconDatabase::setIconDataForIconURL):
1756         (WebKit::WebIconDatabase::iconDataForPageURL):
1757         (WebKit::WebIconDatabase::iconURLForPageURL):
1758         (WebKit::WebIconDatabase::iconDataKnownForIconURL):
1759         (WebKit::WebIconDatabase::loadDecisionForIconURL):
1760         (WebKit::WebIconDatabase::didReceiveMessage):
1761         (WebKit::WebIconDatabase::didReceiveSyncMessage):
1762         * UIProcess/WebIconDatabase.h: Added.
1763         (WebKit::WebIconDatabase::clearContext):
1764         (WebKit::WebIconDatabase::type):
1765
1766         Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging:
1767         * WebProcess/IconDatabase: Added.
1768         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added.
1769         (WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy):
1770         (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
1771         (WebKit::WebIconDatabaseProxy::isEnabled):
1772         (WebKit::WebIconDatabaseProxy::setEnabled):
1773         (WebKit::WebIconDatabaseProxy::iconForPageURL):
1774         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
1775         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
1776         (WebKit::WebIconDatabaseProxy::iconURLForPageURL):
1777         (WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL):
1778         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
1779         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
1780         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
1781         (WebKit::WebIconDatabaseProxy::urlImportFinished):
1782         (WebKit::WebIconDatabaseProxy::didReceiveMessage):
1783         * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added.
1784
1785         Hook up initialization and messaging for the icon database proxy:
1786         * WebProcess/WebProcess.cpp:
1787         (WebKit::WebProcess::WebProcess):
1788         (WebKit::WebProcess::initializeWebProcess):
1789         (WebKit::WebProcess::didReceiveMessage):
1790         * WebProcess/WebProcess.h:
1791
1792 2011-03-15  Sam Weinig  <sam@webkit.org>
1793
1794         Reviewed by Anders Carlsson.
1795
1796         WebKit2: False SPOD cursor when context menu is open
1797         <rdar://problem/9029154>
1798         https://bugs.webkit.org/show_bug.cgi?id=56433
1799
1800         * UIProcess/WebPageProxy.cpp:
1801         (WebKit::WebPageProxy::showContextMenu):
1802         Update to match showPopupMenu idiomatically, and stop the responsivenessTimer
1803         since the act of showing the context menu could spin a nested runloop.
1804
1805         * UIProcess/mac/WebContextMenuProxyMac.mm:
1806         (WebKit::WebContextMenuProxyMac::showContextMenu):
1807         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1808         (WebKit::WebContextMenuProxyQt::showContextMenu):
1809         * UIProcess/win/WebContextMenuProxyWin.cpp:
1810         (WebKit::WebContextMenuProxyWin::showContextMenu):
1811         Move isEmpty() check to implementations, since we don't want to show
1812         this in any case, not just the one where we check it.
1813
1814 2011-03-15  Siddharth Mathur  <siddharth.mathur@nokia.com>
1815
1816         Reviewed by Laszlo Gombos.
1817
1818         [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol
1819         https://bugs.webkit.org/show_bug.cgi?id=56417
1820
1821         Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure
1822         the symbol is always exported/imported.
1823
1824         * WebProcess/qt/WebProcessMainQt.cpp:
1825         (WebKit::WebProcessMainQt):
1826         * qt/MainQt.cpp:
1827
1828 2011-03-15  Alexey Proskuryakov  <ap@apple.com>
1829
1830         Reviewed by Darin Adler.
1831
1832         REGRESSION (WebKit2): keygen element doesn't work
1833         https://bugs.webkit.org/show_bug.cgi?id=56402
1834         <rdar://problem/9006545>
1835
1836         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1837         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1838         Added strings used by keygen.
1839
1840         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
1841         a function used by keygen.
1842
1843 2011-03-15  Beth Dakin  <bdakin@apple.com>
1844
1845         Reviewed by Simon Fraser.
1846
1847         WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6%
1848
1849         New WebKitystemInterface function to force the scrollbars to flash
1850         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1851         (InitWebCoreSystemInterface):
1852
1853 2011-03-15  Anders Carlsson  <andersca@apple.com>
1854
1855         Reviewed by Sam Weinig.
1856
1857         Make sure that NP_Shutdown is always the last NPP function called
1858         https://bugs.webkit.org/show_bug.cgi?id=56391
1859         <rdar://problem/8989902>
1860
1861         Make sure to always increment the load count whenever a web process connection
1862         is opened to a plug-in process, and decrement it when the last web process connection
1863         goes away.
1864
1865         * PluginProcess/PluginProcess.cpp:
1866         (WebKit::PluginProcess::createWebProcessConnection):
1867         (WebKit::PluginProcess::startShutdownTimerIfNecessary):
1868         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1869         * Shared/Plugins/Netscape/NetscapePluginModule.h:
1870         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1871         (WebKit::NetscapePlugin::NetscapePlugin):
1872         (WebKit::NetscapePlugin::~NetscapePlugin):
1873
1874 2011-03-15  Martin Robinson  <mrobinson@igalia.com>
1875
1876         Reviewed by Adam Barth.
1877
1878         [GTK] [WebKit2] The UIProcess never changes the mouse cursor
1879         https://bugs.webkit.org/show_bug.cgi?id=56333
1880
1881         Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
1882         the cursor to change as the user mouses around the page. There is currently
1883         no test infrastructure to track cursor changes.
1884
1885         * UIProcess/gtk/WebView.cpp:
1886         (WebKit::WebView::setCursor): Ported implementation from WebKit1.
1887
1888 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
1889
1890         Reviewed by Darin Adler.
1891
1892         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
1893         info into the headers rather than in export symbol definition files, but disable it on 
1894         all platforms initially so we can deal with port build issues one port at a time.
1895         
1896         https://bugs.webkit.org/show_bug.cgi?id=27551
1897
1898         * config.h:
1899
1900 2011-03-14  Alexey Proskuryakov  <ap@apple.com>
1901
1902         Reviewed by Darin Adler.
1903
1904         REGRESSION: Print preview is blank when selecting multiple pages per sheet
1905         https://bugs.webkit.org/show_bug.cgi?id=56341
1906         <rdar://problem/8991382>
1907
1908         * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): Don't reset latest expected
1909         callback number after receiving a different one. We only update preview after receiving
1910         the latest expected page data (and the assumption is that AppKit will ask for pages in
1911         natural order for N-up).
1912
1913 2011-03-14  Adam Roben  <aroben@apple.com>
1914
1915         Make WKBundlePageCanHandleRequest return true for empty document URLs
1916
1917         Reviewed by Sam Weinig.
1918
1919         * WebProcess/WebPage/WebPage.cpp:
1920         (WebKit::WebPage::canHandleRequest): Return true for any URL schemes that are handled as
1921         empty documents, and defer to the platform for everything else.
1922
1923         * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest.
1924
1925         * WebProcess/WebPage/mac/WebPageMac.mm:
1926         (WebKit::WebPage::platformCanHandleRequest):
1927         * WebProcess/WebPage/qt/WebPageQt.cpp:
1928         (WebKit::WebPage::platformCanHandleRequest):
1929         * WebProcess/WebPage/win/WebPageWin.cpp:
1930         (WebKit::WebPage::platformCanHandleRequest):
1931         Renamed from canHandleRequest.
1932
1933 2011-03-14  Chris Fleizach  <cfleizach@apple.com>
1934
1935         Reviewed by Beth Dakin.
1936
1937         CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248
1938         https://bugs.webkit.org/show_bug.cgi?id=56336
1939
1940         Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view()
1941         pointers.
1942
1943         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
1944         (-[AccessibilityWebPageObject accessibilityHitTest:]):
1945
1946 2011-03-14  Alice Liu  <alice.liu@apple.com>
1947
1948         Reviewed by Sam Weinig.
1949
1950         Provide API for creating WKImage from CGImageRef
1951         https://bugs.webkit.org/show_bug.cgi?id=56159
1952
1953         Add function for creating a WKImage from CGImage data.
1954         * Shared/API/c/cg/WKImageCG.cpp:
1955         (WKImageCreateFromCGImage): Added. Creates a graphics context for the bitmap-backed image and draws into it. 
1956         * Shared/API/c/cg/WKImageCG.h:
1957
1958 2011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
1959
1960         Reviewed by Adam Roben.
1961
1962         [Qt][WK2]Unbreak InjectedBundle on Qt
1963         https://bugs.webkit.org/show_bug.cgi?id=54109
1964
1965         Add API's to WKURL and WKString to satisfy
1966         WebKitTestRunner's needs.
1967
1968         * Shared/API/c/WKString.cpp:
1969         (WKStringIsEqualToUTF8CStringIgnoringCase):
1970         * Shared/API/c/WKString.h:
1971         * Shared/API/c/WKURL.cpp:
1972         (WKURLCopyHostName):
1973         (WKURLCopyScheme):
1974         * Shared/API/c/WKURL.h:
1975         * Shared/WebString.h:
1976         (WebKit::WebString::equalToUTF8StringIgnoringCase):
1977         * Shared/WebURL.h: Added OwnPtr<KURL> member to be able
1978         to lazily parse the URL and store the result.
1979         (WebKit::WebURL::host):
1980         (WebKit::WebURL::protocol):
1981         (WebKit::WebURL::parseURLIfNecessary):
1982         * win/WebKit2.def: Revert the symbol exports that were
1983         needed to use KURL in WebKitTestRunner.
1984
1985 2011-03-14  Jeff Miller  <jeffm@apple.com>
1986
1987         Reviewed by Adam Roben.
1988
1989         Add WKViewSetScrollOffsetOnNextResize() to C API on Windows
1990         https://bugs.webkit.org/show_bug.cgi?id=56340
1991
1992         * UIProcess/API/C/win/WKView.cpp:
1993         (WKViewSetScrollOffsetOnNextResize): Added.
1994         * UIProcess/API/C/win/WKView.h: Added WKViewSetScrollOffsetOnNextResize().
1995         * UIProcess/win/WebView.cpp:
1996         (WebKit::WebView::onSizeEvent): Apply any scroll offset when setting the drawing area size.
1997         (WebKit::WebView::setScrollOffsetOnNextResize): Added.
1998         * UIProcess/win/WebView.h: Added setScrollOffsetOnNextResize().
1999
2000 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
2001
2002         Reviewed by Adam Roben and Gavin Barraclough.
2003
2004         FileSystemWin.cpp needs listDirectory() implementation
2005         https://bugs.webkit.org/show_bug.cgi?id=56331
2006         <rdar://problem/9126635>
2007         
2008         Move PathWalker down into WebCore, and call the PathWalker in WebCore
2009         (that now has a second argument, the pattern to take).
2010
2011         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2012         (WebKit::PluginInfoStore::pluginPathsInDirectory):
2013
2014 2011-03-14  Sam Weinig  <sam@webkit.org>
2015
2016         Reviewed by Darin Adler.
2017
2018         WebKit2: No icon shown for <input type=file>
2019         <rdar://problem/8988982>
2020         https://bugs.webkit.org/show_bug.cgi?id=54288
2021
2022         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2023         (WebKit::WebChromeClient::chooseIconForFiles):
2024         Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles.
2025
2026 2011-03-14  Brady Eidson  <beidson@apple.com>
2027
2028         Reviewed by Dan Bernstein.
2029
2030         <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
2031         Need WK2 API to view/manage origins with LocalStorage
2032
2033         Hookup the existing API stubs to the WebCore implementations:
2034         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
2035         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2036         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2037         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2038
2039 2011-03-13  Brady Eidson  <beidson@apple.com>
2040
2041         Reviewed by Sam Weinig.
2042
2043         <rdar://problem/9127270> and https://bugs.webkit.org/show_bug.cgi?id=56282
2044
2045         Pass the path along with creation parameters:
2046         * Shared/WebProcessCreationParameters.cpp:
2047         (WebKit::WebProcessCreationParameters::encode):
2048         (WebKit::WebProcessCreationParameters::decode):
2049         * Shared/WebProcessCreationParameters.h:
2050
2051         Add SPI to set the path:
2052         * UIProcess/API/C/WKContext.cpp:
2053         (WKContextSetLocalStorageDirectory):
2054         * UIProcess/API/C/WKContextPrivate.h:
2055
2056         Pass the path along in the process creation parameters:
2057         * UIProcess/WebContext.cpp:
2058         (WebKit::WebContext::ensureWebProcess):
2059         (WebKit::WebContext::localStorageDirectory):
2060         * UIProcess/WebContext.h:
2061         (WebKit::WebContext::setLocalStorageDirectory):
2062
2063         * UIProcess/gtk/WebContextGtk.cpp:
2064         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2065         * UIProcess/mac/WebContextMac.mm:
2066         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2067         * UIProcess/qt/WebContextQt.cpp:
2068         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2069         * UIProcess/win/WebContextWin.cpp:
2070         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2071
2072         Include the path with settings updates, because WebCore needs it set on the Settings object:
2073         * WebProcess/WebPage/WebPage.cpp:
2074         (WebKit::WebPage::updatePreferences):
2075
2076         * WebProcess/WebProcess.cpp:
2077         (WebKit::WebProcess::initializeWebProcess):
2078         * WebProcess/WebProcess.h:
2079         (WebKit::WebProcess::localStorageDirectory):
2080
2081         Sandboxing stuff:
2082         * WebProcess/com.apple.WebProcess.sb:
2083         * WebProcess/mac/WebProcessMac.mm:
2084         (WebKit::initializeSandbox):
2085
2086 2011-03-12  Jer Noble  <jer.noble@apple.com>
2087
2088         Reviewed by Mark Rowe.
2089
2090         WebKit2: Build WKFullScreenWindowController cleanly in 32-bit.
2091         https://bugs.webkit.org/show_bug.cgi?id=56260
2092
2093         Include <Carbon/Carbon.h> instead of <HIToolbox/MacApplication.h>.
2094
2095         * UIProcess/mac/WKFullScreenWindowController.mm:
2096
2097 2011-03-13  Sam Weinig  <sam@webkit.org>
2098
2099         Reviewed by Anders Carlsson.
2100
2101         Add ability to create a WKErrorRef
2102         <rdar://problem/9115768>
2103         https://bugs.webkit.org/show_bug.cgi?id=56279
2104
2105         * Shared/API/c/cf/WKErrorCF.cpp: Added.
2106         (WKErrorCreateWithCFError):
2107         (WKErrorCopyCFError):
2108         * Shared/API/c/cf/WKErrorCF.h: Added.
2109         Add new API to create a WKErrorRef from a CFErrorRef
2110         and vice-versa.
2111
2112         * WebKit2.xcodeproj/project.pbxproj:
2113         * win/WebKit2.vcproj:
2114         * win/WebKit2Generated.make:
2115         Add new files.
2116
2117 2011-03-13  Pratik Solanki  <psolanki@apple.com>
2118
2119         Reviewed by Brady Eidson.
2120
2121         Make adjustMIMETypeIfNecessary use CFNetwork directly
2122         https://bugs.webkit.org/show_bug.cgi?id=55912
2123
2124         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2125         (InitWebCoreSystemInterface): Support for new WKSI functions.
2126
2127 2011-03-13  Dan Bernstein  <mitz@apple.com>
2128
2129         Reviewed by Darin Adler.
2130
2131         WebPageProxy cleanup
2132         https://bugs.webkit.org/show_bug.cgi?id=56267
2133
2134         * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from
2135         here to WebPageProxyMac.mm.
2136         * UIProcess/WebPageProxy.h: Cleaned up #includes.
2137         * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations
2138         here.
2139         (WebKit::WebPageProxy::updateWindowIsVisible):
2140         (WebKit::WebPageProxy::windowAndViewFramesChanged):
2141         (WebKit::WebPageProxy::getMarkedRange):
2142         (WebKit::WebPageProxy::characterIndexForPoint):
2143         (WebKit::WebPageProxy::firstRectForCharacterRange):
2144         (WebKit::WebPageProxy::writeSelectionToPasteboard):
2145         (WebKit::WebPageProxy::setDragImage):
2146         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
2147         (WebKit::WebPageProxy::interpretKeyEvent):
2148         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
2149         (WebKit::WebPageProxy::uppercaseWord):
2150         (WebKit::WebPageProxy::lowercaseWord):
2151         (WebKit::WebPageProxy::capitalizeWord):
2152         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
2153         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2154         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2155         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
2156         (WebKit::WebPageProxy::setComplexTextInputEnabled):
2157
2158 2011-03-13  Dan Bernstein  <mitz@apple.com>
2159
2160         Reviewed by Darin Adler.
2161
2162         <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down
2163         https://bugs.webkit.org/show_bug.cgi?id=56265
2164
2165         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2166         (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than
2167         document coordinates.
2168
2169 2011-03-13  Dan Bernstein  <mitz@apple.com>
2170
2171         Reviewed by Mark Rowe.
2172
2173         Fix a crash when dragging.
2174
2175         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2176         (WebKit::convertImageToBitmap): Retain the saved context.
2177
2178 2011-03-12  Darin Adler  <darin@apple.com>
2179
2180         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2181         (WebKit::WebDragClient::startDrag): Fixed typo in a comment.
2182
2183 2011-03-11  Darin Adler  <darin@apple.com>
2184
2185         Reviewed by Sam Weinig.
2186
2187         Dragging image to desktop gives webloc instead of image file in WebKit2
2188         https://bugs.webkit.org/show_bug.cgi?id=56193
2189
2190         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2191         (WebKit::convertImageToBitmap): Added. Factored out from startDrag to
2192         make the startDrag code clearer.
2193         (WebKit::WebDragClient::startDrag): Streamlined code a bit.
2194         (WebKit::cachedImage): Added. Helper for function below.
2195         (WebKit::arrayForURLsWithTitles): Added. Helper for function below.
2196         (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file
2197         promises and removed a log of uneeded code.
2198         (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added.
2199         (promisedDataClient): Added.
2200         (-[WKPasteboardOwner clearImage]): Added.
2201         (-[WKPasteboardOwner initWithImage:]): Added.
2202         (-[WKPasteboardOwner dealloc]): Added.
2203         (-[WKPasteboardOwner finalize]): Added.
2204         (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added.
2205         (-[WKPasteboardOwner pasteboardChangedOwner:]): Added.
2206         (matchesExtensionOrEquivalent): Added.
2207         (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added.
2208         Much of the new code above came from the WebKit1 drag code.
2209
2210         * WebProcess/WebPage/WebPage.cpp:
2211         (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded.
2212         * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource.
2213         * WebProcess/WebPage/mac/WebPageMac.mm:
2214         (WebKit::WebPage::setDragSource): Added.
2215         (WebKit::WebPage::platformDragEnded): Added.
2216
2217 2011-03-12  Mark Rowe  <mrowe@apple.com>
2218
2219         Fix the 32-bit build.
2220
2221         This involves hacking around some HIToolbox headers that do things of dubious correctness,
2222         and fixing the usual CGRect vs NSRect issues.
2223         
2224         * UIProcess/mac/WKFullScreenWindowController.mm:
2225         (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect.
2226         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2227         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
2228
2229 2011-03-12  Anders Carlsson  <andersca@apple.com>
2230
2231         Reviewed by Sam Weinig.
2232
2233         * WebProcess/WebPage/WebFrame.cpp:
2234         (WebKit::WebFrame::url):
2235         Get the URL from the loader, not from the document.
2236
2237         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
2238         Return the correct suggested filename for the main resource.
2239
2240         (WebKit::WebFrame::mimeTypeForResourceWithURL):
2241         Return the correct mime type for the main resource.
2242
2243 2011-03-12  Anders Carlsson  <andersca@apple.com>
2244
2245         Reviewed by Sam Weinig.
2246
2247         Should be able to download a PDF to the Downloads folder
2248         https://bugs.webkit.org/show_bug.cgi?id=56256
2249
2250         * UIProcess/API/C/WKPage.h:
2251         Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client.
2252
2253         * UIProcess/API/mac/PDFViewController.h:
2254         * UIProcess/API/mac/PDFViewController.mm:
2255         (-[WKPDFView _applyPDFPreferences]):
2256         (-[WKPDFView _updatePreferences:]):
2257         Use new PDFViewController::page getter.
2258
2259         (-[WKPDFView PDFViewSavePDFToDownloadFolder:]):
2260         Call PDFViewController::savePDFToDownloadsFolder.
2261
2262         (WebKit::releaseCFData):
2263         (WebKit::PDFViewController::savePDFToDownloadsFolder):
2264         Create a WebData that wraps the CFData, then pass it along to
2265         WebPageProxy::saveDataToFileInDownloadsFolder.
2266
2267         * UIProcess/WebPageProxy.cpp:
2268         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
2269         Call WebUIClient::saveDataToFileInDownloadsFolder.
2270
2271         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
2272         * UIProcess/WebUIClient.h:
2273         Call the UI client callback function.
2274
2275 2011-03-12  Anders Carlsson  <andersca@apple.com>
2276
2277         Reviewed by Sam Weinig.
2278
2279         WebData should be able to wrap already existing data
2280         https://bugs.webkit.org/show_bug.cgi?id=56254
2281
2282         * Shared/WebData.h:
2283         (WebKit::WebData::createWithoutCopying):
2284         (WebKit::WebData::create):
2285         (WebKit::WebData::~WebData):
2286         (WebKit::WebData::bytes):
2287         (WebKit::WebData::size):
2288         (WebKit::WebData::WebData):
2289         (WebKit::WebData::fastFreeBytes):
2290
2291 2011-03-12  Jer Noble  <jer.noble@apple.com>
2292
2293         Reviewed by Eric Carlson.
2294
2295         WebKit2: Initialize the WebFullScreenManagerProxy with a WKView
2296         https://bugs.webkit.org/show_bug.cgi?id=56250
2297
2298         * UIProcess/API/mac/WKView.mm:
2299         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self).
2300
2301 2011-03-11  Jer Noble  <jer.noble@apple.com>
2302
2303         Reviewed by Anders Carlsson.
2304
2305         Add full screen animation code to WebFullScreenManager.
2306         https://bugs.webkit.org/show_bug.cgi?id=56220
2307
2308         * WebProcess/FullScreen/WebFullScreenManager.cpp: .
2309         (WebKit::WebFullScreenManager::~WebFullScreenManager): Added.
2310         (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs.
2311         (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color.
2312         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto.
2313         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
2314         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
2315         * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a 
2316             concrete subclass.
2317         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added.
2318         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added.
2319         (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations.
2320         (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added.
2321         (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added.
2322         (-[WebFullScreenManagerAnimationListener invalidate]): Added.
2323         (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac.
2324         (WebKit::WebFullScreenManagerMac::create): Added.
2325         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added.
2326         (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added.
2327         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host.
2328         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D
2329             which will animate the full screen renderer from its initial position to its final one.
2330         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
2331
2332 2011-03-11  Jer Noble  <jer.noble@apple.com>
2333
2334         Reviewed by Anders Carlsson.
2335
2336         Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy
2337         https://bugs.webkit.org/show_bug.cgi?id=56218
2338
2339         * UIProcess/WebFullScreenManagerProxy.cpp:
2340         * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added.
2341         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController.
2342         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
2343         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto.
2344         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto.
2345         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto.
2346         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto.
2347         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto.
2348         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto.
2349         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto.
2350         * UIProcess/API/mac/WKView.mm:
2351         (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController.
2352         * UIProcess/API/mac/WKViewInternal.h:
2353
2354 2011-03-11  Jer Noble  <jer.noble@apple.com>
2355
2356         Reviewed by Anders Carlsson.
2357
2358         Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController.
2359
2360         [WebKit2] Implement a full screen window controller
2361         https://bugs.webkit.org/show_bug.cgi?id=56210
2362
2363         * UIProcess/mac/WKFullScreenWindowController.h: Added.
2364         * UIProcess/mac/WKFullScreenWindowController.mm: Added.
2365         (-[WKFullScreenWindowController init]): Remove the _mediaEventListener.
2366         (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests.
2367         (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection.
2368         (-[WKFullScreenWindowController webView]): Type change.
2369         (-[WKFullScreenWindowController setWebView:]): Type change.
2370         (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes.
2371         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes.
2372         (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code
2373             which will reappear in WebFullScreenManager.
2374         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added.
2375         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added.
2376         (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen.
2377         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added.
2378         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added.
2379         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the
2380             layer tree host.
2381         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same.
2382         (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added.
2383         (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes.
2384         (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto.
2385         (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto.
2386         (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto.
2387         (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto.
2388         (-[WKFullScreenWindowController _enableTickleTimer]): Ditto.
2389         (-[WKFullScreenWindowController _disableTickleTimer]): Ditto.
2390         (-[WKFullScreenWindowController _tickleTimerFired]): Ditto.
2391         (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar.
2392         (-[WKFullScreenWindowController _manager]): Added.
2393         (-[WKFullScreenWindowController _requestExit]): Case changes.
2394         (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto.
2395         (-[WKFullScreenWindowController _swapView:with:]): Added.
2396         (-[WKFullScreenWindowController _fullScreenWindow]): Case changes.
2397         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no
2398             longer needs to be flipped.
2399         (-[WKFullScreenWindow cancelOperation:]): Case changes.
2400
2401 2011-03-11  Jer Noble  <jer.noble@apple.com>
2402
2403         Reviewed by Anders Carlsson.
2404
2405         Create new interface stubs to support full screen mode in WebKit2.
2406
2407         WebKit2: Plumb new full screen animation APIs through WebKit2.
2408         https://bugs.webkit.org/show_bug.cgi?id=55993
2409
2410         * UIProcess/WebFullScreenManagerProxy.cpp:
2411         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added.
2412         (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView.
2413         (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView.
2414         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added.
2415         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added.
2416         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
2417         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
2418         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
2419         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
2420         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
2421         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
2422         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
2423         * UIProcess/WebFullScreenManagerProxy.h:
2424         * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions.
2425         * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file.
2426         * UIProcess/WebPageProxy.h: Ditto.
2427         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2428         (WebKit::WebFullScreenManager::element): Added.
2429         (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage.
2430         (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
2431         (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
2432         (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added..
2433         (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added.
2434         (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added.
2435         (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added.
2436         (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub.
2437         (WebKit::WebFullScreenManager::getFullScreenRect): Added.
2438         (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub.
2439         (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub.
2440         * WebProcess/FullScreen/WebFullScreenManager.h:
2441         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions.
2442         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2443         (WebKit::WebChromeClient::setRootFullScreenLayer): Added.
2444         * WebProcess/WebCoreSupport/WebChromeClient.h:
2445
2446 2011-03-11  Alice Liu  <alice.liu@apple.com>
2447
2448         Reviewed by Sam Weinig.
2449
2450         Support encoding /decoding WebData in usermessages
2451         https://bugs.webkit.org/show_bug.cgi?id=56158
2452
2453         Added encoding/decoding for APIObject::TypeData
2454         * Shared/UserMessageCoders.h:
2455         (WebKit::UserMessageEncoder::baseEncode):
2456         (WebKit::UserMessageDecoder::baseDecode):
2457
2458 2011-03-11  Alice Liu  <alice.liu@apple.com>
2459
2460         Reviewed by Sam Weinig.
2461
2462         Add api for "remove" to WKMutableDictionary
2463         https://bugs.webkit.org/show_bug.cgi?id=56157
2464
2465         * Shared/API/c/WKMutableDictionary.cpp:
2466         (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl.
2467         * Shared/API/c/WKMutableDictionary.h:
2468         * Shared/MutableDictionary.cpp:
2469         (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap.
2470         * Shared/MutableDictionary.h:
2471
2472 2011-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2473
2474         Unreviewed, rolling out r80899 and r80912.
2475         http://trac.webkit.org/changeset/80899
2476         http://trac.webkit.org/changeset/80912
2477         https://bugs.webkit.org/show_bug.cgi?id=56236
2478
2479         Caused animation tests to crash on Snow Leopard WebKit2
2480         (Requested by rniwa on #webkit).
2481
2482         * Shared/ShareableBitmap.cpp:
2483         (WebKit::ShareableBitmap::create):
2484         (WebKit::ShareableBitmap::createShareable):
2485         (WebKit::ShareableBitmap::resize):
2486         * Shared/ShareableBitmap.h:
2487         (WebKit::ShareableBitmap::numBytesForSize):
2488         (WebKit::ShareableBitmap::sizeInBytes):
2489         * UIProcess/DrawingAreaProxyImpl.cpp:
2490         (WebKit::DrawingAreaProxyImpl::update):
2491         * WebKit2.xcodeproj/project.pbxproj:
2492         * WebProcess/WebPage/DrawingArea.h:
2493         (WebKit::DrawingArea::didUpdate):
2494         * WebProcess/WebPage/DrawingArea.messages.in:
2495         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2496         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
2497         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
2498         (WebKit::DrawingAreaImpl::didUpdate):
2499         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2500         (WebKit::DrawingAreaImpl::display):
2501         * WebProcess/WebPage/DrawingAreaImpl.h:
2502         * WebProcess/WebPage/SharedMemoryCache.cpp: Removed.
2503         * WebProcess/WebPage/SharedMemoryCache.h: Removed.
2504         * win/WebKit2.vcproj:
2505
2506 2011-03-11  Brian Weinstein  <bweinstein@apple.com>
2507
2508         Windows build fix. Add SharedMemoryCache to the vcproj.
2509
2510         * win/WebKit2.vcproj:
2511
2512 2011-03-11  Alexey Proskuryakov  <ap@apple.com>
2513
2514         Reviewed by Sam Weinig.
2515
2516         https://bugs.webkit.org/show_bug.cgi?id=56222
2517         A window remains frozen if web process crashes during printing
2518
2519         * UIProcess/API/mac/PageClientImpl.h:
2520         * UIProcess/API/mac/PageClientImpl.mm:
2521         * UIProcess/PageClient.h:
2522         * UIProcess/WebPageProxy.cpp:
2523         (WebKit::WebPageProxy::setComplexTextInputEnabled):
2524         * UIProcess/WebPageProxy.h:
2525         Moved setAutodisplay code into WKPrintingView.
2526
2527         * UIProcess/API/mac/WKPrintingView.h:
2528         * UIProcess/API/mac/WKView.mm:
2529         (-[WKView printOperationWithPrintInfo:forFrame:]):
2530         Keep a reference to the actual WKView, so that we can manipulate how it displays, even if
2531         page goes away.
2532
2533         * UIProcess/API/mac/WKPrintingView.mm:
2534         (-[WKPrintingView initWithFrameProxy:WebKit::view:]):
2535         (-[WKPrintingView _setAutodisplay:]):
2536         (-[WKPrintingView _suspendAutodisplay]):
2537         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
2538         Move setAutodisplay here.
2539
2540 2011-03-11  Anders Carlsson  <andersca@apple.com>
2541
2542         Reviewed by Sam Weinig.
2543
2544         Add a shared memory cache to the web process
2545         https://bugs.webkit.org/show_bug.cgi?id=56232
2546
2547         Add a very simple shared memory cache to the web process, so that we don't have to allocate and
2548         free memory over and over when painting.
2549
2550         * Shared/ShareableBitmap.cpp:
2551         (WebKit::ShareableBitmap::create):
2552         (WebKit::ShareableBitmap::createShareable):
2553         (WebKit::ShareableBitmap::resize):
2554         * Shared/ShareableBitmap.h:
2555         (WebKit::ShareableBitmap::numBytesNeededForBitmapSize):
2556         (WebKit::ShareableBitmap::sizeInBytes):
2557         Rename numBytesForSize to numBytesNeededForBitmapSize.
2558
2559         * UIProcess/DrawingAreaProxyImpl.cpp:
2560         (WebKit::DrawingAreaProxyImpl::update):
2561         Always send back a DidUpdate message, even if we didn't use the update info.
2562         This is needed so that the web process knows when the UI process is done with the shared memory inside
2563         the update info struct.
2564
2565         * WebKit2.xcodeproj/project.pbxproj:
2566         Add new files.
2567
2568         * WebProcess/WebPage/DrawingArea.h:
2569         (WebKit::DrawingArea::didUpdate):
2570         * WebProcess/WebPage/DrawingArea.messages.in:
2571         DidUpdate now takes a boolean.
2572
2573         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2574         (WebKit::sharedMemoryCache):
2575         Add shared memory cache.
2576
2577         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
2578         Return the shared memory to the cache.
2579
2580         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
2581         display now takes an extra boolean.
2582
2583         (WebKit::DrawingAreaImpl::didUpdate):
2584         Return the shared memory to the cache.
2585
2586         (WebKit::DrawingAreaImpl::display):
2587         If useSharedMemoryCache is true, get shared memory from the cache.
2588
2589         * WebProcess/WebPage/SharedMemoryCache.cpp: Added.
2590         (WebKit::SharedMemoryCache::acquireSharedMemory):
2591         If the memory we currently hold on to is big enough, return it.
2592
2593         (WebKit::SharedMemoryCache::releaseSharedMemory):
2594         If we're already holding on to shared memory, evict it if the returned
2595         shared memory object is bigger than the one we currently hold.
2596
2597         (WebKit::SharedMemoryCache::clearCacheTimerFired):
2598         Null out the shared memory object.
2599
2600 2011-03-11  Jessie Berlin  <jberlin@apple.com>
2601
2602         Reviewed by Adam Roben.
2603
2604         Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
2605         Process has finished launching.
2606         https://bugs.webkit.org/show_bug.cgi?id=56208
2607
2608         Only send the message if the Web Process is valid.
2609
2610         * UIProcess/WebContext.cpp:
2611         (WebKit::WebContext::clearResourceCaches):
2612
2613 2011-03-11  Anders Carlsson  <andersca@apple.com>
2614
2615         Reviewed by Dan Bernstein.
2616
2617         Don't paint more than 60 times per second
2618         https://bugs.webkit.org/show_bug.cgi?id=56206
2619         <rdar://problem/9085989>
2620
2621         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2622         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2623         Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired.
2624
2625         (WebKit::DrawingAreaImpl::didUpdate):
2626         Call displayTimerFired instead of display.
2627
2628         (WebKit::DrawingAreaImpl::displayTimerFired):
2629         If we're asked to paint again less than 1/60th of a second after we've already painted,
2630         defer painting.
2631
2632         (WebKit::DrawingAreaImpl::display):
2633         Update m_lastDisplayTime.
2634
2635 2011-03-11  Mark Rowe  <mrowe@apple.com>
2636
2637         Reviewed by Alice Liu.
2638
2639         <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL.
2640
2641         * UIProcess/cf/WebPageProxyCF.cpp:
2642         (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item
2643         as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will
2644         be done by our call to loadURL elsewhere in the function.
2645
2646 2011-03-10  Alexey Proskuryakov  <ap@apple.com>
2647
2648         Reviewed by Jon Honeycutt.
2649
2650         WebKit2 UI process crashes if web process crashes while computing page rects for printing
2651         https://bugs.webkit.org/show_bug.cgi?id=56160
2652         <rdar://problem/9027410>
2653
2654         * UIProcess/API/mac/WKPrintingView.mm:
2655         (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that
2656         we have when resuming autodisplay.
2657         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME.
2658         (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing
2659         when there is a communication error, so results are all null).
2660         (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many
2661         pages it had.
2662         (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages
2663         nor knowing them, as it happens when the web process crashes.        
2664
2665 2011-03-10  Mark Rowe  <mrowe@apple.com>
2666
2667         Rubber-stamped by Sam Weinig.
2668
2669         Part of <rdar://problem/8728860> WebKit2 needs to be made localizable
2670
2671         The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents
2672         the default localization that we set during launch from being respected.
2673
2674         * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion.
2675         * WebProcess/Info.plist: Ditto.
2676
2677 2011-03-10  Martin Robinson  <mrobinson@igalia.com>
2678
2679         Build for WebKit2 GTK+ after r80714.
2680
2681         * GNUmakefile.am: Update source list.
2682         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 
2683         (WebKit::x11Display): Add missing semicolon.
2684
2685 2011-03-10  Chris Fleizach  <cfleizach@apple.com>
2686
2687         Reviewed by Darin Adler.
2688
2689         REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus
2690         https://bugs.webkit.org/show_bug.cgi?id=55959
2691
2692         NSApplication has to return the focused element within the app in order
2693         for NSAccessibilityHandleFocusChanged() to work. The default implementation
2694         relies on keyWindow. Consequently, in WK2, the WebProcess must override that method
2695         to return the appropriate focused element within the WebProcess, since
2696         there is no keyWindow.
2697
2698         * WebKit2.xcodeproj/project.pbxproj:
2699         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2700         (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
2701         * WebProcess/WebProcess.cpp:
2702         (WebKit::WebProcess::focusedWebPage):
2703         * WebProcess/WebProcess.h:
2704         * WebProcess/mac/NSApplicationOverride.mm: Added.
2705         (-[NSApplication accessibilityFocusedUIElement]):
2706
2707 2011-03-10  Oleg Romashin  <romaxa@gmail.com>
2708
2709         Reviewed by Andreas Kling.
2710
2711         Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3
2712         Solving conflict of Qt and Xlib includes
2713
2714         * Shared/Plugins/NPIdentifierData.cpp:
2715         * Shared/Plugins/NPIdentifierData.h:
2716         * Shared/Plugins/NPObjectProxy.cpp:
2717         * Shared/Plugins/NPVariantData.h:
2718
2719 2011-03-10  Sam Weinig  <sam@webkit.org>
2720
2721         Reviewed by Mark Rowe.
2722
2723         - Fix plugins in release and production builds.
2724
2725         * WebKit2.xcodeproj/project.pbxproj:
2726         Make sure to base the PluginProcess target on the correct xcconfig file
2727         in all configurations.
2728
2729 2011-03-09  Matthew Delaney  <mdelaney@apple.com>
2730
2731         Reviewed by Simon Fraser.
2732
2733         Plumb through settings for accelerated drawing for canvas
2734         https://bugs.webkit.org/show_bug.cgi?id=56039
2735
2736         * Shared/WebPreferencesStore.h:
2737         * UIProcess/API/C/WKPreferences.cpp:
2738         * UIProcess/API/C/WKPreferencesPrivate.h:
2739         * WebProcess/WebPage/WebPage.cpp:
2740
2741 2011-03-10  Jessie Berlin  <jberlin@apple.com>
2742
2743         Reviewed by Oliver Hunt and Brian Weinstein.
2744
2745         WebKit2: Need a way to clear only the in-memory resource caches
2746         https://bugs.webkit.org/show_bug.cgi?id=56022
2747
2748         Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches
2749         or just the memory caches.
2750
2751         * Shared/ResourceCachesToClear.h: Added.
2752         * UIProcess/API/C/WKAPICast.h:
2753         (WebKit::toResourceCachesToClear):
2754
2755         * UIProcess/API/C/WKContext.cpp:
2756         (WKContextClearResourceCaches):
2757         Add the new parameter.
2758         * UIProcess/API/C/WKContext.h:
2759         * UIProcess/WebContext.cpp:
2760         (WebKit::WebContext::clearResourceCaches):
2761         Ditto.
2762         * UIProcess/WebContext.h:
2763
2764         * WebProcess/WebProcess.cpp:
2765         (WebKit::WebProcess::clearResourceCaches):
2766         Pass the new parameter through to the platform-specific functions.
2767         * WebProcess/WebProcess.h:
2768         Add the new parameter and give it a default of AllResourceCaches.
2769         * WebProcess/WebProcess.messages.in:
2770         Ditto.
2771         * WebProcess/gtk/WebProcessGtk.cpp:
2772         (WebKit::WebProcess::platformClearResourceCaches):
2773         Ditto.
2774         * WebProcess/qt/WebProcessQt.cpp:
2775         (WebKit::WebProcess::platformClearResourceCaches):
2776         Ditto.
2777         * WebProcess/win/WebProcessWin.cpp:
2778         (WebKit::WebProcess::platformClearResourceCaches):
2779         When told to clear only the in-memory caches, return early so as not to clear the CFNetwork
2780         disk cache.
2781         * WebProcess/mac/WebProcessMac.mm:
2782         (WebKit::WebProcess::platformClearResourceCaches):
2783         Ditto.
2784
2785         * WebKit2.xcodeproj/project.pbxproj:
2786         Add ResourceCachesToClear.h
2787         * win/WebKit2.vcproj:
2788         Ditto.
2789
2790 2011-03-10  Jeff Miller  <jeffm@apple.com>
2791
2792         Reviewed by Adam Roben.
2793
2794         WKViewRegisterEditCommandCallback should use WKViewUndoType
2795         https://bugs.webkit.org/show_bug.cgi?id=56120
2796
2797         * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType.
2798
2799 2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2800
2801         Reviewed by Kenneth Rohde Christiansen.
2802
2803         Tiled backing store's delegated scroll request uses incorrect convention
2804         https://bugs.webkit.org/show_bug.cgi?id=56011
2805
2806         Adapt all of the internal API to match the delta to point
2807         conversion at the WebCore side.
2808
2809         * UIProcess/API/qt/qwkpage.cpp:
2810         (QWKPagePrivate::pageDidRequestScroll):
2811         * UIProcess/API/qt/qwkpage_p.h:
2812         * UIProcess/PageClient.h:
2813         * UIProcess/WebPageProxy.cpp:
2814         (WebKit::WebPageProxy::pageDidRequestScroll):
2815         * UIProcess/WebPageProxy.h:
2816         * UIProcess/WebPageProxy.messages.in:
2817         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2818         (WebKit::WebChromeClient::delegatedScrollRequested):
2819         * WebProcess/WebCoreSupport/WebChromeClient.h:
2820         * WebProcess/WebPage/WebPage.cpp:
2821         (WebKit::WebPage::pageDidRequestScroll):
2822         * WebProcess/WebPage/WebPage.h:
2823
2824 2011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
2825
2826         Reviewed by Andreas Kling.
2827
2828         [WK2] Make non-transparent windowless plugins paint on X11
2829         https://bugs.webkit.org/show_bug.cgi?id=55660
2830
2831         Implement painting for non-transparent windowless X11 plugins.
2832         The essence of the logic has been adapted from WebCore.
2833         The implementation is stubbed for GTK and working only on Qt
2834         but it should be really easy to finish it for GTK.
2835
2836         * WebKit2.pro:
2837         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2838         (WebKit::NPN_GetValue): Handle X11 specific values that are necessary.
2839         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2840         (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific
2841         members that has been added.
2842         (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates
2843         of the NP_Window to 0 on X11 since we are using a backings store as the
2844         painting area for the plugin.
2845         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2846         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour
2847         of a common implementation for X11.
2848         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto.
2849         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added.
2850         (WebKit::getPluginDisplay):
2851
2852         Platform specific static getters.
2853         (WebKit::x11Display):
2854         (WebKit::displayDepth):
2855         (WebKit::rootWindowID):
2856         (WebKit::x11Screen):
2857
2858         (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual
2859         settings and the colormap for the plugin.
2860         (WebKit::NetscapePlugin::platformDestroy):
2861         (WebKit::NetscapePlugin::platformInvalidate): Remained stub.
2862         (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new
2863         pixmap that fits the geometry.
2864         (WebKit::NetscapePlugin::platformPaint): Propagate a paint event
2865         to the plugin, sync with it if necessary and draw the pixmap to
2866         the screen.
2867         (WebKit::toNP): Remained stub.
2868         (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub.
2869         (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub.
2870         (WebKit::NetscapePlugin::platformSetFocus): Remained stub.
2871         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub.
2872         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub.
2873         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub.
2874         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2875         (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque
2876         key-value pair to the plugin parameters to force Flash to act in
2877         non-transparent windowless mode. Qt also doing this in WebCore.
2878
2879 2011-03-09  Peter Kasting  <pkasting@google.com>
2880
2881         Reviewed by Mihai Parparita.
2882
2883         Unify Windows version checks.
2884         https://bugs.webkit.org/show_bug.cgi?id=55979
2885
2886         * UIProcess/win/WebPageProxyWin.cpp:
2887         (WebKit::WebPageProxy::standardUserAgent):
2888
2889 2011-03-09  Adele Peterson  <adele@apple.com>
2890
2891         Reviewed by Anders Carlsson.
2892
2893         Fix for https://bugs.webkit.org/show_bug.cgi?id=56068
2894         <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items
2895
2896         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected):
2897         Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, 
2898         and ContextMenuItemTagCheckGrammarWithSpelling
2899
2900 2011-03-09  Alexey Proskuryakov  <ap@apple.com>
2901
2902         Reviewed by Dan Bernstein.
2903
2904         Frequent crashes when printing in WebPageProxy::setAutodisplay
2905         https://bugs.webkit.org/show_bug.cgi?id=56057
2906         <rdar://problem/9053290>
2907
2908         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
2909         Null check the page, there is no reason for it to still exist.
2910
2911 2011-03-09  Brent Fulgham  <bfulgham@webkit.org>
2912
2913         Unreviewed build correction.
2914
2915         * UIProcess/DrawingAreaProxy.messages.in: Exclude the other
2916           method using LayerTreeContext for non-accelerated composition case.
2917
2918 2011-03-09  Sam Weinig  <sam@webkit.org>
2919
2920         Reviewed by Anders Carlsson.
2921
2922         Change plugins to use their own executable on Mac OS X
2923         https://bugs.webkit.org/show_bug.cgi?id=55991
2924
2925         * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig.
2926         * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist.
2927         Add files necessary for adding PluginProcess.app.
2928
2929         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2930         (WebKit::ProcessLauncher::launchProcess):
2931         Launch the PluginProcess.app when launching a plugin process.
2932
2933         * WebKit2.xcodeproj/project.pbxproj:
2934         Add new executable and new files, removes some unneeded copying
2935         and duplicate compiling of files.
2936
2937         * WebProcess/Info.plist:
2938         Sorted.
2939
2940 2011-03-09  Jessie Berlin  <jberlin@apple.com>
2941
2942         Reviewed by Adam Roben.
2943
2944         Use the Cookie Storage from the Private Browsing Storage Session directly
2945         https://bugs.webkit.org/show_bug.cgi?id=55986
2946
2947         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2948         (InitWebCoreSystemInterface):
2949
2950 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
2951
2952         Fix compilation after r80596, add soup Download stubs.
2953
2954         * GNUmakefile.am:
2955         * WebProcess/Downloads/soup/DownloadSoup.cpp: Added.
2956         (WebKit::Download::start):
2957         (WebKit::Download::startWithHandle):
2958         (WebKit::Download::cancel):
2959         (WebKit::Download::platformInvalidate):
2960         (WebKit::Download::didDecideDestination):
2961         (WebKit::Download::platformDidFinish):
2962
2963 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
2964
2965         Fix GTK+ compilation after r80619. Add WebFullScreenManager.
2966
2967         * GNUmakefile.am:
2968
2969 2011-03-08  Jer Noble  <jer.noble@apple.com>
2970
2971         Reviewed by Sam Weinig.
2972
2973         WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
2974         https://bugs.webkit.org/show_bug.cgi?id=55273
2975
2976         The FULLSCREEN_API Chrome client calls need to be plumbed through from the 
2977         WebProcess to the UIProcess.  To do this, WebFullScreenManager (and Proxy)
2978         classes have been added to WebPage.
2979
2980         * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files.
2981         * DerivedSources.pro: Ditto.
2982         * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager.
2983         * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef.
2984         * Shared/APIObject.h: Added APIType for WebFullScreenManager.
2985         * UIProcess/WebFullScreenManagerProxy.cpp: Added.
2986         * UIProcess/WebFullScreenManagerProxy.h: Added.
2987         * UIProcess/WebFullScreenManagerProxy.messages.in: Added.
2988         * UIProcess/WebPageProxy.cpp:
2989         (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager.
2990         (WebKit::WebPageProxy::processDidCrash): Ditto.
2991         (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy.
2992         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
2993         (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager.
2994         * UIProcess/WebPageProxy.h:
2995         * UIProcess/WebPageProxy.messages.in:
2996         * UIProcess/WebUIClient.cpp:
2997         * UIProcess/WebUIClient.h:
2998         * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file.
2999         * WebKit2.pro: Ditto.
3000         * win/WebKit2.vcproj: Ditto.
3001         * WebKit2.pri: Added new directories to include file path.
3002         * win/WebKit2Common.vsprops: Ditto.
3003         * WebProcess/FullScreen/WebFullScreenManager.cpp: Added.
3004         * WebProcess/FullScreen/WebFullScreenManager.h: Added.
3005         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added.
3006         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3007         (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager.
3008         (WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
3009         (WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
3010         * WebProcess/WebPage/WebPage.cpp:
3011         (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager.
3012         (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager.
3013         (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager.
3014         * WebProcess/WebPage/WebPage.h:
3015
3016 2011-03-08  Jer Noble  <jer.noble@apple.com>
3017
3018         Reviewed by Sam Weinig.
3019
3020         WebKit2: Plumb through the "supportsFullScreen" preference.
3021         https://bugs.webkit.org/show_bug.cgi?id=55261
3022
3023         The "supportsFullScreen" preference needs to be plumbed through from
3024         the UIProcess to the WebProcess.
3025
3026         * Shared/WebPreferencesStore.h: Add a new macro entry.
3027         * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter.
3028         (WKPreferencesSetFullScreenEnabled):
3029         (WKPreferencesGetFullScreenEnabled):
3030         * UIProcess/API/C/WKPreferences.h:
3031         * WebProcess/WebPage/WebPage.cpp:
3032         (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to
3033             the settings object.
3034
3035 2011-03-08  Jeff Miller  <jeffm@apple.com>
3036
3037         Reviewed by Adele Peterson.
3038
3039         WebKit2: Implement Windows glue for Undo/Redo
3040         https://bugs.webkit.org/show_bug.cgi?id=55961
3041         
3042         Expose Undo/Redo infrastructure through WKView on Windows by
3043         adding an undo client as well as APIs to reapply and unapply
3044         an edit command.
3045
3046         * UIProcess/API/C/win/WKView.cpp:
3047         (WKViewSetViewUndoClient): Added.
3048         (WKViewReapplyEditCommand): Added.
3049         (WKViewUnapplyEditCommand): Added.
3050         * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand().
3051         * UIProcess/WebPageProxy.cpp:
3052         (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API.
3053         * UIProcess/WebPageProxy.h: Added isValidEditCommand().
3054         * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. 
3055         (WebKit::WebUndoClient::registerEditCommand): Added.
3056         (WebKit::WebUndoClient::clearAllEditCommands): Added.
3057         * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient.
3058         * UIProcess/win/WebView.cpp:
3059         (WebKit::WebView::initializeUndoClient): Added.
3060         (WebKit::WebView::close): Clear out undo client.
3061         (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient.
3062         (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient.
3063         (WebKit::WebView::reapplyEditCommand): Added.
3064         (WebKit::WebView::unapplyEditCommand): Added.
3065         * UIProcess/win/WebView.h: Added undo client support.
3066         * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h.
3067
3068 2011-03-08  Jeff Miller  <jeffm@apple.com>
3069
3070         Reviewed by Sam Weinig.
3071
3072         WebKit2: Expose WebEditCommandProxy in the C API on Windows
3073         https://bugs.webkit.org/show_bug.cgi?id=55962
3074         
3075         Make WebEditCommandProxy a subclass of APIObject, and define
3076         WKEditCommandRef as the type that will be exposed through the C API.
3077
3078         * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef.
3079         * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy.
3080         * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef.
3081         * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject.
3082         (WebKit::WebEditCommandProxy::type): Added.
3083
3084 2011-03-08  Jeff Miller  <jeffm@apple.com>
3085
3086         Reviewed by Oliver Hunt.
3087
3088         WebKit2: Redo is broken
3089         https://bugs.webkit.org/show_bug.cgi?id=55978
3090         
3091         WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens.
3092         For example, when we unapply(), we should register a Redo command, not an Undo command.
3093
3094         * UIProcess/WebEditCommandProxy.cpp:
3095         (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command.
3096         (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command.
3097
3098 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
3099
3100         Reviewed by Adam Roben.
3101
3102         https://bugs.webkit.org/show_bug.cgi?id=55977
3103         Refine CF/CFNet distinctions for better code sharing.
3104         1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp
3105            since it does not use any CFNETWORK features.
3106         2. Create new cfnet directory.
3107         3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet
3108         4. Update project file.
3109
3110         * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed.
3111         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed.
3112         * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp.
3113         * WebProcess/Downloads/cfnet: Added.
3114         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp.
3115         * win/WebKit2.vcproj:
3116
3117 2011-03-08  Mark Rowe  <mrowe@apple.com>
3118
3119         Reviewed by Brady Eidson.
3120
3121         <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries.
3122
3123         * UIProcess/cf/WebPageProxyCF.cpp:
3124         (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state
3125         without navigating to the current item.
3126         * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item.
3127
3128 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
3129
3130         Reviewed by Anders Carlsson.
3131
3132         https://bugs.webkit.org/show_bug.cgi?id=55956
3133         WebKit2 Changes to correct WinCairo port build
3134
3135         * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated
3136           compositing case.
3137         * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build.
3138         * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for
3139           WinCairo build.
3140         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
3141         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
3142         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3143         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
3144         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
3145         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
3146         * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when
3147           accelerated compositing is enabled.
3148         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
3149         * UIProcess/win/WebView.cpp: Protect CG-specific drawing code.
3150         (WebKit::WebView::setFindIndicator):
3151         * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag,
3152           as well as destination and bundle paths.
3153         * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation
3154           of file handling.  This will be moved to a common area in a future patch.)
3155         * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths.
3156         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
3157         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
3158         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
3159         * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code.
3160         (WebKit::WebPage::drawRectToPDF):
3161         (WebKit::WebPage::drawPagesToPDF):
3162         * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo
3163
3164 2011-03-08  Ivan Krstić  <ike@apple.com>
3165
3166         Reviewed by Sam Weinig.
3167
3168         Re-fix: can't paste from 3rd party text editor into WebKit2 window
3169         <rdar://problem/8978624>
3170
3171         * WebProcess/com.apple.WebProcess.sb:
3172
3173 2011-03-08  Martin Robinson  <mrobinson@igalia.com>
3174
3175         Fix the WebKit2 compilation after r80578.
3176
3177         * UIProcess/gtk/WebView.cpp:
3178         (WebKit::WebView::setFocus): Added.
3179         * UIProcess/gtk/WebView.h:
3180
3181 2011-03-08  Jessie Berlin  <jberlin@apple.com>
3182
3183         Reviewed by Anders Carlsson.
3184
3185         Crash in CFNetwork visiting google.com
3186         https://bugs.webkit.org/show_bug.cgi?id=55958
3187
3188         * Shared/API/c/cf/WKURLResponseCF.cpp:
3189         (WKURLResponseCopyCFURLResponse):
3190         If the response to copy is null, return 0;
3191
3192 2011-03-08  John Sullivan  <sullivan@apple.com>
3193
3194         Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940
3195         
3196         The patch was insufficient, and it wasn't useful for the intended client use either.
3197
3198         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3199         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3200         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3201
3202 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
3203
3204         Unreviewed, fixed GTK+ compilation after r80569.
3205
3206         * UIProcess/gtk/WebView.cpp:
3207         (WebKit::WebView::windowToScreen):
3208         * UIProcess/gtk/WebView.h:
3209
3210 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
3211
3212         Reviewed by Sam Weinig.
3213
3214         WK2: Cannot set focus on an element when focus is outside of WKView
3215         https://bugs.webkit.org/show_bug.cgi?id=55281
3216
3217         * UIProcess/API/mac/PageClientImpl.h:
3218         * UIProcess/API/mac/PageClientImpl.mm:
3219         (WebKit::PageClientImpl::setFocus):
3220         * UIProcess/API/qt/qwkpage_p.h:
3221         (QWKPagePrivate::setFocus):
3222         * UIProcess/PageClient.h:
3223         * UIProcess/WebPageProxy.cpp:
3224         (WebKit::WebPageProxy::setFocus):
3225         * UIProcess/WebPageProxy.h:
3226         * UIProcess/WebPageProxy.messages.in:
3227         * UIProcess/win/WebView.h:
3228         (WebKit::WebView::setFocus):
3229         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3230         (WebKit::WebChromeClient::focus):
3231         (WebKit::WebChromeClient::unfocus):
3232
3233 2011-03-08  Jeff Miller  <jeffm@apple.com>
3234
3235         Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
3236
3237         * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
3238
3239 2011-03-08  Jeff Miller  <jeffm@apple.com>
3240
3241         Reviewed by Darin Adler.
3242
3243         Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
3244         https://bugs.webkit.org/show_bug.cgi?id=55952
3245
3246         * UIProcess/API/C/win/WKBaseWin.h: Removed.
3247         * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
3248
3249 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
3250
3251         Reviewed by Martin Robinson.
3252
3253         [GTK] Add new files to compilation after r77974
3254         https://bugs.webkit.org/show_bug.cgi?id=54076
3255
3256         The commit added new code to allow passing context to policy
3257         delegate methods, we also added dummy ResourceRequest and
3258         ResourceResponse decoders until we implement them.
3259
3260         * GNUmakefile.am:
3261         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
3262         (CoreIPC::decodeResourceRequest):
3263         (CoreIPC::decodeResourceResponse):
3264
3265 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
3266
3267         Reviewed by Darin Adler.
3268
3269         AX: Webkit2 not sending UAZoomFocusChanged notifications
3270         https://bugs.webkit.org/show_bug.cgi?id=55916
3271
3272         Needed to implement the windowToScreen() method so that the right frame
3273         could be calculated to send for zoom focus changes.
3274
3275         * UIProcess/API/mac/PageClientImpl.h:
3276         * UIProcess/API/mac/PageClientImpl.mm:
3277         (WebKit::PageClientImpl::windowToScreen):
3278         * UIProcess/API/qt/qwkpage.cpp:
3279         (QWKPagePrivate::windowToScreen):
3280         * UIProcess/API/qt/qwkpage_p.h:
3281         * UIProcess/PageClient.h:
3282         * UIProcess/WebPageProxy.cpp:
3283         (WebKit::WebPageProxy::windowToScreen):
3284         * UIProcess/WebPageProxy.h:
3285         * UIProcess/WebPageProxy.messages.in:
3286         * UIProcess/win/WebView.cpp:
3287         (WebKit::WebView::windowToScreen):
3288         * UIProcess/win/WebView.h:
3289         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3290         (WebKit::WebChromeClient::windowToScreen):
3291         * WebProcess/WebPage/WebPage.cpp:
3292         (WebKit::WebPage::windowToScreen):
3293         * WebProcess/WebPage/WebPage.h:
3294
3295 2011-03-08  John Sullivan  <sullivan@apple.com>
3296
3297         Reviewed by Darin Adler.
3298
3299         https://bugs.webkit.org/show_bug.cgi?id=55940
3300         WebKit2 should support Ignore policy from injected bundle client
3301
3302         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3303         Added WKBundlePagePolicyActionIgnore.
3304         
3305         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3306         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3307         If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
3308         to the loader's PolicyIgnore.
3309
3310 2011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3311
3312         Reviewed by Kenneth Rohde Christiansen.
3313
3314         [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
3315         https://bugs.webkit.org/show_bug.cgi?id=55876
3316
3317         Make sure TESTS_SOURCE_DIR is set for Symbian the same way
3318         as it is for WK1.
3319
3320         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
3321         (tst_QGraphicsWKView::loadEmptyPage):
3322         * UIProcess/API/qt/tests/tests.pri:
3323
3324 2011-03-07  Damian Kaleta  <dkaleta@apple.com>
3325
3326         Reviewed by Anders Carlsson.
3327
3328         QuickTime plugin should opt in to a 32-bit non-executable heap
3329         https://bugs.webkit.org/show_bug.cgi?id=55704
3330         <rdar://problem/8105706>
3331
3332         * UIProcess/Plugins/PluginProcessProxy.cpp:
3333         (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
3334         By default it should opt-out.
3335         (WebKit::PluginProcessProxy::PluginProcessProxy):
3336
3337 2011-03-07  Sam Weinig  <sam@webkit.org>
3338
3339         Reviewed by Anders Carlsson.
3340
3341         Add unableToImplementPolicy callback for WebKit2 policy client
3342         <rdar://problem/9071902>
3343         https://bugs.webkit.org/show_bug.cgi?id=55884
3344
3345         * UIProcess/API/C/WKPage.h:
3346         * UIProcess/WebPageProxy.cpp:
3347         (WebKit::WebPageProxy::unableToImplementPolicy):
3348         * UIProcess/WebPageProxy.h:
3349         * UIProcess/WebPageProxy.messages.in:
3350         * UIProcess/WebPolicyClient.cpp:
3351         (WebKit::WebPolicyClient::unableToImplementPolicy):
3352         * UIProcess/WebPolicyClient.h:
3353         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3354         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
3355         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
3356         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
3357         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3358         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
3359         Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
3360
3361 2011-03-07  Sam Weinig  <sam@webkit.org>
3362
3363         Reviewed by Anders Carlsson.
3364
3365         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
3366         https://bugs.webkit.org/show_bug.cgi?id=55827
3367
3368         - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
3369           and pass the entire response, instead of just the MIMEType.
3370         - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
3371           MIMEType.
3372
3373         * UIProcess/API/C/WKPage.h:
3374         * UIProcess/WebPageProxy.cpp:
3375         (WebKit::WebPageProxy::decidePolicyForResponse):
3376         * UIProcess/WebPageProxy.h:
3377         * UIProcess/WebPageProxy.messages.in:
3378         * UIProcess/WebPolicyClient.cpp:
3379         (WebKit::WebPolicyClient::decidePolicyForResponse):
3380         * UIProcess/WebPolicyClient.h:
3381         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3382         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
3383         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
3384         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
3385         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3386         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3387         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3388
3389 2011-03-06  Jessie Berlin  <jberlin@apple.com>
3390
3391         Reviewed by Sam Weinig.
3392
3393         WebKit2: Use CFNetwork Sessions API.
3394         https://bugs.webkit.org/show_bug.cgi?id=55435.
3395
3396         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
3397         Private Browsing Storage Session.
3398
3399         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3400         (InitWebCoreSystemInterface):
3401         Add support for using the new WKSI functions in WebCore.
3402
3403 2011-03-06  Oleg Romashin  <romaxa@gmail.com>
3404
3405         Reviewed by Kenneth Rohde Christiansen.
3406
3407         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
3408         Adding dummy Qt files for Plugin Process implementation,
3409         Adding missing sources into Qt pro files
3410         https://bugs.webkit.org/show_bug.cgi?id=55719
3411
3412         * DerivedSources.pro:
3413         * PluginProcess/qt: Added.
3414         * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
3415         (WebKit::PluginControllerProxy::platformInitialize):
3416         (WebKit::PluginControllerProxy::platformDestroy):
3417         (WebKit::PluginControllerProxy::platformGeometryDidChange):
3418         * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
3419         (WebKit::PluginProcessMain):
3420         * PluginProcess/qt/PluginProcessQt.cpp: Added.
3421         (WebKit::PluginProcess::platformInitialize):
3422         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
3423         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
3424         * WebKit2.pri:
3425         * WebKit2.pro:
3426         * WebKit2API.pri:
3427         * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
3428         (WebKit::PluginProxy::needsBackingStore):
3429
3430 2011-03-05  Sam Weinig  <sam@webkit.org>
3431
3432         Reviewed by Dan Bernstein.
3433
3434         Remove unneeded onPageClose function from DrawingArea
3435         https://bugs.webkit.org/show_bug.cgi?id=55836
3436
3437         * WebProcess/WebPage/DrawingArea.h:
3438         Remove empty function.
3439
3440         * WebProcess/WebPage/WebPage.cpp:
3441         (WebKit::WebPage::close):
3442         Remove only called
3443
3444 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
3445
3446         WK2 Mac build fix.
3447
3448         * UIProcess/API/C/WKPage.cpp:
3449         (WKPageComputePagesForPrinting):
3450         (WKPageBeginPrinting):
3451
3452         * UIProcess/API/C/WKPagePrivate.h:
3453
3454 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
3455
3456         WK2 Mac build fix.
3457
3458         * UIProcess/API/C/WKPagePrivate.h:
3459
3460 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
3461
3462         WK2 needs printing support on Windows
3463         https://bugs.webkit.org/show_bug.cgi?id=55800
3464         <rdar://problem/8903808>
3465
3466         Reviewed by Darin Adler.
3467
3468         * UIProcess/API/C/WKPage.cpp:
3469         (ComputedPagesContext::ComputedPagesContext):
3470         (computedPagesCallback):
3471         From the Vector of WebCore::IntRects, build up a Vector of WKRects.
3472         Call the callback, passing these rects and the scale factor.
3473         (printInfoFromWKPrintInfo):
3474         Return a PrintInfo structure from the WKPrintInfo.
3475         (WKPageComputePagesForPrinting):
3476         Call WebPageProxy::computePagesForPrinting(). Pass
3477         computedPagesCallback as the callback function, so that we can
3478         translate the WebCore rect type to WKRect before calling the caller's
3479         callback function.
3480         (WKPageBeginPrinting):
3481         Call WebPageProxy::beginPrinting().
3482         (WKPageDrawPagesToPDF):
3483         Call WebPageProxy::drawPagesToPDF().
3484
3485         * UIProcess/API/C/WKPagePrivate.h:
3486         Declare the WKPrintInfo type and new functions.
3487
3488         * UIProcess/WebPageProxy.cpp:
3489         Compile this code on Windows.
3490
3491         * UIProcess/WebPageProxy.h:
3492         Ditto.
3493
3494         * UIProcess/win/WebView.cpp:
3495         (WebKit::WebView::paint):
3496         We're painting the window; leave printing mode.
3497
3498         * WebProcess/WebPage/WebPage.cpp:
3499         Compile this code on Windows.
3500
3501         * WebProcess/WebPage/WebPage.h:
3502         Ditto.
3503
3504         * WebProcess/WebPage/WebPage.messages.in:
3505         Ditto.
3506
3507 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
3508
3509         Reviewed by Darin Adler.
3510
3511         Adopt VersionStamper tool for Windows WebKit DLLs
3512         https://bugs.webkit.org/show_bug.cgi?id=55784
3513         <rdar://problem/9021320>
3514
3515         We now use a tool to stamp the version number onto the Apple WebKit DLLs
3516         during the post-build step.
3517
3518         Fetch the WebKit version from a string resource instead of the version resource.
3519
3520         * UIProcess/win/WebPageProxyWin.cpp:
3521         (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
3522         * win/WebKit2.rc: Removed version, added stringtable.
3523         * win/WebKit2WebProcess.rc: Removed.