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