ce95df94f04c6b99f203408e547720bab63eab7f
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-05-24  Mark Rowe  <mrowe@apple.com>
2
3         Fix the 32-bit build.
4
5         Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType,
6         as this is declared as different underlying types in 32- and 64-bit (unsigned long
7         vs unsigned int).
8         
9         * Shared/mac/KeychainAttribute.cpp:
10         (CoreIPC::encode):
11         (CoreIPC::decode):
12
13 2011-05-24  Sam Weinig  <sam@webkit.org>
14
15         Reviewed by Maciej Stachowiak.
16
17         Enable coalesced wheel events
18         <rdar://problem/9444786>
19
20         * UIProcess/WebPageProxy.cpp:
21         Flip the switch for coalescing wheel events rather than dropping them.
22
23 2011-05-24  Sam Weinig  <sam@webkit.org>
24
25         Reviewed by Maciej Stachowiak.
26
27         Additional sandbox extension required for quarantine database
28         <rdar://problem/9397494>
29         https://bugs.webkit.org/show_bug.cgi?id=61405
30
31         * WebProcess/com.apple.WebProcess.sb:
32         Add read-data access for ~/Library/Preferences.
33
34 2011-05-24  Michael Saboff  <msaboff@apple.com>
35
36         Reviewed by Geoffrey Garen.
37
38         Improve handling in WebCore of low memory situations
39         https://bugs.webkit.org/show_bug.cgi?id=61222
40
41         Added call to enable memory pressure handling for Mac case.
42
43         * WebProcess/WebProcess.cpp:
44         (WebKit::WebProcess::initializeWebProcess):
45         * WebProcess/WebProcess.h:
46         * WebProcess/mac/WebProcessMac.mm:
47         (WebKit::WebProcess::platformInitializeWebProcess):
48
49 2011-05-24  Brady Eidson  <beidson@apple.com>
50
51         Reviewed by Darin Adler.
52
53         Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
54         Should shim a few SecKeychainItem* methods on SnowLeopard
55
56         Initialize the KeychainItem shim on SnowLeopard:
57         * WebProcess/mac/WebProcessMac.mm:
58         (WebKit::WebProcess::initializeShim):
59
60         On SnowLeopard, shim the 4 SecKeychainItem methods:
61         * WebProcess/mac/WebProcessShim.h:
62         * WebProcess/mac/WebProcessShim.mm:
63         (WebKit::shimSecKeychainItemCopyContent):
64         (WebKit::shimSecKeychainItemCreateFromContent):
65         (WebKit::shimSecKeychainItemModifyContent):
66         (WebKit::shimSecKeychainItemFreeContent):
67         (WebKit::WebKitWebProcessKeychainItemShimInitialize):
68
69         * WebProcess/mac/KeychainItemShimMethods.h: Added.
70         * WebProcess/mac/KeychainItemShimMethods.mm: Added.
71         Manage a set of shim-controlled AttributeList data:
72         (WebKit::shimManagedAttributeLists):
73         (WebKit::freeAttributeListContents):
74         (WebKit::allocateAttributeListContents):
75
76         Manage a set of shim-controlled KeychainItem data:
77         (WebKit::shimManagedKeychainItemContents):
78         (WebKit::allocateKeychainItemContentData):
79
80         Free any shim-controlled AttributeList or KeychainItem data:
81         (WebKit::webFreeAttributeListContentOnMainThread):
82         (WebKit::webFreeAttributeListContent):
83         (WebKit::webFreeKeychainItemContentOnMainThread):
84         (WebKit::webFreeKeychainItemContent):
85
86         Marshall these 3 KeychainItem methods to the UIProcess:
87         (WebKit::webSecKeychainItemCopyContentOnMainThread):
88         (WebKit::webSecKeychainItemCopyContent):
89         (WebKit::webSecKeychainItemCreateFromContentOnMainThread):
90         (WebKit::webSecKeychainItemCreateFromContent):
91         (WebKit::webSecKeychainItemModifyContentOnMainThread):
92         (WebKit::webSecKeychainItemModifyContent):
93         (WebKit::initializeKeychainItemShim):
94
95         Container for an AttributeList entry that knows how to encode/decode:
96         * Shared/mac/KeychainAttribute.cpp: Added.
97         (WebKit::KeychainAttribute::KeychainAttribute):
98         (CoreIPC::encode):
99         (CoreIPC::decode):
100         * Shared/mac/KeychainAttribute.h: Added.
101
102         Container for the relevant arguments to the shimmed methods, to send to the UIProcess:
103         * Shared/mac/SecKeychainItemRequestData.cpp: Added.
104         (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
105         (WebKit::SecKeychainItemRequestData::initializeWithAttributeList):
106         (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
107         (WebKit::SecKeychainItemRequestData::attributeList):
108         (WebKit::SecKeychainItemRequestData::encode):
109         (WebKit::SecKeychainItemRequestData::decode):
110         * Shared/mac/SecKeychainItemRequestData.h: Added.
111         (WebKit::SecKeychainItemRequestData::keychainItem):
112         (WebKit::SecKeychainItemRequestData::itemClass):
113         (WebKit::SecKeychainItemRequestData::length):
114         (WebKit::SecKeychainItemRequestData::data):
115
116         Container for the possible output from the shimmed methods, to send back to the WebProcess:
117         * Shared/mac/SecKeychainItemResponseData.cpp: Added.
118         (WebKit::SecKeychainItemResponseData::SecKeychainItemResponseData):
119         (WebKit::SecKeychainItemResponseData::encode):
120         (WebKit::SecKeychainItemResponseData::decode):
121         * Shared/mac/SecKeychainItemResponseData.h: Added.
122         (WebKit::SecKeychainItemResponseData::itemClass):
123         (WebKit::SecKeychainItemResponseData::data):
124         (WebKit::SecKeychainItemResponseData::resultCode):
125         (WebKit::SecKeychainItemResponseData::attributes):
126         (WebKit::SecKeychainItemResponseData::keychainItem):
127
128         Actually implement the calls to the SecKeychainItem* methods in the UIProcess:
129         * UIProcess/WebProcessProxy.h:
130         * UIProcess/WebProcessProxy.messages.in:
131         * UIProcess/mac/WebProcessProxyMac.mm:
132         (WebKit::WebProcessProxy::secKeychainItemCopyContent):
133         (WebKit::WebProcessProxy::secKeychainItemCreateFromContent):
134         (WebKit::WebProcessProxy::secKeychainItemModifyContent):
135
136         * WebKit2.xcodeproj/project.pbxproj: Project file stuff
137         * Configurations/Shim.xcconfig:
138
139 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
140
141         Rubberstamped by David Kilzer.
142
143         Updated some files that I forgot in my previous MHTML CL.
144
145        * Configurations/FeatureDefines.xcconfig:
146
147 2011-05-24  Sam Weinig  <sam@webkit.org>
148
149         Clean up after Geoff and fix the WebKit2 build.
150
151         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
152
153 2011-05-24  Adam Roben  <aroben@apple.com>
154
155         Invalidate JSNPObjects when they are finalized
156
157         This will cause the underlying NPObject to be released at finalization time, rather than at
158         destruction time (which is unpredictable and could occur after the plugin has been
159         unloaded).
160
161         Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
162
163         Fixes <http://webkit.org/b/61316> <rdar://problem/9489824> Crash in deallocateNPObject when
164         reloading yahoo.com webarchive in WebKit2
165
166         Reviewed by Oliver Hunt.
167
168         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
169         (WebKit::JSNPObject::~JSNPObject): Assert that we've already been invalidated, rather than
170         trying to perform invalidation now (when the plugin might already be unloaded).
171
172         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
173         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
174         (WebKit::NPRuntimeObjectMap::invalidate):
175         Updated for m_jsNPObjects type change.
176
177         (WebKit::NPRuntimeObjectMap::finalize): Added. Invalidates the JSNPObject and removes it
178         from the map.
179
180         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Now inherits from WeakHandleOwner.
181         Changed m_jsNPObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will be
182         notified when the JSNPObjects are finalized.
183
184 2011-05-24  Qi Zhang  <qi.2.zhang@nokia.com>
185
186         Reviewed by Adam Roben.
187
188         WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
189         https://bugs.webkit.org/show_bug.cgi?id=42669
190
191         Fixes a typo issue for patch 94265.
192
193         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
194         (WKBundleSetJavaScriptCanAccessClipboard):
195
196 2011-05-24  Sam Weinig  <sam@webkit.org>
197
198         Reviewed by John Sullivan.
199
200         WebKit tells client that the page has become unresponsive while the beforeUnloadConfirm dialog is up
201         https://bugs.webkit.org/show_bug.cgi?id=61372
202
203         * UIProcess/WebPageProxy.cpp:
204         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
205         Stop the unresponsiveness timer like we do for other client functions that spin a
206         runloop.
207
208 2011-05-24  Andreas Kling  <kling@webkit.org>
209
210         Reviewed by Simon Hausmann.
211
212         [WK2] Change TiledDrawingArea to use ShareableBitmap instead of UpdateChunk.
213         https://bugs.webkit.org/show_bug.cgi?id=61296
214
215         Pass UpdateInfo containing ShareableBitmaps instead of UpdateChunk for tile updates.
216         Only the bounds rect and bitmap handle in the UpdateInfo are used since none of the
217         other parameters are needed for TiledDrawingArea.
218
219         * Shared/ShareableBitmap.h:
220         * Shared/qt/ShareableBitmapQt.cpp:
221         (WebKit::ShareableBitmap::createQImage):
222         (WebKit::ShareableBitmap::createGraphicsContext):
223         (WebKit::ShareableBitmap::paint):
224         * Shared/qt/UpdateChunk.cpp: Removed.
225         * Shared/qt/UpdateChunk.h: Removed.
226         * UIProcess/TiledDrawingAreaProxy.cpp:
227         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
228         (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
229         * UIProcess/TiledDrawingAreaProxy.h:
230         * UIProcess/TiledDrawingAreaTile.h:
231         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
232         (WebKit::TiledDrawingAreaProxy::snapshotTaken):
233         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
234         (WebKit::TiledDrawingAreaTile::incorporateUpdate):
235         * WebKit2.pro:
236         * WebProcess/WebPage/TiledDrawingArea.cpp:
237         (WebKit::TiledDrawingArea::updateTile):
238         (WebKit::TiledDrawingArea::didReceiveMessage):
239         * WebProcess/WebPage/TiledDrawingArea.h:
240         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
241         (WebKit::TiledDrawingArea::paintIntoBitmap):
242
243 2011-05-24  Brady Eidson  <beidson@apple.com>
244
245         Build fix after r87153
246
247         * WebProcess/mac/SecItemShimMethods.mm: Don't compile this code on SnowLeopard.
248
249 2011-05-23  Brady Eidson  <beidson@apple.com>
250
251         Reviewed by Sam Weinig.
252
253         Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
254         Should shim a few SecKeychainItem* methods on SnowLeopard
255
256         In preparation for different WebProcess shims depending on platform, move the current
257         shim to its own files.
258         
259         * WebKit2.xcodeproj/project.pbxproj:
260         
261         * WebProcess/mac/WebProcessMac.mm:
262         (WebKit::WebProcess::initializeShim): For non-SnowLeopard platforms, call initializeSecItemShim().
263         
264         * WebProcess/mac/SecItemShimMethods.h: Added.
265         * WebProcess/mac/SecItemShimMethods.mm: Added. Actual webSecItem* methods moved from WebProcessMac.mm.
266         (WebKit::webSecItemCopyMatchingMainThread):
267         (WebKit::webSecItemCopyMatching):
268         (WebKit::webSecItemAddOnMainThread):
269         (WebKit::webSecItemAdd):
270         (WebKit::webSecItemUpdateOnMainThread):
271         (WebKit::webSecItemUpdate):
272         (WebKit::webSecItemDeleteOnMainThread):
273         (WebKit::webSecItemDelete):
274         (WebKit::initializeSecItemShim): Initialize the callbacks via WebKitWebProcessSecItemShimInitialize
275
276         * WebProcess/mac/WebProcessShim.h:
277         * WebProcess/mac/WebProcessShim.mm: Wrap all the actual code here in a !BUILDING_ON_SNOW_LEOPARD block
278         (WebKit::shimSecItemCopyMatching):
279         (WebKit::shimSecItemAdd):
280         (WebKit::shimSecItemUpdate):
281         (WebKit::shimSecItemDelete):
282         (WebKit::WebKitWebProcessSecItemShimInitialize):
283
284 2011-05-23  Anders Carlsson  <andersca@apple.com>
285
286         Reviewed by Sam Weinig.
287
288         Cap painting to 30fps on Windows
289         https://bugs.webkit.org/show_bug.cgi?id=61337
290         <rdar://problem/9213388>
291
292         * WebProcess/WebPage/DrawingAreaImpl.cpp:
293         (WebKit::DrawingAreaImpl::displayTimerFired):
294
295 2011-05-23  Jeremy Noble  <jer.noble@apple.com>
296
297         Reviewed by Darin Adler.
298
299         REGRESSION (r86990:86992): World leak when all windows closed
300         https://bugs.webkit.org/show_bug.cgi?id=61311
301
302         Three interlocking problems:
303         
304         1) Calling [WKView fullScreenController] will create the controller if it doesn't all ready
305         exist, so move the closing code into WKView, where we can bail early if there isn't a 
306         controller.
307         
308         2) A retain-cycle exists between WKView and WKFullScreenWindowController.  Make sure to break
309         the cycle explicitly by clearing the _fullScreenWindowController ivar when closing the
310         controller.
311         
312         3) [NSWindowController close] was overridden without calling [super close].  Do that.
313
314         * UIProcess/API/mac/WKView.mm:
315         (-[WKView closeFullScreenWindowController]): Moved here from WebFullScreenManagerProxyMac.mm.
316         * UIProcess/API/mac/WKViewInternal.h:
317         * UIProcess/mac/WKFullScreenWindowController.mm:
318         (-[WKFullScreenWindowController close]): Call [super close].
319         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
320         (WebKit::WebFullScreenManagerProxy::invalidate):
321
322 2011-05-20  Jer Noble  <jer.noble@apple.com>
323
324         Reviewed by Darin Adler.
325
326         Video looks squished when animating to full screen.
327         https://bugs.webkit.org/show_bug.cgi?id=61220
328
329         Instead of scaling between the client sizes of the full-screen element before and after 
330         entering full-screen, scale between their content boxes.  The difference is that the client
331         sizes can have different aspect ratios, and thus the animation can end up "squishing" the
332         content at one end of the animation.  When animating between the two content box sizes, their
333         aspect ratios (for the case of video) are equal, so the animation will appear to scale 
334         smoothly between the two states without "squishing" the content.
335
336         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
337         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Set the destination frame
338             to be the content box of the current full screen element.
339         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
340
341 2011-05-23  Sam Weinig  <sam@webkit.org>
342
343         Reviewed by Darin Adler.
344
345         Terminating a WebProcess should work even while a page is being closed
346         <rdar://problem/8934632>
347         https://bugs.webkit.org/show_bug.cgi?id=61299
348
349         * UIProcess/WebPageProxy.cpp:
350         (WebKit::WebPageProxy::terminateProcess):
351         Change validity check to only check for process validity, since terminating the process of a page that
352         is closed or is closing is acceptable behavior.
353
354 2011-05-23  Jessie Berlin  <jberlin@apple.com>
355
356         Reviewed by Darin Adler.
357
358         [Windows] Initial Cookie Accept Policy not set on Deserialized Storage Session.
359         https://bugs.webkit.org/show_bug.cgi?id=61255
360
361         * WebProcess/win/WebProcessWin.cpp:
362         (WebKit::WebProcess::platformInitializeWebProcess):
363         Move the code to set the cookie policy before the early return that is taken when using the
364         default storage session from the UI Process.
365         Also, remove unnecessary #ifdefs (USE(CFURLSTORAGESESSIONS) is true if USE(CFNETWORK) is
366         true) and add a comment explaining the early return.
367
368 2011-05-23  Qi Zhang  <qi.2.zhang@nokia.com>
369
370         Reviewed by Darin Adler.
371
372         WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
373         https://bugs.webkit.org/show_bug.cgi?id=42669
374
375         Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.
376
377         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
378         (WKBundleSetJavaScriptCanAccessClipboard):
379         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
380         * WebProcess/InjectedBundle/InjectedBundle.cpp:
381         (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard):
382         * WebProcess/InjectedBundle/InjectedBundle.h:
383
384 2011-05-23  Csaba Osztrogonác  <ossy@webkit.org>
385
386         [Qt][WK2] Unreviewed trivial fix after r86990.
387
388         * WebKit2.pro: Remove UIProcess/ChunkedUpdateDrawingAreaProxy.h.
389
390 2011-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
391
392         Unreviewed. Fix WebKit2 GTK build after r86990.
393
394         * GNUmakefile.am: Remove UpdateChunk.cpp and UpdateChunk.h.
395
396 2011-05-21  John Sullivan  <sullivan@apple.com>
397
398         Reviewed by Darin Adler.
399
400         https://bugs.webkit.org/show_bug.cgi?id=61244
401         <rdar://problem/9482856>
402         Undo operations for a web page linger after page is destroyed
403
404         * UIProcess/WebPageProxy.cpp:
405         (WebKit::WebPageProxy::closePage):
406         Clear editing commands before telling UI client to close the page (this must be done
407         while the page is still in a window so its undo manager can be accessed, so waiting
408         for WebPageProxy::close() is too late).
409
410 2011-05-22  Jeff Miller  <jeffm@apple.com>
411
412         Reviewed by Darin Adler.
413
414         Don't call WebKit::initializeLogChannelsIfNecessary if logging is disabled
415         https://bugs.webkit.org/show_bug.cgi?id=61249
416
417         * UIProcess/WebContext.cpp:
418         (WebKit::WebContext::WebContext): Check #if !LOG_DISABLED, not #ifndef NDEBUG, to decide whether to call WebKit::initializeLogChannelsIfNecessary().
419
420 2011-05-21  Nancy Piedra  <nancy.piedra@nokia.com>
421
422         Reviewed by Andreas Kling.
423
424         [Qt][Symbian] WKStringCopyQString function is not exported
425         https://bugs.webkit.org/show_bug.cgi?id=59285
426
427         A few functions were declared twice but without the export macro.
428         On Symbian, the linking failed when trying to reference these functions.
429
430         * UIProcess/API/qt/qgraphicswkview.h:
431
432 2011-05-21  Jeremy Noble  <jer.noble@apple.com>
433
434         Reviewed by Eric Carlson.
435
436         WebKit2: fix failing fullscreen/full-screen-remove* tests.
437         https://bugs.webkit.org/show_bug.cgi?id=61027
438
439         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
440         (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Call the 
441             exit functions (was calling the enter functions).
442
443 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
444
445         Reviewed by Mark Rowe.
446
447         Crash in WebFullScreenManager::didExitFullScreen when closing a window in Safari.
448         https://bugs.webkit.org/show_bug.cgi?id=61228
449
450         Do not attempt to exit full screen if we aren't in full screen to begin with, as the WebProcess
451         won't be expecting will/didExitFullScreen notifications.
452
453         * UIProcess/mac/WKFullScreenWindowController.mm:
454         (-[WKFullScreenWindowController close]):
455
456 2011-05-20  Andy Estes  <aestes@apple.com>
457
458         Reviewed by Darin Adler.
459
460         WebView loses firstResponder status when entering full-screen mode.
461         https://bugs.webkit.org/show_bug.cgi?id=61153
462
463         * UIProcess/mac/WKFullScreenWindowController.mm:
464         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): If
465         the WebView was a descendant of the browser window's first responder
466         when entering full-screen mode, set the full-screen window's first
467         responder to that same NSResponder.
468         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Do the
469         reverse of what is done in finishedEnterFullScreenAnimation:.
470
471 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
472
473         Reviewed by Maciej Stachowiak.
474
475         WebKit2: Exit full screen mode if the WebProcess crashes.
476         https://bugs.webkit.org/show_bug.cgi?id=61151
477
478         If the WebProcess crashes, exit full-screen mode to avoid getting stuck.  Move the
479         WebFullScreenManagerProxy::invalidate() implementation into the platform-specific
480         files, and have them close their respective platform's full-screen window.
481
482         * UIProcess/WebFullScreenManagerProxy.cpp:
483         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
484         (WebKit::WebFullScreenManagerProxy::invalidate): Added. Copied from main implementation.
485         * UIProcess/mac/WKFullScreenWindowController.h:
486         * UIProcess/mac/WKFullScreenWindowController.mm:
487         (-[WKFullScreenWindowController close]): Added.
488         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
489         (WebKit::WebFullScreenManagerProxy::invalidate): Added. 
490         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
491         (WebKit::WebFullScreenManagerProxy::invalidate): Added.
492
493 2011-05-20  Anders Carlsson  <andersca@apple.com>
494
495         Reviewed by Dan Bernstein.
496
497         Remove the chunked update drawing area
498         https://bugs.webkit.org/show_bug.cgi?id=61216
499
500         The chunked update drawing area is no longer used in any port, so remove all traces of it.
501
502         Qt still uses UpdateChunks for the tiled drawing area so keep the Shared/qt/UpdateChunk.* classes for now.
503
504         * GNUmakefile.am:
505         * Shared/DrawingAreaInfo.h:
506         * Shared/gtk/UpdateChunk.cpp: Removed.
507         * Shared/gtk/UpdateChunk.h: Removed.
508         * Shared/mac/UpdateChunk.cpp: Removed.
509         * Shared/mac/UpdateChunk.h: Removed.
510         * Shared/win/UpdateChunk.cpp: Removed.
511         * Shared/win/UpdateChunk.h: Removed.
512         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: Removed.
513         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed.
514         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Removed.
515         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: Removed.
516         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Removed.
517         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: Removed.
518         * UIProcess/win/WebView.cpp:
519         (WebKit::WebView::paint):
520         (WebKit::WebView::createDrawingAreaProxy):
521         (WebKit::WebView::enterAcceleratedCompositingMode):
522         (WebKit::WebView::exitAcceleratedCompositingMode):
523         * WebKit2.pro:
524         * WebKit2.xcodeproj/project.pbxproj:
525         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: Removed.
526         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: Removed.
527         * WebProcess/WebPage/DrawingArea.cpp:
528         (WebKit::DrawingArea::create):
529         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: Removed.
530         * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Removed.
531         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp: Removed.
532         * win/WebKit2.vcproj:
533
534 2011-05-20  Matthew Delaney  <mdelaney@apple.com>
535
536         Reviewed by Steve Falkenburg.
537
538         Default min DOM Timer interval is not set soon enough for first page to pick it up in WK2
539         https://bugs.webkit.org/show_bug.cgi?id=61215 
540
541         * WebProcess/WebPage/WebPage.cpp: Simply moving the DOM min timer interval setting to before the first page creation.
542
543 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
544
545         Reviewed by Sam Weinig.
546
547         numberOfActiveAnimations() can include animations from documents in the page cache
548         https://bugs.webkit.org/show_bug.cgi?id=53641
549
550         Pass the Frame's document as the one to count animations on.
551
552         * WebProcess/WebPage/WebFrame.cpp:
553         (WebKit::WebFrame::numberOfActiveAnimations):
554
555 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
556
557         Reviewed by Sam Weinig.
558
559         WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
560         https://bugs.webkit.org/show_bug.cgi?id=42550
561         
562         Plumb through methods to pause a transition of a given property on an element.
563
564         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
565         (WKBundleFramePauseAnimationOnElementWithId):
566         (WKBundleFramePauseTransitionOnElementWithId):
567         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
568         * WebProcess/WebPage/WebFrame.cpp:
569         (WebKit::WebFrame::pauseTransitionOnElementWithId):
570         * WebProcess/WebPage/WebFrame.h:
571
572 2011-05-20  Sam Weinig  <sam@webkit.org>
573
574         Reviewed by Anders Carlsson.
575
576         WebKit2: Media files cannot be saved in the Application Cache due to a sandbox violation
577         https://bugs.webkit.org/show_bug.cgi?id=61199
578
579         Instead of using a sandbox extension to give permission to the application cache directory,
580         initialize the sandbox with access to it like we do for other databases.
581
582         * Shared/WebProcessCreationParameters.cpp:
583         (WebKit::WebProcessCreationParameters::encode):
584         (WebKit::WebProcessCreationParameters::decode):
585         * Shared/WebProcessCreationParameters.h:
586         * UIProcess/WebContext.cpp:
587         (WebKit::WebContext::ensureWebProcess):
588         * WebProcess/WebProcess.cpp:
589         (WebKit::WebProcess::initializeWebProcess):
590         * WebProcess/com.apple.WebProcess.sb:
591         * WebProcess/mac/WebProcessMac.mm:
592         (WebKit::initializeSandbox):
593
594 2011-05-20  Jer Noble  <jer.noble@apple.com>
595
596         Reviewed by Maciej Stachowiak.
597
598         Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
599         https://bugs.webkit.org/show_bug.cgi?id=61108
600
601         When the fullScreenController asks us to repaint, make an async repaint request, and when the
602         callback is fired, notify the fullScreenController that repaint has completed.
603
604         * UIProcess/win/WebView.cpp:
605         (WebKit::fullScreenClientForceRepaintCompleted): Added.
606         (WebKit::WebView::fullScreenClientForceRepaint): Added.
607         * UIProcess/win/WebView.h:
608
609 2011-05-19  Adam Roben  <aroben@apple.com>
610
611         Don't try to process DownloadProxy messages twice (and robustify code that runs if we do)
612
613         Fixes <http://webkit.org/b/61142> <rdar://problem/9471680> REGRESSION (r86812): Crash
614         (preceded by assertion) in fastMalloc when downloading a file
615
616         Reviewed by Darin Adler.
617
618         * Platform/CoreIPC/ArgumentDecoder.cpp:
619         (CoreIPC::alignedBufferIsLargeEnoughToContain): Added. This helper function checks that the
620         given buffer is large enough to hold |size| bytes (and correctly handles the case where
621         we're already at the end or beyond the end of the buffer).
622
623         (CoreIPC::ArgumentDecoder::alignBufferPosition):
624         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
625         Replaced old code that was vulnerable to underflow with the new helper function.
626
627         * UIProcess/WebProcessProxy.cpp:
628         (WebKit::WebProcessProxy::didReceiveSyncMessage): Added back an early return that was
629         mistakenly removed in r86812 so that we don't mistakenly pass DownloadProxy messages on to
630         a WebPageProxy after we've already handled them.
631
632 2011-05-19  Jer Noble  <jer.noble@apple.com>
633
634         Reviewed by Maciej Stachowiak.
635
636         WebKit2: Flashing when entering and exiting full screen mode
637         https://bugs.webkit.org/show_bug.cgi?id=56957
638
639         In the WKFullscreenWindowController, when exiting accelerated compositing mode, 
640         force a repaint, and don't actually remove the animation layer until the repaint
641         completes.  Also, move back to parenting the WebView in a layer-backed view, and
642         work around the SnowLeopard bug which causes a crash in those situations.  We no
643         longer need to do a bunch of work in finishedEnterFullScreenAnimation, because 
644         the animation layer is "hiding" all the drawing happening in the webView underneath.
645
646         In the WebFullScreenManagerMac, when asked to tear down the root layer, instead
647         remove all its children, and set its contents to a flattened image of the full
648         screen element and its children.  This helps patch over the time where everything 
649         is re-rendering and helps give the appearance of continuousness in the animation.
650
651         * UIProcess/mac/WKFullScreenWindowController.mm:
652         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
653         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
654         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
655         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
656         (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]):
657         (exitCompositedModeRepaintCompleted):
658         (-[WKFullScreenWindowController _page]):
659         (-[WKFullScreenWindowController _manager]):
660         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
661         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
662         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
663
664 2011-05-19  Anders Carlsson  <andersca@apple.com>
665
666         Address a review comment by Sam Weinig.
667
668         * UIProcess/WebContext.cpp:
669         (WebKit::WebContext::didUpdateHistoryTitle):
670
671 2011-05-19  Anders Carlsson  <andersca@apple.com>
672
673         Reviewed by Sam Weinig.
674
675         Hang UI appears when WebProcess isn't running
676         https://bugs.webkit.org/show_bug.cgi?id=61147
677         <rdar://problem/9413683>
678
679         This fixes two bugs:
680
681         1. The HistoryClient related message handlers in WebContext could get invoked for pages that have been closed,
682            and thus didn't have any subframes. Since we have a MESSAGE_CHECK that checks that the frame exists, we'd
683            mark the currently dispatched message as invalid, which would end up calling Connection::Client::didReceiveInvalidMessage.
684            Fix this by checking that the page exists first.
685
686         2. In the call to WebProcessProxy::didReceiveInvalidMessage we'd first invalidate the CoreIPC connection to make sure 
687            that we won't get any further messages from this connection. We'd then go ahead and terminate the web process, 
688            but because we've already invalidated the CoreIPC connection we would never get the Connection::Client::didClose
689            callback that would call WebPageProxy::processDidCrash. Fix this by explicitly calling WebProcessProxy::didClose.
690            Also, add logging when we receive an invalid message
691
692         * UIProcess/WebContext.cpp:
693         (WebKit::WebContext::didNavigateWithNavigationData):
694         (WebKit::WebContext::didPerformClientRedirect):
695         (WebKit::WebContext::didPerformServerRedirect):
696         (WebKit::WebContext::didUpdateHistoryTitle):
697         * UIProcess/WebProcessProxy.cpp:
698         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
699
700 2011-05-19  Brian Weinstein  <bweinstein@apple.com>
701
702         Reviewed by Adam Roben.
703
704         Crash when detaching Web Inspector when parent is in process of closing.
705         https://bugs.webkit.org/show_bug.cgi?id=61141
706         <rdar://problem/9470027>
707         
708         We were trying to send a WM_SIZE to a window that was in the process of closing. Switch
709         to using PostMessage, so the window will finish closing, and then it won't need to
710         process the WM_SIZE message anymore.
711
712         * UIProcess/win/WebInspectorProxyWin.cpp:
713         (WebKit::WebInspectorProxy::platformAttach): Call PostMessage instead of SendMessage.
714         (WebKit::WebInspectorProxy::platformDetach): Ditto.
715
716 2011-05-19  Robert Hogan  <robert@webkit.org>
717
718         Reviewed by Andreas Kling.
719
720         [Qt] Fix plugins/windowless_plugin_paint_test.html
721
722         Call gdk_init_check before gdk_display_get_default().
723         If we don't do this, gdk_display_get_default() will hang
724         the next time it's called.
725
726         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
727         (WebKit::getPluginDisplay):
728
729 2011-05-18  Chris Marrin  <cmarrin@apple.com>
730
731         Reviewed by Anders Carlsson.
732
733         Plug-ins at YouTube, cnn.com, nytimes vanish when their top/left is scrolled out of view when zoomed
734         https://bugs.webkit.org/show_bug.cgi?id=61101
735
736         Scale both bounding boxes sent to m_plugin->geometryDidChange(), not just the frameRect. This fools
737         the plugin into thinking it is drawing into an unscaled box with an unscaled view even when scaled.
738
739         * WebProcess/Plugins/PluginView.cpp:
740         (WebKit::PluginView::frame):Made this const so it can be used in clipRectInWindowCoordinates()
741         (WebKit::PluginView::viewGeometryDidChange):Used IntRect::scale() rather than scaling by hand
742         (WebKit::PluginView::clipRectInWindowCoordinates):Added scale of clipRect.
743         * WebProcess/Plugins/PluginView.h:
744
745 2011-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
746
747         Reviewed by Anders Carlsson.
748
749         Fix build with ENABLE_PLUGIN_PROCESS=1 for non-mac platforms after r86578
750         https://bugs.webkit.org/show_bug.cgi?id=61113
751
752         * PluginProcess/PluginControllerProxy.cpp:
753         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
754         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
755
756 2011-05-19  Philippe Normand  <pnormand@igalia.com>
757
758         Unreviewed, follow-up fix of the messages python unittests after r86812.
759
760         [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
761         https://bugs.webkit.org/show_bug.cgi?id=60872
762
763         * Scripts/webkit2/messages_unittest.py:
764
765 2011-05-18  Brady Eidson  <beidson@apple.com>
766
767         As originally reviewed by Anders Carlsson.
768
769         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
770         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
771
772         Restore r86797 to how it was supposed to be using the appropriate #ifdef,
773         reverting the temporary r86814 in the process.
774
775         The #ifdef is BUILDING_ON_SNOW_LEOPARD, not BUILDING_ON_SNOWLEOPARD!
776         
777         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
778         (WebKit::ProcessLauncher::launchProcess):
779         * WebProcess/mac/WebProcessMainMac.mm:
780         (WebKit::WebProcessMain):
781
782 2011-05-18  Brady Eidson  <beidson@apple.com>
783
784         Fix the WK2 SnowLeopard layouttests (again) until I can explore on a SnowLeopard machine tomorrow.
785
786         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
787         (WebKit::ProcessLauncher::launchProcess):
788         * WebProcess/mac/WebProcessMainMac.mm:
789         (WebKit::WebProcessMain):
790
791 2011-05-18  Darin Adler  <darin@apple.com>
792
793         Reviewed by Anders Carlsson.
794
795         [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
796         https://bugs.webkit.org/show_bug.cgi?id=60872
797
798         Eliminate the concept of SyncReplyMode and instead hand around ownership
799         of the reply decoder using an OwnPtr.
800
801         * Platform/CoreIPC/Connection.cpp:
802         (CoreIPC::Connection::dispatchSyncMessage): Eliminated comments that say
803         the same things the code itself does. Removed code that handles the
804         reply mode. Instead, pass the OwnPtr to the message handling function and
805         make the call to sendSyncReply conditional on whether the reply encoder
806         is still non-null.
807
808         * Platform/CoreIPC/Connection.h: Removed SyncReplyMode. Made
809         didReceiveSyncMessage return void, and take OwnPtr<ArgumentEncoder>& for
810         the reply encoder.
811
812         * Platform/CoreIPC/HandleMessage.h:
813         (CoreIPC::handleMessageDelayed): Take an OwnPtr&. Replaced the call to
814         adoptPtr with a call to release.
815
816         * PluginProcess/PluginControllerProxy.h: Updated to take an OwnPtr& and
817         not return SyncReplyMode.
818         * PluginProcess/WebProcessConnection.cpp:
819         (WebKit::WebProcessConnection::didReceiveSyncMessage): Ditto.
820         * PluginProcess/WebProcessConnection.h: Ditto.
821
822         * Scripts/webkit2/messages.py: Updated for changes to sync messages.
823         Eliminated unneeded return types and use get() when apporopriate to call
824         the handleMessage functions.
825
826         * Scripts/webkit2/messages_unittest.py: Tried to update this too.
827         I don't know how to run the test, though.
828
829         * Shared/Plugins/NPObjectMessageReceiver.h: Updated to take an OwnPtr& and
830         not return SyncReplyMode.
831         * Shared/Plugins/NPRemoteObjectMap.cpp:
832         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): Ditto.
833         * Shared/Plugins/NPRemoteObjectMap.h: Ditto.
834         * UIProcess/Downloads/DownloadProxy.h: Ditto.
835         * UIProcess/WebContext.cpp:
836         (WebKit::WebContext::didReceiveSyncMessage): Ditto.
837         * UIProcess/WebContext.h: Ditto.
838         * UIProcess/WebFullScreenManagerProxy.cpp:
839         (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): Ditto.
840         * UIProcess/WebFullScreenManagerProxy.h: Ditto.
841         * UIProcess/WebIconDatabase.cpp:
842         (WebKit::WebIconDatabase::didReceiveSyncMessage): Ditto.
843         * UIProcess/WebIconDatabase.h: Ditto.
844         * UIProcess/WebInspectorProxy.h: Ditto.
845         * UIProcess/WebPageProxy.cpp:
846         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
847         * UIProcess/WebPageProxy.h: Ditto.
848         * UIProcess/WebProcessProxy.cpp:
849         (WebKit::WebProcessProxy::didReceiveSyncMessage): Ditto.
850         * UIProcess/WebProcessProxy.h: Ditto.
851
852         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Added a missing include.
853
854         * WebProcess/Plugins/PluginProcessConnection.cpp:
855         (WebKit::PluginProcessConnection::didReceiveSyncMessage): Updated to take
856         an OwnPtr& and not return SyncReplyMode.
857         * WebProcess/Plugins/PluginProcessConnection.h: Ditto.
858         * WebProcess/Plugins/PluginProxy.h: Ditto.
859         * WebProcess/WebPage/WebPage.cpp:
860         (WebKit::WebPage::didReceiveSyncMessage): Ditto.
861         * WebProcess/WebPage/WebPage.h: Ditto.
862         * WebProcess/WebProcess.cpp:
863         (WebKit::WebProcess::didReceiveSyncMessage): Ditto.
864         * WebProcess/WebProcess.h: Ditto.
865
866 2011-05-18  Chris Fleizach  <cfleizach@apple.com>
867
868         Reviewed by Maciej Stachowiak.
869
870         WK2: VoiceOver cannot move focus into a web area programmatically
871         https://bugs.webkit.org/show_bug.cgi?id=60661
872
873         Add a makeFirstResponder method that will bring focus to the widget view within the UI
874         process.
875
876         * UIProcess/API/mac/PageClientImpl.h:
877         * UIProcess/API/mac/PageClientImpl.mm:
878         (WebKit::PageClientImpl::makeFirstResponder):
879         * UIProcess/PageClient.h:
880         * UIProcess/WebPageProxy.h:
881         * UIProcess/WebPageProxy.messages.in:
882         * UIProcess/mac/WebPageProxyMac.mm:
883         (WebKit::WebPageProxy::makeFirstResponder):
884         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
885         (WebKit::WebChromeClient::makeFirstResponder):
886         * WebProcess/WebCoreSupport/WebChromeClient.h:
887
888 2011-05-18  Brady Eidson  <beidson@apple.com>
889
890         Reviewed by Anders Carlsson.
891
892         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
893         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
894
895         * Platform/unix/EnvironmentUtilities.cpp: Remove an unnecessary #include, as reviewed.
896
897 2011-05-17  Timothy Hatcher  <timothy@apple.com>
898
899         Update the the context menu to reflect the system search provider on Mac.
900
901         <rdar://problem/9198419>
902
903         Reviewed by Sam Weinig.
904
905         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
906         (WebKit::WebContextMenuClient::searchWithGoogle): Add a FIXME about using NSPerformService on Mac.
907         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
908         (InitWebCoreSystemInterface): Added CopyDefaultSearchProviderDisplayName.
909
910 2011-05-18  Brady Eidson  <beidson@apple.com>
911
912         Reviewed by Anders Carlsson.
913
914         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
915         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
916
917         If the WebProcess or PluginProcess forks, it shouldn't pass WebKit2 shims along to the new process
918         in the DYLD_INSERT_LIBRARIES environment variable.
919
920         Add Environment Utilities helper to strip unwanted values from an environment variable:
921         * Platform/unix/EnvironmentUtilities.cpp: Added.
922         (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
923         * Platform/unix/EnvironmentUtilities.h: Added.
924         * WebKit2.xcodeproj/project.pbxproj:
925
926         Strip PluginProcessShim.dylib from DYLD_INSERT_LIBRARIES:
927         * PluginProcess/mac/PluginProcessMainMac.mm:
928         (WebKit::PluginProcessMain):
929
930         Strip WebProcessShim.dylib from DYLD_INSERT_LIBRARIES:
931         * WebProcess/mac/WebProcessMainMac.mm:
932         (WebKit::WebProcessMain):
933
934         Unprotect SnowLeopard now that it will behave and not spawn processes trying to use WebKit2 shims:
935         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
936         (WebKit::ProcessLauncher::launchProcess):
937
938 2011-05-18  Jon Lee  <jonlee@apple.com>
939
940         Reviewed by Simon Fraser.
941
942         Crash in injected bundle client
943         https://bugs.webkit.org/show_bug.cgi?id=61086
944
945         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
946         (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection): Check for existence of method in client prior to calling.
947
948 2011-05-18  Andreas Kling  <kling@webkit.org>
949
950         Reviewed by Kenneth Rohde Christiansen.
951
952         [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
953         https://bugs.webkit.org/show_bug.cgi?id=60901
954
955         To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
956         make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
957
958         * UIProcess/API/qt/qgraphicswkview.cpp:
959         * UIProcess/API/qt/qgraphicswkview.h:
960         * UIProcess/API/qt/qwkpage.cpp:
961         (QWKPagePrivate::createDrawingAreaProxy):
962
963 2011-05-18  Andreas Kling  <kling@webkit.org>
964
965         Reviewed by Kenneth Rohde Christiansen.
966
967         [Qt][WK2] Don't lie about supporting accelerated compositing.
968         https://bugs.webkit.org/show_bug.cgi?id=61054
969
970         Until we have an implementation of LayerTreeHost, we shouldn't lie about it.
971
972         * WebKit2.pro:
973         * WebProcess/WebPage/LayerTreeHost.h:
974         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: Added.
975         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
976
977 2011-05-17  Jeremy Noble  <jer.noble@apple.com>
978
979         Reviewed by Darin Adler.
980
981         Exiting full screen will leave up invisible full-screen window, blocking all mouse clicks.
982         https://bugs.webkit.org/show_bug.cgi?id=60982
983
984         The GraphicsLayer tree has unparented m_fullScreenRootLayer behind our backs, replacing the 
985         tiled layer with a normal one.  Instead of holding on to a specific layer, assume that the 
986         w_rootLayer will only have 0 or 1 children, and if a child is present, then that is our full-
987         screen layer.
988
989         Additionally, check to see if the animating layer's presentationLayer is nil
990         before calling it; asking a nil object for a CATransform3D will give back a struct full of 
991         garbage.
992
993         In WKFullScreenWindowController, when the exit animation completes, ignore the "completed"
994         parameter.  This eliminates the possibility that the full screen window will end up left
995         on top of the screen if the animation is cancelled and a enter full screen animation isn't
996         forthcoming.
997
998         * UIProcess/mac/WKFullScreenWindowController.mm:
999         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1000         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
1001         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1002         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
1003         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
1004         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
1005
1006 2011-05-17  Dan Bernstein  <mitz@apple.com>
1007
1008         Reviewed by Alice Liu.
1009
1010         <rdar://problem/9458300> REGRESSION (r86724): Repro crash loading any webpage in WebKit2 on SnowLeopard
1011         https://bugs.webkit.org/show_bug.cgi?id=61022
1012
1013         * WebProcess/mac/WebProcessMainMac.mm:
1014         (WebKit::WebProcessMain): As long as we are not loading the shim on Snow Leopard, we should not
1015         try to initialize it.
1016
1017 2011-05-17  Brady Eidson  <beidson@apple.com>
1018
1019         Rubberstamped by Sam Weinig.
1020
1021         https://bugs.webkit.org/show_bug.cgi?id=60595
1022         Fix the rampant WebProcess crashing because we're trying to install the WebProcess shim
1023         into QTKitServer when we launch it.
1024
1025         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1026         (WebKit::ProcessLauncher::launchProcess): This is only happening on SnowLeopard, so put
1027           SnowLeopard build guards around the shim install path.
1028
1029 2011-05-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1030
1031         Unreviewed, rolling out r86668.
1032         http://trac.webkit.org/changeset/86668
1033         https://bugs.webkit.org/show_bug.cgi?id=61001
1034
1035         It made 52 tests crash on Qt WK2 bot (Requested by Ossy on
1036         #webkit).
1037
1038         * UIProcess/API/qt/qgraphicswkview.cpp:
1039         * UIProcess/API/qt/qgraphicswkview.h:
1040         * UIProcess/API/qt/qwkpage.cpp:
1041         (QWKPagePrivate::createDrawingAreaProxy):
1042
1043 2011-05-17  Brian Weinstein  <bweinstein@apple.com>
1044
1045         Build fix after r86717.
1046
1047         * UIProcess/API/C/win/WKView.h: Add a forward declaration of IDropTarget
1048
1049 2011-05-17  Brian Weinstein  <bweinstein@apple.com>
1050
1051         Reviewed by Adam Roben.
1052
1053         WebKit2: Needs API to set a custom drop target
1054         https://bugs.webkit.org/show_bug.cgi?id=60991
1055         <rdar://problem/9090868>
1056         
1057         Add API to set a custom drop target on a WKView.
1058
1059         * UIProcess/API/C/win/WKView.cpp:
1060         (WKViewSetCustomDropTarget): Call through to WebView::setCustomDropTarget.
1061         * UIProcess/API/C/win/WKView.h:
1062         * UIProcess/win/WebView.cpp:
1063         (WebKit::WebView::setCustomDropTarget): Revoke the current drop target, and register the
1064             custom one.
1065         * UIProcess/win/WebView.h:
1066
1067 2011-05-17  Sam Weinig  <sam@webkit.org>
1068
1069         Reviewed by Dan Bernstein.
1070
1071         Add API to determine if a frame has any form elements without going to javascript
1072         https://bugs.webkit.org/show_bug.cgi?id=60999
1073
1074         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1075         (WKBundleFrameContainsAnyFormElements):
1076         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1077         * WebProcess/WebPage/WebFrame.cpp:
1078         (WebKit::WebFrame::containsAnyFormElements):
1079         * WebProcess/WebPage/WebFrame.h:
1080         Add WKBundleFrameContainsAnyFormElements which does a walk of the document to determine
1081         if there are any form elements.
1082
1083 2011-05-17  Andreas Kling  <kling@webkit.org>
1084
1085         Reviewed by Kenneth Rohde Christiansen.
1086
1087         [Qt][WK2] Initial support for favicons.
1088         https://bugs.webkit.org/show_bug.cgi?id=58937
1089
1090         Add the following API to QWKContext:
1091
1092         - void setIconDatabasePath(QString)
1093         - void iconChangedForPageURL(QUrl) [signal]
1094         - QIcon iconForPageURL(QUrl)
1095
1096         This is mostly analogous to the QWebSettings/QWebFrame icon API we had in WebKit1.
1097
1098         * UIProcess/API/qt/ClientImpl.h: Added WKIconDatabaseClient methods.
1099
1100         * UIProcess/API/qt/ClientImpl.cpp:
1101         (toQWKContext): Helper to cast from "void* clientInfo" to a QWKContext*.
1102         (qt_wk_didChangeIconForPageURL): Emits QWKContext::iconChangedForPageURL(QUrl).
1103         (qt_wk_didRemoveAllIcons): Stub.
1104
1105         * UIProcess/API/qt/qwkcontext.h:
1106         * UIProcess/API/qt/qwkcontext_p.h:
1107         * UIProcess/API/qt/qwkcontext.cpp:
1108         (QWKContextPrivate::QWKContextPrivate): Set up and register a WKIconDatabaseClient.
1109         (QWKContext::QWKContext): Minor refactor to avoid code duplication in constructors.
1110         (QWKContext::setIconDatabasePath): Exactly what it sounds like.
1111         (QWKContext::iconForPageURL): Retrieves the favicon for a given page URL as a QIcon.
1112
1113         * WebKit2API.pri: Add WKIconDatabase.cpp and WKIconDatabase.h to build.
1114
1115 2011-05-17  Brady Eidson  <beidson@apple.com>
1116
1117         Reviewed by Anders Carlsson.
1118
1119         Part 4 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1120         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1121
1122         This patch actually hooks up the shim to the WebProcess shim callbacks, which messages these
1123         4 calls up to the UIProcess and returns the result.
1124
1125         Note that this patch uncovered the fact that CoreIPC can't sync message out from a secondary thread,
1126         so I filed https://bugs.webkit.org/show_bug.cgi?id=60975 as a followup to allow that.
1127
1128         * Shared/mac/SecItemResponseData.cpp:
1129         (WebKit::SecItemResponseData::SecItemResponseData): Reorder the constructor arguments to be 
1130           a little cleaner.
1131         * Shared/mac/SecItemResponseData.h:
1132
1133         Call the shim callbacks for each method:
1134         * WebProcess/mac/WebProcessShim.mm:
1135         (WebKit::shimSecItemCopyMatching):
1136         (WebKit::shimSecItemAdd):
1137         (WebKit::shimSecItemUpdate):
1138         (WebKit::shimSecItemDelete):
1139
1140         Implement the shim callbacks, which each marshall to the main thread, which then calls out to CoreIPC:
1141         * WebProcess/mac/WebProcessMac.mm:
1142         (WebKit::WebSecItemCopyMatchingMainThread):
1143         (WebKit::WebSecItemCopyMatching):
1144         (WebKit::WebSecItemAddOnMainThread):
1145         (WebKit::WebSecItemAdd):
1146         (WebKit::WebSecItemUpdateOnMainThread):
1147         (WebKit::WebSecItemUpdate):
1148         (WebKit::WebSecItemDeleteOnMainThread):
1149         (WebKit::WebSecItemDelete):
1150
1151         Add the 4 messages and their implementations in the UIProcess:
1152         * UIProcess/WebProcessProxy.h:
1153         * UIProcess/WebProcessProxy.messages.in:
1154         * UIProcess/mac/WebProcessProxyMac.mm: Added.
1155         (WebKit::WebProcessProxy::secItemCopyMatching):
1156         (WebKit::WebProcessProxy::secItemAdd):
1157         (WebKit::WebProcessProxy::secItemUpdate):
1158         (WebKit::WebProcessProxy::secItemDelete):
1159
1160         * WebKit2.xcodeproj/project.pbxproj:
1161
1162 2011-05-17  Anders Carlsson  <andersca@apple.com>
1163
1164         Reviewed by Dan Bernstein.
1165
1166         Incomplete page painting at dropbox.com
1167         https://bugs.webkit.org/show_bug.cgi?id=60974
1168         <rdar://problem/9448213>
1169
1170         When we're exiting compositing mode and haven't sent an EnterAcceleratedCompositingMode
1171         message to the UI process, we still need to send the updated bits to the ui process.
1172         
1173         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1174         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1175
1176 2011-05-17  Brady Eidson  <beidson@apple.com>
1177
1178         Reviewed by Anders Carlsson.
1179
1180         Part 3 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1181         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1182
1183         Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back.
1184
1185         Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs:
1186         * Shared/cf/ArgumentCodersCF.cpp:
1187         (CoreIPC::typeFromCFTypeRef):
1188         (CoreIPC::encode):
1189         (CoreIPC::decode):
1190         * Shared/cf/ArgumentCodersCF.h:
1191
1192         Serializable object that contains the query CFDictionaryRef and optionally the 
1193         "attributesToMatch" CFDictionaryRef:
1194         * Shared/mac/SecItemRequestData.cpp: Added.
1195         (WebKit::SecItemRequestData::SecItemRequestData):
1196         (WebKit::SecItemRequestData::encode):
1197         (WebKit::SecItemRequestData::decode):
1198         * Shared/mac/SecItemRequestData.h: Added.
1199         (WebKit::SecItemRequestData::query):
1200         (WebKit::SecItemRequestData::attributesToMatch):
1201
1202         Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef:
1203         * Shared/mac/SecItemResponseData.cpp: Added.
1204         (WebKit::SecItemResponseData::SecItemResponseData):
1205         (WebKit::SecItemResponseData::encode):
1206         (WebKit::SecItemResponseData::decode):
1207         * Shared/mac/SecItemResponseData.h: Added.
1208         (WebKit::SecItemResponseData::resultObject):
1209         (WebKit::SecItemResponseData::resultCode):
1210
1211         * WebKit2.xcodeproj/project.pbxproj:
1212
1213 2011-05-17  Brady Eidson  <beidson@apple.com>
1214
1215         Reviewed by Anders Carlsson.
1216
1217         Part 2 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1218         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1219
1220         Hookup some of the methods we plan to shim in the patch, but just have them call through
1221         to the actual implementations for now.
1222
1223         Also stub-out the future shimmed versions of the methods.
1224
1225         * WebProcess/mac/WebProcessShim.h: Add the methods to the shim callbacks.
1226         * WebProcess/mac/WebProcessShim.mm:
1227         (WebKit::shimSecItemCopyMatching): Call through to the actual function for now.
1228         (WebKit::shimSecItemAdd): Ditto.
1229         (WebKit::shimSecItemUpdate): Ditto.
1230         (WebKit::shimSecItemDelete): Ditto.
1231         (WebKit::WebKitWebProcessShimInitialize): Copy over the shim callbacks.
1232         * WebKit2.xcodeproj/project.pbxproj: Link the shim to required frameworks.
1233         
1234         * WebProcess/mac/WebProcessMac.mm:
1235         (WebKit::WebSecItemCopyMatching): Add placeholders for the future to-be-shimmed functions.
1236         (WebKit::WebSecItemAdd): Ditto.
1237         (WebKit::WebSecItemUpdate): Ditto.
1238         (WebKit::WebSecItemDelete): Ditto.
1239         (WebKit::WebProcess::initializeShim): Pass along those placeholders to the shim initializer.
1240
1241 2011-05-17  Brady Eidson  <beidson@apple.com>
1242
1243         Reviewed by Anders Carlsson.
1244
1245         Part 1 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1246         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1247
1248         Add am empty shim for a new WebProcess shim and install it at launch.
1249
1250         Use the same Shim.xcconfig for both the web and plugin processes:
1251         * Configurations/PluginProcessShim.xcconfig: Removed.
1252         * Configurations/Shim.xcconfig: Copied from Configurations/PluginProcessShim.xcconfig.
1253         * WebKit2.xcodeproj/project.pbxproj:
1254
1255         * WebProcess/WebProcess.h: Add initializeShim() for Mac-only
1256         * WebProcess/mac/WebProcessMac.mm:
1257         (WebKit::WebProcess::initializeShim): Initialize the (empty) shim callbacks.
1258
1259         * WebProcess/mac/WebProcessMainMac.mm:
1260         (WebKit::WebProcessMain): Call initializeShim()
1261
1262         * WebProcess/mac/WebProcessShim.h: Added.
1263         * WebProcess/mac/WebProcessShim.mm: Added.
1264         (WebKit::WebKitWebProcessShimInitialize): Empty for now.
1265
1266         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1267         (WebKit::ProcessLauncher::launchProcess): Install the Plugin Process shim for plugin processes
1268           and the WebProcess shim for the web content process.
1269
1270 2011-05-17  John Sullivan  <sullivan@apple.com>
1271
1272         Reviewed by Adam Roben.
1273
1274         Loose end from fix for https://bugs.webkit.org/show_bug.cgi?id=60938
1275
1276         * WebKit2.xcodeproj/project.pbxproj:
1277         Made new header file "private" instead of "project" so clients can access it.
1278
1279 2011-05-17  Andreas Kling  <kling@webkit.org>
1280
1281         Reviewed by Kenneth Rohde Christiansen.
1282
1283         [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
1284         https://bugs.webkit.org/show_bug.cgi?id=60901
1285
1286         To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
1287         make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
1288
1289         * UIProcess/API/qt/qgraphicswkview.cpp:
1290         * UIProcess/API/qt/qgraphicswkview.h:
1291         * UIProcess/API/qt/qwkpage.cpp:
1292         (QWKPagePrivate::createDrawingAreaProxy):
1293
1294 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
1295
1296         Take another shot at fixing the WinCairo build.
1297
1298         * Shared/cairo/LayerTreeContextCairo.cpp: Include NotImplemented.h using a framework include.
1299
1300 2011-05-16  Sam Weinig  <sam@webkit.org>
1301
1302         Reviewed by Jon Honeycutt.
1303
1304         Add access to process pid in WebKit2 API
1305         https://bugs.webkit.org/show_bug.cgi?id=60938
1306
1307         * UIProcess/API/C/mac/WKPagePrivateMac.cpp: Added.
1308         (WKPageGetProcessIdentifier):
1309         * UIProcess/API/C/mac/WKPagePrivateMac.h: Added.
1310         * UIProcess/WebPageProxy.cpp:
1311         (WebKit::WebPageProxy::processIdentifier):
1312         * UIProcess/WebPageProxy.h:
1313         * WebKit2.xcodeproj/project.pbxproj:
1314         Add WKPageGetProcessIdentifier as SPI for the mac.
1315
1316 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
1317
1318         Add file missing from my previous commit.
1319
1320         * Shared/cairo/LayerTreeContextCairo.cpp: Added.
1321
1322 2011-05-16  Martin Robinson  <martin.james.robinson@gmail.com>
1323
1324         Try to fix the WinCairo build after r86612.
1325
1326         Move the LayerTreeContextGtk.cpp stub to LayerTreeContextCairo.cpp and add
1327         it to the WinCairo build.
1328
1329         * GNUmakefile.am: Update the source list.
1330         * Shared/cairo/LayerTreeContextCairo.cpp: Renamed from Source/WebKit2/Shared/gtk/LayerTreeContextGtk.cpp.
1331         * win/WebKit2.vcproj: Update the source list.
1332
1333 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
1334
1335         Reviewed by Anders Carlsson.
1336
1337         [GTK] [WebKit2] Provide a fast version of the backing store for X11
1338         https://bugs.webkit.org/show_bug.cgi?id=60912
1339
1340         Instead of allocating the backing store surface directly in WebKit2,
1341         instantiate the GtkWidgetBackingStore class which abstracts away the
1342         platform-specific details of maintaining the backing store.
1343
1344         * UIProcess/BackingStore.h:
1345         * UIProcess/gtk/BackingStoreGtk.cpp:
1346         (WebKit::BackingStore::paint): Call into GtkWidgetBackingStore to get the Cairo surface now.
1347         (WebKit::BackingStore::incorporateUpdate): Ditto.
1348         (WebKit::BackingStore::scroll): Call into GtkWidgetBackingStore to do the actual backing store scroll.
1349
1350 2011-05-16  Chris Marrin  <cmarrin@apple.com>
1351
1352         Reviewed by Darin Adler.
1353
1354         Plug-in hit testing is broken after zooming
1355         https://bugs.webkit.org/show_bug.cgi?id=60916
1356
1357         Construct a WebMouseEvent to send to plugin, adjusting values to take pageScaleFactor
1358         into account. Also adjusted bounds sent to viewGeometryDidChange to take pageScaleFactor
1359         into account. Both are needed or the plugin will think the mouse positions are outside
1360         its bounds.
1361
1362         * Shared/WebEvent.h:
1363         * Shared/WebMouseEvent.cpp:Add ctor to clone a WebMouseEvent and add a scaleFactor to values
1364         (WebKit::WebMouseEvent::WebMouseEvent):
1365         * WebProcess/Plugins/PluginView.cpp:
1366         (WebKit::PluginView::handleEvent):Adjust mouse coords to take pageScaleFactor into account
1367         (WebKit::PluginView::viewGeometryDidChange):Adjust bounds to take pageScaleFactor into account
1368
1369 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
1370
1371         Reviewed by Anders Carlsson.
1372
1373         GTK port of WebKit2 should switch to new DrawingAreaImpl model
1374         https://bugs.webkit.org/show_bug.cgi?id=59655
1375
1376         * GNUmakefile.am: Add the files necessary to use the DrawingAreaProxyImpl
1377         to the source list. The source list also needs the LayerContextTree stubs.
1378         * Shared/LayerTreeContext.h: This file should not be guarded by
1379         USE(ACCELERATED_COMPOSITING) as it's needed for the DrawingAreaProxyImpl
1380         IPC messaging.
1381         * Shared/gtk/LayerTreeContextGtk.cpp: Added this stub.
1382         * UIProcess/API/gtk/PageClientImpl.cpp:
1383         (WebKit::PageClientImpl::createDrawingAreaProxy): Instead of creating the deprecated
1384         chunked drawing area, create a DrawingAreaProxyImpl.
1385         (WebKit::PageClientImpl::setViewNeedsDisplay): Here we must now queue a redraw. Previously
1386         the chunked drawing area was doing this manually. This is the appropriate place though.
1387         (WebKit::PageClientImpl::scrollView): Add an implementation that just calls into setViewNeedsDisplay.
1388         * UIProcess/API/gtk/PageClientImpl.h: Added a getter for m_viewWidget.
1389         (WebKit::PageClientImpl::viewWidget):
1390         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1391         (callDrawingAreaPaintMethod): Added this helper which reduces code duplication between
1392         GTK+ 2.x and 3.x
1393         (webkitWebViewBaseExpose): Call the new helper now.
1394         (webkitWebViewBaseDraw): Ditto.
1395         * UIProcess/BackingStore.h: Updated to include GTK+ specific types.
1396         * UIProcess/DrawingAreaProxy.h: Ditto.
1397         * UIProcess/DrawingAreaProxy.messages.in: Do not the DrawingAreaProxyImpl-specific
1398          message with USE(ACCELERATED_COMPOSITING).
1399         * UIProcess/WebPageProxy.cpp: Removed these guards, as DrawingAreProxyImpl is used on all platforms now.
1400         (WebKit::WebPageProxy::didReceiveMessage): Ditto.
1401         * UIProcess/WebPageProxy.h: Ditto.
1402         * UIProcess/gtk/BackingStoreGtk.cpp: Added. This implementation heavily uses Cairo,
1403         but depends on GTK+/GDK in a few places.
1404         (WebKit::BackingStore::paint):
1405         (WebKit::BackingStore::incorporateUpdate):
1406         (WebKit::BackingStore::scroll):
1407         * UIProcess/gtk/WebPageProxyGtk.cpp: Added a getting for the viewWidget, which is
1408         required by BackingStoreGtk. A similar getter exists for Windows and Mac.
1409         (WebKit::WebPageProxy::viewWidget): Ditto.
1410         * WebProcess/WebPage/DrawingArea.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
1411         (WebKit::DrawingArea::create): Ditto.
1412         * WebProcess/WebPage/DrawingArea.h: Ditto.
1413         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1414         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Do not guard
1415         this DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING)
1416         * WebProcess/WebPage/WebPage.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
1417         (WebKit::WebPage::didReceiveMessage): Ditto.
1418
1419 2011-05-16  Maciej Stachowiak  <mjs@apple.com>
1420
1421         Reviewed by Sam Weinig.
1422
1423         Sandbox denies Kerberos authentication
1424         https://bugs.webkit.org/show_bug.cgi?id=60921
1425         <rdar://problem/9133872>
1426         
1427         * WebProcess/com.apple.WebProcess.sb:
1428
1429 2011-05-16  David Kilzer  <ddkilzer@apple.com>
1430
1431         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
1432         <rdar://problem/9446430>
1433
1434         Reviewed by Mark Rowe.
1435
1436         * Configurations/Base.xcconfig: Fixed typo.
1437
1438 2011-05-16  Anders Carlsson  <andersca@apple.com>
1439
1440         Reviewed by Dan Bernstein.
1441
1442         If the root compositing layer changes while we're about to exit compositing mode, make sure to enter compositing mode
1443         https://bugs.webkit.org/show_bug.cgi?id=60905
1444         <rdar://problem/9365574>
1445
1446         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1447         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1448         If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen
1449         when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host
1450         does it next flush. This will end up sending the EnterAcceleratedCompositingMode message.
1451
1452 2011-05-13  Jer Noble  <jer.noble@apple.com>
1453
1454         Reviewed by Simon Fraser.
1455
1456         Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
1457         https://bugs.webkit.org/show_bug.cgi?id=60826
1458
1459         Emit a notification when moving a CALayer from the WebProcess's main
1460         layer host to a new context.  This allows listeners to invalidate their
1461         layers which may not support moving between different CAContexts (as is
1462         the case with QTMovieLayer).  In order to allow listeners to determine if they
1463         are affected, the notification will pass the root CALayer in a userInfo
1464         dictionary.
1465
1466         In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
1467         class (GraphicsLayer) to a retainable class (PlatformLayer).
1468
1469         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
1470         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1471         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
1472             m_fullScreenRootLayer now that it is a RetainPtr<>.
1473         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
1474             after either creating or destroying the full screen layer host.
1475         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
1476         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
1477
1478 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
1479
1480         Rubber-stamped by Csaba Osztrogonác.
1481
1482         [Qt][Wk2][Symbian] Fix build after r86560
1483         https://bugs.webkit.org/show_bug.cgi?id=60887
1484
1485         Temporarily fix Symbian build by re-enabling compilation
1486         of Qt/Gtk common code (as was the case for Symbian before r55875).
1487         This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875
1488         As of this revision, only the native SharedMemory implementation is in trunk.
1489
1490         * Platform/CoreIPC/Attachment.h: Compile Qt/Gtk common code for Qt-Symbian too
1491         * Platform/CoreIPC/Connection.h: ditto
1492         * Platform/SharedMemory.h:       ditto
1493         * Platform/qt/SharedMemorySymbian.cpp: stub implementations of attachment handling
1494         (WebKit::SharedMemory::Handle::releaseToAttachment):
1495         (WebKit::SharedMemory::Handle::adoptFromAttachment):
1496
1497 2011-05-16  Jon Lee  <jonlee@apple.com>
1498
1499         Reviewed by Simon Fraser.
1500
1501         Can't horizontally scroll iframes and overflow because wheel events are always accepted
1502         https://bugs.webkit.org/show_bug.cgi?id=60779
1503
1504         We keep track of the number of horizontal scrollbars and mouse wheel event handlers in the
1505         UI process as a means of determining whether horizontal scroll events will be handled
1506         by the web process.
1507
1508         * UIProcess/WebPageProxy.cpp:
1509         (WebKit::WebPageProxy::willHandleHorizontalScrollEvents): Return true if there is at least
1510         one wheel event handler
1511         * UIProcess/WebPageProxy.h: Add new variable to cache the count
1512         (WebKit::WebPageProxy::numWheelEventHandlersChanged): Sets the count
1513
1514         The rest just provides all the connections.
1515         * UIProcess/API/C/WKPage.cpp:
1516         (WKPageWillHandleHorizontalScrollEvents):
1517         * UIProcess/API/C/WKPage.h:
1518         * UIProcess/WebPageProxy.messages.in:
1519         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1520         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1521         (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection):
1522         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1523         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1524         (WebKit::WebChromeClient::shouldRubberBandInDirection): Forward to injected bundle UI client
1525         (WebKit::WebChromeClient::updateCountWheelEventHandlers): Updates the web page proxy
1526         * WebProcess/WebCoreSupport/WebChromeClient.h:
1527
1528 2011-05-16  Anders Carlsson  <andersca@apple.com>
1529
1530         Reviewed by Oliver Hunt.
1531
1532         Silverlight: Selection via keyboard selects the entire plugin instead of the contents of a TextBox
1533         https://bugs.webkit.org/show_bug.cgi?id=60898
1534         <rdar://problem/9309903>
1535
1536         Special-case Command-A and always return true, indicating that the plug-in handled the event.
1537         This matches WebKit1.
1538
1539         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1540         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
1541
1542 2011-05-16  Anders Carlsson  <andersca@apple.com>
1543
1544         Reviewed by Oliver Hunt.
1545
1546         Short-circuit NPRuntime calls made by Flash during plug-in instantiation
1547         https://bugs.webkit.org/show_bug.cgi?id=60894
1548         <rdar://problem/8804681>
1549
1550         During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the
1551         URL of the current document as well as the URL of the toplevel document. This leads to
1552         a bunch of IPC traffic that slows down instantiation.
1553
1554         Since we know what calls Flash is making and what results are expected, we can handle the
1555         NPRuntime calls directly in the plug-in process and avoid extra IPC overhead.
1556
1557         * PluginProcess/PluginControllerProxy.cpp:
1558         (WebKit::PluginControllerProxy::PluginControllerProxy):
1559         Initialize m_pluginCreationParameters.
1560
1561         (WebKit::PluginControllerProxy::initialize):
1562         Set m_pluginCreationParameters to point to the creation parameters right before
1563         calling Plugin::initialize and restore it back afterwards.
1564
1565         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1566         If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization
1567         quirk, and we're being initialized, check for the __flash_getWindowLocation and
1568         __flash_getTopLocation function calls and return the correct values.
1569
1570         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1571         Check if the script string has the definitions of __flash_getWindowLocation or __flash_getTopLocation
1572         and just ignore them. Note that ignoring them has the effect of not adding them to the window object,
1573         which could in theory be a backwards compatibility problem if web pages were to assume that these
1574         functions existed on a page with plug-ins. In practice this is probably not a problem, especially since
1575         these functions are only used on Mac WebKit.
1576
1577         * PluginProcess/PluginControllerProxy.h:
1578         (WebKit::PluginControllerProxy::inInitialize):
1579         Add helper function.
1580
1581         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1582         (WebKit::NetscapePluginModule::determineQuirks):
1583         Add the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk for Flash on Mac.
1584
1585         * Shared/Plugins/PluginQuirks.h:
1586         Add Mac specific CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk.
1587
1588 2011-05-16  Anders Carlsson  <andersca@apple.com>
1589
1590         Reviewed by Adam Roben.
1591
1592         Add a returnValue parameter to tryToShortCircuitInvoke
1593         https://bugs.webkit.org/show_bug.cgi?id=60891
1594
1595         tryToShortCircuitInvoke needs to be able to indicate that an invoke
1596         call failed. Add a returnValue parameter and have the real return value
1597         indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not.
1598
1599         * PluginProcess/PluginControllerProxy.cpp:
1600         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1601         * PluginProcess/PluginControllerProxy.h:
1602         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1603         (WebKit::NPN_Invoke):
1604         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1605         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
1606         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1607         * WebProcess/Plugins/PluginController.h:
1608         * WebProcess/Plugins/PluginView.cpp:
1609         (WebKit::PluginView::tryToShortCircuitInvoke):
1610         * WebProcess/Plugins/PluginView.h:
1611
1612 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
1613
1614         Reviewed by Csaba Osztrogonác.
1615
1616         [Qt][Wk2][Symbian] Fix build after r86560
1617         https://bugs.webkit.org/show_bug.cgi?id=60887
1618
1619         * Platform/CoreIPC/ArgumentDecoder.cpp:
1620         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): guard Unix and Gtk code with USE(UNIX_DOMAIN_SOCKETS)
1621         * Platform/CoreIPC/ArgumentEncoder.cpp:
1622         (CoreIPC::ArgumentEncoder::~ArgumentEncoder): ditto
1623
1624 2011-05-16  Anders Carlsson  <andersca@apple.com>
1625
1626         Reviewed by Adam Roben.
1627
1628         Add the ability for a plug-in controller to short-circuit calls to NPN_Invoke
1629         https://bugs.webkit.org/show_bug.cgi?id=60886
1630
1631         Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which
1632         will be useful for avoiding sync IPC messages during instantiation.
1633
1634         * PluginProcess/PluginControllerProxy.cpp:
1635         (WebKit::PluginControllerProxy::evaluate):
1636         Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to
1637         the web process to ask it to evaluate the script string.
1638
1639         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1640         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1641         Always return false for now.
1642
1643         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1644         (WebKit::NPN_Invoke):
1645         Get the plug-in and call tryToShortCircuitInvoke.
1646
1647         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1648         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
1649         Call the plug-in controller.
1650
1651         * WebProcess/Plugins/PluginView.cpp:
1652         (WebKit::PluginView::tryToShortCircuitInvoke):
1653         Always return false here, since there's no need to short-circuit calls
1654         for plug-ins that live in the web process.
1655
1656 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
1657
1658         Reviewed by Laszlo Gombos.
1659
1660         [Qt][WK2][Symbian] Shared memory implementation for Symbian
1661         https://bugs.webkit.org/show_bug.cgi?id=55875
1662
1663         Use global chunks for sharing data between processes.
1664         This is an initial implementation. An outstanding issue
1665         is the correct way to close() the chunk in the SharedMemory d'tor
1666         without triggering a delete by the kernel when the ref-count
1667         temporarily goes to zero.
1668
1669         * Platform/SharedMemory.h: platform specific handle and chunk name
1670         * Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation
1671         using RChunk.CreateGlobal() for named chunks. The chunk name is serialized
1672         and sent over the IPC channel and opened by the remote process using
1673         RChunk.OpenGlobal().
1674
1675         (WebKit::SharedMemory::Handle::Handle):
1676         (WebKit::SharedMemory::Handle::~Handle):
1677         (WebKit::SharedMemory::Handle::isNull):
1678         (WebKit::SharedMemory::Handle::encode):
1679         (WebKit::SharedMemory::Handle::decode):
1680         (WebKit::SharedMemory::create):
1681         (WebKit::SharedMemory::~SharedMemory):
1682         (WebKit::SharedMemory::createHandle):
1683         (WebKit::SharedMemory::systemPageSize):
1684         * Platform/unix/SharedMemoryUnix.cpp: Exclude Qt-Symbian using HAVE(UNIX_DOMAIN_SOCKETS)
1685         * WebKit2.pro: Add SharedMemorySymbian.cpp
1686
1687 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1688
1689         Unreviewed. Fix WebKit2 GTK build after r86489.
1690
1691         * GNUmakefile.am: Add PluginProcess/PluginCreationParameters.cpp
1692         and PluginProcess/PluginCreationParameters.h to compilation.
1693
1694 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1695
1696         Reviewed by Martin Robinson.
1697
1698         [GTK] Enable building GTK port with ENABLE_PLUGIN_PROCESS=1
1699         https://bugs.webkit.org/show_bug.cgi?id=58223
1700
1701         * GNUmakefile.am: Add new files to compilation.
1702         * PluginProcess/gtk/PluginControllerProxyGtk.cpp: Added.
1703         (WebKit::PluginControllerProxy::platformInitialize):
1704         (WebKit::PluginControllerProxy::platformDestroy):
1705         (WebKit::PluginControllerProxy::platformGeometryDidChange):
1706         * PluginProcess/gtk/PluginProcessGtk.cpp: Added.
1707         (WebKit::PluginProcess::platformInitialize):
1708         * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: Added.
1709         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1710         * WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp: Added.
1711         (WebKit::PluginProxy::needsBackingStore):
1712
1713 2011-05-16  Adam Barth  <abarth@webkit.org>
1714
1715         Attempt to fix the Qt build.  (Strict PassOwnPtr fix.)
1716
1717         * Shared/qt/ShareableBitmapQt.cpp:
1718         (WebKit::ShareableBitmap::createGraphicsContext):
1719
1720 2011-05-15  Michael Saboff  <msaboff@apple.com>
1721
1722         Reviewed by Geoffrey Garen.
1723
1724         Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
1725         https://bugs.webkit.org/show_bug.cgi?id=60864
1726
1727         Implemented reuse of BackingStore's in 
1728         DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
1729         matches the size of the existing BackingStore.
1730         Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
1731         These changes reduces memory usage up to 10MB on memory tests.
1732
1733         * UIProcess/DrawingAreaProxyImpl.cpp:
1734         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
1735         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
1736
1737 2011-05-15  Anders Carlsson  <andersca@apple.com>
1738
1739         Reviewed by Maciej Stachowiak.
1740
1741         Pass the window NPObject identifier in the plug-in creation parameters
1742         https://bugs.webkit.org/show_bug.cgi?id=60865
1743
1744         This avoids a synchronous call when the plug-in wants to get the NPObject that
1745         corresponds to the window.
1746
1747         * PluginProcess/PluginControllerProxy.cpp:
1748         (WebKit::PluginControllerProxy::initialize):
1749         Change this to take the PluginCreationParameters. Initialize the window NPObject.
1750
1751         (WebKit::PluginControllerProxy::windowScriptNPObject):
1752         Just return the window NPObject; it's already been initialized.
1753
1754         * PluginProcess/PluginControllerProxy.h:
1755         * PluginProcess/PluginCreationParameters.cpp:
1756         (WebKit::PluginCreationParameters::PluginCreationParameters):
1757         (WebKit::PluginCreationParameters::encode):
1758         (WebKit::PluginCreationParameters::decode):
1759         * PluginProcess/PluginCreationParameters.h:
1760         Add the window NPObject ID.
1761
1762         * PluginProcess/WebProcessConnection.cpp:
1763         (WebKit::WebProcessConnection::createPlugin):
1764         Pass the creation parameters to PluginControllerProxy::initialize.
1765
1766         * WebProcess/Plugins/PluginProxy.cpp:
1767         (WebKit::PluginProxy::initialize):
1768         Initialize the window NPObject ID.
1769
1770         * WebProcess/Plugins/PluginProxy.messages.in:
1771         Remove the GetWindowScriptNPObject message.
1772
1773 2011-05-15  Anders Carlsson  <andersca@apple.com>
1774
1775         Reviewed by Geoffrey Garen.
1776
1777         Pass the document URL and toplevel document URL when creating a plug-in
1778         https://bugs.webkit.org/show_bug.cgi?id=60863
1779
1780         This is the first of a series of patches intended to reduce the IPC traffic
1781         during plug-in instantiation.
1782
1783         * WebProcess/Plugins/Plugin.cpp:
1784         (WebKit::Plugin::Parameters::encode):
1785         Encode the URLs.
1786
1787         (WebKit::Plugin::Parameters::decode):
1788         Decode the URLs.
1789
1790         * WebProcess/Plugins/Plugin.h:
1791         Add the document and toplevel document URLs.
1792
1793         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1794         (WebKit::WebFrameLoaderClient::createPlugin):
1795         Initialize the document and toplevel document URLs.
1796
1797 2011-05-13  Oliver Hunt  <oliver@apple.com>
1798
1799         Reviewed by Geoffrey Garen.
1800
1801         Make GC validation more aggressive
1802         https://bugs.webkit.org/show_bug.cgi?id=60802
1803
1804         Add GC_VALIDATION calls to all the JSNPObject methods.
1805
1806         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1807         (WebKit::JSNPObject::invalidate):
1808         (WebKit::JSNPObject::callMethod):
1809         (WebKit::JSNPObject::callObject):
1810         (WebKit::JSNPObject::callConstructor):
1811         (WebKit::JSNPObject::getCallData):
1812         (WebKit::JSNPObject::getConstructData):
1813         (WebKit::JSNPObject::getOwnPropertySlot):
1814         (WebKit::JSNPObject::getOwnPropertyDescriptor):
1815         (WebKit::JSNPObject::put):
1816         (WebKit::JSNPObject::getOwnPropertyNames):
1817         (WebKit::JSNPObject::propertyGetter):
1818         (WebKit::JSNPObject::methodGetter):
1819
1820 2011-05-13  Oliver Hunt  <oliver@apple.com>
1821
1822         Reviewed by Geoffrey Garen.
1823
1824         Make GC validation more aggressive
1825         https://bugs.webkit.org/show_bug.cgi?id=60802
1826
1827         Add GC_VALIDATION calls to all the JSNPObject methods.
1828
1829         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1830         (WebKit::JSNPObject::invalidate):
1831         (WebKit::JSNPObject::callMethod):
1832         (WebKit::JSNPObject::callObject):
1833         (WebKit::JSNPObject::callConstructor):
1834         (WebKit::JSNPObject::getCallData):
1835         (WebKit::JSNPObject::getConstructData):
1836         (WebKit::JSNPObject::getOwnPropertySlot):
1837         (WebKit::JSNPObject::getOwnPropertyDescriptor):
1838         (WebKit::JSNPObject::put):
1839         (WebKit::JSNPObject::getOwnPropertyNames):
1840         (WebKit::JSNPObject::propertyGetter):
1841         (WebKit::JSNPObject::methodGetter):
1842
1843 2011-05-14  Alexey Proskuryakov  <ap@apple.com>
1844
1845         Reviewed by Sam Weinig.
1846
1847         WebKit2: Smart cut&paste is broken
1848         https://bugs.webkit.org/show_bug.cgi?id=60840
1849         <rdar://problem/9439927>
1850
1851         * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::isSmartInsertDeleteEnabled):
1852         Match WK1 - this default defaults to YES if not present.
1853
1854 2011-05-14  Dan Bernstein  <mitz@apple.com>
1855
1856         Reviewed by Alice Liu.
1857
1858         WKView does not draw after forced repaint before the first update
1859         https://bugs.webkit.org/show_bug.cgi?id=60845
1860
1861         * UIProcess/DrawingAreaProxy.h:
1862         (WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
1863         * UIProcess/DrawingAreaProxyImpl.cpp:
1864         (WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
1865         to true, ensuring that paint() will wait for an update if needed.
1866         * UIProcess/DrawingAreaProxyImpl.h:
1867         * UIProcess/WebPageProxy.cpp:
1868         (WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().
1869
1870 2011-05-14  Anders Carlsson  <andersca@apple.com>
1871
1872         Reviewed by Sam Weinig.
1873
1874         Document the WantsMozillaUserAgent quirk and make it Windows specific
1875         https://bugs.webkit.org/show_bug.cgi?id=60843
1876
1877         * Shared/Plugins/PluginQuirks.h:
1878         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1879         (WebKit::NetscapePlugin::userAgent):
1880
1881 2011-05-14  Anders Carlsson  <andersca@apple.com>
1882
1883         Reviewed by Sam Weinig.
1884
1885         Consolidate plug-in creation parameters to a single struct
1886         https://bugs.webkit.org/show_bug.cgi?id=60839
1887
1888         * PluginProcess/PluginControllerProxy.cpp:
1889         (WebKit::PluginControllerProxy::create):
1890         (WebKit::PluginControllerProxy::PluginControllerProxy):
1891         * PluginProcess/PluginControllerProxy.h:
1892         * PluginProcess/PluginCreationParameters.cpp: Added.
1893         (WebKit::PluginCreationParameters::PluginCreationParameters):
1894         (WebKit::PluginCreationParameters::encode):
1895         (WebKit::PluginCreationParameters::decode):
1896         * PluginProcess/PluginCreationParameters.h: Added.
1897         * PluginProcess/WebProcessConnection.cpp:
1898         (WebKit::WebProcessConnection::createPlugin):
1899         * PluginProcess/WebProcessConnection.h:
1900         * PluginProcess/WebProcessConnection.messages.in:
1901         * Scripts/webkit2/messages.py:
1902         * WebKit2.xcodeproj/project.pbxproj:
1903         * WebProcess/Plugins/PluginProxy.cpp:
1904         (WebKit::PluginProxy::initialize):
1905
1906 2011-05-14  Anders Carlsson  <andersca@apple.com>
1907
1908         Reviewed by Kevin Decker.
1909
1910         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
1911         https://bugs.webkit.org/show_bug.cgi?id=60823
1912         <rdar://problem/9430386>
1913
1914         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
1915
1916         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1917         (WebKit::NetscapePluginStream::stop):
1918         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
1919
1920         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1921         Pass the request URL to NPP_URLNotify, matching other browsers.
1922
1923 2011-05-14  Jer Noble  <jer.noble@apple.com>
1924
1925         Reviewed by Simon Fraser.
1926
1927         Flashing window frame and graphical glitches after exiting full screen mode.
1928         https://bugs.webkit.org/show_bug.cgi?id=60825
1929
1930         A layer-backed WebView throws an exception when moved from a layer-backed parent view
1931         to a non-layer-backed one, so make the WebView a child of the content view, instead of
1932         the animation view.  There is an unrelated fix in beganExitFullScreen, which was calling
1933         finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when 
1934         notifications come out of order.
1935
1936         * UIProcess/mac/WKFullScreenWindowController.mm:
1937         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView
1938             to the full screen window's content view, instead of the _animationView.
1939         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call 
1940             finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.
1941         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the
1942             _layerHostingView to the contentView, instead of the animationView.
1943
1944 2011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
1945
1946         Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
1947
1948         Make GC validation more aggressive
1949         https://bugs.webkit.org/show_bug.cgi?id=60802
1950
1951         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1952         (WebKit::JSNPObject::invalidate):
1953         (WebKit::JSNPObject::callMethod):
1954         (WebKit::JSNPObject::callObject):
1955         (WebKit::JSNPObject::callConstructor):
1956         (WebKit::JSNPObject::getCallData):
1957         (WebKit::JSNPObject::getConstructData):
1958         (WebKit::JSNPObject::getOwnPropertySlot):
1959         (WebKit::JSNPObject::getOwnPropertyDescriptor):
1960         (WebKit::JSNPObject::put):
1961         (WebKit::JSNPObject::getOwnPropertyNames):
1962         (WebKit::JSNPObject::propertyGetter):
1963         (WebKit::JSNPObject::methodGetter):
1964
1965 2011-05-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1966
1967         Unreviewed, rolling out r86476.
1968         http://trac.webkit.org/changeset/86476
1969         https://bugs.webkit.org/show_bug.cgi?id=60832
1970
1971         It made plugins/get-url-notify-with-url-that-fails-to-
1972         load.html crash on GTK (Requested by Ossy on #webkit).
1973
1974         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1975         (WebKit::NetscapePluginStream::stop):
1976         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1977
1978 2011-05-13  Enrica Casucci  <enrica@apple.com>
1979
1980         Reviewed by Darin Adler and Brian Weinstein.
1981
1982         REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop
1983         https://bugs.webkit.org/show_bug.cgi?id=60819
1984         <rdar://problem/9370689>
1985
1986         To support drag-and-drop to the desktop and other windows applications,
1987         we need to support the fileDescriptor and fileContentZero clipboard formats.
1988         This patch adds the support for serializing these types across the process boundary.
1989
1990         * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
1991         (CoreIPC::Arguments10::Arguments10):
1992         (CoreIPC::Arguments10::encode):
1993         (CoreIPC::Arguments10::decode):
1994         (CoreIPC::In):
1995         (CoreIPC::Out):
1996         * Platform/CoreIPC/HandleMessage.h:
1997         (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
1998         * UIProcess/WebPageProxy.cpp:
1999         (WebKit::WebPageProxy::startDragDrop):
2000         * UIProcess/WebPageProxy.h:
2001         * UIProcess/WebPageProxy.messages.in:
2002         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
2003         (WebKit::WebDragClient::startDrag):
2004
2005 2011-05-13  Anders Carlsson  <andersca@apple.com>
2006
2007         Reviewed by Sam Weinig.
2008
2009         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
2010         https://bugs.webkit.org/show_bug.cgi?id=60823
2011         <rdar://problem/9430386>
2012
2013         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
2014
2015         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2016         (WebKit::NetscapePluginStream::stop):
2017         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
2018
2019         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
2020         Pass the request URL to NPP_URLNotify, matching other browsers.
2021
2022 2011-05-13  Michael Saboff  <msaboff@apple.com>
2023
2024         Reviewed by Geoffrey Garen.
2025
2026         Backing store may not get discarded due to stopped timer
2027         https://bugs.webkit.org/show_bug.cgi?id=60816
2028
2029         Changed the backing store timer to restart if it has been stopped.
2030         The evaluation is done when the view's state is changed.
2031         This change appears to be worth ~3MB (one backing store worth)
2032         during memory tests.
2033
2034         * UIProcess/DrawingAreaProxyImpl.cpp:
2035         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
2036         * UIProcess/WebPageProxy.cpp:
2037         (WebKit::WebPageProxy::viewStateDidChange):
2038
2039 2011-05-13  Oliver Hunt  <oliver@apple.com>
2040
2041         Reviewed by Geoffrey Garen.
2042
2043         Make GC validation more aggressive
2044         https://bugs.webkit.org/show_bug.cgi?id=60802
2045
2046         Add GC_VALIDATION calls to all the JSNPObject methods.
2047
2048         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2049         (WebKit::JSNPObject::invalidate):
2050         (WebKit::JSNPObject::callMethod):
2051         (WebKit::JSNPObject::callObject):
2052         (WebKit::JSNPObject::callConstructor):
2053         (WebKit::JSNPObject::getCallData):
2054         (WebKit::JSNPObject::getConstructData):
2055         (WebKit::JSNPObject::getOwnPropertySlot):
2056         (WebKit::JSNPObject::getOwnPropertyDescriptor):
2057         (WebKit::JSNPObject::put):
2058         (WebKit::JSNPObject::getOwnPropertyNames):
2059         (WebKit::JSNPObject::propertyGetter):
2060         (WebKit::JSNPObject::methodGetter):
2061
2062 2011-05-13  Anders Carlsson  <andersca@apple.com>
2063
2064         Reviewed by Sam Weinig.
2065
2066         NPN_GetURL with a javascript: URL doesn't send back the result in the stream
2067         https://bugs.webkit.org/show_bug.cgi?id=60810
2068
2069         In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL
2070         to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object
2071         to avoid sending it over the wire.
2072
2073         * PluginProcess/PluginControllerProxy.cpp:
2074         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
2075         * PluginProcess/PluginControllerProxy.h:
2076         * PluginProcess/PluginControllerProxy.messages.in:
2077         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2078         (WebKit::NetscapePlugin::loadURL):
2079         (WebKit::NetscapePlugin::didEvaluateJavaScript):
2080         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
2081         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2082         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2083         (WebKit::NetscapePluginStream::NetscapePluginStream):
2084         (WebKit::NetscapePluginStream::sendJavaScriptStream):
2085         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2086         (WebKit::NetscapePluginStream::create):
2087         * WebProcess/Plugins/Plugin.h:
2088         * WebProcess/Plugins/PluginProxy.cpp:
2089         (WebKit::PluginProxy::didEvaluateJavaScript):
2090         * WebProcess/Plugins/PluginProxy.h:
2091         * WebProcess/Plugins/PluginView.cpp:
2092         (WebKit::PluginView::performJavaScriptURLRequest):
2093
2094 2011-05-13  Jeff Miller  <jeffm@apple.com>
2095
2096         Reviewed by Darin Adler.
2097
2098         Make some page() member functions const
2099         https://bugs.webkit.org/show_bug.cgi?id=60794
2100
2101         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Make page() const.
2102         * UIProcess/WebFrameProxy.h:
2103         (WebKit::WebFrameProxy::page): Make page() const.
2104         * UIProcess/WebInspectorProxy.h:
2105         (WebKit::WebInspectorProxy::page): Make page() const.
2106         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
2107         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2108         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2109         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2110         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
2111         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2112         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2113         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2114
2115 2011-05-13  Adam Roben  <aroben@apple.com>
2116
2117         Load plugins in the order they're found
2118
2119         Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
2120         doesn't prefer plugins in the additional plugins directory
2121
2122         Reviewed by Anders Carlsson.
2123
2124         * UIProcess/Plugins/PluginInfoStore.cpp:
2125         (WebKit::addFromVector):
2126         Changed to use a ListHashSet instead of a HashSet to store the plugin paths.
2127
2128 2011-05-13  Sam Weinig  <sam@webkit.org>
2129
2130         Reviewed by Anders Carlsson.
2131
2132         Prune #includes from FrameView.h (Part 2)
2133         https://bugs.webkit.org/show_bug.cgi?id=60748
2134
2135         - Update files that were depending on FrameView.h #including Frame.h or
2136           Page.h.
2137
2138         * WebProcess/Plugins/PluginView.cpp:
2139         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2140         * WebProcess/WebPage/WebContextMenu.cpp:
2141         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2142
2143 2011-05-13  Martin Robinson  <mrobinson@igalia.com>
2144
2145         Reviewed by Eric Seidel.
2146
2147         [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
2148         https://bugs.webkit.org/show_bug.cgi?id=59765
2149
2150         Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
2151         class we can now share the code with WebKit2.
2152
2153         * UIProcess/API/gtk/PageClientImpl.cpp:
2154         (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
2155         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.
2156         * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member.
2157
2158 2011-05-12  Pratik Solanki  <psolanki@apple.com>
2159
2160         Reviewed by Antti Koivisto.
2161
2162         Part of WebCore should use CFNetwork-based loader on Mac
2163         https://bugs.webkit.org/show_bug.cgi?id=51836
2164
2165         Use CFRunLoop when using CFNetwork.
2166
2167         * WebProcess/WebPage/mac/WebPageMac.mm:
2168         (WebKit::WebPage::platformInitialize):
2169
2170 2011-05-12  Sam Weinig  <sam@webkit.org>
2171
2172         Reviewed by Gavin Barraclough.
2173
2174         WebProcess sandbox denies file:/// accesses after you navigate to a nonexistent file
2175         <rdar://problem/9427752>
2176         https://bugs.webkit.org/show_bug.cgi?id=60745
2177
2178         * WebProcess/WebPage/WebPage.cpp:
2179         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
2180         Don't attempt to re-use a non-existent committed sandbox extension. This can
2181         happen when the previous load was file: url, but did not require an extension,
2182         such as an error page.
2183
2184 2011-05-12  Jia Pu  <jpu@apple.com>
2185
2186         Reviewed by Darin Adler.
2187
2188         Regression caused by changeset 86281
2189         https://bugs.webkit.org/show_bug.cgi?id=60712
2190         <rdar://problem/9427970>
2191
2192         Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking.
2193         So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal()
2194         returns. So we don't need to use the condition to coordinate between these two function. In fact,
2195         all callbacks are delivered on main thread. We don't really need any locking here.
2196
2197         Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has
2198         been removed.
2199
2200         * UIProcess/API/mac/PageClientImpl.mm:
2201         (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
2202         * UIProcess/mac/CorrectionPanel.h:
2203         * UIProcess/mac/CorrectionPanel.mm:
2204         (WebKit::CorrectionPanel::CorrectionPanel):
2205         (WebKit::CorrectionPanel::show):
2206         (WebKit::CorrectionPanel::dismiss):
2207         (WebKit::CorrectionPanel::dismissInternal):
2208         (WebKit::CorrectionPanel::handleAcceptedReplacement):
2209
2210 2011-05-12  Brian Weinstein  <bweinstein@apple.com>
2211
2212         Reviewed by Adam Roben.
2213
2214         WebKit2: Implement plugin quirk for Mozilla user agent for older Flash
2215         https://bugs.webkit.org/show_bug.cgi?id=60726
2216         <rdar://problem/8470824>
2217         
2218         Implement the quirk for versions of Flash before v10 that only request windowless plugins
2219         if we use a Mozilla user agent.
2220
2221         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
2222         (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the
2223             "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use
2224             the Mozilla user agent.
2225         * Shared/Plugins/PluginQuirks.h:
2226         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2227         (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user
2228             agent.
2229         * win/WebKit2.vcproj: Add PluginQuirks.h.
2230
2231 2011-05-12  Anders Carlsson  <andersca@apple.com>
2232
2233         Reviewed by Simon Fraser.
2234
2235         PluginView::invalidateRect doesn't work for transformed plug-ins
2236         https://bugs.webkit.org/show_bug.cgi?id=60727
2237         <rdar://problem/9331244>
2238
2239         Ask the RenderObject to repaint the plug-in instead of using invalidateContentsAndWindow.
2240         This matches what we do in WebKit1.
2241
2242         * WebProcess/Plugins/PluginView.cpp:
2243         (WebKit::PluginView::invalidateRect):
2244
2245 2011-05-12  Jessie Berlin  <jberlin@apple.com>
2246
2247         Reviewed by Darin Adler.
2248
2249         [Windows WebKit2] Use cookies set in WebKit1
2250         https://bugs.webkit.org/show_bug.cgi?id=60274
2251
2252         Properly handle the case where there is no serialized default storage session by not trying
2253         to encode or decode 0, while still making sure to decode any valid storage session.
2254
2255         * Shared/WebProcessCreationParameters.cpp:
2256         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2257         (WebKit::WebProcessCreationParameters::encode):
2258         Only encode the storage session if there is one to encode.
2259         (WebKit::WebProcessCreationParameters::decode):
2260         Only decode the storage session there is one to decode.
2261         * Shared/WebProcessCreationParameters.h:
2262
2263 2011-05-11  Brian Weinstein  <bweinstein@apple.com>
2264
2265         Reviewed by Anders Carlsson.
2266
2267         After relaunching an unresponsive web process, web page stops responding to mouse movement
2268         https://bugs.webkit.org/show_bug.cgi?id=60669
2269         <rdar://problem/9409934>
2270
2271         * UIProcess/WebPageProxy.cpp:
2272         (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
2273             crashes.
2274
2275 2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
2276
2277         Reviewed by Darin Adler.
2278
2279         Perform some forward declarations suggested by include-what-you-use
2280         https://bugs.webkit.org/show_bug.cgi?id=60545
2281
2282         * WebProcess/WebPage/mac/WebPageMac.mm:
2283
2284 2011-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2285
2286         Reviewed by Martin Robinson.
2287
2288         Fix the build with ENABLE_PLUGIN_PROCESS
2289         https://bugs.webkit.org/show_bug.cgi?id=60628
2290
2291         * WebProcess/Plugins/PluginProxy.cpp:
2292         (WebKit::PluginProxy::initialize): Move the call to
2293         pluginController->isAcceleratedCompositingEnabled() to a #ifdef block.
2294         * WebProcess/Plugins/PluginProxy.h: Add include for <WebCore/IntRect.h>.
2295
2296 2011-05-11  Damian Kaleta  <dkaleta@apple.com>
2297
2298         Reviewed by Brady Eidson.
2299
2300         Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
2301         https://bugs.webkit.org/show_bug.cgi?id=60674
2302
2303         * UIProcess/API/C/WKPage.cpp:
2304         (WKPageTryRestoreScrollPosition):
2305         * UIProcess/API/C/WKPage.h:
2306         * UIProcess/WebPageProxy.cpp:
2307         (WebKit::WebPageProxy::tryRestoreScrollPosition):
2308         * UIProcess/WebPageProxy.h:
2309         * WebProcess/WebPage/WebPage.cpp:
2310         (WebKit::WebPage::tryRestoreScrollPosition):
2311         * WebProcess/WebPage/WebPage.h:
2312         * WebProcess/WebPage/WebPage.messages.in:
2313
2314 2011-05-11  Sam Weinig  <sam@webkit.org>
2315
2316         Reviewed by Gavin Barraclough.
2317
2318         WebKit2 doesn't build on Mac with strict PassOwnPtr
2319         https://bugs.webkit.org/show_bug.cgi?id=60655
2320
2321         * Platform/CoreIPC/HandleMessage.h:
2322         (CoreIPC::handleMessageDelayed):
2323         Add explicit adoptPtr to indicate that the constructor is taking ownership.
2324
2325 2011-05-11  Jessie Berlin  <jberlin@apple.com>
2326
2327         Reviewed by Steve Falkenburg.
2328
2329         [Windows WebKit2] Use cookies set in WebKit1
2330         https://bugs.webkit.org/show_bug.cgi?id=60274
2331
2332         Share the default storage session between the UI and Web Processes.
2333
2334         * Shared/WebProcessCreationParameters.cpp:
2335         (WebKit::WebProcessCreationParameters::encode):
2336         Only encode the session parameter if it is valid.
2337         (WebKit::WebProcessCreationParameters::decode):
2338         Don't try to decode a null session data. 
2339         * Shared/WebProcessCreationParameters.h:
2340         Add a parameter for a serialized default storage session, used only on Windows.
2341
2342         * Shared/win/WebCoreArgumentCodersWin.cpp:
2343         (CoreIPC::decodeResourceRequest):
2344         Make sure to set the current storage session on any requests used by the Web
2345         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2346         doing anything with the Web Process's default storage session.
2347
2348         * UIProcess/win/WebContextWin.cpp:
2349         (WebKit::WebContext::platformInitializeWebProcess):
2350         Serialize the default storage session in the UI Process and add it to the
2351         WebProcessCreationParameters.
2352
2353         * WebProcess/WebPage/win/WebPageWin.cpp:
2354         (WebKit::cachedResponseForURL):
2355         Use the cache associated with the current storage session and make sure the request has the
2356         current storage session set on it before doing anything with it.
2357
2358         * WebProcess/win/WebProcessWin.cpp:
2359         (WebKit::WebProcess::platformSetCacheModel):
2360         Use the default storage session.
2361         (WebKit::WebProcess::platformClearResourceCaches):
2362         Ditto.
2363         (WebKit::WebProcess::platformInitializeWebProcess):
2364         Deserialize the default storage session passed in by the UI Process and hand it to the
2365         ResourceHandle.
2366
2367 2011-05-11  Jia Pu  <jpu@apple.com>
2368
2369         Reviewed by Darin Adler.
2370
2371         CorrectionPanel sometimes hangs in dismissSoon().
2372         https://bugs.webkit.org/show_bug.cgi?id=60599
2373         <rdar://problem/9313628>
2374
2375         Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal
2376         to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal,
2377         for condition checking.
2378
2379         * UIProcess/mac/CorrectionPanel.h:
2380         * UIProcess/mac/CorrectionPanel.mm:
2381         (WebKit::CorrectionPanel::CorrectionPanel):
2382         (WebKit::CorrectionPanel::show):
2383         (WebKit::CorrectionPanel::dismissSoon):
2384         (WebKit::CorrectionPanel::dismissInternal):
2385         (WebKit::CorrectionPanel::handleAcceptedReplacement):
2386
2387 2011-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2388
2389         Unreviewed, rolling out r86255.
2390         http://trac.webkit.org/changeset/86255
2391         https://bugs.webkit.org/show_bug.cgi?id=60660
2392
2393         REGRESSION (r86255): Lots of tests crashing in
2394         CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
2395         (WebKit2 Tests) (Requested by aroben on #webkit).
2396
2397         * Shared/WebProcessCreationParameters.cpp:
2398         (WebKit::WebProcessCreationParameters::encode):
2399         (WebKit::WebProcessCreationParameters::decode):
2400         * Shared/WebProcessCreationParameters.h:
2401         * Shared/win/WebCoreArgumentCodersWin.cpp:
2402         (CoreIPC::decodeResourceRequest):
2403         * UIProcess/win/WebContextWin.cpp:
2404         (WebKit::WebContext::platformInitializeWebProcess):
2405         * WebProcess/WebPage/win/WebPageWin.cpp:
2406         (WebKit::cachedResponseForURL):
2407         * WebProcess/win/WebProcessWin.cpp:
2408         (WebKit::WebProcess::platformSetCacheModel):
2409         (WebKit::WebProcess::platformClearResourceCaches):
2410         (WebKit::WebProcess::platformInitializeWebProcess):
2411
2412 2011-05-11  Adam Roben  <aroben@apple.com>
2413
2414         Don't notify the plugin when a targeted javascript: URL request completes
2415
2416         This matches Mozilla and WebKit1.
2417
2418         Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
2419         plugin doesn't appear on a hanes.com page
2420
2421         Test: plugins/get-targeted-javascript-url.html
2422
2423         Reviewed by Anders Carlsson.
2424
2425         * WebProcess/Plugins/PluginView.cpp:
2426         (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
2427         request had a target.
2428
2429 2011-05-11  Jessie Berlin  <jberlin@apple.com>
2430
2431         Reviewed by Steve Falkenburg.
2432
2433         [Windows WebKit2] Use cookies set in WebKit1
2434         https://bugs.webkit.org/show_bug.cgi?id=60274
2435
2436         Share the default storage session between the UI and Web Processes.
2437
2438         * Shared/WebProcessCreationParameters.cpp:
2439         (WebKit::WebProcessCreationParameters::encode):
2440         (WebKit::WebProcessCreationParameters::decode):
2441         * Shared/WebProcessCreationParameters.h:
2442         Add a parameter for a serialized default storage session, used only on Windows.
2443
2444         * Shared/win/WebCoreArgumentCodersWin.cpp:
2445         (CoreIPC::decodeResourceRequest):
2446         Make sure to set the current storage session on any requests used by the Web
2447         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2448         doing anything with the Web Process's default storage session.
2449
2450         * UIProcess/win/WebContextWin.cpp:
2451         (WebKit::WebContext::platformInitializeWebProcess):
2452         Serialize the default storage session in the UI Process and add it to the
2453         WebProcessCreationParameters.
2454
2455         * WebProcess/WebPage/win/WebPageWin.cpp:
2456         (WebKit::cachedResponseForURL):
2457         Use the cache associated with the current storage session and make sure the request has the
2458         current storage session set on it before doing anything with it.
2459
2460         * WebProcess/win/WebProcessWin.cpp:
2461         (WebKit::WebProcess::platformSetCacheModel):
2462         Use the default storage session.
2463         (WebKit::WebProcess::platformClearResourceCaches):
2464         Ditto.
2465         (WebKit::WebProcess::platformInitializeWebProcess):
2466         Deserialize the default storage session passed in by the UI Process and hand it to the
2467         ResourceHandle.
2468
2469 2011-05-11  Sam Weinig  <sam@webkit.org>
2470
2471         Reviewed by Adam Roben.
2472
2473         WebKit2 should tell app that is unresponsive in more cases
2474         <rdar://problem/9110151>
2475         https://bugs.webkit.org/show_bug.cgi?id=60608
2476
2477         * UIProcess/DrawingAreaProxyImpl.cpp:
2478         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2479         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2480         Invoke the responsiveness time when forcing a backing store update
2481         to catch the cases of activating tabs, resizing the window, etc.
2482
2483 2011-05-11  Martin Robinson  <mrobinson@igalia.com>
2484
2485         Try to fix the WinCairo build.
2486
2487         * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and
2488         guard it with USE(CAIRO) instead of PLATFORM(CAIRO).
2489
2490 2011-05-11  John Sullivan  <sullivan@apple.com>
2491
2492         Reviewed by Darin Adler.
2493
2494         <https://bugs.webkit.org/show_bug.cgi?id=60631>
2495         <rdar://problem/9420520>
2496         
2497         WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631]
2498
2499         * UIProcess/WebPageProxy.cpp:
2500         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2501         Call clearPendingAPIRequestURL().
2502
2503 2011-05-11  Adam Roben  <aroben@apple.com>
2504
2505         Turn on strict PassOwnPtr on Windows
2506
2507         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
2508
2509         Reviewed by Adam Barth.
2510
2511         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
2512         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0.
2513
2514 2011-05-11  Jessie Berlin  <jberlin@apple.com>
2515
2516         Reviewed by Darin Adler.
2517
2518         [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information
2519         about the usage for both the origin overall and the database in question.
2520         https://bugs.webkit.org/show_bug.cgi?id=60573
2521
2522         Add the currentOriginUsage parameter.
2523
2524         * Platform/CoreIPC/HandleMessage.h:
2525         (CoreIPC::callMemberFunction):
2526         * UIProcess/API/C/WKPage.h:
2527         * UIProcess/WebPageProxy.cpp:
2528         (WebKit::WebPageProxy::exceededDatabaseQuota):
2529         * UIProcess/WebPageProxy.h:
2530         * UIProcess/WebPageProxy.messages.in:
2531         * UIProcess/WebUIClient.cpp:
2532         (WebKit::WebUIClient::exceededDatabaseQuota):
2533         * UIProcess/WebUIClient.h:
2534         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2535         (WebKit::WebChromeClient::exceededDatabaseQuota):
2536
2537 2011-05-10  Oliver Hunt  <oliver@apple.com>
2538
2539         Reviewed by Geoffrey Garen.
2540
2541         Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page
2542         https://bugs.webkit.org/show_bug.cgi?id=60580
2543
2544         The plugin object map was incorrect trying to implement a weak map itself using
2545         destructors.  Switch to a WeakGCMap and the problem is fixed.
2546
2547         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2548         (WebKit::JSNPObject::~JSNPObject):
2549         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2550         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
2551         (WebKit::NPRuntimeObjectMap::invalidate):
2552         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2553
2554 2011-05-10  Sam Weinig  <sam@webkit.org>
2555
2556         Reviewed by Dan Bernstein.
2557
2558         Yet more quarantine related sandbox denial when downloading files
2559         <rdar://problem/9397494>
2560
2561         * WebProcess/com.apple.WebProcess.sb:
2562
2563 2011-05-10  Sam Weinig  <sam@webkit.org>
2564
2565         Reviewed by Anders Carlsson.
2566
2567         WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return
2568         https://bugs.webkit.org/show_bug.cgi?id=60584
2569
2570         * UIProcess/WebPageProxy.cpp:
2571         (WebKit::WebPageProxy::handleWheelEvent):
2572         (WebKit::canCoalesce):
2573         (WebKit::coalesce):
2574         (WebKit::coalescedWheelEvent):
2575         (WebKit::WebPageProxy::didReceiveEvent):
2576         (WebKit::WebPageProxy::processDidCrash):
2577         Reworks coalescing/merging code to happen on didReceiveEvent rather than in
2578         handleWheelEvent. This means we now store the pending events in a queue, and
2579         pull them out when we can.
2580
2581         * UIProcess/WebPageProxy.h:
2582         Change single event containers to contain all pending/merged/coalesced events
2583         and remove unused flag.
2584
2585 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
2586
2587         Reviewed by Darin Adler.
2588
2589         WebKit2: Cancelling full screen before animation completes leads to full screen window staying up.
2590         https://bugs.webkit.org/show_bug.cgi?id=60531
2591
2592         Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and 
2593         _isExitingFullScreen.  These will ensure each is only called once per full screen request, and
2594         that if one exit/enter request interrupts another, that the required functions are called in 
2595         order.
2596
2597         * UIProcess/mac/WKFullScreenWindowController.h:
2598         * UIProcess/mac/WKFullScreenWindowController.mm:
2599         (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating.
2600         (-[WKFullScreenWindowController exitFullScreen]): Ditto.
2601         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen
2602             and call [self finishedExitFullScreenAnimation:] if necessary.
2603         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen.
2604         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen
2605             and call [self finishedEnterFullScreenAnimation:] if necessary.
2606         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen.
2607
2608 2011-05-10  Beth Dakin  <bdakin@apple.com>
2609
2610         Reviewed by Darin Adler.
2611
2612         https://bugs.webkit.org/show_bug.cgi?id=60582
2613         Crash switching overlay/non-overlay scrollbar preference still possible
2614         -and corresponding-
2615         <rdar://problem/9323983>
2616
2617         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2618         (InitWebCoreSystemInterface):
2619
2620 2011-05-10  Jeff Miller  <jeffm@apple.com>
2621
2622         Reviewed by Anders Carlsson.
2623
2624         WebKit2: Windows clients need to know if the page overlay is installed
2625         https://bugs.webkit.org/show_bug.cgi?id=60562
2626         <rdar://problem/8940164>
2627         
2628         Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
2629         WebKit clients need to know whether WebKit is drawing the page overlay or not.  Keep track of this in
2630         the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
2631
2632         * UIProcess/API/C/win/WKView.cpp:
2633         (WKViewIsPageOverlayInstalled): Added.
2634         * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
2635         
2636         * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
2637         * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
2638         * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
2639         * UIProcess/win/WebPageProxyWin.cpp:
2640         (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
2641         
2642         * UIProcess/win/WebView.cpp:
2643         (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
2644         (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
2645         * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
2646         (WebKit::WebView::pageOverlayInstalled): Added.
2647         
2648         * WebProcess/WebPage/WebPage.cpp:
2649         (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
2650         (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
2651
2652 2011-05-10  Anders Carlsson  <andersca@apple.com>
2653
2654         Reviewed by Adam Roben.
2655
2656         Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply
2657         https://bugs.webkit.org/show_bug.cgi?id=60567
2658         <rdar://problem/9377845>
2659
2660         It is possible to receive an incoming sync reply that is for a request we don't know about.
2661         This could happen if the sync message send timed out for example.
2662
2663         * Platform/CoreIPC/Connection.cpp:
2664         (CoreIPC::Connection::processIncomingSyncReply):
2665
2666 2011-05-05  Brent Fulgham  <bfulgham@webkit.org> and Martin Robinson  <mrobinson@igalia.com>
2667
2668         Reviewed by Anders Carlsson.
2669
2670         [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
2671         https://bugs.webkit.org/show_bug.cgi?id=60293
2672
2673         * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo.
2674         * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations.
2675         * Shared/cairo/ShareableBitmapCairo.cpp:
2676         (WebKit::ShareableBitmap::createGraphicsContext): Added.
2677         (WebKit::ShareableBitmap::paint): Added.
2678         (WebKit::ShareableBitmap::createCairoSurface): Added.
2679         (WebKit::ShareableBitmap::releaseSurfaceData): Added.
2680
2681 2011-05-10  Anders Carlsson  <andersca@apple.com>
2682
2683         Reviewed by Sam Weinig.
2684
2685         Extra sign in required to view video on MobileMe Gallery album
2686         https://bugs.webkit.org/show_bug.cgi?id=60560
2687
2688         Implement NPN_GetAuthenticationInfo.
2689
2690         * PluginProcess/PluginControllerProxy.cpp:
2691         (WebKit::PluginControllerProxy::getAuthenticationInfo):
2692         Send a GetAuthenticationInfo message to the web process.
2693
2694         * PluginProcess/PluginControllerProxy.h:
2695         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2696         (WebKit::initializeProtectionSpace):
2697         Initialize a WebCore::ProtectionSpace object from NPAPI parameters.
2698
2699         (WebKit::NPN_GetAuthenticationInfo):
2700         Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo. 
2701         Finally, copy the username/password and pass them back to the plug-in.
2702
2703         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2704         (WebKit::NetscapePlugin::getAuthenticationInfo):
2705         Call the plug-in controller.
2706
2707         * WebProcess/Plugins/PluginController.h:
2708         Add getAuthenticationInfo pure virtual member function.
2709
2710         * WebProcess/Plugins/PluginProxy.cpp:
2711         (WebKit::PluginProxy::getAuthenticationInfo):
2712         Call the real plug-in controller's getAuthenticationInfo member function.
2713
2714         * WebProcess/Plugins/PluginProxy.messages.in:
2715         Add GetAuthenticationInfo message.
2716
2717         * WebProcess/Plugins/PluginView.cpp:
2718         (WebKit::PluginView::getAuthenticationInfo):
2719         Try to get the authentication info from the credential storage. Failing that,
2720         get it from the persistent credential storage.
2721
2722 2011-05-10  Adam Roben  <aroben@apple.com>
2723
2724         Use FontSmoothingLevelWindows by default on Windows
2725
2726         Fixes <http://webkit.org/b/60557> REGRESSION (r86077): Web Inspector uses CG font rendering
2727         in WebKit2 on Windows
2728
2729         Reviewed by Darin Adler.
2730
2731         * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL
2732         macro to let Windows have a different default font smoothing level from other platforms.
2733
2734         * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font
2735         smoothing level.
2736
2737 2011-05-06  Tony Gentilcore  <tonyg@chromium.org>
2738
2739         Reviewed by Darin Adler.
2740
2741         Fix some unnecessary includes in headers
2742         https://bugs.webkit.org/show_bug.cgi?id=60388
2743
2744         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2745
2746 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
2747
2748         Reviewed by Darin Adler.
2749
2750         Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
2751         https://bugs.webkit.org/show_bug.cgi?id=60496
2752
2753         When animating into and out of full screen, order out and back in the original webView window,
2754         disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
2755         as the webView is hosted in the full screen window when we ask for it's parent window.
2756
2757         * UIProcess/mac/WKFullScreenWindowController.mm:
2758         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2759         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
2760
2761 2011-05-09  Dan Bernstein  <mitz@apple.com>
2762
2763         Reviewed by Darin Adler.
2764
2765         A WKView with plug-ins paints white when first moved into a window
2766         https://bugs.webkit.org/show_bug.cgi?id=60511
2767
2768         The UI process’s wait for DidUpdateBackingStoreState would always time out because the Web process
2769         was blocked on a synchronous message the UI process trying to get the connections for plug-ins in
2770         the view. This is avoided by deferring the call to Page::setCanStartMedia().
2771
2772         * WebProcess/WebPage/WebPage.cpp:
2773         (WebKit::WebPage::WebPage): Initialize the new m_setCanStartMediaTimer.
2774         (WebKit::WebPage::setCanStartMediaTimerFired): Added. Calls setCanStartMedia(true) when the timer
2775         fires.
2776         (WebKit::WebPage::setIsInWindow): When going out of a window, stop the timer. When going into a
2777         window, start it.
2778         * WebProcess/WebPage/WebPage.h:
2779
2780 2011-05-09  Anders Carlsson  <andersca@apple.com>
2781
2782         Reviewed by Dan Bernstein.
2783
2784         Crash when sending a sync message to a crashed web process
2785         https://bugs.webkit.org/show_bug.cgi?id=60514
2786         <rdar://problem/9281270>
2787
2788         Change WebProcessProxy::sendSync to return false if there's no connection.
2789
2790         Audit all WebProcessProxy::sendSync call sites to initialize reply parameters.
2791
2792         * UIProcess/WebPageProxy.cpp:
2793         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
2794         (WebKit::WebPageProxy::getSelectedText):
2795         (WebKit::WebPageProxy::gestureWillBegin):
2796         * UIProcess/WebProcessProxy.h:
2797         (WebKit::WebProcessProxy::sendSync):
2798         * UIProcess/mac/WebPageProxyMac.mm:
2799         (WebKit::WebPageProxy::insertText):
2800         (WebKit::WebPageProxy::getMarkedRange):
2801         (WebKit::WebPageProxy::getSelectedRange):
2802         (WebKit::WebPageProxy::characterIndexForPoint):
2803         (WebKit::WebPageProxy::executeKeypressCommands):
2804         (WebKit::WebPageProxy::writeSelectionToPasteboard):
2805         (WebKit::WebPageProxy::readSelectionFromPasteboard):
2806
2807 2011-05-09  Anders Carlsson  <andersca@apple.com>
2808
2809         Reviewed by Sam Weinig.
2810
2811         Create a plug-in's MIME types preferences plist if it doesn't exist.
2812         https://bugs.webkit.org/show_bug.cgi?id=57204
2813         <rdar://problem/9195048>
2814
2815         Spawn a plug-in process and let it create the plist. For now, we'll do this on the
2816         main thread since it's a rare one-time computation and we have an API function,
2817         WKFrameCanShowMIMEType, which would have to block anyway.
2818
2819         * PluginProcess/mac/PluginProcessMainMac.mm:
2820         (WebKit::PluginProcessMain):
2821         If -createPluginMIMETypesPreferences is one of the command line argument keys,
2822         the plug-in path will be the argument value. Call NetscapePluginModule::createPluginMIMETypesPreferences
2823         to create the preferences file and then exit.
2824
2825         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2826         (WebKit::contentsOfPropertyListAtURL):
2827         Move code to read a property list out into a helper function.
2828
2829         (WebKit::getMIMETypesFromPluginBundle):
2830         If there's no property list file, try to create one.
2831
2832         (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences):
2833         Load the plug-in, find the BP_CreatePluginMIMETypesPreferences and call it.
2834
2835         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2836         (WebKit::PluginProcessProxy::createPropertyListFile):
2837         Spawn a plug-in process and pass the -createPluginMIMETypesPreferences flag to it and then wait
2838         for it to exit.
2839
2840 2011-05-09  Anders Carlsson  <andersca@apple.com>
2841
2842         Reviewed by Sam Weinig.
2843
2844         Move EnvironmentVariables out into its own .cpp file
2845         https://bugs.webkit.org/show_bug.cgi?id=60507
2846
2847         * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Added.
2848         (WebKit::EnvironmentVariables::EnvironmentVariables):
2849         (WebKit::EnvironmentVariables::~EnvironmentVariables):
2850         (WebKit::EnvironmentVariables::set):
2851         (WebKit::EnvironmentVariables::get):
2852         (WebKit::EnvironmentVariables::appendValue):
2853         (WebKit::EnvironmentVariables::valueIfVariableHasName):
2854         (WebKit::EnvironmentVariables::createStringForVariable):
2855         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
2856         * UIProcess/Launcher/mac/EnvironmentVariables.h: Added.
2857         (WebKit::EnvironmentVariables::environmentPointer):
2858         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2859         * WebKit2.xcodeproj/project.pbxproj:
2860
2861 2011-05-09  Adam Roben  <aroben@apple.com>
2862
2863         Always set the font rendering mode based on preference values
2864
2865         WebPage::platformInitialize and WebPage::platformPreferencesDidChange were fighting over the
2866         font rendering mode. The platformInitialize code predates preference-based font rendering
2867         mode support, and is now redundant and incorrect.
2868
2869         Fixes <http://webkit.org/b/60494> WebKit2 uses GDI text instead of CG text when
2870         FontSmoothing preference is set to kWKFontSmoothingLevelNoSubpixelAntiAliasing in a .plist
2871         on disk
2872
2873         Reviewed by Sam Weinig.
2874
2875         * WebProcess/WebPage/win/WebPageWin.cpp:
2876         (WebKit::WebPage::platformInitialize): Removed code to set the font rendering mode.
2877         platformPreferencesDidChange will take care of this for us.
2878
2879 2011-05-09  Anders Carlsson  <andersca@apple.com>
2880
2881         Reviewed by John Sullivan.
2882
2883         Clean up NetscapePluginModule::getPluginInfo
2884         https://bugs.webkit.org/show_bug.cgi?id=60486
2885
2886         Make all 'get' functions take a PluginInfoStore::Plugin reference, since getPluginInfoFromPropertyLists
2887         is going to need it to know the path and plug-in architecture.
2888
2889         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2890         (WebKit::getPluginArchitecture):
2891         (WebKit::getPluginInfoFromPropertyLists):
2892         (WebKit::getPluginInfoFromCarbonResources):
2893         (WebKit::NetscapePluginModule::getPluginInfo):
2894
2895 2011-05-09  Dan Bernstein  <mitz@apple.com>
2896
2897         Reviewed by Darin Adler.
2898
2899         <rdar://problem/9005982> REGRESSION (r85780): Flash of white when a WKView with composited content moves on-screen
2900         https://bugs.webkit.org/show_bug.cgi?id=60488
2901
2902         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2903         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Update m_compositingAccordingToProxyMessages,
2904         since the DidUpdateBackingStoreState message also changes the compositing state in the proxy.
2905
2906 2011-05-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
2907
2908         Reviewed by Andreas Kling.
2909
2910         Build fix for WebKit 2 on Qt
2911
2912         Qt treats warnings as errors so it does not build with unused variables. This patch removed two unused variable in WebKit 2.
2913
2914         * UIProcess/TiledDrawingAreaProxy.cpp:
2915         (WebKit::TiledDrawingAreaProxy::createTiles):
2916         * WebProcess/Plugins/PluginView.cpp:
2917         (WebKit::PluginView::~PluginView):
2918
2919 2011-05-07  Dan Bernstein  <mitz@apple.com>
2920
2921         Reviewed by Timothy Hatcher.
2922
2923         <rdar://problem/9365358> REGRESSION (WebKit2): When clicking in the page, Find overlay fades out instead of disappearing immediately
2924
2925         * WebProcess/WebPage/FindController.cpp:
2926         (WebKit::FindController::hideFindUI): Do not fade out the overlay.
2927
2928 2011-05-07  Dan Bernstein  <mitz@apple.com>
2929
2930         Avoid copying a header file into the WebKit2 framework wrapper.
2931
2932         * WebKit2.xcodeproj/project.pbxproj: Corrected the target membership of HTTPCookieAcceptPolicy.h.
2933
2934 2011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2935
2936         Unreviewed, rolling out r86016.
2937         http://trac.webkit.org/changeset/86016
2938         https://bugs.webkit.org/show_bug.cgi?id=60445
2939
2940         caused crashes on the WK2 Windows bots (Requested by
2941         jessieberlin on #webkit).
2942
2943         * Shared/WebProcessCreationParameters.cpp:
2944         (WebKit::WebProcessCreationParameters::encode):
2945         (WebKit::WebProcessCreationParameters::decode):
2946         * Shared/WebProcessCreationParameters.h:
2947         * Shared/win/WebCoreArgumentCodersWin.cpp:
2948         (CoreIPC::decodeResourceRequest):
2949         * UIProcess/win/WebContextWin.cpp:
2950         (WebKit::WebContext::platformInitializeWebProcess):
2951         * WebProcess/WebPage/win/WebPageWin.cpp:
2952         (WebKit::cachedResponseForURL):
2953         * WebProcess/win/WebProcessWin.cpp:
2954         (WebKit::WebProcess::platformSetCacheModel):
2955         (WebKit::WebProcess::platformClearResourceCaches):
2956         (WebKit::WebProcess::platformInitializeWebProcess):
2957
2958 2011-05-07  Jessie Berlin  <jberlin@apple.com>
2959
2960         Reviewed by Steve Falkenburg.
2961
2962         [Windows WebKit2] Use cookies set in WebKit1
2963         https://bugs.webkit.org/show_bug.cgi?id=60274
2964
2965         Share the default storage session between the UI and Web Processes.
2966
2967         * Shared/WebProcessCreationParameters.cpp:
2968         (WebKit::WebProcessCreationParameters::encode):
2969         (WebKit::WebProcessCreationParameters::decode):
2970         * Shared/WebProcessCreationParameters.h:
2971         Add a parameter for a serialized default storage session, used only on Windows.
2972
2973         * Shared/win/WebCoreArgumentCodersWin.cpp:
2974         (CoreIPC::decodeResourceRequest):
2975         Make sure to set the current storage session on any requests used by the Web
2976         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2977         doing anything with the Web Process's default storage session.
2978
2979         * UIProcess/win/WebContextWin.cpp:
2980         (WebKit::WebContext::platformInitializeWebProcess):
2981         Serialize the default storage session in the UI Process and add it to the
2982         WebProcessCreationParameters.
2983
2984         * WebProcess/WebPage/win/WebPageWin.cpp:
2985         (WebKit::cachedResponseForURL):
2986         Use the cache associated with the current storage session and make sure the request has the
2987         current storage session set on it before doing anything with it.
2988
2989         * WebProcess/win/WebProcessWin.cpp:
2990         (WebKit::WebProcess::platformSetCacheModel):
2991         Use the default storage session.
2992         (WebKit::WebProcess::platformClearResourceCaches):
2993         Ditto.
2994         (WebKit::WebProcess::platformInitializeWebProcess):
2995         Deserialize the default storage session passed in by the UI Process and hand it to the
2996         ResourceHandle.
2997
2998 2011-05-07  Keith Kyzivat  <keith.kyzivat@nokia.com>
2999
3000         Reviewed by Adam Roben.
3001
3002         [Qt] Webkit2 PLUGIN_ARCHITECTURE(UNSUPPORTED) configuration broken by r85961
3003         https://bugs.webkit.org/show_bug.cgi?id=60420
3004
3005         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
3006         (WebKit::NetscapePlugin::platformVisibilityDidChange):
3007
3008 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
3009
3010         Reviewed by Xan Lopez.
3011
3012         [GTK] [WebKit2] WebView::windowToScreen needs an implementation
3013         https://bugs.webkit.org/show_bug.cgi?id=55960
3014
3015         Add an implementation of PageClient::windowToScreen for GTK+ WebKit2 using
3016         the newly abstracted widget to screen coordinate translation code in WebCore.
3017
3018         * UIProcess/API/gtk/PageClientImpl.cpp:
3019         (WebKit::PageClientImpl::windowToScreen): Added implementation.
3020
3021 2011-05-06  Anders Carlsson  <andersca@apple.com>
3022
3023         Reviewed by Dan Bernstein.
3024
3025         Simplify the PluginInfoStore interface
3026         https://bugs.webkit.org/show_bug.cgi?id=60406
3027
3028         Just expose a single API for getting a list of plug-ins from the info store,
3029         PluginInfoStore::plugins and remove PluginInfoStore::getPlugins and PluginInfoStore::getPluginPaths.
3030
3031         Also, change the WebContext::pluginInfoStore() getter to return a reference.
3032
3033         * UIProcess/Plugins/PluginInfoStore.cpp:
3034         (WebKit::PluginInfoStore::plugins):
3035         * UIProcess/Plugins/PluginInfoStore.h:
3036         * UIProcess/Plugins/PluginProcessManager.cpp:
3037         (WebKit::PluginProcessManager::getPluginProcessConnection):
3038         * UIProcess/Plugins/PluginProcessManager.h:
3039         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
3040         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
3041         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
3042         (WebKit::WebPluginSiteDataManager::getSitesWithData):
3043         (WebKit::WebPluginSiteDataManager::clearSiteData):
3044         * UIProcess/WebContext.cpp:
3045         (WebKit::WebContext::getPlugins):
3046         (WebKit::WebContext::getPluginPath):
3047         * UIProcess/WebContext.h:
3048         (WebKit::WebContext::pluginInfoStore):
3049         * UIProcess/WebPageProxy.cpp:
3050         (WebKit::WebPageProxy::canShowMIMEType):
3051
3052 2011-05-06  Anders Carlsson  <andersca@apple.com>
3053
3054         Windows build fix.
3055
3056         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3057         (WebKit::PluginInfoStore::shouldUsePlugin):
3058
3059 2011-05-06  Anders Carlsson  <andersca@apple.com>
3060
3061         Reviewed by Dan Bernstein.
3062
3063         Make more PluginInfoStore member functions static
3064         https://bugs.webkit.org/show_bug.cgi?id=60401
3065
3066         This is a first step towards making PluginInfoStore thread safe.
3067
3068         * UIProcess/Plugins/PluginInfoStore.cpp:
3069         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
3070         (WebKit::PluginInfoStore::loadPlugin):
3071         * UIProcess/Plugins/PluginInfoStore.h:
3072         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3073         (WebKit::PluginInfoStore::shouldUsePlugin):
3074         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3075         (WebKit::PluginInfoStore::shouldUsePlugin):
3076         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3077         (WebKit::PluginInfoStore::shouldUsePlugin):
3078
3079 2011-05-06  Adam Roben  <aroben@apple.com>
3080
3081         Mac build fix
3082
3083         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added a
3084         missing #import.
3085
3086 2011-05-06  Adam Roben  <aroben@apple.com>
3087
3088         Show/hide windowed plugins according to the plugin element's visibility CSS property
3089
3090         Fixes <http://webkit.org/b/60285> <rdar://problem/9152400> REGRESSION (WebKit2): A white
3091         rectangle covers up important UI elements when composing a new message at mail.yahoo.com
3092         with BrowserPlus! plug-in installed
3093
3094         Reviewed by Anders Carlsson.
3095
3096         * PluginProcess/PluginControllerProxy.cpp:
3097         (WebKit::PluginControllerProxy::isPluginVisible):
3098         * PluginProcess/PluginControllerProxy.h:
3099         Stubbed out.
3100
3101         * Shared/win/WindowGeometry.cpp:
3102         (WebKit::WindowGeometry::WindowGeometry):
3103         (WebKit::WindowGeometry::encode):
3104         (WebKit::WindowGeometry::decode):
3105         * Shared/win/WindowGeometry.h:
3106         Added visible member.
3107
3108         * UIProcess/win/WebView.cpp:
3109         (WebKit::WebView::updateChildWindowGeometries): Show or hide the window as specified in the
3110         geometry.
3111
3112         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3113         (WebKit::NetscapePlugin::visibilityDidChange):
3114         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3115         Added. Calls through to platform-specific code.
3116
3117         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3118         (WebKit::NetscapePlugin::platformVisibilityDidChange):
3119         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3120         (WebKit::NetscapePlugin::platformVisibilityDidChange):
3121         Stubbed out.
3122
3123         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3124         (WebKit::NetscapePlugin::platformGeometryDidChange): Moved most logic from here to
3125         scheduleWindowedGeometryUpdate.
3126         (WebKit::NetscapePlugin::platformVisibilityDidChange): Added. Calls through to
3127         scheduleWindowedGeometryUpdate.
3128         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): Added. Code came from
3129         platformGeometryDidChange. Now also records whether the plugin element is visible.
3130
3131         * WebProcess/Plugins/Plugin.h: Added visibilityDidChange.
3132
3133         * WebProcess/Plugins/PluginController.h: Added isPluginVisible.
3134
3135         * WebProcess/Plugins/PluginProxy.cpp:
3136         (WebKit::PluginProxy::visibilityDidChange):
3137         * WebProcess/Plugins/PluginProxy.h:
3138         Stubbed out.
3139
3140         * WebProcess/Plugins/PluginView.cpp:
3141         (WebKit::PluginView::show):
3142         (WebKit::PluginView::hide):
3143         Added. These Widget overrides were based on WebCore's PluginView class.
3144
3145         (WebKit::PluginView::viewVisibilityDidChange): Added. Similar to viewGeometryDidChange.
3146         Calls down to the plugin if it's been initialized.
3147         (WebKit::PluginView::isPluginVisible): Added. Just calls up to the Widget base class.
3148
3149         * WebProcess/Plugins/PluginView.h: Updated for PluginController changes.
3150
3151 2011-05-06  Adam Roben  <aroben@apple.com>
3152
3153         Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message
3154
3155         This will make it easier to add more info to this message in the future (like whether the
3156         window is visible).
3157
3158         Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate
3159         message is tedious
3160
3161         Reviewed by Anders Carlsson.
3162
3163         * Scripts/webkit2/messages.py:
3164         (struct_or_class): Added WindowGeometry to the list of structs.
3165
3166         * Shared/win/WindowGeometry.cpp: Added.
3167         * Shared/win/WindowGeometry.h: Added.
3168
3169         * win/WebKit2.vcproj: Added new files.
3170
3171         * UIProcess/PageClient.h:
3172         * UIProcess/WebPageProxy.h:
3173         * UIProcess/WebPageProxy.messages.in:
3174         * UIProcess/win/WebPageProxyWin.cpp:
3175         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
3176         * UIProcess/win/WebView.cpp:
3177         (WebKit::WebView::scheduleChildWindowGeometryUpdate):
3178         (WebKit::WebView::updateChildWindowGeometries):
3179         * UIProcess/win/WebView.h:
3180         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3181         (WebKit::NetscapePlugin::platformGeometryDidChange):
3182         * WebProcess/Plugins/PluginController.h:
3183         * WebProcess/Plugins/PluginView.cpp:
3184         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
3185         * WebProcess/Plugins/PluginView.h:
3186         * WebProcess/WebPage/WebPage.h:
3187         * WebProcess/WebPage/win/WebPageWin.cpp:
3188         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
3189         Changed to use WindowGeometry.
3190
3191 2011-05-06  David Kilzer  <ddkilzer@apple.com>
3192
3193         Remove unused GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings
3194
3195         Reviewed by Jon Honeycutt.
3196
3197         This fixes an Xcode 4 warning about using obsolete settings.
3198
3199         * WebKit2.xcodeproj/project.pbxproj: Removed
3200         GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings.
3201
3202 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3203
3204         Reviewed by Martin Robinson.
3205
3206         [GTK] Implement NetscapePlugin::platformPaint for GTK platform
3207         https://bugs.webkit.org/show_bug.cgi?id=60368
3208
3209         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3210         (WebKit::NetscapePlugin::platformPaint):
3211
3212 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3213
3214         Reviewed by Martin Robinson.
3215
3216         Share PluginInfoStore implementation between Qt and GTK ports
3217         https://bugs.webkit.org/show_bug.cgi?id=60366
3218
3219         * GNUmakefile.am:
3220         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Removed.
3221         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
3222         (WebKit::PluginInfoStore::pluginsDirectories):
3223         (WebKit::PluginInfoStore::pluginPathsInDirectory):
3224         (WebKit::PluginInfoStore::individualPluginPaths):
3225         (WebKit::PluginInfoStore::getPluginInfo):
3226         (WebKit::PluginInfoStore::shouldUsePlugin):
3227         * WebKit2.pro:
3228
3229 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3230
3231         Unreviewed. Fix WebKit2 GTK build after r85860.
3232
3233         * UIProcess/API/gtk/PageClientImpl.h: Fix typo.
3234
3235 2011-05-05  Philippe Normand  <pnormand@igalia.com>
3236
3237         Reviewed by Dimitri Glazkov.
3238
3239         Implement LayoutTestController::pseudoShadowId()
3240         https://bugs.webkit.org/show_bug.cgi?id=60034
3241
3242         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3243         (WKBundleNodeHandleShadowPseudoId):
3244         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3245         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3246         (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot):
3247         (WebKit::InjectedBundleNodeHandle::elementShadowPseudoId):
3248         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3249
3250 2011-05-05  Sam Weinig  <sam@webkit.org>
3251
3252         Reviewed by Anders Carlsson.
3253
3254         REGRESSION (r85689): Unresponsive timer firing when closing background tabs
3255         <rdar://problem/9385988>
3256         https://bugs.webkit.org/show_bug.cgi?id=60325
3257
3258         When calling WKPageTryClose(), if the page close succeeded, the notification to stop
3259         the responsiveness timer would be dropped because the page was closed by the time it
3260         got to the UIProcess.
3261
3262         * UIProcess/WebPageProxy.cpp:
3263         (WebKit::WebPageProxy::closePage):
3264         * UIProcess/WebPageProxy.h:
3265         * UIProcess/WebPageProxy.messages.in:
3266         Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
3267
3268         * WebProcess/WebPage/WebPage.cpp:
3269         (WebKit::WebPage::tryClose):
3270         (WebKit::WebPage::sendClose):
3271         Instead of sending a StopResponsivenessTimer message after sending the ClosePage message,
3272         add a bit to the ClosePage message.
3273
3274 2011-05-05  Dan Bernstein  <mitz@apple.com>
3275
3276         Reviewed by Simon Fraser.
3277
3278         WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer
3279
3280         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3281         (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
3282
3283 2011-05-05  Keith Kyzivat  <keith.kyzivat@nokia.com>
3284
3285         Reviewed by Laszlo Gombos.
3286
3287         [Qt] [WK2] Add method to disable plugins under WK2
3288         https://bugs.webkit.org/show_bug.cgi?id=57796
3289
3290         * config.h: Allow PLUGIN_ARCHITECTURE_UNSUPPORTED to be defined on build command line
3291
3292 2011-05-05  Anders Carlsson  <andersca@apple.com>
3293
3294         Reviewed by Sam Weinig.
3295
3296         When an underlay surface is active, paint normal web contents in a transparency layer
3297         https://bugs.webkit.org/show_bug.cgi?id=60296
3298
3299         In order for the page contents to correctly blend with the underlay, the page contents
3300         needs to be painted in a transparency layer.
3301
3302         * WebProcess/WebPage/WebPage.cpp:
3303         (WebKit::WebPage::drawRect):
3304
3305 2011-05-05  Brian Weinstein  <bweinstein@apple.com>
3306
3307         Reviewed by Timothy Hatcher.
3308
3309         WebKit2: Docking Web Inspector doesn't respect maximum inspector size
3310         https://bugs.webkit.org/show_bug.cgi?id=60294
3311         <rdar://problem/9388518>
3312         
3313         Before we place the inspector and the inspected views, make sure that we have constrained the height
3314         of the docked inspector. Putting the code here covers both when the inspector is initially attached 
3315         and when a window with the docked inspector is resized.
3316
3317         * UIProcess/mac/WebInspectorProxyMac.mm:
3318         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.
3319         * UIProcess/win/WebInspectorProxyWin.cpp:
3320         (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.
3321
3322 2011-05-05  Chang Shu  <cshu@webkit.org>
3323
3324         Reviewed by Andreas Kling.
3325
3326         [Qt][WK2] Support PageGroup in QGraphicsWKView/QWKPage constructors
3327         https://bugs.webkit.org/show_bug.cgi?id=59638
3328
3329         Added private constructors for class QGraphicsWKView and QWKPage to support
3330         WKPageGroupRef.
3331
3332         * UIProcess/API/qt/qgraphicswkview.cpp:
3333         (QGraphicsWKView::QGraphicsWKView):
3334         (QGraphicsWKView::~QGraphicsWKView):
3335         (QGraphicsWKView::init):
3336         * UIProcess/API/qt/qgraphicswkview.h:
3337         * UIProcess/API/qt/qwkpage.cpp:
3338         (QWKPagePrivate::QWKPagePrivate):
3339         (QWKPage::QWKPage):
3340         (QWKPage::~QWKPage):
3341         (QWKPage::init):
3342         * UIProcess/API/qt/qwkpage.h:
3343         * UIProcess/API/qt/qwkpage_p.h:
3344
3345 2011-05-05  Brent Fulgham  <bfulgham@webkit.org>
3346
3347         [WinCairo] Unreviewed build fix.
3348
3349         * WebProcess/WebPage/win/WebPageWin.cpp:
3350         (WebKit::WebPage::cachedResponseDataForURL): Stub out
3351         implementation for cURL networking case.
3352
3353 2011-05-05  Jeff Miller  <jeffm@apple.com>
3354
3355         Reviewed by Darin Adler.
3356
3357         Add didNotHandleWheelEvent callback to WKPageUIClient
3358         https://bugs.webkit.org/show_bug.cgi?id=60203
3359         
3360         Remove Windows-specific WebPageProxy::wheelEventNotHandled() member function and use
3361         didNotHandleWheelEvent callback in WKPageUIClient instead.  It turns out that just
3362         resending the wheel event to the parent window doesn't provide the client with enough context
3363         to know that WebKit has already attempted to handle the event.
3364
3365         * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleWheelEventCallback typedef and didNotHandleWheelEvent to WKPageUIClient.
3366
3367         * UIProcess/API/gtk/PageClientImpl.cpp:
3368         (WebKit::PageClientImpl::didNotHandleWheelEvent): Added, but not implemented.
3369         * UIProcess/API/gtk/PageClientImpl.h: Added didNotHandleWheelEvent().
3370         * UIProcess/API/qt/qwkpage.cpp:
3371         (QWKPage::QWKPage):Stubbed out didNotHandleWheelEvent callback.
3372
3373         * UIProcess/WebPageProxy.cpp:
3374         (WebKit::WebPageProxy::didReceiveEvent): Call didNotHandleWheelEvent in WKPageUIClient if wheel event is not handled.
3375         * UIProcess/WebPageProxy.h: Removed wheelEventNotHandled().
3376         
3377         * UIProcess/WebUIClient.cpp:
3378         (WebKit::WebUIClient::implementsDidNotHandleWheelEvent): Added.
3379         (WebKit::WebUIClient::didNotHandleWheelEvent): Added.
3380         * UIProcess/WebUIClient.h: Added implementsDidNotHandleWheelEvent() and didNotHandleWheelEvent().
3381
3382         * UIProcess/win/WebPageProxyWin.cpp: Removed wheelEventNotHandled().
3383
3384 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3385
3386         Reviewed by Martin Robinson.
3387
3388         [GTK] Return correct GTK version for NPNVToolkit
3389         https://bugs.webkit.org/show_bug.cgi?id=60275
3390
3391         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3392         (WebKit::NPN_GetValue): Return always 2 for NPNVToolkit in GTK
3393         platform.
3394
3395 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3396
3397         Reviewed by Martin Robinson.
3398
3399         [GTK] Make native events code more consistent
3400         https://bugs.webkit.org/show_bug.cgi?id=60258
3401
3402         Make all other native events code follow the current keyboard
3403         events approach: use a GOwnPtr for the native event, and use
3404         const GdkEvent* in the API. We need to implement the copy
3405         constructors for native events to copy the gdk events with
3406         gdk_event_copy().
3407
3408         * Shared/NativeWebMouseEvent.h:
3409         (WebKit::NativeWebMouseEvent::nativeEvent):
3410         * Shared/NativeWebWheelEvent.h:
3411         (WebKit::NativeWebWheelEvent::nativeEvent):
3412         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
3413         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
3414         * Shared/gtk/NativeWebMouseEventGtk.cpp:
3415         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
3416         * Shared/gtk/NativeWebWheelEventGtk.cpp:
3417         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
3418         * Shared/gtk/WebEventFactory.cpp:
3419         (WebKit::buttonForEvent):
3420         (WebKit::WebEventFactory::createWebMouseEvent):
3421         (WebKit::WebEventFactory::createWebWheelEvent):
3422         (WebKit::WebEventFactory::createWebKeyboardEvent):
3423         * Shared/gtk/WebEventFactory.h:
3424         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3425         (webkitWebViewBaseScrollEvent):
3426
3427 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3428
3429         Reviewed by Martin Robinson.
3430
3431         [GTK] Module::load() should return true when g_module_open() returns a valid pointer
3432         https://bugs.webkit.org/show_bug.cgi?id=60261
3433
3434         * Platform/gtk/ModuleGtk.cpp:
3435         (WebKit::Module::load):
3436
3437 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3438
3439         Unreviewed. Fix WebKit2 GTK build after r85808.
3440
3441         * Shared/NativeWebWheelEvent.h:
3442         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3443         (webkitWebViewBaseScrollEvent):
3444
3445 2011-05-04  Cris Neckar  <cdn@chromium.org>
3446
3447         Reviewed by Adam Barth.
3448
3449         Expose WebView directly through ChromeClient.
3450         https://bugs.webkit.org/show_bug.cgi?id=49902
3451
3452         * WebProcess/WebCoreSupport/WebChromeClient.h:
3453         (WebKit::WebChromeClient::webView):
3454
3455 2011-05-04  Jeff Miller  <jeffm@apple.com>
3456
3457         Reviewed by Darin Adler.
3458
3459         Send unhandled wheel events to parent window on Windows
3460         https://bugs.webkit.org/show_bug.cgi?id=60220
3461
3462         Keep track of wheel events using NativeWebWheelEvent instead of WebWheelEvent in WebPageProxy
3463         so we can send the native event to the parent window if WebKit doesn't handle it.
3464
3465         * UIProcess/API/mac/WKView.mm: Use NativeWebWheelEvent instead of WebWheelEvent.
3466
3467         * UIProcess/API/qt/qwkpage.cpp:
3468         (QWKPagePrivate::wheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
3469
3470         * UIProcess/WebPageProxy.cpp:
3471         (WebKit::WebPageProxy::WebPageProxy): Removed initialization of obsolete m_processingWheelEvent member variable.
3472         (WebKit::coalesceWheelEvents): Use NativeWebWheelEvent instead of WebWheelEvent and add a note that this won't work if we ever enable MERGE_WHEEL_EVENTS. 
3473         (WebKit::WebPageProxy::handleWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent, keep track of the current event in m_currentlyProcessedWheelEvent.
3474         (WebKit::WebPageProxy::didReceiveEvent): Call wheelEventNotHandled() on Windows if wheel event is not handled.
3475         (WebKit::WebPageProxy::processDidCrash): Clear out m_currentlyProcessedWheelEvent.
3476         * UIProcess/WebPageProxy.h: Change handleWheelEvent() to take a NativeWebWheelEvent, added wheelEventNotHandled() on Windows, remove m_processingWheelEvent, add m_currentlyProcessedWheelEvent.
3477
3478         * UIProcess/win/WebPageProxyWin.cpp:
3479         (WebKit::WebPageProxy::wheelEventNotHandled): Added.
3480         
3481         * UIProcess/win/WebView.cpp:
3482         (WebKit::WebView::onWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
3483
3484 2011-05-04  Anders Carlsson  <andersca@apple.com>
3485
3486         Reviewed by Darin Adler.
3487
3488         Add bundle API for making a page paint as the background of another page
3489         https://bugs.webkit.org/show_bug.cgi?id=60227
3490
3491         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3492         (WKBundlePageSetUnderlayPage):
3493         Call WebPage::setUnderlayPage.
3494
3495         * WebProcess/WebPage/WebPage.cpp:
3496         (WebKit::WebPage::close):
3497         Null out the underlay page.
3498
3499         (WebKit::WebPage::layoutIfNeeded):
3500         Layout the underlay page if necessary.
3501
3502         (WebKit::WebPage::drawRect):
3503         Draw the underlay page.
3504
3505 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
3506
3507         Reviewed by Laszlo Gombos.
3508
3509         [Qt][Wk2][Symbian] Capabilities for Qt MiniBrowser and QtWebProcess on Symbian
3510         https://bugs.webkit.org/show_bug.cgi?id=59462
3511
3512         * WebProcess.pro: Add Symbian OS capabilities to web process executable. Also enable
3513         data paging flag and prevent application's icon from showing up in the application grid. 
3514
3515 2011-05-04  Adam Roben  <aroben@apple.com>
3516
3517         Clip and reposition windowed plugins when the UI process paints
3518
3519         This ensures that their geometry updates in sync with the rest of the page.
3520
3521         Most of this patch is just plumbing the scheduleWindowedPluginGeometryUpdate and
3522         scheduleChildWindowGeometryUpdate calls through from NetscapePlugin all the way over to
3523         WebView. I've tried to call out the other parts below.
3524
3525         Fixes <http://webkit.org/b/60210> <rdar://problem/8483441> REGRESSION (WebKit2): Windowed
3526         plugins don't scroll at the same speed as the rest of the page
3527
3528         Reviewed by Darin Adler and Anders Carlsson.
3529
3530         * UIProcess/PageClient.h:
3531         * UIProcess/WebPageProxy.h:
3532         * UIProcess/WebPageProxy.messages.in:
3533         * UIProcess/win/WebPageProxyWin.cpp:
3534         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
3535         Added plumbing.
3536
3537         * UIProcess/win/WebView.cpp:
3538         (WebKit::WebView::onPaintEvent): Update child windows before painting so that they will stay
3539         in sync with the rest of the page.
3540         (WebKit::WebView::scheduleChildWindowGeometryUpdate): Add this update information to the
3541         set of geometries to update on the next paint.
3542         (WebKit::setWindowRegion): Moved this helper function here from NetscapePluginWin.cpp.
3543         (WebKit::WebView::updateChildWindowGeometries): Update the size, position, and clip rects of
3544         all the child windows with scheduled geometry updates.
3545
3546         * UIProcess/win/WebView.h: Added new members to track and update child window geometries.
3547
3548         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3549         (WebKit::NetscapePlugin::platformPostInitialize): Don't show the window immediately. Let the
3550         UI process take care of it.
3551         (WebKit::NetscapePlugin::platformGeometryDidChange): Don't update the window's position or
3552         clip rect. Let the UI process take care of it.
3553
3554         * WebProcess/Plugins/PluginController.h:
3555         * WebProcess/Plugins/PluginView.cpp:
3556         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
3557         * WebProcess/Plugins/PluginView.h:
3558         * WebProcess/WebPage/WebPage.h:
3559         * WebProcess/WebPage/win/WebPageWin.cpp:
3560         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
3561         Added plumbing.
3562
3563 2011-05-04  Anders Carlsson  <andersca@apple.com>
3564
3565         Reviewed by Adam Roben.
3566
3567         WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:]
3568         https://bugs.webkit.org/show_bug.cgi?id=52009
3569         <rdar://problem/8829746>
3570
3571         Add and implement WKViewSetDrawsTransparentBackground on windows.
3572
3573         * UIProcess/API/C/win/WKView.cpp:
3574         (WKViewSetDrawsTransparentBackground):
3575         (WKViewDrawsTransparentBackground):
3576         Call through to the WebPageProxy object.
3577
3578         * UIProcess/API/C/win/WKView.h:
3579         * UIProcess/win/WebView.cpp:
3580         (WebKit::drawPageBackground):
3581         Don't fill the rect with white if WebPageProxy::drawsBackground() or 
3582         WebPageProxy::drawsTransparentBackground() returns false. Because of limitations in Win32,
3583         both drawsBackground and drawsTransparentBackground are pretty much equivalent.
3584
3585         (WebKit::WebView::paint):
3586         Pass the WebPageProxy object to drawPageBackground.
3587
3588 2011-05-04  Tao Bai  <michaelbai@chromium.org>
3589
3590         Reviewed by David Kilzer.
3591
3592         Populate touch-icon url to FrameLoaderClient
3593         https://bugs.webkit.org/show_bug.cgi?id=59143
3594
3595         Respected the change of FrameLoaderClient.
3596         Added WebIconURL and WebIconType responding the new IconURL and IconType.
3597         Supported to get the multiple icon urls.
3598
3599         * Configurations/FeatureDefines.xcconfig:
3600         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3601         (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons):
3602         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3603
3604 2011-05-04  Anders Carlsson  <andersca@apple.com>
3605
3606         Reviewed by Dan Bernstein.
3607
3608         Can't save a link from "Save Linked File to Download" popup menu
3609         https://bugs.webkit.org/show_bug.cgi?id=60190
3610         <rdar://problem/9367927>
3611
3612         Make sure that suggestedFilenameForResourceWithURL and resourceDataForFrame both look
3613         in the cache if the resource can't be found in the current web page. This matches WebKit1.
3614
3615         * WebProcess/WebPage/WebFrame.cpp:
3616         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
3617         Call WebPage::cachedSuggestedFilenameForURL if we can't find a resource in the page.
3618
3619         * WebProcess/WebPage/WebPage.cpp:
3620         (WebKit::resourceDataForFrame):
3621         Move code out from getResourceDataFromFrame.
3622
3623         (WebKit::WebPage::getResourceDataFromFrame):
3624         Call resourceDataForFrame first and then cachedResponseDataForURL.
3625
3626         * WebProcess/WebPage/WebPage.h:
3627         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3628         (WebKit::WebPage::platformHasLocalDataForURL):
3629         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3630         (WebKit::WebPage::platformCanHandleRequest):
3631         (WebKit::WebPage::cachedSuggestedFilenameForURL):
3632         (WebKit::WebPage::cachedResponseDataForURL):
3633         Add stubs.
3634
3635         * WebProcess/WebPage/mac/WebPageMac.mm:
3636         (WebKit::cachedResponseForURL):
3637         Add helper function.
3638
3639         (WebKit::WebPage::cachedSuggestedFilenameForURL):
3640         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3641         (WebKit::WebPage::cachedResponseDataForURL):
3642         Call helper function.
3643
3644         * WebProcess/WebPage/qt/WebPageQt.cpp:
3645         (WebKit::WebPage::platformHasLocalDataForURL):
3646         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3647         (WebKit::WebPage::platformCanHandleRequest):
3648         (WebKit::WebPage::cachedSuggestedFilenameForURL):
3649         (WebKit::WebPage::cachedResponseDataForURL):
3650         Add stubs.
3651         
3652         * WebProcess/WebPage/win/WebPageWin.cpp:
3653         (WebKit::cachedResponseForURL):
3654         Add helper function.
3655
3656         (WebKit::WebPage::platformHasLocalDataForURL):
3657         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3658         (WebKit::WebPage::cachedSuggestedFilenameForURL):
3659         (WebKit::WebPage::cachedResponseDataForURL):
3660         Call helper function.
3661
3662 2011-05-04  Simon Fraser  <simon.fraser@apple.com>
3663
3664         Reviewed by Anders Carlsson.
3665
3666         WebKit2 flashes if entering and exiting compositing rapidly
3667         https://bugs.webkit.org/show_bug.cgi?id=60198
3668         
3669         If a page enters then immediately leaves compositing mode, the
3670         DrawingAreaImpl would send a message to the UI process that it
3671         had entered compositing even after all the layers had been torn
3672         down. Fix this by never sending the 'enter' message if we're
3673         waiting for the 'exit' timer to fire.
3674         
3675         Also fix an assertion in the UI process caused by sending mismatched
3676         'enter' and 'leave' messages by keeping track of which messages
3677         we've sent.
3678
3679         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3680         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
3681         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
3682         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
3683         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
3684         * WebProcess/WebPage/DrawingAreaImpl.h:
3685         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModePending):
3686
3687 2011-05-04  Jeff Miller  <jeffm@apple.com>
3688
3689         Fix typo in svn property in r85756.
3690
3691         * Shared/mac/NativeWebWheelEventMac.mm: Added property svn:eol-style. Removed property snv:eol-style.
3692
3693 2011-05-04  Jeff Miller  <jeffm@apple.com>
3694
3695         Reviewed by Darin Adler.
3696
3697         Add NativeWebWheelEvent class
3698         https://bugs.webkit.org/show_bug.cgi?id=60182
3699         
3700         This will be needed soon when we start notifying the UI process that a mouse wheel event wasn't handled by WebKit.
3701
3702         * GNUmakefile.am: Added NativeWebWheelEventGtk.cpp and NativeWebWheelEvent.h.
3703         * Shared/NativeWebWheelEvent.h: Added.
3704         (WebKit::NativeWebWheelEvent::nativeEvent): Added.
3705         * Shared/gtk/NativeWebWheelEventGtk.cpp: Added.
3706         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
3707         * Shared/mac/NativeWebWheelEventMac.mm: Added.
3708         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
3709         * Shared/qt/NativeWebWheelEventQt.cpp: Added.
3710         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
3711         * Shared/win/NativeWebWheelEventWin.cpp: Added.
3712         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):Added.
3713         * WebKit2.pro: Added NativeWebWheelEventQt.cpp and NativeWebWheelEvent.h.
3714         * WebKit2.xcodeproj/project.pbxproj: Added NativeWebWheelEventMac.mm and NativeWebWheelEvent.h.
3715         * win/WebKit2.vcproj: Added NativeWebWheelEventWin.cpp and NativeWebWheelEvent.h.
3716
3717 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
3718
3719         Reviewed by Anders Carlsson.
3720
3721         ArgumentDecoder should use aligned memory for its internal copy of data
3722         https://bugs.webkit.org/show_bug.cgi?id=59960 
3723
3724         Since we check for memory alignment when unpacking primitive types from the buffer,
3725         insure alignment of the base address.
3726         As uint64_t is the largest type we use in Argument encoder/decoder, use 8 byte alignment. 
3727
3728         * Platform/CoreIPC/ArgumentDecoder.cpp:
3729         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): free m_alignedBase
3730         (CoreIPC::roundUpToAlignment): move this up in the source file
3731         (CoreIPC::ArgumentDecoder::initialize): m_buffer is now guaranteed sizeof(uint64_t) aligned
3732         * Platform/CoreIPC/ArgumentDecoder.h: add m_alignedBase member which needs to be freed in d'tor
3733
3734 2011-05-04  Adam Roben  <aroben@apple.com>
3735
3736         Make ShareableBitmap::makeCGImageCopy use a copy-on-write copy on Windows when possible
3737
3738         Fixes <http://webkit.org/b/57269> <rdar://problem/9198788> REGRESSION (r82151): Every WKView
3739         paint now makes an extra copy of the painted bits
3740
3741         Reviewed by Anders Carlsson.
3742
3743         * Platform/SharedMemory.h:
3744         * Platform/win/SharedMemoryWin.cpp:
3745         (WebKit::SharedMemory::createCopyOnWriteCopy):
3746         Added this new function. Creates a copy-on-write copy of the first |size| bytes of the
3747         original SharedMemory.
3748
3749         * Shared/ShareableBitmap.h: Added createCGImage helper function.
3750
3751         * Shared/cg/ShareableBitmapCG.cpp:
3752         (WebKit::ShareableBitmap::makeCGImageCopy): Don't compile this version of this function on
3753         Windows; we'll provide our own implementation since CGBitmapContextCreateImage isn't smart
3754         enough to make a copy-on-write copy on Windows.
3755         (WebKit::ShareableBitmap::makeCGImage): Moved some code from here...
3756         (WebKit::ShareableBitmap::createCGImage): ...to this new function.
3757
3758         * Shared/cg/win/ShareableBitmapCGWin.cpp: Added.
3759         (WebKit::derefSharedMemory): This function is called when the CGDataProvider is finalized.
3760         All we have to do is deref the SharedMemory that was backing the CGDataProvider.
3761         (WebKit::ShareableBitmap::makeCGImageCopy): Create a copy-on-write copy of the image data
3762         when possible. We use the copy-on-write copy to back this ShareableBitmap from here on out,
3763         and use the original SharedMemory to back the CGImage. This should prevent future
3764         modifications to the ShareableBitmap from affecting the CGImage. If we can't make a
3765         copy-on-write copy, we fall back to just copying the data normally.
3766
3767         * win/WebKit2.vcproj: Added ShareableBitmapCGWin.cpp.
3768
3769 2011-05-04  Adam Roben  <aroben@apple.com>
3770
3771         Let transparent windowless plugins draw into a graphics context with an alpha channel
3772
3773         Fixes <http://webkit.org/b/57647> <rdar://problem/9168462> Flash plugins with
3774         wmode=transparent have black (instead of transparent) background in WebKit2 on Windows
3775
3776         I had trouble writing a test case for this, so I split that task out into
3777         <http://webkit.org/b/60169>.
3778
3779         Reviewed by Sam Weinig.
3780
3781         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3782         (WebKit::NetscapePlugin::platformPaint): Give the graphics context an alpha channel if this
3783         is a transparent windowless plugin.
3784
3785 2011-05-03  Adam Roben  <aroben@apple.com>
3786
3787         Remove WebPageProxy::setDrawingArea
3788
3789         It is unused. It also does a useless equality comparison between OwnPtrs; if they are equal,
3790         we've already lost.
3791
3792         Reviewed by Anders Carlsson and Antti Koivisto.
3793
3794         * UIProcess/WebPageProxy.cpp:
3795         * UIProcess/WebPageProxy.h:
3796         Removed setDrawingArea.
3797
3798         (WebKit::WebPageProxy::drawingArea):
3799         (WebKit::WebPageProxy::backForwardList):
3800         Made these functions const while I was at it.
3801
3802 2011-05-03  Pratik Solanki  <psolanki@apple.com>
3803
3804         Reviewed by Antti Koivisto.
3805
3806         Part of WebCore should use CFNetwork-based loader on Mac
3807         https://bugs.webkit.org/show_bug.cgi?id=51836
3808
3809         Merge the conflicting definitions of WebCore::privateBrowsingCookieStorage() into one.
3810
3811         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
3812         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3813
3814 2011-05-02  Jer Noble  <jer.noble@apple.com>
3815
3816         Reviewed by Adam Roben.
3817
3818         Implement FULLSCREEN_API on Windows, Part 3: WebKit2
3819         https://bugs.webkit.org/show_bug.cgi?id=59845
3820
3821         Implement a similar full screen mode to WebKit; Re-use the same
3822         full screen window class used in WebKit in the new WebFullScreenController.
3823         No animations (yet), so many of the stubs remain unimplemented.
3824
3825         * UIProcess/win/WebView.cpp:
3826         (WebKit::WebView::onKeyEvent): Handle VK_ESCAPE and cancel full screen
3827             mode if caught.
3828         (WebKit::WebView::fullScreenController): Lazily instantiate m_fullScreenController.
3829         (WebKit::WebView::fullScreenClientWindow): Added accessor.
3830         (WebKit::WebView::fullScreenClientParentWindow): Ditto.
3831         (WebKit::WebView::fullScreenClientSetParentWindow): Ditto.
3832         (WebKit::WebView::fullScreenClientWillEnterFullScreen): Pass through to WebFullScreenManagerProxy.
3833         (WebKit::WebView::fullScreenClientDidEnterFullScreen): Ditto.
3834         (WebKit::WebView::fullScreenClientWillExitFullScreen): Ditto.
3835         (WebKit::WebView::fullScreenClientDidExitFullScreen): Ditto.
3836         * UIProcess/win/WebView.h:
3837         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
3838         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Pass through to 
3839             WebFullScreenController.
3840         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
3841         * UIProcess/win/WebView.cpp:
3842         (WebKit::WebView::WebView):
3843         (WebKit::WebView::onKeyEvent): Handle the escape key and exit
3844            full screen mode when detected.
3845         (WebKit::WebView::fullScreenWindowController): Added.
3846         * UIProcess/win/WebView.h:
3847         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
3848         (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin):
3849         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Host the root
3850             full screen layer if it gets detached.
3851         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h:
3852         * win/WebKit2.vcproj:
3853
3854 2011-05-03  Brady Eidson  <beidson@apple.com>
3855
3856         Reviewed by Sam Weinig.
3857
3858         https://bugs.webkit.org/show_bug.cgi?id=60087 and <rdar://problem/9373182>
3859         WK2 Icon Database should provide access to all image representations in the icon.
3860
3861         Expose a CFArrayRef of CGImageRefs as API for CG platforms:
3862         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
3863         (WKIconDatabaseTryCopyCGImageArrayForURL):
3864         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
3865
3866 2011-05-03  Sam Weinig  <sam@webkit.org>
3867
3868         Reviewed by Dan Bernstein.
3869
3870         WebKit2 should treat API calls that start/stop loads as user gestures for responsiveness timer
3871         https://bugs.webkit.org/show_bug.cgi?id=60083
3872
3873         * UIProcess/WebPageProxy.cpp:
3874         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3875         (WebKit::WebPageProxy::tryClose):
3876         (WebKit::WebPageProxy::loadURL):
3877         (WebKit::WebPageProxy::loadURLRequest):
3878         (WebKit::WebPageProxy::loadHTMLString):
3879         (WebKit::WebPageProxy::loadAlternateHTMLString):
3880         (WebKit::WebPageProxy::loadPlainTextString):
3881         (WebKit::WebPageProxy::stopLoading):
3882         (WebKit::WebPageProxy::reload):
3883         (WebKit::WebPageProxy::goForward):
3884         (WebKit::WebPageProxy::goBack):
3885         (WebKit::WebPageProxy::goToBackForwardItem):
3886         Start responsiveness timer for load start/stop and close.
3887
3888         * WebProcess/WebPage/WebPage.cpp:
3889         (WebKit::SendStopResponsivenessTimer::SendStopResponsivenessTimer):
3890         (WebKit::SendStopResponsivenessTimer::~SendStopResponsivenessTimer):
3891         Add simple RAII class to ensure the StopResponsivenessTimer is called.
3892
3893         (WebKit::WebPage::tryClose):
3894         (WebKit::WebPage::loadURLRequest):
3895         (WebKit::WebPage::loadData):
3896         (WebKit::WebPage::stopLoading):
3897         (WebKit::WebPage::reload):
3898         (WebKit::WebPage::goForward):
3899         (WebKit::WebPage::goBack):
3900         (WebKit::WebPage::goToBackForwardItem):
3901         Sends a message back to the UIProcess to indicate the WebProcess
3902         is still responsive.
3903
3904 2011-05-03  Darin Adler  <darin@apple.com>
3905
3906         Reviewed by Sam Weinig.
3907
3908         <rdar://problem/9250444> Enter key doesn't work in a web text field (but Return key does)
3909
3910         No test at this time because the WebKit2 eventSender doesn't use this code path.
3911
3912         * Shared/mac/WebEventFactory.mm:
3913         (WebKit::WebEventFactory::createWebKeyboardEvent): Copied the code to special-case certain
3914         keys from the corresponding Mac WebKit1 code path.
3915
3916 2011-05-03  Jeff Miller  <jeffm@apple.com>
3917
3918         Reviewed by Darin Adler.
3919
3920         Unreachable URL is lost when canceling load of a new page
3921         https://bugs.webkit.org/show_bug.cgi?id=60057
3922         <rdar://problem/9049135>
3923         
3924         When setting the unreachable URL in the WebFrameProxy, keep track of any previous unreachable URL
3925         so we can restore it if the page load fails.
3926
3927         * UIProcess/WebFrameProxy.cpp:
3928         (WebKit::WebFrameProxy::didFailProvisionalLoad): Restore m_unreachableURL to previous value.
3929         (WebKit::WebFrameProxy::setUnreachableURL): Keep track of previous unreachable URL in m_lastUnreachableURL.
3930         * UIProcess/WebFrameProxy.h: Moved setUnreachableURL() implementation to .cpp file, added m_lastUnreachableURL.
3931
3932 2011-05-03  Adam Roben  <aroben@apple.com>
3933
3934         Fix most strict PassOwnPtr violations on Windows
3935
3936         Fixes <http://webkit.org/b/60025> Windows should (almost) build with strict PassOwnPtr
3937         enabled
3938
3939         Reviewed by Anders Carlsson.
3940
3941         * Platform/CoreIPC/win/ConnectionWin.cpp:
3942         (CoreIPC::Connection::writeEventHandler): Use nullptr.
3943
3944 2011-05-03  Julien Chaffraix  <jchaffraix@codeaurora.org>
3945
3946         Reviewed by Dimitri Glazkov.
3947
3948         Element:shadowRoot & Element::ensureShadowRoot should return ShadowRoot*
3949         https://bugs.webkit.org/show_bug.cgi?id=58703
3950
3951         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added #include for ShadowRoot.h.
3952
3953 2011-05-03  Sam Weinig  <sam@webkit.org>
3954
3955         Reviewed by Anders Carlsson.
3956
3957         More quarantine related sandbox denial when downloading files
3958         <rdar://problem/9362626>
3959
3960         * WebProcess/com.apple.WebProcess.sb:
3961
3962 2011-05-02  Adam Roben  <aroben@apple.com>
3963
3964         Take advantage of implicit conversion from nullptr_t to PassOwnPtr
3965
3966         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
3967         doesn't work, but should
3968
3969         Reviewed by Adam Barth.
3970
3971         * Platform/CoreIPC/Connection.cpp:
3972         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3973         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3974         * WebProcess/WebPage/DrawingArea.cpp:
3975
3976 2011-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3977
3978         Reviewed by Eric Seidel.
3979
3980         [GTK] Build webkit1 even when webkit2 is enabled
3981         https://bugs.webkit.org/show_bug.cgi?id=59695
3982
3983         * GNUmakefile.am:
3984
3985 2011-05-02  Yael Aharon  <yael.aharon@nokia.com>
3986
3987         Reviewed by Andreas Kling.
3988
3989         [Qt] White screen displays when using MiniBrowser with DrawingAreaImpl
3990         https://bugs.webkit.org/show_bug.cgi?id=60003
3991
3992         When using DrawingAreaImpl, we need to properly pass the viewSize to the WebPage.
3993         Otherwise, the dirty rect will always be empty and we will not draw.
3994
3995         * UIProcess/API/qt/qwkpage.cpp:
3996         (QWKPagePrivate::viewSize):
3997
3998 2011-05-02  Anders Carlsson  <andersca@apple.com>
3999
4000         Fix crash that was introduced in r85515.
4001
4002         * Platform/CoreIPC/Connection.cpp:
4003         (CoreIPC::Connection::dispatchSyncMessage):
4004         If didReceiveSyncMessage returns ManualReply, the client took ownership of the reply
4005         encoder so we must leak it to avoid a double-free.
4006
4007 2011-05-02  Anders Carlsson  <andersca@apple.com>
4008
4009         Reviewed by Sam Weinig.
4010
4011         The web process locks up when the plug-in process crashes
4012         https://bugs.webkit.org/show_bug.cgi?id=59999
4013         <rdar://problem/8889303>
4014
4015         Add a hash map from plug-in paths to CoreIPC connections to PluginProcessConnectionManager.
4016         Add PluginProcessConnectionManager::pluginProcessCrashed and make it look up the corresponding
4017         CoreIPC connection and call postConnectionDidCloseOnConnectionWorkQueue on it.
4018
4019         * Platform/CoreIPC/Connection.cpp:
4020         (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
4021         * Platform/CoreIPC/Connection.h:
4022         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
4023         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
4024         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
4025         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
4026         * WebProcess/Plugins/PluginProcessConnectionManager.h:
4027         * WebProcess/WebProcess.cpp:
4028         (WebKit::WebProcess::pluginProcessCrashed):
4029
4030 2011-05-02  Anders Carlsson  <andersca@apple.com>
4031
4032         Try to fix Windows build.
4033
4034         * Scripts/webkit2/messages.py:
4035         * Scripts/webkit2/messages_unittest.py:
4036
4037 2011-05-02  Anders Carlsson  <andersca@apple.com>
4038
4039         Reviewed by Oliver Hunt.
4040
4041         Dispatch the PluginProcessCrashed on the connection work queue
4042         https://bugs.webkit.org/show_bug.cgi?id=59996
4043
4044         * WebProcess/WebProcess.cpp:
4045         (WebKit::WebProcess::initialize):
4046         Add the web process as a queue client.
4047
4048         (WebKit::WebProcess::terminate):
4049         Remove the web process as a queue client.
4050
4051         (WebKit::WebProcess::willProcessMessageOnClientRunLoop):
4052         Try calling willProcessWebProcessMessageOnClientRunLoop.
4053
4054         * WebProcess/WebProcess.messages.in:
4055         Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.
4056
4057 2011-05-02  Anders Carlsson  <andersca@apple.com>
4058
4059         Reviewed by Sam Weinig.
4060
4061         Send a PluginProcessCrashed message to all web processes when a plug-in crashes
4062         https://bugs.webkit.org/show_bug.cgi?id=59994
4063
4064         * UIProcess/Plugins/PluginProcessProxy.cpp:
4065         (WebKit::PluginProcessProxy::didClose):
4066         Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.
4067
4068         (WebKit::PluginProcessProxy::didFinishLaunching):
4069         Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.
4070
4071         * WebProcess/WebProcess.cpp:
4072         (WebKit::WebProcess::pluginProcessCrashed):
4073         Add empty stub.
4074
4075         * WebProcess/WebProcess.messages.in:
4076         Add message.
4077
4078 2011-05-02  Anders Carlsson  <andersca@apple.com>
4079
4080         Reviewed by Simon Fraser.
4081
4082         Plug-in not completely repainted after a crash
4083         https://bugs.webkit.org/show_bug.cgi?id=59991
4084
4085         Call Widget::invalidate().
4086
4087         * WebProcess/Plugins/PluginView.cpp:
4088         (WebKit::PluginView::pluginProcessCrashed):
4089
4090 2011-05-02  Anders Carlsson  <andersca@apple.com>
4091
4092         Reviewed by Dan Bernstein.
4093
4094         Make PluginProcessConnectionManager a member of WebProcess
4095         https://bugs.webkit.org/show_bug.cgi?id=59989
4096
4097         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
4098         * WebProcess/Plugins/PluginProcessConnectionManager.h:
4099         * WebProcess/Plugins/PluginProxy.cpp:
4100         (WebKit::PluginProxy::initialize):
4101         * WebProcess/WebProcess.h:
4102         (WebKit::WebProcess::pluginProcessConnectionManager):
4103
4104 2011-05-02  Mark Rowe  <mrowe@apple.com>
4105
4106         Reviewed by Brady Eidson.
4107
4108         <rdar://problem/9371289> WebKit2 can persist an invalid current back/forward item index when URLs are filtered from back/forward list
4109
4110         * UIProcess/cf/WebBackForwardListCF.cpp:
4111         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): We need to update the current index to account for filtered items
4112         for all items before the current item in the array.
4113
4114 2011-05-02  Anders Carlsson  <andersca@apple.com>
4115
4116         Reviewed by Adam Roben.
4117
4118         Handle DispatchOnConnectionQueue for asynchronous messages
4119         https://bugs.webkit.org/show_bug.cgi?id=59959
4120
4121         If any asynchronous messages have the DispatchOnConnectionQueue attribute, 
4122         create a new willProcess{Receiver}MessageOnClientRunLoop.
4123
4124         * Scripts/webkit2/messages.py:
4125         - Fix a regex bug where we would only parse attributes on synchronous messages.
4126         - Collect messages with the dispatch_on_connection_queue flag set. We only handle
4127           asynchronous messages currently; sync message support will be added when/if the
4128           need arises.
4129
4130         * Scripts/webkit2/messages_unittest.py:
4131         Update test.
4132
4133 2011-05-02  Adam Barth  <abarth@webkit.org>
4134
4135         Reviewed by David Levin.
4136
4137         PLATFORM(MAC) should (almost!) build with strict PassOwnPtr
4138         https://bugs.webkit.org/show_bug.cgi?id=59924
4139
4140         * Platform/CoreIPC/Connection.cpp:
4141         (CoreIPC::Connection::sendSyncMessage):
4142         (CoreIPC::Connection::waitForSyncReply):
4143         (CoreIPC::Connection::dispatchSyncMessage):
4144         * Platform/CoreIPC/Connection.h:
4145         (CoreIPC::Connection::Message::releaseArguments):
4146             - The memory management for this class is very strange.  I wrote a
4147               large comment.  Hopefully a kind soul will come by and fix it.
4148         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
4149         (WebKit::NetscapePluginModule::unload):
4150         * UIProcess/API/mac/WKView.mm:
4151         (-[WKView _setFindIndicator:fadeOut:]):
4152         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
4153         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
4154         * WebProcess/InjectedBundle/InjectedBundle.cpp:
4155         (WebKit::toStringVector):
4156         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
4157         (WebKit::NetscapePluginStream::stop):
4158         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
4159         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
4160         * WebProcess/WebPage/DrawingArea.cpp:
4161         (WebKit::DrawingArea::create):
4162
4163 2011-04-29  Chris Marrin  <cmarrin@apple.com>
4164
4165         Reviewed by Simon Fraser.
4166
4167         Pages with accelerated compositing do not redraw unless scrolled
4168         https://bugs.webkit.org/show_bug.cgi?id=59851
4169
4170         Added a setNeedDisplay on the non-composited content layer after
4171         the size is changed so it paints the full size of the layer. Called
4172         only for the areas newly exposed, if any.
4173
4174         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
4175         (WebKit::LayerTreeHostCA::sizeDidChange):
4176
4177 2011-05-02  Anders Carlsson  <andersca@apple.com>
4178
4179         Reviewed by Adam Roben.
4180
4181         Need a way to handle CoreIPC messages on the connection work queue
4182         https://bugs.webkit.org/show_bug.cgi?id=59954
4183
4184         Add a Connection::QueueClient abstract class. This class has a single pure virtual
4185         member function, willProcessMessageOnClientRunLoop which should return true if the message 
4186         should be forwarded to the next Connection::QueueClient in the list or Connection::Client's 
4187         run loop for processing and false otherwise. Users of Connection can use addQueueClient to
4188         add clients and all messages will be dispatched  to the queue clients first.
4189
4190         * Platform/CoreIPC/Connection.cpp:
4191         (CoreIPC::Connection::addQueueClient):
4192         (CoreIPC::Connection::removeQueueClient):
4193         (CoreIPC::Connection::processIncomingMessage):