381c20d2eedce7f94c2faa268b186bcad529a624
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
2
3         Sandbox violations when trying to access fonts in non-standard locations
4         https://bugs.webkit.org/show_bug.cgi?id=117097
5         <rdar://problem/9264746>
6
7         Reviewed by Anders Carlsson.
8
9         The issue was that lack of a main xib was resulting in font machinery being
10         initialized too early, before we entered sandbox.
11
12         * Resources/WebContentProcess.xib: Added.
13         * WebKit2.xcodeproj/project.pbxproj:
14         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
15         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
16         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
17
18 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
19
20         <rdar://problem/14036464> Sandbox violation when using Web SpeechSynthesis
21
22         Reviewed by Anders Carlsson
23
24         * WebProcess/com.apple.WebProcess.sb.in: Allow com.apple.speech.synthesis.console.
25
26 2013-05-31  Jessie Berlin  <jberlin@apple.com>
27
28         Need the ability to get the information for a plug-in with a particular process id that may
29         be running on a page
30         https://bugs.webkit.org/show_bug.cgi?id=117090
31
32         Rubber-stamped by Anders Carlsson.
33
34         Follow-up to r151043 incorprating some feedback I got from Darin after I had already
35         committed the patch.
36
37         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
38         (callGetPlugInInformationBlockAndDispose):
39         Renamed to be less wordy.
40         (WKPageGetPlugInInformation):
41         Ditto.
42         * UIProcess/API/C/mac/WKPagePrivateMac.h:
43         Ditto.
44
45         * UIProcess/Plugins/PluginProcessManager.h:
46         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
47         (WebKit::PluginProcessManager::findPlugInProcessByID):
48         Renamed to not use "Cocoa method style" in non-Cocoa functions.
49         (WebKit::PluginProcessManager::findPlugInProcessByToken):
50         Ditto.
51
52         * UIProcess/WebPageProxy.h:
53         * UIProcess/mac/WebPageProxyMac.mm:
54         (WebKit::WebPageProxy::getPlugInInformation):
55         Reduce ref count churn and fix a variable name.
56         Updated for the change to findPlugInProcessByID.
57         (WebKit::WebPageProxy::containsPlugInCallback):
58         Updated for the change to findPlugInProcessByToken.
59
60         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
61         Move the override of a virtual function to the private section.
62
63 2013-05-31  Jessie Berlin  <jberlin@apple.com>
64
65         Need the ability to get the information for a plug-in with a particular process id that may
66         be running on a page
67         https://bugs.webkit.org/show_bug.cgi?id=117090
68
69         Reviewed by Anders Carlsson.
70
71         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
72         (callGetInformationForPlugInWithProcessIDBlockAndDispose):
73         Get the block from the context, invoke it with the result, and dispose of it.
74         (WKPageGetInformationForPlugInWithProcessID):
75         Ask the WebPageProxy and provide it with a dictionary callback that uses the
76         above function to invoke the passed in block.
77         * UIProcess/API/C/mac/WKPagePrivateMac.h:
78         Add WKPageGetInformationForPlugInWithProcessID and a typedef for the callback block.
79
80         * UIProcess/Plugins/PluginProcessManager.h:
81         Add ways to get the PluginProcessProxy associated with a process id or process token.
82         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
83         (WebKit::PluginProcessManager::plugInProcessWithProcessID):
84         Return the first PluginProcessProxy with the passed in process ID.
85         (WebKit::PluginProcessManager::plugInProcessWithToken):
86         Return the first PluginProcessProxy with the passed in process token.
87
88         * UIProcess/WebPageProxy.cpp:
89         (WebKit::WebPageProxy::close):
90         Invalidate any outstanding requests for plug-in information.
91         * UIProcess/WebPageProxy.h:
92         Keep track of the callbacks for the requests for plug-in information.
93         * UIProcess/WebPageProxy.messages.in:
94         * UIProcess/mac/WebPageProxyMac.mm:
95         (WebKit::WebPageProxy::getInformationForPlugInWithProcessID):
96         If there are no known plug-ins with the provided process ID, invoke the callback with a null
97         dictionary of plug-in information.
98         Otherwise, keep track of the callback and send a message to the web process asking for the
99         information.
100         (WebKit::WebPageProxy::containsPlugInCallback):
101         If the page did not contain the plug-in, invoke the callback with a null dictionary of
102         plug-in information.
103         Invoke the callback with a dictionary containing the PlugInModuleInfo.
104
105         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
106         Return 0 for the plugInProcessToken.
107         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
108         Ditto.
109         * WebProcess/Plugins/Plugin.h:
110         Add a pure virtual method for plugInProcessToken so it can be accessed from from the Plugin
111         on the PluginView.
112         * WebProcess/Plugins/PluginProxy.h:
113         Return the actual plug-in process token.
114
115         * WebProcess/Plugins/PluginView.h:
116         (WebKit::PluginView::plugIn):
117         Make it possible to get at the plug-in process token through the Plugin.
118
119         * WebProcess/WebPage/WebPageMac.mm:
120         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
121         If there is an instance of the plug-in with that token, send a confirmation to the ui
122         process.
123         * WebProcess/WebPage/WebPage.h:
124         * WebProcess/WebPage/WebPage.messages.in:
125
126 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
127
128         REGRESSION (r141445): MPEG-4 videos do not play on certain hardware configurations
129         https://bugs.webkit.org/show_bug.cgi?id=117089
130         <rdar://problem/13839717>
131
132         Reviewed by Mark Rowe.
133
134         * Configurations/WebContentProcess.xcconfig: Statically link to a framework that
135         uses an XPC service to work around a libxpc limitation on Lion.
136
137 2013-05-31  Dean Jackson  <dino@apple.com>
138
139         Don't create an accelerated compositing layer unless we have to for snapshotting plug-ins
140         https://bugs.webkit.org/show_bug.cgi?id=117076
141         <rdar://problem/14030364>
142
143         Reviewed by Beth Dakin and Anders Carlsson.
144
145         If a plug-in can support software snapshotting, then don't create an
146         accelerated compositing layer for it while in snapshot mode. This is a
147         better user experience -- otherwise the page/plug-in looks like it broke.
148
149         * WebProcess/Plugins/PluginView.cpp:
150         (WebKit::PluginView::isAcceleratedCompositingEnabled): If we are in snapshotting mode
151         and we are a Flash plugin (the only one that supports software snapshots at the moment)
152         then do not create an accelerated compositing layer.
153
154 2013-05-30  Tim Horton  <timothy_horton@apple.com>
155
156         It's easy to hit ASSERT_NOT_REACHED in WKDOMNodeClass
157         https://bugs.webkit.org/show_bug.cgi?id=117051
158
159         Reviewed by Anders Carlsson.
160
161         Re-add the ASSERT_NOT_REACHED, and return [WKDOMNode class] in the case
162         where we don't have a specific subclass.
163
164         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
165         (WebKit::WKDOMNodeClass):
166
167 2013-05-31  Stephanie Lewis  <slewis@apple.com>
168
169         Update low memory handler to use new memory pressure notifications on new OS versions.
170         <rdar://problem/14027095>
171
172         Reviewed by Mark Rowe.
173
174         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
175         (InitWebCoreSystemInterface):
176
177 2013-05-30  Tim Horton  <timothy_horton@apple.com>
178
179         Remove ASSERT_NOT_REACHED from WKDOMNodeClass
180         https://bugs.webkit.org/show_bug.cgi?id=117051
181
182         Reviewed by Anders Carlsson.
183
184         It's easy to fail this assertion in seemingly-legitimate cases.
185
186         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
187         (WebKit::WKDOMNodeClass):
188
189 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
190
191         [Mac] Enable cache partitioning and the public suffix list on 10.8
192         <rdar://problem/13679019>
193
194         Rubber-stamped by David Kilzer.
195
196         * Configurations/FeatureDefines.xcconfig:
197
198 2013-05-30  Andreas Kling  <akling@apple.com>
199
200         Fix double hash lookup in WebPage::determinePrimarySnapshottedPlugIn() loop.
201         <http://webkit.org/b/117032>
202
203         Reviewed by Anders Carlsson.
204
205         * WebProcess/WebPage/WebPage.cpp:
206         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
207
208 2013-05-29  Tim Horton  <timothy_horton@apple.com>
209
210         Expose incrementalRenderingSuppressionTimeout via WK2
211         https://bugs.webkit.org/show_bug.cgi?id=117015
212         <rdar://problem/13992853>
213
214         Reviewed by Darin Adler.
215
216         * Shared/WebPreferencesStore.h:
217         * UIProcess/API/C/WKPreferencesPrivate.h:
218         Add IncrementalRenderingSuppressionTimeout preference.
219
220         * UIProcess/API/C/WKPreferences.cpp:
221         (WKPreferencesSetIncrementalRenderingSuppressionTimeout): Added.
222         (WKPreferencesGetIncrementalRenderingSuppressionTimeout): Added.
223
224         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
225         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
226         (WebKit::WebFrameLoaderClient::forcePageTransitionIfNeeded): Added.
227         Call didCompletePageTransition, which un-freezes the layer tree.
228
229         * WebProcess/WebPage/WebPage.cpp:
230         (WebKit::WebPage::didCompletePageTransition):
231         Fix some indentation.
232
233         (WebKit::WebPage::updatePreferences):
234         Forward the timeout value through to WebCore.
235
236 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
237
238         Fix paint-related milestones to not fire when the layer tree is frozen
239         https://bugs.webkit.org/show_bug.cgi?id=117012
240
241         Reviewed by Tim Horton.
242         
243         Implement ChromeClient::layerTreeStateIsFrozen() to return
244         the frozen state of the drawing area.
245
246         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
247         (WebKit::WebChromeClient::layerTreeStateIsFrozen):
248         * WebProcess/WebCoreSupport/WebChromeClient.h:
249         (WebChromeClient):
250
251 2013-05-29  Anders Carlsson  <andersca@apple.com>
252
253         WebKit should expose HSTS APIs to determine whether a host is in the HSTS cache and to reset HSTS policies
254         https://bugs.webkit.org/show_bug.cgi?id=117010
255         <rdar://problem/13689666>
256
257         Reviewed by Tim Horton.
258
259         * UIProcess/API/C/mac/WKContextPrivateMac.h:
260         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
261         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
262         * UIProcess/API/C/mac/WKPagePrivateMac.h:
263         * UIProcess/WebContext.h:
264         (WebContext):
265         * UIProcess/mac/WebContextMac.mm:
266         (WebKit):
267         (WebKit::privateBrowsingSession):
268         (WebKit::WebContext::isURLKnownHSTSHost):
269         (WebKit::WebContext::resetHSTSHosts):
270
271 2013-05-29  Tim Horton  <timothy_horton@apple.com>
272
273         WKViews using shouldClipToVisibleRect=YES should respect prepareContentInRect: if called
274         https://bugs.webkit.org/show_bug.cgi?id=116989
275         <rdar://problem/14007440>
276
277         Reviewed by Anders Carlsson.
278
279         * UIProcess/API/mac/WKView.mm:
280         (-[WKView prepareContentInRect:]):
281         If prepareContentInRect: is called, save the rect and set a flag so we know we should use it.
282
283         (-[WKView _updateViewExposedRect]):
284         Give the WebPage (and later the DrawingArea) the union of the rect handed to prepareContentInRect:
285         and the WKView's visibleRect, if we're in that mode, so that applications that do their own scrolling
286         can cause tiles to be created in currently offscreen views (for overdraw).
287
288         (-[WKView setFrameSize:]):
289         (-[WKView _updateWindowAndViewFrames]):
290         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
291         (-[WKView enableFrameSizeUpdates]):
292         (-[WKView setShouldClipToVisibleRect:]):
293         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
294         Use [_updateViewExposedRect].
295
296 2013-05-28  Oliver Hunt  <oliver@apple.com>
297
298         Add more accurate activity state tracking
299         https://bugs.webkit.org/show_bug.cgi?id=116893
300
301         Reviewed by Gavin Barraclough.
302
303         This extends the logic in WebCore from a Page to Process
304         granularity, so we will avoid lowering the child process
305         priority if there is active content.  This also plumbs in
306         the logic to allow plugins to report that they have done
307         something "interesting".  Currently this is somewhat conservative
308         but even this is sufficient to fix some stuttering issues
309         that we've seen.
310
311         * Shared/ChildProcess.cpp:
312         (WebKit::ChildProcess::ChildProcess):
313         * Shared/ChildProcess.h:
314         (ChildProcess):
315         (WebKit::ChildProcess::processSuppressionEnabled):
316         (WebKit::ChildProcess::incrementActiveTaskCount):
317         (WebKit::ChildProcess::decrementActiveTaskCount):
318         * Shared/mac/ChildProcessMac.mm:
319         (WebKit):
320         (WebKit::ChildProcess::setProcessSuppressionEnabledInternal):
321         (WebKit::ChildProcess::setProcessSuppressionEnabled):
322         (WebKit::ChildProcess::incrementActiveTaskCount):
323         (WebKit::ChildProcess::decrementActiveTaskCount):
324         (WebKit::ChildProcess::suspensionHysteresisTimerFired):
325         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
326         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
327         (WebKit::NPRuntimeObjectMap::evaluate):
328         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
329         (WebCore):
330         (NPRuntimeObjectMap):
331         * WebProcess/Plugins/PluginView.cpp:
332         (WebKit::PluginView::PluginView):
333         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
334         (WebKit::WebChromeClient::incrementActivePageCount):
335         (WebKit):
336         (WebKit::WebChromeClient::decrementActivePageCount):
337         * WebProcess/WebCoreSupport/WebChromeClient.h:
338         (WebChromeClient):
339
340 2013-05-29  Anders Carlsson  <andersca@apple.com>
341
342         Return earlier if there's no session storage namespace
343         https://bugs.webkit.org/show_bug.cgi?id=116984
344         <rdar://problem/13976781>
345
346         Reviewed by Tim Horton.
347
348         If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection
349         hash map since then we'll crash trying to remove it later.
350
351         * UIProcess/Storage/StorageManager.cpp:
352         (WebKit::StorageManager::createSessionStorageMap):
353
354 2013-05-29  Martin Robinson  <mrobinson@igalia.com>
355
356         Fix more CMake GTK+ build issues after r150336
357
358         * CMakeLists.txt: We need to allow for setting the WebProcess output name, since
359         WebKitGTK+ expects it to be called WebKitWebProcess.
360         * PlatformGTK.cmake: No longer set WebProcess_EXECUTABLE_NAME as it's been replaced
361         by WebKit2_WebProcess_OUTPUT_NAME.
362
363 2013-05-29  Marcelo Lira  <marcelo.lira@openbossa.org>
364
365         [WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn't do what it says
366         https://bugs.webkit.org/show_bug.cgi?id=116683
367
368         Reviewed by Noam Rosenthal.
369
370         WKViewUserViewportToContents now converts WebView coordinates to
371         page contents coordinates, taking into account factors as content
372         scale and scroll, and also device scale.
373
374         The function WKViewUserViewportToScene was added to convert WebView
375         coordinates to the coordinates of the canvas/scene where the view
376         is drawn, and EwkView was fixed to use it, instead of
377         WKViewUserViewportToContents.
378
379         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
380         (WKViewUserViewportToScene):
381         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
382         * UIProcess/API/efl/EwkView.cpp:
383         (EwkView::createGLSurface):
384         * UIProcess/CoordinatedGraphics/WebView.cpp:
385         (WebKit::WebView::userViewportToContents):
386         (WebKit):
387         (WebKit::WebView::userViewportToScene):
388         (WebKit::WebView::transformToScene):
389         * UIProcess/CoordinatedGraphics/WebView.h:
390         (WebView):
391
392 2013-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
393
394         Unreviewed. Fix make distcheck.
395
396         * GNUmakefile.am: Add WebCoreLayerGtk2.a to DISTCLEANFILES.
397
398 2013-05-29  Seokju Kwon  <seokju.kwon@gmail.com>
399
400         [GTK] Clean up WebKit2 GNUmakefile.am
401         https://bugs.webkit.org/show_bug.cgi?id=116907
402
403         Reviewed by Martin Robinson.
404
405         Removed WebNotificationManagerProxy.messages.in after r150785.
406
407         * GNUmakefile.am:
408
409 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
410
411         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
412         https://bugs.webkit.org/show_bug.cgi?id=116887
413         <rdar://problem/12965959>
414
415         Reviewed by Darin Adler.
416
417         * Shared/cf/ArgumentCodersCF.cpp:
418         (CoreIPC::encode):
419         (CoreIPC::decode):
420         Fix for the bug: use good shared WebCore code to manipulate CFURLs. Also, added
421         a FIXME about empty URLs.
422
423         * Shared/API/c/cf/WKURLCF.cpp: (WKURLCreateWithCFURL): Fixed to not use
424         CFURLGetString, as that could prevent loading certain resources, like ones with
425         curly braces in resource specifiers. We want KURL normalization, not CFURL one.
426
427 2013-05-28  Tim Horton  <timothy_horton@apple.com>
428
429         Rendering suppression extension tokens shouldn't be 0, should handle overflow
430         https://bugs.webkit.org/show_bug.cgi?id=116886
431         <rdar://problem/14004474>
432
433         Reviewed by Darin Adler.
434
435         Don't use invalid HashSet values as tokens, and ensure that
436         we're not already using a token before returning it.
437
438         * WebProcess/WebPage/WebPage.cpp:
439         (WebKit::WebPage::extendIncrementalRenderingSuppression):
440
441 2013-05-28  Lauro Neto <lauro.neto@openbossa.org>
442
443         [GTK] Connection issues in repeated WebProcess crash/reloads.
444         https://bugs.webkit.org/show_bug.cgi?id=115880
445
446         Reviewed by Anders Carlsson.
447
448         When stressing the WebProcess creation/destruction, WebKitGTK can
449         often run into socket issues like bad file descriptor errors or
450         polling a socket indefinitely.
451
452         Currently WebKitGTK has three places where a socket can be
453         closed.
454
455         - childFinishedFunction (in ProcessLauncherGtk.cpp)
456         - Connection::platformInvalidate (in ConnectionUnix.cpp)
457         - WorkQueue EventSource destruction (in WorkQueueGtk.cpp)
458
459         To avoid these race conditions, socket closing will be handled
460         by the event source callback in WorkQueueGtk.cpp.
461
462         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
463         (CoreIPC::Connection::platformInvalidate): Do not close the socket
464         when the connection is invalidated, the socket event source is
465         unregistered in this method and the socket is closed when the
466         GSocket associated to the event source is destroyed.
467         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
468         (WebKit::ProcessLauncher::launchProcess): Do not monitor child
469         process to close the connection on termination. This was needed in
470         the past when we used DGRAM sockets, we currently use always
471         connection oriented sockets, so that when the other end closes
472         the connection we are notified and the connection is invalidated.
473
474 2013-05-28  Martin Robinson  <mrobinson@igalia.com>
475
476         Fix GTK+ CMake build
477
478         * PlatformGTK.cmake: After r150336, the name of the WebKit2
479         library target is simply "WebKit2."
480
481 2013-05-28  Marcelo Lira  <marcelo.lira@openbossa.org>
482
483         [WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes
484         https://bugs.webkit.org/show_bug.cgi?id=116845
485
486         Reviewed by Noam Rosenthal.
487
488         * UIProcess/CoordinatedGraphics/WebView.cpp:
489         (WebKit::WebView::didChangeContentsSize):
490
491 2013-05-28  Noam Rosenthal  <noam@webkit.org>
492
493         [Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
494         https://bugs.webkit.org/show_bug.cgi?id=116597
495
496         ScrollingCoordinatorCoordinatedGraphics is tailored specifically for
497         fixedLayout mode. When fixedLayout is not set, it should be turned off.
498
499         Reviewed by Allan Sandfeld Jensen.
500
501         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
502         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
503
504 2013-05-28  Andreas Kling  <akling@apple.com>
505
506         Document::setFocusedNode() should be setFocusedElement().
507         <http://webkit.org/b/116857>
508
509         Reviewed by Antti Koivisto.
510
511         * WebProcess/Plugins/PluginView.cpp:
512         (WebKit::PluginView::focusPluginElement):
513         * WebProcess/WebPage/WebPage.cpp:
514         (WebKit::WebPage::focusedPluginViewForFrame):
515         (WebKit::WebPage::setInitialFocus):
516
517 2013-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
518
519         [EFL][WK2] Clean up duplicated include files.
520         https://bugs.webkit.org/show_bug.cgi?id=116851
521
522         Reviewed by Christophe Dumez.
523
524         Remove some of duplicated include file in ewk files.
525
526         * UIProcess/API/efl/EwkView.h:
527         * UIProcess/API/efl/ewk_color_picker.cpp:
528         * UIProcess/API/efl/ewk_context_menu.cpp:
529         * UIProcess/API/efl/ewk_security_origin_private.h:
530
531 2013-05-28  Ryuan Choi  <ryuan.choi@samsung.com>
532
533         [EFL] pc files should have harfbuzz dependency.
534         https://bugs.webkit.org/show_bug.cgi?id=116852
535
536         Reviewed by Gyuyoung Kim.
537
538         * efl/ewebkit2.pc.in: Added harfbuzz as Required package.
539
540 2013-05-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
541
542         [EFL][WK2] Remove unneeded WebCore namespace use in ewk
543         https://bugs.webkit.org/show_bug.cgi?id=116707
544
545         Reviewed by Christophe Dumez.
546
547         * UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore".
548         * UIProcess/API/efl/ewk_text_checker.cpp: ditto.
549
550 2013-05-26  Jon Lee  <jonlee@apple.com>
551
552         [WK2] Notifications clobber each other with multiple processes
553         https://bugs.webkit.org/show_bug.cgi?id=116428
554         <rdar://problem/13935191>
555
556         Reviewed by Darin Adler.
557
558         With multiple processes, the notification IDs, when passed up to the UI process, can clobber
559         each other. To fix this, we need to maintain a global map of notification IDs. This map is
560         keyed by its own unique notification ID, and maps to a pair containing the web page ID and that
561         web page's ID for the notification.
562
563         Now that we maintain groups of notifications based on the web page, we no longer send IPC messages
564         from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the
565         WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver.
566
567         When a page closes, all of the web notifications are cleared out. However, by the time the
568         WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since
569         the WebPage is told to close from the UI process anyway, we clear out the notifications separately,
570         instead of waiting for a message from the WebPage.
571
572         * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the
573         notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message
574         handlers as public functions, since they will be called from WebPageProxy. Add a new map that
575         associates a global ID with a notification ID that came from a web page.
576             There are now two flavors of clearNotifications(). One clears out all notifications associated
577         with a web page. This is called when the page is closed. The other clears out a subset of
578         notifications associated with a web page. This is called when notifications associated with a sub-frame
579         is closed.
580         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from
581         the web process go to WebPageProxy now.
582
583         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the
584         notification's web page.
585
586         (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification
587         ID generator.
588         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a
589         message receiver. Remove code that registers it as such.
590
591         (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID
592         that came from the web process, and the global notification ID the proxy maintains. Add the mapping
593         from the global ID to the (web page ID, notification ID) pair.
594         (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page.
595         (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration
596         the web page. Fixes a leak where we did not remove the item from the maps. This function is called
597         from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps
598         before we pass the message along to the provider.
599
600         Helper functions that evaluate when a given notification in the map matches the desired parameters.
601         (WebKit::pageIDsMatch): The notification is associated with the provided page.
602         (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is
603         contained within the list of provided notifications.
604
605         (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications
606         associated with the provided web page, and could include a specific list of notifications. This latter
607         situation occurs if notifications were associated with an iframe, and that iframe was removed.
608         There is an O(n) walk that could be make more efficient using another hash map, but that's overhead
609         for a map that should be small in size anyway.
610
611         (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into
612         consideration the web page.
613         (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into
614         consideration the web page.
615         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through
616         the list of global IDs and put them in buckets based on the notification's web pages. After that
617         is done we can send the DidCloseNotifications() to those pages' processes. There is a possible
618         extra optimization here where we group based on the page's process instead, to reduce the number
619         of messages sent to processes.
620
621         * UIProcess/WebPageProxy.cpp:
622         (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated
623         with the page.
624         (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy.
625         (WebKit::WebPageProxy::clearNotifications): Ditto.
626         (WebKit::WebPageProxy::didDestroyNotification): Ditto.
627         * UIProcess/WebPageProxy.h:
628         * UIProcess/WebPageProxy.messages.in:
629
630         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
631         * WebProcess/Notifications/WebNotificationManager.cpp:
632         (WebKit::WebNotificationManager::cancel):
633         (WebKit::WebNotificationManager::clearNotifications):
634         (WebKit::WebNotificationManager::didDestroyNotification):
635         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include.
636
637         * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files.
638         * DerivedSources.pri: Ditto.
639         * DerivedSources.make: Ditto.
640         * GNUmakefile.list.am: Ditto.
641         * WebKit2.xcodeproj/project.pbxproj: Ditto.
642
643 2013-05-27  Tim Horton  <timothy_horton@apple.com>
644
645         Unreviewed build fix take 2.
646
647         * WebProcess/Plugins/PDF/PDFPlugin.mm:
648
649 2013-05-27  Tim Horton  <timothy_horton@apple.com>
650
651         Unreviewed build fix.
652
653         * WebProcess/Plugins/PDF/PDFPlugin.mm:
654
655 2013-05-27  Tim Horton  <timothy_horton@apple.com>
656
657         PDFPlugin: Main-frame PDFPlugin Accessibility
658         https://bugs.webkit.org/show_bug.cgi?id=116563
659         <rdar://problem/13458534>
660
661         Reviewed by Sam Weinig.
662
663         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
664         Forward-declare a variety of accessibility methods.
665
666         * WebProcess/Plugins/PDF/PDFPlugin.h:
667         Add convertFromPDFViewToScreen, boundsOnScreen, accessibilityObject, and
668         storage for our accessibility wrapper.
669         * WebProcess/Plugins/PDF/PDFPlugin.mm:
670         Add WKPDFPluginAccessibilityObject.
671
672         (-[WKPDFPluginAccessibilityObject accessibilityIsIgnored]):
673         We want to be included in the accessibility tree.
674
675         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
676         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
677         Grab values for accessibility attributes from the relevant sources
678         (mostly from PDFLayerController).
679
680         (-[WKPDFPluginAccessibilityObject readingModel]): Ditto.
681         (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
682         (-[WKPDFPluginAccessibilityObject accessibilityParameterizedAttributeNames]):
683         (-[WKPDFPluginAccessibilityObject accessibilityActionNames]):
684         Return the set of accessibility attributes, actions, and parameterized
685         attributes that we support.
686
687         (-[WKPDFPluginAccessibilityObject accessibilityIsAttributeSettable:]):
688         (-[WKPDFPluginAccessibilityObject accessibilitySetValue:forAttribute:]):
689         Forward some other accessibility methods to PDFLayerController.
690
691         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
692         (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
693         We have no children, so if a hit test makes it to us, it's ours.
694
695         (WebKit::PDFPlugin::PDFPlugin):
696         Make a WKPDFPluginAccessibilityObject and hook it up.
697         [FIXME: this could use some de-crapifying]
698
699         (WebKit::PDFPlugin::convertFromPluginToPDFView):
700         Transform a point from plugin space to PDFLayerController space.
701
702         (WebKit::PDFPlugin::convertFromPDFViewToRootView):
703         (WebKit::PDFPlugin::convertFromPDFViewToScreen): Added.
704         (WebKit::PDFPlugin::boundsOnScreen):
705         Return the PDFPlugin's frame in screen coordinates.
706
707         (WebKit::PDFPlugin::accessibilityObject):
708         Return our accessibility wrapper.
709
710         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
711         * WebProcess/Plugins/Plugin.h:
712         (WebKit::Plugin::accessibilityObject):
713         * WebProcess/Plugins/PluginView.cpp:
714         (WebKit::PluginView::accessibilityObject):
715         * WebProcess/Plugins/PluginView.h:
716         Add accessibilityObject(), to acquire accessibility wrappers from plugins.
717
718         * WebProcess/WebPage/WebPage.h:
719         (WebPage): Add accessibilityObjectForMainFramePlugin();
720         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
721         (-[WKAccessibilityWebPageObject accessibilityRootObjectWrapper]):
722         If the main frame has a PluginDocument that has an accessibilityObject,
723         use that one instead of the WebPage's.
724
725         * WebProcess/WebPage/mac/WebPageMac.mm:
726         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
727         Return the accessibilityObject from the main-frame PluginDocument, if
728         there is one.
729
730 2013-05-27  Marcelo Lira  <marcelo.lira@openbossa.org>
731
732         [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize()
733         https://bugs.webkit.org/show_bug.cgi?id=116688
734
735         Reviewed by Noam Rosenthal.
736
737         Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect()
738         must be calculated including the page scale factor and avoid crossing the
739         boundaries of the page contents size. In other words the DrawingArea
740         must know the actual dimensions of what it being drawn. If the
741         DrawingArea thinks the visible rectangle is bigger than it is, the
742         contents will be drawn pixelated and blurry.
743
744         * UIProcess/CoordinatedGraphics/WebView.cpp:
745         (WebKit::WebView::didChangeContentsSize):
746         (WebKit::WebView::updateViewportSize):
747         (WebKit::WebView::visibleContentsSize):
748         (WebKit):
749         * UIProcess/CoordinatedGraphics/WebView.h:
750         (WebKit::WebView::contentsSize):
751         (WebView):
752
753 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
754
755         [GTK] WebKitWebView child widgets are not rendered with recent GTK+
756         https://bugs.webkit.org/show_bug.cgi?id=116794
757
758         Reviewed by Xan Lopez.
759
760         Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose
761         events are not propagated to child GdkWindows anymore, and child
762         widgets are rendered via gtk_container_propagate_draw(). Since all
763         our children have its own GdkWindow (auth widget, inspector view
764         and windowed plugins) we don't propagate the draw signal making
765         them invisible with current GTK+.
766
767         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
768         (webkitWebViewBaseDraw): Chain up to the parent draw(), so it's
769         propagated to the children. This shouldn't have any effect in
770         previous versions of GTK+ because gtk_container_propagate_draw()
771         returned early when the child widget had its own GdkWindow.
772
773 2013-05-27  Xan Lopez  <xlopez@igalia.com>
774
775         Reset all clients on WebPage close
776         https://bugs.webkit.org/show_bug.cgi?id=112334
777
778         Reviewed by Anders Carlsson.
779
780         We do not reset the clients on WebPage::close(), so there's a
781         small chance that someone will try to access them after that. This
782         won't work and will generally cause runtime warnings, crashes or
783         other issues. Reset them all to null to prevent this situation.
784
785         * WebProcess/WebPage/WebPage.cpp:
786         (WebKit::WebPage::close):
787
788 2013-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
789
790         [GTK] Notify WebProcess in WebKitURISchemeRequest when we fail to read the user InputStream
791         https://bugs.webkit.org/show_bug.cgi?id=114347
792
793         Reviewed by Carlos Garcia Campos.
794
795         While processing a WebKitURISchemeRequest if there is any error reading
796         the InputStream provided by the user (for example the stream is already
797         closed) we have to notify the WebProcess that the request has failed.
798
799         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
800         (webkitURISchemeRequestReadCallback): Get the error from
801         g_input_stream_read_finish() and use it to call
802         webkit_uri_scheme_request_finish_error() in order to finish the failing
803         WebKitURISchemeRequest properly.
804         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
805         (testWebContextURIScheme): Modify test to check the new situation using
806         an already closed InputStream.
807
808 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
809
810         Unreviewed. Fix make distcheck.
811
812         * GNUmakefile.list.am: Add missing header file.
813
814 2013-05-26  Changhun Kang  <temoochin@company100.net>
815
816         The public WK header file should not include WKAPICast.h
817         https://bugs.webkit.org/show_bug.cgi?id=115230
818
819         Reviewed by Darin Adler.
820
821         Otherwise, WebKit internal headers are exposed.
822         No new tests. No change in behavior.
823         * UIProcess/API/C/soup/WKSoupRequestManager.h:
824         * UIProcess/soup/WebSoupRequestManagerClient.h:
825
826 2013-05-26  Andreas Kling  <akling@apple.com>
827
828         FocusController::setFocusedNode() should be setFocusedElement().
829         <http://webkit.org/b/116780>
830
831         Reviewed by Antti Koivisto.
832
833         * WebProcess/Plugins/PluginView.cpp:
834         (WebKit::PluginView::focusPluginElement):
835
836 2013-05-25  Andreas Kling  <akling@apple.com>
837
838         PluginDocument::pluginNode() should be pluginElement() instead.
839         <http://webkit.org/b/116774>
840
841         Reviewed by Anders Carlsson.
842
843         * WebProcess/WebPage/WebPage.cpp:
844         (WebKit::WebPage::focusedPluginViewForFrame):
845
846 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
847
848         Unprefix Page Visibility API
849         https://bugs.webkit.org/show_bug.cgi?id=102340
850
851         Reviewed by Tim Horton.
852         
853         Renaming of the "preview" state to "unloaded".
854
855         * Shared/API/c/WKPageVisibilityTypes.h:
856         * Shared/API/c/WKSharedAPICast.h:
857         (WebKit::toPageVisibilityState):
858
859 2013-05-25  Andreas Kling  <akling@apple.com>
860
861         Move Node::isMouseFocusable() to Element.
862         <http://webkit.org/b/116762>
863
864         Reviewed by Anders Carlsson.
865
866         * WebProcess/WebPage/WebPage.cpp:
867         (WebKit::WebPage::highlightPotentialActivation):
868
869             Check that the potentially activated Node is an Element before asking if it's mouse-focusable.
870
871 2013-05-25  Andreas Kling  <akling@apple.com>
872
873         REGRESSION: WebProcess is terminated when all Safari windows are closed.
874         <rdar://problem/13990901>
875         <http://webkit.org/b/116766>
876
877         Reviewed by Alexey Proskuryakov.
878
879         When closing the last page, only disconnect the web process if we're using a network process.
880         Otherwise there might be session state in the web process getting lost.
881
882         * UIProcess/WebProcessProxy.cpp:
883         (WebKit::WebProcessProxy::removeWebPage):
884
885 2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>
886
887         WebFrameProxy::didFailLoad clears frame title for no apparent reason
888         https://bugs.webkit.org/show_bug.cgi?id=116655
889
890         Reviewed by Alexey Proskuryakov.
891
892         * UIProcess/WebFrameProxy.cpp:
893         (WebKit::WebFrameProxy::didFailLoad):
894
895 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
896
897         [Qt][GTK] Build fix after r150669
898         https://bugs.webkit.org/show_bug.cgi?id=116751
899
900         Reviewed by Christophe Dumez.
901
902         * GNUmakefile.list.am:
903         * Target.pri:
904         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
905         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
906
907 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
908
909         [EFL] Build fix after r150669
910         https://bugs.webkit.org/show_bug.cgi?id=116750
911
912         Reviewed by Anders Carlsson.
913
914         * CMakeLists.txt:
915         * WebProcess/Battery/WebBatteryManager.cpp:
916         (WebKit::WebBatteryManager::registerWebPage):
917         (WebKit::WebBatteryManager::unregisterWebPage):
918         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
919         (WebKit::WebNetworkInfoManager::registerWebPage):
920         (WebKit::WebNetworkInfoManager::unregisterWebPage):
921         (WebKit::WebNetworkInfoManager::bandwidth):
922         (WebKit::WebNetworkInfoManager::metered):
923         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
924         (WebKit::WebVibrationClient::vibrate):
925         (WebKit::WebVibrationClient::cancelVibration):
926         * WebProcess/soup/WebSoupRequestManager.cpp:
927         (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
928         (WebKit::WebSoupRequestManager::send):
929
930 2013-05-24  Anders Carlsson  <andersca@apple.com>
931
932         MessageSender shouldn't be a class template
933         https://bugs.webkit.org/show_bug.cgi?id=116743
934
935         Reviewed by Andreas Kling.
936
937         Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
938         implement messageSenderConnection() as well as messageSenderDestinationID().
939
940         This reduces code size and will allow us to be more flexible with MessageSender in the future.
941
942         * NetworkProcess/NetworkResourceLoader.cpp:
943         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
944         (WebKit::NetworkResourceLoader::messageSenderConnection):
945         (WebKit):
946         (WebKit::NetworkResourceLoader::messageSenderDestinationID):
947         * NetworkProcess/NetworkResourceLoader.h:
948         (NetworkResourceLoader):
949         * NetworkProcess/mac/DiskCacheMonitor.h:
950         (DiskCacheMonitor):
951         * NetworkProcess/mac/DiskCacheMonitor.mm:
952         (WebKit::DiskCacheMonitor::messageSenderConnection):
953         (WebKit::DiskCacheMonitor::messageSenderDestinationID):
954         (WebKit):
955         * Platform/CoreIPC/MessageSender.h:
956         (CoreIPC):
957         (MessageSender):
958         (CoreIPC::MessageSender::send):
959         (CoreIPC::MessageSender::sendSync):
960         * Shared/ChildProcess.cpp:
961         (WebKit::ChildProcess::messageSenderConnection):
962         (WebKit):
963         (WebKit::ChildProcess::messageSenderDestinationID):
964         * Shared/ChildProcess.h:
965         (ChildProcess):
966         * Shared/Downloads/Download.cpp:
967         (WebKit::Download::messageSenderConnection):
968         (WebKit):
969         (WebKit::Download::messageSenderDestinationID):
970         * Shared/Downloads/Download.h:
971         (Download):
972         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
973         (WebKit::CustomProtocolManager::initialize):
974         * Shared/WebConnection.h:
975         (WebConnection):
976         * Shared/mac/SecItemShim.cpp:
977         (WebKit::sendSecItemRequest):
978         * UIProcess/WebConnectionToWebProcess.cpp:
979         (WebKit::WebConnectionToWebProcess::hasValidConnection):
980         (WebKit::WebConnectionToWebProcess::messageSenderConnection):
981         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
982         * UIProcess/WebConnectionToWebProcess.h:
983         (WebConnectionToWebProcess):
984         * WebKit2.xcodeproj/project.pbxproj:
985         * WebProcess/Geolocation/WebGeolocationManager.cpp:
986         (WebKit::WebGeolocationManager::registerWebPage):
987         (WebKit::WebGeolocationManager::unregisterWebPage):
988         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
989         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
990         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
991         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
992         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
993         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
994         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
995         * WebProcess/InjectedBundle/InjectedBundle.cpp:
996         (WebKit::InjectedBundle::postMessage):
997         (WebKit::InjectedBundle::postSynchronousMessage):
998         * WebProcess/Network/WebResourceLoader.cpp:
999         (WebKit::WebResourceLoader::messageSenderConnection):
1000         (WebKit::WebResourceLoader::messageSenderDestinationID):
1001         * WebProcess/Network/WebResourceLoader.h:
1002         (WebResourceLoader):
1003         * WebProcess/Notifications/WebNotificationManager.cpp:
1004         (WebKit::WebNotificationManager::show):
1005         (WebKit::WebNotificationManager::cancel):
1006         (WebKit::WebNotificationManager::clearNotifications):
1007         (WebKit::WebNotificationManager::didDestroyNotification):
1008         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1009         (WebKit::PDFPlugin::writeItemsToPasteboard):
1010         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1011         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1012         * WebProcess/Storage/StorageAreaMap.cpp:
1013         (WebKit::StorageAreaMap::StorageAreaMap):
1014         (WebKit::StorageAreaMap::~StorageAreaMap):
1015         (WebKit::StorageAreaMap::setItem):
1016         (WebKit::StorageAreaMap::removeItem):
1017         (WebKit::StorageAreaMap::clear):
1018         (WebKit::StorageAreaMap::loadValuesIfNeeded):
1019         * WebProcess/WebConnectionToUIProcess.cpp:
1020         (WebKit::WebConnectionToUIProcess::hasValidConnection):
1021         (WebKit::WebConnectionToUIProcess::messageSenderConnection):
1022         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
1023         * WebProcess/WebConnectionToUIProcess.h:
1024         (WebConnectionToUIProcess):
1025         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1026         (WebKit::WebChromeClient::windowRect):
1027         (WebKit::WebChromeClient::focusedFrameChanged):
1028         (WebKit::WebChromeClient::createWindow):
1029         (WebKit::WebChromeClient::toolbarsVisible):
1030         (WebKit::WebChromeClient::statusbarVisible):
1031         (WebKit::WebChromeClient::menubarVisible):
1032         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1033         (WebKit::WebChromeClient::runJavaScriptAlert):
1034         (WebKit::WebChromeClient::runJavaScriptConfirm):
1035         (WebKit::WebChromeClient::runJavaScriptPrompt):
1036         (WebKit::WebChromeClient::shouldInterruptJavaScript):
1037         (WebKit::WebChromeClient::exceededDatabaseQuota):
1038         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
1039         (WebKit::WebColorChooser::WebColorChooser):
1040         (WebKit::WebColorChooser::setSelectedColor):
1041         (WebKit::WebColorChooser::endChooser):
1042         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1043         (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
1044         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1045         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1046         (WebKit::WebFrameLoaderClient::setTitle):
1047         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1048         (WebKit::WebPlatformStrategies::populatePluginCache):
1049         (WebKit::WebPlatformStrategies::getTypes):
1050         (WebKit::WebPlatformStrategies::bufferForType):
1051         (WebKit::WebPlatformStrategies::getPathnamesForType):
1052         (WebKit::WebPlatformStrategies::stringForType):
1053         (WebKit::WebPlatformStrategies::copy):
1054         (WebKit::WebPlatformStrategies::changeCount):
1055         (WebKit::WebPlatformStrategies::uniqueName):
1056         (WebKit::WebPlatformStrategies::color):
1057         (WebKit::WebPlatformStrategies::url):
1058         (WebKit::WebPlatformStrategies::addTypes):
1059         (WebKit::WebPlatformStrategies::setTypes):
1060         (WebKit::WebPlatformStrategies::setBufferForType):
1061         (WebKit::WebPlatformStrategies::setPathnamesForType):
1062         (WebKit::WebPlatformStrategies::setStringForType):
1063         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1064         (WebKit::WebPopupMenu::show):
1065         (WebKit::WebPopupMenu::hide):
1066         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1067         (WebKit::WebSearchPopupMenu::saveRecentSearches):
1068         (WebKit::WebSearchPopupMenu::loadRecentSearches):
1069         * WebProcess/WebPage/EventDispatcher.cpp:
1070         (WebKit::EventDispatcher::sendDidReceiveEvent):
1071         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1072         (WebKit::updateBackForwardItem):
1073         (WebKit::WebBackForwardListProxy::itemAtIndex):
1074         (WebKit::WebBackForwardListProxy::backListCount):
1075         (WebKit::WebBackForwardListProxy::forwardListCount):
1076         * WebProcess/WebPage/WebInspector.cpp:
1077         (WebKit::WebInspector::createInspectorPage):
1078         (WebKit::WebInspector::didClose):
1079         (WebKit::WebInspector::bringToFront):
1080         (WebKit::WebInspector::inspectedURLChanged):
1081         (WebKit::WebInspector::save):
1082         (WebKit::WebInspector::append):
1083         (WebKit::WebInspector::attachBottom):
1084         (WebKit::WebInspector::attachRight):
1085         (WebKit::WebInspector::detach):
1086         (WebKit::WebInspector::setAttachedWindowHeight):
1087         (WebKit::WebInspector::setAttachedWindowWidth):
1088         (WebKit::WebInspector::setToolbarHeight):
1089         (WebKit::WebInspector::updateDockingAvailability):
1090         (WebKit::WebInspector::sendMessageToRemoteFrontend):
1091         * WebProcess/WebPage/WebPage.cpp:
1092         (WebKit::WebPage::messageSenderConnection):
1093         (WebKit):
1094         (WebKit::WebPage::messageSenderDestinationID):
1095         * WebProcess/WebPage/WebPage.h:
1096         (WebPage):
1097         * WebProcess/WebPage/mac/WebPageMac.mm:
1098         (WebKit::WebPage::executeKeypressCommandsInternal):
1099         (WebKit::WebPage::handleEditingKeyboardEvent):
1100         * WebProcess/WebProcess.cpp:
1101         (WebKit::WebProcess::ensureNetworkProcessConnection):
1102         (WebKit::WebProcess::shouldTerminate):
1103
1104 2013-05-24  Tim Horton  <timothy_horton@apple.com>
1105
1106         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
1107         https://bugs.webkit.org/show_bug.cgi?id=116744
1108         <rdar://problem/13973514>
1109
1110         Reviewed by Simon Fraser.
1111
1112         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1113         (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
1114         Force WebCore to repaint animated images when painting is resumed.
1115
1116 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1117
1118         Remove custom code for webkitAudioContext global constructor getter
1119         https://bugs.webkit.org/show_bug.cgi?id=116530
1120
1121         Reviewed by Geoffrey Garen.
1122
1123         Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.
1124
1125         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1126         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1127         * WebProcess/WebPage/WebPage.cpp:
1128         (WebKit::WebPage::updatePreferences):
1129
1130 2013-05-24  Thomas Deniau  <deniau@apple.com>
1131
1132         Add more lines to the context during Dictionary lookups
1133         https://bugs.webkit.org/show_bug.cgi?id=115256
1134
1135         Reviewed by Ryosuke Niwa.
1136
1137         * WebProcess/WebPage/mac/WebPageMac.mm:
1138         (WebKit::WebPage::performDictionaryLookupAtLocation):
1139         Instead of using the current paragraph as the context (which stops at
1140         line breaks), get a few lines before and after the point, so that the
1141         context contains at least four lines in each direction.
1142         This way the Dictionary will be able to look up things that extend past
1143         the current line.
1144
1145 2013-05-24  Anders Carlsson  <andersca@apple.com>
1146
1147         Intermittent crash when typing in Address Bar
1148         https://bugs.webkit.org/show_bug.cgi?id=116728
1149         <rdar://problem/13976781>
1150
1151         Reviewed by Sam Weinig.
1152
1153         If a web process connection has been removed from the storage manager because we disconnected it
1154         since there were no more active pages associated with the web process, we'll fail to find it here
1155         so just return early instead of crashing.
1156
1157         * UIProcess/Storage/StorageManager.cpp:
1158         (WebKit::StorageManager::destroyStorageMap):
1159
1160 2013-05-24  Andreas Kling  <akling@apple.com>
1161
1162         Typing in Safari's unified field causes unnecessary web content repaints.
1163         <http://webkit.org/b/116703>
1164
1165         Reviewed by Andy Estes.
1166
1167         * WebProcess/WebPage/FindController.cpp:
1168         (WebKit::FindController::countStringMatches):
1169
1170             Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
1171             is found inside the page content, the renderer containing that text will no longer be repainted.
1172
1173 2013-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
1174
1175         [WK2][EFL][QT] Build break after r150610
1176         https://bugs.webkit.org/show_bug.cgi?id=116699
1177
1178         Reviewed by Csaba Osztrogonác.
1179
1180         * UIProcess/WebPageProxy.cpp:
1181         (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.
1182
1183 2013-05-23  Anders Carlsson  <andersca@apple.com>
1184
1185         Shim Flash plug-in to allow its updater to run
1186         https://bugs.webkit.org/show_bug.cgi?id=116692
1187         <rdar://problem/13938510>
1188
1189         Reviewed by Sam Weinig.
1190
1191         * PluginProcess/PluginProcess.h:
1192         * PluginProcess/mac/PluginProcessMac.mm:
1193         (WebKit::replacedNSConcreteTask_launch):
1194         (WebKit::initializeCocoaOverrides):
1195         Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.
1196
1197         (WebKit::PluginProcess::launchProcess):
1198         Send a LaunchProcess message to the UI process.
1199
1200         * UIProcess/Plugins/PluginProcessProxy.cpp:
1201         * UIProcess/Plugins/PluginProcessProxy.h:
1202         Remove PluginProcessProxy::didReceiveMessage.
1203
1204         (PluginProcessProxy):
1205         * UIProcess/Plugins/PluginProcessProxy.messages.in:
1206         Add LaunchProcess message and remove LegacyReceiver attribute.
1207
1208         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1209         (WebKit::isFlashUpdater):
1210         Helper function to determine whether the process is the flash updater.
1211
1212         (WebKit::shouldLaunchProcess):
1213         Return whether we should launch this process.
1214
1215         (WebKit::PluginProcessProxy::launchProcess):
1216         Determine if we should launch this process and then do so.
1217
1218 2013-05-23  Anders Carlsson  <andersca@apple.com>
1219
1220         Don't run all plug-ins unsandboxed
1221         https://bugs.webkit.org/show_bug.cgi?id=116690
1222         <rdar://problem/13975569>
1223
1224         Reviewed by Jessie Berlin.
1225
1226         Remove debugging code.
1227
1228         * UIProcess/WebPageProxy.cpp:
1229         (WebKit::WebPageProxy::findPlugin):
1230
1231 2013-05-23  Anders Carlsson  <andersca@apple.com>
1232
1233         Crash in convertMainResourceLoadToDownload when downloading file by option-return
1234         https://bugs.webkit.org/show_bug.cgi?id=116451
1235
1236         Reviewed by Andreas Kling.
1237
1238         If the main resource loader is null, create a new download instead since there's no existing loader to convert.
1239
1240         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1241         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1242         * WebProcess/WebPage/WebFrame.cpp:
1243         (WebKit::WebFrame::convertMainResourceLoadToDownload):
1244
1245 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
1246
1247         <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding
1248
1249         Reviewed by Dan Bernstein.
1250
1251         * WebProcess/com.apple.WebProcess.sb.in: Allow this.
1252
1253 2013-05-23  Gavin Barraclough  <barraclough@apple.com>
1254
1255         Move posix_spawn onto a zero delay timer
1256         https://bugs.webkit.org/show_bug.cgi?id=116682
1257
1258         Reviewed by Anders Carlson.
1259
1260         <rdar://problem/13973468>
1261
1262         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1263         (ReexecInfo):
1264             - struct to hold info from the XPC message.
1265         (WebKit::reexec):
1266             - moved call to posix_spawn out to this helper.
1267         (WebKit::reexecCallBack):
1268             - calls reexec.
1269         (WebKit::XPCServiceEventHandler):
1270             - removed call to posix_spawn; schedule a call to reexecCallBack.
1271
1272 2013-05-23  Csaba Osztrogonác  <ossy@webkit.org>
1273
1274         [cmake] Fix generating-forwarding-headers rule after r150460
1275         https://bugs.webkit.org/show_bug.cgi?id=116659
1276
1277         Reviewed by Christophe Dumez.
1278
1279         * CMakeLists.txt: Typo fix.
1280
1281 2013-05-23  Anton Obzhirov  <a.obzhirov@samsung.com>
1282
1283         [GTK] Remote Web Inspector sometimes won't serve any content
1284         https://bugs.webkit.org/show_bug.cgi?id=116225
1285
1286         Reviewed by Gustavo Noronha Silva.
1287
1288         Added an option to use environment variable to set up path to
1289         inspector server files. Implementation is similar to InspectorClientGtk
1290         implementation.
1291
1292         * UIProcess/InspectorServer/WebInspectorServer.h:
1293         (WebInspectorServer):
1294         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1295         (WebKit::WebInspectorServer::platformResourceForPath):
1296         (WebKit::WebInspectorServer::inspectorServerFilesPath):
1297         (WebKit):
1298
1299 2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1300
1301         [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
1302         https://bugs.webkit.org/show_bug.cgi?id=116657
1303
1304         Reviewed by Christophe Dumez.
1305
1306         WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
1307         ewk_view_pagination_mode_set|get.
1308
1309         Besides we don't need to use WebCore namespace anymore.
1310
1311         * UIProcess/API/efl/ewk_view.cpp:
1312         (ewk_view_pagination_mode_set):
1313         (ewk_view_pagination_mode_get):
1314
1315 2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>
1316
1317         Support frame instrumentation for coordinated graphics
1318         https://bugs.webkit.org/show_bug.cgi?id=115260
1319
1320         Reviewed by Andreas Kling.
1321
1322         Enabled supportsFrameInstrumentation on ports that use coordinated graphics
1323         by calling didBeginFrame().
1324
1325         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1326         (WebKit::WebInspectorClient::supportsFrameInstrumentation):
1327         (WebKit):
1328         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1329         (WebInspectorClient):
1330         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1331         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
1332
1333 2013-05-22  Dean Jackson  <dino@apple.com>
1334
1335         Don't snapshot plugins that can't be snapshotted
1336         https://bugs.webkit.org/show_bug.cgi?id=116490
1337
1338         Reviewed by Tim Horton.
1339
1340         Some plugins, such as QuickTime, don't support snapshotting. We're
1341         planning on another way to capture snapshots, but in the meantime make
1342         sure that they don't fail to initialise because they were told to
1343         not use accelerated rendering.
1344
1345         Expose a new message on the plugins so that they can tell the PluginView
1346         if they support snapshotting or not.
1347
1348         * PluginProcess/PluginControllerProxy.cpp:
1349         (WebKit::PluginControllerProxy::supportsSnapshotting): New method.
1350         * PluginProcess/PluginControllerProxy.h: Ditto.
1351         * PluginProcess/PluginControllerProxy.messages.in: Message signature.
1352
1353         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting.
1354         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto.
1355         * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here.
1356
1357         * WebProcess/Plugins/PluginProxy.cpp:
1358         (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results.
1359         * WebProcess/Plugins/PluginProxy.h:
1360
1361         * WebProcess/Plugins/PluginView.cpp:
1362         (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make
1363             sure to add it to the tree.
1364         (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use
1365             accelerated compositing, just like normal plugins.
1366         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting,
1367             immediately restart it.
1368
1369 2013-05-22  Anders Carlsson  <andersca@apple.com>
1370
1371         Fix crash when closing a page that's trying to access session storage
1372         https://bugs.webkit.org/show_bug.cgi?id=116634
1373         <rdar://problem/13904054>
1374
1375         Reviewed by Geoffrey Garen.
1376
1377         It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process.
1378         If that happens, just ignore the messages.
1379
1380         * UIProcess/Storage/StorageManager.cpp:
1381         (WebKit::StorageManager::createSessionStorageMap):
1382         (WebKit::StorageManager::getValues):
1383         (WebKit::StorageManager::setItem):
1384         (WebKit::StorageManager::removeItem):
1385         (WebKit::StorageManager::clear):
1386         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
1387
1388 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
1389
1390         Crashes in NetworkProcess due to incorrect private browsing session tracking
1391         https://bugs.webkit.org/show_bug.cgi?id=116628
1392
1393         Reviewed by Brady Eidson.
1394
1395         The current API for private browsing makes it extremely difficult to track sessions.
1396         Private browsing is enabled via WKPreferences, but the session is shared, so it
1397         has to be maintained while there is any chance that any page group anywhere still
1398         needs it.
1399
1400         This patch fixes some of the issues, but ultimately, I think that we'll just need
1401         to deprecate and replace the API.
1402
1403         * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession):
1404         There are valid scenarios where privateBrowsingEnabled is true, but there is no
1405         private browsing session. Handle that without crashing, although this unfortunately
1406         means that it will be harder to spot logic errors when using a wrong session.
1407         (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME.
1408
1409         * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession()
1410         to return a pointer, as no caller could know when it was safe to call it.
1411
1412         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1413         (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private
1414         browsing session is unexpectedly missing without crashing.
1415         (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer.
1416
1417         * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess):
1418         Actually initialize privateBrowsingEnabled creation parameter. It would be very
1419         difficult to figure out 100% reliably whether NetworkProcess needs a private browsing
1420         session with the current API, but for existing clients, looking at
1421         m_privateBrowsingEnterCount is good enough. Certainly better than not initializing.
1422
1423         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1424         (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME.
1425
1426 2013-05-22  Tim Horton  <timothy_horton@apple.com>
1427
1428         [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout
1429         https://bugs.webkit.org/show_bug.cgi?id=116625
1430         <rdar://problem/13962816>
1431
1432         Reviewed by Anders Carlsson.
1433
1434         The two modes are not dependent; it should be possible to enable
1435         clips-to-exposed-rect without using autolayout. This enables apps to
1436         make very large tiled WKViews that don't create tiles for the whole
1437         area of the view (and also disables scrolling, since that is currently
1438         incompatible with clipping to the exposed rect).
1439
1440         * UIProcess/API/mac/WKView.mm:
1441         (-[WKView setFrameSize:]):
1442         (-[WKView _updateWindowAndViewFrames]):
1443         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1444         (-[WKView enableFrameSizeUpdates]):
1445         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1446         Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy.
1447
1448         (-[WKView setMinimumWidthForAutoLayout:]):
1449         Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect.
1450
1451         (-[WKView shouldClipToVisibleRect]):
1452         (-[WKView setShouldClipToVisibleRect:]):
1453         Allow setting clips-to-visible-rect without autolayout.
1454
1455         * UIProcess/API/mac/WKViewPrivate.h:
1456         Add shouldClipToVisibleRect property.
1457
1458 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
1459
1460         Remove unused private browsing override support
1461         <rdar://problem/11969491>
1462
1463         Rubber-stamped by Sam Weinig.
1464
1465         Private browsing override is unused, and it complicates tracking of private
1466         browsing sessions in UI process (in fact, it doesn't plug into this tracking at all,
1467         so we would just assert if we used the API).
1468
1469         * Shared/WebPageCreationParameters.cpp:
1470         (WebKit::WebPageCreationParameters::encode):
1471         (WebKit::WebPageCreationParameters::decode):
1472         * Shared/WebPageCreationParameters.h:
1473         * UIProcess/API/C/WKPage.cpp:
1474         * UIProcess/API/C/WKPagePrivate.h:
1475         * UIProcess/WebPageProxy.cpp:
1476         (WebKit::WebPageProxy::WebPageProxy):
1477         (WebKit::WebPageProxy::creationParameters):
1478         * UIProcess/WebPageProxy.h:
1479         * WebProcess/WebPage/WebPage.cpp:
1480         (WebKit::WebPage::WebPage):
1481         (WebKit::WebPage::updatePreferences):
1482         * WebProcess/WebPage/WebPage.h:
1483         * WebProcess/WebPage/WebPage.messages.in:
1484
1485 2013-05-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1486
1487         [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer
1488         https://bugs.webkit.org/show_bug.cgi?id=116549
1489
1490         Reviewed by Christophe Dumez.
1491
1492         A context menu item should have only a pointer to parent menu instead
1493         of owning parent menu.
1494
1495         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1496         (EwkContextMenuItem::EwkContextMenuItem):
1497         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1498         (EwkContextMenuItem::create):
1499         (EwkContextMenuItem::parentMenu):
1500         (EwkContextMenuItem):
1501
1502 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
1503
1504         [Qt][WK2] Unreviewed buildfix after r150484.
1505
1506         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
1507         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1508
1509 2013-05-21  Andreas Kling  <akling@apple.com>
1510
1511         REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess().
1512         <http://webkit.org/b/116588>
1513
1514         Reviewed by Sam Weinig.
1515
1516         Do an early return from WebProcessProxy::requestTermination() if there is no child process
1517         connection to terminate.
1518
1519         * UIProcess/WebProcessProxy.cpp:
1520         (WebKit::WebProcessProxy::requestTermination):
1521
1522 2013-05-21  Mark Rowe  <mrowe@apple.com>
1523
1524         <rdar://problem/13915556> Sluggish scrolling in web content
1525
1526         Reviewed by Gavin Barraclough.
1527
1528         * Shared/mac/ChildProcessMac.mm:
1529         (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.
1530
1531 2013-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1532
1533         Fix build break after r150484
1534
1535         Unreviewed, fix build break on EFL, GTK.
1536
1537         * UIProcess/Plugins/PluginInfoStore.cpp:
1538         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
1539         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1540         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1541
1542 2013-05-21  Andreas Kling  <akling@apple.com>
1543
1544         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
1545         <http://webkit.org/b/116464>
1546         <rdar://problem/10103795>
1547
1548         Reviewed by Anders Carlsson.
1549
1550         Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
1551         just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
1552         will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.
1553
1554         (WebKit::WebProcessProxy::removeWebPage):
1555
1556             When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
1557             eventually, even if the WebPage::Close message never gets properly handled.
1558
1559         * Shared/ChildProcessProxy.h:
1560         * Shared/ChildProcessProxy.cpp:
1561         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
1562
1563             Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
1564             where the exiting web process may get re-used for a new tab.
1565
1566         * UIProcess/WebProcessProxy.h:
1567         * UIProcess/WebProcessProxy.cpp:
1568         (WebKit::WebProcessProxy::WebProcessProxy):
1569         (WebKit::WebProcessProxy::enableSuddenTermination):
1570         (WebKit::WebProcessProxy::disableSuddenTermination):
1571
1572             Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
1573             response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.
1574
1575 2013-05-21  Anders Carlsson  <andersca@apple.com>
1576
1577         Fix build.
1578
1579         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1580         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1581         Stop using lambdas :(
1582
1583 2013-05-21  Anders Carlsson  <andersca@apple.com>
1584
1585         Provide an API to run sandboxed plug-ins outside of their sandbox
1586         https://bugs.webkit.org/show_bug.cgi?id=116578
1587
1588         Reviewed by Andreas Kling.
1589
1590         * Platform/CoreIPC/HandleMessage.h:
1591         (CoreIPC::callMemberFunction):
1592         Add new overload.
1593
1594         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1595         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
1596         Handle "disable-sandbox".
1597
1598         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1599         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
1600         Handle "disable-sandbox".
1601         
1602         * PluginProcess/PluginProcess.h:
1603         Move Type to PluginProcessAttributes and remove hash traits for type.
1604         
1605         * PluginProcess/mac/PluginProcessMac.mm:
1606         (WebKit::PluginProcess::platformInitializePluginProcess):
1607         Update for new type name.
1608
1609         (WebKit::PluginProcess::initializeSandbox):
1610         Return early if the sandbox is disabled.
1611
1612         * Shared/Plugins/Netscape/PluginInformation.cpp:
1613         (WebKit::getPluginModuleInformation):
1614         PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.
1615
1616         * Shared/Plugins/PluginModuleInfo.h:
1617         Add PluginModuleLoadUnsandboxed.
1618
1619         * Shared/Plugins/PluginProcessAttributes.h: Added.
1620         Add new header with various plug-in process attributes.
1621
1622         * Shared/Plugins/PluginProcessCreationParameters.h:
1623         Change type enum.
1624
1625         * UIProcess/API/C/WKAPICast.h:
1626         (WebKit::toWKPluginLoadPolicy):
1627         (WebKit::toPluginModuleLoadPolicy):
1628         Handle the unsandboxed enum.
1629
1630         * UIProcess/API/C/WKPage.h:
1631         Add kWKPluginLoadPolicyLoadUnsandboxed.
1632
1633         * UIProcess/Plugins/PluginInfoStore.h:
1634         Rename policyForPlugin to defaultLoadPolicyForPlugin.
1635
1636         * UIProcess/Plugins/PluginProcessManager.cpp:
1637         (WebKit::PluginProcessManager::pluginProcessToken):
1638         Add new helper function for getting a token given plug-in attributes.
1639
1640         (WebKit::PluginProcessManager::getPluginProcessConnection):
1641         This now takes a pluginProcessToken.
1642
1643         (WebKit::PluginProcessManager::getSitesWithData):
1644         Make sure to call pluginProcessToken.
1645
1646         (WebKit::PluginProcessManager::clearSiteData):
1647         Ditto.
1648
1649         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
1650         This now takes a token.
1651
1652         * UIProcess/Plugins/PluginProcessProxy.cpp:
1653         (WebKit::PluginProcessProxy::create):
1654         (WebKit::PluginProcessProxy::PluginProcessProxy):
1655         Pass the PluginProcessAttributes as well as the plug-in process token.
1656
1657         (WebKit::PluginProcessProxy::getLaunchOptions):
1658         Pass the plug-in process attributes to platformGetLaunchOptions.
1659
1660         (WebKit::PluginProcessProxy::didClose):
1661         Pass the token to PluginProcessCrashed.
1662
1663         (WebKit::PluginProcessProxy::didFinishLaunching):
1664         Update for type change.
1665
1666         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1667         (WebKit::shouldBlockPlugin):
1668         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
1669         Rename policyForPlugin to defaultLoadPolicyForPlugin.
1670
1671         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1672         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1673         Set the "disable-sandbox" data if needed.
1674
1675         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1676         (WebKit::PluginProcessProxy::openPluginPreferencePane):
1677         Get the module info from m_pluginProcessAttributes.
1678
1679         * UIProcess/WebPageProxy.cpp:
1680         (WebKit::WebPageProxy::findPlugin):
1681         This now returns a token.
1682
1683         * UIProcess/WebPageProxy.messages.in:
1684         FindPlugin now returns a token instead of the path.
1685
1686         * UIProcess/WebProcessProxy.cpp:
1687         (WebKit::WebProcessProxy::getPluginProcessConnection):
1688         Pass the token to the plug-in process manager.
1689
1690         * UIProcess/WebProcessProxy.messages.in:
1691         This now takes a token.
1692
1693         * WebKit2.xcodeproj/project.pbxproj:
1694         Add new files.
1695
1696         * WebProcess/Plugins/PluginProcessConnection.cpp:
1697         (WebKit::PluginProcessConnection::PluginProcessConnection):
1698         This now takes a token.
1699
1700         * WebProcess/Plugins/PluginProcessConnection.h:
1701         (WebKit::PluginProcessConnection::create):
1702         (WebKit::PluginProcessConnection::pluginProcessToken):
1703         Create this with a token instead of a path and process type.
1704
1705         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1706         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1707         This now takes a token.
1708
1709         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
1710         Ditto.
1711
1712         * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
1713         PluginProcessCrashed now takes a token.
1714
1715         * WebProcess/Plugins/PluginProxy.cpp:
1716         (WebKit::PluginProxy::create):
1717         (WebKit::PluginProxy::PluginProxy):
1718         These now take tokens.
1719
1720         (WebKit::PluginProxy::initialize):
1721         Pass the token when getting the connection.
1722
1723         * WebProcess/WebPage/WebPage.cpp:
1724         (WebKit::WebPage::createPlugin):
1725         Get the token from the UI process and pass it to the PluginProxy.
1726
1727         (WebKit::WebPage::canPluginHandleResponse):
1728         Update now that FindPlugin returns a token.
1729
1730 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
1731
1732         [GTK] [CMake] Add support for building WebKit2
1733         https://bugs.webkit.org/show_bug.cgi?id=116372
1734
1735         Reviewed by Gustavo Noronha Silva.
1736
1737         * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
1738         from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
1739         dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
1740         installed header step.
1741         * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
1742         list. Fix up forwarding header dependencies now.
1743         * PlatformGTK.cmake: Added.
1744         * config.h: First check whether this is a CMake build and then fall back to the autotools header.
1745
1746 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
1747
1748         [GTK] Compile everything in C++11 mode
1749         https://bugs.webkit.org/show_bug.cgi?id=116452
1750
1751         Reviewed by Anders Carlsson.
1752
1753         * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified
1754         by default for all the C++ source code in SetupCompilerFlags.m4.
1755
1756 2013-05-21  Jessie Berlin  <jberlin@apple.com>
1757
1758         Expose a way to know when forms are added to a page or when form controls are added to a form
1759         in the injected bundle
1760         https://bugs.webkit.org/show_bug.cgi?id=116334
1761
1762         Reviewed by Alexey Proskuryakov.
1763
1764         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
1765
1766         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1767         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
1768
1769         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1770         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1771         Pass the message along to the client if the client has a handler.
1772         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
1773         Ditto.
1774         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1775
1776         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1777         (WebKit::WebChromeClient::didAssociateFormControls):
1778         Tell the injected bundle form client for the page.
1779         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
1780         Ditto.
1781         * WebProcess/WebCoreSupport/WebChromeClient.h:
1782
1783 2013-05-21  Michael Brüning  <michael.bruning@digia.com>
1784
1785         [Qt][WK2] Fix Mountain Lion builds after r150277.
1786         https://bugs.webkit.org/show_bug.cgi?id=116467
1787
1788         Reviewed by Jocelyn Turcotte.
1789
1790         * Shared/API/c/WKBase.h:
1791
1792 2013-05-20  Lucas Forschler  <lforschler@apple.com>
1793
1794     Rollout r150398.
1795
1796 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1797
1798         [GTK] Fix concatenations of string literals that are not C++11-compliant
1799         https://bugs.webkit.org/show_bug.cgi?id=116449
1800
1801         Reviewed by Martin Robinson.
1802
1803         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
1804         is simply a matter of separating the string and the string literal that are being concatenated with a space.
1805
1806         * UIProcess/API/gtk/tests/TestPrinting.cpp:
1807         (testPrintOperationPrint):
1808         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1809         (methodCallCallback):
1810
1811 2013-05-20  Commit Queue  <commit-queue@webkit.org>
1812
1813         Unreviewed, rolling out r150384.
1814         http://trac.webkit.org/changeset/150384
1815         https://bugs.webkit.org/show_bug.cgi?id=116513
1816
1817         Not ready for primetime. (Requested by kling on #webkit).
1818
1819         * UIProcess/WebProcessProxy.cpp:
1820         (WebKit::WebProcessProxy::WebProcessProxy):
1821         (WebKit::WebProcessProxy::removeWebPage):
1822         * UIProcess/WebProcessProxy.h:
1823         (WebProcessProxy):
1824
1825 2013-05-20  Martin Robinson  <mrobinson@igalia.com>
1826
1827         Remove SharedMemoryGtk.cpp
1828         https://bugs.webkit.org/show_bug.cgi?id=116457
1829
1830         Reviewed by Andreas Kling.
1831
1832         * Platform/gtk/SharedMemoryGtk.cpp: Removed.
1833
1834 2013-05-20  Jessie Berlin  <jberlin@apple.com>
1835
1836         Expose a way to know when forms are added to a page or when form controls are added to a form
1837         in the injected bundle
1838         https://bugs.webkit.org/show_bug.cgi?id=116334
1839
1840         Reviewed by Alexey Proskuryakov.
1841
1842         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
1843
1844         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1845         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
1846
1847         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1848         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1849         Pass the message along to the client if the client has a handler.
1850         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
1851         Ditto.
1852         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1853
1854         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1855         (WebKit::WebChromeClient::didAssociateFormControls):
1856         Tell the injected bundle form client for the page.
1857         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
1858         Ditto.
1859         * WebProcess/WebCoreSupport/WebChromeClient.h:
1860
1861 2013-05-20  Tim Horton  <timothy_horton@apple.com>
1862
1863         Clients should have a way to extend rendering suppression
1864         https://bugs.webkit.org/show_bug.cgi?id=116463
1865         <rdar://problem/13738496>
1866
1867         Reviewed by Andy Estes.
1868
1869         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1870         (WKBundlePageExtendIncrementalRenderingSuppression): Added.
1871         (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added.
1872         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1873         These only have any effect if SuppressesIncrementalRendering is also enabled.
1874
1875         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1876         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1877         Inform the FrameView if there are any outstanding rendering suppression tokens.
1878
1879         * WebProcess/WebPage/WebPage.cpp:
1880         (WebKit::WebPage::WebPage):
1881         (WebKit::WebPage::extendIncrementalRenderingSuppression):
1882         Return the next available rendering suppression token.
1883         Add it to the list of active tokens.
1884         Inform the FrameView that we want to suppress rendering.
1885
1886         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression):
1887         Remove the given token from the list of active tokens.
1888         Un-suppress rendering if appropriate.
1889
1890         * WebProcess/WebPage/WebPage.h:
1891         (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
1892         Return if there are any active rendering suppression tokens.
1893
1894 2013-05-20  Andreas Kling  <akling@apple.com>
1895
1896         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
1897         <http://webkit.org/b/116464>
1898         <rdar://problem/10103795>
1899
1900         Reviewed by Anders Carlsson.
1901
1902         Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it.
1903         This code only runs if there was something on the page (e.g an unload/beforeunload event handler)
1904         preventing the UI process from killing it right away.
1905
1906         * UIProcess/WebProcessProxy.cpp:
1907         (WebKit::WebProcessProxy::WebProcessProxy):
1908         (WebKit::WebProcessProxy::removeWebPage):
1909         (WebKit::WebProcessProxy::forcefulTerminationTimerFired):
1910         * UIProcess/WebProcessProxy.h:
1911         (WebProcessProxy):
1912
1913 2013-05-20  Anders Carlsson  <andersca@apple.com>
1914
1915         Add helper function for converting a KeyedCodingValue to a CFTypeRef
1916         https://bugs.webkit.org/show_bug.cgi?id=116461
1917
1918         Reviewed by Tim Horton.
1919
1920         * Shared/cf/KeyedCodingValueCF.cpp: Added.
1921         * Shared/cf/KeyedCodingValueCF.h: Added.
1922
1923         * WebKit2.xcodeproj/project.pbxproj:
1924
1925 2013-05-20  Anders Carlsson  <andersca@apple.com>
1926
1927         Begin stubbing out a new KeyedEncoder class
1928         https://bugs.webkit.org/show_bug.cgi?id=116456
1929
1930         Reviewed by Sam Weinig.
1931
1932         This class (and it's coming counterpart, KeyedDecoder) will be used for serializing
1933         object graphs to a tree-like structure of dictionaries. It is up to individual ports to
1934         serialize them further (for example, on Mac they could be serialized to CFPropertyList objects).
1935         
1936         This will be used for serializing session storage state but I hope that it can be used for serializing
1937         back forward state in the future as our current implementation of back forward state serialization
1938         is fragile and depends on our IPC layer's binary encoding(!).
1939         
1940         * Shared/KeyedCodingValue.h: Added.
1941         * Shared/KeyedEncoder.cpp: Added.
1942         * Shared/KeyedEncoder.h: Added.
1943
1944         * WebKit2.xcodeproj/project.pbxproj:
1945
1946 2013-05-19  Sam Weinig  <sam@webkit.org>
1947
1948         Bump WKBundlePageLoaderClient version number so as not to break some clients
1949         https://bugs.webkit.org/show_bug.cgi?id=116426
1950
1951         Reviewed by Anders Carlsson.
1952
1953         * Shared/APIClientTraits.cpp:
1954         (WebKit):
1955         * Shared/APIClientTraits.h:
1956         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1957
1958 2013-05-19  Anders Carlsson  <andersca@apple.com>
1959
1960         Remove link prerendering code
1961         https://bugs.webkit.org/show_bug.cgi?id=116415
1962
1963         Reviewed by Darin Adler.
1964
1965         This code was only used by Chromium and is dead now.
1966
1967         * Configurations/FeatureDefines.xcconfig:
1968
1969 2013-05-18  Anders Carlsson  <andersca@apple.com>
1970
1971         Simplify the StorageArea setter functions
1972         https://bugs.webkit.org/show_bug.cgi?id=116402
1973
1974         Reviewed by Sam Weinig.
1975
1976         Remove security checking code that lives in Storage now.
1977
1978         * WebProcess/Storage/StorageAreaImpl.cpp:
1979         (WebKit::StorageAreaImpl::setItem):
1980         (WebKit::StorageAreaImpl::removeItem):
1981         (WebKit::StorageAreaImpl::clear):
1982         * WebProcess/Storage/StorageAreaImpl.h:
1983
1984 2013-05-18  Sam Weinig  <sam@webkit.org>
1985
1986         Fix some builds.
1987
1988         * UIProcess/API/mac/WKTypeRefWrapper.mm:
1989
1990 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1991
1992         REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled
1993         https://bugs.webkit.org/show_bug.cgi?id=116389
1994
1995         Reviewed by Martin Robinson.
1996
1997         There's no longer WebKeyValueStorageManager in the web process
1998         after r150305.
1999
2000         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2001         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
2002
2003 2013-05-17  Sam Weinig  <sam@webkit.org>
2004
2005         Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages
2006         https://bugs.webkit.org/show_bug.cgi?id=116345
2007
2008         Reviewed by Anders Carlsson.
2009
2010         In order to efficiently send a WKImageRef to another process when using the
2011         Objective-C WKConnection (or other user data messages), we need a way to encode
2012         WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper.
2013
2014         * Shared/mac/ObjCObjectGraphCoders.mm:
2015         (WebKit::typeFromObject):
2016         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
2017         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
2018         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
2019         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
2020         * UIProcess/API/mac/WKTypeRefWrapper.h: Added.
2021         * UIProcess/API/mac/WKTypeRefWrapper.mm: Added.
2022         (-[WKTypeRefWrapper initWithObject:]):
2023         (-[WKTypeRefWrapper object]):
2024         * WebKit2.xcodeproj/project.pbxproj:
2025
2026 2013-05-18  Anders Carlsson  <andersca@apple.com>
2027
2028         Simplify StorageArea getter functions
2029         https://bugs.webkit.org/show_bug.cgi?id=116399
2030
2031         Reviewed by Sam Weinig.
2032
2033         Remove security and private browsing checks.
2034
2035         * WebProcess/Storage/StorageAreaImpl.cpp:
2036         (WebKit::StorageAreaImpl::key):
2037         (WebKit::StorageAreaImpl::item):
2038         (WebKit::StorageAreaImpl::contains):
2039         * WebProcess/Storage/StorageAreaImpl.h:
2040
2041 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
2042
2043         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
2044         https://bugs.webkit.org/show_bug.cgi?id=114554
2045
2046         Reviewed by Gyuyoung Kim.
2047
2048         Using variables as target names is very uncommon in CMake.
2049         The usual way to specify the name of the resulting binary
2050         is to set the OUTPUT_NAME target property.
2051
2052         * CMakeLists.txt:
2053         * PlatformEfl.cmake:
2054         * efl/ewebkit2.pc.in:
2055
2056 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2057
2058         [GTK] Move GTK port off legacy clipboard
2059         https://bugs.webkit.org/show_bug.cgi?id=116221
2060
2061         Reviewed by Martin Robinson.
2062
2063         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h
2064         include.
2065         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2066         (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the
2067         Pasteboard associated to the given Clipboard.
2068
2069 2013-05-18  Jinwoo Song  <jinwoo7.song@samsung.com>
2070
2071         [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API
2072         https://bugs.webkit.org/show_bug.cgi?id=116386
2073
2074         Reviewed by Christophe Dumez.
2075
2076         Refactor the API to handle 'const char*' parameter in right way and
2077         enable the unit test which was disabled in r136230 as there is no assertion now.
2078
2079         * UIProcess/API/efl/EwkView.cpp:
2080         (EwkView::setCustomTextEncodingName):
2081         * UIProcess/API/efl/EwkView.h:
2082         (EwkView::customTextEncodingName):
2083         (EwkView):
2084         * UIProcess/API/efl/ewk_view.cpp:
2085         (ewk_view_custom_encoding_set):
2086         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2087         (TEST_F):
2088
2089 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
2090
2091         [CMake] Unreviewed speculative build fix after r150305 and r150306.
2092
2093         * CMakeLists.txt:
2094
2095 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
2096
2097         [Qt][WK2] Unreviewed build fix after r150305 and r150306.
2098
2099         * DerivedSources.pri:
2100         * Target.pri:
2101
2102 2013-05-18  Zan Dobersek  <zdobersek@igalia.com>
2103
2104         Unreviewed build fix for the GTK port after r150305 and r150306.
2105
2106         * GNUmakefile.list.am:
2107
2108 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2109
2110         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
2111         https://bugs.webkit.org/show_bug.cgi?id=116359
2112
2113         The condition was accidentally negated, fixing.
2114
2115         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2116         (WebKit::WebPlatformStrategies::isAvailable):
2117
2118 2013-05-17  Gavin Barraclough  <barraclough@apple.com>
2119
2120         Only allow 1 WebProcess to hold a PageCache
2121         https://bugs.webkit.org/show_bug.cgi?id=116368
2122         <rdar://problem/13392600>
2123
2124         Reviewed by Geoff Garen & Anders Carlson.
2125
2126         * UIProcess/WebContext.cpp:
2127         (WebKit::WebContext::WebContext):
2128         (WebKit::WebContext::processDidSaveToPageCache):
2129         (WebKit):
2130         (WebKit::WebContext::disconnectProcess):
2131         * UIProcess/WebContext.h:
2132             - Added m_processWithPageCache, only allow one process to keep a PageCache.
2133         (WebContext):
2134         * UIProcess/WebPageProxy.cpp:
2135         (WebKit::WebPageProxy::didSaveToPageCache):
2136         (WebKit):
2137         * UIProcess/WebPageProxy.h:
2138         (WebPageProxy):
2139         * UIProcess/WebPageProxy.messages.in:
2140             - Forward didSaveToPageCache to the WebProcessProxy.
2141         * UIProcess/WebProcessProxy.cpp:
2142         (WebKit::WebProcessProxy::addBackForwardItem):
2143         (WebKit::WebProcessProxy::didSaveToPageCache):
2144         (WebKit):
2145         (WebKit::WebProcessProxy::releasePageCache):
2146             - Forward releasePageCache to the WebProcess.
2147             - Forward didSaveToPageCache to the WebContext.
2148         * UIProcess/WebProcessProxy.h:
2149         (WebProcessProxy):
2150         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2151         (WebKit::WebFrameLoaderClient::didSaveToPageCache):
2152             - Forward didSaveToPageCache to the WebPageProxy.
2153         * WebProcess/WebProcess.cpp:
2154         (WebKit::WebProcess::releasePageCache):
2155         (WebKit):
2156         * WebProcess/WebProcess.h:
2157         (WebProcess):
2158         * WebProcess/WebProcess.messages.in:
2159             - Added 'ReleasePageCache' to instruct a web process to drop any cached pages.
2160
2161 2013-05-17  Anders Carlsson  <andersca@apple.com>
2162
2163         Share code between WebKit1 and WebKit2 StorageArea subclasses
2164         https://bugs.webkit.org/show_bug.cgi?id=116367
2165
2166         Reviewed by Andreas Kling.
2167
2168         * WebProcess/Storage/StorageAreaImpl.cpp:
2169         (WebKit::StorageAreaImpl::length):
2170         Remove code that's now in Storage::length.
2171
2172         (WebKit::StorageAreaImpl::storageType):
2173         Make this a virtual member function.
2174
2175         * WebProcess/Storage/StorageAreaImpl.h:
2176
2177 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2178
2179         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
2180         https://bugs.webkit.org/show_bug.cgi?id=116359
2181
2182         Reviewed by Anders Carlsson.
2183
2184         Implement SharedWorkerStrategy::isAvailable.
2185
2186         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2187         (WebKit::WebPlatformStrategies::isAvailable):
2188         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2189
2190 2013-05-17  Beth Dakin  <bdakin@apple.com>
2191
2192         Headers and footers will sometimes disappear and re-appear during page loads
2193         https://bugs.webkit.org/show_bug.cgi?id=116336
2194         -and corresponding-
2195         <rdar://problem/13886753>
2196
2197         Reviewed by Simon Fraser.
2198
2199         This patch changes the WebCore-level API that WebKit uses to create a banner. 
2200         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
2201         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
2202         layer has been created, it will call back into WK2 via ChromeClient. This will 
2203         allow WebCore to re-create the header/footer layers as needed whenever the 
2204         FrameView/RenderLayerCompositor have been destroyed and recreated.
2205
2206         Send the layers over to PageBanner.
2207         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2208         (WebKit::WebChromeClient::didAddHeaderLayer):
2209         (WebKit::WebChromeClient::didAddFooterLayer):
2210         * WebProcess/WebCoreSupport/WebChromeClient.h:
2211         (WebChromeClient):
2212
2213         PageBanner::addToPage() now does much less work since it can’t get the parent 
2214         layer right away. The work that is used to do once it had the parent layer is now 
2215         performed in didAddParentLayer()
2216         * WebProcess/WebPage/PageBanner.cpp:
2217         (WebKit::PageBanner::didAddParentLayer):
2218         * WebProcess/WebPage/PageBanner.h:
2219         * WebProcess/WebPage/mac/PageBannerMac.mm:
2220         (WebKit::PageBanner::addToPage):
2221         (WebKit::PageBanner::didAddParentLayer):
2222
2223 2013-05-17  Anders Carlsson  <andersca@apple.com>
2224
2225         Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager
2226         https://bugs.webkit.org/show_bug.cgi?id=116361
2227
2228         Reviewed by Andreas Kling.
2229
2230         There's nothing proxy about this class anymore!
2231
2232         * UIProcess/API/C/WKAPICast.h:
2233         * UIProcess/API/C/WKContext.cpp:
2234         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2235         * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp.
2236         * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h.
2237         * WebKit2.xcodeproj/project.pbxproj:
2238
2239 2013-05-17  Anders Carlsson  <andersca@apple.com>
2240
2241         Remove dead local storage code
2242         https://bugs.webkit.org/show_bug.cgi?id=116360
2243
2244         Reviewed by Beth Dakin.
2245
2246         Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process.
2247
2248         * DerivedSources.make:
2249         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
2250         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
2251         (WebKit):
2252         (WebKit::didGetKeyValueStorageOrigins):
2253         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
2254         * UIProcess/WebKeyValueStorageManagerProxy.h:
2255         (WebKeyValueStorageManagerProxy):
2256         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed.
2257         * WebKit2.xcodeproj/project.pbxproj:
2258         * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed.
2259         * WebProcess/Storage/WebKeyValueStorageManager.h: Removed.
2260         * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed.
2261         * WebProcess/WebPage/WebPage.cpp:
2262         (WebKit::WebPage::updatePreferences):
2263         * WebProcess/WebProcess.cpp:
2264         (WebKit::WebProcess::WebProcess):
2265
2266 2013-05-17  Anders Carlsson  <andersca@apple.com>
2267
2268         Use the UI process storage manager for deleting local storage data
2269         https://bugs.webkit.org/show_bug.cgi?id=116358
2270         <rdar://problem/13852829>
2271
2272         Reviewed by Andreas Kling.
2273
2274         * Shared/WebSecurityOrigin.h:
2275         (WebKit::WebSecurityOrigin::protocol):
2276         (WebKit::WebSecurityOrigin::host):
2277         (WebKit::WebSecurityOrigin::databaseIdentifier):
2278         (WebKit::WebSecurityOrigin::toString):
2279         Remove unneeded consts.
2280
2281         (WebKit::WebSecurityOrigin::securityOrigin):
2282         Add getter.
2283
2284         * UIProcess/Storage/LocalStorageDatabase.cpp:
2285         (WebKit::LocalStorageDatabase::close):
2286         deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin.
2287
2288         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2289         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
2290         Rename since this is no longer used only for empty databases.
2291
2292         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
2293         Loop over the tracker database and delete all database files.
2294
2295         * UIProcess/Storage/StorageManager.cpp:
2296         (WebKit::StorageManager::StorageArea::clear):
2297         Clear the map, close the database and tell all event listeners to reset their caches.
2298
2299         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
2300         Loop over all storage areas and call clear on those matching the security origin.
2301
2302         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
2303         Loop over all storage areas and call clear on them.
2304         
2305         (WebKit::StorageManager::deleteEntriesForOrigin):
2306         Dispatch deleteEntriesForOriginInternal on the work queue.
2307
2308         (WebKit::StorageManager::deleteAllEntries):
2309         Dispatch deleteAllEntriesInternal on the work queue.
2310
2311         (WebKit::StorageManager::deleteEntriesForOriginInternal):
2312         Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database.
2313
2314         (WebKit::StorageManager::deleteAllEntriesInternal):
2315         Call clearAllStorageAreas on all local storage namespaces and then delete all databases.
2316
2317         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
2318         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
2319         Call out to the storage manager.
2320
2321         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
2322         Ditto.
2323
2324         * WebProcess/Storage/StorageAreaMap.cpp:
2325         (WebKit::StorageAreaMap::clearCache):
2326         Call resetValues which will null out the storage map.
2327
2328         * WebProcess/Storage/StorageAreaMap.messages.in:
2329         Add ClearCache message.
2330
2331 2013-05-17  Anders Carlsson  <andersca@apple.com>
2332
2333         Only import local storage items from the database once
2334         https://bugs.webkit.org/show_bug.cgi?id=116354
2335
2336         Reviewed by Andreas Kling.
2337
2338         We import items from the database over and over, when we only want to do it once. Use a 
2339         boolean flag to guard against doing it more than once. 
2340         
2341         Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now
2342         also opens the database (even if it doesn't need to import anything). This is preparation for an
2343         upcoming patch where the database will be closed when it's cleared.
2344
2345         * UIProcess/Storage/StorageManager.cpp:
2346         (StorageManager::StorageArea):
2347         (WebKit::StorageManager::StorageArea::StorageArea):
2348         (WebKit::StorageManager::StorageArea::setItem):
2349         (WebKit::StorageManager::StorageArea::removeItem):
2350         (WebKit::StorageManager::StorageArea::clear):
2351         (WebKit::StorageManager::StorageArea::items):
2352         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
2353
2354 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2355
2356         <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID.
2357
2358         Reviewed by Anders Carlsson.
2359
2360         * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories.
2361
2362 2013-05-17  Anders Carlsson  <andersca@apple.com>
2363
2364         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
2365         https://bugs.webkit.org/show_bug.cgi?id=116346
2366         <rdar://problem/13852829>
2367
2368         Reviewed by Andreas Kling.
2369
2370         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2371         (WebKit::LocalStorageDatabaseTracker::origins):
2372         New helper function to return all the tracked origins.
2373
2374         * UIProcess/Storage/StorageManager.cpp:
2375         (WebKit::StorageManager::StorageManager):
2376         Initialize the UTF-8 encoding.
2377
2378         (WebKit::StorageManager::getOrigins):
2379         Call getOriginsInternal on our queue.
2380
2381         (WebKit::callCallbackFunction):
2382         Helper function for calling the callback function.
2383
2384         (WebKit::StorageManager::getOriginsInternal):
2385         Get the origins and make sure we call the callback with the given function dispatcher.
2386
2387         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
2388         (WebKit::didGetKeyValueStorageOriginsCallback):
2389         Construct the array of WebSecurityOrigin objects and call the callback.
2390
2391         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
2392         Call StorageManager::getOrigins.
2393
2394 2013-05-16  Alexey Proskuryakov  <ap@apple.com>
2395
2396         Text input is largely broken when there are subframes loading
2397         http://bugs.webkit.org/show_bug.cgi?id=59121
2398         <rdar://problem/9320468>
2399
2400         Reviewed by Darin Adler.
2401
2402         * UIProcess/PageClient.h:
2403         * UIProcess/API/mac/PageClientImpl.h:
2404         * UIProcess/API/mac/PageClientImpl.mm:
2405         (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state
2406         updating into a separate function. Removed updateTextInputState, we don't need
2407         to go through PageClient to implement its behavior at all.
2408         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME.
2409
2410         * UIProcess/API/mac/WKView.mm:
2411         * UIProcess/API/mac/WKViewInternal.h:
2412         Removed _updateTextInputStateIncludingSecureInputState.
2413
2414         * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps
2415         to figure out that WebCore decided to close a composition. The issue is that WebCore
2416         would first send an EditorState with hasComposition set to false, and with
2417         shouldIgnoreCompositionSelectionChange set to true, at which time we forget the
2418         previous m_editorState, but can't make any decisions based on this transient state.
2419         We should find a way to simplify this (maybe not send these updates with
2420         shouldIgnoreCompositionSelectionChange at all?)
2421
2422         * UIProcess/WebPageProxy.cpp:
2423         (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition.
2424         (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition
2425         when any frame commits a load, which made no sense (along with surrounding code,
2426         which will unfortunately survive longer).
2427         (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here,
2428         we don't need to go to WKView.mm to implement this logic. Figure out when WebCore
2429         discards a composition, and notify input methods about this.
2430         (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition.
2431         Added some FIXMEs.
2432
2433 2013-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
2434
2435         [WK2] Add support for selectTrailingWhitespaceEnabled setting
2436         https://bugs.webkit.org/show_bug.cgi?id=112426
2437
2438         Reviewed by Ryosuke Niwa.
2439
2440         * Shared/WebPreferencesStore.h:
2441         (WebKit): Add macro for selectTrailingWhitespaceEnabled.
2442         * UIProcess/API/C/WKPreferences.cpp:
2443         (WKPreferencesSetSelectTrailingWhitespaceEnabled):
2444         (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods
2445         using the new setting.
2446         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
2447         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2448         (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement
2449         method delegating in WebPage.
2450         * WebProcess/WebPage/WebPage.cpp:
2451         (WebKit::WebPage::updatePreferences): Set
2452         selectTrailingWhitespaceEnabled setting.
2453         (WebKit::WebPage::setSmartInsertDeleteEnabled): Set
2454         selectTrailingWhitespaceEnabled as they are mutually exclusive.
2455         (WebKit):
2456         (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method
2457         using settings.
2458         (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method
2459         using settings and set smartInsertDeleteEnabled as they are mutually
2460         exclusive.
2461         * WebProcess/WebPage/WebPage.h:
2462         (WebPage): Add new methods headers.
2463
2464 2013-05-17  Brady Eidson  <beidson@apple.com>
2465
2466         Fix crash introduced by http://trac.webkit.org/changeset/150282
2467         Followup to https://bugs.webkit.org/show_bug.cgi?id=116253
2468
2469         Reviewed by Andreas Kling.
2470
2471         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2472         (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null.
2473
2474 2013-05-17  Brady Eidson  <beidson@apple.com>
2475
2476         Replace WebFrameLoaderClient static_casts with a function that might return null.
2477         https://bugs.webkit.org/show_bug.cgi?id=116253
2478
2479         The general approach here is:
2480         1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null.
2481         2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*>
2482         3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0.
2483         4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT.
2484
2485         Reviewed by Alexey Proskuryakov.
2486
2487         Add the utility function to cast:
2488         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2489         (WebKit::toWebFrameLoaderClient):
2490
2491         Adopt it everywhere:
2492         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2493         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2494
2495         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2496         (WebKit::InjectedBundleNodeHandle::documentFrame):
2497         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
2498         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
2499
2500         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2501         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2502
2503         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2504         (WebKit::InjectedBundleDOMWindowExtension::frame):
2505
2506         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2507         (WebKit::InjectedBundleHitTestResult::frame):
2508         (WebKit::InjectedBundleHitTestResult::targetFrame):
2509
2510         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2511         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2512
2513         * WebProcess/Plugins/PluginView.cpp:
2514         (WebKit::webPage):
2515         (WebKit::PluginView::performFrameLoadURLRequest):
2516
2517         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2518         (WebKit::WebChromeClient::focusedNodeChanged):
2519         (WebKit::WebChromeClient::focusedFrameChanged):
2520         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2521         (WebKit::WebChromeClient::runJavaScriptAlert):
2522         (WebKit::WebChromeClient::runJavaScriptConfirm):
2523         (WebKit::WebChromeClient::runJavaScriptPrompt):
2524         (WebKit::WebChromeClient::print):
2525         (WebKit::WebChromeClient::exceededDatabaseQuota):
2526         (WebKit::WebChromeClient::runOpenPanel):
2527
2528         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2529         (WebKit::WebEditorClient::textFieldDidBeginEditing):
2530         (WebKit::WebEditorClient::textFieldDidEndEditing):
2531         (WebKit::WebEditorClient::textDidChangeInTextField):
2532         (WebKit::WebEditorClient::textDidChangeInTextArea):
2533         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
2534         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
2535
2536         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2537         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
2538         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2539
2540         * WebProcess/WebPage/WebFrame.cpp:
2541         (WebKit::WebFrame::contentsAsString):
2542         (WebKit::WebFrame::parentFrame):
2543         (WebKit::WebFrame::childFrames):
2544         (WebKit::WebFrame::frameForContext):
2545         (WebKit::WebFrameFilter::shouldIncludeSubframe):
2546
2547         * WebProcess/WebPage/WebPage.cpp:
2548         (WebKit::WebPage::mainFrameHasCustomRepresentation):
2549
2550 2013-05-17  Sam Weinig  <sam@webkit.org>
2551
2552         Expose new load-with-userData API to Objective-C
2553         https://bugs.webkit.org/show_bug.cgi?id=116335
2554
2555         Reviewed by Anders Carlsson.
2556
2557         - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
2558           loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
2559         - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
2560           in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.
2561
2562         * Shared/API/c/WKBase.h:
2563         * Shared/API/c/WKSharedAPICast.h:
2564         * Shared/API/c/mac/WKBaseMac.h: Added.
2565         * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
2566         * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
2567         (WKObjCTypeWrapperGetTypeID):
2568         (WKObjCTypeWrapperCreate):
2569         (WKObjCTypeWrapperGetObject):
2570         * UIProcess/API/mac/WKBrowsingContextController.h:
2571         * UIProcess/API/mac/WKBrowsingContextController.mm:
2572         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
2573         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
2574         (-[WKBrowsingContextController loadRequest:]):
2575         (-[WKBrowsingContextController loadRequest:userData:]):
2576         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
2577         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
2578         (-[WKBrowsingContextController loadHTMLString:baseURL:]):
2579         (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
2580         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
2581         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
2582         * WebKit2.xcodeproj/project.pbxproj:
2583
2584 2013-05-17  Sam Weinig  <sam@webkit.org>
2585
2586         Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
2587         https://bugs.webkit.org/show_bug.cgi?id=116325
2588
2589         Reviewed by Simon Fraser.
2590
2591         * UIProcess/API/C/WKPage.cpp:
2592         (WKPageLoadData):
2593         (WKPageLoadDataWithUserData):
2594         Add new SPI.
2595
2596         * UIProcess/API/C/WKPage.h:
2597         * UIProcess/WebPageProxy.cpp:
2598         (WebKit::WebPageProxy::loadData):
2599         * UIProcess/WebPageProxy.h:
2600         Pipe through to the WebProcess.
2601
2602         * WebProcess/WebPage/WebPage.h:
2603         * WebProcess/WebPage/WebPage.messages.in:
2604         * WebProcess/WebPage/WebPage.cpp:
2605         (WebKit::WebPage::loadDataImpl):
2606         (WebKit::WebPage::loadData):
2607         (WebKit::WebPage::loadHTMLString):
2608         (WebKit::WebPage::loadAlternateHTMLString):
2609         (WebKit::WebPage::loadPlainTextString):
2610         (WebKit::WebPage::loadWebArchiveData):
2611         Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
2612         from IPC magic.
2613
2614
2615 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2616
2617         [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
2618         https://bugs.webkit.org/show_bug.cgi?id=116321
2619
2620         Reviewed by Christophe Dumez.
2621
2622         During sub menu creation, after initializing m_parentMenu, parentMenu
2623         pointer became null which may cause segfaults. This patch fixes it by
2624         using m_parentMenu.
2625
2626         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2627         (EwkContextMenuItem::EwkContextMenuItem):
2628
2629 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2630
2631         [EFL][WK2] Support sub menu in ewk context menus
2632         https://bugs.webkit.org/show_bug.cgi?id=114729
2633
2634         Reviewed by Christophe Dumez.
2635
2636         Added submenu support in EwkContextMenu and an API function to receive
2637         Ewk_Context_Menu from submenu context menu item. A test case was added
2638         for new API function.
2639         EwkContextMenu is now an EwkObject allowing multiple instances of submenu
2640         to be used in different submenu type context menu items.
2641
2642         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2643         (EwkContextMenuItem::EwkContextMenuItem):
2644         (ewk_context_menu_item_new):
2645         (ewk_context_menu_item_parent_menu_get):
2646         (ewk_context_menu_item_submenu_get):
2647         * UIProcess/API/efl/ewk_context_menu_item.h:
2648         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2649         (EwkContextMenuItem::create):
2650         (EwkContextMenuItem::parentMenu):
2651         (EwkContextMenuItem::subMenu):
2652         (EwkContextMenuItem):
2653         * UIProcess/API/efl/ewk_context_menu_private.h:
2654         (EwkContextMenu::ewkView):
2655         (EwkContextMenu):
2656         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
2657         (showContextMenu):
2658
2659 2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>
2660
2661         [Qt] Unreviewed build fix.
2662
2663         Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.
2664
2665         * WebProcess/qt/QtBuiltinBundlePage.cpp:
2666         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2667
2668 2013-05-16  Beth Dakin  <bdakin@apple.com>
2669
2670         Remove WKBundlePageGetHeaderLayer/Footer SPI
2671         https://bugs.webkit.org/show_bug.cgi?id=116254
2672
2673         Reviewed by Benjamin Poulain.
2674
2675         We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
2676         recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.
2677
2678         * WebKit2.xcodeproj/project.pbxproj:
2679         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
2680         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
2681         * WebProcess/WebPage/WebPage.h:
2682         (WebPage):
2683         * WebProcess/WebPage/mac/WebPageMac.mm:
2684         (WebKit):
2685         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
2686
2687 2013-05-14  Sam Weinig  <sam@webkit.org>
2688
2689         Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
2690         https://bugs.webkit.org/show_bug.cgi?id=116132
2691
2692         Reviewed by Anders Carlsson.
2693
2694         Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
2695         willLoadURLRequest and willLoadDataRequest to let the bundle access them.
2696
2697         Adds WebKit2WillLoadTest.* API tests.
2698
2699         * UIProcess/API/C/WKPage.cpp:
2700         (WKPageLoadURLWithUserData):
2701         (WKPageLoadURLRequestWithUserData):
2702         (WKPageLoadFile):
2703         (WKPageLoadFileWithUserData):
2704         (WKPageLoadHTMLStringWithUserData):
2705         (WKPageLoadAlternateHTMLStringWithUserData):
2706         (WKPageLoadPlainTextStringWithUserData):
2707         (WKPageLoadWebArchiveDataWithUserData):
2708         * UIProcess/API/C/WKPage.h:
2709         * UIProcess/WebPageProxy.cpp:
2710         * UIProcess/WebPageProxy.h:
2711         (WebPageProxy):
2712         * WebKit2.xcodeproj/project.pbxproj:
2713         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2714         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2715         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
2716         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
2717         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2718         (WebCore):
2719         (InjectedBundlePageLoaderClient):
2720         * WebProcess/WebPage/WebPage.cpp:
2721         * WebProcess/WebPage/WebPage.h:
2722         * WebProcess/WebPage/WebPage.messages.in:
2723
2724 2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>
2725
2726         [GTK] Fix memory leak in WebKitBackForwardList
2727         https://bugs.webkit.org/show_bug.cgi?id=116222
2728
2729         Reviewed by Carlos Garcia Campos.
2730
2731         Due to the use of leakRef() the ImmutableArray is not being released
2732         automatically. Adding a local variable in the methods to make sure that
2733         the ImmutableArray is freed.
2734
2735         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
2736         (webkit_back_forward_list_get_back_list_with_limit): Add local variable
2737         RefPtr and pass the ImmutableArray to
2738         WebKitBackForwardList::webkitBackForwardListCreateList() using
2739         RefPtr::get().
2740         (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
2741
2742 2013-05-16  Commit Queue  <commit-queue@webkit.org>
2743
2744         Unreviewed, rolling out r150034.
2745         http://trac.webkit.org/changeset/150034
2746         https://bugs.webkit.org/show_bug.cgi?id=116257
2747
2748         This work around doesn't work due to another bug NSUndoManager
2749         has (Requested by rniwa on #webkit).
2750
2751         * UIProcess/API/mac/PageClientImpl.mm:
2752         (WebKit::PageClientImpl::registerEditCommand):
2753
2754 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2755
2756         PDFPlugins don't load when plugins are disabled, but they should
2757         https://bugs.webkit.org/show_bug.cgi?id=75790
2758         <rdar://problem/11650197>
2759
2760         Reviewed by Anders Carlsson.
2761
2762         Support loading "application" plug-ins even if plug-ins are explicitly disabled.
2763
2764         Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
2765         be loaded even if plug-ins are disabled.
2766
2767         * Platform/CoreIPC/HandleMessage.h:
2768         (CoreIPC::callMemberFunction):
2769         Add a 5-argument, 3-reply version of callMemberFunction.
2770
2771         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2772         (WebKit::NetscapePluginModule::getPluginInfo):
2773         NPAPI plug-ins are not application plug-ins.
2774
2775         * Shared/WebCoreArgumentCoders.cpp:
2776         (CoreIPC::::encode):
2777         (CoreIPC::::decode):
2778         Encode/decode the new isApplicationPlugin field on PluginInfo.
2779
2780         * UIProcess/Plugins/PluginInfoStore.cpp:
2781         (WebKit::PluginInfoStore::findPluginForMIMEType):
2782         (WebKit::PluginInfoStore::findPluginForExtension):
2783         (WebKit::PluginInfoStore::findPlugin):
2784         * UIProcess/Plugins/PluginInfoStore.h:
2785         (PluginInfoStore):
2786         Give PluginInfoStore's findPlugin method and its private helper
2787         methods an argument allowing them to only match application plug-ins.
2788
2789         (WebKit::WebPageProxy::findPlugin):
2790         * UIProcess/WebPageProxy.h:
2791         (WebPageProxy):
2792         * UIProcess/WebPageProxy.messages.in:
2793         Add an argument allowing findPlugin to restrict its search to only application plug-ins.
2794
2795         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2796         (WebKit::WebFrameLoaderClient::objectContentType):
2797         Previously, this caller depended on pluginData() returning null if
2798         plug-ins were disabled. Since that is no longer the case, we have to
2799         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
2800
2801         * WebProcess/WebPage/WebPage.cpp:
2802         (WebKit::WebPage::createPlugin):
2803         When going to search for a plug-in, ask subframeLoader whether or not
2804         it's OK to use ordinary non-application plug-ins, and pass that information
2805         on to the UIProcess when performing the search.
2806
2807         (WebKit::WebPage::canPluginHandleResponse): Ditto.
2808         (WebKit::WebPage::canShowMIMEType):
2809         Ensure that canShowMIMEType returns true if we have an application plug-in
2810         that can display a particular MIME type, even if we're not allowed to load plug-ins.
2811
2812 2013-05-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2813
2814         [EFL][WK2] Make Ewk_Context_Menu Ewk_Object
2815         https://bugs.webkit.org/show_bug.cgi?id=116097
2816
2817         Reviewed by Gyuyoung Kim.
2818
2819         Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
2820         object can be shared between different modules.
2821
2822         * UIProcess/API/efl/EwkView.cpp:
2823         (EwkView::showContextMenu):
2824         * UIProcess/API/efl/EwkView.h:
2825         (EwkView):
2826         * UIProcess/API/efl/ewk_context_menu.cpp:
2827         (EwkContextMenu::appendItem):
2828         (EwkContextMenu::removeItem):
2829         (ewk_context_menu_new):
2830         (ewk_context_menu_new_with_items):
2831         (ewk_context_menu_item_append):
2832         (ewk_context_menu_item_remove):
2833         (ewk_context_menu_hide):
2834         (ewk_context_menu_items_get):
2835         (ewk_context_menu_item_select):
2836         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2837         (EwkContextMenuItem::EwkContextMenuItem):
2838         (ewk_context_menu_item_new_with_submenu):
2839         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2840         (EwkContextMenuItem):
2841         * UIProcess/API/efl/ewk_context_menu_private.h:
2842         (EwkContextMenu):
2843         (EwkContextMenu::create):
2844         * UIProcess/API/efl/ewk_defines.h:
2845
2846 2013-05-16  Andreas Kling  <akling@apple.com>
2847
2848         Page::chrome() should return a reference.
2849         <http://webkit.org/b/116185>
2850
2851         Reviewed by Anders Carlsson.
2852
2853 2013-05-16  Brady Eidson  <beidson@apple.com>
2854
2855         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
2856         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
2857
2858         Reviewed by Sam Weinig.
2859
2860         * NetworkProcess/SchedulableLoader.cpp:
2861         (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or
2862           that the client cannot be asked for credentials.
2863
2864         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2865         (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage
2866           if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are
2867           available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both
2868           a frame and page ID or that the client won’t be asked for credentials.
2869
2870 2013-05-16  Timothy Hatcher  <timothy@apple.com>
2871
2872         Make the Find Banner in Safari work again with the docked Web Inspector.
2873
2874         https://webkit.org/b/116182
2875         rdar://problem/13857423
2876
2877         Reviewed by Benjamin Poulain.
2878
2879         * UIProcess/mac/WebInspectorProxyMac.mm:
2880         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2881         (WebKit::WebInspectorProxy::platformDetach):
2882         Preserve the top position of the inspected view so banners in Safari still work.
2883
2884 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2885
2886         [wk2] didGetImageForFindMatch can return a null image
2887         https://bugs.webkit.org/show_bug.cgi?id=116251
2888         <rdar://problem/13277246>
2889
2890         Reviewed by Simon Fraser.
2891
2892         Don't send didGetImageForFindMatch if we didn't get an image for
2893         the find match, which can happen if the selection is not visible.
2894
2895         * WebProcess/WebPage/FindController.cpp:
2896         (WebKit::FindController::getImageForFindMatch):
2897
2898 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2899
2900         [wk2] Minimum layout width is lost if the WebProcess crashes
2901         https://bugs.webkit.org/show_bug.cgi?id=116202
2902         <rdar://problem/13202320>
2903
2904         Reviewed by Darin Adler.
2905
2906         Send the minimum layout width to the WebProcess upon initialization,
2907         so that crashed-and-restarted WebProcesses have the correct width.
2908
2909         * Shared/WebPageCreationParameters.cpp:
2910         (WebKit::WebPageCreationParameters::encode):
2911         (WebKit::WebPageCreationParameters::decode):
2912         * Shared/WebPageCreationParameters.h:
2913         (WebPageCreationParameters):
2914         Add minimumLayoutWidth WebPage creation parameter.
2915
2916         * UIProcess/WebPageProxy.cpp:
2917         (WebKit::WebPageProxy::creationParameters):
2918         Send the current minimumLayoutWidth to the WebPage when it's created.
2919
2920         (WebKit::WebPageProxy::setMinimumLayoutWidth):
2921         Store minimumLayoutWidth changes that come in while the WebProcess is
2922         not valid, so that the correct width is sent once it is restarted.
2923
2924         * WebProcess/WebPage/WebPage.cpp:
2925         (WebKit::WebPage::WebPage):
2926         Set minimumLayoutWidth to the value provided by our creation parameters.
2927
2928 2013-05-16  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2929
2930         [Win] Unreviewed buildfix after r150161.
2931
2932         'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
2933         because it is also defined in MS SDK 7.1 winioctl.h.
2934
2935         * UIProcess/InspectorServer/HTTPRequest.cpp:
2936         (WebKit::HTTPRequest::HTTPRequest):
2937
2938 2013-05-16  Andras Becsi  <andras.becsi@digia.com>
2939
2940         [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
2941         https://bugs.webkit.org/show_bug.cgi?id=116018
2942
2943         Rubber-stamped by Jocelyn Turcotte.
2944
2945         * Shared/Plugins/Netscape/PluginInformation.cpp:
2946         (WebKit::getPluginModuleInformation):
2947
2948 2013-05-15  Simon Cooper  <scooper@apple.com>
2949
2950         Enable printing in plugins
2951         https://bugs.webkit.org/show_bug.cgi?id=116201
2952         <rdar://problem/12347902>
2953
2954         Reviewed by Alexey Proskuryakov.
2955
2956         Add the printing entitlement so that legacy printing drivers can
2957         customize the print panel. Update the printing rules and enable them
2958         for the plugins.
2959
2960         * Configurations/PluginService.entitlements:
2961         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2962         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2963         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2964         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2965
2966 2013-05-15  Anders Carlsson  <andersca@apple.com>
2967
2968         Move HTTPRequest class to WebKit2
2969         https://bugs.webkit.org/show_bug.cgi?id=116192
2970
2971         Reviewed by Darin Adler.
2972
2973         Move HTTPRequest to WebKit2 and put it in the WebKit namespace.
2974
2975         * CMakeLists.txt:
2976         * GNUmakefile.list.am:
2977         * Target.pri:
2978         * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
2979         * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
2980         * UIProcess/InspectorServer/WebInspectorServer.cpp:
2981         * UIProcess/InspectorServer/WebInspectorServer.h:
2982         (WebInspectorServer):
2983         * UIProcess/InspectorServer/WebSocketServerClient.h:
2984         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
2985         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
2986         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
2987         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2988         * UIProcess/InspectorServer/WebSocketServerConnection.h:
2989         (WebKit):
2990         (WebSocketServerConnection):
2991
2992 2013-05-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2993
2994         [GTK] [WebKit2] enable displaying console.log messages to system console
2995         https://bugs.webkit.org/show_bug.cgi?id=115578
2996
2997         Reviewed by Martin Robinson.
2998
2999         Add a setting to enable/disable displaying of page messages to system
3000         console. Property is called enable-write-console-messages-to-stdout.
3001         Getter API function is
3002         webkit_settings_get_enable_write_console_messages_to_stdout
3003         Setter API function is
3004         webkit_settings_set_enable_write_console_messages_to_stdout
3005
3006         * UIProcess/API/gtk/WebKitSettings.cpp:
3007         (webKitSettingsSetProperty):
3008         (webKitSettingsGetProperty):
3009         (webkit_settings_class_init):
3010         (webkit_settings_get_enable_write_console_messages_to_stdout):
3011         (webkit_settings_set_enable_write_console_messages_to_stdout):
3012         * UIProcess/API/gtk/WebKitSettings.h:
3013         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3014         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3015         (testWebKitSettings):
3016
3017 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
3018
3019         Process suppression should throttle scripted animations
3020         https://bugs.webkit.org/show_bug.cgi?id=115812
3021
3022         Reviewed by Simon Fraser.
3023
3024         <rdar://problem/13799726>
3025
3026         * WebProcess/WebPage/WebPage.cpp:
3027         (WebKit::WebPage::setThrottled):
3028         (WebKit):
3029         * WebProcess/WebPage/WebPage.h:
3030         (WebPage):
3031             - Added setThrottled, forwards to WebCore::Page.
3032         * WebProcess/WebProcess.cpp:
3033         (WebKit):
3034         (WebKit::WebProcess::setProcessSuppressionEnabled):
3035         * WebProcess/WebProcess.h:
3036         (WebProcess):
3037             - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.
3038
3039 2013-05-15  Anders Carlsson  <andersca@apple.com>
3040
3041         WKPageGetPluginInformationDisplayNameKey doesn't return the right key
3042         https://bugs.webkit.org/show_bug.cgi?id=116188
3043
3044         Reviewed by Andreas Kling.
3045
3046         * UIProcess/API/C/WKPage.cpp:
3047         (WKPageGetPluginInformationDisplayNameKey):
3048
3049 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
3050
3051         More fixing after WebProcessShim renaming in r149074.
3052
3053         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3054         (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.
3055
3056 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
3057
3058         <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
3059         launching Safari
3060
3061         Reviewed by Anders Carlsson.
3062
3063         * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
3064
3065 2013-05-13  Anders Carlsson  <andersca@apple.com>
3066
3067         Frame::editor() should return a reference
3068         https://bugs.webkit.org/show_bug.cgi?id=116037
3069
3070         Reviewed by Darin Adler.
3071
3072         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3073         (WebKit::WebContextMenuClient::searchWithGoogle):
3074         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3075         (WebKit::WebEditorClient::updateGlobalSelection):
3076         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
3077         (WebKit::WebEditorClient::handleInputMethodKeydown):
3078         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3079         (WebKit::WebEditorClient::executePendingEditorCommands):
3080         (WebKit::WebEditorClient::handleKeyboardEvent):
3081         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3082         (WebKit::WebContextMenuClient::searchWithGoogle):
3083         (WebKit::WebContextMenuClient::searchWithSpotlight):
3084         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3085         (WebKit::changeWordCase):
3086         * WebProcess/WebPage/WebFrame.cpp:
3087         (WebKit::WebFrame::selectionAsString):
3088         (WebKit::WebFrame::setTextDirection):
3089         * WebProcess/WebPage/WebPage.cpp:
3090         (WebKit::WebPage::editorState):
3091         (WebKit::WebPage::executeEditingCommand):
3092         (WebKit::WebPage::isEditingCommandEnabled):
3093         (WebKit::WebPage::validateCommand):
3094         (WebKit::WebPage::handleEditingKeyboardEvent):
3095         (WebKit::WebPage::advanceToNextMisspelling):
3096         (WebKit::WebPage::uppercaseWord):
3097         (WebKit::WebPage::lowercaseWord):
3098         (WebKit::WebPage::capitalizeWord):
3099         (WebKit::WebPage::replaceSelectionWithText):
3100         (WebKit::WebPage::handleAlternativeTextUIResult):
3101         (WebKit::WebPage::setCompositionForTesting):
3102         (WebKit::WebPage::hasCompositionForTesting):
3103         (WebKit::WebPage::confirmCompositionForTesting):
3104         (WebKit::WebPage::setComposition):
3105         (WebKit::WebPage::cancelComposition):
3106         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3107         (WebKit::WebPage::confirmComposition):
3108         (WebKit::WebPage::setComposition):
3109         (WebKit::WebPage::cancelComposition):
3110         * WebProcess/WebPage/mac/WebPageMac.mm:
3111         (WebKit::WebPage::executeKeypressCommandsInternal):
3112         (WebKit::WebPage::handleEditingKeyboardEvent):
3113         (WebKit::WebPage::setComposition):
3114         (WebKit::WebPage::confirmComposition):
3115         (WebKit::WebPage::cancelComposition):
3116         (WebKit::WebPage::insertText):
3117         (WebKit::WebPage::insertDictatedText):
3118         (WebKit::WebPage::getMarkedRange):
3119         (WebKit::WebPage::firstRectForCharacterRange):
3120         (WebKit::WebPage::readSelectionFromPasteboard):
3121         (WebKit::WebPage::getStringSelectionForPasteboard):
3122         (WebKit::WebPage::getDataSelectionForPasteboard):
3123
3124 2013-05-15  Anders Carlsson  <andersca@apple.com>
3125
3126         Need a way for NPAPI plug-ins to open preference panes
3127         https://bugs.webkit.org/show_bug.cgi?id=116173
3128         <rdar://problem/13503848>
3129
3130         Reviewed by Sam Weinig.
3131
3132         * PluginProcess/PluginControllerProxy.h:
3133         Add openPluginPreferencePane().
3134
3135         * PluginProcess/mac/PluginControllerProxyMac.mm:
3136         (WebKit::PluginControllerProxy::openPluginPreferencePane):
3137         Send OpenPluginPreferencePane to the UI process.
3138
3139         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3140         (WebKit::NetscapePluginModule::getPluginInfo):
3141         Get the preference pane path.
3142         
3143         * Shared/Plugins/PluginModuleInfo.h:
3144         Add preferencePanePath member variable.
3145
3146         * UIProcess/Plugins/PluginProcessProxy.h:
3147         Add openPluginPreferencePane message handler.
3148
3149         * UIProcess/Plugins/PluginProcessProxy.messages.in:
3150         ADd OpenPluginPreferencePane message.
3151
3152         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3153         (WebKit::PluginProcessProxy::openPluginPreferencePane):
3154         Get the path to the preference pane and use LS to open it.
3155
3156         * WebKit2.xcodeproj/project.pbxproj:
3157         Add new files.
3158
3159         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3160         (WebKit::NPN_GetValue):
3161         Handle WKNVPlugInContainer.
3162
3163         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3164         Add WKNVPlugInContainer member variable.
3165
3166         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3167         (WebKit::NetscapePlugin::openPluginPreferencePane):
3168         Call through to the plug-in controller.
3169
3170         (WebKit::NetscapePlugin::plugInContainer):
3171         Create a WKNPAPIPlugInContainer object if necessary.
3172
3173         (WebKit::NetscapePlugin::platformDestroy):
3174         Invalidate the WKNPAPIPlugInContainer object.
3175
3176         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
3177         New file with the protocol definition.
3178
3179         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
3180         (-[WKNPAPIPlugInContainer dealloc]):
3181         Assert that the plug-in is null (that we've been invalidated).
3182
3183         (-[WKNPAPIPlugInContainer _invalidate]):
3184         Set the plug-in to null.
3185
3186         (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
3187         Call through to the plug-in.
3188
3189         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
3190         New file with the interface declaration for the object that implements the protocol.
3191
3192         * WebProcess/Plugins/PluginController.h:
3193         Add openPluginPreferencePane member function.
3194
3195         * WebProcess/Plugins/PluginView.cpp:
3196         (WebKit::PluginView::openPluginPreferencePane):
3197         Add stub; this should never be called since we always go through the UI process.
3198
3199 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
3200
3201         [WK2][Mac] Split resetTextInputState into two functions
3202         https://bugs.webkit.org/show_bug.cgi?id=116174
3203
3204         Reviewed by Anders Carlsson.
3205
3206         Splitting resetTextInputState into resetSecureInputState and
3207         notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
3208         won't be happening simultaneously.
3209
3210         * UIProcess/API/mac/PageClientImpl.h:
3211         * UIProcess/API/mac/PageClientImpl.mm:
3212         (WebKit::PageClientImpl::resetSecureInputState):
3213         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
3214         * UIProcess/API/mac/WKView.mm:
3215         (-[WKView resignFirstResponder]):
3216         (-[WKView _resetSecureInputState]):
3217         (-[WKView _notifyInputContextAboutDiscardedComposition]):
3218         * UIProcess/API/mac/WKViewInternal.h:
3219         * UIProcess/PageClient.h:
3220         * UIProcess/WebPageProxy.cpp:
3221         (WebKit::WebPageProxy::didCommitLoadForFrame):
3222
3223 2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3224
3225         [GTK] Add padding to all public class structs for future expansion without breaking ABI
3226         https://bugs.webkit.org/show_bug.cgi?id=112565
3227
3228         Reviewed by Anders Carlsson.
3229
3230         Use 4 pointers for most of the classes that are unlikely to grow
3231         and 8 for WebKitWebView and WebKitWebContext.
3232
3233         * UIProcess/API/gtk/WebKitBackForwardList.h:
3234         (_WebKitBackForwardListClass):
3235         * UIProcess/API/gtk/WebKitBackForwardListItem.h:
3236         (_WebKitBackForwardListItemClass):
3237         * UIProcess/API/gtk/WebKitContextMenu.h:
3238         (_WebKitContextMenuClass):
3239         * UIProcess/API/gtk/WebKitContextMenuItem.h:
3240         (_WebKitContextMenuItemClass):
3241         * UIProcess/API/gtk/WebKitCookieManager.h:
3242         (_WebKitCookieManagerClass):
3243         * UIProcess/API/gtk/WebKitDownload.h:
3244         (_WebKitDownloadClass):
3245         * UIProcess/API/gtk/WebKitFaviconDatabase.h:
3246         (_WebKitFaviconDatabaseClass):
3247         * UIProcess/API/gtk/WebKitFileChooserRequest.h:
3248         (_WebKitFileChooserRequestClass):
3249         * UIProcess/API/gtk/WebKitFindController.h:
3250         (_WebKitFindControllerClass):
3251         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
3252         (_WebKitFormSubmissionRequestClass):
3253         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
3254         (_WebKitGeolocationPermissionRequestClass):
3255         * UIProcess/API/gtk/WebKitHitTestResult.h:
3256         (_WebKitHitTestResultClass):
3257         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
3258         (_WebKitNavigationPolicyDecisionClass):
3259         * UIProcess/API/gtk/WebKitPlugin.h:
3260         (_WebKitPluginClass):
3261         * UIProcess/API/gtk/WebKitPolicyDecision.h:
3262         (_WebKitPolicyDecisionClass):
3263         * UIProcess/API/gtk/WebKitPrintOperation.h:
3264         (_WebKitPrintOperationClass):
3265         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
3266         (_WebKitResponsePolicyDecisionClass):
3267         * UIProcess/API/gtk/WebKitSecurityManager.h:
3268         (_WebKitSecurityManagerClass):
3269         * UIProcess/API/gtk/WebKitSettings.h:
3270         (_WebKitSettingsClass):
3271         * UIProcess/API/gtk/WebKitURIRequest.h:
3272         (_WebKitURIRequestClass):
3273         * UIProcess/API/gtk/WebKitURIResponse.h:
3274         (_WebKitURIResponseClass):
3275         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
3276         (_WebKitURISchemeRequestClass):
3277         * UIProcess/API/gtk/WebKitWebContext.h:
3278         (_WebKitWebContextClass):
3279         * UIProcess/API/gtk/WebKitWebInspector.h:
3280         (_WebKitWebInspectorClass):
3281         * UIProcess/API/gtk/WebKitWebResource.h:
3282         (_WebKitWebResourceClass):
3283         * UIProcess/API/gtk/WebKitWebView.h:
3284         (_WebKitWebViewClass):
3285         * UIProcess/API/gtk/WebKitWebViewBase.h:
3286         (_WebKitWebViewBaseClass):
3287         * UIProcess/API/gtk/WebKitWebViewGroup.h:
3288         (_WebKitWebViewGroupClass):
3289         * UIProcess/API/gtk/WebKitWindowProperties.h:
3290         (_WebKitWindowPropertiesClass):
3291
3292 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3293
3294         Remove WTF_USE_PLATFORM_STRATEGIES
3295         https://bugs.webkit.org/show_bug.cgi?id=114431
3296
3297         Reviewed by Darin Adler.
3298
3299         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3300         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3301         * WebProcess/WebProcess.cpp:
3302         (WebKit::WebProcess::WebProcess):
3303
3304 2013-05-14  Simon Cooper  <scooper@apple.com>
3305
3306         Add a preference that can disable the fake SYSV SHM shim
3307         https://bugs.webkit.org/show_bug.cgi?id=116127
3308         <rdar://problem/13810524>
3309
3310         Reviewed by Alexey Proskuryakov.
3311
3312         * PluginProcess/mac/PluginProcessShim.mm:
3313         (WebKit::shim_disabled):
3314         (WebKit::shim_shmdt):
3315         (WebKit::shim_shmat):
3316         (WebKit::shim_shmget):
3317         (WebKit::shim_shmctl):
3318
3319 2013-05-14  Tim Horton  <timothy_horton@apple.com>
3320
3321         [wk2] Not updating tiled backing coverage when main frame scrollability changes
3322         https://bugs.webkit.org/show_bug.cgi?id=116123
3323         <rdar://problem/13836559>
3324
3325         Reviewed by Simon Fraser.
3326
3327         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3328         (TiledCoreAnimationDrawingArea):
3329         Add updateMainFrameClipsToExposedRect.
3330
3331         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3332         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3333         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3334         Remove m_clipsToExposedRect. We don't actually need it.
3335
3336         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
3337         Call updateMainFrameClipsToExposedRect so that we can always update
3338         tiled backing coverage and can factor out our calls to setClipsToExposedRect.
3339
3340         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
3341         Factor out setClipsToExposedRect calls to here, and also call
3342         FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
3343         backing is informed to allow overdraw in the UI-process-scrolling case.
3344
3345         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3346         Use updateMainFrameClipsToExposedRect.
3347
3348 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
3349
3350         [Mac] Add a testing shim for secure event input functions
3351         https://bugs.webkit.org/show_bug.cgi?id=116122
3352
3353         Reviewed by Mark Rowe.
3354
3355         Moved DyldInterpose.h to WebCore, as we now use it there too.
3356
3357         * PluginProcess/mac/PluginProcessShim.mm:
3358         * Shared/mac/CookieStorageShimLibrary.cpp:
3359         * Shared/mac/DyldInterpose.h: Removed.
3360         * WebKit2.xcodeproj/project.pbxproj:
3361         * WebProcess/mac/SecItemShimLibrary.mm:
3362
3363 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3364
3365         [Win] REGRESSION(r149944): mmap is not available on Windows
3366         https://bugs.webkit.org/show_bug.cgi?id=116015
3367
3368         Reviewed by Anders Carlsson.
3369
3370         Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
3371         using mmap is not necessary and maybe not available.
3372
3373         * Platform/CoreIPC/ArgumentEncoder.cpp:
3374         (CoreIPC::allocBuffer):
3375         (CoreIPC::freeBuffer):
3376         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
3377         (CoreIPC::ArgumentEncoder::grow):
3378
3379 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
3380
3381         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
3382         https://bugs.webkit.org/show_bug.cgi?id=115921
3383
3384         Reviewed by Gustavo Noronha Silva.
3385
3386         * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
3387
3388 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3389
3390         [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
3391         https://bugs.webkit.org/show_bug.cgi?id=116039
3392
3393         Reviewed by Benjamin Poulain.
3394
3395         According to the documentation, DeleteTimerQueueTimer can be expected to return
3396         false with an ERROR_IO_PENDING error when called from the timer's callback.
3397
3398         * Platform/win/WorkQueueWin.cpp:
3399         (WorkQueue::timerCallback):
3400
3401 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
3402
3403         Remove unused "type" field from DictionaryPopupInfo
3404         https://bugs.webkit.org/show_bug.cgi?id=116011
3405
3406         Reviewed by Darin Adler.
3407
3408         It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
3409
3410         * Shared/DictionaryPopupInfo.cpp:
3411         (WebKit::DictionaryPopupInfo::encode):
3412         (WebKit::DictionaryPopupInfo::decode):
3413         * Shared/DictionaryPopupInfo.h:
3414         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3415         (WebKit::PDFPlugin::showDefinitionForAttributedString):
3416         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3417         (WebKit::WebContextMenuClient::lookUpInDictionary):
3418         * WebProcess/WebPage/WebPage.h:
3419         * WebProcess/WebPage/mac/WebPageMac.mm:
3420         (WebKit::WebPage::performDictionaryLookupAtLocation):
3421         (WebKit::WebPage::performDictionaryLookupForSelection):
3422         (WebKit::WebPage::performDictionaryLookupForRange):
3423
3424 2013-05-14  Michael Brüning  <michael.bruning@digia.com>
3425
3426         [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
3427         https://bugs.webkit.org/show_bug.cgi?id=110218
3428
3429         Reviewed by Darin Adler.
3430
3431         Make the WebPageProxy::creationParameters use the accessor
3432         deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
3433         directly. This will restore the custom device scale factor when
3434         reattaching to the WebProcess after a crash.
3435
3436         Moreover, it will enable the Qt and ELF ports to use the
3437         existing C API for overriding the device scale factor instead
3438         of using the WebPageProxy directly or adding new C API to set
3439         the intrinsic device scale factor.
3440
3441         * UIProcess/API/efl/EwkView.cpp:
3442         (EwkView::setDeviceScaleFactor):
3443         * UIProcess/API/qt/qquickwebpage.cpp:
3444         (QQuickWebPage::updatePaintNode):
3445         * UIProcess/WebPageProxy.cpp:
3446         (WebKit::WebPageProxy::creationParameters):
3447
3448 2013-05-13  Alex Christensen  <achristensen@apple.com>
3449
3450         Added testRunner.setPrinting.
3451         https://bugs.webkit.org/show_bug.cgi?id=42693
3452         rdar://problem/8213845
3453
3454         Reviewed by Darin Adler.
3455
3456         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3457         (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
3458         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3459         Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
3460         * WebProcess/WebPage/WebPage.cpp:
3461         (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
3462         * WebProcess/WebPage/WebPage.h:
3463         Added renderTreeExternalRepresentationForPrinting declaration.
3464
3465 2013-05-13  Timothy Hatcher  <timothy@apple.com>
3466
3467         Add support for updating the Web Inspector toolbar height.
3468
3469         https://bugs.webkit.org/show_bug.cgi?id=115996
3470
3471         Reviewed by Joseph Pecoraro and Benjamin Poulain.
3472
3473         * UIProcess/WebInspectorProxy.h:
3474         (WebKit::WebInspectorProxy::setToolbarHeight):
3475         (WebInspectorProxy):
3476         * UIProcess/WebInspectorProxy.messages.in:
3477         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3478         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
3479         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3480         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
3481         (WebKit):
3482         * UIProcess/mac/WebInspectorProxyMac.mm:
3483         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
3484         * UIProcess/qt/WebInspectorProxyQt.cpp:
3485         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
3486         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3487         (WebKit::WebInspectorFrontendClient::setToolbarHeight):
3488         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
3489         (WebInspectorFrontendClient):
3490         * WebProcess/WebPage/WebInspector.cpp:
3491         (WebKit::WebInspector::setToolbarHeight):
3492         * WebProcess/WebPage/WebInspector.h:
3493
3494 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
3495
3496         Sometimes NSUndoManager can get into an inconsistent state
3497         https://bugs.webkit.org/show_bug.cgi?id=116050
3498
3499         Reviewed by Enrica Casucci.
3500
3501         Always group undo items to work around a bug in NSUndoManager that manifests
3502         when we call removeAllActionsWithTarget.
3503
3504         * UIProcess/API/mac/PageClientImpl.mm:
3505         (WebKit::PageClientImpl::registerEditCommand):
3506
3507 2013-05-13  Anders Carlsson  <andersca@apple.com>
3508
3509         [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
3510         https://bugs.webkit.org/show_bug.cgi?id=116026
3511
3512         Reviewed by Andreas Kling.
3513
3514         Make sure that we ignore any leftover messages from the UI process after we've reset
3515         the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
3516         everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
3517         notification messages from the UI process if the seeds are different.
3518
3519         * Platform/CoreIPC/HandleMessage.h:
3520         (CoreIPC):
3521         (CoreIPC::callMemberFunction):
3522         * UIProcess/Storage/StorageManager.cpp:
3523         (WebKit::StorageManager::getValues):
3524         (WebKit::StorageManager::setItem):
3525         (WebKit::StorageManager::removeItem):
3526         (WebKit::StorageManager::clear):
3527         * UIProcess/Storage/StorageManager.h:
3528         (StorageManager):
3529         * UIProcess/Storage/StorageManager.messages.in:
3530         * WebProcess/Storage/StorageAreaMap.cpp:
3531         (WebKit::StorageAreaMap::StorageAreaMap):
3532         (WebKit::StorageAreaMap::setItem):
3533         (WebKit::StorageAreaMap::removeItem):
3534         (WebKit::StorageAreaMap::clear):
3535         (WebKit::StorageAreaMap::resetValues):
3536         (WebKit::StorageAreaMap::loadValuesIfNeeded):
3537         (WebKit::StorageAreaMap::didGetValues):
3538         (WebKit::StorageAreaMap::didSetItem):
3539         (WebKit::StorageAreaMap::didRemoveItem):
3540         (WebKit::StorageAreaMap::didClear):
3541         (WebKit::StorageAreaMap::applyChange):
3542         * WebProcess/Storage/StorageAreaMap.h:
3543         (StorageAreaMap):
3544         * WebProcess/Storage/StorageAreaMap.messages.in:
3545
3546 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3547
3548         [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
3549         https://bugs.webkit.org/show_bug.cgi?id=116045
3550
3551         Reviewed by Darin Adler.
3552
3553         * UIProcess/CoordinatedGraphics/WebView.cpp:
3554         (WebKit::WebView::setSize):
3555
3556 2013-05-13  Jon Lee  <jonlee@apple.com>
3557
3558         [WK2] Notification manager removal should not be tied to termination of web processes
3559         https://bugs.webkit.org/show_bug.cgi?id=116038
3560         <rdar://problem/10968680>
3561
3562         Reviewed by Ryosuke Niwa.
3563
3564         WebNotificationManagerProxy incorrectly removes the manager when web processes close.
3565         Since it is a supplemental on the web context, the manager should only be removed
3566         when the context is destroyed.
3567
3568         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3569         * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
3570         processDidClose().
3571
3572 2013-05-13  Martin Robinson  <mrobinson@igalia.com>
3573
3574         [GTK] [WebKit2] Use a template file for generated GObject enum files
3575         https://bugs.webkit.org/show_bug.cgi?id=115867
3576
3577         Reviewed by Carlos Garcia Campos.
3578
3579         * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
3580         * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
3581         * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
3582         * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
3583
3584 2013-05-13  Noam Rosenthal  <noam@webkit.org>
3585
3586         [CoordGfx] requestAnimationFrame performance issues
3587         https://bugs.webkit.org/show_bug.cgi?id=112345
3588
3589         Reviewed by Jocelyn Turcotte.
3590
3591         Changed the logic of requestAnimationFrame in Coordinated Graphics.
3592         We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
3593         - If there is already a frame pending in the UI process, do nothing, as the animations would
3594           be serviced when the frame is returned to the web process.
3595         - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
3596           least 1/60 seconds after the last animation service, so that we don't get an infinite loop
3597           of flushes.
3598
3599         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3600         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
3601         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3602         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3603         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3604         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
3605         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
3606         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3607         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
3608
3609 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3610
3611         [WK2][CoordinatedGraphics] WKView needs API for handling opacity
3612         https://bugs.webkit.org/show_bug.cgi?id=116032
3613
3614         Reviewed by Kenneth Rohde Christiansen.
3615
3616         Add WKViewSetOpacity and WKViewOpacity APIs and use them in
3617         WebView.cpp.
3618
3619         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3620         (WKViewSetOpacity):
3621         (WKViewOpacity):
3622         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3623         * UIProcess/CoordinatedGraphics/WebView.cpp:
3624         (WebKit::WebView::WebView):
3625         (WebKit::WebView::paintToCurrentGLContext):
3626         * UIProcess/CoordinatedGraphics/WebView.h:
3627         (WebKit::WebView::setOpacity):
3628         (WebKit::WebView::opacity):
3629         (WebView):
3630
3631 2013-05-13  Zan Dobersek  <zdobersek@igalia.com>
3632
3633         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
3634         https://bugs.webkit.org/show_bug.cgi?id=115918
3635
3636         Reviewed by Gustavo Noronha Silva.
3637
3638         Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
3639         libraries containing the built code of the intertwining Platform and WebCore layers to be
3640         specified multiple times when linking. This can be avoided by packing the two layers' archives
3641         into one big archive, named after the WebCore layer due to no clear boundary between it and the
3642         Platform layer. The big archive can then be specified only once when linking, simplifying the code
3643         and suppressing all the layering violations so they do not cause build problems.
3644
3645         First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
3646         are specified. These are then used as dependencies for the archive creation rule as well as the list
3647         from which the archive file paths are constructed and then used to dump the member files from these archives.
3648         The member files are then added to the big archive. The latter is added to the list of libraries the
3649         WebKitPluginProcess requires to successfully link.
3650
3651         * GNUmakefile.am:
3652
3653 2013-05-13  Zalan Bujtas  <zalan@apple.com>
3654
3655         WebProcess consuming very high CPU on linkedin.com
3656         https://bugs.webkit.org/show_bug.cgi?id=115601
3657
3658         Reviewed by Andreas Kling.
3659
3660         Disable WEB_TIMING_MINIMAL.
3661         Turn off window.performance and performance.now(). Some JS frameworks expect
3662         additional Web Timing APIs, when performance.now() is available.
3663
3664         * Configurations/FeatureDefines.xcconfig:
3665
3666 2013-05-12  Anders Carlsson  <andersca@apple.com>
3667
3668         Stop including UnusedParam.h
3669         https://bugs.webkit.org/show_bug.cgi?id=116003
3670
3671         Reviewed by Sam Weinig.
3672
3673         UnusedParam.h is empty now so there's no need to include it anymore.
3674
3675         * UIProcess/API/C/WKContext.cpp:
3676         * UIProcess/API/C/WKInspector.cpp:
3677         * UIProcess/API/C/WKPage.cpp:
3678         * UIProcess/API/efl/ewk_text_checker.cpp:
3679         * UIProcess/API/efl/ewk_view.cpp:
3680         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3681         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3682         * UIProcess/mac/WKFullScreenWindowController.mm:
3683         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3684         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3685
3686 2013-05-12  Andreas Kling  <akling@apple.com>
3687
3688         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
3689         <http://webkit.org/b/115988>
3690         <rdar://problem/13870943>
3691
3692         Reviewed by Anders Carlsson.
3693
3694         Let WebCore control the UI process's suppression of the sudden termination mechanism.
3695         This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
3696         over to the UI process where the appropriate NSProcessInfo calls are made.
3697
3698         We also use this information when deciding whether to insta-kill a web process when its last
3699         page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
3700         by the UI process.
3701
3702         * UIProcess/WebProcessProxy.cpp:
3703         (WebKit::WebProcessProxy::WebProcessProxy):
3704         (WebKit::WebProcessProxy::removeWebPage):
3705         (WebKit::WebProcessProxy::enableSuddenTermination):
3706         (WebKit::WebProcessProxy::disableSuddenTermination):
3707         * UIProcess/WebProcessProxy.h:
3708         (WebProcessProxy):
3709         * UIProcess/WebProcessProxy.messages.in:
3710         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3711         (WebKit::WebChromeClient::enableSuddenTermination):
3712         (WebKit::WebChromeClient::disableSuddenTermination):
3713         * WebProcess/WebCoreSupport/WebChromeClient.h:
3714         (WebChromeClient):
3715
3716 2013-05-12  Alexey Proskuryakov  <ap@apple.com>
3717
3718         <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
3719
3720         Reviewed by Dan Bernstein.
3721
3722         * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
3723
3724 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3725
3726         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
3727         https://bugs.webkit.org/show_bug.cgi?id=115914
3728
3729         Reviewed by Martin Robinson.
3730
3731         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3732         (webkitWebViewBaseRealize):
3733
3734 2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
3735
3736         Unreviewed build fix after r149944.
3737
3738         * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
3739
3740 2013-05-11  Anders Carlsson  <andersca@apple.com>
3741
3742         Don't pass malloced pointers as out-of-line data when sending Mach messages
3743         https://bugs.webkit.org/show_bug.cgi?id=115970
3744         <rdar://problem/13144680>
3745
3746         Reviewed by Sam Weinig.
3747
3748         Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
3749         since that gives us fresh zero-filled memory that we can safely share.
3750
3751         * Platform/CoreIPC/ArgumentEncoder.cpp:
3752         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
3753         Set up the buffer pointers to point to the inline buffer.
3754
3755         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
3756         Unmap the buffer if necessary.
3757
3758         (CoreIPC::ArgumentEncoder::grow):
3759         Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
3760         current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
3761         or big in which case we'll end up doing less allocations + memory copying.
3762
3763         * Platform/CoreIPC/ArgumentEncoder.h:
3764         (ArgumentEncoder):
3765
3766 2013-05-11  Zan Dobersek  <zdobersek@igalia.com>
3767
3768         Unreviewed GTK build fix after r149904.
3769
3770         * GNUmakefile.list.am: Adding missing build targets.
3771
3772 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3773
3774         Unreviewed, Fix WK2 EFL build after r149904.
3775
3776         Add new PluginInformation.cpp file to CMake.
3777
3778         * CMakeLists.txt:
3779
3780 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3781
3782         Unreviewed, fix WK2 EFL build after r149904.
3783
3784         Add new WKPluginInformation.cpp file to CMake.
3785
3786         * CMakeLists.txt:
3787
3788 2013-05-11  Andreas Kling  <akling@apple.com>
3789
3790         When possible, terminate web processes immediately when closing their last page.
3791         <http://webkit.org/b/115964>
3792         <rdar://problem/13869266>
3793
3794         Reviewed by Geoffrey Garen.
3795
3796         When we're using a network process, there's no need for the UI process to wait for web processes
3797         to clear resource caches and terminate nicely.
3798
3799         We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
3800
3801         * UIProcess/WebProcessProxy.cpp:
3802         (WebKit::WebProcessProxy::removeWebPage):
3803
3804             Terminate the child process immediately if possible.
3805
3806         * UIProcess/WebProcessProxy.h:
3807         (WebKit::WebProcessProxy::canTerminateChildProcess):
3808         (WebKit::WebProcessProxy::shouldTerminate):
3809
3810             Broke out the logic from the shouldTerminate() IPC message handler into a separate function
3811             so we can call it from removeWebPage().
3812
3813 2013-05-11  Anders Carlsson  <andersca@apple.com>
3814
3815         Crash when terminating a process that has not been fully launched
3816         https://bugs.webkit.org/show_bug.cgi?id=115962
3817         <rdar://problem/13660916>
3818
3819         Reviewed by Andreas Kling.
3820
3821         Handle terminating a process that has not been fully launched.
3822
3823         * UIProcess/Launcher/ProcessLauncher.cpp:
3824         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3825         If we have been invalidated, dispose the connection identifier.
3826
3827         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3828         (WebKit::ProcessLauncher::terminateProcess):
3829         If we're still launching the process, invalidate so the client won't get an unexpected
3830         didFinishLaunching callback.
3831
3832         * UIProcess/WebProcessProxy.cpp:
3833         (WebKit::WebProcessProxy::requestTermination):
3834         Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
3835
3836 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
3837
3838         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
3839         https://bugs.webkit.org/show_bug.cgi?id=115564
3840
3841         Reviewed by Benjamin Poulain.
3842
3843         Implement InspectorFrontendHost's save() and append() methods for
3844         Mac WebKit2. Add canSave() for all ports.
3845
3846         * UIProcess/WebInspectorProxy.cpp:
3847         (WebKit::WebInspectorProxy::save):
3848         (WebKit):
3849         (WebKit::WebInspectorProxy::append):
3850         * UIProcess/WebInspectorProxy.h:
3851         (WebInspectorProxy):
3852         * UIProcess/WebInspectorProxy.messages.in:
3853         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3854         (WebKit::WebInspectorProxy::platformSave):
3855         (WebKit):
3856         (WebKit::WebInspectorProxy::platformAppend):
3857         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3858         (WebKit::WebInspectorProxy::platformSave):
3859         (WebKit):
3860         (WebKit::WebInspectorProxy::platformAppend):
3861         * UIProcess/mac/WebInspectorProxyMac.mm:
3862         (WebKit::WebInspectorProxy::platformSave):
3863         (WebKit):
3864         (WebKit::WebInspectorProxy::platformAppend):
3865         * UIProcess/qt/WebInspectorProxyQt.cpp:
3866         (WebKit::WebInspectorProxy::platformSave):
3867         (WebKit):
3868         (WebKit::WebInspectorProxy::platformAppend):
3869         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3870         (WebKit::WebInspectorFrontendClient::canSave):
3871         (WebKit):
3872         (WebKit::WebInspectorFrontendClient::save):
3873         (WebKit::WebInspectorFrontendClient::append):
3874         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
3875         (WebInspectorFrontendClient):
3876         * WebProcess/WebPage/WebInspector.cpp:
3877         (WebKit::WebInspector::save):
3878         (WebKit):
3879         (WebKit::WebInspector::append):
3880         (WebKit::WebInspector::didSave):
3881         (WebKit::WebInspector::didAppend):
3882         * WebProcess/WebPage/WebInspector.h:
3883         (WebInspector):
3884         * WebProcess/WebPage/WebInspector.messages.in:
3885         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
3886         (WebKit::WebInspector::canSave):
3887         (WebKit):
3888         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3889         (WebKit::WebInspector::canSave):
3890         (WebKit):
3891         * WebProcess/WebPage/mac/WebInspectorMac.mm:
3892         (WebKit::WebInspector::canSave):
3893         (WebKit):
3894         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3895         (WebKit::WebInspector::canSave):
3896         (WebKit):
3897
3898 2013-05-10  Remy Demarest  <rdemarest@apple.com>
3899
3900         Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
3901         https://bugs.webkit.org/show_bug.cgi?id=115940
3902
3903         Reviewed by Darin Adler.
3904
3905         * WebKit2.xcodeproj/project.pbxproj:
3906         Move WKPluginInformation.h file from the framework's Project Headers to
3907         Private Headers.
3908
3909 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3910
3911         [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
3912
3913         * Target.pri:
3914
3915 2013-05-10  Simon Cooper  <scooper@apple.com>
3916
3917         Fix AppleConnect issues for WiFi interfaces
3918         <rdar://problem/13776227&13776240&13776281>
3919         https://bugs.webkit.org/show_bug.cgi?id=115932
3920
3921         Reviewed by Alexey Proskuryakov.
3922
3923         Add support for WiFi interfaces for the AppleConnect plugin.
3924         Remove the FIXME.
3925
3926         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3927
3928 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3929
3930         [Qt][Mac] Unreviewed speculative build fix after r149904.
3931
3932         * Target.pri:
3933
3934 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3935
3936         [Qt] Unreviewed buildfix after r149904.
3937
3938         * Target.pri:
3939
3940 2013-05-09  Sam Weinig  <sam@webkit.org>
3941
3942         Unify plug-in information dictionaries
3943         <rdar://problem/13852080>
3944         https://bugs.webkit.org/show_bug.cgi?id=115891
3945
3946         Reviewed by Anders Carlsson.
3947
3948         This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
3949         and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
3950
3951         All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
3952         WKPluginInformation.h
3953
3954         * Shared/API/c/WKPluginInformation.cpp: Added.
3955         * Shared/API/c/WKPluginInformation.h: Added.
3956         Export new keys as SPI.
3957
3958         * Shared/Plugins/Netscape/PluginInformation.h: Added.
3959         * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
3960         (WebKit::pluginInformationBundleIdentifierKey):
3961         (WebKit::pluginInformationBundleVersionKey):
3962         (WebKit::pluginInformationPathKey):
3963         (WebKit::pluginInformationDisplayNameKey):
3964         (WebKit::pluginInformationDefaultLoadPolicyKey):
3965         (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
3966         (WebKit::pluginInformationHasSandboxProfileKey):
3967         (WebKit::pluginInformationFrameURLKey):
3968         (WebKit::pluginInformationMIMETypeKey):
3969         (WebKit::pluginInformationPageURLKey):
3970         (WebKit::pluginInformationPluginspageAttributeURLKey):
3971         (WebKit::pluginInformationPluginURLKey):
3972         Add new keys.
3973
3974         (WebKit::pluginModuleInformation):
3975         (WebKit::createPluginInformationDictionary):
3976         Add creation functions to simplify multiple sites.
3977
3978         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
3979         (WebKit::platformPluginModuleInformation):
3980         Add platform specific data to the dictionary.
3981
3982         * UIProcess/API/C/WKPage.cpp:
3983         (WKPageGetPluginInformationBundleIdentifierKey):
3984         (WKPageGetPluginInformationBundleVersionKey):
3985         (WKPageGetPluginInformationDisplayNameKey):
3986         (WKPageGetPluginInformationFrameURLKey):
3987         (WKPageGetPluginInformationMIMETypeKey):
3988         (WKPageGetPluginInformationPageURLKey):
3989         (WKPageGetPluginInformationPluginspageAttributeURLKey):
3990         (WKPageGetPluginInformationPluginURLKey):
3991         * UIProcess/API/C/WKPage.h:
3992         Deprecate the old keys.
3993
3994         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3995         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3996         (WKContextCopyPlugInInfoForBundleIdentifier):
3997         (WKContextGetInfoForInstalledPlugIns):
3998         Simplify by using the new createPluginInformationDictionary functions.
3999
4000         (WKPlugInInfoPathKey):
4001         (WKPlugInInfoBundleIdentifierKey):
4002         (WKPlugInInfoVersionKey):
4003         (WKPlugInInfoLoadPolicyKey):
4004         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
4005         (WKPlugInInfoIsSandboxedKey):
4006         Deprecate the old keys.
4007
4008         * UIProcess/WebLoaderClient.cpp:
4009         (WebKit::WebLoaderClient::didFailToInitializePlugin):
4010         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
4011         (WebKit::WebLoaderClient::pluginLoadPolicy):
4012         * UIProcess/WebLoaderClient.h:
4013         * UIProcess/WebUIClient.cpp:
4014         (WebKit::WebUIClient::unavailablePluginButtonClicked):
4015         * UIProcess/WebUIClient.h:
4016         Optimize for the most recent callback type which takes a dictionary,
4017         and pull out the necessary bits from it for deprecated callbacks as necessary.
4018
4019         * UIProcess/WebPageProxy.h:
4020         * UIProcess/WebPageProxy.cpp:
4021         (WebKit::WebPageProxy::findPlugin):
4022         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
4023         (WebKit::WebPageProxy::didFailToInitializePlugin):
4024         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
4025         Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
4026
4027         * WebKit2.xcodeproj/project.pbxproj:
4028         Add new files.
4029
4030 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
4031
4032         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
4033         https://bugs.webkit.org/show_bug.cgi?id=115865
4034
4035         Reviewed by Sam Weinig.
4036
4037         * UIProcess/WebInspectorProxy.h:
4038         (WebKit::WebInspectorProxy::inspectorWindow):
4039         Add an accessor for m_inspectorWindow.
4040
4041         * UIProcess/mac/WebInspectorProxyMac.mm:
4042         (WebKit::runOpenPanel):
4043         Show the open panel dialog when requested.
4044
4045         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
4046         Register the callback when the inspector page is created.
4047
4048 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
4049
4050         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
4051         https://bugs.webkit.org/show_bug.cgi?id=115928
4052
4053         Reviewed by Kenneth Rohde Christiansen.
4054
4055         WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
4056
4057         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
4058         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
4059         * UIProcess/API/C/efl/WKViewEfl.cpp:
4060         (WKViewSetThemePath):
4061         * UIProcess/API/C/efl/WKViewEfl.h:
4062         * UIProcess/CoordinatedGraphics/WebView.cpp:
4063         * UIProcess/CoordinatedGraphics/WebView.h:
4064         (WebView):
4065         * UIProcess/efl/ViewClientEfl.cpp:
4066         * UIProcess/efl/WebInspectorProxyEfl.cpp:
4067         * UIProcess/efl/WebViewEfl.cpp:
4068         (WebKit::WebViewEfl::setThemePath):
4069         * UIProcess/efl/WebViewEfl.h:
4070         (WebViewEfl):
4071
4072 2013-05-10  Jer Noble  <jer.noble@apple.com>
4073
4074         REGRESSION (r149439): Video turns blank upon entering full screen for the first time
4075         https://bugs.webkit.org/show_bug.cgi?id=115617
4076
4077         Reviewed by Eric Carlson.
4078
4079         Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
4080         platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
4081         first-full screen behavior.
4082
4083         * UIProcess/API/mac/WKView.mm:
4084         (-[WKView createFullScreenWindow]):
4085
4086 2013-05-10  Zan Dobersek  <zdobersek@igalia.com>
4087
4088         [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
4089         https://bugs.webkit.org/show_bug.cgi?id=115717
4090
4091         Reviewed by Andreas Kling.
4092
4093         WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
4094         by the WebProcess. This removes the need for the m_soupRequestManager member variable in
4095         the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
4096         of which instances are controlled by the WebProcess class.
4097
4098         * WebProcess/WebProcess.cpp:
4099         (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
4100         * WebProcess/WebProcess.h:
4101         (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
4102         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
4103         (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
4104         (webkitSoupRequestGenericSendFinish): Ditto.
4105         * WebProcess/soup/WebProcessSoup.cpp:
4106         (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
4107         * WebProcess/soup/WebSoupRequestManager.cpp:
4108         (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
4109         * WebProcess/soup/WebSoupRequestManager.h:
4110         (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
4111
4112 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
4113
4114         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
4115         https://bugs.webkit.org/show_bug.cgi?id=115904
4116
4117         Reviewed by Martin Robinson.
4118
4119         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
4120         (startTestServerMonitor):
4121         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
4122         (startTestServerMonitor):
4123
4124 2013-05-09  Anders Carlsson  <andersca@apple.com>
4125
4126         Fix build.
4127
4128         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
4129