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