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