Implement encoding/decoding of ResourceRequest and
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-12-21  Sam Weinig  <weinig@apple.com>
2
3         Reviewed by Anders Carlsson.
4
5         Implement encoding/decoding of ResourceRequest and 
6         ResourceResponse for Windows/CFNetwork.
7
8         * Shared/win/WebCoreArgumentCodersWin.cpp:
9         (CoreIPC::encodeResourceRequest):
10         (CoreIPC::decodeResourceRequest):
11         (CoreIPC::encodeResourceResponse):
12         (CoreIPC::decodeResourceResponse):
13         * win/WebKit2.vcproj:
14         * win/WebKit2Common.vsprops:
15
16 2010-12-21  Darin Adler  <darin@apple.com>
17
18         Reviewed by Sam Weinig.
19
20         Mac WebKit delivers an extra didCommit when loading web archives
21         https://bugs.webkit.org/show_bug.cgi?id=51419
22
23         * UIProcess/WebFrameProxy.cpp:
24         (WebKit::WebFrameProxy::didStartProvisionalLoad): Added assertions so we catch
25         inconsistencies here instead of at the application level. Later, we will have
26         to decide what to do in cases these assertions fail. The right policy is probably
27         to consider it a web process failure and do whatever we do for those.
28         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad): Ditto.
29         (WebKit::WebFrameProxy::didFailProvisionalLoad): Ditto.
30         (WebKit::WebFrameProxy::didCommitLoad): Ditto.
31         (WebKit::WebFrameProxy::didFinishLoad): Ditto.
32         (WebKit::WebFrameProxy::didFailLoad): Ditto.
33
34 2010-12-21  Anders Carlsson  <andersca@apple.com>
35
36         Fix Snow Leopard build.
37
38         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
39         (WebKit::NPN_GetValue):
40
41 2010-12-21  Anders Carlsson  <andersca@apple.com>
42
43         Reviewed by Dan Bernstein.
44
45         Fix crash when a Carbon plug-in fails to initialize correctly
46         https://bugs.webkit.org/show_bug.cgi?id=51415
47
48         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
49         (WebKit::NPN_GetValue):
50         Don't claim to support the QuickDraw event model.
51
52         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
53         (WebKit::NetscapePlugin::platformDestroy):
54         Only try to remove the window from the map if it's not null.
55
56 2010-12-21  Anders Carlsson  <andersca@apple.com>
57
58         Reviewed by Darin Adler.
59
60         Add ArgumentCoder support for CFDataRef
61         https://bugs.webkit.org/show_bug.cgi?id=51412
62
63         * Shared/cf/ArgumentCodersCF.cpp:
64         (CoreIPC::typeFromCFTypeRef):
65         (CoreIPC::encode):
66         (CoreIPC::decode):
67         * Shared/cf/ArgumentCodersCF.h:
68
69 2010-12-21  Anders Carlsson  <andersca@apple.com>
70
71         Reviewed by John Sullivan.
72
73         Clicking missing plug-in text does not show a sheet
74         https://bugs.webkit.org/show_bug.cgi?id=51403
75
76         * UIProcess/API/C/WKPage.h:
77         Add missingPluginButtonClicked to WKPageUIClient.
78
79         * UIProcess/WebPageProxy.cpp:        
80         (WebKit::WebPageProxy::missingPluginButtonClicked):
81         Call the WebUIClient member function.
82
83         * UIProcess/WebPageProxy.messages.in:
84         Add MissingPluginButtonClicked message.
85
86         * UIProcess/WebUIClient.cpp:
87         (WebKit::WebUIClient::missingPluginButtonClicked):
88         Call the WKPageUIClient callback.
89
90         * UIProcess/WebUIClient.h:
91         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
92         (WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
93         Always return true for now.
94
95         (WebKit::WebChromeClient::missingPluginButtonClicked):
96         Send a MissingPluginButtonClicked message.
97
98 2010-12-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
99
100         Reviewed by Andreas Kling.
101
102         [Qt] Set BUILDING_QT__ consistently
103         https://bugs.webkit.org/show_bug.cgi?id=51341
104
105         * WebKit2.pro: Remove the definition of BUILDING_QT__ as it
106         is already defined in WebKit.pri.
107
108 2010-12-20  Sam Weinig  <sam@webkit.org>
109
110         Reviewed by Anders Carlsson.
111
112         WebKit2: Add resource load client API
113         https://bugs.webkit.org/show_bug.cgi?id=51370
114
115         This just pipes through the basic resource load client data.
116
117         * UIProcess/API/C/WKPage.cpp:
118         (WKPageSetPageResourceLoadClient):
119         * UIProcess/API/C/WKPage.h:
120         * UIProcess/WebPageProxy.cpp:
121         (WebKit::WebPageProxy::initializeResourceLoadClient):
122         (WebKit::WebPageProxy::didInitiateLoadForResource):
123         (WebKit::WebPageProxy::didSendRequestForResource):
124         (WebKit::WebPageProxy::didReceiveResponseForResource):
125         (WebKit::WebPageProxy::didReceiveContentLengthForResource):
126         (WebKit::WebPageProxy::didFinishLoadForResource):
127         (WebKit::WebPageProxy::didFailLoadForResource):
128         * UIProcess/WebPageProxy.h:
129         * UIProcess/WebPageProxy.messages.in:
130         * UIProcess/WebResourceLoadClient.cpp: Added.
131         (WebKit::WebResourceLoadClient::didInitiateLoadForResource):
132         (WebKit::WebResourceLoadClient::didSendRequestForResource):
133         (WebKit::WebResourceLoadClient::didReceiveResponseForResource):
134         (WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
135         (WebKit::WebResourceLoadClient::didFinishLoadForResource):
136         (WebKit::WebResourceLoadClient::didFailLoadForResource):
137         * UIProcess/WebResourceLoadClient.h: Added.
138         * WebKit2.pro:
139         * WebKit2.xcodeproj/project.pbxproj:
140         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
141         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
142         (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
143         (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
144         (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
145         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
146         (WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
147         * win/WebKit2.vcproj:
148
149 2010-12-20  Anders Carlsson  <andersca@apple.com>
150
151         Reviewed by Sam Weinig.
152
153         Add a TextChecker class, hook up spelling and grammar toggling
154         https://bugs.webkit.org/show_bug.cgi?id=51363
155
156         * UIProcess/API/mac/WKView.mm:
157         (-[WKView validateUserInterfaceItem:]):
158         (-[WKView toggleContinuousSpellChecking:]):
159         (-[WKView toggleGrammarChecking:]):
160         * UIProcess/TextChecker.h: Added.
161         * UIProcess/WebPageProxy.cpp:
162         (WebKit::WebPageProxy::unmarkAllMisspellings):
163         (WebKit::WebPageProxy::unmarkAllBadGrammar):
164         * UIProcess/WebPageProxy.h:
165         * UIProcess/mac/TextCheckerMac.mm: Added.
166         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
167         (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
168         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
169         (WebKit::TextChecker::isGrammarCheckingEnabled):
170         (WebKit::TextChecker::setGrammarCheckingEnabled):
171         * UIProcess/qt/TextCheckerQt.cpp: Added.
172         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
173         (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
174         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
175         (WebKit::TextChecker::isGrammarCheckingEnabled):
176         (WebKit::TextChecker::setGrammarCheckingEnabled):
177         * UIProcess/win/TextCheckerWin.cpp: Added.
178         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
179         (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
180         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
181         (WebKit::TextChecker::isGrammarCheckingEnabled):
182         (WebKit::TextChecker::setGrammarCheckingEnabled):
183         * WebKit2.pro:
184         * WebKit2.xcodeproj/project.pbxproj:
185         * WebProcess/WebPage/WebPage.cpp:
186         (WebKit::WebPage::unmarkAllMisspellings):
187         (WebKit::WebPage::unmarkAllBadGrammar):
188         * WebProcess/WebPage/WebPage.h:
189         * WebProcess/WebPage/WebPage.messages.in:
190         * win/WebKit2.vcproj:
191
192 2010-12-20  Anders Carlsson  <andersca@apple.com>
193
194         Reviewed by Sam Weinig.
195
196         Flash plug-in does not work on YouTube video page when accelerated compositing is disabled
197         https://bugs.webkit.org/show_bug.cgi?id=51348
198         <rdar://problem/8787667>
199
200         * Platform/CoreIPC/HandleMessage.h:
201         (CoreIPC::callMemberFunction):
202         Add new overload.
203
204         * PluginProcess/PluginControllerProxy.cpp:
205         (WebKit::PluginControllerProxy::create):
206         (WebKit::PluginControllerProxy::PluginControllerProxy):
207         These now take an additional isAcceleratedCompositingEnabled parameter.
208
209         (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
210         Return m_isAcceleratedCompositingEnabled.
211
212         * PluginProcess/PluginControllerProxy.h:
213         * PluginProcess/WebProcessConnection.cpp:
214         (WebKit::WebProcessConnection::createPlugin):
215         This now takes an additional isAcceleratedCompositingEnabled parameter.
216
217         * PluginProcess/WebProcessConnection.messages.in:
218         Add isAcceleratedCompositingEnabled parameter to the CreatePlugin message.
219
220         * WebProcess/Plugins/PluginProxy.cpp:
221         (WebKit::PluginProxy::initialize):
222         Pass isAcceleratedCompositingEnabled when sending the CreatePlugin message.
223
224 2010-12-20  Anders Carlsson  <andersca@apple.com>
225
226         Unreviewed, rolling out r74345.
227         http://trac.webkit.org/changeset/74345
228         https://bugs.webkit.org/show_bug.cgi?id=51115
229
230         Not the correct fix.
231
232         * Platform/CoreIPC/Connection.h:
233         * Platform/CoreIPC/qt/ConnectionQt.cpp:
234         (CoreIPC::Connection::open):
235
236 2010-12-20  Balazs Kelemen  <kbalazs@webkit.org>
237
238         Reviewed by Kenneth Rohde Christiansen.
239
240         [Qt][WK2] Crash in web process after the connection had been closed
241         https://bugs.webkit.org/show_bug.cgi?id=51115
242
243         Do not call connectionDidClose with a connection that has been explicitly
244         invalidated on the listener thread.
245         * Platform/CoreIPC/Connection.h:
246         * Platform/CoreIPC/qt/ConnectionQt.cpp:
247         (CoreIPC::Connection::disconnectHandler): Added.
248         (CoreIPC::Connection::open):
249
250 2010-12-19  Dan Bernstein  <mitz@apple.com>
251
252         Reviewed by Sam Weinig.
253
254         Improve the fix for <rdar://problem/8769525>.
255
256         * UIProcess/API/mac/WKView.mm:
257         (-[WKView performKeyEquivalent:]): Do not retain the view. Doing so is necessary in
258         -[WebHTMLView performKeyEquivalent:], which this method was based upon, but not here, because
259         there is no way for the web process to cause the WKView to be released while it is handling
260         the event.
261
262 2010-12-19  Dan Bernstein  <mitz@apple.com>
263
264         Reviewed by Sam Weinig.
265
266         <rdar://problem/8769525> WKView leak when performing key equivalents
267         https://bugs.webkit.org/show_bug.cgi?id=51315
268
269         * UIProcess/API/mac/WKView.mm:
270         (-[WKView performKeyEquivalent:]): Use a RetainPtr to ensure that the view is released in the
271         early return code path.
272
273 2010-12-19  Benjamin Poulain  <benjamin.poulain@nokia.com>
274
275         Reviewed by Kenneth Rohde Christiansen.
276
277         [Qt] [WK2] QWKPagePrivate::paint() does not need to save the graphics context
278         https://bugs.webkit.org/show_bug.cgi?id=51300
279
280         Remove the unnecessary save() and restore() on the QPainter.
281
282         * UIProcess/API/qt/qwkpage.cpp:
283         (QWKPagePrivate::paint):
284
285 2010-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
286
287         Reviewed by Andreas Kling.
288
289         [Qt] [WK2] Client are expected to render their own background for WebPages
290         https://bugs.webkit.org/show_bug.cgi?id=51296
291
292         Remove the rendering of the checkerboard from the tiled DrawingAreaProxy
293
294         * UIProcess/TiledDrawingAreaProxy.cpp:
295         (WebKit::TiledDrawingAreaProxy::paint):
296         * UIProcess/TiledDrawingAreaTile.h:
297         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
298
299 2010-12-19  Benjamin Poulain  <benjamin.poulain@nokia.com>
300
301         Reviewed by Kenneth Rohde Christiansen.
302
303         [Qt] [WK2] Client are expected to render their own background for WebPages
304         https://bugs.webkit.org/show_bug.cgi?id=51296
305
306         Do not render a white background before rendering the page with DrawingAreaProxy.
307
308         * UIProcess/API/qt/qwkpage.cpp:
309         (QWKPagePrivate::paint):
310
311 2010-12-17  Darin Adler  <darin@apple.com>
312
313         Reviewed by Dan Bernstein.
314
315         Window title for image documents shows corrupted characters instead of multiplication sign when using WebKit2
316         https://bugs.webkit.org/show_bug.cgi?id=43505
317
318         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Changed UI_STRING macros to return
319         WebCore::String objects instead of C strings.
320         (WebKit::formatLocalizedString): Added. Uses the Core Foundation string formatting function for
321         reasons explained in the comment.
322         (WebKit::WebPlatformStrategies::multipleFileUploadText): Use formatLocalizedString instead of
323         String::format.
324         (WebKit::WebPlatformStrategies::imageTitle): Ditto.
325         (WebKit::WebPlatformStrategies::localizedMediaTimeDescription): Ditto.
326
327 2010-12-17  Anders Carlsson  <andersca@apple.com>
328
329         Reviewed by Sam Weinig.
330
331         Resizing a WKView while loading a page can leave the page at a size that doesn't match the window
332         https://bugs.webkit.org/show_bug.cgi?id=51282
333         <rdar://problem/8133142>
334
335         Fix a race condition in waitForMessage. If we time out on the wait condition, we would keep the
336         m_waitForMessageMutex mutex unlocked for a brief period of time before taking the lock again and
337         then removing the messageID/destinationID pair from the hash map. Under some circumstances, the
338         connection queue would update the hash map right before we removed it, leading to a lost message.
339         
340         * Platform/CoreIPC/Connection.cpp:
341         (CoreIPC::Connection::waitForMessage):
342
343 2010-12-17  Anders Carlsson  <andersca@apple.com>
344
345         Reviewed by Simon Fraser.
346
347         Clean up ChunkedUpdateDrawingAreaProxy
348         https://bugs.webkit.org/show_bug.cgi?id=51277
349
350         Get rid of m_lastSetViewSize since it was always equal to m_size.
351
352         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
353         (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
354         Call sendSetSize().
355
356         (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
357         Call sendSetSize if the size differs.
358
359         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
360         Move code from sizeDidChange over here.
361
362         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
363         * UIProcess/DrawingAreaProxy.cpp:
364         (WebKit::DrawingAreaProxy::setSize):
365         Add back the early return if the sizes are equal.
366
367 2010-12-17  Brent Fulgham  <bfulgham@webkit.org>
368
369         Unreviewed build fix.
370
371         * WebProcess/WebPage/win/WebPageWin.cpp:
372         (WebKit::WebPage::canHandleRequest): Provide alternative for
373         non-CFNetwork implementation.
374
375 2010-12-17  Ada Chan  <adachan@apple.com>
376
377         Reviewed by Anders Carlsson.
378
379         Implement WKView::setInitialFocus().
380         https://bugs.webkit.org/show_bug.cgi?id=51274
381
382         * UIProcess/API/C/win/WKView.cpp:
383         (WKViewSetInitialFocus):
384         * UIProcess/API/C/win/WKView.h:
385         * UIProcess/WebPageProxy.cpp:
386         (WebKit::WebPageProxy::setInitialFocus): Send message to the Web Process to set
387         initial focus.
388         * UIProcess/WebPageProxy.h:
389         * UIProcess/win/WebView.cpp:
390         (WebKit::WebView::setInitialFocus):
391         * UIProcess/win/WebView.h:
392         * WebProcess/WebPage/WebPage.cpp:
393         (WebKit::WebPage::setInitialFocus): Set the focused node to null initially.  Then
394         ask FocusController to set the initial focus based on the focus direction.
395         * WebProcess/WebPage/WebPage.h:
396         * WebProcess/WebPage/WebPage.messages.in: Add a new message for SetInitialFocus.
397
398 2010-12-17  Anders Carlsson  <andersca@apple.com>
399
400         Reviewed by Sam Weinig.
401
402         Remove a check that probably uncovered a resizing bug.
403
404         * UIProcess/DrawingAreaProxy.cpp:
405         (WebKit::DrawingAreaProxy::setSize):
406
407 2010-12-17  Brian Weinstein  <bweinstein@apple.com>
408
409         Qt build fix.
410
411         * UIProcess/qt/WebPopupMenuProxyQt.h:
412
413 2010-12-17  Brian Weinstein  <bweinstein@apple.com>
414
415         Reviewed by Anders Carlsson.
416
417         Text area does not update when you arrow through a <select> in WebKit2
418         https://bugs.webkit.org/show_bug.cgi?id=51269
419         <rdar://problem/8612853>
420         
421         Patch by Sam Weinig.
422         
423         Insteaed of keeping track of the selected index of a <select> just in the UI process, we
424         need to pass this information along to the web process so that the web process can draw
425         the correct text in the text field at the top of the select, when the selection changes (via
426         the arrows or other typing while the select is opened).
427         
428         When the selected item in a popup changes, the UI process sends a message to the web process, telling
429         it about the new selected index. The web process gets this message, and then sets the text that
430         is visible in the select element.
431
432         * UIProcess/API/mac/PageClientImpl.h: CreatePopupMenuProxy now takes a WebPageProxy.
433         * UIProcess/API/mac/PageClientImpl.mm:
434         (WebKit::PageClientImpl::createPopupMenuProxy): Pass the WebPageProxy to create.
435         * UIProcess/API/qt/qwkpage.cpp:
436         (QWKPagePrivate::createPopupMenuProxy):
437         * UIProcess/API/qt/qwkpage_p.h: CreatePopupMenuProxy now takes a WebPageProxy.
438         * UIProcess/PageClient.h: CreatePopupMenuProxy now takes a WebPageProxy.
439         * UIProcess/WebPageProxy.cpp:
440         (WebKit::WebPageProxy::valueChangedForPopupMenu): Send that the selected index changed to the 
441             web process.selected
442         (WebKit::WebPageProxy::setTextFromItemForPopupMenu): Send that we should update the text for the
443             active popup menu (with the index of the item to show).
444         (WebKit::WebPageProxy::showPopupMenu): Pass the WebPageProxy to createPopupMenuProxy.
445         * UIProcess/WebPageProxy.h:
446         * UIProcess/WebPopupMenuProxy.h: Add a client who has virtual functions for the state changing of the
447             popup menu. ShowPopupMenu doesn't take a new selected index anymore, that is handled by the client,
448             and calling down to the web process.
449         (WebKit::WebPopupMenuProxy::Client::~Client):
450         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy): Initialize the client.
451         * UIProcess/mac/WebPopupMenuProxyMac.h:
452         (WebKit::WebPopupMenuProxyMac::create): Takes a WebPopupMenuProxy::Client, and passes it to the constructor.
453         * UIProcess/mac/WebPopupMenuProxyMac.mm:
454         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac): Update what's initialized by the constructor.
455         (WebKit::WebPopupMenuProxyMac::showPopupMenu): Call through to the web process that the value changed.
456         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
457         (WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt): Update what's initialized by the constructor.
458         * UIProcess/win/WebPopupMenuProxyWin.cpp:
459         (WebKit::WebPopupMenuProxyWin::WebPopupMenuProxyWin): Ditto.
460         (WebKit::WebPopupMenuProxyWin::showPopupMenu): Call through to the web process that the value changed.
461         (WebKit::WebPopupMenuProxyWin::setFocusedIndex): Resolve a FIXME to set the text of the popup menu.
462         * UIProcess/win/WebPopupMenuProxyWin.h:
463         (WebKit::WebPopupMenuProxyWin::create): Take in a WebPopupMenuProxy::client, and pass it to the constructor.
464         * UIProcess/win/WebView.cpp:
465         (WebKit::WebView::createPopupMenuProxy): Pass the WebPageProxy to create.
466         * UIProcess/win/WebView.h:
467         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
468         (WebKit::WebPopupMenu::setTextForIndex): Call through to setTextFromItem to set the select text.
469         * WebProcess/WebCoreSupport/WebPopupMenu.h:
470         * WebProcess/WebPage/WebPage.cpp: Call through to setTextForIndex on the active popup menu.
471         (WebKit::WebPage::setTextForActivePopupMenu):
472         * WebProcess/WebPage/WebPage.h:
473         * WebProcess/WebPage/WebPage.messages.in: Add a new message.
474
475 2010-12-17  Anders Carlsson  <andersca@apple.com>
476
477         Reviewed by Sam Weinig.
478
479         DrawingAreaProxy::setSize shouldn't be a virtual member function
480         https://bugs.webkit.org/show_bug.cgi?id=51275
481
482         Add a pure virtual sizeDidChange member function to DrawingAreaProxy, and only
483         call it if the size changes.
484
485         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
486         (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
487         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
488         * UIProcess/DrawingAreaProxy.cpp:
489         (WebKit::DrawingAreaProxy::setSize):
490         * UIProcess/DrawingAreaProxy.h:
491         (WebKit::DrawingAreaProxy::size):
492         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
493         (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
494         * UIProcess/LayerBackedDrawingAreaProxy.h:
495         * UIProcess/TiledDrawingAreaProxy.cpp:
496         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
497         * UIProcess/TiledDrawingAreaProxy.h:
498
499 2010-12-17  Anders Carlsson  <andersca@apple.com>
500
501         Reviewed by Sam Weinig.
502
503         Add a WebPageProxy parameter to the DrawingAreaProxy constructor
504         https://bugs.webkit.org/show_bug.cgi?id=51271
505
506         * UIProcess/API/mac/WKView.mm:
507         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
508         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
509         * UIProcess/API/qt/qgraphicswkview.cpp:
510         (QGraphicsWKView::QGraphicsWKView):
511         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
512         (WebKit::ChunkedUpdateDrawingAreaProxy::create):
513         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
514         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
515         * UIProcess/DrawingAreaProxy.cpp:
516         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
517         * UIProcess/DrawingAreaProxy.h:
518         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
519         (WebKit::LayerBackedDrawingAreaProxy::create):
520         (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
521         * UIProcess/LayerBackedDrawingAreaProxy.h:
522         * UIProcess/TiledDrawingAreaProxy.cpp:
523         (WebKit::TiledDrawingAreaProxy::create):
524         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
525         * UIProcess/TiledDrawingAreaProxy.h:
526         * UIProcess/win/WebView.cpp:
527         (WebKit::WebView::WebView):
528         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
529
530 2010-12-17  Dan Bernstein  <mitz@apple.com>
531
532         Reviewed by Darin Adler.
533
534         Add API for "Always Use the Complex Text Code Path"
535         https://bugs.webkit.org/show_bug.cgi?id=51265
536
537         * Shared/WebProcessCreationParameters.cpp:
538         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize shouldAlwaysUseComplexTextCodePath.
539         (WebKit::WebProcessCreationParameters::encode): Encode shouldAlwaysUseComplexTextCodePath.
540         (WebKit::WebProcessCreationParameters::decode): Decode shouldAlwaysUseComplexTextCodePath.
541         * Shared/WebProcessCreationParameters.h:
542         * UIProcess/API/C/WKContext.cpp: 
543         (_WKContextSetAlwaysUsesComplexTextCodePath): Added.
544         * UIProcess/API/C/WKContextPrivate.h:
545         * UIProcess/WebContext.cpp:
546         (WebKit::WebContext::WebContext): Initialize m_alwaysUsesComplexTextCodePath.
547         (WebKit::WebContext::ensureWebProcess): Set shouldAlwaysUseComplexTextCodePath in the creation parameters.
548         (WebKit::WebContext::setAlwaysUsesComplexTextCodePath): Added. Sets m_alwaysUsesComplexTextCodePath and
549         sends a message to the WebProcess.
550         * UIProcess/WebContext.h:
551         * WebProcess/WebProcess.cpp:
552         (WebKit::WebProcess::initializeWebProcess): Call setAlwaysUsesComplexTextCodePath() based on the creation
553         parameters.
554         (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): Added.
555         * WebProcess/WebProcess.h:
556         * WebProcess/WebProcess.messages.in: Added SetAlwaysUsesComplexTextCodePath.
557
558 2010-12-17  Sam Weinig  <sam@webkit.org>
559
560         Reviewed by Darin Adler.
561
562         WebKit2: Implement a title attribute per frame
563         https://bugs.webkit.org/show_bug.cgi?id=51266
564
565         Cache the title of each frame on the WebFrameProxy. Removes
566         the WebPageProxy's cache of the main frame title to just
567         access the main frame.
568
569         We clear the cached title on new committed loads and on failures
570         to load.
571
572         * UIProcess/API/C/WKFrame.cpp:
573         (WKFrameCopyTitle):
574         * UIProcess/API/C/WKFrame.h:
575         * UIProcess/WebFrameProxy.cpp:
576         (WebKit::WebFrameProxy::didCommitLoad):
577         (WebKit::WebFrameProxy::didFailLoad):
578         (WebKit::WebFrameProxy::didChangeTitle):
579         * UIProcess/WebFrameProxy.h:
580         (WebKit::WebFrameProxy::title):
581         * UIProcess/WebPageProxy.cpp:
582         (WebKit::WebPageProxy::close):
583         (WebKit::WebPageProxy::pageTitle):
584         (WebKit::WebPageProxy::didReceiveTitleForFrame):
585         (WebKit::WebPageProxy::processDidCrash):
586         * UIProcess/WebPageProxy.h:
587
588 2010-12-16  Darin Adler  <darin@apple.com>
589
590         Reviewed by Maciej Stachowiak.
591
592         Add text encoding menu API for WebKit2
593         https://bugs.webkit.org/show_bug.cgi?id=51226
594
595         * UIProcess/API/C/WKPage.cpp:
596         (WKPageSupportsTextEncoding): Added.
597         (WKPageCopyCustomTextEncodingName): Added.
598         (WKPageSetCustomTextEncodingName): Added.
599         * UIProcess/API/C/WKPage.h: Added the functions above.
600
601         * UIProcess/WebPageProxy.cpp:
602         (WebKit::WebPageProxy::WebPageProxy): Initialize
603         m_mainFrameHasCustomRepresentation to false.
604         (WebKit::WebPageProxy::supportsTextEncoding): Added.
605         (WebKit::WebPageProxy::setCustomTextEncodingName): Added.
606         (WebKit::WebPageProxy::didCommitLoadForFrame): Set
607         m_mainFrameHasCustomRepresentation.
608
609         * UIProcess/WebPageProxy.h: Added supportsTextEncoding,
610         setCustomTextEncodingName, customTextEncodingName, and
611         m_mainFrameHasCustomRepresentation.
612
613         * UIProcess/WebPageProxy.messages.in: Tweaked formatting
614         (added a blank line).
615
616         * WebProcess/WebPage/WebPage.cpp:
617         (WebKit::WebPage::setCustomTextEncodingName): Added.
618         * WebProcess/WebPage/WebPage.h: Added setCustomTextEncodingName.
619
620         * WebProcess/WebPage/WebPage.messages.in: Added the
621         SetCustomTextEncodingName message. Tweaked formatting of the
622         dummy message.
623
624 2010-12-17  Sheriff Bot  <webkit.review.bot@gmail.com>
625
626         Unreviewed, rolling out r74201.
627         http://trac.webkit.org/changeset/74201
628         https://bugs.webkit.org/show_bug.cgi?id=51248
629
630         It broke ~6000 layout tests (Requested by Ossy_ on #webkit).
631
632         * UIProcess/API/qt/qgraphicswkview.cpp:
633         (QGraphicsWKView::setGeometry):
634         (QGraphicsWKView::itemChange):
635
636 2010-12-16  Sam Weinig  <sam@webkit.org>
637
638         Reviewed by Darin Adler.
639
640         Add svn:eol-style native to the message.in files as a favor to Darin Adler.
641
642         * PluginProcess/PluginControllerProxy.messages.in: Added property svn:eol-style.
643         * PluginProcess/PluginProcess.messages.in: Added property svn:eol-style.
644         * PluginProcess/WebProcessConnection.messages.in: Added property svn:eol-style.
645         * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added property svn:eol-style.
646         * UIProcess/Downloads/DownloadProxy.messages.in: Added property svn:eol-style.
647         * UIProcess/Plugins/PluginProcessProxy.messages.in: Added property svn:eol-style.
648         * UIProcess/WebContext.messages.in: Added property svn:eol-style.
649         * UIProcess/WebDatabaseManagerProxy.messages.in: Added property svn:eol-style.
650         * UIProcess/WebInspectorProxy.messages.in: Added property svn:eol-style.
651         * UIProcess/WebPageProxy.messages.in: Added property svn:eol-style.
652         * UIProcess/WebProcessProxy.messages.in: Added property svn:eol-style.
653         * WebProcess/Authentication/AuthenticationManager.messages.in: Added property svn:eol-style.
654         * WebProcess/Plugins/PluginProxy.messages.in: Added property svn:eol-style.
655         * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added property svn:eol-style.
656         * WebProcess/WebPage/WebInspector.messages.in: Added property svn:eol-style.
657         * WebProcess/WebPage/WebPage.messages.in: Added property svn:eol-style.
658         * WebProcess/WebProcess.messages.in: Added property svn:eol-style.
659
660 2010-12-16  Sam Weinig  <sam@webkit.org>
661
662         Reviewed by Anders Carlsson.
663
664         Move NSURLCache initialization from the ProcessLauncherMac to the centralized
665         WebContext initialize WebProcess mechanism.
666
667         * Shared/WebProcessCreationParameters.cpp:
668         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
669         (WebKit::WebProcessCreationParameters::encode):
670         (WebKit::WebProcessCreationParameters::decode):
671         * Shared/WebProcessCreationParameters.h:
672         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
673         (WebKit::ProcessLauncher::launchProcess):
674         * UIProcess/mac/WebContextMac.mm:
675         (WebKit::WebContext::platformInitializeWebProcess):
676         * WebProcess/WebProcess.cpp:
677         (WebKit::WebProcess::initializeWebProcess):
678         * WebProcess/mac/WebProcessMac.mm:
679         (WebKit::WebProcess::platformInitializeWebProcess):
680         * WebProcess/mac/WebProcessMainMac.mm:
681         (WebKit::WebProcessMain):
682         * WebProcess/win/WebProcessWin.cpp:
683         (WebKit::WebProcess::platformInitializeWebProcess):
684         (WebKit::WebProcess::setShouldPaintNativeControls):
685
686 2010-12-16  Anders Carlsson  <andersca@apple.com>
687
688         Reviewed by Dan Bernstein.
689
690         Defer getting a PluginProcessConnection object until the plug-in is initialized
691         https://bugs.webkit.org/show_bug.cgi?id=51207
692         <rdar://problem/8731306>
693
694         Before this change, we would pass the PluginProcessConnection to the PluginProxy constructor, but not
695         call PluginProcessConnection::addPluginProxy (which associates the plug-in proxy with the connection)
696         until the plug-in is initialized.
697
698         This could lead to a PluginProxy holding a reference to a PluginProcessConnection when the PluginProxyConnection
699         itself did not know anything about the PluginProxy. This would happen when a page with plug-ins is opened in a background
700         tab, with the plug-ins not yet initialized.
701
702         Because of this, we could end up in a weird state, where the PluginProcessConnection would think that there are no
703         more plug-ins alive, and invalidate (and null out) the underlying CoreIPC connection, which would lead to crashes
704         when trying to send messages to the connection during later initialization.
705
706         The fix is to pass the plug-in path to the PluginProxy constructor, and get the connection from PluginProxy::initialize.
707         
708         PluginProcessConnection object 
709         * WebProcess/Plugins/PluginProxy.cpp:
710         (WebKit::PluginProxy::create):
711         (WebKit::PluginProxy::PluginProxy):
712         (WebKit::PluginProxy::initialize):
713         * WebProcess/Plugins/PluginProxy.h:
714         * WebProcess/WebPage/WebPage.cpp:
715         (WebKit::WebPage::createPlugin):
716
717 2010-12-16  Enrica Casucci  <enrica@apple.com>
718
719         Reviewed by Maciej Stachowiak.
720
721         WebKit2: Cannot copy two successive selections using cmd-c
722         <rdar://problem/8680309> 
723         https://bugs.webkit.org/show_bug.cgi?id=51203
724         
725         The previous implementation assumed a call sequence from AppKit that
726         was not always happening.
727         When the user clicks on the pulldown menu, AppKit sends validateUserInterfaceItem
728         calls for each element that needs validation and we used to count the number of
729         validation requests being sent to the web process.
730         All these calls are made before we have the chance to get one reply from the WebProcess.
731         We also delayed the menu update until we had received all the replies to the validation requests.
732         At that point we called update on the menu to trigger the validation one more time with
733         the data retrived from the WebProcess.
734         When the user simply presses cmd-c, only one call to vaidateUserInterfaceItem is made
735         and the menu update triggered the validation of all the menu entries causing the internal
736         state to be out of sync.
737         The new implementation is very simple: for each validation request from AppKit we send
738         a request to the WebProcess and we cache a reference to the menu item being validated.
739         When the WebProcess replies, we retrieve the menu item from our cache and update its state.
740         
741         * UIProcess/API/mac/WKView.mm:
742         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Removed initialization of deleted memebers.
743         (-[WKView validateUserInterfaceItem:]): Request validation to the WebProcess and return YES to 
744         allow AppKit to do the keyBinding processing.
745         (-[WKView _setUserInterfaceItemState:enabled:state:]): Called when the WebProcess replies to the
746         validation request to check/uncheck and enable/disable the menu item.
747
748 2010-12-16  Anders Carlsson  <andersca@apple.com>
749
750         Reviewed by Oliver Hunt.
751
752         Don't try to call plug-in member functions if the plug-in hasn't been initialized
753         https://bugs.webkit.org/show_bug.cgi?id=51205
754         <rdar://problem/8730204>
755
756         Make sure that all PluginView functions that can be called while a plug-in has not been
757         initialized (if the plug-in page is in a background tab for example) have an additional
758         check for m_isInitialized.
759
760         * WebProcess/Plugins/PluginView.cpp:
761         (WebKit::PluginView::setWindowIsFocused):
762         (WebKit::PluginView::windowAndViewFramesChanged):
763         (WebKit::PluginView::platformLayer):
764         (WebKit::PluginView::scriptObject):
765         (WebKit::PluginView::privateBrowsingStateChanged):
766         (WebKit::PluginView::handleEvent):
767         (WebKit::PluginView::viewGeometryDidChange):
768         (WebKit::PluginView::setFocus):
769
770 2010-12-16  Anders Carlsson  <andersca@apple.com>
771
772         Reviewed by John Sullivan.
773
774         Add a bunch of m_isStarted assertions to plug-in code.
775
776         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
777         (WebKit::NetscapePlugin::frameDidFinishLoading):
778         (WebKit::NetscapePlugin::frameDidFail):
779         (WebKit::NetscapePlugin::didEvaluateJavaScript):
780         (WebKit::NetscapePlugin::streamDidReceiveResponse):
781         (WebKit::NetscapePlugin::streamDidReceiveData):
782         (WebKit::NetscapePlugin::streamDidFinishLoading):
783         (WebKit::NetscapePlugin::streamDidFail):
784         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
785         (WebKit::NetscapePlugin::manualStreamDidReceiveData):
786         (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
787         (WebKit::NetscapePlugin::manualStreamDidFail):
788         (WebKit::NetscapePlugin::handleMouseEvent):
789         (WebKit::NetscapePlugin::handleWheelEvent):
790         (WebKit::NetscapePlugin::handleMouseEnterEvent):
791         (WebKit::NetscapePlugin::handleMouseLeaveEvent):
792         (WebKit::NetscapePlugin::handleKeyboardEvent):
793         (WebKit::NetscapePlugin::setFocus):
794         (WebKit::NetscapePlugin::pluginScriptableNPObject):
795         (WebKit::NetscapePlugin::privateBrowsingStateChanged):
796
797 2010-12-16  Anders Carlsson  <andersca@apple.com>
798
799         Reviewed by Darin Adler.
800
801         Save the manual plug-in stream data and redeliver it when the plug-in is initialized
802         https://bugs.webkit.org/show_bug.cgi?id=51201
803
804         * WebProcess/Plugins/PluginView.cpp:
805         (WebKit::PluginView::PluginView):
806         Initialize m_manualStreamState.
807
808         (WebKit::PluginView::manualLoadDidReceiveResponse):
809         If the plug-in hasn't been initialized, store the response.
810
811         (WebKit::PluginView::manualLoadDidReceiveData):
812         If the plug-in hasn't been initialized, store the data.
813         
814         (WebKit::PluginView::manualLoadDidFinishLoading):
815         If the plug-in hasn't been initialized, update the state.
816
817         (WebKit::PluginView::manualLoadDidFail):
818         If the plug-in hasn't been initialized, store the error and update the state.
819         
820         (WebKit::PluginView::initializePlugin):
821         Call redeliverManualStream.
822
823         (WebKit::PluginView::redeliverManualStream):
824         Redeliver the manual stream to the plug-in.
825
826         * WebProcess/Plugins/PluginView.h:
827
828 2010-12-16  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
829
830         Reviewed by Andreas Kling.
831
832         [Qt] Turn off drawing area updates if the item is not visible
833
834         The updates are controlled by the QGraphicsItem::visible property.
835
836         * UIProcess/API/qt/qgraphicswkview.cpp:
837         (QGraphicsWKViewPrivate::updateViewportSize):
838         (QGraphicsWKView::setGeometry):
839         (QGraphicsWKView::itemChange):
840
841 2010-12-15  Dan Bernstein  <mitz@apple.com>
842
843         Reviewed by Sam Weinig.
844
845         <rdar://problem/8731320> WebProcess’s CFNetwork cache is in ~/Library/Caches/com.apple.WebProcess
846
847         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
848         (WebKit::ProcessLauncher::launchProcess): Get the location, disk capacity and memory capacity
849         of the UI process’s NSURLCache and pass them to the WebProcess.
850         * WebProcess/mac/WebProcessMainMac.mm:
851         (WebKit::WebProcessMain): If an NSURLCache location was passed on the command line, set the
852         shared NSURLCache to that path and use the specified capacities as initial values.
853
854 2010-12-15  Dan Bernstein  <mitz@apple.com>
855
856         Reviewed by Sam “I blame andersca” Weinig.
857
858         Allow responses to be cached by the NSURLCache.
859
860         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
861         (WebKit::WebFrameLoaderClient::willCacheResponse): Changed to return the response instead of 0.
862
863 2010-12-14  Enrica Casucci  <enrica@apple.com>
864
865         Reviewed by Adam Roben.
866
867         Add IME support to WebKit2 on Windows
868         https://bugs.webkit.org/show_bug.cgi?id=51049
869         The implementation is very close to the one in WebKit.
870         The main change is the addition of handlers for WM_IME_STARTCOMPOSITION,
871         WM_IME_REQUEST, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION,
872         WM_IME_SELECT, WM_IME_SETCONTEXT and a number of new messages
873         between the UI process and the WebProcess to send/retrieve
874         the data being handled by the messages listed above.
875
876         * UIProcess/PageClient.h: Added compositionSelectionChanged for Windows platform.
877         * UIProcess/WebPageProxy.cpp:
878         The following methods send synchronous messages to the WebProcess.
879         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Retrieves the rectangle to position
880         the cnadidates window.
881         (WebKit::WebPageProxy::getSelectedText): Retrieves the currently selected text.
882         The following methods send asynchronous messages to the WebProcess.
883         (WebKit::WebPageProxy::confirmComposition):
884         (WebKit::WebPageProxy::setComposition):
885         (WebKit::WebPageProxy::didChangeSelection): Name changed.
886         (WebKit::WebPageProxy::didChangeCompositionSelection): Called when there is a change
887         in the composition selection.
888         * UIProcess/WebPageProxy.messages.in: Added messages corresponding to the methods above.
889         * UIProcess/win/WebView.cpp:
890         (WebKit::WebView::wndProc): Added handling of messages for IME.
891         The following are the handlers for the window message being sent during composition.
892         (WebKit::WebView::onIMEComposition):
893         (WebKit::WebView::onIMEEndComposition):
894         (WebKit::WebView::onIMERequestCharPosition):
895         (WebKit::WebView::onIMERequestReconvertString):
896         (WebKit::WebView::onIMERequest):
897         (WebKit::WebView::onIMESelect):
898         (WebKit::WebView::onIMESetContext):
899         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
900         (WebKit::WebEditorClient::respondToChangedSelection): Added notification
901         of composition selection changed for Windows.
902         * WebProcess/WebPage/win/WebPageWin.cpp:
903         The following are the WebProcess counterparts of the new messages.
904         (WebKit::WebPage::confirmComposition):
905         (WebKit::WebPage::setComposition):
906         (WebKit::WebPage::firstRectForCharacterInSelectedRange):
907         (WebKit::WebPage::getSelectedText):
908
909 2010-12-15  Sam Weinig  <sam@webkit.org>
910
911         Reviewed by Brady Eidson.
912
913         Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
914         <rdar://problem/8774683>
915         https://bugs.webkit.org/show_bug.cgi?id=51143
916
917         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
918         (WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
919         are not a custom representation (eg. a PDF).
920         (WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.
921         * WebProcess/WebPage/WebPage.cpp:
922         (WebKit::WebPage::updatePreferences): Enable the page cache.
923
924 2010-12-15  Simon Fraser  <simon.fraser@apple.com>
925
926         Reviewed by Adele Peterson.
927
928         WebKit2 in compositing mode no longer has font smoothing
929         https://bugs.webkit.org/show_bug.cgi?id=50733
930         
931         Tell the root GraphicsLayer that its contents are opaque
932         if the WebPage draws its background, and that background
933         is not transparent.
934         
935         The GraphicsLayer then uses the 'contentsOpaque' setting to
936         determine whether to use font smoothing.
937         
938         Add pageBackgroundTransparencyChanged() to DrawingArea
939         so that the WebPage can inform the DrawingArea when the
940         background transparency changes.
941
942         * WebProcess/WebPage/DrawingArea.h:
943         (WebKit::DrawingArea::pageBackgroundTransparencyChanged):
944         (WebKit::DrawingArea::onPageClose):
945         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
946         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
947         (WebKit::LayerBackedDrawingArea::pageBackgroundTransparencyChanged):
948         * WebProcess/WebPage/LayerBackedDrawingArea.h:
949         * WebProcess/WebPage/WebPage.cpp:
950         (WebKit::WebPage::setDrawsBackground):
951         (WebKit::WebPage::setDrawsTransparentBackground):
952
953 2010-12-15  Anders Carlsson  <andersca@apple.com>
954
955         Reviewed by Sam Weinig.
956
957         Fix assertion in plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html test
958         https://bugs.webkit.org/show_bug.cgi?id=51136
959
960         Ensure that a plug-in that has explicitly cancelled the manual stream won't get any more callbacks.
961
962         * PluginProcess/PluginControllerProxy.cpp:
963         (WebKit::PluginControllerProxy::PluginControllerProxy):
964         (WebKit::PluginControllerProxy::cancelManualStreamLoad):
965         (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
966         (WebKit::PluginControllerProxy::manualStreamDidReceiveData):
967         (WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
968         (WebKit::PluginControllerProxy::manualStreamDidFail):
969         * PluginProcess/PluginControllerProxy.h:
970
971 2010-12-15  Brian Weinstein  <bweinstein@apple.com>
972
973         Windows Build Fix. A .h file was added to the vcproj twice, but not its corresponding cpp file.
974
975         * win/WebKit2.vcproj:
976
977 2010-12-15  Sam Weinig  <sam@webkit.org>
978
979         Reviewed by Anders Carlsson.
980
981         WebKit2: Can't add files to an <input type=file>
982         https://bugs.webkit.org/show_bug.cgi?id=51087
983
984         * Scripts/webkit2/messages.py:
985         Adds new types.
986
987         * Shared/API/c/WKBase.h:
988         Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
989
990         * Shared/APIObject.h:
991         Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
992
993         * Shared/WebOpenPanelParameters.cpp: Added.
994         (WebKit::WebOpenPanelParameters::create):
995         (WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
996         (WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
997         (WebKit::WebOpenPanelParameters::Data::encode):
998         (WebKit::WebOpenPanelParameters::Data::decode):
999         * Shared/WebOpenPanelParameters.h: Added.
1000         (WebKit::WebOpenPanelParameters::allowMultipleFiles):
1001         (WebKit::WebOpenPanelParameters::type):
1002         Class representing options one can pass to open panel.
1003
1004         * UIProcess/API/C/WKAPICast.h:
1005         Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
1006
1007         * UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
1008         (WKOpenPanelParametersGetTypeID):
1009         (WKOpenPanelParametersGetAllowsMultipleFiles):
1010         * UIProcess/API/C/WKOpenPanelParameters.h: Added.
1011         * UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
1012         (WKOpenPanelResultListenerGetTypeID):
1013         (WKOpenPanelResultListenerChooseFiles):
1014         (WKOpenPanelResultListenerCancel):
1015         * UIProcess/API/C/WKOpenPanelResultListener.h: Added.
1016         Add API wrappers.
1017
1018         * UIProcess/API/C/WKPage.h:
1019         Add new UI callback, WKPageRunOpenPanelCallback.
1020
1021         * UIProcess/API/C/WebKit2.h:
1022         Add includes for new API headers.
1023
1024         * UIProcess/API/qt/qwkpage.cpp:
1025         (QWKPage::QWKPage):
1026         Stub out the runOpenPanel callback.
1027
1028         * UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
1029         (WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
1030         (WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
1031         (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
1032         (WebKit::WebOpenPanelResultListenerProxy::cancel):
1033         (WebKit::WebOpenPanelResultListenerProxy::invalidate):
1034         * UIProcess/WebOpenPanelResultListenerProxy.h: Added.
1035         (WebKit::WebOpenPanelResultListenerProxy::create):
1036         (WebKit::WebOpenPanelResultListenerProxy::type):
1037         Adds the listener used to choose files for <input type=file>
1038
1039         * UIProcess/WebPageProxy.cpp:
1040         (WebKit::WebPageProxy::runOpenPanel):
1041         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1042         (WebKit::WebPageProxy::didCancelForOpenPanel):
1043         * UIProcess/WebPageProxy.h:
1044         * UIProcess/WebPageProxy.messages.in:
1045         * UIProcess/WebUIClient.cpp:
1046         (WebKit::WebUIClient::runOpenPanel):
1047         * UIProcess/WebUIClient.h:
1048         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1049         (WebKit::WebChromeClient::runOpenPanel):
1050         * WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
1051         (WebKit::WebOpenPanelResultListener::create):
1052         (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
1053         (WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
1054         (WebKit::WebOpenPanelResultListener::didChooseFiles):
1055         * WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
1056         (WebKit::WebOpenPanelResultListener::disconnectFromPage):
1057         * WebProcess/WebPage/WebPage.cpp:
1058         (WebKit::WebPage::close):
1059         (WebKit::WebPage::setActiveOpenPanelResultListener):
1060         (WebKit::WebPage::didChooseFilesForOpenPanel):
1061         (WebKit::WebPage::didCancelForOpenPanel):
1062         * WebProcess/WebPage/WebPage.h:
1063         (WebKit::WebPage::activeOpenPanelResultListener):
1064         * WebProcess/WebPage/WebPage.messages.in:
1065         Pipe through file choosing.
1066
1067         * WebKit2.pro:
1068         * WebKit2.xcodeproj/project.pbxproj:
1069         * win/WebKit2.vcproj:
1070         * win/WebKit2Generated.make:
1071         Add new files.
1072
1073 2010-12-15  Anders Carlsson  <andersca@apple.com>
1074
1075         Reviewed by Maciej Stachowiak.
1076
1077         Semi-reproducible crash in ChunkedUpdateDrawingArea::paintIntoUpdateChunk closing a particular yahoo page
1078         https://bugs.webkit.org/show_bug.cgi?id=51126
1079         <rdar://problem/8771219>
1080
1081         Laying out the web page can cause the drawing area to change so we need to protect against this.
1082
1083         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1084         (WebKit::ChunkedUpdateDrawingArea::display):
1085         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1086         (WebKit::LayerBackedDrawingArea::display):
1087         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1088         (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
1089
1090 2010-12-15  Brian Weinstein  <bweinstein@apple.com>
1091
1092         Reviewed by Adam Roben.
1093
1094         WebKit2: WebPageWin needs implementations of hasLocalDataForURL and canHandleRequest
1095         https://bugs.webkit.org/show_bug.cgi?id=51090
1096         
1097         Implement these functions for WebKit2 on Windows.
1098
1099         * WebProcess/WebPage/WebPage.cpp:
1100         (WebKit::WebPage::hasLocalDataForURL): Does the cross-platform part of the check for having local
1101             data (file URL or subresource), then calls platformHasLocalDataForURL to let the platform do
1102             their specific checks.
1103         * WebProcess/WebPage/WebPage.h:
1104         * WebProcess/WebPage/mac/WebPageMac.mm:
1105         (WebKit::WebPage::platformHasLocalDataForURL): Moved the cross-platform code from here to WebPage::hasLocalDataForURL.
1106         * WebProcess/WebPage/qt/WebPageQt.cpp:
1107         (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL.
1108         * WebProcess/WebPage/win/WebPageWin.cpp:
1109         (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL and implemented with CFNetwork calls. This is the
1110             CFNetwork equivalent of the code in WebPageMac::platformHasLocalDataForURL.
1111         (WebKit::WebPage::canHandleRequest): Copied the line of code from WebView::canHandleRequest in WebKit1, with a FIXME saying
1112             this might not be enough (although it was in WebKit1 on Windows).
1113
1114 2010-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1115
1116         Unreviewed, rolling out r74117.
1117         http://trac.webkit.org/changeset/74117
1118         https://bugs.webkit.org/show_bug.cgi?id=51113
1119
1120         This broke the GTK1 build. (Requested by mrobinson on
1121         #webkit).
1122
1123         * GNUmakefile.am: Removed.
1124         * Scripts/generate-forwarding-headers.pl:
1125         * WebKit2Prefix.h:
1126         * gtk/webkit2.pc.in: Removed.
1127
1128 2010-12-15  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
1129
1130         Reviewed by Martin Robinson.
1131
1132         Changes to enable building WebKit2 for Gtk port.
1133         (https://bugs.webkit.org/show_bug.cgi?id=37369)
1134
1135         * GNUmakefile.am: Added. 
1136         * Scripts/generate-forwarding-headers.pl: For GTK port, taking 1 extra argument for copying network headers.
1137         * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header file for WebKit2 sources files.
1138         * gtk: Added.
1139         * gtk/webkit2.pc.in: Added.
1140
1141 2010-12-15  Jan Erik Hanssen  <jhanssen@sencha.com>
1142
1143         Reviewed by Andreas Kling.
1144
1145         [Qt][WK2] webkit2 does not compile on OS X
1146         https://bugs.webkit.org/show_bug.cgi?id=50128
1147
1148         prctl(2) is only available on Linux, so use an atexit handler for killing
1149         all the child processes when the process is exiting.
1150
1151         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1152         (WebKit::cleanupProcesses):
1153         (WebKit::QtWebProcess::QtWebProcess):
1154         (WebKit::QtWebProcess::processStateChanged):
1155         (WebKit::ProcessLauncherHelper::instance):
1156
1157 2010-12-14  Anders Carlsson  <andersca@apple.com>
1158
1159         Fix Windows build.
1160
1161         * win/WebKit2Common.vsprops:
1162
1163 2010-12-14  Anders Carlsson  <andersca@apple.com>
1164
1165         Fix Qt build.
1166
1167         * WebKit2.pro:
1168
1169 2010-12-14  Anders Carlsson  <andersca@apple.com>
1170
1171         Reviewed by TYPO FIX.
1172
1173         Fix a typo.
1174
1175         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1176         (WebKit::NetscapePluginModule::determineQuirks):
1177
1178 2010-12-14  Anders Carlsson  <andersca@apple.com>
1179
1180         Reviewed by Sam Weinig.
1181
1182         Cannot type into plugin edit field
1183         https://bugs.webkit.org/show_bug.cgi?id=51074
1184         <rdar://problem/8483741>
1185
1186         Add a PrognameShouldBeWebKitPluginHost quirk, since it turns out Flash Player calls getprogname() and checks
1187         if the return value is "WebKitPluginHost" in order to determine when to handle NPCocoaEventKeyDown events.
1188
1189         * PluginProcess/PluginProcess.cpp:
1190         (WebKit::PluginProcess::netscapePluginModule):
1191         If the plug-in module has the PrognameShouldBeWebKitPluginHost quirk, call setprogname("WebKitPluginHost").
1192         
1193         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1194         (WebKit::NetscapePluginModule::load):
1195         Call determineQuirks()
1196
1197         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1198         (WebKit::NetscapePluginModule::determineQuirks):
1199         Add the PrognameShouldBeWebKitPluginHost quirk for Flash.
1200         
1201         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
1202         (WebKit::NetscapePluginModule::determineQuirks):
1203         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1204         (WebKit::NetscapePluginModule::determineQuirks):
1205         Add stubs.
1206
1207         * Shared/Plugins/PluginQuirks.h:
1208         Add new PluginQuirks file.
1209
1210         * WebKit2.xcodeproj/project.pbxproj:
1211         Add PluginQuirks.h
1212
1213 2010-12-14  Anders Carlsson  <andersca@apple.com>
1214
1215         Reviewed by Sam Weinig.
1216
1217         Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there
1218         https://bugs.webkit.org/show_bug.cgi?id=51066
1219
1220         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
1221         (WebKit::NetscapePluginModule::getPluginInfo):
1222         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
1223         (WebKit::PluginInfoStore::getPluginInfo):
1224         * WebKit2.pro:
1225
1226 2010-12-14  Anders Carlsson  <andersca@apple.com>
1227
1228         Reviewed by Dan Bernstein.
1229
1230         Move Windows version of getPluginInfo to NetscapePluginModule
1231         https://bugs.webkit.org/show_bug.cgi?id=51073
1232
1233         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
1234         (WebKit::getVersionInfo):
1235         (WebKit::fileVersion):
1236         (WebKit::NetscapePluginModule::getPluginInfo):
1237         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1238         (WebKit::PluginInfoStore::getPluginInfo):
1239         * win/WebKit2.vcproj:
1240
1241 2010-12-14  Alice Liu  <alice.liu@apple.com>
1242
1243         Fix clang++ build.
1244
1245         * UIProcess/WebProcessProxy.h:
1246         (WebKit::WebProcessProxy::sendSync):
1247         Move the default argument to the declaration.
1248
1249 2010-12-14  Anders Carlsson  <andersca@apple.com>
1250
1251         Reviewed by Adam Roben.
1252
1253         Move PluginInfoStore::getPluginInfo to NetscapePluginModule
1254         https://bugs.webkit.org/show_bug.cgi?id=51058
1255
1256         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1257         Move implementation of PluginInfoStore::getPluginInfo and related
1258         helper functions here.
1259
1260         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1261         (WebKit::PluginInfoStore::getPluginInfo):
1262         Just call NetscapePluginModule::getPluginInfo here for now.
1263
1264         * WebKit2.xcodeproj/project.pbxproj:
1265         Add NetscapePluginModuleMac.mm.
1266
1267 2010-12-14  Anders Carlsson  <andersca@apple.com>
1268
1269         Reviewed by John Sullivan.
1270
1271         Switch name and description order when fetching Carbon plug-in info
1272         https://bugs.webkit.org/show_bug.cgi?id=46211
1273
1274         The plug-in description comes before the name in the Carbon string list resource.
1275
1276         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1277         (WebKit::getPluginInfoFromCarbonResources):
1278
1279 2010-12-14  Anders Carlsson  <andersca@apple.com>
1280
1281         Reviewed by Adam Roben.
1282
1283         Move NetscapePluginModule.{cpp|h} to Shared/Plugins/Netscape
1284         https://bugs.webkit.org/show_bug.cgi?id=51052
1285
1286         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp.
1287         * Shared/Plugins/Netscape/NetscapePluginModule.h: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h.
1288         * WebKit2.pro:
1289         * WebKit2.xcodeproj/project.pbxproj:
1290         * win/WebKit2.vcproj:
1291         * win/WebKit2Common.vsprops:
1292
1293 2010-12-14  Anders Carlsson  <andersca@apple.com>
1294
1295         Reviewed by Sam Weinig.
1296
1297         Handle complex text input for plug-ins
1298         https://bugs.webkit.org/show_bug.cgi?id=51047
1299
1300         * PluginProcess/PluginControllerProxy.cpp:
1301         (WebKit::PluginControllerProxy::sendComplexTextInput):
1302         Pass along the text input to the plug-in.
1303
1304         * PluginProcess/PluginControllerProxy.messages.in:
1305         Add SendComplexTextInput message.
1306
1307         * UIProcess/API/mac/WKTextInputWindowController.h: Added.
1308         * UIProcess/API/mac/WKTextInputWindowController.mm: Added.
1309         Add text input window controller, mostly copied from WebKit1.
1310         
1311         * UIProcess/API/mac/WKView.mm:
1312         (-[WKView keyDown:]):
1313         If needed, pass along the event to the text input window controller.
1314
1315         (-[WKView inputContext]):
1316         Return the input context of the text input window controller.
1317
1318         (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
1319         Notify the input window controller that the input source changed.
1320
1321         * UIProcess/WebPageProxy.cpp:
1322         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
1323         Send the complex text input to the web process.
1324
1325         * WebKit2.xcodeproj/project.pbxproj:
1326         Add new files.
1327
1328         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1329         (WebKit::convertStringToKeyCodes):
1330         Convert a string to a vector of key codes in the current encoding.
1331
1332         (WebKit::NetscapePlugin::sendComplexTextInput):
1333         In the Cocoa event model, create and dispatch an NPCocoaEventTextInput event.
1334         In the Carbon event model, convert the string to individual key codes and send them
1335         as key down events.
1336
1337         * WebProcess/Plugins/PluginProxy.cpp:
1338         (WebKit::PluginProxy::sendComplexTextInput):
1339         Send the text to the plug-in controller proxy.
1340
1341         * WebProcess/Plugins/PluginView.cpp:
1342         (WebKit::PluginView::sendComplexTextInput):
1343         If the plug-in has a matching text input identifier, call Plugin::sendComplexTextInput.
1344
1345         * WebProcess/WebPage/WebPage.messages.in:
1346         Add SendComplexTextInputToPlugin message.
1347
1348         * WebProcess/WebPage/mac/WebPageMac.mm:
1349         (WebKit::WebPage::sendComplexTextInputToPlugin):
1350         Iterate over all known plug-in views and try to find one to send the text input to.
1351
1352 2010-12-13  Alexey Proskuryakov  <ap@apple.com>
1353
1354         Reviewed by Adam Barth.
1355
1356         https://bugs.webkit.org/show_bug.cgi?id=50953
1357         DNS Prefetch should be an opt-in feature
1358
1359         Pass the preference through WebKit2.
1360
1361         * Shared/WebPreferencesStore.h:
1362         * UIProcess/API/C/WKPreferences.cpp:
1363         (WKPreferencesSetDNSPrefetchingEnabled):
1364         (WKPreferencesGetDNSPrefetchingEnabled):
1365         * UIProcess/API/C/WKPreferences.h:
1366         * WebProcess/WebPage/WebPage.cpp:
1367         (WebKit::WebPage::updatePreferences):
1368
1369 2010-12-13  Anders Carlsson  <andersca@apple.com>
1370
1371         Reviewed by Kevin Decker.
1372
1373         Pass the complex text input status to the WKView
1374         https://bugs.webkit.org/show_bug.cgi?id=50993
1375
1376         * UIProcess/API/mac/PageClientImpl.h:
1377         * UIProcess/API/mac/PageClientImpl.mm:
1378         (WebKit::PageClientImpl::setComplexTextInputEnabled):
1379         * UIProcess/API/mac/WKView.mm:
1380         (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
1381         * UIProcess/API/mac/WKViewInternal.h:
1382         * UIProcess/PageClient.h:
1383         * UIProcess/WebPageProxy.cpp:
1384         (WebKit::WebPageProxy::setComplexTextInputEnabled):
1385
1386 2010-12-14  Benjamin Poulain  <benjamin.poulain@nokia.com>
1387
1388         Reviewed by Kenneth Rohde Christiansen.
1389
1390         WebKit 2 does not send touch cancel events correctly between processes
1391         https://bugs.webkit.org/show_bug.cgi?id=50235
1392
1393         The classes WebKit2PlatformTouchPoint and WebKit2PlatformTouchEvent
1394         misses the conversion of TouchCancel events and points.
1395
1396         This patch add the missing enums when converting from a WebTouchEvent
1397         to a PlatformTouchEvent.
1398
1399         Testing is already covered by fast/events/touch/send-oncancel-event.html
1400
1401         * Shared/WebEventConversion.cpp:
1402         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1403         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
1404
1405 2010-12-14  Zalan Bujtas  <zbujtas@gmail.com>
1406
1407         Reviewed by Kenneth Rohde Christiansen.
1408
1409         Add loadFinished() for provisional load error
1410         This fixes the hanging UI state, when provisional load error occurs due to
1411         the async nature of policy check.
1412
1413         https://bugs.webkit.org/show_bug.cgi?id=48724
1414
1415         * UIProcess/API/qt/ClientImpl.cpp:
1416         (loadFinished):
1417         (qt_wk_didFailProvisionalLoadWithErrorForFrame):
1418         (qt_wk_didFinishLoadForFrame):
1419         (qt_wk_didFailLoadWithErrorForFrame):
1420
1421 2010-12-13  Sam Weinig  <sam@webkit.org>
1422
1423         Reviewed by Anders Carlsson.
1424
1425         WebKit2: Need to be able to set the application name for the user agent for a WKPage
1426         https://bugs.webkit.org/show_bug.cgi?id=51011
1427
1428         Fixes:
1429             WebKit2: Need to be able to set the application name for the user agent for a WKPage
1430             <rdar://problem/8564532>
1431             WebKit2: Need to be able to get the computed user agent for a WKPage
1432             <rdar://problem/8637285>
1433
1434         Moves user agent computation to the UIProcess and just passes it to the WebProcess
1435         when it has changed.
1436
1437         * Shared/WebPageCreationParameters.cpp:
1438         (WebKit::WebPageCreationParameters::encode):
1439         (WebKit::WebPageCreationParameters::decode):
1440         * Shared/WebPageCreationParameters.h:
1441         Add a user agent to the creation parameters.
1442
1443         * UIProcess/API/C/WKPage.cpp:
1444         (WKPageCopyUserAgent):
1445         (WKPageCopyApplicationNameForUserAgent):
1446         (WKPageSetApplicationNameForUserAgent):
1447         (WKPageSetCustomUserAgent):
1448         * UIProcess/API/C/WKPage.h:
1449         Add new API to set the application name and access the computed user agent.
1450
1451         * UIProcess/WebPageProxy.cpp:
1452         (WebKit::WebPageProxy::WebPageProxy):
1453         (WebKit::WebPageProxy::close):
1454         (WebKit::WebPageProxy::setUserAgent):
1455         (WebKit::WebPageProxy::setApplicationNameForUserAgent):
1456         (WebKit::WebPageProxy::setCustomUserAgent):
1457         (WebKit::WebPageProxy::processDidCrash):
1458         (WebKit::WebPageProxy::creationParameters):
1459         * UIProcess/WebPageProxy.h:
1460         (WebKit::WebPageProxy::userAgent):
1461         (WebKit::WebPageProxy::applicationNameForUserAgent):
1462         * UIProcess/mac/WebPageProxyMac.mm: Added.
1463         * WebProcess/WebPage/WebPage.cpp:
1464         (WebKit::WebPage::WebPage):
1465         (WebKit::WebPage::setUserAgent):
1466         * WebProcess/WebPage/WebPage.h:
1467         (WebKit::WebPage::userAgent):
1468         * WebProcess/WebPage/WebPage.messages.in:
1469         Pipe through user agent.
1470
1471         (WebKit::callGestalt):
1472         (WebKit::macOSXVersionString):
1473         (WebKit::userVisibleWebKitVersionString):
1474         (WebKit::WebPageProxy::standardUserAgent):
1475         * UIProcess/win/WebPageProxyWin.cpp: Added.
1476         (WebKit::windowsVersion):
1477         (WebKit::userVisibleWebKitVersionString):
1478         (WebKit::WebPageProxy::standardUserAgent):
1479         Port standardUserAgent computation from WebKit1.
1480
1481         * UIProcess/qt/WebPageProxyQt.cpp: Added.
1482         (WebKit::WebPageProxy::standardUserAgent):
1483         Stub out the user agent so there is no change in behavior.
1484
1485         * WebKit2.pro:
1486         * WebKit2.xcodeproj/project.pbxproj:
1487         * win/WebKit2.vcproj:
1488         Add new file.
1489
1490 2010-12-13  Brady Eidson  <beidson@apple.com>
1491
1492         Reviewed by Jon Honeycutt (and Brian Weinstein in heart).
1493
1494         <rdar://problem/8752202> and https://bugs.webkit.org/show_bug.cgi?id=50997
1495         Expose "link title" and "link label" to InjectedBundleHitTestResult API
1496
1497         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1498         (WKBundleHitTestResultCopyLinkLabel):
1499         (WKBundleHitTestResultCopyLinkTitle):
1500         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1501
1502         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1503         (WebKit::InjectedBundleHitTestResult::linkLabel):
1504         (WebKit::InjectedBundleHitTestResult::linkTitle):
1505         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1506
1507 2010-12-13  Brian Weinstein  <bweinstein@apple.com>
1508
1509         Windows Build Fix. Add a needed include.
1510
1511         * UIProcess/win/WebView.cpp:
1512
1513 2010-12-13  Sam Weinig  <sam@webkit.org>
1514
1515         Reviewed by Anders Carlsson.
1516
1517         Remove associated page concept from WKView constructor
1518         https://bugs.webkit.org/show_bug.cgi?id=50983
1519
1520         Step 2: Remove WebPageNamespace.  It no longer does anything.
1521
1522         * Shared/APIObject.h:
1523         * UIProcess/API/C/WKPage.h:
1524         * UIProcess/API/mac/WKView.mm:
1525         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1526         * UIProcess/API/qt/qgraphicswkview.cpp:
1527         * UIProcess/API/qt/qwkcontext.cpp:
1528         (QWKContext::QWKContext):
1529         * UIProcess/API/qt/qwkcontext_p.h:
1530         * UIProcess/API/qt/qwkpage.cpp:
1531         (QWKPagePrivate::QWKPagePrivate):
1532         * UIProcess/API/qt/qwkpage_p.h:
1533         * UIProcess/WebContext.cpp:
1534         (WebKit::WebContext::WebContext):
1535         (WebKit::WebContext::~WebContext):
1536         (WebKit::WebContext::createWebPage):
1537         * UIProcess/WebContext.h:
1538         * UIProcess/WebPageNamespace.cpp: Removed.
1539         * UIProcess/WebPageNamespace.h: Removed.
1540         * UIProcess/WebPageProxy.cpp:
1541         * UIProcess/WebPageProxy.h:
1542         (WebKit::WebPageProxy::context):
1543         * UIProcess/WebProcessProxy.cpp:
1544         (WebKit::WebProcessProxy::createWebPage):
1545         * UIProcess/WebProcessProxy.h:
1546         * UIProcess/win/WebView.cpp:
1547         (WebKit::WebView::WebView):
1548         * UIProcess/win/WebView.h:
1549         * WebKit2.pro:
1550         * WebKit2.xcodeproj/project.pbxproj:
1551         * win/WebKit2.vcproj:
1552
1553 2010-12-13  Sam Weinig  <sam@webkit.org>
1554
1555         Fix windows build.
1556
1557         * UIProcess/win/WebView.h:
1558
1559 2010-12-13  Sam Weinig  <sam@webkit.org>
1560
1561         Fix windows build.
1562
1563         * UIProcess/win/WebInspectorProxyWin.cpp:
1564         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1565         * UIProcess/win/WebView.h:
1566         (WebKit::WebView::create):
1567
1568 2010-12-13  Sam Weinig  <sam@webkit.org>
1569
1570         Reviewed by Anders Carlsson.
1571
1572         Remove associated page concept from WKView constructor
1573         https://bugs.webkit.org/show_bug.cgi?id=50983
1574
1575         Step 1: Remove associate page constructors from WKView and make
1576         all views use the shared namespace for the context.
1577
1578         * UIProcess/API/C/win/WKView.cpp:
1579         * UIProcess/API/C/win/WKView.h:
1580         * UIProcess/API/mac/WKView.h:
1581         * UIProcess/API/mac/WKView.mm:
1582         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1583         * UIProcess/API/qt/qwkcontext.cpp:
1584         * UIProcess/API/qt/qwkcontext.h:
1585         * UIProcess/mac/WebInspectorProxyMac.mm:
1586         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1587         * UIProcess/win/WebView.cpp:
1588         (WebKit::WebView::WebView):
1589         * UIProcess/win/WebView.h:
1590         (WebKit::WebView::create):
1591
1592 2010-12-13  Anders Carlsson  <andersca@apple.com>
1593
1594         Fix build.
1595
1596         * UIProcess/WebPageProxy.h:
1597
1598 2010-12-13  Brian Weinstein  <bweinstein@apple.com>
1599
1600         Reviewed by Adam Roben.
1601
1602         WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
1603         https://bugs.webkit.org/show_bug.cgi?id=50975
1604         <rdar://problem/8763501>
1605         
1606         Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.
1607
1608         * UIProcess/WebInspectorProxy.cpp:
1609         (WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.
1610         * UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
1611         * UIProcess/win/WebInspectorProxyWin.cpp:
1612         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.
1613
1614 2010-12-13  Anders Carlsson  <andersca@apple.com>
1615
1616         Reviewed by Darin Adler.
1617
1618         Pass the complex text input state all the way to the UI process
1619         https://bugs.webkit.org/show_bug.cgi?id=50980
1620
1621         * PluginProcess/PluginControllerProxy.cpp:
1622         (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
1623         * UIProcess/WebPageProxy.cpp:
1624         (WebKit::WebPageProxy::setComplexTextInputEnabled):
1625         * UIProcess/WebPageProxy.h:
1626         * UIProcess/WebPageProxy.messages.in:
1627         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1628         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1629         (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
1630         * WebProcess/Plugins/Plugin.h:
1631         * WebProcess/Plugins/PluginProxy.cpp:
1632         (WebKit::PluginProxy::pluginComplexTextInputIdentifier):
1633         (WebKit::PluginProxy::setComplexTextInputEnabled):
1634         * WebProcess/Plugins/PluginProxy.h:
1635         * WebProcess/Plugins/PluginProxy.messages.in:
1636         * WebProcess/Plugins/PluginView.cpp:
1637         (WebKit::PluginView::setComplexTextInputEnabled):
1638
1639 2010-12-13  Sam Weinig  <sam@webkit.org>
1640
1641         Reviewed by Anders Carlsson.
1642
1643         Change the WebKit2 public API so there is no explicit WKPageNamespace object
1644         https://bugs.webkit.org/show_bug.cgi?id=50898
1645
1646         * Shared/API/c/WKBase.h: Remove definition of WKPageNamespaceRef.
1647         * UIProcess/API/C/WKAPICast.h: Remove toAPI/toImpl for WKPageNamespaceRef.
1648
1649         * UIProcess/API/C/WKPage.cpp:
1650         * UIProcess/API/C/WKPage.h:
1651         Replace WKPageGetPageNamespace with WKPageGetContext.
1652
1653         * UIProcess/API/C/WKPageNamespace.cpp: Removed.
1654         * UIProcess/API/C/WKPageNamespace.h: Removed.
1655
1656         * UIProcess/API/C/WebKit2.h: Remove #include of WKPageNamespace.h.
1657
1658         * UIProcess/API/C/win/WKView.cpp:
1659         (WKViewCreate): Changed to take a WKContextRef instead of a WKPageNamespaceRef.
1660         (WKViewCreateUsingSharedProcess): Added. Similar to WKViewCreate except that
1661         all callers of it will have their views end up in the same shared process, whereas 
1662         with WKViewCreate, a new internal page namespace will be created and could place
1663         the view's WebPage into a new process.
1664         (WKViewCreateForAssociatedPage): Added. Creates a view that is forced to use the
1665         same process as the passed in page.
1666
1667         * UIProcess/win/WebView.cpp:
1668         (WebKit::WebView::WebView):
1669         (WebKit::WebView::initialize):
1670         * UIProcess/win/WebView.h:
1671         (WebKit::WebView::create):
1672         (WebKit::WebView::createUsingSharedProcess):
1673         (WebKit::WebView::createForAssociatedPage):
1674         Implementation of the WKView create functions.
1675
1676         * UIProcess/API/C/win/WKView.h:
1677         * UIProcess/API/mac/WKView.h:
1678         * UIProcess/API/mac/WKView.mm:
1679         (-[WKView initWithFrame:]):
1680         (-[WKView initWithFrame:contextRef:]):
1681         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1682         (-[WKView initWithFrame:contextRef:usingSharedProcess:]):
1683         (-[WKView initWithFrame:contextRef:pageGroupRef:usingSharedProcess:]):
1684         (-[WKView initWithFrame:forAssociatedPageRef:]):
1685         (-[WKView initWithFrame:forAssociatedPageRef:pageGroupRef:]):
1686         (-[WKView initWithFrame:pageNamespace:pageGroup:]):
1687         Add new initializers for the objective-c WKView. It follows the same
1688         pattern as WKViewRef.
1689
1690         * UIProcess/API/qt/qwkcontext.cpp:
1691         (QWKContext::QWKContext):
1692         * UIProcess/API/qt/qwkcontext.h:
1693         Remove uses of WKPageNamespaceRef.
1694
1695         * UIProcess/WebContext.cpp:
1696         (WebKit::WebContext::sharedPageNamespace): Returns a shared
1697         page namespace used by the view's createUsingSharedProcess constructions.
1698         (WebKit::WebContext::createPageNamespace): Change to return
1699         a PassRefPtr to make things clearer.
1700         (WebKit::WebContext::pageNamespaceWasDestroyed): Clear the shared
1701         namespace if it is cleared.
1702         * UIProcess/WebContext.h:
1703
1704         * UIProcess/WebPageNamespace.h: Remove unused "struct WKContextStatistics".
1705
1706         * UIProcess/WebPageProxy.cpp:
1707         (WebKit::WebPageProxy::context):
1708         * UIProcess/WebPageProxy.h:
1709         Add context getter.
1710
1711         * UIProcess/mac/WebInspectorProxyMac.mm:
1712         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1713         * UIProcess/win/WebInspectorProxyWin.cpp:
1714         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1715         Use forAssociatedPageRef constructor for the WebInspector view.
1716
1717         * WebKit2.pro:
1718         * WebKit2.xcodeproj/project.pbxproj:
1719         * win/WebKit2.vcproj:
1720         * win/WebKit2Generated.make:
1721         Remove WKPageNamespace.h/cpp.
1722
1723 2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
1724
1725         Unreviewed build fix.
1726
1727         * UIProcess/win/WebInspectorProxyWin.cpp: Non-Apple builds
1728         need to include <wtf/RetainPtr.h>.
1729
1730 2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
1731
1732         Unreviewed build fix after r73807.
1733
1734         Added stub implementation of Download object.
1735
1736         * WebProcess/Downloads/curl: Added.
1737         * WebProcess/Downloads/curl/DownloadCurl.cpp: Added.
1738         (WebKit::Download::start):
1739         (WebKit::Download::startWithHandle):
1740         (WebKit::Download::cancel):
1741         (WebKit::Download::platformInvalidate):
1742         * win/WebKit2.vcproj: Exclude DownloadCFNet for Cairo builds,
1743         added DownloadCurl (excluded for regular Apple builds.)
1744
1745 2010-12-13  Anders Carlsson  <andersca@apple.com>
1746
1747         Reviewed by Sam Weinig.
1748
1749         Add the ability for plug-ins to toggle complex text input
1750         https://bugs.webkit.org/show_bug.cgi?id=50966
1751
1752         * PluginProcess/PluginControllerProxy.cpp:
1753         (WebKit::PluginControllerProxy::PluginControllerProxy):
1754         Initialize m_isComplexTextInputEnabled.
1755
1756         (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
1757         Update m_isComplexTextInputEnabled.
1758
1759         * PluginProcess/PluginControllerProxy.h:
1760         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1761         (WebKit::NetscapePlugin::NetscapePlugin):
1762         Initialize m_pluginHasFocus and m_windowHasFocus.
1763
1764         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1765         (WebKit::NetscapePlugin::isWindowActive):
1766         Return m_windowHasFocus.
1767
1768         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1769         (WebKit::NetscapePlugin::platformSetFocus):
1770         Update m_pluginHasFocus and call setComplexTextInputEnabled.
1771
1772         (WebKit::NetscapePlugin::windowFocusChanged):
1773         Update m_windowHasFocus and call setComplexTextInputEnabled.
1774
1775         * WebProcess/Plugins/PluginController.h:
1776         Add setComplexTextInputEnabled.
1777
1778         * WebProcess/Plugins/PluginView.cpp:
1779         (WebKit::PluginView::setComplexTextInputEnabled):
1780         * WebProcess/Plugins/PluginView.h:
1781         Add setComplexTextInputEnabled
1782
1783 2010-12-13  David Hyatt  <hyatt@apple.com>
1784
1785         Reviewed by Adam Roben.
1786
1787         Remove the space behavior that I added.  It's covered in EventHandler in WebCore
1788         already for Windows.
1789
1790         * WebProcess/WebPage/win/WebPageWin.cpp:
1791         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1792
1793 2010-12-13  David Hyatt  <hyatt@apple.com>
1794
1795         Reviewed by Sam Weinig.
1796
1797         https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode.  Use
1798         logical scrolling instead of physical scrolling for those keys in WebKit2.
1799
1800         * WebProcess/WebPage/mac/WebPageMac.mm:
1801         (WebKit::logicalScroll):
1802         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1803         * WebProcess/WebPage/qt/WebPageQt.cpp:
1804         (WebKit::logicalScroll):
1805         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1806         * WebProcess/WebPage/win/WebPageWin.cpp:
1807         (WebKit::logicalScroll):
1808         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1809
1810 2010-12-13  Brian Weinstein  <bweinstein@apple.com>
1811
1812         Reviewed by Darin Adler.
1813
1814         WebKit2: Focusing Web Inspector window doesn't focus contents on Windows
1815         https://bugs.webkit.org/show_bug.cgi?id=50947
1816         <rdar://problem/8762468>
1817         
1818         When we get the notification that the inspector window has focused, focus the inner inspector view.
1819
1820         * UIProcess/WebInspectorProxy.h:
1821         * UIProcess/win/WebInspectorProxyWin.cpp:
1822         (WebKit::WebInspectorProxy::onSetFocusEvent): Set the focus of the inspector view, because that is what
1823             needs to be focused in the inspector window.
1824
1825 2010-12-13  Dan Bernstein  <mitz@apple.com>
1826
1827         Coding style fix.
1828
1829         * WebProcess/Downloads/mac/DownloadMac.mm:
1830         (WebKit::originatingURLFromBackForwardList):
1831
1832 2010-12-13  Balazs Kelemen  <kbalazs@webkit.org>
1833
1834         Unreviewed trivial build fix (linux, 64 bit, gcc-4.5.1)
1835
1836         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1837         (WebKit::WebChromeClient::exceededDatabaseQuota):
1838         Don't use unsigned long long as alias for uint64_t.
1839
1840 2010-12-13  Anders Carlsson  <andersca@apple.com>
1841
1842         Reviewed by John Sullivan.
1843
1844         Crash when clicking a download link that targets a new tab
1845         https://bugs.webkit.org/show_bug.cgi?id=50935
1846         <rdar://problem/8760572>
1847
1848         Check for a null history item.
1849
1850         * WebProcess/Downloads/mac/DownloadMac.mm:
1851         (WebKit::originatingURLFromBackForwardList):
1852
1853 2010-12-13  Andras Becsi  <abecsi@webkit.org>
1854
1855         Reviewed by Csaba Osztrogonác.
1856
1857         [Qt][WK2] Fix build if WebKitTools are not available
1858         https://bugs.webkit.org/show_bug.cgi?id=50242
1859
1860         * DerivedSources.pro: Remove dependency to WebKitTools.
1861         * Scripts/generate-forwarding-headers.pl: Moved from WebKitTools/Scripts/generate-forwarding-headers.pl.
1862
1863 2010-12-13  Csaba Osztrogonác  <ossy@webkit.org>
1864
1865         Unreviewed.
1866
1867         * WebKit2.pro: Remove non-existant Shared/DrawingAreaBase.h from build system.
1868
1869 2010-10-28  MORITA Hajime  <morrita@google.com>
1870
1871         Reviewed by Ojan Vafai.
1872
1873         spellcheck does not check pasted text
1874         https://bugs.webkit.org/show_bug.cgi?id=40092
1875
1876         Added a stub implememntation.
1877
1878         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1879         (WebKit::WebEditorClient::requestCheckingOfString):
1880         * WebProcess/WebCoreSupport/WebEditorClient.h:
1881
1882 2010-12-12  Brian Weinstein  <bweinstein@apple.com>
1883
1884         Reviewed by Tim Hatcher.
1885
1886         WebKit2: Implement WebInspector::localizedStringsURL on Windows
1887         https://bugs.webkit.org/show_bug.cgi?id=50896
1888         
1889         Find the localized strings file using CFBundleCopyResourceURL.
1890
1891         * WebProcess/WebPage/win/WebInspectorWin.cpp:
1892         (WebKit::WebInspector::localizedStringsURL):
1893
1894 2010-12-12  Sam Weinig  <sam@webkit.org>
1895
1896         Reviewed by Anders Carlsson.
1897
1898         Give LogTextInput a sensible flag value.
1899
1900         * Platform/Logging.cpp:
1901
1902 2010-12-12  Sam Weinig  <sam@webkit.org>
1903
1904         Reviewed by Anders Carlsson.
1905
1906         Remove incorrect assertion that has been firing in the API tester.
1907
1908         * UIProcess/WebDatabaseManagerProxy.cpp:
1909         (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
1910
1911 2010-12-12  Sam Weinig  <sam@webkit.org>
1912
1913         Reviewed by Anders Carlsson.
1914
1915         Disable WebKit2 logging by default.
1916         https://bugs.webkit.org/show_bug.cgi?id=50878
1917
1918         * Platform/Logging.cpp:
1919         (initializeLogChannelsIfNecessary):
1920
1921 2010-12-11  Brian Weinstein  <bweinstein@apple.com>
1922
1923         Reviewed by Sam Weinig.
1924
1925         Web Inspector: Make inspector on Windows show and be usable in WebKit2
1926         https://bugs.webkit.org/show_bug.cgi?id=50877
1927         
1928         Hook up the unimplemented methods in WebInspectorProxyWin to get the web inspector
1929         showing and usable in WebKit2 on Windows.
1930
1931         * UIProcess/WebInspectorProxy.cpp:
1932         (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize Windows-specific variables to 0.
1933         * UIProcess/WebInspectorProxy.h:
1934         * UIProcess/win/WebInspectorProxyWin.cpp:
1935         (WebKit::WebInspectorProxy::registerInspectorViewWindowClass): Sets up the inspector view class.
1936         (WebKit::WebInspectorProxy::InspectorViewWndProc): Calls through to the WebInspectorProxy's non-static
1937             WndProc.
1938         (WebKit::WebInspectorProxy::wndProc): Handles WM_SIZE, WM_CLOSE, and WM_GETMINMAXINFO, the rest go to 
1939             ::DefWindowProc.
1940         (WebKit::WebInspectorProxy::onSizeEvent): Resize the WKView that has the inspector page to match the
1941             outer window that was just resized.
1942         (WebKit::WebInspectorProxy::onMinMaxInfoEvent): Set the minimum size the window can be resized to.
1943         (WebKit::WebInspectorProxy::onCloseEvent): Hide the window, and call WebInspectorProxy::close.
1944         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WKView and return its page.
1945         (WebKit::WebInspectorProxy::platformOpen): Create an HWND for the inspector, put the inspector's WKView
1946             inside of it, and show the window.
1947         (WebKit::WebInspectorProxy::platformClose): Destroy the inspector's window (which destroys the child WKView), 
1948             and 0 out instance variables.
1949         (WebKit::WebInspectorProxy::inspectorPageURL): Finds inspector/inspector.html in the WebKit bundle.
1950
1951 2010-12-12  Balazs Kelemen  <kbalazs@webkit.org>
1952
1953         Reviewed by Andreas Kling.
1954
1955         [Qt][WK2] Crash in WebPage constructor.
1956         https://bugs.webkit.org/show_bug.cgi?id=50892
1957
1958         * WebProcess/qt/WebProcessQt.cpp:
1959         (WebKit::WebProcess::platformInitializeWebProcess):
1960         Disable runtime enabled features that have no WebKit2 implementation yet.
1961
1962 2010-12-10  Jon Honeycutt  <jhoneycutt@apple.com>
1963
1964         Select menus with short option titles do not paint properly
1965         https://bugs.webkit.org/show_bug.cgi?id=50860
1966         <rdar://problem/8660807>
1967
1968         The backing stores used for painting the popup menu items were only as
1969         wide as the widest option title, but the popup window that we create is
1970         at least as wide as the <select> element. This adjusts the backing
1971         stores to be at least as wide as the <select>, as well.
1972
1973         Reviewed by Sam Weinig.
1974
1975         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1976         (WebKit::WebPopupMenuProxyWin::paint):
1977         Paint using the width of the backing store.
1978
1979         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1980         (WebKit::WebPopupMenu::show):
1981         Pass the page coordinates of the <select> element to
1982         setUpPlatformData().
1983
1984         * WebProcess/WebCoreSupport/WebPopupMenu.h:
1985         Added new parameter to setUpPlatformData().
1986
1987         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1988         (WebKit::WebPopupMenu::setUpPlatformData):
1989         Ditto.
1990
1991         * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
1992         (WebKit::WebPopupMenu::setUpPlatformData):
1993         Ditto.
1994
1995         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1996         (WebKit::WebPopupMenu::setUpPlatformData):
1997         Fixed a typo in a comment. Adjust the backing store size to be at least
1998         as wide as the <select> element, and use that width when painting the
1999         items to the backing store.
2000
2001 2010-12-11  Csaba Osztrogonác  <ossy@webkit.org>
2002
2003         Unreviewed Qt buildfix after r73808.
2004
2005         WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
2006         https://bugs.webkit.org/show_bug.cgi?id=50606
2007
2008         * DerivedSources.pro:
2009
2010 2010-12-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2011
2012         Unreviewed, rolling out r73834.
2013         http://trac.webkit.org/changeset/73834
2014         https://bugs.webkit.org/show_bug.cgi?id=50866
2015
2016         It broke Qt-WebKit2 build, because of missing WK2_DIR variable
2017         (Requested by Ossy on #webkit).
2018
2019         * WebKit2.pro:
2020
2021 2010-12-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
2022
2023         Reviewed by Eric Seidel.
2024
2025         [Qt][WK2] Make WebKit2 static library compile on Symbian
2026         https://bugs.webkit.org/show_bug.cgi?id=50861
2027
2028         * WebKit2.pro:
2029
2030 2010-12-10  Sam Weinig  <sam@webkit.org>
2031
2032         Reviewed by Anders Carlsson.
2033
2034         Ensure that we are not getting too many wheel events
2035         <rdar://problem/7881465>
2036
2037         Add simple coalescing of wheel events being sent to the WebProcess. This 
2038         adds two models, one which drops interim events and one which merges events
2039         together. For now, we are using the simpler dropping model.
2040
2041         * Shared/WebEvent.h:
2042         (WebKit::WebEvent::modifiers):
2043         * UIProcess/WebPageProxy.cpp:
2044         (WebKit::WebPageProxy::WebPageProxy):
2045         (WebKit::coalesceWheelEvents):
2046         (WebKit::WebPageProxy::handleWheelEvent):
2047         (WebKit::WebPageProxy::didReceiveEvent):
2048         * UIProcess/WebPageProxy.h:
2049
2050 2010-12-10  Anders Carlsson  <andersca@apple.com>
2051
2052         Reviewed by John Sullivan.
2053
2054         Make WKContextGetStatistics gather global statistics
2055         https://bugs.webkit.org/show_bug.cgi?id=50850
2056
2057         Change WKContextGetStatistics to work on all objects in the process, and
2058         make it more robust by incrementing/decrementing the counts in the constructor
2059         and destructor respectively. 
2060         
2061         Also, rename WKContextGetStatistics to WKContextGetGlobalStatistics to better match
2062         what it's actually doing.
2063
2064         * UIProcess/API/C/WKContext.cpp:
2065         (WKContextGetStatistics):
2066         * UIProcess/API/C/WKContextPrivate.h:
2067         * UIProcess/API/mac/WKView.mm:
2068         (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
2069         (-[WKView dealloc]):
2070         * UIProcess/WebContext.cpp:
2071         (WebKit::WebContext::statistics):
2072         * UIProcess/WebContext.h:
2073         * UIProcess/WebFrameProxy.cpp:
2074         (WebKit::WebFrameProxy::WebFrameProxy):
2075         (WebKit::WebFrameProxy::~WebFrameProxy):
2076         * UIProcess/WebPageNamespace.cpp:
2077         * UIProcess/WebPageNamespace.h:
2078         * UIProcess/WebPageProxy.cpp:
2079         (WebKit::WebPageProxy::WebPageProxy):
2080         (WebKit::WebPageProxy::~WebPageProxy):
2081         * UIProcess/WebPageProxy.h:
2082
2083 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
2084
2085         Reviewed by Darin Adler.
2086
2087         WebKit2: Context menu support on Windows
2088         <https://bugs.webkit.org/show_bug.cgi?id=50514>
2089         
2090         Implment showing of the context menu on Windows for WebKit2, and calling through to
2091         WebPageProxy::contextMenuItemSelected.
2092
2093         * UIProcess/win/WebContextMenuProxyWin.cpp:
2094         (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin): Initialize the member variables.
2095         (WebKit::WebContextMenuProxyWin::populateMenu): Iterate over the vector of WebContextMenuItemData
2096             that was passed in, adding the menu items and recursively calling back into this function to populate
2097             any submenus that are needed. This function also sets up the map from action identifierss to WebContextMenuItemData,
2098             to use to find the WebContextMenuItemData from a selected menu item.
2099         (WebKit::WebContextMenuProxyWin::showContextMenu): Destroy any menu we have already created, populate the menu
2100             to show, and show the context menu. Once TrackPopupMenuEx returns, it returns identifier of the selected menu item.
2101             Look up that identifier in the map we created, and tell the WebPageProxy that a context menu item was selected.
2102         (WebKit::WebContextMenuProxyWin::hideContextMenu): Destroy the HMENU if it is non-null, and clear the identifier map. 
2103         * UIProcess/win/WebContextMenuProxyWin.h:
2104         (WebKit::WebContextMenuProxyWin::create): Call through to the constructor, and change the arguments that it takes.
2105         * UIProcess/win/WebView.cpp:
2106         (WebKit::WebView::createContextMenuProxy): Call with the correct arguments.
2107
2108 2010-12-10  Jessie Berlin  <jberlin@apple.com>
2109
2110         Qt Build Fix. Unreviewed.
2111
2112         * WebKit2.pro:
2113         Add the Messages.h and MessageReceivers.h.
2114
2115 2010-12-10  Jessie Berlin  <jberlin@apple.com>
2116
2117         Reviewed by Adam Roben and Sam Weinig.
2118
2119         WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
2120         https://bugs.webkit.org/show_bug.cgi?id=50606
2121
2122         Add a WebDatabaseManagerProxy owned by the WebContext.
2123
2124         Expose API (similar to the WebKit1 API) to get a list of origins for which there are
2125         Databases, delete all the databases for a given origin, and delete all the databases.
2126
2127         Add WebDatabaseManager and WebDatabaseManagerProxy as messages receivers.
2128         * DerivedSources.make:
2129         * Platform/CoreIPC/MessageID.h:
2130
2131         Add the WebDatabaseManagerProxy as a UIProcess type (DatabaseManager).
2132         * Shared/API/c/WKBase.h:
2133         * Shared/APIObject.h:
2134         * UIProcess/API/C/WKAPICast.h:
2135
2136         * UIProcess/API/C/WKContext.cpp:
2137         (WKContextGetDatabaseManager):
2138         Expose API to get the DatabaseManager.
2139         * UIProcess/API/C/WKContext.h:
2140
2141         * UIProcess/API/C/WKDatabaseManager.cpp: Added.
2142         (WKDatabaseManagerGetTypeID):
2143         (WKDatabaseManagerGetDatabaseOrigins):
2144         (callGetDatabaseOriginsBlockBlockAndDispose):
2145         (WKDatabaseManagerGetDatabaseOrigins_b):
2146         (WKDatabaseManagerDeleteDatabasesForOrigin):
2147         (WKDatabaseManagerDeleteAllDatabases):
2148         * UIProcess/API/C/WKDatabaseManager.h: Added.
2149
2150         * UIProcess/WebContext.cpp:
2151         (WebKit::WebContext::WebContext):
2152         Create the WebDatabaseManagerProxy.
2153         (WebKit::WebContext::processDidClose):
2154         Invalidate the WebDatabaseManagerProxy.
2155         (WebKit::WebContext::didReceiveMessage):
2156         Forward messages to the WebDatabaseManagerProxy.
2157         * UIProcess/WebContext.h:
2158         (WebKit::WebContext::databaseManagerProxy):
2159
2160         * UIProcess/WebDatabaseManagerProxy.cpp: Added.
2161         (WebKit::WebDatabaseManagerProxy::create):
2162         (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
2163         (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
2164         (WebKit::WebDatabaseManagerProxy::invalidate):
2165         Invalidate the map of callbacks for getDatabaseOrigins.
2166         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
2167         Store the callback and send the request for the origins which have databases to the
2168         WebProcess.
2169         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
2170         Call the callback function with the SecurityOrigins created from the identifiers received.
2171         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
2172         If the origin exists, send the message on to the WebProcess to delete the databases
2173         associated with that origin.
2174         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
2175         Send the message to the WebProcess to delete all the databases.
2176         * UIProcess/WebDatabaseManagerProxy.h: Added.
2177         (WebKit::WebDatabaseManagerProxy::type):
2178         * UIProcess/WebDatabaseManagerProxy.messages.in: Added.
2179
2180         * UIProcess/WebPageProxy.cpp:
2181         Move invalidateCallbackMap from here ...
2182         * UIProcess/GenericCallback.h:
2183         (WebKit::invalidateCallbackMap):
2184         .. to here so that it can be used elsewhere (e.g. by WebDatabaseManagerProxy).
2185
2186         * UIProcess/WebProcessProxy.cpp:
2187         (WebKit::WebProcessProxy::didReceiveMessage):
2188         Forward on all messages destined for the WebDatabaseManagerProxy to the WebContext.
2189
2190         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2191         (WebKit::WebDatabaseManager::didReceiveMessage):
2192         (WebKit::WebDatabaseManager::getDatabaseOrigins):
2193         Send an array of the identifiers for the SecurityOrigins for which there are databases to
2194         the UIProcess.
2195         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2196         If the SecurityOrigin with that identifier exists, tell the DatabaseTracker to delete the
2197         databases for that origin.
2198         (WebKit::WebDatabaseManager::deleteAllDatabases):
2199         Tell the DatabaseTracker to delete the databases for that origin.
2200         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2201         * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added.
2202         * WebProcess/WebProcess.cpp:
2203         (WebKit::WebProcess::didReceiveMessage):
2204
2205         * WebKit2.pro:
2206         Add WKDatabaseManager.cpp/.h and WebDatabaseManagerProxy.cpp/.h
2207         * WebKit2.xcodeproj/project.pbxproj:
2208         Ditto, also add WebDatabaseManagerProxy.messages.in and WebDatabaseManager.messages.in.
2209         * win/WebKit2.vcproj:
2210         Ditto.
2211         * win/WebKit2Generated.make:
2212         Make sure WKDatabaseManager.h is copied into WebKitBuild on Windows.
2213
2214 2010-12-10  Ada Chan  <adachan@apple.com>
2215
2216         Reviewed by Anders Carlsson.
2217
2218         Implement Download::start() and Download::startWithHandle() on Windows.
2219         https://bugs.webkit.org/show_bug.cgi?id=50844
2220
2221         * WebProcess/Downloads/Download.h:
2222         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2223         (WebKit::Download::start): Create a CFURLDownloadRef and schedule it.
2224         (WebKit::Download::startWithHandle): Create a CFURLDownloadRef with the loading connection
2225         retrieved from the ResourceHandle.
2226         (WebKit::Download::platformInvalidate):
2227         (WebKit::downloadFromClientInfo):
2228         (WebKit::didStartCallback):
2229         (WebKit::willSendRequestCallback):
2230         (WebKit::didReceiveAuthenticationChallengeCallback):
2231         (WebKit::didReceiveResponseCallback):
2232         (WebKit::willResumeWithResponseCallback):
2233         (WebKit::didReceiveDataCallback):
2234         (WebKit::shouldDecodeDataOfMIMETypeCallback):
2235         (WebKit::decideDestinationWithSuggestedObjectNameCallback):
2236         (WebKit::didCreateDestinationCallback):
2237         (WebKit::didFinishCallback):
2238         (WebKit::didFailCallback):
2239
2240 2010-12-10  Enrica Casucci  <enrica@apple.com>
2241
2242         Windows build fix. Unreviewed.
2243
2244         Adding a dummy synchronous message for platforms
2245         that don't have any.
2246
2247         * WebProcess/WebPage/WebPage.cpp:
2248         (WebKit::WebPage::dummy):
2249         * WebProcess/WebPage/WebPage.h:
2250         * WebProcess/WebPage/WebPage.messages.in:
2251
2252 2010-12-09  Brian Weinstein  <bweinstein@apple.com>
2253
2254         Reviewed by Adam Roben.
2255
2256         Prep for WebKit2: Context menu support on Windows
2257         https://bugs.webkit.org/show_bug.cgi?id=50514
2258         
2259         Update WebKit2 to call the correct code when CROSS_PLATFORM_CONTEXT_MENUS is set.
2260
2261         * Shared/WebContextMenuItemData.cpp:
2262         (WebKit::WebContextMenuItemData::WebContextMenuItemData): Add a branch based on whether or not 
2263             CROSS_PLATFORM_CONTEXT_MENUS is set.
2264         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2265         (WebKit::WebContextMenuClient::customizeMenu): Define different functions based on
2266             whether or not CROSS_PLATFORM_CONTEXT_MENUS. Both of these are stubs, so functionality
2267             doesn't need to be shared.
2268         * WebProcess/WebCoreSupport/WebContextMenuClient.h: Define different functions based on
2269             whether or not CROSS_PLATFORM_CONTEXT_MENUS. 
2270         * WebProcess/WebPage/WebContextMenu.cpp:
2271         (WebKit::WebContextMenu::show): Add a branch based on whether or not 
2272             CROSS_PLATFORM_CONTEXT_MENUS is set.
2273
2274 2010-12-09  Enrica Casucci  <enrica@apple.com>
2275
2276         Reviewed by Alexey Proskuryakov.
2277
2278         Implement IME support for Mac.
2279         <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
2280         https://bugs.webkit.org/show_bug.cgi?id=50788
2281             
2282         This patch addes support for input methods in WebKit2.
2283         In order to support IME, it was necessary to add synchronous calls from the UIProcess
2284         to the WebProcess. These calls all have a timeout of 1 second.
2285         The current implementation still uses the NSTextInput protocol, but the plan is to move
2286         to the NSTextInputClient protocol. This has not been done yet for ease of comparison with
2287         WebKit. attributedSubstringFromRange is the only method that has not been implemented, because
2288         I have not yet decided what is the best way to send an NSAttributedString across the process
2289         boundary.
2290
2291         * Platform/CoreIPC/HandleMessage.h:
2292         (CoreIPC::callMemberFunction): Added template for member function.
2293         with four reply arguments.
2294         * Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header.
2295         * Shared/WebCoreArgumentCoders.h:
2296         (CoreIPC::): Added encoder/decoder for CompositionUnderline.
2297         * UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged.
2298         * UIProcess/API/mac/PageClientImpl.mm:
2299         (WebKit::PageClientImpl::selectionChanged): Added parameters.
2300         (WebKit::PageClientImpl::interceptKeyEvent): Added parameters.
2301         * UIProcess/API/mac/WKView.mm:
2302         (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members.
2303         (-[WKView insertText:]):
2304         (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters.
2305         (-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters.
2306         (-[WKView keyDown:]): Modified to reset state on each keyDown.
2307         (-[WKView selectedRange]): Added.
2308         (-[WKView hasMarkedText]): Added.
2309         (-[WKView unmarkText]): Added.
2310         (-[WKView validAttributesForMarkedText]): Added.
2311         (extractUnderlines): Added.
2312         (-[WKView setMarkedText:selectedRange:]): Added.
2313         (-[WKView markedRange]): Added.
2314         (-[WKView attributedSubstringFromRange:]): Added.
2315         (-[WKView characterIndexForPoint:]): Added.
2316         (-[WKView firstRectForCharacterRange:]): Added.
2317         (-[WKView conversationIdentifier]): Added.
2318         * UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged.
2319         * UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged.
2320         * UIProcess/WebPageProxy.cpp:
2321         (WebKit::WebPageProxy::getMarkedRange): Added.
2322         (WebKit::WebPageProxy::characterIndexForPoint): Added.
2323         (WebKit::WebPageProxy::firstRectForCharacterRange): Added.
2324         (WebKit::WebPageProxy::interpretKeyEvent): Additional parameters.
2325         (WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform.
2326         * UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange
2327         and interpretKeyEvent.
2328         * UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages.
2329         * UIProcess/WebProcessProxy.h:
2330         (WebKit::WebProcessProxy::sendSync): Added support for synchronous messages.
2331         The default timeout is 1 second.
2332         * WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now
2333         only for non Mac platform.
2334         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2335         (WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform.
2336         * WebProcess/WebPage/WebPage.cpp:
2337         (WebKit::WebPage::didReceiveSyncMessage): Added.
2338         * WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages.
2339         * WebProcess/WebPage/WebPage.messages.in: Added new messages.
2340         * WebProcess/WebPage/mac/WebPageMac.mm:
2341         (WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters.
2342         (WebKit::WebPage::convertRangeToPlatformRange): Added.
2343         (WebKit::WebPage::getMarkedRange): Added.
2344         (WebKit::characterRangeAtPoint): Added.
2345         (WebKit::WebPage::characterIndexForPoint): Added.
2346         (WebKit::convertToRange): Added.
2347         (WebKit::WebPage::firstRectForCharacterRange): Added.
2348         * WebProcess/WebProcess.cpp:
2349         (WebKit::WebProcess::didReceiveSyncMessage): Added.
2350         * WebProcess/WebProcess.h: Added didReceiveSyncMessage.
2351
2352 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2353
2354         Reviewed by Kenneth Rohde Christiansen.
2355
2356         [Qt][WK2] Add the QWKContext API class to wrap the WebContext.
2357         https://bugs.webkit.org/show_bug.cgi?id=50750
2358
2359         * UIProcess/API/qt/WKView.h:
2360         * UIProcess/API/qt/qgraphicswkview.cpp:
2361         (QGraphicsWKView::QGraphicsWKView):
2362         Change the WKPageNamespaceRef argument to QWKContext*
2363         * UIProcess/API/qt/qgraphicswkview.h:
2364         * UIProcess/API/qt/qwkcontext.cpp: Added.
2365         * UIProcess/API/qt/qwkcontext.h: Added.
2366         * UIProcess/API/qt/qwkcontext_p.h: Added.
2367         * UIProcess/API/qt/qwkpage.cpp:
2368         (QWKPagePrivate::QWKPagePrivate):
2369         (QWKPage::QWKPage):
2370         Change the WKPageNamespaceRef argument to QWKContext*
2371         * UIProcess/API/qt/qwkpage.h:
2372         * UIProcess/API/qt/qwkpage_p.h:
2373         * WebKit2.pro:
2374
2375 2010-12-10  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2376
2377         Reviewed by Kenneth Rohde Christiansen.
2378
2379         Flush IPC connection send buffer after each message.
2380
2381         [Qt] [WK2] IPC messages are not sent until send buffer fills up
2382         https://bugs.webkit.org/show_bug.cgi?id=50667
2383
2384         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2385         (CoreIPC::Connection::sendOutgoingMessage):
2386
2387 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2388
2389         Reviewed by Kenneth Rohde Christiansen.
2390
2391         [Qt][WK2] Use a single QNetworkAccessManager per web process.
2392         https://bugs.webkit.org/show_bug.cgi?id=50757
2393
2394         This allows a better management of network resources and the use
2395         of global cookie jar and disk cache across all frames.
2396
2397         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
2398         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
2399         (WebCore::WebFrameNetworkingContext::networkAccessManager):
2400         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
2401         * WebProcess/WebProcess.cpp:
2402         (WebKit::WebProcess::WebProcess):
2403         (WebKit::WebProcess::initializeWebProcess):
2404         (WebKit::WebProcess::shutdownIfPossible):
2405         * WebProcess/WebProcess.h:
2406         (WebKit::WebProcess::networkAccessManager):
2407         * WebProcess/mac/WebProcessMac.mm:
2408         (WebKit::WebProcess::platformInitializeWebProcess):
2409         (WebKit::WebProcess::platformShutdown):
2410         * WebProcess/qt/WebProcessQt.cpp:
2411         (WebKit::WebProcess::platformInitializeWebProcess):
2412         (WebKit::WebProcess::platformShutdown):
2413         * WebProcess/win/WebProcessWin.cpp:
2414         (WebKit::WebProcess::platformInitializeWebProcess):
2415         (WebKit::WebProcess::platformShutdown):
2416
2417 2010-12-09  Mark Rowe  <mrowe@apple.com>
2418
2419         Fix the 32-bit build.
2420
2421         * Shared/cf/ArgumentCodersCF.cpp:
2422         (CoreIPC::sizeForNumberType):
2423
2424 2010-12-09  Maciej Stachowiak  <mjs@apple.com>
2425
2426         Reviewed by Brady Eidson.
2427
2428         WebKit2: Control-click doesn't invoke context menu
2429         https://bugs.webkit.org/show_bug.cgi?id=50793
2430         <rdar://problem/8664800>
2431
2432         * WebProcess/WebPage/WebPage.cpp:
2433         (WebKit::isContextClick): New helper function - on Mac, not only right clicks
2434         but also control-left-clicks are context clicks.
2435         (WebKit::handleMouseEvent): Use above.
2436
2437 2010-12-09  Anders Carlsson  <andersca@apple.com>
2438
2439         Fix clang++ build.
2440
2441         * Scripts/webkit2/messages.py:
2442         DrawingAreaInfo is a struct.
2443
2444         * Shared/WebPreferencesStore.cpp:
2445         (WebKit::valueForKey):
2446         Move valueForKey above code that uses it.
2447
2448         * UIProcess/mac/WebInspectorProxyMac.mm:
2449         (-[WebInspectorProxyObjCAdapter windowWillClose:]):
2450         Remove trailing semicolon.
2451
2452 2010-12-09  Timothy Hatcher  <timothy@apple.com>
2453
2454         Add support for transparent WebKit2 WKViews.
2455
2456         https://webkit.org/b/50785
2457
2458         Reviewed by Anders Carlsson.
2459
2460         * Shared/WebPageCreationParameters.cpp:
2461         (WebKit::WebPageCreationParameters::encode): Encode drawsBackground and drawsTransparentBackground.
2462         (WebKit::WebPageCreationParameters::decode): Decode drawsBackground and drawsTransparentBackground.
2463         * Shared/WebPageCreationParameters.h:
2464         * UIProcess/API/mac/WKView.h:
2465         * UIProcess/API/mac/WKView.mm:
2466         (-[WKView setDrawsBackground:]): Added.
2467         (-[WKView drawsBackground]): Added.
2468         (-[WKView setDrawsTransparentBackground:]): Added.
2469         (-[WKView drawsTransparentBackground]): Added.
2470         (-[WKView drawRect:]): Only fill the background if the WebProcess isn't valid and drawsBackground.
2471         Use white or clear based on setDrawsTransparentBackground.
2472         (-[WKView isOpaque]): Return drawsBackground.
2473         * UIProcess/WebPageProxy.cpp:
2474         (WebKit::WebPageProxy::WebPageProxy): Initialize m_drawsBackground and m_drawsTransparentBackground.
2475         (WebKit::WebPageProxy::setDrawsBackground): Added. Send a SetDrawsBackground message.
2476         (WebKit::WebPageProxy::setDrawsTransparentBackground): Added. Send a SetDrawsTransparentBackground message.
2477         (WebKit::WebPageProxy::creationParameters): Set drawsBackground and drawsTransparentBackground.
2478         * UIProcess/WebPageProxy.h:
2479         (WebKit::WebPageProxy::drawsBackground): Added. Return m_drawsBackground.
2480         (WebKit::WebPageProxy::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
2481         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2482         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): Use the copy blend mode when drawing a background.
2483         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Use the copy blend mode to replace existing content.
2484         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2485         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Setup the new view's background color and transparent flag.
2486         * WebProcess/WebPage/WebPage.cpp:
2487         (WebKit::WebPage::WebPage): Initialize m_drawsBackground and m_drawsTransparentBackground.
2488         (WebKit::WebPage::setDrawsBackground): Added. Propagate the flag to the FrameViews.
2489         (WebKit::WebPage::setDrawsTransparentBackground): Added. Propagate the background color to the FrameViews.
2490         * WebProcess/WebPage/WebPage.h:
2491         (WebKit::WebPage::drawsBackground): Added. Return m_drawsBackground.
2492         (WebKit::WebPage::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
2493         * WebProcess/WebPage/WebPage.messages.in: Added SetDrawsBackground and SetDrawsTransparentBackground.
2494
2495 2010-12-09  Anders Carlsson  <andersca@apple.com>
2496
2497         Reviewed by Sam Weinig.
2498
2499         Cannot use NSKeyedArchiver in WK2 for ResourceResponses
2500         https://bugs.webkit.org/show_bug.cgi?id=50792
2501         <rdar://problem/8741799>
2502
2503         When encoding, first convert the requests and responses to the serializable dictionary representation
2504         and use the newly added CF CoreIPC encoders. When decoding, do the opposite.
2505
2506         * Shared/mac/WebCoreArgumentCodersMac.mm:
2507         (CoreIPC::encodeResourceRequest):
2508         (CoreIPC::decodeResourceRequest):
2509         (CoreIPC::encodeResourceResponse):
2510         (CoreIPC::decodeResourceResponse):
2511
2512 2010-12-09  Anders Carlsson  <andersca@apple.com>
2513
2514         Reviewed by Sam Weinig.
2515
2516         Add CoreIPC coders for CF types
2517         https://bugs.webkit.org/show_bug.cgi?id=50791
2518
2519         * Platform/CoreIPC/ArgumentDecoder.h:
2520         (CoreIPC::ArgumentDecoder::decodeEnum):
2521         * Platform/CoreIPC/ArgumentEncoder.h:
2522         (CoreIPC::ArgumentEncoder::encodeEnum):
2523         * Shared/cf/ArgumentCodersCF.cpp: Added.
2524         (CoreIPC::tokenNullTypeRef):
2525         (CoreIPC::typeFromCFTypeRef):
2526         (CoreIPC::encode):
2527         (CoreIPC::decode):
2528         (CoreIPC::sizeForNumberType):
2529         * Shared/cf/ArgumentCodersCF.h: Added.
2530         * WebKit2.xcodeproj/project.pbxproj:
2531
2532 2010-12-09  Brady Eidson  <beidson@apple.com>
2533
2534         Reviewed by Sam Weinig.
2535
2536         <rdar://problem/8749750> and https://bugs.webkit.org/show_bug.cgi?id=50786
2537         WK2 authentication never consults WebCore session credential storage.
2538
2539         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2540         (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Since we don't need to expose this as
2541           API at this time, always return true.
2542
2543 2010-12-09  Sam Weinig  <weinig@apple.com>
2544
2545         Reviewed by Alexey Proskuryakov.
2546
2547         WebKit2: Add support for access keys
2548         https://bugs.webkit.org/show_bug.cgi?id=49832
2549
2550         * WebProcess/WebPage/WebPage.cpp:
2551         (WebKit::handleKeyEvent): Match windows WebKit and call
2552         the event handler's for handleAccessKey function for
2553         system keys. This will never be hit on the Mac.
2554
2555 2010-12-09  Darin Adler  <darin@apple.com>
2556
2557         Qt build fix.
2558
2559         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Include "NotImplemented.h".
2560
2561 2010-12-09  Steve Falkenburg  <sfalken@apple.com>
2562
2563         Windows build fix.
2564         
2565         * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
2566
2567 2010-12-09  Brady Eidson  <beidson@apple.com>
2568
2569         Reviewed by Anders Carlsson.
2570
2571         <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
2572         WebKit2 ContextMenuClient support
2573
2574         Implement google search in a cross platform manner, and add a FIXME for download support:
2575         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2576         (WebKit::WebContextMenuClient::downloadURL):
2577         (WebKit::WebContextMenuClient::searchWithGoogle):
2578
2579         Mac implementations for speaking and searching:
2580         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Added.
2581         (WebKit::WebContextMenuClient::lookUpInDictionary): Add a FIXME for now.
2582         (WebKit::WebContextMenuClient::isSpeaking):
2583         (WebKit::WebContextMenuClient::speak):
2584         (WebKit::WebContextMenuClient::stopSpeaking):
2585         (WebKit::WebContextMenuClient::searchWithSpotlight):
2586
2587         Stubs for Win and Qt:
2588         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Added.
2589         (WebKit::WebContextMenuClient::lookUpInDictionary):
2590         (WebKit::WebContextMenuClient::isSpeaking):
2591         (WebKit::WebContextMenuClient::speak):
2592         (WebKit::WebContextMenuClient::stopSpeaking):
2593         * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
2594         (WebKit::WebContextMenuClient::lookUpInDictionary):
2595         (WebKit::WebContextMenuClient::isSpeaking):
2596         (WebKit::WebContextMenuClient::speak):
2597         (WebKit::WebContextMenuClient::stopSpeaking):
2598
2599         Project file stuffs:
2600         * WebKit2.pro:
2601         * WebKit2.xcodeproj/project.pbxproj:
2602         * win/WebKit2.vcproj:
2603
2604 2010-12-09  Anders Carlsson  <andersca@apple.com>
2605
2606         Reviewed by Sam Weinig.
2607
2608         Don't leak the PDFDocument
2609         https://bugs.webkit.org/show_bug.cgi?id=50771
2610
2611         * UIProcess/API/mac/PDFViewController.mm:
2612         (WebKit::PDFViewController::setPDFDocumentData):
2613
2614 2010-12-09  Anders Carlsson  <andersca@apple.com>
2615
2616         Reviewed by Sam Weinig.
2617
2618         Add a basic implementation of PDF support on Mac
2619         https://bugs.webkit.org/show_bug.cgi?id=50768
2620
2621         * UIProcess/API/mac/PDFViewController.h:
2622         * UIProcess/API/mac/PDFViewController.mm: Added.
2623         (-[WKPDFView initWithFrame:PDFViewController:WebKit::]):
2624         Setup the view hierarchy.
2625
2626         (-[WKPDFView invalidate]):
2627         Set the controller to null.
2628
2629         (-[WKPDFView pdfView]):
2630         Return the PDF view.
2631
2632         (WebKit::PDFViewController::create):
2633         (WebKit::PDFViewController::PDFViewController):
2634         Create a WKPDFView and insert it as a subview of the WKView.
2635
2636         (WebKit::PDFViewController::~PDFViewController):
2637         Remove the WKPDFView from the view hierarchy and invalidate it.
2638
2639         (WebKit::convertPostScriptDataSourceToPDF):
2640         Convert the data in the data reference to PDF and return it as a CFDataRef.
2641
2642         (WebKit::PDFViewController::setPDFDocumentData):
2643         Create a PDFDocument and set it on the PDF view.
2644
2645         (WebKit::PDFViewController::pdfDocumentClass):
2646         (WebKit::PDFViewController::pdfPreviewViewClass):
2647         (WebKit::PDFViewController::pdfKitBundle):
2648         Add soft-linking helper functions.
2649
2650         * UIProcess/API/mac/PageClientImpl.mm:
2651         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2652         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2653         Call the WKView methods.
2654         
2655         * UIProcess/API/mac/WKView.mm:
2656         (-[WKView _setPageHasCustomRepresentation:]):
2657         Create a PDF view controller if necessary.
2658
2659         (-[WKView _didFinishLoadingDataForCustomRepresentation:CoreIPC::]):
2660         Pass the data along to the PDF view controller.
2661
2662         * WebKit2.xcodeproj/project.pbxproj:
2663         Add new files.
2664
2665 2010-12-09  Anders Carlsson  <andersca@apple.com>
2666
2667         Reviewed by Sam Weinig.
2668
2669         Add support for custom representation
2670         https://bugs.webkit.org/show_bug.cgi?id=50767
2671
2672         * Shared/WebProcessCreationParameters.cpp:
2673         (WebKit::WebProcessCreationParameters::encode):
2674         (WebKit::WebProcessCreationParameters::decode):
2675         * Shared/WebProcessCreationParameters.h:
2676         Add mimeTypesWithCustomRepresentation and encode and decode accordingly.
2677
2678         * UIProcess/API/mac/PageClientImpl.h:
2679         * UIProcess/API/mac/PageClientImpl.mm:
2680         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2681         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2682         Add empty stubs for now.
2683
2684         * UIProcess/API/qt/qwkpage.cpp:
2685         (QWKPagePrivate::didCommitLoadForMainFrame):
2686         (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
2687         * UIProcess/API/qt/qwkpage_p.h:
2688         Add empty stubs.
2689
2690         * UIProcess/PageClient.h:
2691         Add new functions for custom representations.
2692
2693         * UIProcess/WebFrameProxy.cpp:
2694         (WebKit::WebFrameProxy::canShowMIMEType):
2695         Check that the mime type is not null.
2696
2697         * UIProcess/WebPageProxy.cpp:
2698         (WebKit::WebPageProxy::didCommitLoadForFrame):
2699         This now takes an additional frameHasCustomRepresentation parameter. 
2700         Call the page client function.
2701
2702         (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
2703         Call the page client function.
2704
2705         * UIProcess/WebPageProxy.messages.in:
2706         Change DidCommitLoadForFrame message, add DidFinishLoadingDataForCustomRepresentation message.
2707
2708         * UIProcess/mac/WebContextMac.mm:
2709         (WebKit::WebContext::platformInitializeWebProcess):
2710         We want to use custom representations for PDF and PostScript MIME types.
2711
2712         * UIProcess/win/WebView.cpp:
2713         (WebKit::WebView::didCommitLoadForMainFrame):
2714         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
2715         * UIProcess/win/WebView.h:
2716         Add stubs.
2717
2718         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2719         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
2720         Initialize m_frameHasCustomRepresentation.
2721
2722         (WebKit::WebFrameLoaderClient::hasHTMLView):
2723         The frame has a HTML view unless it has a custom representation.
2724
2725         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2726         Pass along whether the frame has a custom representation.
2727
2728         (WebKit::WebFrameLoaderClient::committedLoad):
2729         Don't send data back to WebCore if the frame has a custom representation.
2730
2731         (WebKit::WebFrameLoaderClient::finishedLoading):
2732         Send all the data to the UI process.
2733
2734         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2735         Update the m_frameHasCustomRepresentation state based on the MIME type.
2736
2737         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2738         (WebKit::WebFrameLoaderClient::frameHasCustomRepresentation):
2739         Add getter.
2740
2741         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
2742         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2743         Don't do any painting if the main frame has a custom representation.
2744
2745         * WebProcess/WebProcess.cpp:
2746         (WebKit::WebProcess::initializeWebProcess):
2747         Add all the MIME types with custom representations.
2748
2749         * WebProcess/WebProcess.h:
2750         (WebKit::WebProcess::shouldUseCustomRepresentationForMIMEType):
2751         Add getter.
2752
2753 2010-12-09  Maciej Stachowiak  <mjs@apple.com>
2754
2755         Reviewed by Dan Bernstein.
2756
2757         Implement "Use Selection for Find" in WebKit2
2758         https://bugs.webkit.org/show_bug.cgi?id=50737
2759         <rdar://problem/8564881>
2760         
2761         * UIProcess/API/mac/WKView.mm: Add support for the takeFindStringFromSelection:
2762         selector as a command.
2763
2764 2010-12-09  Brady Eidson  <beidson@apple.com>
2765
2766         Reviewed by Maciej Stachowiak.
2767
2768         <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
2769         WebKit2 Authentication Support
2770
2771         Implement authentication-related coders:
2772         * Shared/WebCoreArgumentCoders.h:
2773
2774         Allow the ResourceResponse coders to handle null responses:
2775         * Shared/mac/WebCoreArgumentCodersMac.mm:
2776         (CoreIPC::encodeResourceResponse):
2777         (CoreIPC::decodeResourceResponse):
2778
2779         Add new API and Impl casts for ProtectionSpace and Credential enums:
2780         * UIProcess/API/C/WKAPICast.h:
2781         (WebKit::toAPI):
2782         (WebKit::toCredentialPersistence):
2783
2784         Move the DecisionListener to be accessed off the challenge itself, and fill in other
2785         necessary API:
2786         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
2787         (WKAuthenticationChallengeGetDecisionListener):
2788         (WKAuthenticationChallengeGetProtectionSpace):
2789         (WKAuthenticationChallengeGetProposedCredential):
2790         (WKAuthenticationChallengeGetPreviousFailureCount):
2791         * UIProcess/API/C/WKAuthenticationChallenge.h:
2792         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2793         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
2794         (WebKit::AuthenticationChallengeProxy::proposedCredential):
2795         (WebKit::AuthenticationChallengeProxy::protectionSpace):
2796         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2797         (WebKit::AuthenticationChallengeProxy::previousFailureCount):
2798
2799         Fill in some credential API:
2800         * UIProcess/API/C/WKCredential.cpp:
2801         (WKCredentialCreate):
2802         (WKCredentialCopyUser):
2803         * UIProcess/API/C/WKCredential.h:
2804         * UIProcess/API/C/WKCredentialTypes.h: Added.
2805         * UIProcess/Authentication/WebCredential.cpp:
2806         (WebKit::WebCredential::WebCredential):
2807         (WebKit::WebCredential::user):
2808         * UIProcess/Authentication/WebCredential.h:
2809         (WebKit::WebCredential::create):
2810
2811         Fill in some protection space API:
2812         * UIProcess/API/C/WKProtectionSpace.cpp:
2813         (WKProtectionSpaceCopyHost):
2814         (WKProtectionSpaceGetPort):
2815         (WKProtectionSpaceCopyRealm):
2816         (WKProtectionSpaceGetIsProxy):
2817         (WKProtectionSpaceGetServerType):
2818         (WKProtectionSpaceGetReceivesCredentialSecurely):
2819         (WKProtectionSpaceGetAuthenticationScheme):
2820         * UIProcess/API/C/WKProtectionSpace.h:
2821         * UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
2822         * UIProcess/Authentication/WebProtectionSpace.cpp:
2823         (WebKit::WebProtectionSpace::WebProtectionSpace):
2824         (WebKit::WebProtectionSpace::host):
2825         (WebKit::WebProtectionSpace::port):
2826         (WebKit::WebProtectionSpace::realm):
2827         (WebKit::WebProtectionSpace::isProxy):
2828         (WebKit::WebProtectionSpace::serverType):
2829         (WebKit::WebProtectionSpace::receivesCredentialSecurely):
2830         (WebKit::WebProtectionSpace::authenticationScheme):
2831         * UIProcess/Authentication/WebProtectionSpace.h:
2832
2833         Change the authentication challenge callback to reflect the new ownership of
2834         the DecisionListener:
2835         * UIProcess/API/C/WKPage.h:
2836         * UIProcess/WebLoaderClient.cpp:
2837         (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
2838         * UIProcess/WebLoaderClient.h:
2839         * UIProcess/WebPageProxy.cpp:
2840         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
2841
2842         * WebKit2.pro:
2843         * WebKit2.xcodeproj/project.pbxproj:
2844         * win/WebKit2.vcproj:
2845         * win/WebKit2Generated.make:
2846
2847 2010-12-08  Sam Weinig  <sam@webkit.org>
2848
2849         Reviewed by Geoffrey "Error" Garen.
2850
2851         Fix typo: Diplaying -> Displaying
2852
2853         * UIProcess/API/C/WKFrame.cpp:
2854         (WKFrameIsDisplayingStandaloneImageDocument):
2855         (WKFrameIsDisplayingMarkupDocument):
2856         * UIProcess/API/C/WKFrame.h:
2857         * UIProcess/WebFrameProxy.cpp:
2858         (WebKit::WebFrameProxy::canProvideSource):
2859         (WebKit::WebFrameProxy::isDisplayingStandaloneImageDocument):
2860         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
2861         * UIProcess/WebFrameProxy.h:
2862
2863 2010-12-08  Sam Weinig  <sam@webkit.org>
2864
2865         Reviewed by Gavin Barraclough.
2866
2867         Add WebKit2 Preference for TabsToLinks behavior.
2868         <rdar://problem/8664263>
2869
2870         * Shared/WebPreferencesStore.h:
2871         * UIProcess/API/C/WKPreferences.cpp:
2872         (WKPreferencesSetTabsToLinks):
2873         (WKPreferencesGetTabsToLinks):
2874         * UIProcess/API/C/WKPreferences.h:
2875         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2876         (WebKit::WebChromeClient::tabsToLinks):
2877         * WebProcess/WebPage/WebPage.cpp:
2878         (WebKit::WebPage::WebPage):
2879         (WebKit::WebPage::updatePreferences):
2880         * WebProcess/WebPage/WebPage.h:
2881         (WebKit::WebPage::tabsToLinks):
2882
2883 2010-12-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
2884
2885         Reviewed by Andreas Kling.
2886
2887         WebTouchEvent::isTouchEventType() does not take into account the type TouchCancel
2888         https://bugs.webkit.org/show_bug.cgi?id=50680
2889
2890         Add the missing type check to WebTouchEvent::isTouchEventType().
2891
2892         * Shared/WebTouchEvent.cpp:
2893         (WebKit::WebTouchEvent::isTouchEventType):
2894
2895 2010-12-08  Sam Weinig  <sam@webkit.org>
2896
2897         Reviewed by Darin Adler.
2898
2899         Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
2900         https://bugs.webkit.org/show_bug.cgi?id=50726
2901
2902         Adds WKBundleNodeHandleCopyDocumentFrame, WKBundleNodeHandleCopyHTMLFrameElementContentFrame
2903         and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame, to handle the document, <frame>
2904         and <iframe> cases.
2905
2906         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2907         (WKBundleNodeHandleCopyDocumentFrame):
2908         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
2909         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
2910         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2911         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2912         (WebKit::InjectedBundleNodeHandle::copyDocumentFrame):
2913         (WebKit::InjectedBundleNodeHandle::copyHTMLFrameElementContentFrame):
2914         (WebKit::InjectedBundleNodeHandle::copyHTMLIFrameElementContentFrame):
2915         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2916
2917 2010-12-08  Sam Weinig  <sam@webkit.org>
2918
2919         Reviewed by Gavin Barraclough.
2920
2921         Need a WebKit2 way to test whether a frame is displaying a standalone image
2922         <rdar://problem/8443059>
2923         WebKit2: Need a way to test whether a page or frame is showing HTML content
2924         <rdar://problem/8642563>
2925
2926         Add WKFrameIsDiplayingStandaloneImageDocument and WKFrameIsDiplayingMarkupDocument.
2927
2928         * UIProcess/API/C/WKFrame.cpp:
2929         (WKFrameIsDiplayingStandaloneImageDocument):
2930         (WKFrameIsDiplayingMarkupDocument):
2931         * UIProcess/API/C/WKFrame.h:
2932         * UIProcess/WebFrameProxy.cpp:
2933         (WebKit::WebFrameProxy::canProvideSource): This now just calls isDiplayingMarkupDocument.
2934         (WebKit::WebFrameProxy::isDiplayingStandaloneImageDocument):
2935         (WebKit::WebFrameProxy::isDiplayingMarkupDocument):
2936         * UIProcess/WebFrameProxy.h:
2937
2938 2010-12-08  Anders Carlsson  <andersca@apple.com>
2939
2940         Reviewed by Darin Adler.
2941
2942         WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
2943         https://bugs.webkit.org/show_bug.cgi?id=50724
2944
2945         * UIProcess/WebContext.cpp:
2946         (WebKit::WebContext::pdfAndPostScriptMIMETypes):
2947         * UIProcess/WebContext.h:
2948         * UIProcess/WebFrameProxy.cpp:
2949         (WebKit::WebFrameProxy::canShowMIMEType):
2950
2951 2010-12-08  Brian Weinstein  <bweinstein@apple.com>
2952
2953         Reviewed by Brady Eidson.
2954
2955         WebMenuTarget implemented in both WebKit and WebKit2
2956         https://bugs.webkit.org/show_bug.cgi?id=50665
2957         <rdar://problem/8742640>
2958         
2959         Rename WebMenuTarget to WKMenuTarget to prevent this warning and stay consistent with
2960         other WebKit2 namings.
2961
2962         * UIProcess/mac/WebContextMenuProxyMac.mm:
2963         (+[WKMenuTarget sharedMenuTarget]):
2964         (WebKit::nsMenuItemVector):
2965         (WebKit::WebContextMenuProxyMac::showContextMenu):
2966
2967 2010-12-08  Anders Carlsson  <andersca@apple.com>
2968
2969         Reviewed by Sam Weinig.
2970
2971         Move canShowMIMEType to Frame
2972         https://bugs.webkit.org/show_bug.cgi?id=50723
2973
2974         * UIProcess/API/C/WKFrame.cpp:
2975         (WKFrameCanShowMIMEType):
2976         * UIProcess/API/C/WKFrame.h:
2977         * UIProcess/API/C/WKPage.cpp:
2978         * UIProcess/API/C/WKPage.h:
2979         * UIProcess/WebFrameProxy.cpp:
2980         (WebKit::WebFrameProxy::canShowMIMEType):
2981         * UIProcess/WebFrameProxy.h:
2982
2983 2010-12-08  Sam Weinig  <sam@webkit.org>
2984
2985         Reviewed by Oliver Hunt.
2986
2987         Rename WKPreferencesGetFTPDirectoryTemplatePath to WKPreferencesCopyFTPDirectoryTemplatePath
2988         since it copies the value.
2989
2990         * UIProcess/API/C/WKPreferences.cpp:
2991         (WKPreferencesCopyFTPDirectoryTemplatePath):
2992         * UIProcess/API/C/WKPreferencesPrivate.h:
2993
2994 2010-12-08  Sam Weinig  <sam@webkit.org>
2995
2996         Reviewed by Brady Eidson.
2997
2998         WebKit2: Can't open ftp directory
2999         <rdar://problem/8489321>
3000
3001         * Shared/WebPreferencesStore.h:
3002         * UIProcess/API/C/WKPreferences.cpp:
3003         (WKPreferencesSetForceFTPDirectoryListings):
3004         (WKPreferencesGetForceFTPDirectoryListings):
3005         (WKPreferencesSetFTPDirectoryTemplatePath):
3006         (WKPreferencesGetFTPDirectoryTemplatePath):
3007         * UIProcess/API/C/WKPreferencesPrivate.h:
3008         * WebProcess/WebPage/WebPage.cpp:
3009         (WebKit::WebPage::updatePreferences):
3010         Pipe through the FTP directory listing preferences.
3011
3012 2010-12-08  Chris Marrin  <cmarrin@apple.com>
3013
3014         Reviewed by Simon Fraser.
3015
3016         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
3017         https://bugs.webkit.org/show_bug.cgi?id=49388
3018
3019         Fixes a build failure because WebChromeClient.cpp uses WebCore::Cursor.
3020         This patch adds an include of QuartzCore/CATransform3D, which includes
3021         a file that has a 'Cursor' object defined. So I had to qualify the
3022         use of Cursor in WebChromeClient.cpp.
3023
3024         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3025         (WebKit::WebChromeClient::setCursor):
3026
3027 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
3028
3029         Reviewed by John Sullivan.
3030
3031         Layering Violation in ContextMenu - member variable of type HitTestResult
3032         https://bugs.webkit.org/show_bug.cgi?id=50586
3033         
3034         Update users of ContextMenu and ContextMenuController to match where the new functions 
3035         are located.
3036
3037         * Shared/WebContextMenuItemData.cpp:
3038         (WebKit::WebContextMenuItemData::WebContextMenuItemData): Remove the call to checkOrEnableItem, that call will be made when
3039             the ContextMenuItem is added to the ContextMenu through the ContextMenuController.
3040         * WebProcess/WebPage/WebContextMenu.cpp:
3041         (WebKit::WebContextMenu::show):
3042
3043 2010-12-08  Jessie Berlin  <jberlin@apple.com>
3044
3045         Reviewed by Adam Roben.
3046
3047         WebKit2: Implement WebChromeClient::exceededDatabaseQuota
3048         https://bugs.webkit.org/show_bug.cgi?id=50656
3049
3050         The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous
3051         because the new quota is checked directly after exceededDatabaseQuota returns in order to
3052         determine if the new Database can be created.
3053
3054         Pass all of the details from the WebProcess to the UIProcess in order to inform the
3055         decision in the UIProcess about the new quota. In WebKit1, these details were
3056         fetched through an additional call to the API detailsForDatabase (which is infeasible in
3057         WebKit2 since exceededDatabaseQuota is a synchronous call).
3058
3059         * Platform/CoreIPC/HandleMessage.h:
3060         (CoreIPC::callMemberFunction):
3061         Add a version that takes 7 parameters.
3062
3063         * UIProcess/API/C/WKPage.h:
3064
3065         * UIProcess/API/qt/qwkpage.cpp:
3066         (QWKPage::QWKPage):
3067         Indicate that exceededDatabaseQuota is not implemented.
3068
3069         * UIProcess/WebPageProxy.cpp:
3070         (WebKit::WebPageProxy::exceededDatabaseQuota):
3071         Call the UIClient's exceededDatabaseQuota
3072         * UIProcess/WebPageProxy.h:
3073         * UIProcess/WebPageProxy.messages.in:
3074
3075         * UIProcess/WebUIClient.cpp:
3076         (WebKit::WebUIClient::exceededDatabaseQuota):
3077         If the client does not implement exceededDatabaseQuota, return a the current quota.
3078         * UIProcess/WebUIClient.h:
3079
3080         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3081         (WebKit::WebChromeClient::exceededDatabaseQuota):
3082         Send a synchronous message to the UIProcess to ask for the new quota for the origin for the
3083         given frame.
3084
3085 2010-12-07  Anders Carlsson  <andersca@apple.com>
3086
3087         Reviewed by Sam Weinig.
3088
3089         fast/loader/empty-embed-src-attribute.html asserts in debug builds
3090         https://bugs.webkit.org/show_bug.cgi?id=50643
3091
3092         Just always ignore attempts to load requests with empty URLs.
3093
3094         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3095         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3096
3097 2010-12-07  Jessie Berlin  <jberlin@apple.com>
3098
3099         Build fix. Unreviewed.
3100
3101         * WebKit2.pro:
3102         Added WebDatabaseManagerQt.cpp.
3103         * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Added.
3104         (WebKit::WebDatabaseManager::databaseDirectory):
3105         Added a FIXME to implement and return an empty string.
3106
3107 2010-12-07  Darin Adler  <darin@apple.com>
3108
3109         Get a bit closer to making Qt WebKit2 compile again.
3110
3111         * WebKit2.pro: Add the WebDatabaseManager source files.
3112         Still missing: The Qt version of the databaseDirectory function.
3113
3114 2010-12-07  Jessie Berlin  <jberlin@apple.com>
3115
3116         Reviewed by Darin Adler.
3117
3118         WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
3119         https://bugs.webkit.org/show_bug.cgi?id=50604
3120
3121         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Added.
3122         (WebKit::WebDatabaseManager::shared):
3123         (WebKit::WebDatabaseManager::WebDatabaseManager):
3124         Initialize the DatabaseTracker with the Database directory.
3125         * WebProcess/WebCoreSupport/WebDatabaseManager.h: Added.
3126         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Added.
3127         (WebKit::WebDatabaseManager::databaseDirectory):
3128         Copied from WebKitInitializeDatabasesIfNecessary in WebKit/mac/Storage/WebDatabaseManager.mm.
3129         * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Added.
3130         (WebKit::WebDatabaseManager::databaseDirectory):
3131         Copied from WebKitInitializeWebDatabasesIfNecessary in WebKit/win/WebDatabaseManager.cpp.
3132
3133         * WebProcess/WebProcess.cpp:
3134         (WebKit::WebProcess::WebProcess):
3135         Make sure that the Databases directory has been set by calling WebDatabaseManager::shared().
3136
3137         * WebKit2.xcodeproj/project.pbxproj:
3138         Add WebDatabaseManager.cpp/.h/Mac.cpp
3139         * win/WebKit2.vcproj:
3140         Add WebDatabaseManager.cpp/.h/Win.cpp
3141
3142 2010-12-06  Darin Adler  <darin@apple.com>
3143
3144         Reviewed by Sam Weinig.
3145
3146         Pass security origin to make local file decision correctly
3147         https://bugs.webkit.org/show_bug.cgi?id=48603
3148
3149         * WebProcess/Plugins/PluginView.cpp:
3150         (WebKit::PluginView::loadURL): Pass security origin.
3151         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3152         (WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.
3153
3154 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
3155
3156         Reviewed by Sam Weinig.
3157
3158         Fix two WebKit2 prefs issues.
3159
3160         * Shared/WebPreferencesStore.h: Include font-family preferences
3161         in the FOR_EACH_WEBKIT_STRING_PREFERENCE macro, actually propagating
3162         font family prefs to WebCore settings.
3163         
3164         * UIProcess/WebPageGroup.cpp:
3165         (WebKit::WebPageGroup::WebPageGroup):
3166         (WebKit::WebPageGroup::~WebPageGroup): Add and remove the WebPageGroup
3167         from the preference object it creates. This allows preference changes
3168         to actually be propagated to the web process.
3169
3170 2010-12-06  Anders Carlsson  <andersca@apple.com>
3171
3172         Reviewed by Sam Weinig.
3173
3174         The plug-in process crashes if it can't load the plug-in module
3175         https://bugs.webkit.org/show_bug.cgi?id=50601
3176         <rdar://problem/8692654>
3177
3178         * PluginProcess/PluginControllerProxy.cpp:
3179         (WebKit::PluginControllerProxy::initialize):
3180         Handle m_plugin being 0.
3181
3182         * PluginProcess/PluginProcess.cpp:
3183         (WebKit::PluginProcess::netscapePluginModule):
3184         Create the plug-in module if it doesn't exist.
3185
3186         (WebKit::PluginProcess::initialize):
3187         Store the plug-in path.
3188
3189         * PluginProcess/PluginProcess.h:
3190         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3191         (WebKit::NetscapePlugin::create):
3192         Return null if the plug-in module doesn't exist.
3193
3194         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3195         * WebProcess/WebPage/WebPage.cpp:
3196         (WebKit::WebPage::createPlugin):
3197         Simplify code.
3198
3199 2010-12-06  Anders Carlsson  <andersca@apple.com>
3200
3201         Reviewed by Sam Weinig.
3202
3203         WebProcess crash in NPRemoteObjectMap::invalidate when closing tab
3204         https://bugs.webkit.org/show_bug.cgi?id=50597
3205         <rdar://problem/8655584>
3206
3207         When invalidating the NPRemoteObjectMap, we don't want NPObjectMessageReceiver to
3208         release all objects NPObjects blindly because NPJSObjects have already been deallocated by the plug-in view.
3209
3210         This is not an ideal solution; an ideal solution would involve NPJSObjects notifying any NPObjectMessageReceiver objects
3211         that the NPJSObject is being destroyed. The NPObjectMessageReceiver could then simply null out the NPObject pointer.
3212
3213         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3214         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
3215         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
3216         * Shared/Plugins/NPObjectMessageReceiver.h:
3217         * Shared/Plugins/NPRemoteObjectMap.cpp:
3218         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
3219         (WebKit::NPRemoteObjectMap::invalidate):
3220         * Shared/Plugins/NPRemoteObjectMap.h:
3221         (WebKit::NPRemoteObjectMap::isInvalidating):
3222
3223 2010-12-06  Sam Weinig  <sam@webkit.org>
3224
3225         Reviewed by Anders Carlsson.
3226
3227         Generalize didChangeLocationWithinPageForFrame for all same document navigations
3228         https://bugs.webkit.org/show_bug.cgi?id=50584
3229
3230           - Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
3231           - Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
3232           - Call didSameDocumentNavigationForFrame for HTML session state changes.
3233
3234         * Shared/API/c/WKPageLoadTypes.h: Added.
3235         * Shared/API/c/WKSharedAPICast.h:
3236         (WebKit::toAPI):
3237         Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.
3238
3239         * Shared/SameDocumentNavigationType.h: Added.
3240         * UIProcess/API/C/WKAPICast.h:
3241         Moved WKFrameNavigationType conversion from here.
3242
3243         * UIProcess/API/C/WKPage.h:
3244         * UIProcess/API/qt/qwkpage.cpp:
3245         (QWKPage::QWKPage):
3246         Update comment.
3247
3248         * UIProcess/WebFrameProxy.cpp:
3249         (WebKit::WebFrameProxy::didSameDocumentNavigation):
3250         * UIProcess/WebFrameProxy.h:
3251         * UIProcess/WebLoaderClient.cpp:
3252         (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
3253         * UIProcess/WebLoaderClient.h:
3254         * UIProcess/WebPageProxy.cpp:
3255         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3256         * UIProcess/WebPageProxy.h:
3257         * UIProcess/WebPageProxy.messages.in:
3258         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3259         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3260         (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
3261         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3262         Pipe new name through.
3263
3264         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3265         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3266         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3267         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3268         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3269         Call didChangeLocationWithinPageForFrame for session state changes.
3270
3271         * WebKit2.pro:
3272         * WebKit2.xcodeproj/project.pbxproj:
3273         * win/WebKit2.vcproj:
3274         * win/WebKit2Generated.make:
3275         Add new files.
3276
3277 2010-12-06  Jessie Berlin  <jberlin@apple.com>
3278
3279         Reviewed by Dan Bernstein.
3280
3281         WebKit2: Expose the preference to enable or disable HTML5 Databases.
3282         https://bugs.webkit.org/show_bug.cgi?id=50411
3283
3284         * Shared/WebPreferencesStore.h:
3285         Make the preference to enable HTML5 Databases default ot true.
3286
3287         * UIProcess/API/C/WKPreferences.cpp:
3288         (WKPreferencesSetDatabasesEnabled):
3289         (WKPreferencesGetDatabasesEnabled):
3290         * UIProcess/API/C/WKPreferences.h:
3291
3292         * WebProcess/WebPage/WebPage.cpp:
3293         (WebKit::WebPage::updatePreferences):
3294         Set AbstractDatabase::isAvailable (mimicking how the preference is set in WebKit1).
3295
3296 2010-12-06  Mark Rowe  <mrowe@apple.com>
3297
3298         Build fix.
3299
3300         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3301         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Wrap Carbon-specific code in #ifndef NP_NO_CARBON.
3302
3303 2010-12-06  Anders Carlsson  <andersca@apple.com>
3304
3305         Reviewed by Adam Roben.
3306
3307         Add a shim for GetCurrentEventButtonState
3308         https://bugs.webkit.org/show_bug.cgi?id=50583
3309
3310         * PluginProcess/mac/PluginProcessMac.mm:
3311         (WebKit::getCurrentEventButtonState):
3312         Get the event button state from the plug-in.
3313
3314         (WebKit::PluginProcess::initializeShim):
3315         Add new shim callback.
3316
3317         * PluginProcess/mac/PluginProcessShim.cpp:
3318         (WebKit::shimGetCurrentEventButtonState):
3319         Add shim.
3320
3321         * PluginProcess/mac/PluginProcessShim.h:
3322         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3323         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3324         (WebKit::NetscapePlugin::buttonState):
3325         Return the button state.
3326
3327         (WebKit::NetscapePlugin::platformHandleMouseEvent):
3328         Update the button state. Also, make sure to actually pass the modifiers to NPP_HandleEvent.
3329         
3330
3331 2010-12-06  Anders Carlsson  <andersca@apple.com>
3332
3333         Reviewed by Adam Roben.
3334
3335         Add a shim for IsWindowActive
3336         https://bugs.webkit.org/show_bug.cgi?id=50582
3337
3338         * PluginProcess/mac/PluginProcessMac.mm:
3339         (WebKit::isWindowActive):
3340         Get the NetscapePlugin from the WindowRef and check if the plug-in's window is active.
3341
3342         (WebKit::PluginProcess::initializeShim):
3343         * PluginProcess/mac/PluginProcessShim.cpp        
3344         (WebKit::shimIsWindowActive):
3345         Call isWindowActive. If it returns true, return the result value. Otherwise, call the real
3346         IsWindowActive function.
3347
3348         * PluginProcess/mac/PluginProcessShim.h:
3349         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3350         (WebKit::NetscapePlugin::NetscapePlugin):
3351         Initialize m_isWindowactive.
3352
3353         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3354         (WebKit::NetscapePlugin::isWindowActive):
3355         Return whether the window is active.
3356
3357         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3358         (WebKit::windowMap):
3359         (WebKit::NetscapePlugin::platformPostInitialize):
3360         (WebKit::NetscapePlugin::platformDestroy):
3361         (WebKit::NetscapePlugin::netscapePluginFromWindow):
3362         Add a mapping between windows and the corresponding NetscapePlugin objects.
3363
3364         (WebKit::NetscapePlugin::windowFocusChanged):
3365         Update the window focus member variable.
3366
3367 2010-12-06  Anders Carlsson  <andersca@apple.com>
3368
3369         Reviewed by Dan Bernstein.
3370
3371         REGERSSION (r73310?): Contents of <select> popup menus are upside-down on Windows
3372         https://bugs.webkit.org/show_bug.cgi?id=50544
3373         <rdar://problem/8732336>
3374
3375         * Shared/BackingStore.cpp:
3376         * Shared/BackingStore.h:
3377         * Shared/cairo/BackingStoreCairo.cpp:
3378         Remove BackingStore::createFlippedGraphicsContext.
3379
3380         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
3381         (WebKit::WebPopupMenu::setUpPlatformData):
3382         Don't create a flipped graphics context.
3383
3384 2010-12-06  Anders Carlsson  <andersca@apple.com>
3385
3386         Reviewed by Dan Bernstein.
3387
3388         REGRESSION: Text in Find indicator is vertically flipped
3389         https://bugs.webkit.org/show_bug.cgi?id=50524
3390         <rdar://problem/8732978>
3391
3392         Don't flip the graphics context.
3393
3394         * UIProcess/FindIndicator.cpp:
3395         (WebKit::FindIndicator::draw):
3396
3397 2010-12-03  Anders Carlsson  <andersca@apple.com>
3398
3399         Reviewed by Sam Weinig.
3400
3401         Dispatch keyboard events in the Carbon event model
3402         https://bugs.webkit.org/show_bug.cgi?id=50503
3403
3404         * Shared/WebEvent.h:
3405         (WebKit::WebKeyboardEvent::macCharCode):
3406         * Shared/WebKeyboardEvent.cpp:
3407         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
3408         (WebKit::WebKeyboardEvent::encode):
3409         (WebKit::WebKeyboardEvent::decode):
3410         Add macCharCode field.
3411
3412         * Shared/mac/WebEventFactory.mm:
3413         (WebKit::WebEventFactory::createWebKeyboardEvent):
3414         * Shared/qt/WebEventFactoryQt.cpp:
3415         (WebKit::WebEventFactory::createWebKeyboardEvent):
3416         * Shared/win/WebEventFactory.cpp:
3417         (WebKit::WebEventFactory::createWebKeyboardEvent):
3418         Pass along the Mac char code.
3419         
3420         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3421         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
3422         Convert the event to a Carobn event.
3423
3424 2010-12-03  John Sullivan  <sullivan@apple.com>
3425
3426         Reviewed by Adam Roben.
3427
3428         https://bugs.webkit.org/show_bug.cgi?id=50504
3429         Expose some more WebCore settings in WebKit2 preferences
3430
3431         * Shared/WebPreferencesStore.h:
3432         Changed name of existing FOR_EACH_WEBKIT_STRING_PREFERENCE macro to
3433         FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE since it was all about platform-specific
3434         font families, and I'm now introducing a non-platform-spacific string, and
3435         I didn't want to put the new preference in two platform-specific lists. Then
3436         added a new FOR_EACH_WEBKIT_STRING_PREFERENCE to hold the new preference. Note
3437         that the other preferences exposed in this patch were already declared here.
3438         
3439         * UIProcess/API/C/WKPreferences.cpp:
3440         (WKPreferencesSetDefaultFontSize):
3441         New wrapper.
3442         (WKPreferencesGetDefaultFontSize):
3443         Ditto.
3444         (WKPreferencesSetDefaultFixedFontSize):
3445         Ditto.
3446         (WKPreferencesGetDefaultFixedFontSize):
3447         Ditto.
3448         (WKPreferencesSetDefaultTextEncodingName):
3449         Ditto.
3450         (WKPreferencesCopyDefaultTextEncodingName):
3451         Ditto.
3452         
3453         * UIProcess/API/C/WKPreferences.h:
3454         Declare new wrappers.
3455
3456 2010-12-05  Adam Roben  <aroben@apple.com>
3457
3458         Windows production build fix
3459
3460         Put spaces after trailing backslashes when setting
3461         %WebKitVSPropsRedirectionDir%. According to MSDN
3462         <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
3463
3464            A backslash ( \ ) followed by a newline character is interpreted as
3465            a space in the command; use a backslash at the end of a line to
3466            continue a command onto the next line. NMAKE interprets the
3467            backslash literally if any other character, including a space or
3468            tab, follows the backslash.
3469
3470         * win/WebKit2.make:
3471
3472 2010-12-04  Sam Weinig  <sam@webkit.org>
3473
3474         Reviewed by Jon Honeycutt.
3475
3476         WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
3477         https://bugs.webkit.org/show_bug.cgi?id=50511
3478
3479         Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
3480         updating the WebFrameProxy's URL on the way.
3481
3482         Test: PageLoadDidChangeLocationWithinPageForFrame
3483
3484         * UIProcess/API/C/WKPage.h:
3485         * UIProcess/API/qt/qwkpage.cpp:
3486         (QWKPage::QWKPage):
3487         * UIProcess/WebFrameProxy.cpp:
3488         (WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
3489         * UIProcess/WebFrameProxy.h:
3490         * UIProcess/WebLoaderClient.cpp:
3491         (WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
3492         * UIProcess/WebLoaderClient.h:
3493         * UIProcess/WebPageProxy.cpp:
3494         (WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
3495         * UIProcess/WebPageProxy.h:
3496         * UIProcess/WebPageProxy.messages.in:
3497         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3498         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3499         (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
3500         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
3501         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
3502         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3503         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3504         (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
3505         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3506
3507 2010-12-03  Timothy Hatcher  <timothy@apple.com>
3508
3509         Make the Web Inspector window show and be usable on Mac.
3510
3511         https://webkit.org/b/50490
3512
3513         Reviewed by Sam Weinig.
3514
3515         * UIProcess/WebInspectorProxy.cpp:
3516         (WebKit::WebInspectorProxy::invalidate): Call platformClose.
3517         (WebKit::WebInspectorProxy::didLoadInspectorPage): Call platformOpen.
3518         (WebKit::WebInspectorProxy::didClose): Call platformClose.
3519         * UIProcess/WebInspectorProxy.h:
3520         * UIProcess/WebInspectorProxy.messages.in: Added DidClose.
3521         * UIProcess/mac/WebInspectorProxyMac.mm:
3522         (-[WebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): Added.
3523         (-[WebInspectorProxyObjCAdapter windowWillClose:]): Added. Call WebInspectorProxy::close.
3524         (WebKit::WebInspectorProxy::platformOpen): Added.
3525         (WebKit::WebInspectorProxy::platformClose): Added.
3526         * UIProcess/qt/WebInspectorProxyQt.cpp:
3527         (WebKit::WebInspectorProxy::platformOpen): Added stub.
3528         (WebKit::WebInspectorProxy::platformClose): Added stub.
3529         * UIProcess/win/WebInspectorProxyWin.cpp:
3530         (WebKit::WebInspectorProxy::platformOpen): Added stub.
3531         (WebKit::WebInspectorProxy::platformClose): Added stub.
3532         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3533         (WebKit::WebInspectorClient::sendMessageToFrontend): Added more null checks to avoid a crash.
3534         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3535         (WebKit::WebInspectorFrontendClient::closeWindow): Call WebInspector::didClose.
3536         (WebKit::WebInspectorFrontendClient::disconnectFromBackend): Ditto.
3537         (WebKit::WebInspectorFrontendClient::sendMessageToBackend): Removed. This does not need to be
3538         implemented by our subclass since we are in a single process.
3539         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed sendMessageToBackend.
3540         * WebProcess/WebPage/WebInspector.cpp:
3541         (WebKit::WebInspector::didClose): Added. Send a DidClose message to the UI process.
3542         * WebProcess/WebPage/WebInspector.h:
3543
3544 2010-12-03  Anders Carlsson  <andersca@apple.com>
3545
3546         Reviewed by Sam Weinig and Dan Bernstein.
3547
3548         Clean up the BackingStore implementation
3549         https://bugs.webkit.org/show_bug.cgi?id=50498
3550
3551         * Shared/BackingStore.cpp:
3552         (WebKit::BackingStore::create):
3553         (WebKit::BackingStore::createSharable):
3554         (WebKit::BackingStore::resize):
3555         Use new numBytesForSize helper function.
3556
3557         (WebKit::BackingStore::createFlippedGraphicsContext):
3558         Make this function platform independent.
3559
3560         * Shared/BackingStore.h:
3561         (WebKit::BackingStore::numBytesForSize):
3562         Given a size, return the number of bytes needed for it.
3563
3564         (WebKit::BackingStore::sizeInBytes):
3565         Implement.
3566
3567         * Shared/cg/BackingStoreCG.cpp:
3568         (WebKit::BackingStore::paint):
3569         Don't use CGBitmapContextCreateImage; it creates an extra copy of the image data.
3570
3571         * Shared/qt/BackingStoreQt.cpp:
3572         Remove createFlippedGraphicsContext.
3573
3574 2010-12-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
3575
3576         Reviewed by Laszlo Gombos.
3577
3578         [Qt] [WK2] Build system improvements for non-Unix targets
3579         https://bugs.webkit.org/show_bug.cgi?id=50257
3580
3581         * DerivedSources.pro:
3582         Fix dir seperator errors on Windows build host. Thanks to Laszlo Gombos.
3583
3584 2010-12-03  Sam Weinig  <sam@webkit.org>
3585
3586         Reviewed by Maciej Stachowiak.
3587
3588         Enable <a ping> for Mac/Windows/WebKit2 builds
3589         <rdar://problem/8504473>
3590         https://bugs.webkit.org/show_bug.cgi?id=50488
3591
3592         * Shared/WebPreferencesStore.h:
3593         * UIProcess/API/C/WKPreferences.cpp: