Adopt new assertion SPI for process suppression on Mac
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-12-19  Kiran Muppala  <cmuppala@apple.com>
2
3         Adopt new assertion SPI for process suppression on Mac
4         https://bugs.webkit.org/show_bug.cgi?id=105378
5
6         Reviewed by Mark Rowe.
7
8         Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
9         This should be replaced with a new assertion SPI specific to process suppression.
10
11         * Shared/ChildProcess.cpp:
12         (WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
13         * Shared/ChildProcess.h:
14         (WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion.
15         * Shared/mac/ChildProcessMac.mm:
16         (WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the
17         occlusion state has changed and take or release a process visible assertion accordingly.
18         (WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
19         a process visible assertion also sets the timer coalescing policy appropriately.  Set the occlusion
20         state to false on initialization.
21
22 2012-12-19  Alexey Proskuryakov  <ap@apple.com>
23
24         <rdar://problem/12890242> [WK2 NetworkProcess] Client doesn't receive SSL certificates
25         https://bugs.webkit.org/show_bug.cgi?id=105467
26
27         Reviewed by Brady Eidson.
28
29         * NetworkProcess/NetworkResourceLoader.cpp:
30         (WebKit::NetworkResourceLoader::didReceiveResponse):
31         * Shared/mac/PlatformCertificateInfo.mm:
32         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
33         * WebProcess/Network/WebResourceLoader.cpp:
34         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
35         * WebProcess/Network/WebResourceLoader.h:
36         * WebProcess/Network/WebResourceLoader.messages.in:
37         Pass certificate chain over IPC, so that we could ultimately send it to client
38         via WebPageProxy::DidCommitLoadForFrame message.
39
40         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
41         Initialize a WKSI function we've been missing.
42
43 2012-12-19  Jon Lee  <jonlee@apple.com>
44
45         Add a function to set the origin hash table
46         https://bugs.webkit.org/show_bug.cgi?id=105447
47         <rdar://problem/12910985>
48
49         Reviewed by Brian Weinstein.
50
51         Add a new API called WKContextSetPlugInAutoStartOriginHashes. It assigns the table of hashes,
52         keyed by main frame origin, to the WebContext. That, in turn, notifies all existing web
53         processes, so that each web process can update its copy of the auto-start hashes.
54
55         * UIProcess/API/C/WKContext.cpp:
56         (WKContextSetPlugInAutoStartOriginHashes): To clear the table, an empty dictionary must be
57         provided.
58         * UIProcess/API/C/WKContext.h:
59
60         * UIProcess/WebContext.cpp:
61         (WebKit::WebContext::setPlugInAutoStartOriginHashes): Forward to PlugInAutoStartProvider.
62         * UIProcess/WebContext.h:
63
64         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
65         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Clear the map and set of hashes,
66         and convert the data from the provided dictionary. Also add it to a temporary vector, which will
67         be used to pass along to all of the active web processes.
68         * UIProcess/Plugins/PlugInAutoStartProvider.h:
69
70         * WebProcess/WebProcess.messages.in: Add plugInAutoStartOriginsChanged. Takes in a vector of
71         the new set of hashes.
72         * WebProcess/WebProcess.cpp:
73         (WebKit::WebProcess::plugInAutoStartOriginsChanged): Clear the existing set, and copy the new
74         hashes.
75         * WebProcess/WebProcess.h:
76
77 2012-12-18  Jon Lee  <jonlee@apple.com>
78
79         Notify context client of change to table, and allow client to get a copy of it
80         https://bugs.webkit.org/show_bug.cgi?id=105364
81         <rdar://problem/12906267>
82
83         Reviewed by Brady Eidson.
84
85         Add a callback to notify the context client that the origin hashes have changed.
86         The client may choose to get a copy of that table and save it to disk.
87
88         * UIProcess/API/C/WKContext.cpp:
89         (WKContextCopyPlugInAutoStartOriginHashes): Added to the context client.
90         * UIProcess/API/C/WKContext.h:
91         * UIProcess/WebContext.cpp:
92         (WebKit::WebContext::plugInAutoStartOriginHashes): Return a copy of the origin hash
93         table.
94         * UIProcess/WebContext.h:
95
96         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
97         (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): When the origin is added to
98         the table, notify the context client.
99         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Create a copy of the
100         table.
101         * UIProcess/Plugins/PlugInAutoStartProvider.h:
102
103         * UIProcess/WebContextClient.cpp:
104         (WebKit::WebContextClient::plugInAutoStartOriginHashesChanged): Call the client.
105         * UIProcess/WebContextClient.h:
106
107 2012-12-19  Alexis Menard  <alexis@webkit.org>
108
109         Implement CSS parsing for CSS transitions unprefixed.
110         https://bugs.webkit.org/show_bug.cgi?id=104804
111
112         Reviewed by Dean Jackson.
113
114         Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
115         to cover the work of unprefixing Transforms, Animations and 
116         Transitions. It will let the possibility of each ports to turn it off 
117         in their release branches until we're confident that these CSS 
118         properties are ready to be unprefixed.
119
120         * Configurations/FeatureDefines.xcconfig:
121
122 2012-12-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
123
124         [EFL][WK2][AC] Avoid creating an empty surface.
125         https://bugs.webkit.org/show_bug.cgi?id=105410
126
127         Reviewed by Kenneth Rohde Christiansen.
128
129         Ensure that the view has valid size before creating the surface.
130
131         * UIProcess/API/efl/EvasGLSurface.h:
132         (WebKit::EvasGLSurface::create):
133         * UIProcess/API/efl/EwkViewImpl.cpp:
134         (EwkViewImpl::displayTimerFired):
135
136 2012-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
137
138         [EFL][Qt][WK2] Going back to 47-amazing-css3-animation-demos shows nothing or wrong position
139         https://bugs.webkit.org/show_bug.cgi?id=104414
140
141         Reviewed by Simon Hausmann.
142
143         When contents size changes, make sure to apply any pending position
144         change if possible.
145
146         * UIProcess/PageViewportController.cpp:
147         (WebKit::PageViewportController::didChangeContentsSize):
148
149 2012-12-19  Alberto Garcia  <agarcia@igalia.com>
150
151         [GTK] [WK2] Trailing semicolon in an #include line
152         https://bugs.webkit.org/show_bug.cgi?id=105418
153
154         Reviewed by Xan Lopez.
155
156         * UIProcess/gtk/WebContextGtk.cpp:
157         Remove trailing semicolon in #include line.
158
159 2012-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
160
161         [EFL][WK2] Move deviceScaleFactor to our view as it's view related
162         https://bugs.webkit.org/show_bug.cgi?id=105412
163
164         Reviewed by Laszlo Gombos.
165
166         * UIProcess/API/efl/EwkViewImpl.cpp:
167         (EwkViewImpl::setDeviceScaleFactor):
168         (EwkViewImpl::transformFromScene):
169         * UIProcess/API/efl/EwkViewImpl.h:
170         (EwkViewImpl):
171         * UIProcess/API/efl/ewk_view.cpp:
172         (ewk_view_device_pixel_ratio_set):
173
174 2012-12-19  Zeno Albisser  <zeno@webkit.org>
175
176         [Qt] Missing vtable for LoadStartedCatcher.
177         https://bugs.webkit.org/show_bug.cgi?id=105313
178
179         Properly splitting class declarations and function
180         definitions into headers/cpp-files.
181         This makes including util.moc redundant
182         and avoids the well known vtable issues with QObject classes.
183
184         Reviewed by Simon Hausmann.
185
186         * UIProcess/API/qt/tests/util.cpp:
187         (LoadSpy::LoadSpy):
188         (LoadSpy::onLoadingChanged):
189         * UIProcess/API/qt/tests/util.h:
190         (LoadSpy):
191
192 2012-12-19  KyungTae Kim  <ktf.kim@samsung.com>
193
194         Unused parameters on WebContext.cpp
195         https://bugs.webkit.org/show_bug.cgi?id=105395
196
197         Reviewed by Kentaro Hara.
198
199         Because the parameters 'certficate', 'host' are not used if !ENABLE(NETWORK_PROCESS), 
200         use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
201
202         * UIProcess/WebContext.cpp:
203         (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
204
205 2012-12-18  Alexey Proskuryakov  <ap@apple.com>
206
207         Remove unnecessary functions from CookiesStrategy
208         https://bugs.webkit.org/show_bug.cgi?id=105369
209
210         Reviewed by Brady Eidson.
211
212         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
213         * NetworkProcess/NetworkConnectionToWebProcess.h:
214         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
215         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
216         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
217
218         * WebProcess/Cookies/WebCookieManager.cpp: Call PlatformCookieJar directly.
219         Cookie messages to NetworkProcess should not be sent through WebProcess. In a future
220         patch, I'll make WebCookieManagerProxy message NetworkProcess instead.
221
222 2012-12-18  Jon Lee  <jonlee@apple.com>
223
224         [WK2] Create a context client
225         https://bugs.webkit.org/show_bug.cgi?id=105316
226         <rdar://problem/12901762>
227
228         Reviewed by Brady Eidson.
229
230         Web contexts already have clients related to downloads or history.
231         Miscellaneous callbacks can be grouped into a generic client for the
232         web context.
233
234         * UIProcess/API/C/WKContext.cpp:
235         (WKContextSetClient): Set the client for the context.
236         * UIProcess/API/C/WKContext.h: Define a new, empty WKContextClient.
237
238         * UIProcess/WebContext.cpp:
239         (WebKit::WebContext::initializeClient):
240         * UIProcess/WebContext.h: Add a variable for the new client. Move the
241         download client so that all the clients are grouped together.
242         (WebKit::WebContext::client): Returns the context client.
243         * UIProcess/WebContextClient.cpp: Added. Currently empty, but will be
244         filled out in a pending patch.
245         * UIProcess/WebContextClient.h: Added.
246
247         Add WebContextClient.{h,cpp}.
248         * CMakeLists.txt:
249         * GNUmakefile.list.am:
250         * Target.pri:
251         * WebKit2.xcodeproj/project.pbxproj:
252         * win/WebKit2.vcproj:
253
254 2012-12-18  Ivan Krstić  <ike@apple.com>
255
256         <rdar://problem/12720539> per-pid private temporary directories for sandboxed webkit2 plugins
257
258         Reviewed by Sam Weinig, Alexey Proskuryakov, Anders Carlsson.
259
260         Previously we assigned each PluginProcess a private temporary and
261         cache directory based on the bundle name of the plugin that was
262         running. This sometimes led to overly-long pathnames (sockets on OS X
263         can only be 103 characters long), and didn't provide isolation between
264         multiple running instances of the same plugin on behalf of different
265         processes. We now assign each PluginProcess its own private
266         temporary and cache directory regardless of which plugin it's running,
267         and make an attempt to clean these up when the process terminates.
268
269         We also pass the temporary directory into the sandbox
270         profile as a parameter, in case the plugin profile needs to apply
271         additional rules beyond the default read/write policy.
272
273         * PluginProcess/mac/PluginProcessMainMac.mm:
274         (WebKit::PluginProcessMain):
275         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
276         (enterSandbox):
277
278 2012-12-18  Beth Dakin  <bdakin@apple.com>
279
280         https://bugs.webkit.org/show_bug.cgi?id=102579
281         [mac] Enable scaled cursors
282
283         Reviewed by Dean Jackson.
284
285         * Configurations/FeatureDefines.xcconfig:
286
287 2012-12-18  Joseph Pecoraro  <pecoraro@apple.com>
288
289         [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
290         https://bugs.webkit.org/show_bug.cgi?id=104279
291
292         Reviewed by David Kilzer.
293
294         Add a build phase to check the public WebKit2 headers for
295         inappropriate macros. Also set the executable as an input
296         path on the other check-* build phases.
297
298         * WebKit2.xcodeproj/project.pbxproj:
299
300 2012-12-18  Jer Noble  <jer.noble@apple.com>
301
302         REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 / media full screen breaks Safari windows
303         https://bugs.webkit.org/show_bug.cgi?id=104610
304
305         Reviewed by Anders Carlsson.
306
307         When a user clicks on the menu-bar exit fullscreen button, that skips notifying the document that 
308         the window is exiting fullscreen and tearing down the placeholder. Manually call that part of the code
309         when we detect that it has been skipped.
310
311         * UIProcess/mac/WKFullScreenWindowController.mm:
312         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
313
314 2012-12-18  Brady Eidson  <beidson@apple.com>
315
316         WebProcesses often crash if they access the network after a NetworkProcess crash.
317         <rdar://problem/12865789> and https://bugs.webkit.org/show_bug.cgi?id=105338
318
319         Reviewed by Alexey Proskuryakov.
320
321         After a NetworkProcess crash we should try to re-establish a connection to a new NetworkProcess
322         when it is needed.
323
324         If that attempt fails, then the WebProcess should "cleanly" crash.
325
326         * WebProcess/WebProcess.cpp:
327         (WebKit::WebProcess::networkConnection):
328
329 2012-12-17  Sam Weinig  <sam@webkit.org>
330
331         Try to fix the Mac build.
332
333         * NetworkProcess/mac/NetworkProcessMac.mm:
334
335 2012-12-17  Halton Huo  <halton.huo@intel.com>
336
337         [EFL] Add ecore_imf_evas to FindEcore.cmake
338         https://bugs.webkit.org/show_bug.cgi?id=105159
339
340         Reviewed by Laszlo Gombos.
341
342         * PlatformEfl.cmake: Add ECORE_IMF_EVAS_LIBRARIES to WebProcess_LIBRARIES
343
344 2012-12-17  Huang Dongsung  <luxtella@company100.net>
345
346         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
347         https://bugs.webkit.org/show_bug.cgi?id=103959
348
349         Reviewed by Kenneth Rohde Christiansen.
350
351         Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore.
352         It has two problem.
353         1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent
354         TiledBackingStore from asynchronously sending UpdateTile message to UI
355         Process.
356         2. CreateTile and RemoveTile message can be sent to UI Process at any time.
357
358         This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly.
359         It means only during flushing layer states, CoordinatedGraphicsLayer
360         calls methods of TiledBackingStore, which indirectly call createTile(),
361         updateTile() and removeTile().
362
363         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
364         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
365         (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector):
366         (WebCore::CoordinatedGraphicsLayer::setContentsScale):
367         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
368         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):
369         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
370         (WebCore::CoordinatedGraphicsLayer::createTile):
371         (WebCore::CoordinatedGraphicsLayer::updateTile):
372         (WebCore::CoordinatedGraphicsLayer::removeTile):
373         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
374         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
375         (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment):
376         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
377         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
378         (CoordinatedGraphicsLayerClient):
379         (CoordinatedGraphicsLayer):
380         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
381         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
382         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
383         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
384         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
385
386 2012-12-17  Brady Eidson  <beidson@apple.com>
387
388         Can't visit sites with untrusted certs with the NetworkProcess.
389         <rdar://problem/12885641> and https://bugs.webkit.org/show_bug.cgi?id=105235
390
391         Reviewed by Sam Weinig.
392
393         For Mac the missing functionality is being able to tell the network layer in the
394         NetworkProcess to temporarily accept a certificate chain for the given host.
395
396         This patch adds some SPI supporting the way this works on Mac.
397
398         Add a message and Mac implementation for "allowSpecificHTTPSCertificateForHost":
399         * NetworkProcess/NetworkProcess.h:
400         * NetworkProcess/NetworkProcess.messages.in:
401         * NetworkProcess/mac/NetworkProcessMac.mm:
402         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
403
404         Add SPI for the embedding app"
405         * UIProcess/API/C/WKContext.cpp:
406         (WKContextAllowSpecificHTTPSCertificateForHost):
407         * UIProcess/API/C/WKContextPrivate.h:
408
409         * UIProcess/WebContext.cpp:
410         (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
411         * UIProcess/WebContext.h:
412
413 2012-12-17  Huang Dongsung  <luxtella@company100.net>
414
415         [CoordinatedGraphics] Assertion hit in WebKit::LayerTreeRenderer::setLayerState()
416         https://bugs.webkit.org/show_bug.cgi?id=104518
417
418         Reviewed by Noam Rosenthal.
419
420         CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() must perform
421         only during flushing pending layer changes in CoordinatedLayerTreeHost.
422         RenderLayerCompositor can call GraphicsLayer::flushCompositingState() regardless
423         of CoordinatedLayerTreeHost and it breaks our assumption. It means that
424         CoordinatedGraphicsLayer can send messages although m_waitingForUIProcess in
425         CoordinatedLayerTreeHost is true.
426
427         Assertion hits because of the same reason. If RenderLayerCompositor calls
428         flushCompositingState() before the first CoordinatedLayerTreeHost::flushPendingLayerChanges(),
429         SetCompositingLayerState message can be prior to SetRootCompositingLayer message.
430
431         We fix this by ensuring that we perform the layer flush only in the code
432         path originating from CoordinatedLayerTreeHost.
433
434         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
435         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
436         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
437         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
438         (CoordinatedGraphicsLayerClient):
439         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
440         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
441         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
442         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
443
444 2012-12-17  Alexey Proskuryakov  <ap@apple.com>
445
446         <rdar://problem/12895354> NetworkProcess should not exit after downloading
447         https://bugs.webkit.org/show_bug.cgi?id=105209
448
449         Reviewed by Anders Carlsson.
450
451         * NetworkProcess/NetworkProcess.cpp:
452         (WebKit::NetworkProcess::shouldTerminate): This process should never voluntarily
453         terminate, because it keeps session auth and cookies.
454
455 2012-12-17  Thiago Marcos P. Santos  <thiago.santos@intel.com>
456
457         [EFL] Unit tests process hanging on WK2 Release bots
458         https://bugs.webkit.org/show_bug.cgi?id=105021
459
460         Reviewed by Kenneth Rohde Christiansen.
461
462         Follow-up of r137605, which made it more difficult to reproduce
463         the race condition but doesn't entirely solve the problem. Now
464         we are handling only points in the middle of the fork()/exec().
465
466         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
467         (WebKit::ProcessLauncher::launchProcess):
468
469 2012-12-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
470
471         [EFL][WK2] window_create doesn't receive the url
472         https://bugs.webkit.org/show_bug.cgi?id=105184
473
474         Reviewed by Alexis Menard.
475
476         Pass the url to the window_create method.
477
478         * UIProcess/API/efl/EwkViewImpl.cpp:
479         (EwkViewImpl::createNewPage):
480         * UIProcess/API/efl/EwkViewImpl.h:
481         (EwkViewImpl):
482         * UIProcess/API/efl/ewk_view.h:
483         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
484         (createDefaultWindow):
485         (createWindow):
486         * UIProcess/efl/PageUIClientEfl.cpp:
487         (WebKit::PageUIClientEfl::createNewPage):
488
489 2012-12-17  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
490
491         [WK2] TiledBackingStore: css3/device-adapt/viewport-width-not-affecting-next-page.html is flaky
492         https://bugs.webkit.org/show_bug.cgi?id=105131
493
494         Reviewed by Kenneth Rohde Christiansen.
495
496         The problem was lead by truncation of the scaled result for 'contentFixedSize'.
497         Fixed now with using FloatSize::scale() instead of IntSize::scale().
498
499         * WebProcess/WebPage/WebPage.cpp:
500         (WebKit::WebPage::sendViewportAttributesChanged):
501
502 2012-12-17  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
503
504         [Qt] remove some unnecessary CONFIG additions
505
506         Reviewed by Simon Hausmann.
507
508         qt is already added by spec_pre.prf, warn_on and depend_includepath by
509         default_pre.prf.
510
511         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
512         * UIProcess/API/qt/tests/qmltests/WebView.pro:
513
514 2012-12-17  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
515
516         [Qt] rely on automatic output directory setup
517
518         Reviewed by Simon Hausmann.
519
520         Now being a proper qt module (by virtue of having load(qt_build_config)
521         in .qmake.conf), webkit gets the path setup goodies for free.
522
523         This also fixes Makefile.api.Debug/Release trying to generate qrc_WebKit.cpp
524         at the same time, instead of the debug and release version ending up in different
525         directories as they should.
526
527         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
528         * UIProcess/API/qt/tests/qmltests/WebView.pro:
529
530 2012-12-17  Thiago Marcos P. Santos  <thiago.santos@intel.com>
531
532         [EFL] Unit tests process hanging on WK2 Release bots
533         https://bugs.webkit.org/show_bug.cgi?id=105021
534
535         Reviewed by Kenneth Rohde Christiansen.
536
537         Do not allocate memory in the middle of a fork()/exec().
538         EFL uses global FastMalloc new operator and when we fork(), the
539         process is in a very delicate state. We were being lucky most of the
540         time, but sometimes FastMalloc enters in a busy wait and hangs
541         because it's data structures cannot be trusted after the fork().
542
543         This explains why sometimes we see UIProcess hanging on the bots:
544         they are in fact UIProcess trying to exec() into a WebProcess but
545         hanged just after the fork(). CMake test runner kills the original
546         UIProcess due to timeout and the buggy one stays forever.
547
548         * PlatformEfl.cmake:
549         Set the timeout back to the original value.
550
551         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
552         (WebKit::ProcessLauncher::launchProcess):
553         I'm keeping the original behavior, including the call to
554         system() when wrapping the WebProcess on Debug mode. This
555         should be changed to exec() in another patch.
556
557 2012-12-17  Csaba Osztrogonác  <ossy@webkit.org>
558
559         Fix the Qt Windows build after r137803
560         https://bugs.webkit.org/show_bug.cgi?id=105152
561
562         Reviewed by Kentaro Hara.
563
564         * Shared/CacheModel.h:
565
566 2012-12-16  Tim Horton  <timothy_horton@apple.com>
567
568         PDFPlugin: The "Open in Preview" HUD button should work
569         https://bugs.webkit.org/show_bug.cgi?id=102448
570         <rdar://problem/12695729>
571
572         Reviewed by Alexey Proskuryakov.
573
574         Implement the "Open in Preview" button for PDFPlugin, by moving the implementation from PDFViewController
575         onto WebPageProxyMac, and reusing it in PDFViewController and PDFPlugin.
576
577         * UIProcess/API/mac/PDFViewController.h:
578         (PDFViewController): Remove unnecessary members in favor of a UUID that identifies our PDF on disk.
579         * UIProcess/API/mac/PDFViewController.mm:
580         (WebKit::PDFViewController::openPDFInFinder): Move PDFViewController's implementation of openPDFInFinder
581         and related functions to WebPageProxyMac. This will allow it to be shared with PDFPlugin.
582         * UIProcess/WebPageProxy.h:
583         (WebPageProxy): Add savePDFToFileInTemporaryFolderAndOpenWithNativeApplication,
584         savePDFToFileInTemporaryFolderAndOpenWithNativeApplicationRaw, and openPDFFromTemporaryFolderWithNativeApplication.
585         Add m_temporaryPDFFiles, which is used to keep track of the filenames of PDFs that we've saved to disk.
586         * UIProcess/WebPageProxy.messages.in:
587         Add SavePDFToFileInTemporaryFolderAndOpenWithNativeApplication and OpenPDFFromTemporaryFolderWithNativeApplication.
588         * UIProcess/mac/WebPageProxyMac.mm:
589         (WebKit::temporaryPDFDirectoryPath): Copied from PDFViewController. Construct the path to a
590         WebKitPDFs temporary directory into which PDFs to be opened with a native application are downloaded.
591         (WebKit::pathToPDFOnDisk): Copied from PDFViewController. Combine temporaryPDFDirectoryPath
592         with the suggested filename for the given PDF, creating a new filename if the file already exists.
593         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw):
594         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
595         Save the given PDF data to a temporary file, given the suggested filename. This inserts the
596         filename used into m_temporaryPDFFiles, where it can later be retrieved by UUID when asked
597         to open the PDF again in a native application. Then, open it with NSWorkspace.
598         (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication):
599         Open the previously saved PDF file with NSWorkspace, referenced by UUID.
600         We identify the file by UUID instead of name so that only the UIProcess needs
601         to keep track of the actual filename, and so that the WebProcess
602         cannot hand an arbitrary filename back to the UIProcess to open.
603         * WebProcess/Plugins/PDF/PDFPlugin.h:
604         (PDFPlugin): Add openWithNativeApplication and storage for the UUID that identifies our PDF on disk.
605         * WebProcess/Plugins/PDF/PDFPlugin.mm:
606         (-[WKPDFLayerControllerDelegate openWithPreview]): Forward openWithPreview to PDFPlugin's openWithNativeApplication.
607         (WebKit::PDFPlugin::saveToPDF):
608         Hand raw data to WebPage and have it send the message to WebPageProxy instead of using IPC types in PDFPlugin.
609         (WebKit::PDFPlugin::openWithNativeApplication):
610         Ask WebPage to save the current PDF to a temporary directory and open it with a native application.
611         If we've already downloaded the PDF (and have a non-null m_temporaryPDFUUID),
612         we can just open the existing file.
613         * WebProcess/WebPage/WebPage.cpp:
614         (WebKit::WebPage::savePDFToFileInDownloadsFolder): Hand the PDF data to WebPageProxy to save.
615         (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication): Hand the PDF data to WebPageProxy to save and open.
616         * WebProcess/WebPage/WebPage.h:
617         (WebPage): Add savePDFToFileInDownloadsFolder and savePDFToTemporaryFolderAndOpenWithNativeApplication.
618
619 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
620
621         [WK2] Remote Web Inspector requires the inspector
622         https://bugs.webkit.org/show_bug.cgi?id=105088
623
624         Reviewed by Sam Weinig.
625
626         Inspector server should not be started without inspector.
627
628         * config.h:
629
630 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
631
632         Fix unused parameter compile warnings
633         https://bugs.webkit.org/show_bug.cgi?id=105089
634
635         Reviewed by Kentaro Hara.
636
637         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
638
639         * UIProcess/API/efl/ewk_view.cpp:
640         (ewk_view_inspector_show):
641         (ewk_view_inspector_close):
642
643 2012-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
644
645         [EFL][WK2] Header files of ewk_context_menu should be installed
646         https://bugs.webkit.org/show_bug.cgi?id=105069
647
648         Reviewed by Gyuyoung Kim.
649
650         * PlatformEfl.cmake:
651         Modified to install ewk_context_menu.h and ewk_context_menu_item.h which
652         are included in EWebKit2.h
653
654 2012-12-16  Alexey Proskuryakov  <ap@apple.com>
655
656         <rdar://problem/12886898> Bundle uploads don't work
657         https://bugs.webkit.org/show_bug.cgi?id=105149
658
659         Reviewed by Sam Weinig.
660
661         * NetworkProcess/NetworkResourceLoader.cpp:
662         (WebKit::NetworkResourceLoader::didReceiveResponse):
663         (WebKit::NetworkResourceLoader::didFail):
664         Clean up generated files when they are no longer needed. This has to be done before FormData
665         destruction. This duplicates same work done in WebProcess, but duplicaiton is safe, and may
666         be helpful if one of the sides prematurely exits.
667
668 2012-12-16  Jon Lee  <jonlee@apple.com>
669
670         Allow built-in PDF plugin and plugin documents to auto-start
671         https://bugs.webkit.org/show_bug.cgi?id=105000
672         <rdar://problem/12633351>
673
674         Reviewed by Sam Weinig.
675
676         Overrides PluginViewBase::shouldAlwaysAutoStart().
677         * WebProcess/Plugins/PluginView.cpp:
678         (WebKit::PluginView::shouldAlwaysAutoStart): If there's no plug-in, return the default,
679         otherwise return the plug-in's behavior.
680         * WebProcess/Plugins/PluginView.h:
681
682         * WebProcess/Plugins/Plugin.h:
683         (WebKit::Plugin::shouldAlwaysAutoStart): Added. By default, return false.
684         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Built-in PDF plug-ins should auto-start.
685
686 2012-12-16  Huang Dongsung  <luxtella@company100.net>
687
688         Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
689         https://bugs.webkit.org/show_bug.cgi?id=104880
690
691         Reviewed by Noam Rosenthal.
692
693         This patch changes two points.
694         1. Remove layerByIDMap() in CoordinatedGraphicsLayer because it is unused.
695         2. Remove code swapping m_registeredLayers in CoordinatedLayerTreeHost because
696         setCoordinator(0) does not call detachLayer().
697
698         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
699         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
700         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
701         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
702         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
703
704 2012-12-16  Anders Carlsson  <andersca@apple.com>
705
706         Remove the random crash thread
707         https://bugs.webkit.org/show_bug.cgi?id=105147
708
709         Reviewed by Sam Weinig.
710
711         Remove old crashy code.
712
713         * WebProcess/WebProcess.cpp:
714         (WebKit::WebProcess::initialize):
715
716 2012-12-16  Anders Carlsson  <andersca@apple.com>
717
718         Implement authentication for downloads
719         https://bugs.webkit.org/show_bug.cgi?id=105146
720         <rdar://problem/12239483>
721
722         Reviewed by Sam Weinig.
723
724         * NetworkProcess/NetworkProcess.cpp:
725         (WebKit::NetworkProcess::NetworkProcess):
726         (WebKit::NetworkProcess::initialize):
727         (WebKit::NetworkProcess::didReceiveMessage):
728         (WebKit::NetworkProcess::didReceiveSyncMessage):
729         (WebKit::NetworkProcess::downloadsAuthenticationManager):
730         * NetworkProcess/NetworkProcess.h:
731         * UIProcess/Downloads/DownloadProxy.cpp:
732         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
733         * WebProcess/Downloads/Download.cpp:
734         (WebKit::Download::didReceiveAuthenticationChallenge):
735         * WebProcess/Downloads/DownloadManager.cpp:
736         (WebKit::DownloadManager::downloadsAuthenticationManager):
737         * WebProcess/Downloads/DownloadManager.h:
738         * WebProcess/Downloads/mac/DownloadMac.mm:
739         * WebProcess/WebProcess.cpp:
740         (WebKit::WebProcess::downloadsAuthenticationManager):
741         (WebKit::WebProcess::didReceiveSyncMessage):
742         * WebProcess/WebProcess.h:
743
744 2012-12-16  Huang Dongsung  <luxtella@company100.net>
745
746         Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
747         https://bugs.webkit.org/show_bug.cgi?id=104880
748
749         Reviewed by Noam Rosenthal.
750
751         Delete backing stores explicitly in ~CoordinatedLayerTreeHost().
752
753         Clarify the lifecycle of backing stores in CoordinatedGraphicsLayer.
754         Currently, CoordinatedGraphicsLayer::removeTile() checks if m_coordinator
755         exists, because ~CoordinatedLayerTreeHost() sets m_coordinator in
756         CoordinatedGraphicsLayer to 0. This patch purges backing stores before setting
757         m_coordinator to 0. This change makes code more readable.
758
759         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
760         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
761         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
762         (WebCore::CoordinatedGraphicsLayer::createTile):
763         (WebCore::CoordinatedGraphicsLayer::updateTile):
764         (WebCore::CoordinatedGraphicsLayer::removeTile):
765         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
766         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
767
768 2012-12-16  Anders Carlsson  <andersca@apple.com>
769
770         Authentication manager cleanup
771         https://bugs.webkit.org/show_bug.cgi?id=105144
772
773         Reviewed by Sam Weinig.
774
775         Some cleanup to make it possible to reuse the authentication manager from the network process.
776
777         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
778         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
779         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
780         (WebKit::AuthenticationChallengeProxy::useCredential):
781         (WebKit::AuthenticationChallengeProxy::cancel):
782         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
783         (WebKit::AuthenticationChallengeProxy::create):
784         (AuthenticationChallengeProxy):
785         * UIProcess/Downloads/DownloadProxy.cpp:
786         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
787         * UIProcess/WebPageProxy.cpp:
788         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
789         * WebProcess/Authentication/AuthenticationManager.cpp:
790         (WebKit::AuthenticationManager::AuthenticationManager):
791         (WebKit::AuthenticationManager::setConnection):
792         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
793         (WebKit::AuthenticationManager::useCredentialForChallenge):
794         * WebProcess/Authentication/AuthenticationManager.h:
795         * WebProcess/Downloads/Download.cpp:
796         (WebKit::Download::didReceiveAuthenticationChallenge):
797         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
798         (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
799         * WebProcess/WebProcess.cpp:
800         (WebKit::WebProcess::WebProcess):
801         (WebKit::WebProcess::initialize):
802         * WebProcess/WebProcess.h:
803         (WebKit::WebProcess::authenticationManager):
804         (WebProcess):
805
806 2012-12-16  Anders Carlsson  <andersca@apple.com>
807
808         Rudimentary support for main resource downloads
809         https://bugs.webkit.org/show_bug.cgi?id=105141
810
811         Reviewed by Sam Weinig.
812
813         For now, instead of converting a main resource load into a download, just cancel it and start
814         a new separate download.
815
816         * NetworkProcess/NetworkProcess.cpp:
817         (WebKit::NetworkProcess::downloadRequest):
818         Call through to the download manager.
819         
820         (WebKit::NetworkProcess::cancelDownload):
821         Call through to the download manager.
822
823         * NetworkProcess/NetworkProcess.messages.in:
824         Add new messages.
825
826         * UIProcess/Downloads/DownloadProxy.cpp:
827         (WebKit::DownloadProxy::cancel):
828         Send the cancel message to the network process when needed.
829
830         * UIProcess/WebContext.cpp:
831         (WebKit::WebContext::download):
832         Handle the network process case.
833
834         * UIProcess/WebPageProxy.cpp:
835         (WebKit::WebPageProxy::WebPageProxy):
836         (WebKit::WebPageProxy::receivedPolicyDecision):
837         (WebKit::WebPageProxy::decidePolicyForResponse):
838         Keep track of the current request when calling decidePolicyForResponse.
839
840 2012-12-16  Andy Estes  <aestes@apple.com>
841
842         [WebKit2] CustomProtocolManager should intercept messages of class MessageClassCustomProtocolManager sent to the network process
843         https://bugs.webkit.org/show_bug.cgi?id=105137
844
845         Reviewed by Anders Carlsson.
846
847         * NetworkProcess/NetworkProcess.cpp:
848         (WebKit::NetworkProcess::didReceiveMessage):
849
850 2012-12-16  Levi Weintraub  <leviw@chromium.org>
851
852         Push pixel snapping logic into TransformState
853         https://bugs.webkit.org/show_bug.cgi?id=101779
854
855         Reviewed by Simon Fraser.
856
857         Eliminating use of SnapOffsetForTransforms as it's no longer needed.
858
859         * WebProcess/FullScreen/WebFullScreenManager.cpp:
860         (WebKit::screenRectOfContents):
861
862 2012-12-16  Anders Carlsson  <andersca@apple.com>
863
864         Rename WebFrame::convertHandleToDownload to convertMainResourceLoadToDownload
865         https://bugs.webkit.org/show_bug.cgi?id=105134
866
867         Reviewed by Sam Weinig.
868
869         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
870         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
871         * WebProcess/WebPage/WebFrame.cpp:
872         (WebKit::WebFrame::convertMainResourceLoadToDownload):
873         * WebProcess/WebPage/WebFrame.h:
874         (WebFrame):
875
876 2012-12-15  Anders Carlsson  <andersca@apple.com>
877
878         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
879         https://bugs.webkit.org/show_bug.cgi?id=105122
880
881         Reviewed by Andreas Kling.
882
883         Update for WebCore changes.
884
885         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
886         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
887         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
888         (WebFrameLoaderClient):
889
890 2012-12-15  Anders Carlsson  <andersca@apple.com>
891
892         Another build fix.
893
894         * UIProcess/WebContext.cpp:
895         (WebKit::WebContext::createDownloadProxy):
896
897 2012-12-15  Andy Estes  <aestes@apple.com>
898
899         [WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections for messaging
900         https://bugs.webkit.org/show_bug.cgi?id=105124
901
902         Reviewed by Anders Carlsson.
903
904         Remove CustomProtocolManagerProxy's assumption that all messages go to
905         a web process. Have it take a ChildProcessProxy instead and extract its
906         connection.
907
908         Similarly, remove CustomProtocolManager's assumption that all messages
909         go through a shared WebProcess. Initialize the shared CustomProtocolManager
910         with a Connection object instead.
911
912         * NetworkProcess/NetworkProcess.cpp:
913         (WebKit::NetworkProcess::initializeNetworkProcess): Initialize the
914         shared CustomProtocolManager with the NetworkProcess's connection to
915         the UI process.
916         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
917         (WebKit::CustomProtocolManager::connection): Assert m_connection is
918         non-0 and return it.
919         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
920         (+[WKCustomProtocol canInitWithRequest:]): Remove an unnecessary
921         namespace.
922         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]): Ditto.
923         (-[WKCustomProtocol startLoading]): Send a message on the
924         CustomProtocolManager's connection rather than assuming there is a
925         shared WebProcess in our address space.
926         (-[WKCustomProtocol stopLoading]): Ditto.
927         (WebKit::CustomProtocolManager::initialize): Initialize the shared
928         CustomProtocolManager with a Connection and register our custom
929         protocol handler with NSURLProtocol.
930         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
931         (WebKit):
932         (CustomProtocolManagerProxy): Take a ChildProcessProxy* rather than a
933         WebProcessProxy*.
934         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
935         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Ditto.
936         (WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
937         * UIProcess/Network/NetworkProcessProxy.cpp:
938         (WebKit::NetworkProcessProxy::NetworkProcessProxy): Instantiate a
939         CustomProtocolManagerProxy for the network process.
940         (WebKit::NetworkProcessProxy::didReceiveMessage): Route messages of
941         class MessageClassCustomProtocolManagerProxy to the
942         CustomProtocolManagerProxy.
943         * UIProcess/Network/NetworkProcessProxy.h:
944         * UIProcess/WebProcessProxy.cpp:
945         (WebKit::WebProcessProxy::didReceiveMessage): Assert that we aren't
946         using the network process since we've received a message from a
947         web process's CustomProtocolManager.
948         * WebProcess/WebProcess.cpp:
949         (WebKit::WebProcess::initializeWebProcess): Break CustomProtocolManager
950         initialization out into a helper function.
951         (WebKit::WebProcess::initializeCustomProtocolManager): Initialize our
952         CustomProtocolManager.
953         * WebProcess/WebProcess.h:
954
955 2012-12-15  Anders Carlsson  <andersca@apple.com>
956
957         Happy little Qt build fix.
958
959         * UIProcess/WebContext.cpp:
960         (WebKit::WebContext::download):
961
962 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
963
964         <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
965         https://bugs.webkit.org/show_bug.cgi?id=105120
966
967         Reviewed by Sam Weinig.
968
969         Serialize HTTP body. ResourceRequest serialization cannot (and shouldn't) know about
970         body streams, as used with files.
971
972         * Shared/Network/NetworkResourceLoadParameters.cpp:
973         (WebKit::NetworkResourceLoadParameters::encode):
974         (WebKit::NetworkResourceLoadParameters::decode):
975         * Shared/WebCoreArgumentCoders.cpp:
976         (CoreIPC::::encode):
977
978 2012-12-15  Anders Carlsson  <andersca@apple.com>
979
980         Handle downloads in the network process
981         https://bugs.webkit.org/show_bug.cgi?id=105117
982
983         Reviewed by Sam Weinig.
984
985         Start using the download manager in the network process.
986
987         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
988         (WebKit::NetworkConnectionToWebProcess::startDownload):
989         Call through to the download manager.
990
991         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
992         Add StartDownload message.
993
994         * NetworkProcess/NetworkProcess.cpp:
995         (WebKit::NetworkProcess::downloadManager):
996         Add "singleton" download manager.
997
998         (WebKit::NetworkProcess::didCreateDownload):
999         (WebKit::NetworkProcess::didDestroyDownload):
1000         (WebKit::NetworkProcess::downloadProxyConnection):
1001         Implement DownloadManager::Client.
1002
1003         * UIProcess/Network/NetworkProcessProxy.cpp:
1004         (WebKit::NetworkProcessProxy::didReceiveMessage):
1005         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
1006         Call through to the message receiver map.
1007
1008         * WebProcess/Downloads/Download.cpp:
1009         * WebProcess/Downloads/DownloadManager.cpp:
1010         (WebKit::DownloadManager::downloadProxyConnection):
1011         * WebProcess/Downloads/DownloadManager.h:
1012         Rename connection to downloadProxyConnection.
1013
1014         * WebProcess/WebPage/WebFrame.cpp:
1015         (WebKit::WebFrame::startDownload):
1016         When using the network process, send a message to it with the request that needs to be downloaded.
1017
1018         * WebProcess/WebProcess.cpp:
1019         (WebKit::WebProcess::downloadProxyConnection):
1020         Return the connection to the UI process.
1021
1022 2012-12-15  Sam Weinig  <sam@webkit.org>
1023
1024         NSURLCache should be disabled in the WebProcess when using the NetworkProcess
1025         <rdar://problem/12872266>
1026         https://bugs.webkit.org/show_bug.cgi?id=105119
1027
1028         Reviewed by Alexey Proskuryakov.
1029
1030         Set the size of the NSURLCache to 0 (both disk and memory) in the WebProcess when using
1031         the NetworkProcess.
1032
1033         * WebProcess/mac/WebProcessMac.mm:
1034         (WebKit::WebProcess::platformSetCacheModel):
1035         (WebKit::WebProcess::platformInitializeWebProcess):
1036
1037 2012-12-15  Sam Weinig  <sam@webkit.org>
1038
1039         The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
1040         <rdar://problem/12848505>
1041         https://bugs.webkit.org/show_bug.cgi?id=105115
1042
1043         Reviewed by Anders Carlsson.
1044
1045         * NetworkProcess/NetworkProcess.cpp:
1046         (WebKit::NetworkProcess::NetworkProcess):
1047         (WebKit::NetworkProcess::initializeNetworkProcess):
1048         (WebKit::NetworkProcess::setCacheModel):
1049         * NetworkProcess/NetworkProcess.h:
1050         (NetworkProcess):
1051         * NetworkProcess/mac/NetworkProcessMac.mm:
1052         (WebKit::NetworkProcess::platformInitialize):
1053         (WebKit::memorySize):
1054         (WebKit::volumeFreeSize):
1055         (WebKit::NetworkProcess::platformSetCacheModel):
1056         Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
1057         We should eventually move the calculation of this to the WebContext so it can be done
1058         once.
1059
1060         * Shared/Network/NetworkProcessCreationParameters.cpp:
1061         (WebKit::NetworkProcessCreationParameters::encode):
1062         (WebKit::NetworkProcessCreationParameters::decode):
1063         * Shared/Network/NetworkProcessCreationParameters.h:
1064         (NetworkProcessCreationParameters):
1065         Add the necessary creation parameters to set up the cache.
1066
1067         * UIProcess/Network/NetworkProcessProxy.cpp:
1068         (WebKit::NetworkProcessProxy::didFinishLaunching):
1069         * UIProcess/Network/NetworkProcessProxy.h:
1070         (NetworkProcessProxy):
1071         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
1072         * UIProcess/WebContext.cpp:
1073         (WebKit::WebContext::ensureNetworkProcess):
1074         (WebKit::WebContext::setCacheModel):
1075         * UIProcess/WebContext.h:
1076         (WebKit):
1077         (WebContext):
1078         * UIProcess/mac/WebContextMac.mm:
1079         (WebKit):
1080         (WebKit::WebContext::platformInitializeNetworkProcess):
1081         Move initializing the NetworkProcess to just after creating (matching the WebProcess),
1082         rather than waiting for it finish loading before sending the creation parameters.
1083         Additionally, this moves the setting up of the creation parameters to the WebContext,
1084         as that is where all the interesting state resides (and also matches the WebProcess).
1085
1086 2012-12-15  Andy Estes  <aestes@apple.com>
1087
1088         [WebKit2] Register the custom protocol handler in the network process if it exists
1089         https://bugs.webkit.org/show_bug.cgi?id=105118
1090
1091         Reviewed by Anders Carlsson.
1092
1093         Register our custom protocol handler with NSURLProtocol when starting
1094         up the network process; do not register the custom protocol handler in
1095         web processes if a network process is being used.
1096
1097         * NetworkProcess/NetworkProcess.cpp:
1098         (WebKit::NetworkProcess::initializeNetworkProcess):
1099         * WebProcess/WebProcess.cpp:
1100         (WebKit::WebProcess::initializeWebProcess):
1101         * WebProcess/mac/WebProcessMac.mm:
1102         (WebKit::WebProcess::platformInitializeWebProcess):
1103
1104 2012-12-15  Sam Weinig  <sam@webkit.org>
1105
1106         The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
1107         <rdar://problem/12848505>
1108         https://bugs.webkit.org/show_bug.cgi?id=105115
1109
1110         Reviewed by Anders Carlsson.
1111
1112         * NetworkProcess/NetworkProcess.cpp:
1113         (WebKit::NetworkProcess::NetworkProcess):
1114         (WebKit::NetworkProcess::initializeNetworkProcess):
1115         (WebKit::NetworkProcess::setCacheModel):
1116         * NetworkProcess/NetworkProcess.h:
1117         (NetworkProcess):
1118         * NetworkProcess/mac/NetworkProcessMac.mm:
1119         (WebKit::NetworkProcess::platformInitialize):
1120         (WebKit::memorySize):
1121         (WebKit::volumeFreeSize):
1122         (WebKit::NetworkProcess::platformSetCacheModel):
1123         Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
1124         We should eventually move the calculation of this to the WebContext so it can be done
1125         once.
1126
1127         * Shared/Network/NetworkProcessCreationParameters.cpp:
1128         (WebKit::NetworkProcessCreationParameters::encode):
1129         (WebKit::NetworkProcessCreationParameters::decode):
1130         * Shared/Network/NetworkProcessCreationParameters.h:
1131         (NetworkProcessCreationParameters):
1132         Add the necessary creation parameters to set up the cache.
1133
1134         * UIProcess/Network/NetworkProcessProxy.cpp:
1135         (WebKit::NetworkProcessProxy::didFinishLaunching):
1136         * UIProcess/Network/NetworkProcessProxy.h:
1137         (NetworkProcessProxy):
1138         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
1139         * UIProcess/WebContext.cpp:
1140         (WebKit::WebContext::ensureNetworkProcess):
1141         (WebKit::WebContext::setCacheModel):
1142         * UIProcess/WebContext.h:
1143         (WebKit):
1144         (WebContext):
1145         * UIProcess/mac/WebContextMac.mm:
1146         (WebKit):
1147         (WebKit::WebContext::platformInitializeNetworkProcess):
1148         Move initializing the NetworkProcess to just after creating (matching the WebProcess),
1149         rather than waiting for it finish loading before sending the creation parameters.
1150         Additionally, this moves the setting up of the creation parameters to the WebContext,
1151         as that is where all the interesting state resides (and also matches the WebProcess).
1152
1153 2012-12-15  Andy Estes  <aestes@apple.com>
1154
1155         Clean up the previous build fix; access m_networkProcess directly.
1156
1157         * UIProcess/WebContext.cpp:
1158         (WebKit::WebContext::registerSchemeForCustomProtocol):
1159         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
1160
1161 2012-12-15  Andy Estes  <aestes@apple.com>
1162
1163         Fix the build.
1164
1165         * UIProcess/WebContext.cpp:
1166         (WebKit::WebContext::registerSchemeForCustomProtocol):
1167         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
1168
1169 2012-12-15  Andy Estes  <aestes@apple.com>
1170
1171         [WebKit2] Register schemes with the network process if it is being used
1172         https://bugs.webkit.org/show_bug.cgi?id=105113
1173
1174         Reviewed by Anders Carlsson.
1175
1176         If a WebContext is using the network process, it needs to be told about
1177         scheme (un)registration rather than the context's web processes.
1178
1179         * NetworkProcess/NetworkProcess.cpp:
1180         (WebKit::NetworkProcess::initializeNetworkProcess): Tell the shared
1181         CustomProtocolManager about schemes registered at process creation time.
1182         (WebKit::NetworkProcess::registerSchemeForCustomProtocol): Tell the
1183         shared CustomProtocolManager about a new scheme.
1184         (WebKit::NetworkProcess::unregisterSchemeForCustomProtocol): Remove a
1185         scheme from the shared CustomProtocolManager.
1186         * NetworkProcess/NetworkProcess.h:
1187         * NetworkProcess/NetworkProcess.messages.in: Add registration and
1188         unregistration messages for the NetworkProcess.
1189         * Shared/Network/NetworkProcessCreationParameters.cpp:
1190         (WebKit::NetworkProcessCreationParameters::encode): Encode
1191         urlSchemesRegisteredForCustomProtocols.
1192         (WebKit::NetworkProcessCreationParameters::decode): Decode
1193         urlSchemesRegisteredForCustomProtocols.
1194         * Shared/Network/NetworkProcessCreationParameters.h: Define
1195         urlSchemesRegisteredForCustomProtocols.
1196         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
1197         (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): Populate
1198         urlSchemesRegisteredForCustomProtocols with the current set of schemes.
1199         * UIProcess/WebContext.cpp:
1200         (WebKit::WebContext::registerSchemeForCustomProtocol): Send a new
1201         scheme to either the network process or to the context's web processes.
1202         (WebKit::WebContext::unregisterSchemeForCustomProtocol): Ditto for
1203         removing a scheme.
1204         * UIProcess/WebContext.h:
1205         * UIProcess/mac/WebContextMac.mm:
1206         (WebKit::WebContext::platformInitializeWebProcess): Only populate
1207         urlSchemesRegisteredForCustomProtocols if the network process isn't
1208         being used.
1209         (WebKit::WebContext::registerNotificationObservers):
1210         * WebProcess/mac/WebProcessMac.mm:
1211         (WebKit::WebProcess::platformInitializeWebProcess):
1212         urlSchemesRegisteredForCustomProtocols should only be non-empty if the
1213         network process isn't being used. Assert this.
1214
1215 2012-12-15  Anders Carlsson  <andersca@apple.com>
1216
1217         Remove the unneeded NetworkProcessCrashed message
1218         https://bugs.webkit.org/show_bug.cgi?id=105114
1219
1220         Reviewed by Sam Weinig.
1221
1222         Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
1223         nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
1224         function is called on the connection between the web process and network process.
1225         
1226         Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
1227         thread-safe so this could in theory cause bad crashes.
1228
1229         * UIProcess/Network/NetworkProcessProxy.cpp:
1230         (WebKit::NetworkProcessProxy::didClose):
1231         * WebProcess/WebProcess.cpp:
1232         * WebProcess/WebProcess.h:
1233         (WebProcess):
1234         * WebProcess/WebProcess.messages.in:
1235
1236 2012-12-15  Anders Carlsson  <andersca@apple.com>
1237
1238         Add a DownloadProxyMap object to the NetworkProcessProxy object
1239         https://bugs.webkit.org/show_bug.cgi?id=105112
1240
1241         Reviewed by Sam Weinig.
1242
1243         * UIProcess/Network/NetworkProcessProxy.cpp:
1244         (WebKit::NetworkProcessProxy::createDownloadProxy):
1245         (WebKit::NetworkProcessProxy::didClose):
1246         * UIProcess/Network/NetworkProcessProxy.h:
1247         * UIProcess/WebContext.cpp:
1248         (WebKit::WebContext::createDownloadProxy):
1249         * UIProcess/WebProcessProxy.cpp:
1250         * UIProcess/WebProcessProxy.h:
1251
1252 2012-12-15  Anders Carlsson  <andersca@apple.com>
1253
1254         Move the download proxy map from the web context to the web process proxy
1255         https://bugs.webkit.org/show_bug.cgi?id=105109
1256
1257         Reviewed by Andreas Kling.
1258
1259         More progress towards making downloads work with the networking process. Since downloads are handled by the
1260         web process when not using a networking process, it makes sense for the download proxy map to live in the
1261         web process proxy object.
1262
1263         * UIProcess/WebContext.cpp:
1264         (WebKit::WebContext::WebContext):
1265         (WebKit::WebContext::shouldTerminate):
1266         (WebKit::WebContext::disconnectProcess):
1267         (WebKit::WebContext::download):
1268         (WebKit::WebContext::createDownloadProxy):
1269         * UIProcess/WebContext.h:
1270         (WebContext):
1271         * UIProcess/WebProcessProxy.cpp:
1272         (WebKit::WebProcessProxy::disconnect):
1273         (WebKit::WebProcessProxy::shouldTerminate):
1274         (WebKit):
1275         (WebKit::WebProcessProxy::createDownloadProxy):
1276         * UIProcess/WebProcessProxy.h:
1277         (WebProcessProxy):
1278
1279 2012-12-15  Anders Carlsson  <andersca@apple.com>
1280
1281         DownloadProxy should keep a strong reference to its associated web context
1282         https://bugs.webkit.org/show_bug.cgi?id=105107
1283
1284         Reviewed by Alexey Proskuryakov.
1285
1286         While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or
1287         if the process that's doing the download crashes.
1288
1289         * UIProcess/Downloads/DownloadProxy.cpp:
1290         (WebKit::DownloadProxy::processDidClose):
1291         (WebKit::DownloadProxy::didStart):
1292         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
1293         (WebKit::DownloadProxy::didReceiveResponse):
1294         (WebKit::DownloadProxy::didReceiveData):
1295         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
1296         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
1297         (WebKit::DownloadProxy::didCreateDestination):
1298         (WebKit::DownloadProxy::didFinish):
1299         (WebKit::DownloadProxy::didFail):
1300         (WebKit::DownloadProxy::didCancel):
1301         * UIProcess/Downloads/DownloadProxy.h:
1302         (DownloadProxy):
1303
1304 2012-12-15  Anders Carlsson  <andersca@apple.com>
1305
1306         Remove WebContext::downloadFinished
1307         https://bugs.webkit.org/show_bug.cgi?id=105105
1308
1309         Reviewed by Sam Weinig.
1310
1311         Have DownloadProxyMap manage the message receiver map and remove WebContext::downloadFinished.
1312
1313         * UIProcess/Downloads/DownloadProxy.cpp:
1314         (WebKit::DownloadProxy::didFinish):
1315         (WebKit::DownloadProxy::didFail):
1316         (WebKit::DownloadProxy::didCancel):
1317         * UIProcess/Downloads/DownloadProxyMap.cpp:
1318         (WebKit::DownloadProxyMap::DownloadProxyMap):
1319         (WebKit::DownloadProxyMap::createDownloadProxy):
1320         (WebKit::DownloadProxyMap::downloadFinished):
1321         * UIProcess/Downloads/DownloadProxyMap.h:
1322         (DownloadProxyMap):
1323         * UIProcess/WebContext.cpp:
1324         (WebKit::WebContext::WebContext):
1325         (WebKit::WebContext::createDownloadProxy):
1326         * UIProcess/WebContext.h:
1327
1328 2012-12-15  Sam Weinig  <sam@webkit.org>
1329
1330         Make the NetworkProcess be managed by the WebContext, rather than a singleton NetworkProcessMananger
1331         https://bugs.webkit.org/show_bug.cgi?id=105104
1332
1333         Reviewed by Alexey Proskuryakov.
1334
1335         Move to having the WebContext own and manage the NetworkProcessProxy.
1336
1337         * UIProcess/Network/NetworkProcessManager.cpp: Removed.
1338         * UIProcess/Network/NetworkProcessManager.h: Removed.
1339         * UIProcess/Network/NetworkProcessProxy.cpp:
1340         (WebKit::NetworkProcessProxy::create):
1341         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1342         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
1343         * UIProcess/Network/NetworkProcessProxy.h:
1344         (WebKit):
1345         (NetworkProcessProxy):
1346         * UIProcess/Network/mac/NetworkProcessManagerMac.mm: Removed.
1347         * UIProcess/WebContext.cpp:
1348         (WebKit::WebContext::ensureNetworkProcess):
1349         (WebKit::WebContext::removeNetworkProcessProxy):
1350         (WebKit::WebContext::getNetworkProcessConnection):
1351         (WebKit::WebContext::willStartUsingPrivateBrowsing):
1352         (WebKit::WebContext::willStopUsingPrivateBrowsing):
1353         (WebKit::WebContext::createNewWebProcess):
1354         * UIProcess/WebContext.h:
1355         (WebKit):
1356         (WebContext):
1357         (WebKit::WebContext::networkProcess):
1358         * UIProcess/WebProcessProxy.cpp:
1359         (WebKit::WebProcessProxy::getNetworkProcessConnection):
1360         * UIProcess/mac/WebContextMac.mm:
1361         (WebKit::WebContext::applicationBecameVisible):
1362         (WebKit::WebContext::applicationBecameOccluded):
1363         * WebKit2.xcodeproj/project.pbxproj:
1364
1365 2012-12-15  Anders Carlsson  <andersca@apple.com>
1366
1367         DownloadProxy objects should know which DownloadProxyMap they belong to
1368         https://bugs.webkit.org/show_bug.cgi?id=105102
1369
1370         Reviewed by Andy Estes.
1371
1372         * UIProcess/Downloads/DownloadProxy.cpp:
1373         (WebKit::DownloadProxy::create):
1374         (WebKit::DownloadProxy::DownloadProxy):
1375         * UIProcess/Downloads/DownloadProxy.h:
1376         (WebKit):
1377         (DownloadProxy):
1378         * UIProcess/Downloads/DownloadProxyMap.cpp:
1379         (WebKit::DownloadProxyMap::createDownloadProxy):
1380
1381 2012-12-15  Andy Estes  <aestes@apple.com>
1382
1383         [WebKit2] Move CustomProtocolManager to Shared/
1384         https://bugs.webkit.org/show_bug.cgi?id=105103
1385
1386         Reviewed by Sam Weinig.
1387
1388         CustomProtocolManager can be instantiated either in the NetworkProcess or the WebProcess, so it should live in Shared/.
1389
1390         * DerivedSources.make: Update the path where CustomProtocolManager.messages.in can be found.
1391         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.h.
1392         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in.
1393         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm.
1394         * WebKit2.xcodeproj/project.pbxproj:
1395
1396 2012-12-15  Sam Weinig  <sam@webkit.org>
1397
1398         Try to fix the Qt build.
1399
1400         * Target.pri:
1401
1402 2012-12-15  Anders Carlsson  <andersca@apple.com>
1403
1404         Get rid of DownloadProxyMap::downloads()
1405         https://bugs.webkit.org/show_bug.cgi?id=105100
1406
1407         Reviewed by Sam Weinig.
1408
1409         Add the needed member functions to DownloadProxyMap and remove the downloads() member function.
1410
1411         * UIProcess/Downloads/DownloadProxyMap.cpp:
1412         (WebKit::DownloadProxyMap::downloadFinished):
1413         (WebKit::DownloadProxyMap::processDidClose):
1414         (WebKit):
1415         * UIProcess/Downloads/DownloadProxyMap.h:
1416         (WebKit::DownloadProxyMap::isEmpty):
1417         (DownloadProxyMap):
1418         * UIProcess/WebContext.cpp:
1419         (WebKit::WebContext::shouldTerminate):
1420         (WebKit::WebContext::disconnectProcess):
1421         (WebKit::WebContext::downloadFinished):
1422
1423 2012-12-15  Sam Weinig  <sam@webkit.org>
1424
1425         Move calculation of caches sizes based on the cache model to CacheModel.h/cpp
1426         https://bugs.webkit.org/show_bug.cgi?id=105098
1427
1428         Reviewed by Anders Carlsson.
1429
1430         Move calculation of caches sizes based on the cache model to CacheModel.h/cpp so
1431         that it can be used by more than just the WebProcess.
1432
1433         * CMakeLists.txt:
1434         * GNUmakefile.list.am:
1435         * Shared/CacheModel.cpp: Added.
1436         (WebKit):
1437         (WebKit::calculateCacheSizes):
1438         * Shared/CacheModel.h:
1439         * Target.pri:
1440         * WebKit2.xcodeproj/project.pbxproj:
1441         * WebProcess/WebProcess.cpp:
1442         * WebProcess/WebProcess.h:
1443         (WebProcess):
1444         * win/WebKit2.vcproj:
1445
1446 2012-12-15  Anders Carlsson  <andersca@apple.com>
1447
1448         DownloadProxyMap shouldn't be a singleton after all
1449         https://bugs.webkit.org/show_bug.cgi?id=105099
1450
1451         Reviewed by Sam Weinig.
1452
1453         Make the DownloadProxyMap be per context instead, and get rid of the m_downloads hash map from WebContext.
1454
1455         * UIProcess/Downloads/DownloadProxy.cpp:
1456         (WebKit::DownloadProxy::didFinish):
1457         (WebKit::DownloadProxy::didFail):
1458         (WebKit::DownloadProxy::didCancel):
1459         * UIProcess/Downloads/DownloadProxyMap.cpp:
1460         (WebKit::DownloadProxyMap::~DownloadProxyMap):
1461         * UIProcess/Downloads/DownloadProxyMap.h:
1462         (DownloadProxyMap):
1463         (WebKit::DownloadProxyMap::downloads):
1464         * UIProcess/WebContext.cpp:
1465         (WebKit::WebContext::shouldTerminate):
1466         (WebKit::WebContext::disconnectProcess):
1467         (WebKit::WebContext::createDownloadProxy):
1468         (WebKit::WebContext::downloadFinished):
1469         * UIProcess/WebContext.h:
1470         (WebContext):
1471
1472 2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
1473
1474         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
1475         https://bugs.webkit.org/show_bug.cgi?id=104842
1476
1477         Reviewed by Simon Fraser.
1478
1479         Rename overloads in coordinated graphics to account for the rename in GraphicsLayer.
1480
1481         * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
1482         (CoordinatedLayerInfo):
1483         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1484         (WebKit::LayerTreeRenderer::setLayerState):
1485         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1486         (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
1487         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1488         (CoordinatedGraphicsLayer):
1489
1490 2012-12-15  Christophe Dumez  <christophe.dumez@intel.com>
1491
1492         [GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk()
1493         https://bugs.webkit.org/show_bug.cgi?id=105095
1494
1495         Reviewed by Martin Robinson.
1496
1497         Adopt the pointer returned by cairo_create() in
1498         ChunkedUpdateDrawingArea::paintIntoUpdateChunk() to avoid leaking
1499         memory.
1500
1501         * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp:
1502         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
1503
1504 2012-12-15  Mark Lam  <mark.lam@apple.com>
1505
1506         Added #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer().
1507         https://bugs.webkit.org/show_bug.cgi?id=104934..
1508
1509         Not reviewed.
1510
1511         Greening the Qt Linux Release Minimal bot.
1512
1513         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1514         (WebKit):
1515         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1516         (WebPlatformStrategies):
1517
1518 2012-12-15  Mark Lam  <mark.lam@apple.com>
1519
1520         Re-landing patch for "Introducing the DatabaseStrategy and database servers".
1521         https://bugs.webkit.org/show_bug.cgi?id=104934.
1522
1523         Not reviewed.
1524
1525         Merged from r137767. Previously reviewed by Sam Weinig.
1526
1527         * CMakeLists.txt:
1528         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1529         (WebKit::WebPlatformStrategies::createDatabaseStrategy):
1530         (WebKit):
1531         (WebKit::WebPlatformStrategies::getDatabaseServer):
1532         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1533         (WebPlatformStrategies):
1534
1535 2012-12-14  Anders Carlsson  <andersca@apple.com>
1536
1537         DownloadProxy objects should be message receivers
1538         https://bugs.webkit.org/show_bug.cgi?id=105068
1539
1540         Reviewed by Andreas Kling.
1541
1542         This simplifies the WebContext message dispatch code somewhat.
1543
1544         * UIProcess/Downloads/DownloadProxy.cpp:
1545         (WebKit::DownloadProxy::didReceiveMessage):
1546         (WebKit::DownloadProxy::didReceiveSyncMessage):
1547         * UIProcess/Downloads/DownloadProxy.h:
1548         (DownloadProxy):
1549         * UIProcess/WebContext.cpp:
1550         (WebKit::WebContext::createDownloadProxy):
1551         (WebKit::WebContext::didReceiveMessage):
1552         (WebKit::WebContext::didReceiveSyncMessage):
1553
1554 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1555
1556         Unreviewed, rolling out r137767.
1557         http://trac.webkit.org/changeset/137767
1558         https://bugs.webkit.org/show_bug.cgi?id=105062
1559
1560         Broke Mac builds. (Requested by mlam on #webkit).
1561
1562         * CMakeLists.txt:
1563         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1564         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1565         (WebPlatformStrategies):
1566
1567 2012-12-14  Alexey Proskuryakov  <ap@apple.com>
1568
1569         <rdar://problem/12874760> NetworkProcess loads may get stuck when WebProcess quits
1570         https://bugs.webkit.org/show_bug.cgi?id=105056
1571
1572         Reviewed by Anders Carlsson.
1573
1574         Make response maps per-connection.
1575
1576         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1577         (WebKit::NetworkConnectionToWebProcess::didClose): Cancel waiting for responses
1578         from WebProcess, they will never arrive.
1579
1580         * NetworkProcess/NetworkConnectionToWebProcess.h:
1581         (WebKit::NetworkConnectionToWebProcess::willSendRequestResponseMap):
1582         (WebKit::NetworkConnectionToWebProcess::canAuthenticateAgainstProtectionSpaceResponseMap):
1583         Maps now live here.
1584
1585         * NetworkProcess/NetworkResourceLoader.cpp:
1586         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): Added a FIXME.
1587
1588         (WebKit::NetworkResourceLoader::willSendRequest):
1589         (WebKit::NetworkResourceLoader::willSendRequestHandled):
1590         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
1591         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceHandled):
1592         Handle the cases where we can't send a request, or can't expect a response any more.
1593
1594         * Shared/BlockingResponseMap.h:
1595         (BlockingResponseMap):
1596         (BlockingResponseMap::BlockingResponseMap):
1597         (BlockingResponseMap::~BlockingResponseMap):
1598         (BlockingResponseMap::waitForResponse):
1599         (BlockingResponseMap::didReceiveResponse):
1600         (BlockingResponseMap::cancel):
1601         (BlockingBoolResponseMap):
1602         (BlockingBoolResponseMap::BlockingBoolResponseMap):
1603         (BlockingBoolResponseMap::~BlockingBoolResponseMap):
1604         (BlockingBoolResponseMap::waitForResponse):
1605         (BlockingBoolResponseMap::didReceiveResponse):
1606         (BlockingBoolResponseMap::cancel):
1607         Added an ability to cancel, and slightly beefed up overall.
1608
1609 2012-12-14  Anders Carlsson  <andersca@apple.com>
1610
1611         DownloadProxyMap should keep track of outstanding DownloadProxy objects
1612         https://bugs.webkit.org/show_bug.cgi?id=105053
1613
1614         Reviewed by Andreas Kling.
1615
1616         This is more work towards removing the m_downloads map from every WebContext object.
1617
1618         * UIProcess/Downloads/DownloadProxy.cpp:
1619         (WebKit::DownloadProxy::didFinish):
1620         (WebKit::DownloadProxy::didFail):
1621         (WebKit::DownloadProxy::didCancel):
1622         * UIProcess/Downloads/DownloadProxyMap.cpp:
1623         (WebKit::DownloadProxyMap::createDownloadProxy):
1624         (WebKit):
1625         (WebKit::DownloadProxyMap::downloadFinished):
1626         * UIProcess/Downloads/DownloadProxyMap.h:
1627         (DownloadProxyMap):
1628         * UIProcess/WebContext.cpp:
1629         (WebKit::WebContext::createDownloadProxy):
1630
1631 2012-12-14  Mark Lam  <mark.lam@apple.com>
1632
1633         Introducing the DatabaseStrategy and database servers.
1634         https://bugs.webkit.org/show_bug.cgi?id=104934.
1635
1636         Reviewed by Sam Weinig.
1637
1638         The database server is currently a placeholder that does nothing.
1639
1640         * CMakeLists.txt:
1641         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1642         (WebKit::WebPlatformStrategies::createDatabaseStrategy):
1643         (WebKit):
1644         (WebKit::WebPlatformStrategies::getDatabaseServer):
1645         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1646         (WebPlatformStrategies):
1647
1648 2012-12-14  Alexey Proskuryakov  <ap@apple.com>
1649
1650         Resource loads sometimes stall
1651         https://bugs.webkit.org/show_bug.cgi?id=104976
1652
1653         Apply the same quick an dirty fix to BlockingBoolResponseMap.
1654
1655         * Shared/BlockingResponseMap.h:
1656         (BlockingBoolResponseMap::didReceiveResponse):
1657
1658 2012-12-14  Anders Carlsson  <andersca@apple.com>
1659
1660         Add a DownloadsProxyMap class in preparation for moving the downloads map away from WebContext
1661         https://bugs.webkit.org/show_bug.cgi?id=104980
1662
1663         Reviewed by Andreas Kling.
1664
1665         Currently the DownloadProxyMap doesn't really do anything; this initial change is to make sure that
1666         adding the new files won't break any builds.
1667
1668         * CMakeLists.txt:
1669         * GNUmakefile.list.am:
1670         * Target.pri:
1671         * UIProcess/Downloads/DownloadProxyMap.cpp: Added.
1672         (WebKit):
1673         (WebKit::DownloadProxyMap::shared):
1674         (WebKit::DownloadProxyMap::DownloadProxyMap):
1675         (WebKit::DownloadProxyMap::~DownloadProxyMap):
1676         (WebKit::DownloadProxyMap::createDownloadProxy):
1677         * UIProcess/Downloads/DownloadProxyMap.h: Added.
1678         (WebKit):
1679         (DownloadProxyMap):
1680         * UIProcess/WebContext.cpp:
1681         (WebKit::WebContext::createDownloadProxy):
1682         * WebKit2.xcodeproj/project.pbxproj:
1683         * win/WebKit2.vcproj:
1684
1685 2012-12-14  Anders Carlsson  <andersca@apple.com>
1686
1687         Fix assertion failure when the network process is enabled
1688         https://bugs.webkit.org/show_bug.cgi?id=105040
1689         <rdar://problem/12883632>
1690
1691         Reviewed by Alexey Proskuryakov.
1692
1693         Make sure that we don't call into the download manager when running with a network process.
1694
1695         * WebProcess/WebProcess.cpp:
1696         (WebKit::WebProcess::shouldTerminate):
1697
1698 2012-12-14  Michelangelo De Simone  <michelangelo@webkit.org>
1699
1700         [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
1701         https://bugs.webkit.org/show_bug.cgi?id=103776
1702
1703         Reviewed by Dean Jackson.
1704
1705         The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
1706         and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.
1707
1708         In this patch we remove everything but the parsing code, which shall be addressed in a different patch
1709         (see: https://bugs.webkit.org/show_bug.cgi?id=103778).
1710
1711         Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt
1712
1713         Existing tests have been updated and new parsing legacy cases have been added.
1714
1715         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1716         (CoreIPC::::encode):
1717         (CoreIPC::::decode):
1718         * Shared/CoordinatedGraphics/WebCustomFilterOperation.h:
1719         (WebCore::WebCustomFilterOperation::create):
1720         (WebCore::WebCustomFilterOperation::WebCustomFilterOperation):
1721
1722 2012-12-14  Alexey Proskuryakov  <ap@apple.com>
1723
1724         <rdar://problem/12880750> RGRESSION: Crash when emptying cookie jar
1725         https://bugs.webkit.org/show_bug.cgi?id=105038
1726
1727         Reviewed by Jessie Berlin.
1728
1729         Handle null context, which is used for cookie management functions.
1730
1731         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1732         (WebKit::WebPlatformStrategies::cookiesForDOM):
1733         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1734         (WebKit::WebPlatformStrategies::cookiesEnabled):
1735         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1736         (WebKit::WebPlatformStrategies::getRawCookies):
1737         (WebKit::WebPlatformStrategies::deleteCookie):
1738         (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
1739         (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
1740         (WebKit::WebPlatformStrategies::deleteAllCookies):
1741
1742 2012-12-14  Alberto Garcia  <agarcia@igalia.com>
1743
1744         [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
1745         https://bugs.webkit.org/show_bug.cgi?id=104910
1746
1747         Reviewed by Martin Robinson.
1748
1749         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp:
1750         (WebKit::WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog):
1751         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h:
1752         (WebKit2GtkAuthenticationDialog):
1753         GtkAuthenticationDialog has a new credential storage mode
1754         parameter, so add it here too.
1755
1756         * UIProcess/API/gtk/WebKitWebView.cpp:
1757         (webkitWebViewHandleAuthenticationChallenge):
1758         When creating the GtkAuthenticationDialog, set the credential
1759         storage mode using the private browsing setting from the current
1760         page.
1761
1762 2012-12-14  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1763
1764         [EFL][WK2] Fix EFL build after r137718
1765         https://bugs.webkit.org/show_bug.cgi?id=105018
1766
1767         Unreviewed build fix.
1768
1769         The problem was that UNUSED_PARAM(size) was left in the code
1770         for non-existent variable 'size'.
1771
1772         * UIProcess/efl/PageClientDefaultImpl.cpp:
1773         (WebKit::PageClientDefaultImpl::updateViewportSize):
1774         * UIProcess/efl/PageClientLegacyImpl.cpp:
1775         (WebKit::PageClientLegacyImpl::updateViewportSize):
1776
1777 2012-12-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1778
1779         [EFL][WK2] Do not pass size to updateViewportSize
1780         https://bugs.webkit.org/show_bug.cgi?id=104994
1781
1782         Reviewed by Gyuyoung Kim.
1783
1784         There is no need to pass size to updateViewportSize as we
1785         have direct access to it. This makes the code differ less
1786         from Qt.
1787
1788         * UIProcess/API/efl/ewk_view.cpp:
1789         (_ewk_view_smart_calculate):
1790         * UIProcess/PageViewportController.cpp:
1791         (WebKit::PageViewportController::pageDidRequestScroll):
1792         * UIProcess/efl/PageClientBase.h:
1793         (PageClientBase):
1794         * UIProcess/efl/PageClientDefaultImpl.cpp:
1795         (WebKit::PageClientDefaultImpl::updateViewportSize):
1796         * UIProcess/efl/PageClientDefaultImpl.h:
1797         (PageClientDefaultImpl):
1798         * UIProcess/efl/PageClientLegacyImpl.cpp:
1799         (WebKit::PageClientLegacyImpl::updateViewportSize):
1800         * UIProcess/efl/PageClientLegacyImpl.h:
1801         (PageClientLegacyImpl):
1802         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1803         (WebKit::PageViewportControllerClientEfl::updateViewportSize):
1804         * UIProcess/efl/PageViewportControllerClientEfl.h:
1805         (PageViewportControllerClientEfl):
1806
1807 2012-12-13  Sanghyup Lee  <sh53.lee@samsung.com>
1808
1809         Fix build warning
1810         https://bugs.webkit.org/show_bug.cgi?id=104978
1811
1812         Reviewed by Kentaro Hara.
1813
1814         Initialize parameter 'downloadID' to fix 'unused parameter' build warning.
1815
1816         * WebProcess/Downloads/Download.cpp:
1817         (WebKit::Download::Download):
1818
1819 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
1820
1821         Resource loads sometimes stall
1822         https://bugs.webkit.org/show_bug.cgi?id=104976
1823
1824         Reviewed by Anders Carlsson.
1825
1826         Quick and dirty partial fix.
1827
1828         * Shared/BlockingResponseMap.h: (BlockingResponseMap::didReceiveResponse):
1829         Wake up all threads, so that non-sequential responses don't break us. This is still
1830         horribly inefficient,but should improve behavior quite a bit.
1831
1832 2012-12-13  Seokju Kwon  <seokju.kwon@gmail.com>
1833
1834         Fix unused parameter compile warnings
1835         https://bugs.webkit.org/show_bug.cgi?id=104907
1836
1837         Reviewed by Kentaro Hara.
1838
1839         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter
1840         when ENABLE_INSPECTOR is disabled.
1841
1842         * UIProcess/API/C/WKInspector.cpp:
1843         (WKInspectorGetPage):
1844         (WKInspectorIsVisible):
1845         (WKInspectorIsFront):
1846         (WKInspectorShow):
1847         (WKInspectorClose):
1848         (WKInspectorShowConsole):
1849         (WKInspectorShowResources):
1850         (WKInspectorShowMainResourceForFrame):
1851         (WKInspectorIsAttached):
1852         (WKInspectorAttach):
1853         (WKInspectorDetach):
1854         (WKInspectorIsDebuggingJavaScript):
1855         (WKInspectorToggleJavaScriptDebugging):
1856         (WKInspectorIsProfilingJavaScript):
1857         (WKInspectorToggleJavaScriptProfiling):
1858         (WKInspectorIsProfilingPage):
1859         (WKInspectorTogglePageProfiling):
1860         * UIProcess/API/C/WKPage.cpp:
1861         (WKPageGetInspector):
1862
1863 2012-12-13  Seokju Kwon  <seokju.kwon@gmail.com>
1864
1865         [QT][GTK][EFL] Add guard for WebInspectorServer
1866         https://bugs.webkit.org/show_bug.cgi?id=104889
1867
1868         Reviewed by Kenneth Rohde Christiansen.
1869
1870         Add ENABLE(INSPECTOR_SERVER) guard around platform-specific implementation for WebInspectorServer.
1871
1872         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
1873         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1874         * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
1875
1876 2012-12-13  Huang Dongsung  <luxtella@company100.net>
1877
1878         Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
1879         https://bugs.webkit.org/show_bug.cgi?id=103843
1880
1881         Reviewed by Noam Rosenthal.
1882
1883         Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its
1884         lifecycle. LayerTreeRenderer, CoordinatedLayerTreeHost and CoordinatedLayerTreeHostProxy
1885         have the same lifecycle to WebPage and the root layer is reused even if loading
1886         new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more
1887         than twice.
1888
1889         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1890         (WebKit::LayerTreeRenderer::setRootLayerID):
1891
1892 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
1893
1894         <rdar://problem/12838354> DOM cookie access functions should respect private browsing
1895         https://bugs.webkit.org/show_bug.cgi?id=104691
1896
1897         Reviewed by Anders Carlsson.
1898
1899         Remove obsolete FIXMEs, and fix one function that I overlooked.
1900
1901         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1902         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1903         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1904         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1905         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1906         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1907         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1908         (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
1909         (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
1910         (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
1911
1912 2012-12-13  Anders Carlsson  <andersca@apple.com>
1913
1914         DownloadManager shouldn't call the web process directly
1915         https://bugs.webkit.org/show_bug.cgi?id=104946
1916
1917         Reviewed by Antti Koivisto.
1918
1919         Introduce the needed DownloadManager::Client member functions and have Download call them instead of calling the web process directly.
1920
1921         * WebProcess/Downloads/Download.cpp:
1922         (WebKit::Download::Download):
1923         (WebKit::Download::~Download):
1924         (WebKit::Download::connection):
1925         * WebProcess/Downloads/DownloadManager.cpp:
1926         (WebKit::DownloadManager::DownloadManager):
1927         (WebKit::DownloadManager::didCreateDownload):
1928         (WebKit::DownloadManager::didDestroyDownload):
1929         (WebKit::DownloadManager::connection):
1930         * WebProcess/Downloads/DownloadManager.h:
1931         * WebProcess/WebProcess.cpp:
1932         (WebKit::WebProcess::didCreateDownload):
1933         (WebKit::WebProcess::didDestroyDownload):
1934         * WebProcess/WebProcess.h:
1935
1936 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
1937
1938         <rdar://problem/12838354> Per-Tab WebProcess: DOM cookie access functions should respect private browsing
1939         https://bugs.webkit.org/show_bug.cgi?id=104691
1940
1941         Reviewed by Sam Weinig.
1942
1943         Pass private browsing state from local context to remote one.
1944
1945         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1946         (WebKit::networkingContext):
1947         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1948         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1949         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1950         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1951         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1952         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1953         (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
1954         (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
1955         (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
1956         * NetworkProcess/NetworkConnectionToWebProcess.h:
1957         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1958         * NetworkProcess/mac/RemoteNetworkingContext.h:
1959         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1960         (WebKit::RemoteNetworkingContext::inPrivateBrowsingMode):
1961         (WebKit::RemoteNetworkingContext::storageSession):
1962         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1963         (WebKit::WebPlatformStrategies::cookiesForDOM):
1964         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1965         (WebKit::WebPlatformStrategies::cookiesEnabled):
1966         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1967         (WebKit::WebPlatformStrategies::getRawCookies):
1968         (WebKit::WebPlatformStrategies::deleteCookie):
1969         (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
1970         (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
1971         (WebKit::WebPlatformStrategies::deleteAllCookies):
1972         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1973         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1974         (WebKit::WebFrameNetworkingContext::inPrivateBrowsingMode):
1975         (WebKit::WebFrameNetworkingContext::storageSession):
1976         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
1977         (WebFrameNetworkingContext::inPrivateBrowsingMode):
1978
1979 2012-12-13  Anders Carlsson  <andersca@apple.com>
1980
1981         Get rid of DownloadManager::shared
1982         https://bugs.webkit.org/show_bug.cgi?id=104939
1983
1984         Reviewed by Andreas Kling.
1985
1986         Move the DownloadManager singleton to WebProcess and stub out a DownloadManager::Client class.
1987
1988         * WebProcess/Downloads/DownloadManager.cpp:
1989         (WebKit::DownloadManager::DownloadManager):
1990         * WebProcess/Downloads/DownloadManager.h:
1991         (Client):
1992         (WebKit::DownloadManager::Client::~Client):
1993         (DownloadManager):
1994         * WebProcess/WebPage/WebFrame.cpp:
1995         (WebKit::WebFrame::startDownload):
1996         (WebKit::WebFrame::convertHandleToDownload):
1997         * WebProcess/WebProcess.cpp:
1998         (WebKit::WebProcess::downloadManager):
1999         (WebKit):
2000         (WebKit::WebProcess::shouldTerminate):
2001         (WebKit::WebProcess::downloadRequest):
2002         (WebKit::WebProcess::cancelDownload):
2003         (WebKit::WebProcess::startTransfer):
2004         * WebProcess/WebProcess.h:
2005         (WebProcess):
2006
2007 2012-12-12  Andy Estes  <aestes@apple.com>
2008
2009         [WebKit2] Only register NSNotificationCenter observers once per WebContext
2010         https://bugs.webkit.org/show_bug.cgi?id=104879
2011
2012         Reviewed by Alexey Proskuryakov.
2013
2014         WebContext was mistakenly registering NSNotificationCenter observers
2015         every time a new web process was created. In a multi-WebProcess world,
2016         this caused duplicate observers to be needlessly registered. Fix this
2017         by registering observers at WebContext creation time (and fix a related
2018         bug where two of the observers were never unregistered).
2019
2020         * UIProcess/WebContext.h:
2021         * UIProcess/mac/WebContextMac.mm:
2022         (WebKit::WebContext::platformInitialize): Register observers when initializing the context.
2023         (WebKit::WebContext::platformInitializeWebProcess): Don't register observers here.
2024         (WebKit::WebContext::platformInvalidateContext): Unregister observers when invalidating the context.
2025         (WebKit::WebContext::registerNotificationObservers):
2026         (WebKit::WebContext::unregisterNotificationObservers):
2027
2028 2012-12-13  Anders Carlsson  <andersca@apple.com>
2029
2030         Download objects should keep track of their associated DownloadManager object
2031         https://bugs.webkit.org/show_bug.cgi?id=104936
2032
2033         Reviewed by Andreas Kling.
2034
2035         This is the first step towards eliminating DownloadManager::shared.
2036
2037         * WebProcess/Downloads/Download.cpp:
2038         (WebKit::Download::create):
2039         (WebKit::Download::Download):
2040         (WebKit::Download::didFinish):
2041         (WebKit::Download::didFail):
2042         (WebKit::Download::didCancel):
2043         * WebProcess/Downloads/Download.h:
2044         * WebProcess/Downloads/DownloadManager.cpp:
2045         (WebKit::DownloadManager::startDownload):
2046         (WebKit::DownloadManager::convertHandleToDownload):
2047
2048 2012-12-13  Anders Carlsson  <andersca@apple.com>
2049
2050         Remove unused initiatingPage parameter from download objects
2051         https://bugs.webkit.org/show_bug.cgi?id=104933
2052
2053         Reviewed by Alexey Proskuryakov.
2054
2055         * WebProcess/Downloads/Download.h:
2056         (Download):
2057         * WebProcess/Downloads/DownloadManager.cpp:
2058         (WebKit::DownloadManager::startDownload):
2059         (WebKit::DownloadManager::convertHandleToDownload):
2060         * WebProcess/Downloads/DownloadManager.h:
2061         (DownloadManager):
2062         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
2063         (WebKit::Download::start):
2064         (WebKit::Download::startWithHandle):
2065         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2066         (WebKit::Download::start):
2067         (WebKit::Download::startWithHandle):
2068         * WebProcess/Downloads/mac/DownloadMac.mm:
2069         (WebKit::Download::start):
2070         (WebKit::Download::startWithHandle):
2071         * WebProcess/Downloads/qt/DownloadQt.cpp:
2072         (WebKit::Download::start):
2073         (WebKit::Download::startWithHandle):
2074         * WebProcess/Downloads/soup/DownloadSoup.cpp:
2075         (WebKit::Download::start):
2076         (WebKit::Download::startWithHandle):
2077         * WebProcess/WebPage/WebFrame.cpp:
2078         (WebKit::WebFrame::startDownload):
2079         (WebKit::WebFrame::convertHandleToDownload):
2080         * WebProcess/WebProcess.cpp:
2081         (WebKit::WebProcess::downloadRequest):
2082
2083 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
2084
2085         <rdar://problem/12870065> Frequent NetworkProcess crashes due to null connection when closing tabs
2086         https://bugs.webkit.org/show_bug.cgi?id=104922
2087
2088         Reviewed by Anders Carlsson.
2089
2090         Don't zero out connection pointers when a connection closes. There doesn't appear
2091         to be any reason to do this.
2092
2093         Tested by hitting breakpoints in all relevant objects destructors to confirm that
2094         this doesn't introduce leaks.
2095
2096         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2097         (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
2098         (WebKit::NetworkConnectionToWebProcess::didClose):
2099         * NetworkProcess/NetworkResourceLoader.cpp:
2100         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
2101
2102 2012-12-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2103
2104         [EFL] Update the way we set the cookies policy
2105         https://bugs.webkit.org/show_bug.cgi?id=104915
2106
2107         Reviewed by Kenneth Rohde Christiansen.
2108
2109         We are mistakenly assigning the cookie policy to the persistent storage
2110         type which is not correct. This was caused by r137432 and is making
2111         the unit tests fail.
2112
2113         * UIProcess/efl/WebContextEfl.cpp:
2114         (WebKit::WebContext::platformInitializeWebProcess):
2115
2116 2012-12-13  Andras Becsi  <andras.becsi@digia.com>
2117
2118         [Qt][WK2] Fix painting on Mac with retina display
2119         https://bugs.webkit.org/show_bug.cgi?id=104574
2120
2121         Unreviewed, removing leftover API test.
2122
2123         This hunk somehow did not make it into the final patch.
2124
2125         * UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml: Removed.
2126
2127 2012-12-13  Andras Becsi  <andras.becsi@digia.com>
2128
2129         [Qt][WK2] Fix painting on Mac with retina display
2130         https://bugs.webkit.org/show_bug.cgi?id=104574
2131
2132         Reviewed by Kenneth Rohde Christiansen.
2133
2134         Since HiDPI support has been added and enabled in Qt we ended up
2135         painting incorrectly scaled content on high-resolution screens.
2136         Because the intrinsic device pixel ratio is always taken into
2137         account by Qt when painting to high-resolution screens we should
2138         automatically obtain the scale ratio from the window in which the
2139         item is rendered instead of setting it in QML.
2140
2141         Qt does not make it possible to override the device pixel ratio
2142         of the native window, therefore our experimental QML API for setting
2143         a custom value is of no use any more and should be removed.
2144
2145         This patch fixes the scaling issue on Mac retina display by querying
2146         the underlying window for the device scale factor and applying it to
2147         the backing store and the scene-graph rendering of the content node.
2148         Additionally removes the experimental API and related API tests.
2149
2150         * UIProcess/API/qt/qquickwebpage.cpp:
2151         (QQuickWebPage::updatePaintNode):
2152         * UIProcess/API/qt/qquickwebview.cpp:
2153         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2154         (QQuickWebViewLegacyPrivate::updateViewportSize):
2155         (QQuickWebViewFlickablePrivate::onComponentComplete):
2156         * UIProcess/API/qt/qquickwebview_p.h:
2157         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2158         (tst_QQuickWebView::newWebView):
2159         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2160         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
2161         (WebKit::CoordinatedLayerTreeHostProxy::deviceScaleFactor):
2162         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2163         (CoordinatedLayerTreeHostProxy):
2164         * UIProcess/qt/QtWebPageSGNode.cpp:
2165         (WebKit::ContentsSGNode::ContentsSGNode):
2166         (WebKit::ContentsSGNode::render):
2167         (WebKit::ContentsSGNode::clipRect):
2168         (ContentsSGNode):
2169         (WebKit::QtWebPageSGNode::QtWebPageSGNode):
2170         (WebKit::QtWebPageSGNode::devicePixelRatio):
2171         (WebKit):
2172         (WebKit::QtWebPageSGNode::setRenderer):
2173         * UIProcess/qt/QtWebPageSGNode.h:
2174         (QtWebPageSGNode):
2175
2176 2012-12-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2177
2178         [EFL] API tests failing because Vibration API is using unsigned as duration since r137410
2179         https://bugs.webkit.org/show_bug.cgi?id=104914
2180
2181         Reviewed by Kenneth Rohde Christiansen.
2182
2183         Update the tests to reflect the data type coming from WebCore.
2184
2185         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2186         (VibrationCbData):
2187         (onVibrate):
2188
2189 2012-12-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2190
2191         [EFL][WK2] Device pixel ratio lost upon relaunch of the web process
2192         https://bugs.webkit.org/show_bug.cgi?id=104913
2193
2194         Reviewed by Simon Hausmann.
2195
2196         Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor
2197         when setting the device pixel ratio to make the setting permanent and
2198         make sure it is set as part of the web process creation parameters.
2199
2200         * UIProcess/API/efl/ewk_view.cpp:
2201         (ewk_view_device_pixel_ratio_set):
2202
2203 2012-12-13  Jerome Pasion  <jerome.pasion@digia.com>
2204
2205         [Qt] Doc: Fixing Qt WebKit reference documentation.
2206
2207         Reviewed by Simon Hausmann.
2208
2209         Fixes:
2210         -added \module for C++ classes and \qmlmodule for QML types
2211         -added links to the Qt WebKit Examples pages
2212         -fixed the qhp settings for Qt Creator
2213
2214         Task-number: QTBUG-28583
2215         Task-number: QTBUG-28418
2216         Task-number: QTBUG-27646
2217
2218         * UIProcess/API/qt/qquickwebview.cpp:
2219
2220 2012-12-13  Jussi Kukkonen  <jussi.kukkonen@intel.com>
2221
2222         [EFL][GTK] Don't call deprecated g_type_init when glib => 2.35
2223         https://bugs.webkit.org/show_bug.cgi?id=103209
2224
2225         Reviewed by Kenneth Rohde Christiansen.
2226
2227         g_type_init() is deprecated from 2.35.0 onwards. Don't call it
2228         in that case to avoid warnings and/or build failure.
2229
2230         Also, remove a call to g_type_init() from WebProcessMainGtk():
2231         It is not needed if gtk_init() is called.
2232
2233         * UIProcess/API/efl/ewk_main.cpp:
2234         (ewk_init):
2235         * WebProcess/efl/WebProcessMainEfl.cpp:
2236         (WebKit::WebProcessMainEfl):
2237         * WebProcess/gtk/WebProcessMainGtk.cpp:
2238         (WebKit::WebProcessMainGtk):
2239
2240 2012-12-13  Joaquim Rocha  <jrocha@igalia.com>
2241
2242         REGRESSION (r137432): The /webkit2/WebKitCookieManager/accept-policy unit test is failing
2243         https://bugs.webkit.org/show_bug.cgi?id=104790
2244
2245         Reviewed by Carlos Garcia Campos.
2246
2247         The cookies accept policy and the cookies persistent storage type
2248         were not being correctly assigned.
2249
2250         * UIProcess/WebContext.cpp: Set the default value of the cookie
2251         accept policy.
2252         (WebKit::WebContext::WebContext):
2253         * UIProcess/gtk/WebContextGtk.cpp: Fix setting the cookies persistent
2254         storage type (it was mistakenly assigning the policy instead) and
2255         set the accept policy which was missing.
2256         (WebKit::WebContext::platformInitializeWebProcess):
2257
2258 2012-12-13  Jon Lee  <jonlee@apple.com>
2259
2260         plugin snapshotting accepts bad snapshot after 5 seconds
2261         https://bugs.webkit.org/show_bug.cgi?id=104886
2262         <rdar://problem/12838753>
2263
2264         Reviewed by Maciej Stachowiak.
2265
2266         * WebProcess/Plugins/PluginView.cpp: Increase to 60 tries, equating to a little over 60 seconds total.
2267
2268 2012-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2269
2270         NetworkInfoController needs to support destructor
2271         https://bugs.webkit.org/show_bug.cgi?id=104642
2272
2273         Reviewed by Kentaro Hara.
2274
2275         Though NetworkInfoController can be referenced by each port in order to update network status change,
2276         there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
2277         controller is destroyed.
2278
2279         * UIProcess/efl/NetworkInfoProvider.cpp:
2280         (NetworkInfoProvider::networkInfoControllerDestroyed):
2281         * UIProcess/efl/NetworkInfoProvider.h:
2282         (NetworkInfoProvider):
2283         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
2284         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed):
2285         (WebKit):
2286         * WebProcess/WebCoreSupport/WebNetworkInfoClient.h:
2287         (WebNetworkInfoClient):
2288
2289 2012-12-12  Andy Estes  <aestes@apple.com>
2290
2291         Rename currentMousePosition() to lastKnownMousePosition() and mark it as OVERRIDE.
2292
2293         * WebProcess/Plugins/PDF/PDFPlugin.h:
2294
2295 2012-12-12  Seokju Kwon  <seokju.kwon@gmail.com>
2296
2297         [EFL] Refactor duplicate code into EflInspectorUtilities
2298         https://bugs.webkit.org/show_bug.cgi?id=104329
2299
2300         Reviewed by Kenneth Rohde Christiansen.
2301
2302         Remove duplicated work to get the resource path for inspector.
2303         And use WebCore::inspectorResourcePath().
2304
2305         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
2306         (WebKit::WebInspectorServer::platformResourceForPath):
2307         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2308         (WebKit::WebInspectorProxy::inspectorBaseURL):
2309
2310 2012-12-12  Mark Lam  <mark.lam@apple.com>
2311
2312         Encapsulate externally used webdatabase APIs in DatabaseManager.
2313         https://bugs.webkit.org/show_bug.cgi?id=104741.
2314
2315         Reviewed by Sam Weinig.
2316
2317         Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase,
2318         and DatabaseContext directly. This is to prepare for upcoming webkit2
2319         refactoring.
2320
2321         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2322         (WebKit::WebChromeClient::exceededDatabaseQuota):
2323         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2324         (WebKit::WebDatabaseManager::initialize):
2325         (WebKit::WebDatabaseManager::WebDatabaseManager):
2326         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
2327         (WebKit::WebDatabaseManager::getDatabaseOrigins):
2328         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
2329         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2330         (WebKit::WebDatabaseManager::deleteAllDatabases):
2331         (WebKit::WebDatabaseManager::setQuotaForOrigin):
2332         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2333         (WebDatabaseManager):
2334         * WebProcess/WebPage/WebPage.cpp:
2335         (WebKit::WebPage::updatePreferences):
2336
2337 2012-12-12  Alexey Proskuryakov  <ap@apple.com>
2338
2339         <rdar://problem/12862512> Crashes in NetworkResourceLoadScheduler::receivedRedirect
2340         https://bugs.webkit.org/show_bug.cgi?id=104844
2341
2342         Reviewed by Sam Weinig.
2343
2344         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
2345         (WebKit::NetworkResourceLoadScheduler::receivedRedirect): The load may be already
2346         canceled.
2347
2348         * WebProcess/Network/WebResourceLoader.cpp:
2349         (WebKit::WebResourceLoader::didReceiveResponse): Expanded logging a little.
2350
2351 2012-12-12  Andras Becsi  <andras.becsi@digia.com>
2352
2353         [Qt][WK2] Fix the build on Mac
2354
2355         Unreviewed build fix.
2356
2357         Add missing virtual destructor with empty
2358         definition to fix missing vtable error
2359         in test util's LoadStartedCatcher.
2360
2361         * UIProcess/API/qt/tests/util.h:
2362         (LoadStartedCatcher::~LoadStartedCatcher):
2363
2364 2012-12-12  Alexey Proskuryakov  <ap@apple.com>
2365
2366         Make LOG() work in WebProcess and NetworkProcess
2367         https://bugs.webkit.org/show_bug.cgi?id=104718
2368
2369         Reviewed by Tim Horton.
2370
2371         * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess):
2372         Initialize WebCore and WebKit2 logging.
2373
2374         * Platform/Logging.cpp: (WebKit::initializeLogChannelsIfNecessary):
2375         Added Network and NetworkScheduling. Re-ordered to match declaration order,
2376         alphabetical clearly doesn't help here.
2377
2378         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Initialize WebKit2
2379         logging in addition to WebCore.
2380
2381         * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize WebKit2
2382         logging in addition to WebCore.
2383
2384 2012-12-12  Simon Pena  <spena@igalia.com>
2385
2386         [GTK] Add sections documentation to WebKit2 GTK+ API
2387         https://bugs.webkit.org/show_bug.cgi?id=104484
2388
2389         Reviewed by Martin Robinson.
2390
2391         Many of the sections in the WebKit2 GTK+ API documentation were
2392         missing. This commit adds new documentation, in some cases
2393         adapting it from WebKitGtk+ and in others writing it from the
2394         scratch.
2395
2396         It also removes the WebKitWebViewBase class from the documentation
2397         index, since it is not really relevant.
2398
2399         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
2400         * UIProcess/API/gtk/WebKitContextMenu.cpp:
2401         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
2402         * UIProcess/API/gtk/WebKitCookieManager.cpp:
2403         * UIProcess/API/gtk/WebKitDownload.cpp:
2404         * UIProcess/API/gtk/WebKitError.cpp:
2405         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
2406         * UIProcess/API/gtk/WebKitFindController.cpp:
2407         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
2408         * UIProcess/API/gtk/WebKitPlugin.cpp:
2409         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2410         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
2411         * UIProcess/API/gtk/WebKitURIRequest.cpp:
2412         * UIProcess/API/gtk/WebKitURIResponse.cpp:
2413         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2414         * UIProcess/API/gtk/WebKitVersion.cpp:
2415         * UIProcess/API/gtk/WebKitWebContext.cpp:
2416         * UIProcess/API/gtk/WebKitWebInspector.cpp:
2417         * UIProcess/API/gtk/WebKitWebResource.cpp:
2418         (webkit_web_resource_class_init):
2419         * UIProcess/API/gtk/WebKitWebView.cpp:
2420         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2421
2422 2012-12-12  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2423
2424         [EFL [WebGL] [Wk2] Resizing the canvas breaks WebGL.
2425         https://bugs.webkit.org/show_bug.cgi?id=104535.
2426
2427         Reviewed by Kenneth Rohde Christiansen.
2428
2429         GraphicsContext3DEfl does not re-create the surface on canvas resize, this
2430         conflicted with the logic in coordinated graphics Layer.
2431         CoordinatedGraphicsLayer checks for GraphicsSurfaceToken to decide if the surface
2432         in UI-Process should be recreated or not. With this
2433         patch we also check for size of the platform Layer.
2434
2435         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2436         (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas):
2437         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2438         (CoordinatedGraphicsLayer):
2439
2440 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2441
2442         Unreviewed, rolling out r137438.
2443         http://trac.webkit.org/changeset/137438
2444         https://bugs.webkit.org/show_bug.cgi?id=104798
2445
2446         assertion reached when removing tile (Requested by tmpsantos
2447         on #webkit).
2448
2449         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2450         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2451         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2452         (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector):
2453         (WebCore::CoordinatedGraphicsLayer::setContentsScale):
2454         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2455         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed):
2456         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2457         (WebCore::CoordinatedGraphicsLayer::createTile):
2458         (WebCore::CoordinatedGraphicsLayer::updateTile):
2459         (WebCore::CoordinatedGraphicsLayer::removeTile):
2460         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2461         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
2462         (WebCore::CoordinatedGraphicsLayer::adjustVisibleRect):
2463         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2464         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2465         (CoordinatedGraphicsLayerClient):
2466         (CoordinatedGraphicsLayer):
2467         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2468         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
2469         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
2470         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2471         (WebKit::CoordinatedLayerTreeHost::layerTreeTileUpdatesAllowed):
2472         (WebKit):
2473         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2474         (CoordinatedLayerTreeHost):
2475
2476 2012-12-12  Mario Sanchez Prada  <mario@webkit.org>
2477
2478         [GTK][WK2] New API to detect display/execution of insecure content
2479         https://bugs.webkit.org/show_bug.cgi?id=104578
2480
2481         Reviewed by Martin Robinson.
2482
2483         Added new API and documentation for detecting insecure content.
2484
2485         Implemented needed functions from C API's WKPageLoaderClient
2486
2487         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2488         (didDisplayInsecureContentForFrame): Implemented.
2489         (didRunInsecureContentForFrame): Ditto.
2490         (attachLoaderClientToView): Added newly implemented functions.
2491
2492         Added new 'insecure-content-detected' signal to API.
2493
2494         * UIProcess/API/gtk/WebKitWebView.cpp:
2495         (webkit_web_view_class_init): Installed new signal.
2496         (webkitWebViewInsecureContentDetected): Helper function aded to
2497         private API to emit the new signal from the page loader client.
2498         * UIProcess/API/gtk/WebKitWebView.h:
2499         (_WebKitWebViewClass): Added new signal.
2500
2501         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added prototype of the
2502         new helper function webkitWebViewInsecureContentDetected().
2503
2504         Added new unit tests.
2505
2506         * UIProcess/API/gtk/tests/TestSSL.cpp:
2507         (testSSL): Updated to the new variable name for the https server.
2508         (testInsecureContent): New unit test.
2509         (httpsServerCallback): Renamed from serverCallback() and updated
2510         to return HTML content linking to external resources in an
2511         insecure (plain http) server, to be used by the new test.
2512         (httpServerCallback): New callback for a new http server, that
2513         will serve a script and an image when requested.
2514         (beforeAll): Run the new http server, besides the https one.
2515         (afterAll): Delete both the http and the https server.
2516
2517         Updated documentation with new API.
2518
2519         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added references
2520         to the new WebKitInsecureContentEvent enum type.
2521
2522 2012-12-12  Huang Dongsung  <luxtella@company100.net>
2523
2524         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
2525         https://bugs.webkit.org/show_bug.cgi?id=103959
2526
2527         Reviewed by Kenneth Rohde Christiansen.
2528
2529         Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore.
2530         It has two problem.
2531         1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent
2532         TiledBackingStore from asynchronously sending UpdateTile message to UI
2533         Process.
2534         2. CreateTile and RemoveTile message can be sent to UI Process at any time.
2535
2536         This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly.
2537         It means only during flushing layer states, CoordinatedGraphicsLayer
2538         calls methods of TiledBackingStore, which indirectly call createTile(),
2539         updateTile() and removeTile().
2540
2541         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2542         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2543         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2544         (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector):
2545         (WebCore::CoordinatedGraphicsLayer::setContentsScale):
2546         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2547         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):
2548         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2549         (WebCore::CoordinatedGraphicsLayer::createTile):
2550         (WebCore::CoordinatedGraphicsLayer::updateTile):
2551         (WebCore::CoordinatedGraphicsLayer::removeTile):
2552         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2553         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
2554         (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment):
2555         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2556         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2557         (CoordinatedGraphicsLayerClient):
2558         (CoordinatedGraphicsLayer):
2559         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2560         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
2561         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
2562         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2563         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2564         (CoordinatedLayerTreeHost):
2565
2566 2012-12-12  Joaquim Rocha  <jrocha@igalia.com>
2567
2568         [GTK] Cookies' storage path and policy are not set when the WebProcess is killed and relaunched
2569         https://bugs.webkit.org/show_bug.cgi?id=104370
2570
2571         Reviewed by Carlos Garcia Campos.
2572
2573         This issue happens on ports that use Soup and causes problems like not finding the stored cookies
2574         nor their policy when the WebProcess is relaunched. As an example of a problem caused by this,
2575         a previously logged in user will not be logged in again when the process is relaunched and the
2576         policy used is always the same one.
2577
2578         * Shared/WebProcessCreationParameters.cpp:
2579         (WebKit::WebProcessCreationParameters::encode): Encode cookies' persistent storage path,
2580         storage type and acceptance policy.
2581         (WebKit::WebProcessCreationParameters::decode): Decode cookies' persistent storage path,
2582         storage type and acceptance policy.
2583         * Shared/WebProcessCreationParameters.h: Create 3 variables to hold the values mentioned above.
2584         (WebProcessCreationParameters):
2585         * UIProcess/WebCookieManagerProxy.cpp:
2586         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2587         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Call WebCookieManagerProxySoup::setCookieAcceptPolicy.
2588         * UIProcess/WebCookieManagerProxy.h: Declare new Soup's methods setCookieAcceptPolicy, cookieAcceptPolicy and
2589         cookiePersistentStorage as well as the variables m_cookieAcceptPolicy and m_cookiePersistentStorage.
2590         (WebCookieManagerProxy):
2591         * UIProcess/efl/WebContextEfl.cpp: Assign the parameters' cookiePersistentStoragePath and
2592         cookiePersistentStorageType with the respective values.
2593         (WebKit::WebContext::platformInitializeWebProcess):
2594         * UIProcess/gtk/WebContextGtk.cpp: Assign the parameters' cookiePersistentStoragePath and
2595         cookiePersistentStorageType with the respective values.
2596         (WebKit::WebContext::platformInitializeWebProcess):
2597         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
2598         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Assign the m_cookiePersistentStorage pair
2599         with the method's parameters.
2600         (WebKit):
2601         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage): Implement this getter.
2602         * WebProcess/Cookies/WebCookieManager.h: Declare setCookiePersistentStorage.
2603         (WebCookieManager):
2604         * WebProcess/soup/WebProcessSoup.cpp:
2605         (WebKit::WebProcess::platformInitializeWebProcess): Set the cookies' persistent storage and policy
2606         using the WebCookieManager's methods.
2607
2608 2012-12-11  Jinwoo Song  <jinwoo7.song@samsung.com>
2609
2610         [EFL][WK2] Duplicated WebPageGroup initialization
2611         https://bugs.webkit.org/show_bug.cgi?id=103229
2612
2613         Reviewed by Kenneth Rohde Christiansen.
2614
2615         WebPageGroup does not need to be created in creating EwkView when the pageGroupRef is 0
2616         because the default WebPageGroup(m_defaultPageGroup) is created in WebContext constructor.
2617
2618         As a side effect on the duplicated initialization, pageGroupID increases even when the EwkView
2619         is created with default context.
2620
2621         * UIProcess/API/efl/ewk_view.cpp:
2622         (createEwkView):
2623
2624 2012-12-11  Sam Weinig  <sam@webkit.org>
2625
2626         Add API to set the maximum number of processes allowed in a WKContext
2627         https://bugs.webkit.org/show_bug.cgi?id=104769
2628
2629         Reviewed by Dan Bernstein.
2630
2631         Switch from using NSUserDefaults to a WKContext API to set the maximum number of processes
2632         for a context.
2633
2634         * UIProcess/API/C/WKContext.cpp:
2635         (WKContextSetMaximumNumberOfProcesses):
2636         (WKContextGetMaximumNumberOfProcesses):
2637         * UIProcess/API/C/WKContext.h:
2638         * UIProcess/WebContext.cpp:
2639         (WebKit::WebContext::setMaximumNumberOfProcesses):
2640         (WebKit):
2641         * UIProcess/WebContext.h:
2642         (WebContext):
2643         (WebKit::WebContext::maximumNumberOfProcesses):
2644         * UIProcess/mac/WebContextMac.mm:
2645         (WebKit::registerUserDefaultsIfNeeded):
2646         (WebKit::WebContext::platformInitialize):
2647
2648 2012-12-11  Kihong Kwon  <kihong.kwon@samsung.com>
2649
2650         Vibration API: IDL type doesn't match implementation type
2651         https://bugs.webkit.org/show_bug.cgi?id=103899
2652
2653         Reviewed by Kentaro Hara.
2654
2655         According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform.
2656         Therefore unsigned long need to be changed to unsigned for the Vibration API.
2657         - Change a parameter type of vibrate function from uint64_t to uint_32_t.
2658
2659         * UIProcess/API/C/WKVibration.h:
2660         * UIProcess/API/efl/EwkViewCallbacks.h:
2661         * UIProcess/WebVibrationProvider.cpp:
2662         (WebKit::WebVibrationProvider::vibrate):
2663         * UIProcess/WebVibrationProvider.h:
2664         (WebVibrationProvider):
2665         * UIProcess/WebVibrationProxy.cpp:
2666         (WebKit::WebVibrationProxy::vibrate):
2667         * UIProcess/WebVibrationProxy.h:
2668         (WebVibrationProxy):
2669         * UIProcess/WebVibrationProxy.messages.in:
2670         * UIProcess/efl/VibrationClientEfl.cpp:
2671         (VibrationClientEfl::vibrateCallback):
2672         * UIProcess/efl/VibrationClientEfl.h:
2673         (VibrationClientEfl):
2674         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
2675         (WebKit::WebVibrationClient::vibrate):
2676         * WebProcess/WebCoreSupport/WebVibrationClient.h:
2677         (WebVibrationClient):
2678
2679 2012-12-11  Alexey Proskuryakov  <ap@apple.com>
2680
2681         <rdar://problem/12857870> [WK2 NetworkProcess] Cannot load HTTPS sites
2682         https://bugs.webkit.org/show_bug.cgi?id=104732
2683
2684         Reviewed by Anders Carlsson.
2685
2686         * Shared/BlockingResponseMap.h: (BlockingBoolResponseMap::waitForResponse):
2687         Fixed to make sense.
2688
2689 2012-12-11  Xianzhu Wang  <wangxianzhu@chromium.org>
2690
2691         Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
2692         https://bugs.webkit.org/show_bug.cgi?id=104714
2693
2694         Reviewed by Eric Seidel.
2695
2696         Export symbol Page::mainThreadScrollingReasonsAsText().
2697
2698         * win/WebKit2.def.in:
2699
2700 2012-12-11  Gwang Yoon Hwang  <ryumiel@company100.net>
2701
2702         Coordinated Graphics: Rename LayerTreeCoordinator to CoordinatedLayerTreeHost
2703         https://bugs.webkit.org/show_bug.cgi?id=104641
2704
2705         Reviewed by Noam Rosenthal.
2706
2707         The name of LayerTreeCoordinator does not match LayerTreeHost.  This
2708         patch renames it to CoordinatedLayerTreeHost. And make a getter for
2709         CoordinatedLayerTreeHostProxy in QQuickWebPagePrivate to make a cleaner code.
2710
2711         No new tests - just a refactoring.
2712
2713         * CMakeLists.txt:
2714         * DerivedSources.pri:
2715         * Platform/CoreIPC/MessageID.h:
2716         * Target.pri:
2717         * UIProcess/API/efl/EwkViewImpl.cpp:
2718         (EwkViewImpl::layerTreeRenderer):
2719         * UIProcess/API/qt/qquickwebpage.cpp:
2720         (QQuickWebPagePrivate::paint):
2721         (QQuickWebPagePrivate::coordinatedLayerTreeHostProxy):
2722         (QQuickWebPage::updatePaintNode):
2723         (QQuickWebPagePrivate::updateSize):
2724         * UIProcess/API/qt/qquickwebpage_p_p.h:
2725         (WebKit):
2726         (QQuickWebPagePrivate):
2727         * UIProcess/API/qt/raw/qrawwebview.cpp:
2728         (QRawWebView::setSize):
2729         (QRawWebView::layerTreeRenderer):
2730         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp.
2731         (WebKit):
2732         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
2733         (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
2734         (WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
2735         (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate):
2736         (WebKit::CoordinatedLayerTreeHostProxy::createTileForLayer):
2737         (WebKit::CoordinatedLayerTreeHostProxy::updateTileForLayer):
2738         (WebKit::CoordinatedLayerTreeHostProxy::removeTileForLayer):
2739         (WebKit::CoordinatedLayerTreeHostProxy::createUpdateAtlas):
2740         (WebKit::CoordinatedLayerTreeHostProxy::removeUpdateAtlas):
2741         (WebKit::CoordinatedLayerTreeHostProxy::deleteCompositingLayer):
2742         (WebKit::CoordinatedLayerTreeHostProxy::setRootCompositingLayer):
2743         (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerState):
2744         (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerChildren):
2745         (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerFilters):
2746         (WebKit::CoordinatedLayerTreeHostProxy::removeCustomFilterProgram):
2747         (WebKit::CoordinatedLayerTreeHostProxy::createCustomFilterProgram):
2748         (WebKit::CoordinatedLayerTreeHostProxy::didRenderFrame):
2749         (WebKit::CoordinatedLayerTreeHostProxy::createImageBacking):
2750         (WebKit::CoordinatedLayerTreeHostProxy::updateImageBacking):
2751         (WebKit::CoordinatedLayerTreeHostProxy::clearImageBackingContents):
2752         (WebKit::CoordinatedLayerTreeHostProxy::removeImageBacking):
2753         (WebKit::CoordinatedLayerTreeHostProxy::setContentsSize):
2754         (WebKit::CoordinatedLayerTreeHostProxy::setLayerAnimations):
2755         (WebKit::CoordinatedLayerTreeHostProxy::setAnimationsLocked):
2756         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
2757         (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
2758         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
2759         (WebKit::CoordinatedLayerTreeHostProxy::animationFrameReady):
2760         (WebKit::CoordinatedLayerTreeHostProxy::didChangeScrollPosition):
2761         (WebKit::CoordinatedLayerTreeHostProxy::createCanvas):
2762         (WebKit::CoordinatedLayerTreeHostProxy::syncCanvas):
2763         (WebKit::CoordinatedLayerTreeHostProxy::destroyCanvas):
2764         (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
2765         (WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor):
2766         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h.
2767         (WebKit):
2768         (CoordinatedLayerTreeHostProxy):
2769         (WebKit::CoordinatedLayerTreeHostProxy::layerTreeRenderer):
2770         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in.
2771         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2772         (WebKit::LayerTreeRenderer::LayerTreeRenderer):
2773         (WebKit::LayerTreeRenderer::animationFrameReady):
2774         (WebKit::LayerTreeRenderer::updateViewport):
2775         (WebKit::LayerTreeRenderer::renderNextFrame):
2776         (WebKit::LayerTreeRenderer::purgeBackingStores):
2777         (WebKit::LayerTreeRenderer::detach):
2778         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2779         (WebKit):
2780         (LayerTreeRenderer):
2781         * UIProcess/DrawingAreaProxy.cpp:
2782         (WebKit::DrawingAreaProxy::didReceiveCoordinatedLayerTreeHostProxyMessage):
2783         * UIProcess/DrawingAreaProxy.h:
2784         (WebKit):
2785         (WebKit::DrawingAreaProxy::coordinatedLayerTreeHostProxy):
2786         (DrawingAreaProxy):
2787         * UIProcess/DrawingAreaProxyImpl.cpp:
2788         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2789         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2790         (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage):
2791         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
2792         * UIProcess/DrawingAreaProxyImpl.h:
2793         (WebKit):
2794         * UIProcess/WebPageProxy.cpp:
2795         (WebKit::WebPageProxy::didReceiveMessage):
2796         * UIProcess/efl/PageClientBase.cpp:
2797         * UIProcess/efl/PageClientLegacyImpl.cpp:
2798         (WebKit::PageClientLegacyImpl::didChangeContentsSize):
2799         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2800         (WebKit::PageViewportControllerClientEfl::setRendererActive):
2801         (WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
2802         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2803         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp.
2804         (WebKit):
2805         (WebKit::CoordinatedLayerTreeHost::create):
2806         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2807         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2808         (WebKit::CoordinatedLayerTreeHost::setLayerFlushSchedulingEnabled):
2809         (WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
2810         (WebKit::CoordinatedLayerTreeHost::cancelPendingLayerFlush):
2811         (WebKit::CoordinatedLayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush):
2812         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2813         (WebKit::CoordinatedLayerTreeHost::invalidate):
2814         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
2815         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
2816         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
2817         (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync):
2818         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
2819         (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
2820         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
2821         (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay):
2822         (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity):
2823         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
2824         (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded):
2825         (WebKit::CoordinatedLayerTreeHost::syncLayerState):
2826         (WebKit::CoordinatedLayerTreeHost::syncLayerChildren):
2827         (WebKit::CoordinatedLayerTreeHost::createCanvas):
2828         (WebKit::CoordinatedLayerTreeHost::syncCanvas):
2829         (WebKit::CoordinatedLayerTreeHost::destroyCanvas):
2830         (WebKit::CoordinatedLayerTreeHost::syncLayerFilters):
2831         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
2832         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
2833         (WebKit::CoordinatedLayerTreeHost::disconnectCustomFilterPrograms):
2834         (WebKit::CoordinatedLayerTreeHost::detachLayer):
2835         (WebKit::updateOffsetFromViewportForSelf):
2836         (WebKit::updateOffsetFromViewportForLayer):
2837         (WebKit::CoordinatedLayerTreeHost::syncFixedLayers):
2838         (WebKit::CoordinatedLayerTreeHost::lockAnimations):
2839         (WebKit::CoordinatedLayerTreeHost::unlockAnimations):
2840         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
2841         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
2842         (WebKit::CoordinatedLayerTreeHost::didPerformScheduledLayerFlush):
2843         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
2844         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
2845         (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer):
2846         (WebKit::CoordinatedLayerTreeHost::createImageBackingIfNeeded):
2847         (WebKit::CoordinatedLayerTreeHost::createImageBacking):
2848         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
2849         (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
2850         (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
2851         (WebKit::CoordinatedLayerTreeHost::flushPendingImageBackingChanges):
2852         (WebKit::CoordinatedLayerTreeHost::notifyAnimationStarted):
2853         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
2854         (WebKit::CoordinatedLayerTreeHost::paintContents):
2855         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
2856         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
2857         (WebKit::CoordinatedLayerTreeHost::createTile):
2858         (WebKit::CoordinatedLayerTreeHost::updateTile):
2859         (WebKit::CoordinatedLayerTreeHost::removeTile):
2860         (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
2861         (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
2862         (WebKit::CoordinatedLayerTreeHost::visibleContentsRect):
2863         (WebKit::CoordinatedLayerTreeHost::setLayerAnimations):
2864         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2865         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
2866         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
2867         (WebKit::CoordinatedLayerTreeHost::animationFrameReady):
2868         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
2869         (WebKit::CoordinatedLayerTreeHost::layerTreeTileUpdatesAllowed):
2870         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
2871         (WebKit::CoordinatedLayerTreeHost::beginContentUpdate):
2872         (WebKit::CoordinatedLayerTreeHost::scheduleReleaseInactiveAtlases):
2873         (WebKit::CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired):
2874         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
2875         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h.
2876         (WebKit):
2877         (CoordinatedLayerTreeHost):
2878         (WebKit::CoordinatedLayerTreeHost::layerTreeContext):
2879         (WebKit::CoordinatedLayerTreeHost::pageOverlayShouldApplyFadeWhenPainting):
2880         (WebKit::CoordinatedLayerTreeHost::pauseRendering):
2881         (WebKit::CoordinatedLayerTreeHost::resumeRendering):
2882         (WebKit::CoordinatedLayerTreeHost::deviceScaleFactorDidChange):
2883         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in.
2884         * WebProcess/WebPage/DrawingArea.h:
2885         (DrawingArea):
2886         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2887         (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage):
2888         * WebProcess/WebPage/DrawingAreaImpl.h:
2889         (DrawingAreaImpl):
2890         * WebProcess/WebPage/LayerTreeHost.cpp:
2891         (WebKit::LayerTreeHost::create):
2892         * WebProcess/WebPage/LayerTreeHost.h:
2893         (LayerTreeHost):
2894         * WebProcess/WebPage/WebPage.cpp:
2895         (WebKit::WebPage::WebPage):
2896         (WebKit::WebPage::~WebPage):
2897         (WebKit::WebPage::didReceiveMessage):
2898
2899 2012-12-11  Alexey Proskuryakov  <ap@apple.com>
2900
2901         <rdar://problem/12857080> Per-Tab WebProcess: Blue lines between menu tabs at apple.com
2902         https://bugs.webkit.org/show_bug.cgi?id=104709
2903
2904         Reviewed by Sam Weinig.
2905
2906         Data URLs were broken. Removing a no longer valid optimization for now.
2907
2908         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2909         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2910
2911 2012-12-11  Michael Pruett  <michael@68k.org>
2912
2913         [JSC] Add tests for explicit serialization values
2914         https://bugs.webkit.org/show_bug.cgi?id=104423
2915
2916         Reviewed by Oliver Hunt.
2917
2918         Add tests for serialization and deserialization mechanisms of
2919         the JSC implementation of SerializedScriptValue. Similar tests
2920         already exist for the V8 implementation.
2921
2922         * win/WebKit2.def.in:
2923
2924 2012-12-11  Jon Lee  <jonlee@apple.com>
2925
2926         Initialize new web processes with list of auto-start origins for plug-ins
2927         https://bugs.webkit.org/show_bug.cgi?id=103219
2928         <rdar://problem/12747219>
2929
2930         Reviewed by Anders Carlsson.
2931
2932         Serialize the set of hashes into a vector as a parameter in web process creation.
2933
2934         * Shared/WebProcessCreationParameters.h: Add a parameter for the origin hashes.
2935
2936         * Shared/WebProcessCreationParameters.cpp: Encode/decode that parameter.
2937         (WebKit::WebProcessCreationParameters::encode):
2938         (WebKit::WebProcessCreationParameters::decode):
2939
2940         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2941         (WebKit::PlugInAutoStartProvider::autoStartOriginsCopy): Return a vector copy with contents from the
2942         hash set.
2943         * UIProcess/Plugins/PlugInAutoStartProvider.h:
2944         (PlugInAutoStartProvider):
2945
2946         * UIProcess/WebContext.cpp:
2947         (WebKit::WebContext::createNewWebProcess): Populate the parameter with the contents of the set.
2948         * WebProcess/WebProcess.cpp:
2949         (WebKit::WebProcess::initializeWebProcess): Add the items in the vector to the web process' copy of the set.
2950
2951 2012-12-11  Andreas Kling  <akling@apple.com>
2952
2953         CoreIPC: ArgumentEncoder should have an inline buffer.
2954         <http://webkit.org/b/104622>
2955
2956         Reviewed by Anders Carlsson.
2957
2958         Add a 4K inline buffer to CoreIPC::ArgumentEncoder to avoid malloc/free churn.
2959         It was dominating the transient allocations graph in Instruments.
2960
2961         * Platform/CoreIPC/ArgumentEncoder.cpp:
2962         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
2963         (CoreIPC::ArgumentEncoder::grow):
2964         * Platform/CoreIPC/ArgumentEncoder.h:
2965         (CoreIPC::ArgumentEncoder::buffer):
2966         (ArgumentEncoder):
2967         (CoreIPC::ArgumentEncoder::usesInlineBuffer):
2968
2969 2012-12-11  Mike West  <mkwst@chromium.org>
2970
2971         Web Inspector: ConsoleTypes should not expose MessageType - it should be private to inspector.
2972         https://bugs.webkit.org/show_bug.cgi?id=66371
2973
2974         Reviewed by Pavel Feldman.
2975
2976         Drops WebCore::MessageLevel from the addMessageToConsole method.
2977
2978         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2979         (WebKit::WebChromeClient::addMessageToConsole):
2980         * WebProcess/WebCoreSupport/WebChromeClient.h:
2981         (WebChromeClient):
2982
2983 2012-12-11  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2984
2985         [EFL] Increase the timeout of the API unit tests
2986         https://bugs.webkit.org/show_bug.cgi?id=104666
2987
2988         Reviewed by Kenneth Rohde Christiansen.
2989
2990         Palliative fix until we find out why the tests are taking so long.
2991
2992         * PlatformEfl.cmake:
2993
2994 2012-12-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2995
2996         [Qt][EFL][WK2] Resizing the window doesn't always result in right content position
2997         https://bugs.webkit.org/show_bug.cgi?id=104416
2998
2999         Reviewed by Simon Hausmann.
3000
3001         Make sure the client is notified about position and scale changed done by us.
3002         Rename the m_*IsLocked to m_pending*Change as that makes the code more obvious.
3003
3004         Patch verified with both Qt and EFL.
3005
3006         * UIProcess/PageViewportController.cpp:
3007         (WebKit::PageViewportController::PageViewportController):
3008         (WebKit::PageViewportController::didRenderFrame): Notify client and pixel align.
3009         (WebKit::PageViewportController::didChangeContentsVisibility):
3010         (WebKit::PageViewportController::didChangeViewportAttributes):
3011         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
3012         (WebKit::PageViewportController::applyPositionAfterRenderingContents):
3013         * UIProcess/PageViewportController.h:
3014         (PageViewportController):
3015
3016 2012-12-11  Christophe Dumez  <christophe.dumez@intel.com>
3017
3018         [CoordinatedGraphics] Use unsigned integers for UpdateAtlas IDs
3019         https://bugs.webkit.org/show_bug.cgi?id=104654
3020
3021         Reviewed by Kenneth Rohde Christiansen.
3022
3023         UpdateAtlas currently uses *signed* integer type for its identifier.
3024         Due to the way we generate those IDs, it is safer to use *unsigned*
3025         integers. This is because the generated ID will overflow at some
3026         point and the C and C++ language standards say that overflow of a
3027         signed value is undefined behaviour.
3028
3029         This patch switches to unsigned integer type for UpdateAtlas IDs
3030         since unsigned integers are guaranteed to wrap around on overflow.
3031
3032         * Shared/SurfaceUpdateInfo.h:
3033         (SurfaceUpdateInfo):
3034         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
3035         (WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas):
3036         (WebKit::LayerTreeCoordinatorProxy::removeUpdateAtlas):
3037         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
3038         (LayerTreeCoordinatorProxy):
3039         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
3040         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3041         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
3042         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
3043         (CoordinatedGraphicsLayerClient):
3044         (CoordinatedGraphicsLayer):
3045         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
3046         (CoordinatedTileClient):
3047         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
3048         (WebKit::LayerTreeCoordinator::createUpdateAtlas):
3049         (WebKit::LayerTreeCoordinator::removeUpdateAtlas):
3050         (WebKit::LayerTreeCoordinator::beginContentUpdate):
3051         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
3052         (LayerTreeCoordinator):
3053         * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
3054         (WebKit::UpdateAtlas::UpdateAtlas):
3055         (WebKit::UpdateAtlas::~UpdateAtlas):
3056         (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
3057         * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
3058         (UpdateAtlasClient):
3059         (UpdateAtlas):
3060
3061 2012-12-11  Jinwoo Song  <jinwoo7.song@samsung.com>
3062
3063         [EFL][WK2] Create a ewk view object with new context for API tests
3064         https://bugs.webkit.org/show_bug.cgi?id=103692
3065
3066         Reviewed by Gyuyoung Kim. 
3067
3068         Bug 103229 fixes the issue which PageGroupID increased even though
3069         the EwkView was created with default context. If the Bug 103229 is
3070         resolved, the EwkViews with same context will have same setting preferences.
3071
3072         Currently, WebKit2/EFL API test is creating the ewk view object
3073         with the default context so the setting values set previously may
3074         influence the following tests. So this patch created a ewk view object
3075         with a new context instead of default one.
3076
3077         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3078         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
3079
3080 2012-12-10  Dan Winship  <danw@gnome.org>
3081
3082         [Soup] Fix spelling of "initiating" in API.
3083
3084         Reviewed by Martin Robinson.
3085
3086         * WebProcess/soup/WebSoupRequestManager.cpp:
3087         (WebKit::WebSoupRequestManager::send):
3088
3089 2012-12-10  Alexey Proskuryakov  <ap@apple.com>
3090
3091         [WK2] Add a user default to limit the number of web processes
3092         https://bugs.webkit.org/show_bug.cgi?id=104606
3093
3094         Reviewed by Sam Weinig.
3095
3096         When the limit is reached, we'll reuse an existing process with fewest pages.
3097
3098         * UIProcess/WebContext.cpp:
3099         (WebKit::WebContext::WebContext): Initialize m_webProcessCountLimit.
3100         (WebKit::WebContext::platformInitialize): Added a hook for reading the preference,
3101         empty implementation on most platforms.
3102         (WebKit::WebContext::createNewWebProcess): Changed to return a raw pointer. The new
3103         process is put into a vector anyway, so there is no ownership transfer.
3104         (WebKit::WebContext::warmInitialProcess): Don't create a new process if that would
3105         exceed the limit.
3106         (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit): Added a new
3107         function that wither creates a new process, or picks an existing one.
3108         (WebKit::WebContext::createWebPage): Call the above new function instead of
3109         unconditionally creating a process.
3110
3111         * UIProcess/WebContext.h: createNewWebProcess is no private. All clients should
3112         respect the process count limit.
3113
3114         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess):
3115         Respect the process count limit.
3116
3117         * UIProcess/mac/WebContextMac.mm:
3118         (WebKit::registerUserDefaultsIfNeeded): Register the new default.
3119         (WebKit::WebContext::platformInitialize): Read the default into a WebContext
3120         member variable.
3121         (WebKit::WebContext::platformInitializeWebProcess): Moved registerUserDefaultsIfNeeded()
3122         from here to platformInitialize(), as that's a better place for it. Also added a
3123         FIXME for an unrelated issue.
3124
3125 2012-12-10  Jon Lee  <jonlee@apple.com>
3126
3127         Build fix.
3128
3129         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
3130         (WebKit::WebPlugInClient::WebPlugInClient): Remove unneeded m_page variable.
3131         * WebProcess/WebCoreSupport/WebPlugInClient.h:
3132         (WebPlugInClient):
3133
3134 2012-12-10  Jon Lee  <jonlee@apple.com>
3135
3136         Keep track of plug-in snapshots clicked by user
3137         https://bugs.webkit.org/show_bug.cgi?id=103206
3138         <rdar://problem/12746483>
3139
3140         Reviewed by Anders Carlsson.
3141
3142         Create a new provider class for the web context that maintains a mapping of the plug-in origins
3143         allowed to auto-start for a specific page origin.
3144
3145         * WebProcess/WebPage/WebPage.cpp:
3146         (WebKit::WebPage::WebPage): Create and set WebPlugInClient.
3147
3148         Implement WebCore::PlugInClient.
3149         * WebProcess/WebCoreSupport/WebPlugInClient.cpp: Added.
3150         (WebKit::WebPlugInClient::WebPlugInClient):
3151         (WebKit::WebPlugInClient::~WebPlugInClient):
3152         (WebKit::WebPlugInClient::pageDestroyed):
3153         (WebKit::WebPlugInClient::isAutoStartOrigin): Forward to WebProcess.
3154         (WebKit::WebPlugInClient::addAutoStartOrigin): Forward to WebProcess.
3155         * WebProcess/WebCoreSupport/WebPlugInClient.h: Added.
3156
3157         * WebProcess/WebProcess.cpp: Maintains a copy of the hash set.
3158         (WebKit::WebProcess::isPlugInAutoStartOrigin): Look for the hash in the set.
3159         (WebKit::WebProcess::addPlugInAutoStartOrigin): Tell the UI process to add the hash for the page.
3160         (WebKit::WebProcess::didAddPlugInAutoStartOrigin): Add the hash to the cached set.
3161         * WebProcess/WebProcess.h:
3162         * WebProcess/WebProcess.messages.in: Add DidAddPlugInAutoStartOrigin.
3163
3164         Add the auto-start provider.
3165         * UIProcess/WebContext.cpp:
3166         (WebKit::WebContext::WebContext): Initialize the provider.
3167         (WebKit::WebContext::addPlugInAutoStartOriginHash): Forward to the provider.
3168         * UIProcess/WebContext.h:
3169         * UIProcess/WebContext.messages.in: Add AddPlugInAutoStartOriginHash.
3170
3171         The provider class maintains a map of page domains to hashes, and a set of all the hashes.
3172         The latter will be used to initialize new web processes without having to crawl through the
3173         whole map.
3174         * UIProcess/Plugins/PlugInAutoStartProvider.cpp: Added.
3175         (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
3176         (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): Add the origin to the map and set. Tell
3177         all processes to add the origin to their local copies.
3178         * UIProcess/Plugins/PlugInAutoStartProvider.h: Added.
3179
3180         Add PlugInAutoStartProvider and WebPlugInClient.
3181         * CMakeLists.txt:
3182         * GNUmakefile.list.am:
3183         * Target.pri:
3184         * WebKit2.xcodeproj/project.pbxproj:
3185         * win/WebKit2.vcproj:
3186
3187 2012-12-10  Anders Carlsson  <andersca@apple.com>
3188
3189         Add WKPageSetInvalidMessageFunction stub
3190         https://bugs.webkit.org/show_bug.cgi?id=104614
3191         <rdar://problem/12841671>
3192
3193         Reviewed by Mark Rowe.
3194
3195         * UIProcess/API/C/WKPage.cpp:
3196         (WKPageSetInvalidMessageFunction):
3197         * UIProcess/API/C/WKPagePrivate.h:
3198
3199 2012-12-09  Antti Koivisto  <antti@apple.com>
3200
3201         Factor node traversal into standalone functions
3202         https://bugs.webkit.org/show_bug.cgi?id=104507
3203
3204         Reviewed by Eric Seidel.
3205
3206         * WebProcess/WebPage/WebFrame.cpp:
3207         (WebKit::WebFrame::containsAnyFormElements):
3208
3209 2012-12-10  Eduardo Lima Mitev  <elima@igalia.com>
3210
3211         [GTK] Expose HitTestResult::scrollbar() condition in API
3212         https://bugs.webkit.org/show_bug.cgi?id=104369
3213
3214         Reviewed by Carlos Garcia Campos.
3215
3216         This patch populates WebCore::HitTestResult::scrollbar() condition
3217         in WebKitHitTestResult public API, and includes a corresponding unit
3218         test.
3219
3220         * Shared/WebHitTestResult.cpp: Adds new isScrollbar member to
3221         encoding and decoding methods to carry the scrollbar condition
3222         from Web process to UI process.
3223         (WebKit::WebHitTestResult::Data::encode):
3224         (WebKit::WebHitTestResult::Data::decode):
3225         * Shared/WebHitTestResult.h:
3226         (Data): Adds new bool member isScrollbar.
3227         (WebKit::WebHitTestResult::Data::Data): Initializes isScrollbar from
3228         WebCore::HitTestResult::scrollbar().
3229         (WebKit::WebHitTestResult::isScrollbar): Method that returns value
3230         of isScrollbar member.
3231         (WebHitTestResult):
3232         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
3233         (webkitHitTestResultCreate): Adds scrollbar condition to context upon
3234         initialization.
3235         (webkitHitTestResultCompare): Adds comparison of scrollbar condition.
3236         (webkit_hit_test_result_context_is_scrollbar): Public accessor for
3237         scrollbar presence in context.
3238         * UIProcess/API/gtk/WebKitHitTestResult.h: Adds new flag
3239         WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR to
3240         WebKitHitTestResultContext enum.
3241         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Adds new API symbol
3242         to the corresponding documentation sections.
3243         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3244         (testWebViewMouseTarget): Updates mouse-target
3245         test to include assertions for hitting scrollbar condition, and
3246         an new HTML to privide a positive case.
3247
3248 2012-12-10  Alexis Menard  <alexis@webkit.org>
3249
3250         [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag.
3251         https://bugs.webkit.org/show_bug.cgi?id=104539
3252
3253         Reviewed by Antonio Gomes.
3254
3255         As discussed on webkit-dev it is not needed to keep this feature flag 
3256         as support for <position> type is a small feature that is already 
3257         implemented by three other UAs. It was useful while landing this 
3258         feature as partial bits were landed one after one.
3259
3260         * Configurations/FeatureDefines.xcconfig:
3261
3262 2012-12-10  Alberto Garcia  <agarcia@igalia.com>
3263
3264         WebKitWebViewBase produces a warning if compiled with gcc
3265         https://bugs.webkit.org/show_bug.cgi?id=104561
3266
3267         Reviewed by Carlos Garcia Campos.
3268
3269         * UIProcess/API/gtk/WebKitWebViewBase.h:
3270         since this file can be included from C code, use void to
3271         explicitly specify that webkit_web_view_base_get_type() doesn't
3272         have parameters. Otherwise we get "warning: function declaration
3273         isn't a prototype" with -Wstrict-prototypes.
3274
3275 2012-12-10  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3276
3277         [WK2] TiledBackingStore: remove unneeded 'treatAsInitialValue' parameter from PageViewportControllerClient::setContentsScale
3278         https://bugs.webkit.org/show_bug.cgi?id=104544
3279
3280         Reviewed by Kenneth Rohde Christiansen.
3281
3282         Removed 'treatAsInitialValue' parameter from PageViewportControllerClient::setContentsScale()
3283         as it was not used by anyone.
3284
3285         * UIProcess/PageViewportController.cpp:
3286         (WebKit::PageViewportController::didRenderFrame):
3287         * UIProcess/PageViewportControllerClient.h:
3288         (PageViewportControllerClient):
3289         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3290         (WebKit::PageViewportControllerClientEfl::setContentsScale):
3291         * UIProcess/efl/PageViewportControllerClientEfl.h:
3292         (PageViewportControllerClientEfl):
3293         * UIProcess/qt/PageViewportControllerClientQt.cpp:
3294         (WebKit::PageViewportControllerClientQt::setContentsScale):
3295         * UIProcess/qt/PageViewportControllerClientQt.h:
3296         (PageViewportControllerClientQt):
3297
3298 2012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
3299
3300         Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
3301         https://bugs.webkit.org/show_bug.cgi?id=103886
3302
3303         Reviewed by Kenneth Rohde Christiansen.
3304
3305         Add support for TestRunner::setViewModeMediaFeature().
3306         This functionality is needed by the following LayoutTests:
3307         fast/media/media-query-list-02.html
3308         fast/media/media-query-list-03.html
3309         fast/media/media-query-list-04.html
3310         fast/media/media-query-list-05.html
3311         fast/media/media-query-list-06.html
3312         fast/media/media-query-list-07.html
3313         fast/media/view-mode-media-feature.html
3314
3315         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3316         (WKBundlePageSetViewMode):
3317         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3318         * WebProcess/WebPage/WebPage.cpp:
3319         (WebKit::WebPage::setViewMode):
3320         (WebKit):
3321         * WebProcess/WebPage/WebPage.h:
3322         (WebPage):
3323
3324 2012-12-10  Simon Hausmann  <simon.hausmann@digia.com>
3325
3326         [Qt] Fix QtWebProcess discovery on Windows
3327         https://bugs.webkit.org/show_bug.cgi?id=104552
3328
3329         Reviewed by Jocelyn Turcotte.
3330
3331         Make sure to look for QtWebProcess.exe on Windows instead of QtWebProcess.
3332
3333         * Shared/qt/ProcessExecutablePathQt.cpp:
3334         (WebKit::executablePath):
3335
3336 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
3337
3338         [GTK] Bring Harfbuzz-ng support to Gtk
3339         https://bugs.webkit.org/show_bug.cgi?id=92098
3340
3341         Reviewed by Gustavo Noronha Silva.
3342
3343         Add a HarfBuzz dependency.
3344
3345         * GNUmakefile.am: Add FreeType/HarfBuzz CFLAGS/LIBS to the libraries.
3346
3347 2012-12-10  Simon Hausmann  <simon.hausmann@digia.com>
3348
3349         [Qt] Use QLibraryInfo::LibraryExecutablesPath unconditionally
3350         https://bugs.webkit.org/show_bug.cgi?id=104541
3351
3352         Reviewed by Jocelyn Turcotte.
3353
3354         We now depend on a Qt 5 version that is guaranteed to have this API, so we
3355         can remove the configure checks for it.
3356
3357         * PluginProcess.pro:
3358         * Shared/qt/ProcessExecutablePathQt.cpp:
3359         (WebKit::executablePath):
3360         * WebProcess.pro:
3361
3362 2012-12-10  Simon Hausmann  <simon.hausmann@digia.com>
3363
3364         [Qt] Fix build without QtQuick 2
3365
3366         Unreviewed trivial build fix.
3367
3368         This function is defined in QtWebContext, which is only used when QtQuick2 is available.
3369
3370         * UIProcess/qt/WebContextQt.cpp:
3371         (WebKit::WebContext::platformInvalidateContext):
3372
3373 2012-12-10  Huang Dongsung  <luxtella@company100.net>
3374
3375         Coordinated Graphics: Remove the dependency of ShareableSurface from Coordinated Graphics.
3376         https://bugs.webkit.org/show_bug.cgi?id=100819
3377
3378         Reviewed by Kenneth Rohde Christiansen.
3379
3380         It is a follow-up patch of r137117.
3381
3382         There are two changes
3383         1. Add a const qualifier to supportsAlpha().
3384         2. Use << instead of encode() when using ArgumentEncoder.
3385
3386         * Shared/CoordinatedGraphics/CoordinatedSurface.h:
3387         (WebKit::CoordinatedSurface::supportsAlpha):
3388         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3389         (WebKit::WebCoordinatedSurface::Handle::encode):
3390         (WebKit::WebCoordinatedSurface::copyToTexture):
3391
3392 2012-12-10  Huang Dongsung  <luxtella@company100.net>
3393
3394         Coordinated Graphics: Remove the dependency of ShareableSurface from Coordinated Graphics.
3395         https://bugs.webkit.org/show_bug.cgi?id=100819
3396
3397         Reviewed by Kenneth Rohde Christiansen.
3398
3399         WebCoordinatedSurface::copyToTexture should return early if the backend
3400         is GraphicsSurface.
3401
3402         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3403         (WebKit::WebCoordinatedSurface::copyToTexture):
3404
3405 2012-12-10  Huang Dongsung  <luxtella@company100.net>
3406
3407         Coordinated Graphics: Add CoordinatedSurface to remove the dependency of ShareableSurface from Coordinated Graphics.
3408         https://bugs.webkit.org/show_bug.cgi?id=100819
3409
3410         Reviewed by Noam Rosenthal.
3411
3412         Internal Review by Gwang Yoon Hwang and Jae Hyun Park.
3413
3414         It is a preparation patch for Threaded Coordinated Graphics on WK1.
3415
3416         Create a CoordinatedSurface class that can be the base class both for
3417         the current IPC-based ShareableSurface, renamed here to
3418         WebCoordinatedSurface, and to a future thread-based surface
3419         implementation.
3420
3421         * CMakeLists.txt:
3422         * Shared/CoordinatedGraphics/CoordinatedSurface.h: Added.
3423         (WebCore):
3424         (WebKit):
3425         (CoordinatedSurface):
3426         (WebKit::CoordinatedSurface::~CoordinatedSurface):
3427         (WebKit::CoordinatedSurface::supportsAlpha):
3428         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Renamed from Source/WebKit2/Shared/ShareableSurface.cpp.
3429           Extends CoordinatedSurface.
3430         (WebKit):
3431         (WebKit::WebCoordinatedSurface::Handle::Handle):
3432         (WebKit::WebCoordinatedSurface::Handle::encode):
3433         (WebKit::WebCoordinatedSurface::Handle::decode):
3434         (WebKit::CoordinatedSurface::create):
3435         (WebKit::WebCoordinatedSurface::create):
3436         (WebKit::WebCoordinatedSurface::createWithSurface):
3437         (WebKit::WebCoordinatedSurface::createGraphicsContext):
3438         (WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
3439         (WebKit::WebCoordinatedSurface::~WebCoordinatedSurface):
3440         (WebKit::WebCoordinatedSurface::createHandle):
3441         (WebKit::WebCoordinatedSurface::copyToTexture):
3442         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: Renamed from Source/WebKit2/Shared/ShareableSurface.h.
3443         (WebCore):
3444         (WebKit):
3445         (WebCoordinatedSurface):
3446         (Handle):
3447         (WebKit::WebCoordinatedSurface::Handle::graphicsSurfaceToken):
3448         (WebKit::WebCoordinatedSurface::isBackedByGraphicsSurface):
3449         * Target.pri:
3450         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
3451         (WebKit::CoordinatedBackingStoreTile::swapBuffers):
3452         (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
3453         (WebKit::CoordinatedBackingStore::updateTile):
3454         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
3455         (WebKit):
3456         (CoordinatedBackingStoreTile):
3457         (CoordinatedBackingStore):
3458         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
3459         (WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas):
3460         (WebKit::LayerTreeCoordinatorProxy::updateImageBacking):
3461         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
3462         (LayerTreeCoordinatorProxy):
3463         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
3464         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3465         (WebKit::LayerTreeRenderer::updateImageBacking):
3466         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
3467         (TileUpdate):
3468         (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate):
3469         (LayerTreeRenderer):
3470         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3471         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
3472         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
3473         (CoordinatedGraphicsLayerClient):
3474         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp:
3475         (WebKit::CoordinatedImageBacking::update):
3476         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
3477         (Coordinator):
3478         (CoordinatedImageBacking):
3479         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
3480         (WebKit::LayerTreeCoordinator::updateImageBacking):
3481         (WebKit::LayerTreeCoordinator::createUpdateAtlas):
3482         (WebKit::LayerTreeCoordinator::beginContentUpdate):
3483         (WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired):
3484         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
3485         (LayerTreeCoordinator):
3486         * WebProcess/W