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