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