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