bca889b044e4f4281cd939a68fd79995bc7d91ac
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-02-13  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Messages waited on are never dispatched
6         https://bugs.webkit.org/show_bug.cgi?id=54362
7         <rdar://problem/8995051>
8
9         * Platform/CoreIPC/Connection.cpp:
10         (CoreIPC::Connection::processIncomingMessage):
11         Get the argument encoder from the incoming message.
12
13 2011-02-13  Jeremy Moskovich  <jeremy@chromium.org>
14
15         Reviewed by Adam Barth.
16
17         Add a compile-time option to completely disable WebArchive support.
18         https://bugs.webkit.org/show_bug.cgi?id=52712
19
20         Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
21
22         * WebProcess/WebPage/WebPage.cpp:
23         (WebKit::WebPage::updatePreferences):
24
25 2011-02-13  Alexey Proskuryakov  <ap@apple.com>
26
27         Reviewed by Dan Bernstein.
28
29         https://bugs.webkit.org/show_bug.cgi?id=54348
30         Crash when printing a document with no pages
31
32         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPagesToPDF): Don't fail on a fake
33         page that computePagesForPrinting() added to a pageless document.
34
35 2011-02-13  Chris Fleizach  <cfleizach@apple.com>
36
37         Reviewed and landed by Sam Weinig.
38
39         AX: Update WK2 usage of remote accessibility api
40         https://bugs.webkit.org/show_bug.cgi?id=54220
41
42         Rename some of the remote accessibility methods to be more accurate.
43         Make sure to unregister the AccessibilityWebPageObject on dealloc.
44         Send the window remote token along with the WKView remote token.
45
46         * UIProcess/API/mac/PageClientImpl.h:
47         * UIProcess/API/mac/PageClientImpl.mm:
48         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
49         * UIProcess/API/mac/WKView.mm:
50         (-[WKView _updateRemoteAccessibilityRegistration:]):
51         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
52         (-[WKView viewDidMoveToWindow]):
53         (-[WKView _processDidCrash]):
54         (-[WKView _pageClosed]):
55         (-[WKView _setAccessibilityWebProcessToken:]):
56         * UIProcess/API/mac/WKViewInternal.h:
57         * UIProcess/PageClient.h:
58         * UIProcess/WebPageProxy.cpp:
59         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
60         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
61         * UIProcess/WebPageProxy.h:
62         * UIProcess/WebPageProxy.messages.in:
63         * WebProcess/WebPage/WebPage.h:
64         * WebProcess/WebPage/WebPage.messages.in:
65         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
66         (-[AccessibilityWebPageObject dealloc]):
67         * WebProcess/WebPage/mac/WebPageMac.mm:
68         (WebKit::WebPage::platformInitialize):
69         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
70
71 2011-02-11  Alexey Proskuryakov  <ap@apple.com>
72
73         Reviewed by Anders Carlsson.
74
75         https://bugs.webkit.org/show_bug.cgi?id=54335
76         <rdar://problem/8895141> Make window.print() work with WebKit2
77
78         * Platform/CoreIPC/Connection.h: Corrected a typo in FIXME comment.
79
80         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
81         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
82         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
83         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
84         * UIProcess/TiledDrawingAreaProxy.cpp:
85         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
86         (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
87         (WebKit::TiledDrawingAreaProxy::takeSnapshot):
88         (WebKit::TiledDrawingAreaProxy::removeTile):
89         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
90         (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
91         (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
92         (WebKit::LayerBackedDrawingAreaProxy::update):
93         * UIProcess/WebContext.cpp:
94         (WebKit::WebContext::ensureWebProcess):
95         (WebKit::WebContext::postMessageToInjectedBundle):
96         Updated for send() -> deprecatedSend() rename.
97
98         * UIProcess/WebPageProxy.h:
99         * UIProcess/WebPageProxy.cpp:
100         (WebKit::WebPageProxy::WebPageProxy): Added a flag that's true while serving window.print().
101         (WebKit::WebPageProxy::printFrame): Set and unset m_isPerformingDOMPrintOperation.
102         (WebKit::WebPageProxy::beginPrinting): Force message processing in web process when serving
103         window.print().
104         (WebKit::WebPageProxy::endPrinting): Ditto.
105         (WebKit::WebPageProxy::computePagesForPrinting): Ditto.
106         (WebKit::WebPageProxy::drawRectToPDF): Ditto.
107         (WebKit::WebPageProxy::drawPagesToPDF): Ditto.
108
109         * UIProcess/WebProcessProxy.cpp:
110         (WebKit::WebProcessProxy::~WebProcessProxy):
111         (WebKit::WebProcessProxy::sendMessage):
112         (WebKit::WebProcessProxy::didFinishLaunching):
113         When waiting for a web process to launch, store message flags, too. This is not practically
114         important for DispatchMessageEvenWhenWaitingForSyncReply, but it's easier to store flags
115         than to remember about this pitfall.
116
117         * UIProcess/WebProcessProxy.h:
118         (WebKit::WebProcessProxy::send): Added a flags argument, matching Connection::send().
119         (WebKit::WebProcessProxy::deprecatedSend): Renamed one of send() overloads, because it was
120         conflicting with the other one after adding a flags argument. This matches a change previously
121         made to CoreIPC::Connection.
122
123 2011-02-12  Chris Marrin  <cmarrin@apple.com>
124
125         Reviewed by Dan Bernstein.
126
127         Crash in RenderLayerCompositor::updateCompositingLayers when loading some sites
128         https://bugs.webkit.org/show_bug.cgi?id=54345
129
130         Some sites flip between composited and non-comosited state while loading. When the timing is
131         right, when we flip out of compositing we will need to do a display while tossing all the
132         compositing layers. This causes us to reenter RenderLayerCompositor::computeCompositingRequirements()
133         while we are in the middle of tossing layers, which leads to a crash.
134
135         The solution is to defer the logic of exiting compositing mode until the DrawingArea is finished
136         doing its display, using a timer.
137
138         * WebProcess/WebPage/DrawingAreaImpl.cpp:
139         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
140         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
141         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
142         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
143         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
144         * WebProcess/WebPage/DrawingAreaImpl.h:
145
146 2011-02-12  Kevin Decker  <kdecker@apple.com>
147
148         Reviewed by Dan Bernstein.
149
150         Follow up fix to:
151         https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates
152
153         * WebProcess/WebPage/WebPage.cpp:
154         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Fixed the order of the scale and translate.
155
156 2011-02-12  Kevin Decker  <kdecker@apple.com>
157
158         Reviewed by Dan Bernstein.
159
160         https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates
161         <rdar://problem/8990069>
162         
163         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
164         (WKBundlePageCreateScaledSnapshotInDocumentCoordinates): Added.
165         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added above new function.
166         * WebProcess/WebPage/WebPage.cpp:
167         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Added.
168         (WebKit::WebPage::snapshotInDocumentCoordinates): Call scaledSnapshotInDocumentCoordinates with a scale of 1.
169         * WebProcess/WebPage/WebPage.h: Added scaledSnapshotInDocumentCoordinates().
170
171 2011-02-11  Anders Carlsson  <andersca@apple.com>
172
173         Reviewed by Maciej Stachowiak.
174
175         Can’t open local files on reload or navigation from the back/forward cache
176         https://bugs.webkit.org/show_bug.cgi?id=54332
177         <rdar://problem/8903076>
178
179         * UIProcess/WebInspectorProxy.cpp:
180         (WebKit::WebInspectorProxy::isInspectorPage):
181         * UIProcess/WebInspectorProxy.h:
182         Check whether the given page is a web inspector page.
183
184         * UIProcess/WebPageProxy.cpp:
185         (WebKit::WebPageProxy::initializeSandboxExtensionHandle):
186         If this is a web inspector page, we don't want to make a sandbox extension.
187
188         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
189         (WebKit::WebPageProxy::goForward):
190         (WebKit::WebPageProxy::goBack):
191         (WebKit::WebPageProxy::goToBackForwardItem):
192         Pass a sandbox extension along when sending the message.
193
194         * UIProcess/WebPageProxy.h:
195         Make initializeSandboxExtensionHandle a member function.
196
197         * UIProcess/cf/WebPageProxyCF.cpp:
198         (WebKit::WebPageProxy::restoreFromSessionStateData):
199         Pass a sandbox extension along.
200
201         * WebProcess/WebPage/WebPage.cpp:
202         (WebKit::WebPage::goForward):
203         (WebKit::WebPage::goBack):
204         (WebKit::WebPage::goToBackForwardItem):
205         Hand the sandbox extension to the sandbox extension tracker.
206
207         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
208         Pass the sandbox extension to goToBackForwardItem.
209
210         (WebKit::shouldReuseCommittedSandboxExtension):
211         New function that checks whether a committed sandbox extension should be re-used. We
212         do this for page reloads, as well as regular page navigations when both the committed
213         and provisional documents have file URLs.
214
215         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
216         Reuse the committed sandbox extension if necessary.
217
218         * WebProcess/WebPage/WebPage.h:
219         * WebProcess/WebPage/WebPage.messages.in:
220
221 2011-02-11  Anders Carlsson  <andersca@apple.com>
222
223         Fix Snow Leopard build.
224
225         * PluginProcess/PluginProcess.cpp:
226         (WebKit::PluginProcess::didFailToSendSyncMessage):
227         * WebProcess/WebProcess.cpp:
228         (WebKit::WebProcess::didFailToSendSyncMessage):
229
230 2011-02-11  Yael Aharon  <yael.aharon@nokia.com>
231
232         Unreviewed Qt webkit2 build fix after r78392.
233
234         * WebProcess/WebProcess.h:
235
236 2011-02-11  Anders Carlsson  <andersca@apple.com>
237
238         Reviewed by Sam Weinig.
239
240         WebProcess hung communicating with the plug-in process
241         https://bugs.webkit.org/show_bug.cgi?id=54328
242         <rdar://problem/8854075>
243
244         * UIProcess/Plugins/PluginProcessProxy.cpp:
245         (WebKit::PluginProcessProxy::createWebProcessConnection):
246         Add the DispatchMessageEvenWhenWaitingForSyncReply message send flag when sending the
247         PluginProcess::CreateWebProcessConnection message, since the plug-in process can be busy waiting
248         for a sync reply from the web process.
249
250 2011-02-11  Anders Carlsson  <andersca@apple.com>
251
252         Reviewed by Sam Weinig.
253
254         Incoming synchronous messages should always be processed regardless of connection waiting for a reply
255         https://bugs.webkit.org/show_bug.cgi?id=54326
256
257         * Platform/CoreIPC/Connection.cpp:
258         (CoreIPC::Connection::SyncMessageState::getOrCreate):
259         Assert that the map has a non-null SyncMessageState object.
260
261         (CoreIPC::Connection::SyncMessageState::SyncMessageState):
262         Initialize m_waitForSyncReplyCount.
263
264         (CoreIPC::Connection::SyncMessageState::beginWaitForSyncReply):
265         Increment m_waitForSyncReplyCount.
266
267         (CoreIPC::Connection::SyncMessageState::endWaitForSyncReply):
268         Decrement m_waitForSyncReplyCount. If it's 0, enqueue any incoming sync messages.
269
270         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
271         If this is a message that needs to be dispatched, add it to the queue and wake up the client run loop.
272
273         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
274         Go through the queue of incoming messages and dispatch them.
275
276         (CoreIPC::Connection::sendSyncMessage):
277         call beginWaitForSyncReply/endWaitForSyncReply.
278
279         (CoreIPC::Connection::waitForSyncReply):
280         Dispatch messages.
281
282         (CoreIPC::Connection::processIncomingMessage):
283         Call SyncMessageState::processIncomingMessage.
284
285         (CoreIPC::Connection::enqueueIncomingMessage):
286         Add helper function for enqueuing an incoming message.
287
288         * Platform/CoreIPC/Connection.h:
289         (CoreIPC::Connection::Message::destinationID):
290
291 2011-02-11  Sam Weinig  <sam@webkit.org>
292
293         Reviewed by Maciej Stachowiak.
294
295         WebKit2: Going to Ars Technica crashes WebProcess in WebCore::ResourceRequestBase::url() const + 9
296         <rdar://problem/8978832>
297
298         Speculative fix for crash accessing a bad ResourceRequest in policy
299         client code. Remove early returns from dispatchDecidePolicyForMIMEType 
300         and dispatchDecidePolicyForNavigationAction that are not present in the WebKit1
301         equivalent code. This should be safe, now that the IPC calls are synchronous.
302
303         Also removes some invalid assertions in WebFrameProxy that were getting hit. It is okay
304         for the url to empty.
305
306         * UIProcess/WebFrameProxy.cpp:
307         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
308         (WebKit::WebFrameProxy::didFailProvisionalLoad):
309         (WebKit::WebFrameProxy::didFailLoad):
310         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
311         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
312         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
313
314 2011-02-11  Alexey Proskuryakov  <ap@apple.com>
315
316         Reviewed by Darin Adler and Anders Carlsson.
317
318         https://bugs.webkit.org/show_bug.cgi?id=53593
319         <rdar://problem/8948380> Crash beneath HistoryController::recursiveSetProvisionalItem in web
320         process (preceded by assertion failure) if UI process exits while 
321         Messages::WebPage::RestoreSessionAndNavigateToCurrentItem is being handled
322
323         Can't test exiting the UI process.
324
325         * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage):
326         * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::Client::didFailToSendSyncMessage):
327         Notify connection client when the connection fails to send a sync message.
328
329         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didFailToSendSyncMessage):
330         * WebProcess/WebProcess.h:
331         Quit the web process immediately if it tried to send a sync message to a dead UI process.
332         It never needs to continue and handle an unexpected null "reply".
333
334         * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didFailToSendSyncMessage):
335         * PluginProcess/PluginProcess.h:
336         Ditto. There is no need for a plug-in to keep running even briefly if it couldn't get a
337         reply to a sync message.
338
339 2011-02-11  Anders Carlsson  <andersca@apple.com>
340
341         Reviewed by Sam Weinig.
342
343         Add a way to send async messages that can't get out of order with sync ones
344         https://bugs.webkit.org/show_bug.cgi?id=54319
345         <rdar://problem/8894844>
346
347         * Platform/CoreIPC/Connection.cpp:
348         (CoreIPC::Connection::sendMessage):
349         sendMessage now takes a messageSendFlags. Update the messageID if the
350         messageSendFlags contain DispatchMessageEvenWhenWaitingForSyncReply.
351
352         (CoreIPC::Connection::waitForSyncReply):
353         Process asynchronous messages as well.
354
355         (CoreIPC::Connection::processIncomingMessage):
356         Check if a message should be dispatched even when we're waiting for a
357         synchronous reply.
358
359         * Platform/CoreIPC/Connection.h:
360         (CoreIPC::Connection::send):
361         Send now takes a messageSendFlags parameter.
362
363         * Platform/CoreIPC/MessageID.h:
364         (CoreIPC::MessageID::messageIDWithAddedFlags):
365         Return a new MessageID object with the given flags added.
366
367         (CoreIPC::MessageID::shouldDispatchMessageWhenWaitingForSyncReply):
368         Add getter.
369
370 2011-02-11  Sam Weinig  <sam@webkit.org>
371
372         Reviewed by Anders Carlsson.
373
374         Crash with dynamic popup menu use
375         <rdar://problem/8716952>
376
377         Invalidate popup menus when forcing them closed, since they might still be
378         in their tracking loop.
379
380         * UIProcess/WebPageProxy.cpp:
381         (WebKit::WebPageProxy::showPopupMenu):
382         (WebKit::WebPageProxy::hidePopupMenu):
383         * UIProcess/WebPopupMenuProxy.h:
384         (WebKit::WebPopupMenuProxy::invalidate):
385         * UIProcess/mac/WebPopupMenuProxyMac.mm:
386         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
387         * UIProcess/win/WebPopupMenuProxyWin.cpp:
388         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
389         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
390
391 2011-02-11  Anders Carlsson  <andersca@apple.com>
392
393         Reviewed by Adam Roben.
394
395         Actually initialize m_syncMessageState.
396
397         * Platform/CoreIPC/Connection.cpp:
398         (CoreIPC::Connection::Connection):
399
400 2011-02-11  Anders Carlsson  <andersca@apple.com>
401
402         Reviewed by Adam Roben.
403
404         Move the binary semaphore into SyncMessageState
405         https://bugs.webkit.org/show_bug.cgi?id=54311
406
407         With this change, all connections that belong to the same run loop will use same binary semaphore.
408         This is in preparation for making any connection be able to wakeup the client run loop.
409
410         * Platform/CoreIPC/Connection.cpp:
411         (CoreIPC::Connection::SyncMessageState::wakeUpClientRunLoop):
412         (CoreIPC::Connection::SyncMessageState::wait):
413         (CoreIPC::Connection::waitForSyncReply):
414         (CoreIPC::Connection::processIncomingMessage):
415         (CoreIPC::Connection::connectionDidClose):
416         * Platform/CoreIPC/Connection.h:
417
418 2011-02-11  Anders Carlsson  <andersca@apple.com>
419
420         Reviewed by Adam Roben.
421
422         Add a SyncMessageState class to CoreIPC::Connection
423         https://bugs.webkit.org/show_bug.cgi?id=54309
424
425         SyncMessageState objects are shared between all connections scheduled on
426         a given run loop. It will be used to keep track of state when waiting
427         for replies for a synchronous message.
428
429         * Platform/CoreIPC/Connection.cpp:
430         (CoreIPC::Connection::SyncMessageState::syncMessageStateMap):
431         (CoreIPC::Connection::SyncMessageState::syncMessageStateMapMutex):
432         Add a global RunLoop -> SyncMessageState map and a mutex for locking.
433
434         (CoreIPC::Connection::SyncMessageState::getOrCreate):
435         Look in the map for an existing SyncMessageState object and create a new
436         one if none is found.
437
438         (CoreIPC::Connection::SyncMessageState::SyncMessageState):
439         Initialize m_runLoop.
440
441         (CoreIPC::Connection::SyncMessageState::~SyncMessageState):
442         Remove the object from the map.
443
444 2011-02-11  Enrica Casucci  <enrica@apple.com>
445
446         Reviewed by Darin Adler.
447
448         crashes in WebProcess at WebCore::Range::startPosition const + 16
449         https://bugs.webkit.org/show_bug.cgi?id=54294
450         <rdar://problem/8982710>
451         
452         I don't have a repro case for this bugs, but the side-by-side
453         comparison of the IME support implementation in WebKit and WebKi2
454         shows a missing null check on a Range that could very well explain
455         this crash.
456         I tried running platform/mac/editing/input tests with a version of WebKit
457         without the null check and I can reproduce a crash with the same signature.
458         These tests are not yet enabled for WebKit2.
459
460         * WebProcess/WebPage/mac/WebPageMac.mm:
461         (WebKit::WebPage::firstRectForCharacterRange):
462
463 2011-02-11  Jeff Miller  <jeffm@apple.com>
464
465         Reviewed by Steve Falkenburg.
466
467         Eliminate /DELAYLOAD:msimg32.dll ignored warning when building WebKit project
468         https://bugs.webkit.org/show_bug.cgi?id=54296
469
470         * win/WebKit2Common.vsprops: Remove msimg32.dll from the list of DelayLoadDLLs.
471
472 2011-02-11  Chandra Vallala  <chandra.vallala@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
473
474         Reviewed by Martin Robinson.
475
476         [GTK] Implement UpdateChunk, ChunkedUpdateDrawingArea/Proxy
477         classes for WebKit2
478         https://bugs.webkit.org/show_bug.cgi?id=54080
479
480         * GNUmakefile.am:
481         * Shared/gtk/UpdateChunk.cpp: Added.
482         (WebKit::UpdateChunk::UpdateChunk):
483         (WebKit::UpdateChunk::~UpdateChunk):
484         (WebKit::UpdateChunk::encode):
485         (WebKit::UpdateChunk::decode):
486         (WebKit::UpdateChunk::createImage):
487         * Shared/gtk/UpdateChunk.h: Added.
488         (WebKit::UpdateChunk::rect):
489         (WebKit::UpdateChunk::isEmpty):
490         (WebKit::UpdateChunk::size):
491         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
492         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
493         Initialize the surface.
494         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
495         * UIProcess/DrawingAreaProxy.h: Added cairo variables.
496         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Added.
497         (WebKit::ChunkedUpdateDrawingAreaProxy::page):
498         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
499         (WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore):
500         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
501         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
502         * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp: Added.
503         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
504
505 2011-02-10  Anders Carlsson  <andersca@apple.com>
506
507         Reviewed by Dan Bernstein.
508
509         Repro crash with Sony Google TV ad at Gizmodo
510         https://bugs.webkit.org/show_bug.cgi?id=54150
511         <rdar://problem/8782346>
512
513         Re-landing this fix, bug without the test case, since it causes hangs on the bots.
514         https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding back the test.
515
516         Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it.
517
518         * WebProcess/Plugins/PluginView.cpp:
519         (WebKit::PluginView::~PluginView):
520         Null out m_pluginElement here so we'll catch crashes earlier.
521
522         (WebKit::PluginView::evaluate):
523         Add a plug-in protector.
524
525 2011-02-10  Alice Liu  <alice.liu@apple.com>
526
527         Reviewed by Enrica Casucci and Adele Peterson.
528
529         WebKit2 pages gobble up cmd-I as an editing command in some cases where it shouldn't
530         https://bugs.webkit.org/show_bug.cgi?id=54254
531
532         * UIProcess/API/mac/WKView.mm:
533         (-[WKView _handleStyleKeyEquivalent:]):
534         Return early if we're not in an editable region.
535
536 2011-02-10  Andreas Kling  <kling@webkit.org>
537
538         Unreviewed Qt build fix.
539
540         waitFor() -> deprecatedWaitFor()
541
542         * UIProcess/TiledDrawingAreaProxy.cpp:
543         (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
544
545 2011-02-10  Anders Carlsson  <andersca@apple.com>
546
547         Reviewed by Adam Roben.
548
549         Move code to dispatch an incoming message out into a new function
550         https://bugs.webkit.org/show_bug.cgi?id=54239
551
552         This also fixes a leak where we wouldn't free ArgumentDecoder objects
553         after a connection has been invalidated.
554         
555         * Platform/CoreIPC/Connection.cpp:
556         (CoreIPC::Connection::dispatchMessage):
557         (CoreIPC::Connection::dispatchMessages):
558         * Platform/CoreIPC/Connection.h:
559
560 2011-02-10  Anders Carlsson  <andersca@apple.com>
561
562         Try again to fix the Qt build.
563
564         * UIProcess/TiledDrawingAreaProxy.cpp:
565         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
566         (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
567         (WebKit::TiledDrawingAreaProxy::takeSnapshot):
568         (WebKit::TiledDrawingAreaProxy::removeTile):
569
570 2011-02-10  Anders Carlsson  <andersca@apple.com>
571
572         Attempt to fix the Qt build.
573
574         * UIProcess/TiledDrawingAreaProxy.cpp:
575         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
576         (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
577         (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
578         (WebKit::TiledDrawingAreaProxy::takeSnapshot):
579         (WebKit::TiledDrawingAreaProxy::removeTile):
580         * WebProcess/WebPage/TiledDrawingArea.cpp:
581         (WebKit::TiledDrawingArea::display):
582         (WebKit::TiledDrawingArea::setSize):
583         (WebKit::TiledDrawingArea::updateTile):
584         (WebKit::TiledDrawingArea::tileUpdateTimerFired):
585         (WebKit::TiledDrawingArea::didReceiveMessage):
586
587 2011-02-10  Adam Roben  <aroben@apple.com>
588
589         Handle a null FindIndicator correctly
590
591         We are passed a null FindIndicator when the find indicator becomes hidden.
592
593         Fixes <http://webkit.org/b/54213> <rdar://problem/8983261> REGRESSION (r78198): Crash in
594         FindIndicator::contentImage when scrolling page
595
596         Reviewed by Steve Falkenburg.
597
598         * Platform/win/SharedMemoryWin.cpp:
599         (WebKit::SharedMemory::Handle::isNull): Implemented.
600         (WebKit::SharedMemory::create): Bail out if the handle is null, just like Mac does.
601         Otherwise assert that ::MapViewOfFile succeeded. This doesn't fix the bug, but should help
602         catch other errors.
603
604         * UIProcess/win/WebView.cpp:
605         (WebKit::WebView::setFindIndicator): Null-check the FindIndicator before dereferencing it.
606         Also changed the function to store the FindIndicator in a RefPtr.
607
608 2011-02-10  Anders Carlsson  <andersca@apple.com>
609
610         Reviewed by Sam Weinig.
611
612         Add 'deprecated' to the deprecated CoreIPC functions
613         https://bugs.webkit.org/show_bug.cgi?id=54223
614
615         * Platform/CoreIPC/Connection.cpp:
616         (CoreIPC::Connection::sendMessage):
617         * Platform/CoreIPC/Connection.h:
618         (CoreIPC::Connection::send):
619         (CoreIPC::Connection::deprecatedSendSync):
620         (CoreIPC::Connection::deprecatedSend):
621         (CoreIPC::Connection::deprecatedWaitFor):
622         * Platform/CoreIPC/mac/ConnectionMac.cpp:
623         (CoreIPC::Connection::open):
624         * PluginProcess/PluginProcess.cpp:
625         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
626         (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
627         * UIProcess/Plugins/PluginProcessProxy.cpp:
628         (WebKit::PluginProcessProxy::createWebProcessConnection):
629         * WebProcess/InjectedBundle/InjectedBundle.cpp:
630         (WebKit::InjectedBundle::postMessage):
631         (WebKit::InjectedBundle::postSynchronousMessage):
632         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
633         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
634         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
635         (WebKit::ChunkedUpdateDrawingArea::display):
636         (WebKit::ChunkedUpdateDrawingArea::setSize):
637         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
638         (WebKit::LayerBackedDrawingArea::setSize):
639         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
640         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
641
642 2011-02-10  Sam Weinig  <sam@webkit.org>
643
644         Reviewed by Anders Carlsson.
645
646         Window resizer does not have a border when there are scrollbars in WebKit2 windows
647         <rdar://problem/8488476>
648         https://bugs.webkit.org/show_bug.cgi?id=54222
649
650         * UIProcess/API/mac/PageClientImpl.h:
651         * UIProcess/API/mac/PageClientImpl.mm:
652         (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame):
653         * UIProcess/API/mac/WKView.mm:
654         (-[WKView _updateGrowBoxForWindowFrameChange]):
655         (-[WKView _didChangeScrollbarsForMainFrame]):
656         * UIProcess/API/mac/WKViewInternal.h:
657         * UIProcess/API/qt/qwkpage_p.h:
658         (QWKPagePrivate::didChangeScrollbarsForMainFrame):
659         * UIProcess/PageClient.h:
660         * UIProcess/WebPageProxy.cpp:
661         (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
662         * UIProcess/win/WebView.cpp:
663         (WebKit::WebView::didChangeScrollbarsForMainFrame):
664         * UIProcess/win/WebView.h:
665
666 2011-02-10  Ivan Krstić  <ike@apple.com>
667
668         Reviewed by Adam Roben.
669
670         Rename remaining instances of _HOME sandbox parameter.
671         <rdar://problem/8983428>
672
673         * WebProcess/com.apple.WebProcess.sb:
674
675 2011-02-10  Chris Fleizach  <cfleizach@apple.com>
676
677         Reviewed by Anders Carlsson.
678
679         AX: AX needs to stop using WebCoreViewFactory
680         https://bugs.webkit.org/show_bug.cgi?id=54153
681
682         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
683         (InitWebCoreSystemInterface):
684
685 2011-02-10  Sam Weinig  <sam@webkit.org>
686
687         Reviewed by Anders Carlsson.
688
689         Sandbox violations trying to read crypto preferences.
690         <rdar://problem/8981151>
691
692         * WebProcess/com.apple.WebProcess.sb:
693
694 2011-02-10  Peter Varga  <pvarga@webkit.org>
695
696         Reviewed by Csaba Osztrogonác.
697
698         Remove PCRE source from trunk
699         https://bugs.webkit.org/show_bug.cgi?id=54188
700
701         * WebKit2.pro:
702
703 2011-02-09  Adam Roben  <aroben@apple.com>
704
705         Turn on the new drawing area on Windows
706
707         Fixes <http://webkit.org/b/53805> <rdar://problem/8960666> WebKit2 on Windows should use
708         DrawingAreaProxyImpl
709
710         Reviewed by Darin Adler.
711
712         * UIProcess/win/WebView.cpp:
713         (WebKit::useNewDrawingArea): Return true!
714
715 2011-02-09  Adam Roben  <aroben@apple.com>
716
717         Hook up WM_PRINT to the new drawing area
718
719         Fixes <http://webkit.org/b/54145> <rdar://problem/8979559> WM_PRINT doesn't work with new
720         drawing area (assertion failure in DrawingAreaProxyImpl in Debug builds)
721
722         Reviewed by Darin Adler.
723
724         * UIProcess/win/WebView.cpp:
725         (WebKit::WebView::paint): Added. Code came from onPaintEvent.
726
727         (WebKit::WebView::onPaintEvent):
728         (WebKit::WebView::onPrintClientEvent):
729         Changed to call paint.
730
731         * UIProcess/win/WebView.h: Added paint. Also separated message handler functions into their
732         own paragraph.
733
734 2011-02-09  Adam Roben  <aroben@apple.com>
735
736         Notice when the backing store goes away after DidSetSize
737
738         Fixes <http://webkit.org/b/54142> <rdar://problem/8979365> Crash in
739         DrawingAreaProxyImpl::paint when WKView paints after being resized while hidden
740
741         Reviewed by Darin Adler.
742
743         * UIProcess/DrawingAreaProxyImpl.cpp:
744         (WebKit::DrawingAreaProxyImpl::paint): Null-check m_backingStore after waiting for
745         DidSetSize, as m_backingStore can go away when we receive that message. This is the bug fix.
746         Also moved the accelerated compositing check inside the block where we wait for DidSetSize.
747         If we didn't wait for DidSetSize, we already know that we're not in accelerated compositing
748         mode (and asserted so earlier in this function).
749
750 2011-02-09  Adam Roben  <aroben@apple.com>
751
752         Decode a null SharedMemory::Handle correctly on Windows
753
754         Fixes <http://webkit.org/b/54141> <rdar://problem/8979195> WKView draws at wrong size,
755         performs badly if is resized while hidden (assertion fails in
756         BackingStore::incorporateUpdate in Debug builds)
757
758         Reviewed by Darin Adler.
759
760         * Platform/win/SharedMemoryWin.cpp:
761         (WebKit::getDuplicatedHandle): Added. Code came from decode. The only changes were to
762         null-check sourceHandle (this is the bug fix) and to assert when ::DuplicateHandle fails
763         (which would have caught the bug earlier).
764         (WebKit::SharedMemory::Handle::decode): Changed to use getDuplicatedHandle.
765
766 2011-02-09  Adam Roben  <aroben@apple.com>
767
768         Don't invalidate outside of the WebPage's bounds
769
770         Fixes <http://webkit.org/b/54123> <rdar://problem/8978383> Assertion failure in
771         BackingStore::BackingStore if a new WebPage becomes active before receiving a size
772
773         Reviewed by Darin Adler.
774
775         * WebProcess/WebPage/DrawingAreaImpl.cpp:
776         (WebKit::DrawingAreaImpl::setNeedsDisplay): Intersect the dirty rect with our bounds before
777         doing anything else.
778         (WebKit::DrawingAreaImpl::display): Added an assertion to help catch the bad case a little
779         earlier.
780
781 2011-02-10  Eric Seidel  <eric@webkit.org>
782
783         Unreviewed, rolling out r78157.
784         http://trac.webkit.org/changeset/78157
785         https://bugs.webkit.org/show_bug.cgi?id=54150
786
787         Fails on a bunch of bots
788
789         * WebProcess/Plugins/PluginView.cpp:
790         (WebKit::PluginView::~PluginView):
791         (WebKit::PluginView::evaluate):
792
793 2011-02-09  Brian Weinstein  <bweinstein@apple.com>
794
795         Rubber-stamped by Sam Weinig.
796
797         Fix a typo in WebSecurityOrigin::protocol.
798
799         * Shared/WebSecurityOrigin.h:
800         (WebKit::WebSecurityOrigin::protocol): This should return the protocol, not the domain.
801
802 2011-02-09  Sam Weinig  <sam@webkit.org>
803
804         Reviewed by Darin Adler.
805
806         File uploads do not work within the sandbox
807         <rdar://problem/8950518>
808         https://bugs.webkit.org/show_bug.cgi?id=54154
809
810         * UIProcess/WebPageProxy.cpp:
811         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
812         * WebProcess/WebPage/WebPage.cpp:
813         (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
814         * WebProcess/WebPage/WebPage.h:
815         * WebProcess/WebPage/WebPage.messages.in:
816
817 2011-02-09  Alexey Proskuryakov  <ap@apple.com>
818
819         Reviewed by Darin Adler.
820
821         https://bugs.webkit.org/show_bug.cgi?id=54148
822         <rdar://problem/8973887> REGRESSION (WebKit2): Opening two print dialogs causes havoc
823
824         * UIProcess/API/mac/WKPrintingView.h: Moved _isForcingPreviewUpdate into a static variable,
825         because dispatching a notification affects all WKPrintingViews at once.
826         * UIProcess/API/mac/WKPrintingView.mm:
827         (-[WKPrintingView _updatePreview]): Updated for new variable name.
828         (-[WKPrintingView knowsPageRange:]): Don't break if the method is called twice in a row
829         (we already had this logic when printing from separate thread, but not for preview).
830         (-[WKPrintingView drawRect:]): Changed all LOG messages to have view object address for
831         easier matching.
832         (-[WKPrintingView rectForPage:]): Ditto.
833         (-[WKPrintingView beginDocument]): Ditto.
834         (-[WKPrintingView endDocument]): Ditto.
835
836 2011-02-09  Anders Carlsson  <andersca@apple.com>
837
838         Reviewed by Sam Weinig.
839
840         Repro crash with Sony Google TV ad at Gizmodo
841         https://bugs.webkit.org/show_bug.cgi?id=54150
842
843         Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it.
844
845         * WebProcess/Plugins/PluginView.cpp:
846         (WebKit::PluginView::~PluginView):
847         Null out m_pluginElement here so we'll catch crashes earlier.
848
849         (WebKit::PluginView::evaluate):
850         Add a plug-in protector.
851
852 2011-02-09  Sam Weinig  <sam@webkit.org>
853
854         Reviewed by Maciej Stachowiak.
855
856         Google Maps says it has horizontal scrollbars when it doesn't
857         <rdar://problem/8978005>
858
859         We were updating the main frame's scrollbar state for changes to
860         frames other than the main frame.
861
862         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
863         (WebKit::WebChromeClient::contentsSizeChanged):
864         * WebProcess/WebCoreSupport/WebChromeClient.h:
865         (WebKit::WebChromeClient::WebChromeClient):
866         Change to bail out early if we are not looking at the main frame. Also
867         fix some silly typos and rename the variables to be more specific.
868
869 2011-02-09  Ivan Krstić  <ike@apple.com>
870
871         Reviewed by Sam Weinig.
872
873         Allow read-only access to mouse preferences from sandboxed WebProcess.
874         <rdar://problem/8975279>
875
876         * WebProcess/com.apple.WebProcess.sb:
877
878 2011-02-09  Steve Falkenburg  <sfalken@apple.com>
879
880         Build fix.
881
882         * win/MainWin.cpp:
883         (wWinMain):
884
885 2011-02-09  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
886
887         Reviewed by Martin Robinson.
888
889         [GTK] Implement Module class for WebKit2
890         https://bugs.webkit.org/show_bug.cgi?id=48510
891
892         * GNUmakefile.am:
893         * Platform/Module.h: Added GModule handle for GTK port.
894         * Platform/gtk/ModuleGtk.cpp: Initial code using GModule calls.
895         (WebKit::Module::load):
896         (WebKit::Module::unload):
897         (WebKit::Module::platformFunctionPointer):
898
899 2011-02-09  Chandra Vallala  <chandra.vallala@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
900
901         Reviewed by Martin Robinson.
902
903         [GTK] Implement WKBaseGtk API for Webkit2
904         https://bugs.webkit.org/show_bug.cgi?id=54081
905
906         * GNUmakefile.am: Added new files to compilation.
907         * Shared/API/c/WKBase.h: Included WKBaseGtk.h in this file.
908         * Shared/API/c/gtk: Added.
909         * Shared/API/c/gtk/WKBaseGtk.h: Added. Declaration of WKViewRef
910         for GTK port.
911         * UIProcess/API/C/WKAPICast.h: Included WKAPICastGtk.h in this
912         file.
913         * UIProcess/API/C/gtk: Added.
914         * UIProcess/API/C/gtk/WKAPICastGtk.h: Added. Type definition
915         template for WKViewRef to WebView and vice-versa.
916         * UIProcess/API/C/gtk/WKView.cpp: Added. Implementation of WKView
917         API interface.
918         (WKViewCreate):
919         (WKViewGetWindow):
920         (WKViewGetPage):
921         (WKURLCreateWithURL):
922         * UIProcess/API/C/gtk/WKView.h: Added. Declaration of WKView API
923         interface.
924
925 2011-02-09  Alejandro G. Castro  <alex@igalia.com>
926
927         Reviewed by Martin Robinson.
928
929         [GTK] Add WebGraphicsContext stub to the compilation
930         https://bugs.webkit.org/show_bug.cgi?id=54078
931
932         * GNUmakefile.am:
933         * Shared/API/c/gtk/WKGraphicsContextGtk.cpp: Added stub just for
934         compilation.
935         (WKGraphicsContextGetGtkContext):
936         * Shared/API/c/gtk/WKGraphicsContextGtk.h: Added stub just for
937         compilation.
938         * Shared/WebGraphicsContext.cpp:
939         (WebKit::WebGraphicsContext::WebGraphicsContext):
940         * Shared/WebGraphicsContext.h:
941         (WebKit::WebGraphicsContext::platformContext):
942
943 2011-02-09  Alejandro G. Castro  <alex@igalia.com>
944
945         Reviewed by Martin Robinson.
946
947         [GTK] Add geolocation support to the webkit2 compilation
948         https://bugs.webkit.org/show_bug.cgi?id=54077
949
950         Add Geolocation files to the GTK compilation.
951
952         * GNUmakefile.am:
953
954 2011-02-09  Andras Becsi  <abecsi@webkit.org>
955
956         Reviewed by Csaba Osztrogonác.
957
958         [Qt][WK2] Don't generate superfluous forwarding header for config.h.
959
960         * Scripts/generate-forwarding-headers.pl:
961
962 2011-02-09  Adam Roben  <aroben@apple.com>
963
964         Hide the ugly details of WebView::m_window initialization from WebPageProxy, and make it
965         less ugly
966
967         WebView::WebView was initially creating a hidden window, then showing it. It would tell
968         WebPageProxy about the window while it was still hidden, and then have to inform
969         WebPageProxy that the window had become shown. This resulted in WebPageProxy sending
970         unnecessary messages to the web process, and confused code that assumed that the window
971         would be in the same state after WebView's constructor exited as it was when WebPageProxy
972         first found out about the window.
973
974         We now don't hide the window when creating it, which simplifies the code, and only tell
975         WebPageProxy about the window after we're done modifying it, which fixes the bug.
976
977         Fixes <http://webkit.org/b/53878> <rdar://problem/8977306> Assertion failure in
978         DrawingAreaImpl::resumePainting after window.open or when opening Web Inspector
979
980         Reviewed by Anders Carlsson.
981
982         * UIProcess/win/WebView.cpp:
983         (WebKit::WebView::WebView): Changed ::CreateWindowEx to ::CreateWindowExW, to match other
984         Win32 API calls in WebKit2. Pass WS_VISIBLE to ::CreateWindowExW rather than waiting until
985         later to show the window. Added an assertion that m_isVisible matches the window's visible
986         state. Don't even create our WebPageProxy, or tell it about our window, until we're done
987         initializing our window, so that it doesn't get informed about our window's internal state
988         changes that happen beneath ::CreateWindowExW.
989         (WebKit::WebView::onSizeEvent): Null-check m_page since we can receive this message beneath
990         ::CreateWindowExW.
991         (WebKit::WebView::onShowWindowEvent): Ditto. Replaced one FIXME with another. Always set
992         handled to false so that ::DefWindowProcW can do its thing. (MSDN says this is when it
993         actually shows/hides the window, though I couldn't find any consequences of not calling
994         ::DefWindowProcW here.)
995
996 2011-02-09  Pavel Feldman  <pfeldman@chromium.org>
997
998         Reviewed by Yury Semikhatsky.
999
1000         Web Inspector: follow up on InspectorAgent split -
1001         removing unnecessary methods from InspectorController.
1002         https://bugs.webkit.org/show_bug.cgi?id=54093
1003
1004         * WebProcess/WebPage/WebInspector.cpp:
1005         (WebKit::WebInspector::showConsole):
1006         (WebKit::WebInspector::stopJavaScriptProfiling):
1007
1008 2011-02-09  Alejandro G. Castro  <alex@igalia.com>
1009
1010         Reviewed by Martin Robinson.
1011
1012         [GTK] Avoid WebProcessMain compilation, we are used a gtk specific main
1013         https://bugs.webkit.org/show_bug.cgi?id=54015
1014
1015         Avoided the compilation of the general WebProcessMain, and added
1016         soup initialization to WebProcessMainGtk.cpp.
1017
1018         * GNUmakefile.am:
1019         * WebProcess/gtk/WebProcessMainGtk.cpp:
1020         (WebKit::WebProcessMainGtk):
1021
1022 2011-02-08  Alejandro G. Castro  <alex@igalia.com>
1023
1024         Reviewed by Martin Robinson.
1025
1026         [GTK] Incorrect assertion in WorkQueueGtk, we need to register
1027         more than one handle
1028         https://bugs.webkit.org/show_bug.cgi?id=54014
1029
1030         Fixed assertion condition we need to register more than one
1031         handler for the same file descriptor.
1032
1033         * Platform/gtk/WorkQueueGtk.cpp:
1034         (WorkQueue::registerEventSourceHandler):
1035
1036 2011-02-08  Alejandro G. Castro  <alex@igalia.com>
1037
1038         Reviewed by Martin Robinson.
1039
1040         Fix typo in the include guards name in ChunkedUpdateDrawingAreaProxy.h
1041         https://bugs.webkit.org/show_bug.cgi?id=54013
1042
1043         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1044
1045 2011-02-08  Alejandro G. Castro  <alex@igalia.com>
1046
1047         Reviewed by Martin Robinson.
1048
1049         [GTK] Fix after r77874, m_isConnected is initialized before the
1050         socket is opened
1051         https://bugs.webkit.org/show_bug.cgi?id=54011
1052
1053         Fixed connection breakage after r77874, we have to wait until open
1054         the socket to open the connection.
1055
1056         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
1057         (CoreIPC::Connection::platformInitialize):
1058         (CoreIPC::Connection::open):
1059
1060 2011-02-08  Alejandro G. Castro  <alex@igalia.com>
1061
1062         Reviewed by Martin Robinson.
1063
1064         [WK2] LayerTreeContext is used outside the ACCELERATED_COMPOSITING
1065         guards but not defined in DrawingAreaProxy.h
1066         https://bugs.webkit.org/show_bug.cgi?id=54009
1067
1068         Removed the guards in the forward declaration, this will fail if
1069         the class is finally used in the function, but it works for the
1070         moment.
1071
1072         * UIProcess/DrawingAreaProxy.h:
1073
1074 2011-02-08  Alejandro G. Castro  <alex@igalia.com>
1075
1076         Reviewed by Martin Robinson.
1077
1078         WebKit2 GTK Fails to Build #include nested too deeply
1079         https://bugs.webkit.org/show_bug.cgi?id=52219
1080
1081         * GNUmakefile.am: Removed the commands to create the directories
1082         for the forwarding headers, the script already does it for us.
1083         * config.h: Removed the config.h inclusion and added the
1084         autotoolsconfig.h directly, also added a condition to share the
1085         defines with QT.
1086
1087 2011-02-08  Maciej Stachowiak  <mjs@apple.com>
1088
1089         Reviewed by Mark Rowe.
1090
1091         Crash when going back/forward when back/forward list is in a bad state.
1092         https://bugs.webkit.org/show_bug.cgi?id=54059
1093         <rdar://problem/8975244>
1094         
1095         * UIProcess/WebPageProxy.cpp:
1096         (WebKit::WebPageProxy::goForward): Add a null check.
1097         (WebKit::WebPageProxy::goBack): ditto
1098
1099 2011-02-08  Anders Carlsson  <andersca@apple.com>
1100
1101         Reviewed by Beth Dakin.
1102
1103         Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyImpl::incorporateUpdate()
1104         https://bugs.webkit.org/show_bug.cgi?id=54046
1105         <rdar://problem/8973960>
1106
1107         DrawingAreaImpl::setRootCompositingLayer can be called with a new layer even when already
1108         in accelerated compositing mode. Similarly, it can be called with a null layer even when not
1109         in accelerated compositing mode. Make the drawing area and layer tree host handle both these cases.
1110
1111         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1112         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1113         Only call enterAcceleratedCompositingMode if there is no layer tree host, otherwise
1114         just call LayerTreeHost::setRootCompositingLayer.
1115
1116         (WebKit::DrawingAreaImpl::setSize):
1117         Add an assert.
1118
1119         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1120         Assert that we don't have a layer tree host.
1121
1122         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1123         Assert that we do have a layer tree host.
1124
1125         (WebKit::DrawingAreaImpl::display):
1126         If the call to display caused the page to enter accelerated compositing mode, we don't
1127         want to send back an Update message.
1128
1129         * WebProcess/WebPage/LayerTreeHost.cpp:
1130         (WebKit::LayerTreeHost::create):
1131         * WebProcess/WebPage/LayerTreeHost.h:
1132         Create no longer takes a graphics layer.
1133
1134         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1135         (WebKit::LayerTreeHostMac::create):
1136         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1137         Create no longer takes a graphics layer.
1138         
1139         (WebKit::LayerTreeHostMac::setRootCompositingLayer):
1140         Set the new root compositing layer.
1141
1142 2011-02-08  Adam Roben  <aroben@apple.com>
1143
1144         Implement WorkQueue::scheduleWorkAfterDelay on Windows
1145
1146         Each WorkQueue now owns its own timer queue. When scheduleWorkAfterDelay is called, we
1147         create a timer-queue timer with the given delay. When the timer fires, we schedule the work
1148         on the queue and clean up the timer.
1149
1150         Fixes <http://webkit.org/b/54040> <rdar://problem/8974230> Web process sticks around forever
1151         if it's hung when UI process goes away
1152
1153         Reviewed by Anders Carlsson.
1154
1155         * Platform/WorkQueue.h: Added timerCallback and m_timerQueue.
1156
1157         * Platform/win/WorkQueueWin.cpp:
1158         (WorkQueue::platformInitialize): Initialize m_timerQueue.
1159         (WorkQueue::platformInvalidate): Clean up m_timerQueue.
1160         (TimerContext::TimerContext): Added this helper object to hold the context needed by the
1161         timer callback.
1162         (WorkQueue::timerCallback): Added. Schedules the WorkItem on the WorkQueue and cleans up the
1163         timer.
1164         (WorkQueue::scheduleWorkAfterDelay): Create a timer-queue timer on our timer queue that will
1165         fire after the given delay. Pass a new TimerContext object to the timer callback that
1166         contains the information it needs.
1167
1168 2011-02-08  Anders Carlsson  <andersca@apple.com>
1169
1170         Reviewed by Sam Weinig.
1171
1172         Rename PluginProcess::initializeConnection to PluginProcess::initialize
1173         https://bugs.webkit.org/show_bug.cgi?id=54039
1174
1175         * PluginProcess/PluginProcess.cpp:
1176         (WebKit::PluginProcess::initialize):
1177         * PluginProcess/PluginProcess.h:
1178         * PluginProcess/mac/PluginProcessMainMac.mm:
1179         (WebKit::PluginProcessMain):
1180         * WebProcess/WebProcess.h:
1181
1182 2011-02-08  Brady Eidson  <beidson@apple.com>
1183
1184         Reviewed by Darin Adler.
1185
1186         <rdar://problem/8972913> and https://bugs.webkit.org/show_bug.cgi?id=54036
1187         didChangeBackForwardList should include some context about what changed
1188
1189         Update the implementation of this API to include the new item (if any) and removed items (if any):
1190         * UIProcess/API/C/WKPage.h:
1191         * UIProcess/WebLoaderClient.cpp:
1192         (WebKit::WebLoaderClient::didChangeBackForwardList):
1193         * UIProcess/WebLoaderClient.h:
1194         * UIProcess/WebPageProxy.cpp:
1195         (WebKit::WebPageProxy::didChangeBackForwardList):
1196         * UIProcess/WebPageProxy.h:
1197
1198         Have WebBackForwardList pass the new items and/or removed items when calling the notifier:
1199         * UIProcess/WebBackForwardList.cpp:
1200         (WebKit::WebBackForwardList::addItem):
1201         (WebKit::WebBackForwardList::goToItem):
1202         (WebKit::WebBackForwardList::clear):
1203
1204 2011-02-08  Sam Weinig  <sam@webkit.org>
1205
1206         Reviewed by Anders Carlsson.
1207
1208         Sandbox violations visiting MobileMe.
1209         <rdar://problem/8961330>
1210
1211         * WebProcess/com.apple.WebProcess.sb:
1212
1213 2011-02-08  Anders Carlsson  <andersca@apple.com>
1214
1215         Reviewed by Sam Weinig.
1216
1217         Rename PluginProcess::initialize to PluginProcess::initializePluginProcess
1218         https://bugs.webkit.org/show_bug.cgi?id=54037
1219
1220         Rename PluginProcess::initialize to PluginProcess::initializePluginProcess to better
1221         match the WebProcess initialization code, in preparation of sharing more code.
1222
1223         * PluginProcess/PluginProcess.cpp:
1224         (WebKit::PluginProcess::initializePluginProcess):
1225         * PluginProcess/PluginProcess.h:
1226         * PluginProcess/PluginProcess.messages.in:
1227         * UIProcess/Plugins/PluginProcessProxy.cpp:
1228         (WebKit::PluginProcessProxy::didFinishLaunching):
1229
1230 2011-02-08  Sam Weinig  <sam@webkit.org>
1231
1232         Reviewed by Anders Carlsson.
1233
1234         WK2: Add ability to pass context to policy delegate methods
1235         https://bugs.webkit.org/show_bug.cgi?id=54031
1236
1237         * Platform/CoreIPC/HandleMessage.h:
1238         (CoreIPC::callMemberFunction):
1239         (CoreIPC::handleMessageVariadic):
1240         * Scripts/webkit2/messages.py:
1241         Add ability to pass variadic messages to sync messages.
1242
1243         * Shared/API/c/WKBase.h:
1244         * Shared/APIObject.h:
1245         Add WKBundleNavigation type.
1246
1247         * UIProcess/API/C/WKPage.h:
1248         * UIProcess/WebPageProxy.cpp:
1249         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1250         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1251         (WebKit::WebPageProxy::decidePolicyForMIMEType):
1252         * UIProcess/WebPageProxy.h:
1253         * UIProcess/WebPageProxy.messages.in:
1254         * UIProcess/WebPolicyClient.cpp:
1255         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
1256         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
1257         (WebKit::WebPolicyClient::decidePolicyForMIMEType):
1258         * UIProcess/WebPolicyClient.h:
1259         Update policy client for new data.
1260
1261         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1262         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: Added.
1263         (WKBundleNavigationActionGetTypeID):
1264         (WKBundleNavigationActionGetNavigationType):
1265         (WKBundleNavigationActionGetEventModifiers):
1266         (WKBundleNavigationActionGetEventMouseButton):
1267         (WKBundleNavigationActionCopyHitTestResult):
1268         (WKBundleNavigationActionCopyFormElement):
1269         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h: Added.
1270         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1271         (WKBundlePageSetPolicyClient):
1272         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1273         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: Added.
1274         (WebKit::mouseEventForNavigationAction):
1275         (WebKit::mouseButtonForMouseEvent):
1276         (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
1277         (WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction):
1278         (WebKit::InjectedBundleNavigationAction::create):
1279         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
1280         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: Added.
1281         (WebKit::InjectedBundleNavigationAction::navigationType):
1282         (WebKit::InjectedBundleNavigationAction::modifiers):
1283         (WebKit::InjectedBundleNavigationAction::mouseButton):
1284         (WebKit::InjectedBundleNavigationAction::hitTestResult):
1285         (WebKit::InjectedBundleNavigationAction::formElement):
1286         (WebKit::InjectedBundleNavigationAction::type):
1287         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: Added.
1288         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1289         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1290         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
1291         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: Added.
1292         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1293         (WebKit::WebChromeClient::createWindow):
1294         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1295         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1296         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1297         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1298         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1299         * WebProcess/WebPage/WebPage.cpp:
1300         (WebKit::WebPage::initializeInjectedBundlePolicyClient):
1301         * WebProcess/WebPage/WebPage.h:
1302         (WebKit::WebPage::injectedBundlePolicyClient):
1303         Pipe the policy client through the bundle to allow setting user data.
1304
1305         * WebKit2.pro:
1306         * WebKit2.xcodeproj/project.pbxproj:
1307         * win/WebKit2.vcproj:
1308         * win/WebKit2Generated.make:
1309         Add new files.
1310
1311 2011-02-08  Anders Carlsson  <andersca@apple.com>
1312
1313         Reviewed by Sam Weinig.
1314
1315         Crash calling -setFrame:andScrollBy: in windowDidResize
1316         https://bugs.webkit.org/show_bug.cgi?id=54030
1317         <rdar://problem/8969760>
1318
1319         * Platform/mac/SharedMemoryMac.cpp:
1320         (WebKit::SharedMemory::create):
1321         Assert that size is not zero here; we never want to try to create shared memory with a zero size.
1322         
1323         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1324         (WebKit::DrawingAreaImpl::setSize):
1325         Always invalidate the entire visible page when resizing.
1326
1327 2011-02-08  Adam Barth  <abarth@webkit.org>
1328
1329         Reviewed by Eric Seidel.
1330
1331         Remove orphan code from old parser
1332         https://bugs.webkit.org/show_bug.cgi?id=53984
1333
1334         * WebProcess/WebCoreSupport/WebChromeClient.cpp
1335         * WebProcess/WebCoreSupport/WebChromeClient.h
1336
1337 2011-02-08  Anders Carlsson  <andersca@apple.com>
1338
1339         Reviewed by Sam Weinig.
1340
1341         UI process crashes if web process crashes while web inspector is focused
1342         https://bugs.webkit.org/show_bug.cgi?id=53965
1343         <rdar://problem/8961633>
1344
1345         Make sure to close the web inspector web page proxy before calling platformClose, since 
1346         platformClose can cause the web page proxy to try to send messages (such as SetActive) 
1347         to the web process while it's in a bad state. 
1348
1349         The original fix, http://trac.webkit.org/changeset/77866, put the call to m_page->close() in
1350         WebInspectorProxy::didClose, which was wrong and lead to crashes. The right place to close the page
1351         is in WebInspectorProxy::invalidate.
1352
1353         * UIProcess/WebInspectorProxy.cpp:
1354         (WebKit::WebInspectorProxy::invalidate):
1355
1356 2011-02-08  Jessie Berlin  <jberlin@apple.com>
1357
1358         Reviewed by Adam Roben.
1359
1360         ASSERTION FAILURE: ASSERT_NOT_REACHED() in Connection::writeEventHandler() after the Web
1361         Process crashes.
1362         https://bugs.webkit.org/show_bug.cgi?id=54005
1363
1364         * Platform/CoreIPC/win/ConnectionWin.cpp:
1365         (CoreIPC::Connection::writeEventHandler):
1366         Handle ERROR_BROKEN_PIPE by calling connectionDidClose() and returning early.
1367
1368 2011-02-08  Adam Roben  <aroben@apple.com>
1369
1370         Handle WM_TIMER messages for stopped timers
1371
1372         Whenever we stop a timer, we call ::KillTimer to cancel any future firings of the timer. But
1373         ::KillTimer doesn't do anything about WM_TIMER messages that have already been posted to the
1374         message queue. We need to handle those, too.
1375
1376         Fixes <http://webkit.org/b/53999> Occasional assertion failures in
1377         RunLoop::TimerBase::timerFired
1378
1379         Reviewed by Darin Adler.
1380
1381         * Platform/win/RunLoopWin.cpp:
1382         (RunLoop::TimerBase::timerFired): Just bail if the timer has already been stopped.
1383
1384 2011-02-08  Adam Roben  <aroben@apple.com>
1385
1386         Don't mark a Connection as connected until open() is called on Windows
1387
1388         This matches Mac. Even though the Connection's pipe is connected before open() is called,
1389         the Connection itself isn't really connected to the pipe until then, and we won't actually
1390         read any data from before that point.
1391
1392         Fixes <http://webkit.org/b/53998> <rdar://problem/8971207> REGRESSION (r77874): Assertion
1393         failure on launch in Connection::setDidCloseOnConnectionWorkQueueCallback on Windows
1394
1395         Reviewed by Darin Adler.
1396
1397         * Platform/CoreIPC/win/ConnectionWin.cpp:
1398         (CoreIPC::Connection::platformInitialize): Moved code to set m_isConnected from here to
1399         open.
1400         (CoreIPC::Connection::platformInvalidate): Unset m_isConnected, to match Mac. (This isn't
1401         part of the bug fix, but seemed worthwhile.)
1402         (CoreIPC::Connection::open): Set m_isConnected now that we're going to listen on the pipe.
1403
1404 2011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1405
1406         Unreviewed, rolling out r77866.
1407         http://trac.webkit.org/changeset/77866
1408         https://bugs.webkit.org/show_bug.cgi?id=53981
1409
1410         caused all WebKit2 inspector tests to crash (Requested by
1411         othermaciej on #webkit).
1412
1413         * UIProcess/WebInspectorProxy.cpp:
1414         (WebKit::WebInspectorProxy::didClose):
1415
1416 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
1417
1418         Reviewed by Dan Bernstein.
1419
1420         Add resource load client for injected bundle and move willSendRequest there
1421         https://bugs.webkit.org/show_bug.cgi?id=53972
1422
1423         * GNUmakefile.am:
1424         * WebKit2.pro:
1425         * WebKit2.xcodeproj/project.pbxproj:
1426         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1427         (WKBundlePageSetPageLoaderClient):
1428         (WKBundlePageSetResourceLoadClient):
1429         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1430         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1431         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1432         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: Added.
1433         (WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource):
1434         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
1435         (WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource):
1436         (WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource):
1437         (WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource):
1438         (WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource):
1439         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: Added.
1440         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1441         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
1442         (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
1443         (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
1444         (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
1445         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
1446         (WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
1447         * WebProcess/WebPage/WebPage.cpp:
1448         (WebKit::WebPage::initializeInjectedBundleResourceLoadClient):
1449         * WebProcess/WebPage/WebPage.h:
1450         (WebKit::WebPage::injectedBundleResourceLoadClient):
1451         * win/WebKit2.vcproj:
1452
1453 2011-02-07  Mark Rowe  <mrowe@apple.com>
1454
1455         Fix the 32-bit build.
1456
1457         * UIProcess/cf/WebBackForwardListCF.cpp:
1458         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Add some casts
1459         to prevent warnings about mixing signed and unsigned comparisons.
1460
1461 2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
1462
1463         Reviewed by Andreas Kling.
1464
1465         [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
1466         https://bugs.webkit.org/show_bug.cgi?id=52974
1467
1468         Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
1469
1470         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1471         (WebKit::WebPlatformStrategies::contextMenuItemTagCopyImageUrlToClipboard):
1472         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1473
1474 2011-02-07  Enrica Casucci  <enrica@apple.com>
1475
1476         Reviewed by Sam Weinig.
1477
1478         Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874
1479         
1480         Removed unused static function.
1481         
1482         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1483
1484 2011-02-07  Anders Carlsson  <andersca@apple.com>
1485
1486         Reviewed by Sam Weinig.
1487
1488         <rdar://problem/8969888> 
1489         The WebProcess should set LSFileQuarantineEnabled to true
1490
1491         * WebProcess/Info.plist:
1492
1493 2011-02-07  Anders Carlsson  <andersca@apple.com>
1494
1495         Reviewed by Sam Weinig.
1496
1497         Crash in web process after the connection had been closed
1498         https://bugs.webkit.org/show_bug.cgi?id=51115
1499         <rdar://problem/8964255>
1500
1501         Remove didCloseOnConnectionWorkQueue from Connection::Client and add
1502         Connection::setDidCloseOnConnectionWorkQueueCallback which takes a static
1503         function, eliminating the race condition in connectionDidClose where m_client could be
1504         nulled out in the client thread right before we try to dereference it.
1505
1506         * Platform/CoreIPC/Connection.cpp:
1507         (CoreIPC::Connection::Connection):
1508         Initialize m_didCloseOnConnectionWorkQueueCallback.
1509
1510         (CoreIPC::Connection::setDidCloseOnConnectionWorkQueueCallback):
1511         Update m_didCloseOnConnectionWorkQueueCallback.
1512
1513         (CoreIPC::Connection::connectionDidClose):
1514         Call m_didCloseOnConnectionWorkQueueCallback.
1515
1516         * Platform/WorkQueue.h:
1517         Make WorkQueue noncopyable.
1518
1519         * PluginProcess/PluginProcess.cpp:
1520         (WebKit::PluginProcess::initializeConnection):
1521         Call setDidCloseOnConnectionWorkQueueCallback.
1522
1523         * Shared/ChildProcess.cpp:
1524         (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
1525         * Shared/ChildProcess.h:
1526         didCloseOnConnectionWorkQueue is now a static member function.
1527
1528         * WebProcess/WebProcess.cpp:
1529         (WebKit::WebProcess::initialize):
1530         Call setDidCloseOnConnectionWorkQueueCallback.
1531
1532 2011-02-07  Enrica Casucci  <enrica@apple.com>
1533
1534         Reviewed Adam Roben and Darin Adler.
1535
1536         WebKit2: drag and drop support on Windows.
1537         https://bugs.webkit.org/show_bug.cgi?id=52775
1538         <rdar://problem/8514409>
1539         
1540         This patch contains the remaining work to support
1541         a WebKit window as drag source on Windows.
1542         I've added the code to generate the image for dragging a link as
1543         well as the steps necessary to package the HBITMAP into a SharedMemory
1544         object and send it over to the UI process where DoDragDrop is performed.
1545
1546         * UIProcess/WebPageProxy.cpp:
1547         (WebKit::WebPageProxy::setDragImage):
1548         (WebKit::WebPageProxy::startDragDrop):
1549         * UIProcess/WebPageProxy.h:
1550         * UIProcess/WebPageProxy.messages.in:
1551         * WebProcess/WebCoreSupport/WebDragClient.cpp:
1552         (WebKit::WebDragClient::startDrag): Made startDrag for
1553         platforms other than Windows and Mac.
1554         * WebProcess/WebCoreSupport/WebDragClient.h:
1555         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1556         (WebKit::WebDragClient::startDrag):
1557         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added.
1558         (WebKit::draggingSourceOperationMaskToDragCursors):
1559         (WebKit::WebDragClient::startDrag):
1560         * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added.
1561         This object implements the IDropSource interface.
1562         (WebDragSource::createInstance):
1563         (WebDragSource::WebDragSource):
1564         (WebDragSource::QueryInterface):
1565         (WebDragSource::AddRef):
1566         (WebDragSource::Release):
1567         (WebDragSource::QueryContinueDrag):
1568         (WebDragSource::GiveFeedback):
1569         * WebProcess/WebCoreSupport/win/WebDragSource.h: Added.
1570         * win/WebKit2.vcproj:
1571
1572 2011-02-07  Anders Carlsson  <andersca@apple.com>
1573
1574         Reviewed by Sam Weinig.
1575
1576         UI process crashes if web process crashes while web inspector is focused
1577         https://bugs.webkit.org/show_bug.cgi?id=53965
1578         <rdar://problem/8961633>
1579
1580         Make sure to close the web inspector web page proxy before calling platformClose, since
1581         platformClose can cause the web page proxy to try to send messages (such as SetActive)
1582         to the web process while it's in a bad state.
1583
1584         * UIProcess/WebInspectorProxy.cpp:
1585         (WebKit::WebInspectorProxy::didClose):
1586
1587 2011-02-07  Anders Carlsson  <andersca@apple.com>
1588
1589         Reviewed by Darin Adler.
1590
1591         Find bouncy is missing content on pages with framesets
1592         https://bugs.webkit.org/show_bug.cgi?id=53958
1593         <rdar://problem/8904447>
1594
1595         Fix paint rect computation; FrameView::paint expects the paint rect to be in the
1596         parent widget's coordinate system.
1597
1598         * WebProcess/WebPage/FindController.cpp:
1599         (WebKit::FindController::updateFindIndicator):
1600
1601 2011-02-07  Brady Eidson  <beidson@apple.com>
1602
1603         Reviewed by Anders Carlsson.
1604
1605         <rdar://problem/8960434> and https://bugs.webkit.org/show_bug.cgi?id=53957
1606         Crash after incorrectly restoring bogus session state.
1607
1608         In some cases we're writing an invalid session state for a back/forward list where the current entry is 0
1609         but the number of entries is also 0.
1610         In such cases the current entry should be "NoCurrentEntryIndex."
1611
1612         When we later read this state in, we set ourselves up to crash later.
1613
1614         Amusingly an ASSERT caught this, but we should've rejected it before the ASSERT fired.
1615
1616         * UIProcess/cf/WebBackForwardListCF.cpp:
1617         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fail the restore if the "current index past the end
1618           of the list" case occurs, and speculatively bail out of the case where we have no current index but do have a list.
1619           Also remove the unhelpful ASSERT.
1620
1621 2011-02-07  Sam Weinig  <sam@webkit.org>
1622
1623         Reviewed by Anders Carlsson.
1624
1625         Add bundle API to get the background color of a frame
1626         <rdar://problem/8962670>
1627         https://bugs.webkit.org/show_bug.cgi?id=53952
1628
1629         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1630         (WKBundleFrameGetBodyBackgroundColor):
1631         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1632         Add API function.
1633
1634         * WebProcess/WebPage/WebFrame.cpp:
1635         (WebKit::WebFrame::getDocumentBackgroundColor):
1636         * WebProcess/WebPage/WebFrame.h:
1637         Call down into the document to get either the body's, or if there is no body,
1638         the root element's, background color.
1639
1640 2011-02-07  Sam Weinig  <sam@webkit.org>
1641
1642         Fix typo. vectical -> vertical.
1643
1644         * UIProcess/WebPageProxy.cpp:
1645         (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
1646
1647 2011-02-07  Sam Weinig  <sam@webkit.org>
1648
1649         Reviewed by Anders Carlsson.
1650
1651         Inform the UIProcess when main frame scrollbars change
1652         <rdar://problem/8967496>
1653         https://bugs.webkit.org/show_bug.cgi?id=53941
1654
1655         * UIProcess/API/C/WKPage.cpp:
1656         (WKPageHasHorizontalScrollbar):
1657         (WKPageHasVerticalScrollbar):
1658         * UIProcess/API/C/WKPage.h:
1659         Add API to query whether the main frame has scrollbars.
1660
1661         * UIProcess/WebPageProxy.cpp:
1662         (WebKit::WebPageProxy::WebPageProxy):
1663         (WebKit::WebPageProxy::close):
1664         (WebKit::WebPageProxy::processDidCrash):
1665         (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
1666         * UIProcess/WebPageProxy.h:
1667         (WebKit::WebPageProxy::hasHorizontalScrollbar):
1668         (WebKit::WebPageProxy::hasVerticalScrollbar):
1669         Store/update main frame scrollbar state.
1670
1671         * UIProcess/WebPageProxy.messages.in:
1672         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1673         (WebKit::WebChromeClient::contentsSizeChanged):
1674         * WebProcess/WebCoreSupport/WebChromeClient.h:
1675         (WebKit::WebChromeClient::WebChromeClient):
1676         Post message when main frame scrollbar state changes.
1677
1678 2011-02-07  Anders Carlsson  <andersca@apple.com>
1679
1680         Reviewed by Sam Weinig.
1681
1682         Some content is not covered by Find-on-page overlay
1683         https://bugs.webkit.org/show_bug.cgi?id=53937
1684         <rdar://problem/8711353>
1685
1686         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1687         (WebKit::DrawingAreaImpl::didInstallPageOverlay):
1688         Call LayerTreeHost::didInstallPageOverlay.
1689
1690         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
1691         Call LayerTreeHost::didUninstallPageOverlay.
1692
1693         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
1694         Call LayerTreeHost::setPageOverlayNeedsDisplay.
1695
1696         * WebProcess/WebPage/FindController.cpp:
1697         (WebKit::FindController::drawRect):
1698         Remove a bogus assertion.
1699
1700         * WebProcess/WebPage/LayerTreeHost.h:
1701         Add new pure virtual member functions.
1702
1703         * WebProcess/WebPage/PageOverlay.cpp:
1704         (WebKit::PageOverlay::setNeedsDisplay):
1705         Call DrawingArea::setPageOverlayNeedsDisplay.
1706
1707         * WebProcess/WebPage/WebPage.cpp:
1708         (WebKit::WebPage::installPageOverlay):
1709         Make sure to call PageOverlay::setNeedsDisplay after the page overlay has been installed.
1710     
1711         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1712         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1713         Create the page overlay layer if needed.
1714
1715         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
1716         Invalidate the page overlay layer as well.
1717
1718         (WebKit::LayerTreeHostMac::sizeDidChange):
1719         Resize the page overlay layer.
1720
1721         (WebKit::LayerTreeHostMac::didInstallPageOverlay):
1722         Create the page overlay layer.
1723
1724         (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
1725         Destroy the page overlay layer.
1726
1727         (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
1728         Call setNeedsDisplay on the page overlay layer.
1729
1730         (WebKit::LayerTreeHostMac::paintContents):
1731         Handle painting the page overlay layer.
1732
1733         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
1734         Flush the page overlay layer changes as well.
1735
1736         (WebKit::LayerTreeHostMac::createPageOverlayLayer):
1737         Create a layer and add it as a sublayer of the root layer.
1738
1739         (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
1740         Destroy the page overlay layer.
1741
1742 2011-02-06  Adam Roben  <aroben@apple.com>
1743
1744         Make it possible to use DrawingAreaProxyImpl on Windows
1745
1746         It can be optionally turned on by setting the WEBKIT2_USE_NEW_DRAWING_AREA environment
1747         variable. Turning it on by default is covered by <http://webkit.org/b/53805>.
1748
1749         Fixes <http://webkit.org/b/53879>.
1750
1751         Reviewed by Anders Carlsson.
1752
1753         * UIProcess/BackingStore.h: Add an m_bitmap member on Windows.
1754
1755         * UIProcess/win/BackingStoreWin.cpp:
1756         (WebKit::BitmapDC::operator HDC):
1757         (WebKit::BitmapDC::BitmapDC):
1758         (WebKit::BitmapDC::~BitmapDC):
1759         Added this helper class, which uses RAII to select a bitmap into a new memory DC.
1760         (WebKit::BackingStore::paint): Wrap our bitmap in a BitmapDC and use ::BitBlt to copy the
1761         specified rect into the destination DC.
1762         (WebKit::createBitmap): New helper function, just creates a DIB section with the specified
1763         size.
1764         (WebKit::BackingStore::incorporateUpdate): Ported from BackingStoreMac.mm. It seems like
1765         this code could be shared at some point.
1766         (WebKit::BackingStore::scroll): Wrap our bitmap in a BitmapDC and use ::ScrollDC to scroll
1767         the specified rect.
1768
1769         * UIProcess/win/WebView.cpp:
1770         (WebKit::useNewDrawingArea): Added. Returns true if the WEBKIT2_USE_NEW_DRAWING_AREA
1771         environment variable is set.
1772         (WebKit::drawPageBackground): New helper function. Code came from onPaintEvent.
1773         (WebKit::WebView::onPaintEvent): Ported from -[WKView drawRect:].
1774         (WebKit::WebView::createDrawingAreaProxy): Create a DrawingAreaProxyImpl if we're using the
1775         new drawing area.
1776
1777         (WebKit::WebView::enterAcceleratedCompositingMode):
1778         (WebKit::WebView::exitAcceleratedCompositingMode):
1779         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
1780         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
1781         Added some assertions to make sure these are only called when expected. We don't expect
1782         enter/exitAcceleratedCompositingMode to be called at all right now, because accelerated
1783         compositing is turned off in WebKit2 on Windows.
1784
1785         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary): Ditto, and added a case for the
1786         DrawingAreaInfo::Impl constant.
1787
1788 2011-02-07  Adam Roben  <aroben@apple.com>
1789
1790         Start compiling DrawingArea[Proxy]Impl and dependencies on Windows
1791
1792         Fixes <http://webkit.org/b/53875> WebKit2 on Windows should build DrawingArea[Proxy]Impl
1793
1794         Reviewed by Sam Weinig and Darin Adler.
1795
1796         * Platform/Region.cpp:
1797         (WebKit::Region::Shape::shapeOperation): Initialize variable to avoid a bogus "potentially
1798         uninitialized variable" warning.
1799
1800         * UIProcess/BackingStore.cpp: Removed #error for non-Mac platforms.
1801
1802         * UIProcess/BackingStore.h: Added a PlatformGraphicsContext typedef for Windows.
1803
1804         * UIProcess/DrawingAreaProxy.h:
1805         * UIProcess/DrawingAreaProxyImpl.cpp:
1806         * UIProcess/WebPageProxy.cpp:
1807         (WebKit::WebPageProxy::didReceiveMessage):
1808         Allow Windows to compile the new drawing area code.
1809
1810         * WebProcess/WebPage/DrawingArea.cpp:
1811         (WebKit::DrawingArea::create): Allow creating a DrawingAreaImpl on Windows, too.
1812
1813         * WebProcess/WebPage/DrawingArea.h:
1814         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1815         * WebProcess/WebPage/LayerTreeHost.cpp:
1816         * WebProcess/WebPage/WebPage.cpp:
1817         (WebKit::WebPage::didReceiveMessage):
1818         Allow Windows to compile the new drawing area code.
1819
1820         * Shared/win/LayerTreeContextWin.cpp: Added.
1821         * UIProcess/win/BackingStoreWin.cpp: Added.
1822         Stubbed out these files.
1823
1824         * win/WebKit2.vcproj: Added new files.
1825
1826 2011-02-07  Anders Carlsson  <andersca@apple.com>
1827
1828         Reviewed by Dan Bernstein.
1829
1830         Rename some drawing area related member functions
1831         https://bugs.webkit.org/show_bug.cgi?id=53935
1832
1833         * WebProcess/WebPage/DrawingArea.h:
1834         (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
1835         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1836         (WebKit::DrawingAreaImpl::setNeedsDisplay):
1837         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
1838         * WebProcess/WebPage/DrawingAreaImpl.h:
1839         * WebProcess/WebPage/LayerTreeHost.h:
1840         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1841         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1842         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
1843         (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
1844
1845 2011-02-07  Adam Roben  <aroben@apple.com>
1846
1847         Use the right calling convention when calling WebKitMain
1848
1849         Fixes <http://webkit.org/b/53923> REGRESSION (r77678): Crash on quit in web process in
1850         wWinMain
1851
1852         Reviewed by Steve Falkenburg.
1853
1854         * win/MainWin.cpp:
1855         (wWinMain): Use __cdecl instead of WINAPI (__stdcall) when calling WebKitMain, since that is
1856         how that function is declared.
1857
1858 2011-02-07  Anders Carlsson  <andersca@apple.com>
1859
1860         Reviewed by Dan Bernstein.
1861
1862         The drawing area should be in charge of drawing the page overlay
1863         https://bugs.webkit.org/show_bug.cgi?id=53927
1864
1865         * WebProcess/WebPage/DrawingArea.h:
1866         (WebKit::DrawingArea::didInstallPageOverlay):
1867         (WebKit::DrawingArea::didUninstallPageOverlay):
1868         (WebKit::DrawingArea::setOverlayNeedsDisplay):
1869         Add empty stubs.
1870
1871         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1872         (WebKit::DrawingAreaImpl::didInstallPageOverlay):
1873         Add empty function. This will eventually ask the layer tree host to
1874         create a GraphicsLayer for the page overlay.
1875
1876         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
1877         Tell the page that it needs to be repainted.
1878
1879         (WebKit::DrawingAreaImpl::setOverlayNeedsDisplay):
1880         Just call setNeedsDisplay for now.
1881
1882         (WebKit::DrawingAreaImpl::display):
1883         Paint the page overlay too.
1884
1885         * WebProcess/WebPage/DrawingAreaImpl.h:
1886         * WebProcess/WebPage/WebPage.cpp:
1887         (WebKit::WebPage::drawRect):
1888         Only call drawPageOverlay if we have an old drawing area.
1889
1890         (WebKit::WebPage::drawPageOverlay):
1891         Draw the page overlay. Code moved here from WebPage::drawRect.
1892
1893         (WebKit::WebPage::installPageOverlay):
1894         Call DrawingArea::installPageOverlay.
1895
1896         (WebKit::WebPage::uninstallPageOverlay):
1897         Call DrawingArea::uninstallPageOverlay.
1898
1899         * WebProcess/WebPage/WebPage.h:
1900         (WebKit::WebPage::hasPageOverlay):
1901         Add getter.
1902
1903 2011-02-07  Anders Carlsson  <andersca@apple.com>
1904
1905         Reviewed by Sam Weinig.
1906
1907         Add WebPage::bounds and use it
1908         https://bugs.webkit.org/show_bug.cgi?id=53926
1909
1910         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1911         (WebKit::ChunkedUpdateDrawingArea::resumePainting):
1912         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1913         (WebKit::DrawingAreaImpl::resumePainting):
1914         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1915         * WebProcess/WebPage/WebPage.h:
1916         (WebKit::WebPage::bounds):
1917
1918 2011-02-07  Anders Carlsson  <andersca@apple.com>
1919
1920         Reviewed by Maciej Stachowiak.
1921
1922         Don't exclude overlay scrollers from the page overlay bounds
1923         https://bugs.webkit.org/show_bug.cgi?id=53924
1924
1925         Don't subtract the scrollbars from the page overlay bounds if
1926         overlay scrollers are enabled.
1927
1928         * WebProcess/WebPage/PageOverlay.cpp:
1929         (WebKit::PageOverlay::bounds):
1930
1931 2011-02-07  Adam Roben  <aroben@apple.com>
1932
1933         Windows build fix after r77794
1934
1935         * win/WebKit2.def: Export WebCore symbols used by WebKitTestRunner.
1936
1937 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
1938
1939         Reviewed by Antti Koivisto.
1940
1941         Add WKURLRequestCopyURL API (needed for tests and also generally useful)
1942         https://bugs.webkit.org/show_bug.cgi?id=53909
1943
1944         * Shared/API/c/WKURLRequest.cpp:
1945         (WKURLRequestCopyURL):
1946         * Shared/API/c/WKURLRequest.h:
1947         * Shared/WebURLRequest.h:
1948         (WebKit::WebURLRequest::url):
1949
1950 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1951
1952         Unreviewed; speculative Qt build fix.
1953
1954         * WebKit2.pro:
1955
1956 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1957
1958         Reviewed by Darin Adler.
1959
1960         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
1961         https://bugs.webkit.org/show_bug.cgi?id=52867
1962
1963         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
1964         (WebKit::NetscapePluginModule::getPluginInfo): Calls adoptArrayPtr.
1965
1966 2011-02-06  Benjamin Poulain  <ikipou@gmail.com>
1967
1968         Reviewed by Andreas Kling.
1969
1970         [Qt] WebKit does not build on Mac with WebKit 2
1971         https://bugs.webkit.org/show_bug.cgi?id=53380
1972
1973         * Platform/CoreIPC/qt/ConnectionQt.cpp: Use fcntl() to set close on exec so
1974         we do not rely on recent kernel.
1975         (CoreIPC::Connection::readyReadHandler):
1976         * Platform/qt/SharedMemoryQt.cpp: ditto
1977         (WebKit::SharedMemory::create):
1978         (WebKit::SharedMemory::createHandle):
1979         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Guard prctl() since it is
1980         a Linux specific function.
1981         (WebKit::QtWebProcess::setupChildProcess):
1982         * UIProcess/DrawingAreaProxy.h: Differentiate between building on Mac
1983         and the Mac port.
1984         * UIProcess/DrawingAreaProxyImpl.cpp: ditto
1985         * UIProcess/WebPageProxy.cpp: ditto
1986         (WebKit::WebPageProxy::didReceiveMessage):
1987         * WebProcess/WebPage/DrawingArea.cpp: ditto
1988         (WebKit::DrawingArea::create):
1989         * WebProcess/WebPage/DrawingArea.h:
1990         * WebProcess/WebPage/DrawingAreaImpl.cpp: ditto
1991         * WebProcess/WebPage/WebPage.cpp: ditto
1992         (WebKit::WebPage::didReceiveMessage):
1993
1994 2011-02-05  Maciej Stachowiak  <mjs@apple.com>
1995
1996         Reviewed by Dan Bernstein.
1997
1998         REGRESSION: New drawing area is causing some WebProcess crashes in layout tests
1999         https://bugs.webkit.org/show_bug.cgi?id=53865
2000         <rdar://problem/8963148>
2001         
2002         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2003         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Handle the case
2004         where this is called repeatedly without exiting accelerated composting mode
2005         first.
2006         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Handle the case
2007         of being called more than once.
2008
2009 2011-02-05  Anders Carlsson  <andersca@apple.com>
2010
2011         Reviewed by Darin Adler.
2012
2013         Need a way to resize and scroll the page at the same time
2014         https://bugs.webkit.org/show_bug.cgi?id=53814
2015         <rdar://problem/8498008>
2016
2017         Add -[WKView setFrame:andScrollBy:].
2018
2019         * UIProcess/API/mac/WKView.h:
2020         * UIProcess/API/mac/WKView.mm:
2021         (-[WKView setFrame:andScrollBy:]):
2022         Stash away the scroll offset and call setFrame:.
2023
2024         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
2025         (-[WKView _setDrawingAreaSize:]):
2026         * UIProcess/API/qt/qwkpage.cpp:
2027         (QWKPage::setViewportSize):
2028         DrawingAreaProxy::setSize now takes a scroll offset.
2029
2030         * UIProcess/DrawingAreaProxy.cpp:
2031         (WebKit::DrawingAreaProxy::setSize):
2032         This now takes a scroll offset and stores it in m_scrollOffset.
2033
2034         * UIProcess/DrawingAreaProxy.h:
2035         * UIProcess/DrawingAreaProxyImpl.cpp:
2036         (WebKit::DrawingAreaProxyImpl::sendSetSize):
2037         Send along the scroll offset and set it back to zero.
2038
2039         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2040         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
2041         * UIProcess/TiledDrawingAreaProxy.cpp:
2042         (WebKit::TiledDrawingAreaProxy::didSetSize):
2043         * UIProcess/win/WebView.cpp:
2044         (WebKit::WebView::onSizeEvent):
2045         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
2046         DrawingAreaProxy::setSize now takes a scroll offset.
2047         
2048         * WebProcess/WebPage/DrawingArea.h:
2049         (WebKit::DrawingArea::setSize):
2050         Add a scrollOffset parameter.
2051
2052         * WebProcess/WebPage/DrawingArea.messages.in:
2053         Add a scroll offset parameter to the SetSize message.
2054
2055         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2056         (WebKit::DrawingAreaImpl::setSize):
2057         Call WebPage::scrollMainFrameIfNotAtMaxScrollPosition.
2058
2059         * WebProcess/WebPage/DrawingAreaImpl.h:
2060         * WebProcess/WebPage/WebPage.cpp:
2061         (WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition):
2062         Compute a scroll offset and call setScrollPosition on the main frame view.
2063
2064 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
2065
2066         Reviewed by Maciej Stachowiak.
2067
2068         WebKit2: Crash when InjectedBundlePageLoaderClient::willSendRequestForFrame returns a null WKURLRequestRef
2069         https://bugs.webkit.org/show_bug.cgi?id=53829
2070         
2071         Store the result of m_client.willSendRequestForFrame in a RefPtr, and null check it before
2072         calling resourceRequest() on it.
2073
2074         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2075         (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
2076
2077 2011-02-04  Anders Carlsson  <andersca@apple.com>
2078
2079         Fix build.
2080
2081         * WebProcess/mac/WebProcessMac.mm:
2082
2083 2011-02-04  Anders Carlsson  <andersca@apple.com>
2084
2085         Reviewed by Mark Rowe.
2086
2087         Link opened in background tab fails to paint when activated if it completes loading before tab is selected
2088         https://bugs.webkit.org/show_bug.cgi?id=53827
2089         <rdar://problem/8962355>
2090
2091         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2092         (WebKit::DrawingAreaImpl::resumePainting):
2093         Invalidate the entire page.
2094
2095 2011-02-04  Anders Carlsson  <andersca@apple.com>
2096
2097         Reviewed by Sam Weinig.
2098
2099         Fix <rdar://problem/8961227> WebKit2 does not work with symlinked home directories.
2100
2101         * WebProcess/mac/WebProcessMac.mm:
2102         (WebKit::WebProcess::platformSetCacheModel):
2103         Don't adopt an autoreleased pointer, this would lead to a crash.
2104
2105         (WebKit::appendSandboxParameterPath):
2106         (WebKit::appendSandboxParameterConfPath):
2107         (WebKit::initializeSandbox):
2108         Clean up the sandbox parameter code and make sure that realpath is called for all parameters.
2109
2110 2011-02-04  Sam Weinig  <sam@webkit.org>
2111
2112         Reviewed by Mark Rowe.
2113
2114         Sandbox violations when visiting a site using HTTP authentication
2115         <rdar://problem/8951079> 
2116
2117         * WebProcess/com.apple.WebProcess.sb:
2118
2119 2011-02-04  Alexey Proskuryakov  <ap@apple.com>
2120
2121         Reviewed by Darin Adler.
2122
2123         https://bugs.webkit.org/show_bug.cgi?id=53823
2124         Print layout sometimes seen on screen
2125
2126         <rdar://problem/8948742> REGRESSION (WebKit2) - When I print a page, I visually see it re-layout
2127         <rdar://problem/8899389> REGRESSION(WebKit2): Wrong content can appear when print dialog is up
2128
2129         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay): Removed a
2130         branch that didn't do anything useful.
2131
2132         * UIProcess/API/mac/WKPrintingView.h:
2133         * UIProcess/API/mac/WKPrintingView.mm:
2134         (-[WKPrintingView _suspendAutodisplay]):
2135         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
2136         (-[WKPrintingView _delayedResumeAutodisplay]):
2137         (-[WKPrintingView knowsPageRange:]):
2138         (-[WKPrintingView beginDocument]):
2139         (-[WKPrintingView endDocument]):
2140         When page setup changes, or when going from print preview to actual printing, AppKit calls
2141         -endDocument just to begin it again. Delay resuming autodisplay until the next run loop
2142         iteration.
2143
2144         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2145         (WebKit::WebChromeClient::invalidateContentsAndWindow):
2146         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
2147         Tightened it up from other side - we should never send pixels to UI process while in
2148         printing mode. This is not 100% reliable, because relayout doesn't happen immediately,
2149         and we can still have print layout in screen mode - but it helps.
2150
2151 2011-02-04  Sam Weinig  <sam@webkit.org>
2152
2153         Reviewed by Mark Rowe.
2154
2155         Fix for <rdar://problem/8961580>.
2156         Work around for <rdar://problem/8957845>.
2157
2158         * WebProcess/com.apple.WebProcess.sb:
2159
2160 2011-02-04  Darin Adler  <darin@apple.com>
2161
2162         Reviewed by Dan Bernstein.
2163
2164         WebKit2 doesn't hide mouse pointer on keypress
2165         https://bugs.webkit.org/show_bug.cgi?id=53821
2166         rdar://problem/8630895
2167
2168         * UIProcess/PageClient.h: Renamed didNotHandleKeyEvent to
2169         doneWithKeyEvent and added a bool wasEventHandled argument.
2170         * UIProcess/WebPageProxy.cpp:
2171         (WebKit::WebPageProxy::didReceiveEvent): Changed code to call
2172         doneWithKeyEvent and call even if event was handled.
2173
2174         * UIProcess/API/mac/PageClientImpl.h: Updated for above change.
2175         * UIProcess/API/mac/PageClientImpl.mm:
2176         (WebKit::PageClientImpl::doneWithKeyEvent): Ditto. But also
2177         call [NSCursor setHiddenUntilMouseMoves:YES] when a key down
2178         event was handled. This matches what -[WebHTMLView keyDown:] does.
2179         * UIProcess/API/qt/qwkpage.cpp:
2180         (QWKPagePrivate::doneWithKeyEvent): Ditto.
2181         * UIProcess/API/qt/qwkpage_p.h: Ditto.
2182         * UIProcess/win/WebView.cpp:
2183         (WebKit::WebView::doneWithKeyEvent): Ditto.
2184         * UIProcess/win/WebView.h: Ditto.
2185
2186 2011-02-04  Steve Falkenburg  <sfalken@apple.com>
2187
2188         Reviewed by Adam Roben.
2189
2190         WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit
2191         https://bugs.webkit.org/show_bug.cgi?id=53810
2192         <rdar://problem/8946085>
2193         
2194         If WebKit2WebProcess.exe is in a different directory from the client process, and that
2195         client process uses CreateProcess to launch WebKit2WebProcess, the DLL search path may
2196         end up excluding the directory containing WebKit. To address this, we use SetDllDirectory
2197         to explicitly include the WebKit directory in the DLL search path.
2198
2199         * win/MainWin.cpp:
2200         (wWinMain): Use SetDllDirectory and LoadLibrary to load WebKit.dll from WebKit2WebProcess.exe
2201         * win/WebKit2WebProcessCommon.vsprops: Don't link directly to WebKit. Link against shlwapi.
2202
2203 2011-02-04  Adam Roben  <aroben@apple.com>
2204
2205         Allow passing a null filter callback to WKPageCopySessionState
2206
2207         WebKit2 part of <http://webkit.org/b/53616> <rdar://problem/8949883>.
2208
2209         Reviewed by Sam Weinig.
2210
2211         * UIProcess/cf/WebBackForwardListCF.cpp:
2212         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Check if the filter is null
2213         before calling it.
2214
2215 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
2216
2217         Reviewed by John Sullivan.
2218
2219         WebKit2: DidInitiateLoadForResource needs to know if the resource is being loaded by a committed or provisional frame
2220         https://bugs.webkit.org/show_bug.cgi?id=53794
2221         
2222         When we navigate from one page to another, there can be multiple subresource requests between when
2223         the new page has started its provisional load and when it has committed the load.
2224         
2225         There can be:
2226         
2227         - The main resource load of the provisional page
2228         - Synchronous XHR from the unload event of the loaded page.
2229         
2230         WebKit clients need to be able to differentiate between these loads.
2231
2232         * UIProcess/API/C/WKPage.h:
2233         * UIProcess/WebPageProxy.cpp:
2234         (WebKit::WebPageProxy::didInitiateLoadForResource): Pass whether or not the page is provisionally loading
2235             to the client.
2236         * UIProcess/WebPageProxy.h:
2237         * UIProcess/WebPageProxy.messages.in: Add a new parameter to DidInitiateLoadForResource.
2238         * UIProcess/WebResourceLoadClient.cpp:
2239         (WebKit::WebResourceLoadClient::didInitiateLoadForResource):  a new parameter to didInitiateLoadForResource.
2240         * UIProcess/WebResourceLoadClient.h:
2241         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2242         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Pass whether or not the page is currently
2243             in a provisional load (checked by seeing if the DocumentLoader matches the FrameLoader's provisionalDocumentLoader)
2244             to the UI Process.
2245
2246 2011-02-04  Anders Carlsson  <andersca@apple.com>
2247
2248         Reviewed by Mark Rowe.
2249
2250         Mac WebKit2 should use the new drawing area
2251         https://bugs.webkit.org/show_bug.cgi?id=53802
2252         <rdar://problem/7881419>
2253         <rdar://problem/7881447>
2254         <rdar://problem/8252632>
2255         <rdar://problem/8479422>
2256         <rdar://problem/8633813>
2257         <rdar://problem/8734512>
2258         <rdar://problem/8787660>
2259
2260         * UIProcess/API/mac/WKView.mm:
2261         (useNewDrawingArea):
2262         Return true. Eventually this function should be removed, but let's keep it for now so
2263         we can go back to the old drawing area if necessary.
2264
2265 2011-02-04  Maciej Stachowiak  <mjs@apple.com>
2266
2267         Reviewed by Anders Carlsson.
2268
2269         WebKit2: Crash in WebPageProxy::setPendingAPIRequestURL after web process crashed
2270         https://bugs.webkit.org/show_bug.cgi?id=53799
2271         <rdar://problem/8943956>
2272
2273         * UIProcess/WebPageProxy.cpp:
2274         (WebKit::WebPageProxy::reload):
2275
2276 2011-02-04  Anders Carlsson  <andersca@apple.com>
2277
2278         Reviewed by Maciej Stachowiak.
2279
2280         Fix a shared memory leak
2281         https://bugs.webkit.org/show_bug.cgi?id=53800
2282
2283         Move the send right representing the shared memory.
2284
2285         * Platform/mac/SharedMemoryMac.cpp:
2286         (WebKit::SharedMemory::Handle::encode):
2287
2288 2011-02-04  Brady Eidson  <beidson@apple.com>
2289
2290         Reviewed by Anders Carlsson.
2291
2292         <rdar://problem/8636239> and https://bugs.webkit.org/show_bug.cgi?id=53785
2293         WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items.
2294
2295         WebCore doesn't gracefully handle the case where the decidePolicyForNavigationAction callback
2296         does not occur synchronously. Let's make it synchronous.
2297
2298         Change WebPageProxy to handle this message reply synchronously:
2299         * UIProcess/WebPageProxy.cpp:
2300         (WebKit::WebPageProxy::WebPageProxy):
2301         (WebKit::WebPageProxy::receivedPolicyDecision):
2302         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2303         * UIProcess/WebPageProxy.h:
2304         * UIProcess/WebPageProxy.messages.in: Make the navigation policy action message be synchronous.
2305
2306         * Platform/CoreIPC/HandleMessage.h:
2307         (CoreIPC::callMemberFunction): Add a 6-argument varient 
2308
2309         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2310         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the message synchronously.
2311
2312 2011-02-04  Steve Falkenburg  <sfalken@apple.com>
2313
2314         Windows build fix.
2315         Correct prebuild build-stopping rule to allow project only rebuilds.
2316
2317         * win/WebKit2WebProcessPreBuild.cmd:
2318
2319 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
2320
2321         Reviewed by Adam Roben.
2322
2323         Assertion failure in WebInspectorProxy::platformClose closing main window when inspecting a popup 
2324         window, or when running regression tests.
2325         https://bugs.webkit.org/show_bug.cgi?id=53798
2326         <rdar://problem/8814364>
2327         
2328         Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible.
2329         Also, only call ::DestroyWindow if the HWND is non-null, just to be safe.
2330
2331         * UIProcess/win/WebInspectorProxyWin.cpp:
2332         (WebKit::WebInspectorProxy::platformClose):
2333
2334 2011-02-04  Anders Carlsson  <andersca@apple.com>
2335
2336         Reviewed by Dan Bernstein.
2337
2338         Go out of accelerated compositing mode when the drawing area is destroyed
2339         https://bugs.webkit.org/show_bug.cgi?id=53788
2340
2341         This fixes a crash in the UI process if a web process crashes while in accelerated compositing mode.
2342
2343         * UIProcess/DrawingAreaProxyImpl.cpp:
2344         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
2345
2346 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
2347
2348         Reviewed by Pavel Feldman.
2349
2350         Web Inspector: remove settings related methods from InspectorClient
2351         https://bugs.webkit.org/show_bug.cgi?id=53686
2352
2353         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2354         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
2355
2356 2011-02-03  Maciej Stachowiak  <mjs@apple.com>
2357
2358         Reviewed by Dan Bernstein.
2359
2360         WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
2361         https://bugs.webkit.org/show_bug.cgi?id=52897
2362         <rdar://problem/8898294>
2363
2364         * Shared/API/c/WKSharedAPICast.h:
2365         (WebKit::toAPI):
2366         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2367         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2368         (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
2369         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2370         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2371         (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
2372
2373 2011-02-03  Ivan Krstić  <ike@apple.com>
2374
2375         Reviewed by Maciej Stachowiak.
2376
2377         Make WebProcess pass explicit homedir parameter to the sandbox
2378         <rdar://problem/8405760>
2379         <https://webkit.org/b/53558>
2380
2381         * WebProcess/com.apple.WebProcess.sb:
2382         * WebProcess/mac/WebProcessMac.mm:
2383         (WebKit::initializeSandbox):
2384
2385 2011-02-03  James Kozianski  <koz@chromium.org>
2386
2387         Reviewed by Dimitri Glazkov.
2388
2389         Add navigator.registerProtocolHandler behind a flag.
2390         https://bugs.webkit.org/show_bug.cgi?id=52609
2391
2392         * Configurations/FeatureDefines.xcconfig:
2393
2394 2011-02-03  Adam Langley  <agl@chromium.org>
2395
2396         Reviewed by Adam Barth.
2397
2398         Plumb mixed script URL to FrameLoaderClient
2399         https://bugs.webkit.org/show_bug.cgi?id=52384
2400
2401         Regressions covered by http/tests/security/mixedContent/*
2402
2403         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2404         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
2405         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2406
2407 2011-02-03  Jon Honeycutt  <jhoneycutt@apple.com>
2408
2409         Download bundles should be moved to their final destination when they
2410         finish.
2411
2412         https://bugs.webkit.org/show_bug.cgi?id=53668
2413
2414         Reviewed by Adam Roben.
2415
2416         * WebProcess/Downloads/Download.cpp:
2417         (WebKit::Download::Download):
2418         Initialize m_allowOverwrite.
2419         (WebKit::Download::retrieveDestinationWithSuggestedFilename):
2420         Return the result of requesting the destination filename from the UI
2421         process.
2422         (WebKit::Download::decideDestinationWithSuggestedFilename):
2423         Call retrieveDestinationWithSuggestedFilename().
2424         (WebKit::Download::didFinish):
2425         Call platformDidFinish().
2426
2427         * WebProcess/Downloads/Download.h:
2428         Declare retrieveDestinationWithSuggestedFilename() and
2429         platformDidFinish(). Add a member variable to store whether the UI
2430         process would like us to overwrite existing files.
2431
2432         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2433         (WebKit::willResumeWithResponseCallback):
2434         Remove some trailing whitespace.
2435
2436         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2437         (WebKit::Download::platformDidFinish):
2438         Stubbed.
2439
2440         * WebProcess/Downloads/mac/DownloadMac.mm:
2441         (WebKit::Download::platformDidFinish):
2442         Stubbed.
2443
2444         * WebProcess/Downloads/qt/DownloadQt.cpp:
2445         (WebKit::Download::platformDidFinish):
2446         Stubbed.
2447
2448         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp:
2449         (WebKit::Download::didDecideDestination):
2450         Store whether the UI process would like us to overwrite existing files.
2451         (WebKit::Download::platformDidFinish):
2452         Try to move the bundle to the final destination. If that fails, ask the
2453         UI process for a new destination. If we receive one, try again to move
2454         the bundle. Call didCreateDestination() to report the updated path of
2455         file whether it's the bundle that we failed to move, or the new final
2456         destination.
2457
2458         This is similar to what is done by WebKit 1's CFNetwork port.
2459
2460         * win/WebKit2.vcproj:
2461         Add DownloadWin.cpp.
2462
2463 2011-02-01  Jon Honeycutt  <jhoneycutt@apple.com>
2464
2465         Small clean-up in DownloadCFNet.cpp.
2466
2467         Rubber-stamped by Mark Rowe.
2468
2469         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2470         (WebKit::Download::didDecideDestination):
2471         Moved out of the section labeled "CFURLDownload callbacks" and up near
2472         the other member functions.
2473
2474 2011-02-03  Anders Carlsson  <andersca@apple.com>
2475
2476         Reviewed by Sam Weinig.
2477
2478         Paint non-composited contents in a layer
2479         https://bugs.webkit.org/show_bug.cgi?id=53742
2480
2481         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2482         (WebKit::DrawingAreaImpl::setNeedsDisplay):
2483         Call LayerTreeHost::setNonCompositedContentsNeedDisplayInRect.
2484
2485         (WebKit::DrawingAreaImpl::scroll):
2486         Call LayerTreeHost::scrollNonCompositedContents.
2487
2488         (WebKit::DrawingAreaImpl::setSize):
2489         Call LayerTreeHost::sizeDidChange.
2490
2491         * WebProcess/WebPage/LayerTreeHost.h:
2492         Add new pure virtual member functions.
2493
2494         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2495         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2496         Create the non-composited content layer.
2497
2498         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
2499         Call setNeedsDisplay on the GraphicsLayer.
2500
2501         (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
2502         Just call setNonCompositedContentsNeedDisplayInRect.
2503
2504         (WebKit::LayerTreeHostMac::sizeDidChange):
2505         Resize the layers and flush any changes.
2506         
2507         (WebKit::LayerTreeHostMac::paintContents):
2508         Call WebPage::drawRect.
2509
2510         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
2511         Lay out the web page.
2512
2513         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
2514         Call syncCompositingStateForThisLayerOnly on the non-composited content layer.
2515
2516 2011-02-03  Anders Carlsson  <andersca@apple.com>
2517
2518         Reviewed by Sam Weinig.
2519
2520         When in accelerated compositing mode, wait for DidSetSize messages
2521         https://bugs.webkit.org/show_bug.cgi?id=53736
2522
2523         Normally we wait for DidSetSize messages from ::paint, but that's never called in 
2524         accelerated compositing mode so we just do it right after sending the SetSize message.
2525
2526         * UIProcess/DrawingAreaProxyImpl.cpp:
2527         (WebKit::DrawingAreaProxyImpl::paint):
2528         Call waitForAndDispatchDidSetSize.
2529
2530         (WebKit::DrawingAreaProxyImpl::sendSetSize):
2531         Call waitForAndDispatchDidSetSize when in accelerated compositing mode.
2532
2533         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize):
2534         New utility function which waits for and dispatches a DidSetSize message.
2535
2536         * UIProcess/DrawingAreaProxyImpl.h:
2537
2538 2011-02-03  Anders Carlsson  <andersca@apple.com>
2539
2540         Reviewed by Dan Bernstein.
2541
2542         Pass along an UpdateInfo object to the ExitAcceleratedCompositingMode message
2543         https://bugs.webkit.org/show_bug.cgi?id=53734
2544
2545         * UIProcess/DrawingAreaProxy.h:
2546         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
2547         Add an UpdateInfo parameter.
2548
2549         * UIProcess/DrawingAreaProxy.messages.in:
2550         Add an UpdateInfo parameter to the ExitAcceleratedCompositingMode message.
2551
2552         * UIProcess/DrawingAreaProxyImpl.cpp:
2553         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2554         Incorporate the passed in update.
2555
2556         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2557         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2558         Create a new UpdateInfo object, paint into it and pass it along as a parameter
2559         to the ExitAcceleratedCompositingMode message.
2560
2561 2011-02-03  Beth Dakin  <bdakin@apple.com>
2562
2563         Reviewed by Sam Weinig.
2564
2565         Fix for <rdar://problem/8944544> Ability to animate track
2566         for WKPainter scrollers
2567
2568         * WebCoreSupport/WebSystemInterface.mm:
2569         (InitWebCoreSystemInterface):
2570
2571 2011-02-03  Anders Carlsson  <andersca@apple.com>
2572
2573         Reviewed by Dan Bernstein.
2574
2575         Change DidSetSize to take a LayerTreeContext parameter
2576         https://bugs.webkit.org/show_bug.cgi?id=53724
2577
2578         Since SetSize can cause layout to happen, we need to pass along a layer tree context to 
2579         the DidSetSize message so the UI process can enter/exit accelerated compositing mode appropriately.
2580         
2581         * Shared/LayerTreeContext.h:
2582         * Shared/mac/LayerTreeContextMac.mm:
2583         Add equality operators to LayerTreeContext.
2584
2585         * UIProcess/DrawingAreaProxy.h:
2586         (WebKit::DrawingAreaProxy::didSetSize):
2587         This now takes a LayerTreeContext parameter.
2588         
2589         * UIProcess/DrawingAreaProxy.messages.in:
2590         Add LayerTreeContext parameter.
2591
2592         * UIProcess/DrawingAreaProxyImpl.cpp:
2593         Get rid of m_isInAcceleratedCompositingMode and use the current layer context instead.
2594
2595         (WebKit::DrawingAreaProxyImpl::paint):
2596         Bail if the call to DidSetSize ended up entering accelerated compositing mode.
2597
2598         (WebKit::DrawingAreaProxyImpl::didSetSize):
2599         If the new layer tree context is different, enter/exit accelerated compositing mode accordingly.
2600
2601         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2602         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2603         Update the layer tree context.
2604
2605         * UIProcess/DrawingAreaProxyImpl.h:
2606         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
2607         Add simple getter.
2608
2609         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2610         (WebKit::DrawingAreaImpl::setSize):
2611         Pass along the layer tree context.
2612
2613 2011-02-03  Anders Carlsson  <andersca@apple.com>
2614
2615         Reviewed by Dan Bernstein.
2616
2617         Get rid of LayerTreeContext::seed on Mac.
2618         Add sequence checks to enterAcceleratedCompositingMode and exitAcceleratedCompositingMode and
2619         have them call newly added overloads that don't have the checks.
2620
2621         * Shared/LayerTreeContext.h:
2622         * Shared/mac/LayerTreeContextMac.mm:
2623         (WebKit::LayerTreeContext::LayerTreeContext):
2624         (WebKit::LayerTreeContext::encode):
2625         (WebKit::LayerTreeContext::decode):
2626         * UIProcess/DrawingAreaProxyImpl.cpp:
2627         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2628         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2629         * UIProcess/DrawingAreaProxyImpl.h:
2630         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2631         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2632
2633 2011-02-03  Anders Carlsson  <andersca@apple.com>
2634
2635         Reviewed by Dan Bernstein.
2636
2637         Get rid of timestamps in UpdateInfo
2638         https://bugs.webkit.org/show_bug.cgi?id=53713
2639
2640         Add a 64-bit sequence number to all DrawingAreaProxy messages, and use it to
2641         check whether Update messages should be handled or not.
2642
2643         * Shared/UpdateInfo.cpp:
2644         (WebKit::UpdateInfo::encode):
2645         (WebKit::UpdateInfo::decode):
2646         * Shared/UpdateInfo.h:
2647         (WebKit::UpdateInfo::UpdateInfo):
2648         * UIProcess/BackingStore.cpp:
2649         (WebKit::BackingStore::BackingStore):
2650         (WebKit::BackingStore::incorporateUpdate):
2651         * UIProcess/BackingStore.h:
2652         * UIProcess/DrawingAreaProxy.h:
2653         (WebKit::DrawingAreaProxy::update):
2654         (WebKit::DrawingAreaProxy::didSetSize):
2655         (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
2656         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
2657         * UIProcess/DrawingAreaProxy.messages.in:
2658         * UIProcess/DrawingAreaProxyImpl.cpp:
2659         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2660         (WebKit::DrawingAreaProxyImpl::update):
2661         (WebKit::DrawingAreaProxyImpl::didSetSize):
2662         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2663         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2664         * UIProcess/DrawingAreaProxyImpl.h:
2665         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2666         (WebKit::generateSequenceNumber):
2667         (WebKit::DrawingAreaImpl::setSize):
2668         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2669         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2670         (WebKit::DrawingAreaImpl::display):
2671
2672 2011-02-03  Anders Carlsson  <andersca@apple.com>
2673
2674         Reviewed by Darin Adler.
2675
2676         Don't send enter/exit accelerated compositing mode messages when handling setSize
2677         https://bugs.webkit.org/show_bug.cgi?id=53706
2678
2679         Don't send EnterAcceleratedCompositingMode/ExitAcceleratedCompositing mode when
2680         the mode changes happen as a result of relayout in setSize, since an updated state
2681         is going to be sent back in the DidSetSize message.
2682         
2683         * UIProcess/DrawingAreaProxyImpl.cpp:
2684         (WebKit::DrawingAreaProxyImpl::didSetSize):
2685         Add an assert.
2686
2687         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2688         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2689         Initialize m_inSetSize.
2690
2691         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
2692         Factor out code into enterAcceleratedCompositingMode and exitAcceleratedCompositingMode.
2693
2694         (WebKit::DrawingAreaImpl::setSize):
2695         Set m_inSetSize to true while handling setSize.
2696
2697         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2698         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2699         Take over the message sending responsibility from LayerTreeHostMac, and don't send messages
2700         if we're currently handling a SetSize message.
2701
2702         * WebProcess/WebPage/DrawingAreaImpl.h:
2703         Add m_inSetSize.
2704
2705         * WebProcess/WebPage/LayerTreeHost.h:
2706         Add layerTreeHost getter.
2707
2708         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2709         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2710         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2711         Don't send EnterAcceleratedCompositingMode messages.
2712
2713         (WebKit::LayerTreeHostMac::layerTreeContext):
2714         Add getter for the current layer tree context.
2715
2716         (WebKit::LayerTreeHostMac::invalidate):
2717         Don't send ExitAcceleratedCompositingMode messages.
2718
2719 2011-02-03  Anders Carlsson  <andersca@apple.com>
2720
2721         Reviewed by Sam Weinig.
2722
2723         Make the layer tree host keep track of the layer tree context
2724         https://bugs.webkit.org/show_bug.cgi?id=53698
2725
2726         Add a LayerTreeContext member variable to the LayerTreeHost object,
2727         and also add a seed count to the LayerTreeContext so we can keep track of 
2728         how layer tree contexts relate to each other.
2729
2730         * Shared/LayerTreeContext.h:
2731         * Shared/mac/LayerTreeContextMac.mm:
2732         (WebKit::LayerTreeContext::LayerTreeContext):
2733         (WebKit::LayerTreeContext::makeWithSeed):
2734         (WebKit::LayerTreeContext::encode):
2735         (WebKit::LayerTreeContext::decode):
2736
2737         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2738         Add the layer tree context as a member variable.
2739
2740         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2741         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2742         Initialize the layer tree context.
2743
2744 2011-02-03  Sam Weinig  <sam@webkit.org>
2745
2746         Fix Qt build.
2747
2748         * UIProcess/API/qt/qwkpage.cpp:
2749         (QWKPage::QWKPage):
2750
2751 2011-02-02  Sam Weinig  <sam@webkit.org>
2752
2753         Reviewed by Anders Carlsson.
2754
2755         Add notification of the end of a rubber band.
2756         <rdar://problem/8940648>
2757
2758         * UIProcess/API/C/WKPage.h:
2759         * UIProcess/WebPageProxy.cpp:
2760         (WebKit::WebPageProxy::drawHeader):
2761         (WebKit::WebPageProxy::drawFooter):
2762         (WebKit::WebPageProxy::didCompleteRubberBandForMainFrame):
2763         * UIProcess/WebPageProxy.h:
2764         * UIProcess/WebPageProxy.messages.in:
2765         * UIProcess/WebUIClient.cpp:
2766         (WebKit::WebUIClient::didCompleteRubberBandForMainFrame):
2767         * UIProcess/WebUIClient.h:
2768         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2769         (WebKit::WebChromeClient::didCompleteRubberBandForMainFrame):
2770         * WebProcess/WebCoreSupport/WebChromeClient.h:
2771         Pipe the notification up to the WKUIClient.
2772
2773 2011-02-03  Sheriff Bot  <webkit.review.bot@gmail.com>
2774
2775         Unreviewed, rolling out r77449.
2776         http://trac.webkit.org/changeset/77449
2777         https://bugs.webkit.org/show_bug.cgi?id=53663
2778
2779         causes many WebKit2 tests to crash (Requested by othermaciej
2780         on #webkit).
2781
2782         * Shared/API/c/WKSharedAPICast.h:
2783         (WebKit::toAPI):
2784         (WebKit::toCopiedAPI):
2785         (WebKit::toURLRef):
2786         (WebKit::toCopiedURLAPI):
2787         * Shared/WebString.h:
2788         (WebKit::WebString::isNull):
2789         (WebKit::WebString::WebString):
2790
2791 2011-02-02  Sam Weinig  <sam@webkit.org>
2792
2793         Fix license block issues pointed out by Daniel Bates.
2794
2795         * Shared/API/c/WKGraphicsContext.cpp:
2796         * Shared/API/c/WKGraphicsContext.h:
2797         * Shared/API/c/cg/WKGraphicsContextCG.cpp:
2798         * Shared/API/c/cg/WKGraphicsContextCG.h:
2799         * Shared/WebGraphicsContext.cpp:
2800
2801 2011-02-02  Sam Weinig  <sam@webkit.org>
2802
2803         Reviewed by Dan Bernstein.
2804
2805         Add WKBundleFrameGetVisibleContentBoundsExcludingScrollbars API for WebKit2.
2806
2807         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2808         (WKBundleFrameGetContentBounds):
2809         (WKBundleFrameGetVisibleContentBounds):
2810         (WKBundleFrameGetVisibleContentBoundsExcludingScrollbars):
2811         (WKBundleFrameGetScrollOffset):
2812         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2813         * WebProcess/WebPage/WebFrame.cpp:
2814         (WebKit::WebFrame::contentBounds):
2815         (WebKit::WebFrame::visibleContentBounds):
2816         (WebKit::WebFrame::visibleContentBoundsExcludingScrollbars):
2817         (WebKit::WebFrame::scrollOffset):
2818         * WebProcess/WebPage/WebFrame.h:
2819         Move implementation of frame geometry to the implementation file
2820         instead of keeping it in the API file.
2821
2822 2011-02-02  Stephanie Lewis  <slewis@apple.com>
2823
2824         Reviewed by Geoff Garen.
2825
2826         https://bugs.webkit.org/show_bug.cgi?id=53361
2827         <rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease 
2828         pools not being drained.
2829         Call into AppKit to add observers that push and pop autorelease pools on entry 
2830         and exit from the CFRunLoop.  This will prevent memory from accumulating.
2831
2832         * WebProcess/mac/WebProcessMainMac.mm:
2833         (WebKit::WebProcessMain):
2834
2835 2011-02-02  Darin Adler  <darin@apple.com>
2836
2837         Reviewed by Sam Weinig.
2838
2839         Make null WTF::String objects turn into 0 pointers for WKStringRef and WKURLRef.
2840         rdar://problem/8948688
2841
2842         * Shared/API/c/WKSharedAPICast.h:
2843         (WebKit::toAPI): Return 0 if the passed in string is 0.
2844         (WebKit::toCopiedAPI): Ditto.
2845         (WebKit::toURLRef): Ditto. Old code was trying to do this but was missing a return.
2846         (WebKit::toCopiedURLAPI): Ditto. Old code was trying to do this but had incorrect
2847         nll check.
2848
2849         * Shared/WebString.h: Removed isNull function. It can never return true.
2850         Removed constructor code that turns the null string into the empty string.
2851         Instead assert that the passed in string is not null.
2852
2853 2011-02-02  Mark Rowe  <mrowe@apple.com>
2854
2855         Reviewed by Beth Dakin.
2856
2857         <rdar://problem/8928367> Crash when loading canvas pages inside HTMLCanvasElement::createImageBuffer().
2858
2859         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2860         (InitWebCoreSystemInterface): Add some missing initializers.
2861
2862 2011-02-02  Sam Weinig  <sam@webkit.org>
2863
2864         Reviewed by Beth Dakin.
2865
2866         Add ChromeClient function to paint custom overhang areas.
2867         https://bugs.webkit.org/show_bug.cgi?id=53639
2868
2869         * Shared/API/c/WKBase.h:
2870         * Shared/API/c/WKGraphicsContext.cpp: Added.
2871         (WKGraphicsContextGetTypeID):
2872         * Shared/API/c/WKGraphicsContext.h: Added.
2873         * Shared/API/c/WKSharedAPICast.h:
2874         * Shared/API/c/cg/WKGraphicsContextCG.cpp: Added.
2875         (WKGraphicsContextGetCGContext):
2876         * Shared/API/c/cg/WKGraphicsContextCG.h: Added.
2877         * Shared/APIObject.h:
2878         * Shared/WebGraphicsContext.cpp: Added.
2879         (WebKit::WebGraphicsContext::WebGraphicsContext):
2880         * Shared/WebGraphicsContext.h: Added.
2881         (WebKit::WebGraphicsContext::create):
2882         (WebKit::WebGraphicsContext::platformContext):
2883         (WebKit::WebGraphicsContext::type):
2884         Add WebGraphicsContext API type.
2885
2886         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2887         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2888         (WebKit::InjectedBundlePageUIClient::pageDidScroll):
2889         (WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea):
2890         (WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea):
2891         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2892         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2893         (WebKit::WebChromeClient::paintCustomOverhangArea):
2894         * WebProcess/WebCoreSupport/WebChromeClient.h:
2895         Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient.
2896
2897         * UIProcess/API/C/WebKit2.h:
2898         * WebKit2.pro:
2899         * WebKit2.xcodeproj/project.pbxproj:
2900         * win/WebKit2.vcproj:
2901         * win/WebKit2Generated.make:
2902         Add new files.
2903
2904 2011-02-02  Anders Carlsson  <andersca@apple.com>
2905
2906         Reviewed by Dan Bernstein.
2907
2908         Work towards making the layer tree host be in charge of all painting
2909         https://bugs.webkit.org/show_bug.cgi?id=53636
2910
2911         Make sure that DrawingAreaImpl::display is never called when in accelerated compositing mode,
2912         since the layer tree host is supposed to handle all drawing in that case.
2913
2914         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2915         (WebKit::DrawingAreaImpl::scroll):
2916         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
2917         (WebKit::DrawingAreaImpl::setSize):
2918         (WebKit::DrawingAreaImpl::didUpdate):
2919
2920 2011-02-02  Mark Rowe  <mrowe@apple.com>
2921
2922         Fix the 32-bit build.
2923
2924         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2925         (WebKit::computeFakeWindowBoundsRect):
2926
2927 2011-02-02  Anders Carlsson  <andersca@apple.com>
2928
2929         Reviewed by Sam Weinig.
2930
2931         Make sure that we don't try to call display() when in accelerated compositing mode
2932         https://bugs.webkit.org/show_bug.cgi?id=53629
2933
2934         When in accelerated compositing mode, the layer tree host should handle all painting, so make sure that display() is never called.
2935
2936         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2937         (WebKit::DrawingAreaImpl::setNeedsDisplay):
2938         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
2939         (WebKit::DrawingAreaImpl::display):
2940
2941 2011-02-02  Adam Roben  <aroben@apple.com>
2942
2943         Assert WebBackForwardList's current index is valid to help catch errors
2944
2945         Hopefully this will help catch a crash I saw once but haven't yet been able to reproduce.
2946
2947         Fixes <http://webkit.org/b/53622>.
2948
2949         Reviewed by Brady Eidson.
2950
2951         * UIProcess/WebBackForwardList.cpp:
2952         (WebKit::WebBackForwardList::WebBackForwardList):
2953         (WebKit::WebBackForwardList::addItem):
2954         (WebKit::WebBackForwardList::goToItem):
2955         (WebKit::WebBackForwardList::currentItem):
2956         (WebKit::WebBackForwardList::backItem):
2957         (WebKit::WebBackForwardList::forwardItem):
2958         (WebKit::WebBackForwardList::itemAtIndex):
2959         (WebKit::WebBackForwardList::backListCount):
2960         (WebKit::WebBackForwardList::forwardListCount):
2961         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
2962         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
2963         (WebKit::WebBackForwardList::clear):
2964         * UIProcess/cf/WebBackForwardListCF.cpp:
2965         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
2966         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
2967         Assert that m_current is valid.
2968
2969         * UIProcess/WebBackForwardList.h: Moved the NoCurrentItemIndex to a static data member so
2970         that it can be used from WebBackForwardListCF.cpp.
2971
2972 2011-02-02  Anders Carlsson  <andersca@apple.com>
2973
2974         Reviewed by Sam Weinig.
2975
2976         The drawing area proxy should keep track of the accelerated compositing state
2977         https://bugs.webkit.org/show_bug.cgi?id=53624
2978
2979         * UIProcess/DrawingAreaProxyImpl.cpp:
2980         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2981         Initialize m_isInAcceleratedCompositingMode to false.
2982
2983         (WebKit::DrawingAreaProxyImpl::paint):
2984         Don't try to paint if we're in accelerated compositing mode.
2985
2986         (WebKit::DrawingAreaProxyImpl::didSetSize):
2987         Bail if we're in accelerated compositing mode.
2988
2989         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2990         Set m_isInAcceleratedCompositingMode to true, null out the backing store.
2991
2992         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2993         Set m_isInAcceleratedCompositingMode back to false.
2994
2995         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2996         Assert that we're not in accelerated compositing mode.
2997
2998         * UIProcess/DrawingAreaProxyImpl.h:
2999
3000 2011-02-02  Timothy Hatcher  <timothy@apple.com>
3001
3002         Give the Web Process access to the Safari RSS preferences.
3003
3004         <rdar://problem/8916870> Sandbox violation related to RSS during initial
3005         page load with WebKit2 (prevents RSS from working)
3006
3007         Reviewed by Darin Adler.
3008
3009         * WebProcess/com.apple.WebProcess.sb:
3010
3011 2011-02-02  Steve Lacey  <sjl@chromium.org>
3012
3013         Reviewed by Eric Carlson.
3014
3015         Implement basic media statistics on media elements.
3016         https://bugs.webkit.org/show_bug.cgi?id=53322
3017
3018         * Configurations/FeatureDefines.xcconfig:
3019
3020 2011-02-01  Alexey Proskuryakov  <ap@apple.com>
3021
3022         Reviewed by Sam Weinig.
3023
3024         https://bugs.webkit.org/show_bug.cgi?id=53561
3025         <rdar://problem/8900228> Stepping through print previews in WebKit2 mode steps in and out of
3026         printing mode a lot
3027
3028         Disable NSView autodisplay, so that -[WKView drawRect:] isn't called (other than when
3029         resizing the window), so that we don't have to switch modes all the time.
3030
3031         * UIProcess/API/mac/PageClientImpl.h:
3032         * UIProcess/API/mac/PageClientImpl.mm:
3033         (WebKit::PageClientImpl::setAutodisplay):
3034         * UIProcess/PageClient.h:
3035         * UIProcess/WebPageProxy.cpp:
3036         (WebKit::WebPageProxy::setAutodisplay):
3037         * UIProcess/WebPageProxy.h:
3038         Pipe the call from WKPrintingView down to WKView.
3039
3040         * UIProcess/API/mac/WKPrintingView.mm:
3041         (-[WKPrintingView beginDocument]): Added. We don't want to autodisplay WKView while printing,
3042         because layout is changed to print at the time, and drawing to screen requires relayout.
3043         
3044         (-[WKPrintingView endDocument]): When not printing, turn autodisplay back on. Also, call
3045         -[super endDocument] for unknown but definitive good (oops!).
3046
3047 2011-02-02  David Hyatt  <hyatt@apple.com>
3048
3049         Reviewed by Darin Adler.
3050
3051         Conversion of right()/bottom() to maxX()/maxY() as part of the removal of those accessors.
3052
3053         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3054         (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
3055         * UIProcess/win/WebView.cpp:
3056         (WebKit::WebView::prepareCandidateWindow):
3057         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3058         (WebKit::NetscapePlugin::platformGeometryDidChange):
3059
3060 2011-02-01  Darin Adler  <darin@apple.com>
3061
3062         Reviewed by Anders Carlsson.
3063
3064         Overflow in WebKit2 argument decoder buffer checking
3065         https://bugs.webkit.org/show_bug.cgi?id=53536
3066
3067         * Platform/CoreIPC/ArgumentDecoder.cpp:
3068         (CoreIPC::roundUpToAlignment): Tweak code a bit for clarity and to replace
3069         C casts with C++ casts.
3070         (CoreIPC::ArgumentDecoder::alignBufferPosition): Rearrange buffer calculation
3071         so we don't do any math with the passed-in size, because that could overflow.
3072         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain): Ditto.
3073
3074 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
3075
3076         Unreviewed.
3077
3078         Fix Qt build after r77339.
3079
3080         * UIProcess/API/qt/qwkpage.cpp:
3081         (QWKPagePrivate::enterAcceleratedCompositingMode):
3082         (QWKPagePrivate::exitAcceleratedCompositingMode):
3083         * UIProcess/API/qt/qwkpage_p.h:
3084
3085 2011-02-01  Anders Carlsson  <andersca@apple.com>
3086
3087         Reviewed by Dan Bernstein.
3088
3089         Attach the layer tree in the UI process
3090         https://bugs.webkit.org/show_bug.cgi?id=53560
3091
3092         * UIProcess/API/mac/WKView.mm:
3093         (-[WKView _enterAcceleratedCompositingMode:]):
3094         Make a render layer and add it as a sublayer of our root layer.
3095
3096         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3097         Make LayerTreeHostMac a GraphicsLayerClient.
3098
3099         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3100         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
3101         Create a root layer, add the layer subtree as a child of the root layer.
3102
3103         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
3104         Assert that m_rootLayer is null.
3105
3106         (WebKit::LayerTreeHostMac::invalidate):
3107         Null out m_rootLayer.
3108
3109         (WebKit::LayerTreeHostMac::notifyAnimationStarted):
3110         (WebKit::LayerTreeHostMac::notifySyncRequired):
3111         (WebKit::LayerTreeHostMac::paintContents):
3112         Add stubs.
3113
3114         (WebKit::LayerTreeHostMac::showDebugBorders):
3115         (WebKit::LayerTreeHostMac::showRepaintCounter):
3116         Return the correct settings.
3117
3118         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
3119         Flush the root layer changes.
3120
3121 2011-02-01  Anders Carlsson  <andersca@apple.com>
3122
3123         Fix Windows build.
3124
3125         * UIProcess/win/WebView.cpp:
3126         (WebKit::WebView::enterAcceleratedCompositingMode):
3127         (WebKit::WebView::exitAcceleratedCompositingMode):
3128         * UIProcess/win/WebView.h:
3129
3130 2011-02-01  Anders Carlsson  <andersca@apple.com>
3131
3132         Reviewed by Dan Bernstein.
3133
3134         Add a layer backed NSView for accelerated content
3135         https://bugs.webkit.org/show_bug.cgi?id=53555
3136
3137         Rename the current _layerHostingView to _oldLayerHostingView and
3138         add a new _layerHostingView to be used with the new drawing area.
3139
3140         * UIProcess/API/mac/WKView.mm:
3141         (-[WKView hitTest:]):
3142         (-[WKView _startAcceleratedCompositing:]):
3143         (-[WKView _stopAcceleratedCompositing]):
3144         (-[WKView _enterAcceleratedCompositingMode:]):
3145         (-[WKView _exitAcceleratedCompositingMode]):
3146
3147 2011-02-01  Anders Carlsson  <andersca@apple.com>
3148
3149         Reviewed by Dan Bernstein.
3150
3151         Pass enter/exit accelerated compositing mode to the WKView
3152         https://bugs.webkit.org/show_bug.cgi?id=53552
3153
3154         * UIProcess/API/mac/PageClientImpl.h:
3155         * UIProcess/API/mac/PageClientImpl.mm:
3156         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
3157         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
3158         * UIProcess/API/mac/WKView.mm:
3159         (-[WKView _enterAcceleratedCompositingMode:]):
3160         (-[WKView _exitAcceleratedCompositingMode]):
3161         * UIProcess/API/mac/WKViewInternal.h:
3162         * UIProcess/DrawingAreaProxyImpl.cpp:
3163         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3164         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
3165         * UIProcess/PageClient.h:
3166         * UIProcess/WebPageProxy.cpp:
3167         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
3168         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
3169         * UIProcess/WebPageProxy.h:
3170
3171 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
3172
3173         Unreviewed Qt buildfix after r77286.
3174
3175         https://bugs.webkit.org/show_bug.cgi?id=53520 
3176         Remove the physical terminology from IntRect and FloatRect.
3177
3178         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
3179         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
3180
3181 2011-02-01  Anders Carlsson  <andersca@apple.com>
3182
3183         Reviewed by Adam Roben.
3184
3185         Send messages when entering/exiting accelerated compositing
3186         https://bugs.webkit.org/show_bug.cgi?id=53534
3187
3188         * Shared/LayerTreeContext.h: Added.
3189         * Shared/mac/LayerTreeContextMac.mm: Added.
3190         Add new LayerTreeContext which holds all information needed to enter
3191         accelerated compositing mode.
3192
3193         * UIProcess/DrawingAreaProxy.h:
3194         (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
3195         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
3196         Add empty stubs.
3197
3198         * UIProcess/DrawingAreaProxy.messages.in:
3199         Add new messgaes.
3200
3201         * UIProcess/DrawingAreaProxyImpl.cpp:
3202         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3203         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
3204         * UIProcess/DrawingAreaProxyImpl.h:
3205         Add empty stubs.
3206
3207         * WebKit2.xcodeproj/project.pbxproj:
3208         Add new files.
3209
3210         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3211         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3212         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
3213         (WebKit::LayerTreeHostMac::invalidate):
3214         Send messages.
3215
3216 2011-02-01  Alexey Proskuryakov  <ap@apple.com>
3217
3218         Reviewed by Dan Bernstein and Darin Adler.
3219
3220         <rdar://problem/8830594> Printed page is sometimes shifted down, making footer invisible
3221
3222         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView locationOfPrintRect:]): Instead of
3223         letting AppKit compute content position on page, make the view provide it. We can do this
3224         because WK(Printing)Views are always printed on their own, not as part of other views.
3225
3226 2011-02-01  Anders Carlsson  <andersca@apple.com>
3227
3228         Reviewed by Adam Roben.
3229
3230         Make LayerTreeHost ref counted
3231         https://bugs.webkit.org/show_bug.cgi?id=53530
3232
3233         LayerTreeHostMac will soon be able to trigger layout, which could cause
3234         the page to leave accelerated compositing mode and free the LayerTreeHostMac object.
3235
3236         Making LayerTreeHost ref counted will let LayerTreeHostMac protect itself while triggering layout.
3237
3238         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3239         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
3240         * WebProcess/WebPage/DrawingAreaImpl.h:
3241         * WebProcess/WebPage/LayerTreeHost.cpp:
3242         (WebKit::LayerTreeHost::create):
3243         * WebProcess/WebPage/LayerTreeHost.h:
3244         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3245         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3246         (WebKit::LayerTreeHostMac::create):
3247         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
3248         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
3249         (WebKit::LayerTreeHostMac::invalidate):
3250
3251 2011-02-01  Sam Weinig  <sam@webkit.org>
3252
3253         Reviewed by Beth Dakin.
3254
3255         Part 2 for <rdar://problem/8492788>
3256         Adopt WKScrollbarPainterController
3257
3258         Use header detection to define scrollbar painting controller #define.
3259
3260         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3261         (InitWebCoreSystemInterface):
3262
3263 2011-02-01  David Hyatt  <hyatt@apple.com>
3264
3265         Reviewed by Oliver Hunt.
3266
3267         https://bugs.webkit.org/show_bug.cgi?id=53520
3268         
3269         Remove the physical terminology from IntRect and FloatRect.
3270         
3271         Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
3272         we need to update our terminology to be more accurate.
3273
3274         I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
3275         renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
3276         even for flipped rectangles.
3277
3278         * Platform/Region.cpp:
3279         (WebKit::Region::Shape::Shape):
3280         * UIProcess/API/mac/WKPrintingView.mm:
3281         (pageDidComputePageRects):
3282         * UIProcess/FindIndicator.cpp:
3283         (WebKit::FindIndicator::draw):
3284         * UIProcess/TiledDrawingAreaProxy.cpp:
3285         (WebKit::TiledDrawingAreaProxy::invalidate):
3286         (WebKit::TiledDrawingAreaProxy::paint):
3287         (WebKit::TiledDrawingAreaProxy::createTiles):
3288         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
3289         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
3290         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3291         (WebKit::NetscapePlugin::callSetWindow):
3292
3293 2011-02-01  Anders Carlsson  <andersca@apple.com>
3294
3295         Reviewed by Adam Roben.
3296
3297         Move flushPendingLayerChanges to LayerTreeHostMac
3298         https://bugs.webkit.org/show_bug.cgi?id=53525
3299
3300         In preparation for adding more Mac specific code to flushPendingLayerChanges.
3301
3302         * WebProcess/WebPage/LayerTreeHost.cpp:
3303         * WebProcess/WebPage/LayerTreeHost.h:
3304         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3305         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3306         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
3307
3308 2011-02-01  Beth Dakin  <bdakin@apple.com>
3309
3310         Reviewed by Sam Weinig.
3311
3312         Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
3313
3314         Implement NSView's viewWillStartLiveResize and
3315         viewDidEndLiveResize and propagate the messages down
3316         to WebCore.
3317         * UIProcess/API/mac/WKView.mm:
3318         (-[WKView viewWillStartLiveResize]):
3319         (-[WKView viewDidEndLiveResize]):
3320         * UIProcess/WebPageProxy.cpp:
3321         (WebKit::WebPageProxy::viewWillStartLiveResize):
3322         (WebKit::WebPageProxy::viewWillEndLiveResize):
3323         * UIProcess/WebPageProxy.h:
3324         * WebProcess/WebPage/WebPage.cpp:
3325         (WebKit::WebPage::viewWillStartLiveResize):
3326         (WebKit::WebPage::viewWillEndLiveResize):
3327         * WebProcess/WebPage/WebPage.h:
3328         * WebProcess/WebPage/WebPage.messages.in:
3329
3330         A bunch of new WebKitSystemInterface functions.
3331         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3332         (InitWebCoreSystemInterface):
3333
3334 2011-02-01  Dave Hyatt  <hyatt@apple.com>
3335
3336         Reviewed by Darin Adler.
3337
3338         https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
3339         with vertical text.
3340
3341         Change printing functions to check writing-mode and properly swap width and height
3342         as needed.
3343
3344         * WebProcess/WebPage/WebPage.cpp:
3345         (WebKit::WebPage::computePagesForPrinting):
3346
3347 2011-01-31  Alexey Proskuryakov  <ap@apple.com>
3348
3349         Reviewed by Maciej Stachowiak.
3350
3351         https://bugs.webkit.org/show_bug.cgi?id=53466
3352         Move WebKit2 to printing via API methods
3353
3354         Also fixes <rdar://problem/8933724> REGRESSION: Wrong pages are printed when not printing from page 1
3355
3356         Also fixes horizontal tiling (no bug filed).
3357
3358         The main idea here is that we don't force AppKit to use a different scaling factor when
3359         a Web view can't be resized to exact page size, and scale when drawing instead.
3360
3361         * UIProcess/API/mac/WKPrintingView.mm:
3362         (-[WKPrintingView _firstPrintedPageNumber]): Factored out into a separate method.
3363         (-[WKPrintingView _lastPrintedPageNumber]): Ditto.
3364         (pageDidDrawToPDF): Avoid crashing if data is null.
3365         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Use -_firstPrintedPageNumber
3366         and -_lastPrintedPageNumber.
3367         (pageDidComputePageRects): Set frame size to what it would have been for a normal NSView
3368         that's been asked to resize.
3369         (-[WKPrintingView _pageForRect:]): Check x(), because several pages can be at the same y()
3370         when tiling horizontally.
3371         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Point to draw at and frame size are
3372         now using different units, translate as appropriate.
3373         (-[WKPrintingView _drawPreview:]): Scale the rect to WebCore units.
3374         (-[WKPrintingView drawRect:]): Correctly calculate page number when the first page to print
3375         isn't page 1.
3376         (-[WKPrintingView rectForPage:]): Scale the rect to AppKit units.
3377
3378 2011-01-31  Darin Adler  <darin@apple.com>
3379
3380         Reviewed by Adele Peterson.
3381
3382         WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
3383         https://bugs.webkit.org/show_bug.cgi?id=53460
3384
3385         * UIProcess/API/mac/WKView.mm: Added WEBCORE_COMMAND macro for lots of editor commands that
3386         are implemented in WebCore so they will get forwarded. Many of these will probably work without
3387         any further changes required. Added comments about the methods that we do not yet forward.
3388         (createSelectorExceptionMap): Map scrollPageDown: to ScrollPageForward and
3389         scrollPageUp: to ScrollPageBackward because we want the page up and page down
3390         keys to follow the document logical order, not physical order. This is equivalent
3391         to what we do in WebPage::performDefaultBehaviorForKeyEvent.
3392
3393 2011-01-31  Jessie Berlin  <jberlin@apple.com>
3394
3395         Reviewed by Steve Falkenburg.
3396
3397         WebKit2: the cookies used by the WebKit2 Web Process should not go in a top-level
3398         directory.
3399         https://bugs.webkit.org/show_bug.cgi?id=53278
3400
3401         Use the name WebKit2WebProcess since the default location for the cookies is determined
3402         based on the process name (which is WebKit2WebProcess.exe on Windows).
3403
3404         * win/WebKit2.make:
3405         Copy the WebKit2WebProcess.resources directory into the AppleInternal bin.
3406
3407         * win/WebKit2WebProcess.resources: Added.
3408         * win/WebKit2WebProcess.resources/Info.plist: Added.
3409         Copied from the WebKit version of Info.plist.
3410
3411         * win/WebKit2WebProcessPostBuild.cmd:
3412         Copy the WebKit2WebProcess.resources directory into the WebKitOutPutDir's bin.
3413
3414 2011-01-31  Anders Carlsson  <andersca@apple.com>
3415
3416         Reviewed by Adam Roben.
3417
3418         Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it
3419         https://bugs.webkit.org/show_bug.cgi?id=53432
3420
3421         * WebKit2.xcodeproj/project.pbxproj:
3422         Add LayerTreeHostMac.h.
3423
3424         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3425         * WebProcess/WebPage/DrawingAreaImpl.h:
3426         Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately.
3427
3428         * WebProcess/WebPage/LayerTreeHost.cpp:
3429         (WebKit::LayerTreeHost::create):
3430         On Mac, create a LayerTreeHostMac instance.
3431
3432         (WebKit::LayerTreeHost::~LayerTreeHost):
3433         No need to call platformInvalidate anymore.
3434
3435         * WebProcess/WebPage/LayerTreeHost.h:
3436         * WebProcess/WebPage/mac/LayerTreeHostMac.h: Added.
3437         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3438         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
3439         Invalidate the run loop observer here instead of in platformInvalidate.
3440
3441         (WebKit::LayerTreeHostMac::scheduleLayerFlush):
3442         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
3443         These are now members of LayerTreeHostMac.
3444
3445 2011-01-30  Geoffrey Garen  <ggaren@apple.com>
3446
3447         Reviewed by Sam Weinig.
3448
3449         [Take 2!]
3450         Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
3451         https://bugs.webkit.org/show_bug.cgi?id=53408
3452
3453         * UIProcess/WebContext.cpp:
3454         (WebKit::WebContext::didNavigateWithNavigationData):
3455         (WebKit::WebContext::didPerformClientRedirect):
3456         (WebKit::WebContext::didPerformServerRedirect):
3457         (WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
3458         we don't think we should be able to reach this state under normal conditions.
3459
3460 2011-01-30  Geoffrey Garen  <ggaren@apple.com>
3461
3462         Reviewed by Maciej Stachowiak.
3463
3464         Fixed crash on window close (maybe crash on launch?) due to missing
3465         frame null checks
3466         https://bugs.webkit.org/show_bug.cgi?id=53408
3467
3468         * UIProcess/WebContext.cpp:
3469         (WebKit::WebContext::didNavigateWithNavigationData):
3470         (WebKit::WebContext::didPerformClientRedirect):
3471         (WebKit::WebContext::didPerformServerRedirect):
3472         (WebKit::WebContext::didUpdateHistoryTitle): Check for NULL, since we're
3473         calling a function that can return it.
3474
3475 2011-01-30  Balazs Kelemen  <kbalazs@webkit.org>
3476
3477         Reviewed by Csaba Osztrogonác.
3478
3479         [Qt][WK2]REGRESSION (r76991): Fix build errors
3480         https://bugs.webkit.org/show_bug.cgi?id=53400
3481
3482         Revert the temporary build fix (http://trac.webkit.org/changeset/77088)
3483         and remove WebKit2Prefix.h from the build.
3484         * UIProcess/API/qt/qwkhistory.h:
3485         * UIProcess/API/qt/qwkpage.h:
3486         * WebKit2.pro:
3487
3488 2011-01-30  Jeff Miller  <jeffm@apple.com>
3489
3490         Reviewed by Dan Bernstein.
3491
3492         FindController::updateFindIndicator() crashes if selection isn't visible
3493         https://bugs.webkit.org/show_bug.cgi?id=53399
3494
3495         * WebProcess/WebPage/FindController.cpp:
3496         (WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).
3497
3498 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
3499
3500         Unreviewed.
3501
3502         [Qt][WK2] Buildfix.
3503
3504         * UIProcess/API/qt/qwkhistory.h:
3505         * UIProcess/API/qt/qwkpage.h:
3506
3507 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
3508
3509         Reviewed by Geoffrey Garen.
3510
3511         Add WKPageCopyPendingAPIRequestURL API
3512         https://bugs.webkit.org/show_bug.cgi?id=53383
3513
3514         This API returns the last URL requested for load via API, if neither that load nor any
3515         other load subsequently reaches the provisional state.
3516         
3517         This is useful to be able to track loads initiated via the API
3518         
3519         * UIProcess/API/C/WKPage.cpp:
3520         (WKPageCopyPendingAPIRequestURL): Retrieve the pending URL.
3521         * UIProcess/API/C/WKPage.h:
3522         * UIProcess/WebPageProxy.cpp:
3523         (WebKit::WebPageProxy::loadURL): Set pending URL.
3524         (WebKit::WebPageProxy::loadURLRequest): ditto
3525         (WebKit::WebPageProxy::reload): ditto
3526         (WebKit::WebPageProxy::goForward): ditto
3527         (WebKit::WebPageProxy::goBack): ditto
3528         (WebKit::WebPageProxy::estimatedProgress): Assume the initial
3529         progress value when there is a pending URL.
3530         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear
3531         pending URL; clients should look at the provisional URL now.
3532         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear
3533         pending URL if it doesn't match the policy URL; this means we
3534         were interrupted by another load.
3535         * UIProcess/WebPageProxy.h:
3536         (WebKit::WebPageProxy::pendingAPIRequestURL): Helper function.
3537         (WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto
3538         (WebKit::WebPageProxy::setPendingAPIRequestURL): ditto
3539
3540 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
3541
3542         Downloads in WK2 on Windows should write resume data to bundle
3543         https://bugs.webkit.org/show_bug.cgi?id=53282
3544         <rdar://problem/8753077>
3545
3546         Reviewed by Alice Liu.
3547
3548         * WebProcess/Downloads/Download.cpp:
3549         (WebKit::Download::decideDestinationWithSuggestedFilename):
3550         Call didDecideDestination(), now that the destination is decided.
3551
3552         * WebProcess/Downloads/Download.h:
3553         Declare didDecideDestination(). Added member variables to hold the
3554         destination file path and the download bundle path.
3555         (WebKit::Download::destination):
3556         Return the path to the final destination for this download.
3557
3558         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3559         (WebKit::Download::start):
3560         Remove the name of an unused param.
3561         (WebKit::Download::startWithHandle):
3562         Ditto.
3563         (WebKit::Download::cancel):
3564         Tell CFNetwork not to delete the file upon failure, and tell it to
3565         cancel the download. Copy the resume data for the download, and append
3566         it to the download bundle. Call didCancel() with an empty
3567         DataReference, since we have written our own resume data.
3568         (WebKit::decideDestinationWithSuggestedObjectNameCallback):
3569         Remove some unused param names. Removed the call to
3570         CFURLDownloadSetDestination() - this is now handled in
3571         Download::didDecideDestination().
3572         (WebKit::didCreateDestinationCallback):
3573         Report that the final destination was created, rather than the download
3574         bundle, matching old WebKit.
3575         (WebKit::Download::didDecideDestination):
3576         Store the final destination and the download bundle paths, and call
3577         CFURLDownloadSetDestination(), passing the path to the download bundle.
3578
3579         * WebProcess/Downloads/curl/DownloadCurl.cpp:
3580         (WebKit::Download::didDecideDestination):
3581         Stubbed.
3582
3583         * WebProcess/Downloads/mac/DownloadMac.mm:
3584         (WebKit::Download::didDecideDestination):
3585         Stubbed - unneeded on the Mac.
3586
3587         * WebProcess/Downloads/qt/DownloadQt.cpp:
3588         (WebKit::Download::didDecideDestination):
3589         Stubbed.
3590
3591 2011-01-29  Jeff Miller  <jeffm@apple.com>
3592
3593         Reviewed by Anders Carlsson.
3594
3595         Support find bouncy in WebKit2 on Windows
3596         https://bugs.webkit.org/show_bug.cgi?id=53329
3597         <rdar://problem/8565843>
3598         The Mac implements the find bouncy inside of WebKit in the UI process for WebKit2, but we need to do this inside Safari for WebKit2 on Windows.
3599         Add infrastructure to call back into the app when the find indicator changes.
3600
3601         * UIProcess/API/C/win/WKView.cpp: Cleanup some code style violations.
3602         (WKViewSetFindIndicatorCallback): Added.
3603         (WKViewGetFindIndicatorCallback): Added.
3604         * UIProcess/API/C/win/WKView.h: Cleanup some code style violations.
3605         * UIProcess/FindIndicator.cpp:
3606         (WebKit::FindIndicator::create):
3607         (WebKit::FindIndicator::FindIndicator):
3608         (WebKit::FindIndicator::frameRect):
3609         (WebKit::FindIndicator::draw):
3610         Rename m_selectionRect to m_selectionRectInWindowCoordinates and m_textRects to m_textRectsInSelectionRectCoordinates (along with similarly named local variables) to be more explict about the coordinate system.
3611         * UIProcess/FindIndicator.h:
3612         (WebKit::FindIndicator::selectionRectInWindowCoordinates): Added.
3613         (WebKit::FindIndicator::textRects): Rename m_textRects to m_textRectsInSelectionRectCoordinates.
3614         * UIProcess/WebPageProxy.cpp:
3615         (WebKit::WebPageProxy::setFindIndicator): Rename selectionRect to selectionRectInWindowCoordinates and textRects to textRectsInSelectionRectCoordinates to be more explict about the coordinate system.
3616         * UIProcess/WebPageProxy.h: Ditto.
3617         * UIProcess/win/WebView.cpp:
3618         (WebKit::WebView::WebView):
3619         (WebKit::WebView::setFindIndicator): Added.
3620         (WebKit::WebView::setFindIndicatorCallback): Added.
3621         (WebKit::WebView::getFindIndicatorCallback): Added.
3622         * UIProcess/win/WebView.h:
3623
3624 2011-01-28  Alexey Proskuryakov  <ap@apple.com>
3625
3626         Reviewed by Dan Bernstein.
3627
3628         https://bugs.webkit.org/show_bug.cgi?id=53367
3629         <rdar://problem/8926460> Remove dysfunctional code from -[WKPrintingView _isPrintingPreview].
3630
3631         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _isPrintingPreview]): The common
3632         branch works fine for now, no need to make platforms different.
3633
3634 2011-01-28  Maciej Stachowiak  <mjs@apple.com>
3635
3636         Reviewed by Dan Bernstein.
3637
3638         WKPageGetEstimatedProgress returns wrong value after a mainframe provisional load has started
3639         https://bugs.webkit.org/show_bug.cgi?id=53358
3640
3641         * UIProcess/WebPageProxy.cpp:
3642         (WebKit::WebPageProxy::didStartProgress): Start progress at the magic initial value, not 0.
3643
3644 2011-01-28  Anders Carlsson  <andersca@apple.com>
3645
3646         Yet another build fix (What was I thinking?)
3647
3648         * WebProcess/Downloads/Download.h:
3649         * WebProcess/Plugins/PluginProxy.h:
3650
3651 2011-01-28  Anders Carlsson  <andersca@apple.com>
3652
3653         Fix Windows build.
3654
3655         * Shared/PrintInfo.h:
3656
3657 2011-01-28  Anders Carlsson  <andersca@apple.com>
3658
3659         Fix tyop.
3660
3661         * Shared/mac/CoreAnimationRenderer.mm:
3662
3663 2011-01-28  Anders Carlsson  <andersca@apple.com>
3664
3665         Reviewed by Sam Weinig.
3666
3667         Add CoreAnimationRenderer class
3668         https://bugs.webkit.org/show_bug.cgi?id=53343
3669
3670         * Shared/mac/CoreAnimationRenderer.h: Added.
3671         * Shared/mac/CoreAnimationRenderer.mm: Added.
3672
3673         (WebKit::CoreAnimationRenderer::CoreAnimationRenderer):
3674         Initialize the underlying CARenderer object and hook up a notification observer.
3675
3676         (WebKit::CoreAnimationRenderer::~CoreAnimationRenderer):
3677         Assert that the client is null. It has been set to null by the call to invalidate().
3678
3679         (WebKit::CoreAnimationRenderer::setBounds):
3680         Update the bounds on the CARenderer and the root layer.
3681
3682         (WebKit::CoreAnimationRenderer::render):
3683         Ask the renderer to render and return the next frame time.
3684
3685         (WebKit::CoreAnimationRenderer::invalidate):
3686         Remove the change observer and reset the client.
3687
3688         (WebKit::CoreAnimationRenderer::rendererDidChange):
3689         Call the client member function.
3690
3691         * WebKit2.xcodeproj/project.pbxproj:
3692         Add new files.
3693
3694 2011-01-28  Anders Carlsson  <andersca@apple.com>
3695
3696         Reviewed by Sam Weinig.
3697
3698         Add an OBJC_CLASS macro for forward declaring an Objective-C class
3699         https://bugs.webkit.org/show_bug.cgi?id=53337
3700
3701         * Shared/NativeWebKeyboardEvent.h:
3702         * Shared/PrintInfo.h:
3703         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3704         * UIProcess/LayerBackedDrawingAreaProxy.h:
3705         * UIProcess/WebInspectorProxy.h:
3706         * UIProcess/mac/WebContextMenuProxyMac.h:
3707         * UIProcess/mac/WebPopupMenuProxyMac.h:
3708         * WebProcess/Downloads/Download.h:
3709         * WebProcess/Plugins/PluginProxy.h:
3710         * WebProcess/WebPage/LayerBackedDrawingArea.h:
3711         * WebProcess/WebPage/WebPage.h:
3712         * config.h:
3713
3714 2011-01-28  Anders Carlsson  <andersca@apple.com>
3715
3716         Reviewed by Sam Weinig.
3717
3718         Don't put config.h in the message headers.
3719
3720         * Scripts/webkit2/messages.py:
3721         * Scripts/webkit2/messages_unittest.py:
3722
3723 2011-01-28  Anders Carlsson  <andersca@apple.com>
3724
3725         Fix build.
3726
3727         * Shared/mac/ShareableSurface.cpp:
3728
3729 2011-01-28  Anders Carlsson  <andersca@apple.com>
3730
3731         Try to unbreak the Windows build.
3732
3733         * UIProcess/cf/WebPageProxyCF.cpp:
3734
3735 2011-01-28  Brady Eidson  <beidson@apple.com>
3736
3737         Reviewed by John Sullivan.
3738
3739         https://bugs.webkit.org/show_bug.cgi?id=53330
3740         Need InjectedBundle API to get the response MIMEType for a URL
3741
3742         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3743         (WKBundleFrameCopyMIMETypeForResourceWithURL):
3744         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3745
3746         Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
3747         * WebProcess/WebPage/WebFrame.cpp:
3748         (WebKit::WebFrame::mimeTypeForResourceWithURL):
3749         * WebProcess/WebPage/WebFrame.h:
3750
3751         Get the MIMEType from the platform's disk cache if available:
3752         * WebProcess/WebPage/WebPage.h:
3753         * WebProcess/WebPage/mac/WebPageMac.mm:
3754         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3755         * WebProcess/WebPage/qt/WebPageQt.cpp:
3756         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3757         * WebProcess/WebPage/win/WebPageWin.cpp:
3758         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3759
3760 2011-01-28  Anders Carlsson  <andersca@apple.com>
3761
3762         Reviewed by Sam Weinig.
3763
3764         Clean up the mess introduced when config.h was added to the project:
3765
3766         - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
3767           twice in each file, probably slowing down compile time.
3768
3769         - Add config.h to all the files that were forgotten in order to keep the build from breaking.
3770
3771         - Added trap to ensure that config.h is included at the top of every implementation file. If this
3772           had been added it would have caught the previous issue.
3773
3774 2011-01-28  Stephanie Lewis  <slewis@apple.com>
3775
3776         Reviewed by Geoff Garen.
3777
3778         <rdar://problem/8857651> Implement unregisterWorld for WebKit2
3779         Rename unregisterWorld to clearWrappers.  Clearing the wrappers reduces the 
3780         memory use of isolated worlds.
3781
3782         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
3783         (WKBundleScriptWorldClearWrappers):
3784         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
3785         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
3786         (WebKit::InjectedBundleScriptWorld::clearWrappers):
3787         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
3788
3789 2011-01-28  Dan Bernstein  <mitz@apple.com>
3790
3791         Reviewed by Sam Weinig.
3792
3793         <select> can't display right-to-left (rtl) languages
3794         https://bugs.webkit.org/show_bug.cgi?id=19785
3795
3796         * Shared/WebPopupItem.cpp:
3797         (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
3798         (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
3799         (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
3800         * Shared/WebPopupItem.h:
3801         * UIProcess/WebPageProxy.cpp:
3802         (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
3803         * UIProcess/WebPageProxy.h:
3804         * UIProcess/WebPageProxy.messages.in: Ditto.
3805         * UIProcess/WebPopupMenuProxy.h:
3806         * UIProcess/mac/WebPopupMenuProxyMac.h:
3807         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3808         (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
3809         Set items' text alignment to match the menu's writing direction. Set items' writing direction
3810         and direction override according to their styles.
3811         (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
3812         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3813         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
3814         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
3815         * WebProcess/WebCoreSupport/WebChromeClient.h:
3816         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
3817         (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
3818         values.
3819         (WebKit::WebPopupMenu::show): Pass the menu's writing direction.
3820
3821 2011-01-28  Anders Carlsson  <andersca@apple.com>
3822
3823         Reviewed by Adam Roben.
3824
3825         Add ShareableSurface class
3826         https://bugs.webkit.org/show_bug.cgi?id=53313
3827
3828         * Shared/mac/ShareableSurface.cpp: Added.
3829         (WebKit::ShareableSurface::Handle::Handle):
3830         Initialize the mach port.
3831
3832         (WebKit::ShareableSurface::Handle::~Handle):
3833         Deallocate our send right if needed.
3834
3835         (WebKit::ShareableSurface::Handle::encode):
3836         Encode the send right, and then null it out.
3837
3838         (WebKit::ShareableSurface::Handle::decode):
3839         Decode the send right.
3840         
3841         (WebKit::createIOSurface):
3842         Create an IOSurface with the given size.
3843
3844         (WebKit::ShareableSurface::create):
3845         Create an IOSurface, either from a size or from a handle.
3846
3847         (WebKit::ShareableSurface::~ShareableSurface):
3848         Delete the texture and framebuffer.
3849
3850         (WebKit::ShareableSurface::createHandle):
3851         Create a mach port from the surface.
3852
3853         (WebKit::ShareableSurface::attach):
3854         Create an FBO if needed and bind it.
3855
3856         (WebKit::ShareableSurface::detach):
3857         Unbind the FBO.
3858
3859         (WebKit::ShareableSurface::textureID):
3860         Generate a new texture and bind it to the IOSurface.
3861
3862         * Shared/mac/ShareableSurface.h: Added.
3863
3864         * WebKit2.xcodeproj/project.pbxproj:
3865         Add new files.
3866
3867 2011-01-27  Adam Roben  <aroben@apple.com>
3868
3869         Change BinarySemaphore to wrap an auto-reset Win32 event on Windows
3870
3871         Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
3872
3873         Reviewed by Dave Hyatt.
3874
3875         * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
3876
3877         * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
3878         member that holds the event.
3879
3880         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
3881         (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
3882         (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
3883         (CoreIPC::BinarySemaphore::signal): Signal the event.
3884         (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
3885         for the event to be signaled or for the interval to elapse.
3886
3887         * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
3888
3889 2011-01-27  Chris Marrin  <cmarrin@apple.com>
3890
3891         Reviewed by Anders Carlsson.
3892
3893         WebKit2: Page flashes just before accelerated compositing animation
3894         https://bugs.webkit.org/show_bug.cgi?id=53274
3895
3896         When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
3897         is getting created with the current page size. When the setSize() call is
3898         subsequently made, the sizeDidChange() call is not made (which does the initial
3899         render of the page) because the old size and new size are the same. The solution
3900         is to skip the setting of the size in the ctor and let it go through a size
3901         change sequence.
3902
3903         * UIProcess/DrawingAreaProxy.cpp:
3904         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3905
3906 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
3907
3908         Reviewed by Xan Lopez.
3909
3910         [GTK] Fix dist compilation for the release
3911         https://bugs.webkit.org/show_bug.cgi?id=53290
3912
3913         * GNUmakefile.am: Remove a file that is not in the repository
3914         anymore.
3915
3916
3917 2011-01-28  Andreas Kling  <kling@webkit.org>
3918
3919         Rubber-stamped by Simon Hausmann.
3920
3921         [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
3922
3923         Having two signals for this is redundant, combine them into
3924         QWKPage::engineConnectionChanged(bool connected).
3925
3926         * UIProcess/API/qt/qwkpage.cpp:
3927         (QWKPagePrivate::didRelaunchProcess):
3928         (QWKPagePrivate::processDidCrash):
3929         * UIProcess/API/qt/qwkpage.h:
3930
3931 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3932
3933         Reviewed by Maciej Stachowiak.
3934
3935         Build fix for Mac Intel Debug after r76916
3936         https://bugs.webkit.org/show_bug.cgi?id=53284
3937
3938         Fix macro redefinition by guarding the redefined macros.
3939
3940         * config.h:
3941
3942 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3943
3944         Unreviewed build fix for Mac Intel Debug after r76916.
3945
3946         Fix macro redefinition by guarding the redefined macros.
3947
3948         Check if the macro is already defined before defininig it.
3949         c++config.h has the same macros with the same values.
3950
3951         * config.h:
3952
3953 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3954
3955         Reviewed by Adam Barth.
3956
3957         Update the expected results for test-webkitpy after r76916.
3958
3959         Include "config.h" in the expected results as well.
3960
3961         * Scripts/webkit2/messages_unittest.py:
3962
3963 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3964
3965         Unreviewed buildfix for SnowLeopard Intel Debug.
3966
3967         Fix macro redefinition by not including config.h.
3968
3969         Revert previous change in WebPageProxyCF.cpp.
3970
3971         * UIProcess/cf/WebPageProxyCF.cpp:
3972
3973 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
3974
3975         Reviewed by Laszlo Gombos.
3976
3977         Get rid of prefix header dependency for WebKit2 build system.
3978         https://bugs.webkit.org/show_bug.cgi?id=50174
3979
3980         Add config.h include explicitelly.
3981
3982         * Platform/CoreIPC/ArgumentDecoder.cpp:
3983         * Platform/CoreIPC/ArgumentEncoder.cpp:
3984         * Platform/CoreIPC/Attachment.cpp:
3985         * Platform/CoreIPC/BinarySemaphore.cpp:
3986         * Platform/CoreIPC/Connection.cpp:
3987         * Platform/CoreIPC/DataReference.cpp:
3988         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
3989         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3990         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3991         * Platform/CoreIPC/win/ConnectionWin.cpp:
3992         * Platform/Logging.cpp:
3993         * Platform/Module.cpp:
3994         * Platform/Region.cpp:
3995         * Platform/RunLoop.cpp:
3996         * Platform/WorkQueue.cpp:
3997         * Platform/cg/CGUtilities.cpp:
3998         * Platform/gtk/RunLoopGtk.cpp:
3999         * Platform/gtk/SharedMemoryGtk.cpp:
4000         * Platform/gtk/WorkQueueGtk.cpp:
4001         * Platform/mac/MachUtilities.cpp:
4002         * Platform/mac/SharedMemoryMac.cpp:
4003         * Platform/mac/WorkQueueMac.cpp:
4004         * Platform/qt/MappedMemoryPool.cpp:
4005         * Platform/qt/ModuleQt.cpp:
4006         * Platform/qt/RunLoopQt.cpp:
4007         * Platform/qt/WorkQueueQt.cpp:
4008         * Platform/win/ModuleWin.cpp:
4009         * Platform/win/RunLoopWin.cpp:
4010         * Platform/win/SharedMemoryWin.cpp:
4011         * Platform/win/WorkQueueWin.cpp:
4012         * PluginProcess/PluginControllerProxy.cpp:
4013         * PluginProcess/PluginProcess.cpp:
4014         * PluginProcess/WebProcessConnection.cpp:
4015         * Scripts/webkit2/messages.py:
4016         * Shared/API/c/WKArray.cpp:
4017         * Shared/API/c/WKCertificateInfo.cpp:
4018         * Shared/API/c/WKContextMenuItem.cpp:
4019         * Shared/API/c/WKData.cpp:
4020         * Shared/API/c/WKDictionary.cpp:
4021         * Shared/API/c/WKError.cpp:
4022         * Shared/API/c/WKImage.cpp:
4023         * Shared/API/c/WKMutableArray.cpp:
4024         * Shared/API/c/WKMutableDictionary.cpp:
4025         * Shared/API/c/WKNumber.cpp:
4026         * Shared/API/c/WKSecurityOrigin.cpp:
4027         * Shared/API/c/WKSerializedScriptValue.cpp:
4028         * Shared/API/c/WKString.cpp:
4029         * Shared/API/c/WKType.cpp:
4030         * Shared/API/c/WKURL.cpp:
4031         * Shared/API/c/WKURLRequest.cpp:
4032         * Shared/API/c/WKURLResponse.cpp:
4033         * Shared/API/c/WKUserContentURLPattern.cpp:
4034         * Shared/API/c/cf/WKStringCF.cpp:
4035         * Shared/API/c/cf/WKURLCF.cpp:
4036         * Shared/API/c/cf/WKURLRequestCF.cpp:
4037         * Shared/API/c/cf/WKURLResponseCF.cpp:
4038         * Shared/API/c/cg/WKImageCG.cpp:
4039         * Shared/API/c/win/WKCertificateInfoWin.cpp:
4040         * Shared/ChildProcess.cpp:
4041         * Shared/ImmutableArray.cpp:
4042         * Shared/ImmutableDictionary.cpp:
4043         * Shared/MutableArray.cpp:
4044         * Shared/MutableDictionary.cpp:
4045         * Shared/OriginAndDatabases.cpp:
4046         * Shared/PlatformPopupMenuData.cpp:
4047         * Shared/Plugins/NPIdentifierData.cpp:
4048         * Shared/Plugins/NPObjectMessageReceiver.cpp:
4049         * Shared/Plugins/NPObjectProxy.cpp:
4050         * Shared/Plugins/NPRemoteObjectMap.cpp:
4051         * Shared/Plugins/NPVariantData.cpp:
4052         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
4053         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
4054         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
4055         * Shared/Plugins/PluginProcessCreationParameters.cpp:
4056         * Shared/PrintInfo.cpp:
4057         * Shared/SessionState.cpp:
4058         * Shared/ShareableBitmap.cpp:
4059         * Shared/UpdateInfo.cpp:
4060         * Shared/VisitedLinkTable.cpp:
4061         * Shared/WebBackForwardListItem.cpp:
4062         * Shared/WebContextMenuItem.cpp:
4063         * Shared/WebContextMenuItemData.cpp:
4064         * Shared/WebError.cpp:
4065         * Shared/WebEvent.cpp:
4066         * Shared/WebEventConversion.cpp:
4067         * Shared/WebGeolocationPosition.cpp:
4068         * Shared/WebImage.cpp:
4069         * Shared/WebKeyboardEvent.cpp:
4070         * Shared/WebMemorySampler.cpp:
4071         * Shared/WebMouseEvent.cpp:
4072         * Shared/WebOpenPanelParameters.cpp:
4073         * Shared/WebPageCreationParameters.cpp:
4074         * Shared/WebPageGroupData.cpp:
4075         * Shared/WebPlatformTouchPoint.cpp:
4076         * Shared/WebPopupItem.cpp:
4077         * Shared/WebPreferencesStore.cpp:
4078         * Shared/WebProcessCreationParameters.cpp:
4079         * Shared/WebTouchEvent.cpp:
4080         * Shared/WebURLRequest.cpp:
4081         * Shared/WebURLResponse.cpp:
4082         * Shared/WebWheelEvent.cpp:
4083         * Shared/cairo/ShareableBitmapCairo.cpp:
4084         * Shared/cf/ArgumentCodersCF.cpp:
4085         * Shared/cg/ShareableBitmapCG.cpp:
4086         * Shared/gtk/ShareableBitmapGtk.cpp:
4087         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
4088         * Shared/mac/CommandLineMac.cpp:
4089         * Shared/mac/UpdateChunk.cpp:
4090         * Shared/qt/CleanupHandler.cpp:
4091         * Shared/qt/NativeWebKeyboardEventQt.cpp:
4092         * Shared/qt/ShareableBitmapQt.cpp:
4093         * Shared/qt/UpdateChunk.cpp:
4094         * Shared/qt/WebCoreArgumentCodersQt.cpp:
4095         * Shared/qt/WebEventFactoryQt.cpp:
4096         * Shared/qt/WebURLRequestQt.cpp:
4097         * Shared/qt/WebURLResponseQt.cpp:
4098         * Shared/win/CommandLineWin.cpp:
4099         * Shared/win/NativeWebKeyboardEventWin.cpp:
4100         * Shared/win/PlatformCertificateInfo.cpp:
4101         * Shared/win/UpdateChunk.cpp:
4102         * Shared/win/WebCoreArgumentCodersWin.cpp:
4103         * Shared/win/WebEventFactory.cpp:
4104         * Shared/win/WebURLRequestWin.cpp:
4105         * Shared/win/WebURLResponseWin.cpp:
4106         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
4107         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
4108         * UIProcess/API/C/WKBackForwardList.cpp:
4109         * UIProcess/API/C/WKBackForwardListItem.cpp:
4110         * UIProcess/API/C/WKContext.cpp:
4111         * UIProcess/API/C/WKCredential.cpp:
4112         * UIProcess/API/C/WKDatabaseManager.cpp:
4113         * UIProcess/API/C/WKDownload.cpp:
4114         * UIProcess/API/C/WKFormSubmissionListener.cpp:
4115         * UIProcess/API/C/WKFrame.cpp:
4116         * UIProcess/API/C/WKFramePolicyListener.cpp:
4117         * UIProcess/API/C/WKGeolocationManager.cpp:
4118         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp:
4119         * UIProcess/API/C/WKGeolocationPosition.cpp:
4120         * UIProcess/API/C/WKInspector.cpp:
4121         * UIProcess/API/C/WKNavigationData.cpp:
4122         * UIProcess/API/C/WKOpenPanelParameters.cpp:
4123         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
4124         * UIProcess/API/C/WKPage.cpp:
4125         * UIProcess/API/C/WKPageGroup.cpp:
4126         * UIProcess/API/C/WKPreferences.cpp:
4127         * UIProcess/API/C/WKProtectionSpace.cpp:
4128         * UIProcess/API/C/win/WKContextWin.cpp:
4129         * UIProcess/API/C/win/WKView.cpp:
4130         * UIProcess/API/C/win/WKViewPrivate.cpp:
4131         * UIProcess/API/cpp/qt/WKStringQt.cpp:
4132         * UIProcess/API/cpp/qt/WKURLQt.cpp:
4133         * UIProcess/API/qt/ClientImpl.cpp:
4134         * UIProcess/API/qt/qgraphicswkview.cpp:
4135         * UIProcess/API/qt/qwkcontext.cpp:
4136         * UIProcess/API/qt/qwkpage.cpp:
4137         * UIProcess/API/qt/qwkpreferences.cpp:
4138         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
4139         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
4140         * UIProcess/Authentication/WebCredential.cpp:
4141         * UIProcess/Authentication/WebProtectionSpace.cpp:
4142         * UIProcess/BackingStore.cpp:
4143         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
4144         * UIProcess/Downloads/DownloadProxy.cpp:
4145         * UIProcess/DrawingAreaProxy.cpp:
4146         * UIProcess/DrawingAreaProxyImpl.cpp:
4147         * UIProcess/FindIndicator.cpp:
4148         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
4149         * UIProcess/GeolocationPermissionRequestProxy.cpp:
4150         * UIProcess/Launcher/ProcessLauncher.cpp:
4151         * UIProcess/Launcher/ThreadLauncher.cpp:
4152         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
4153         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
4154         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
4155         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
4156         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
4157         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
4158         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
4159         * UIProcess/Plugins/PluginInfoStore.cpp:
4160         * UIProcess/Plugins/PluginProcessManager.cpp:
4161         * UIProcess/Plugins/PluginProcessProxy.cpp: