Move loading responsibility out of WebResourceLoadScheduler into a new WebResourceLoader
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-11-14  Brady Eidson  <beidson@apple.com>
2
3         Move loading responsibility out of WebResourceLoadScheduler into a new WebResourceLoader
4         https://bugs.webkit.org/show_bug.cgi?id=102259
5
6         Reviewed by Alexey Proskuryakov.
7
8         Add a new WebResourceLoader message class which allows NetworkResourceLoader to message
9         WebResourceLoaders directly.
10
11         Consolidate the NetworkProcessConnection and WebResourceLoadScheduler messaging responsibilities
12         directly into WebResourceLoader.
13
14         Build-system infrastructure stuff:
15         * DerivedSources.make:
16         * Platform/CoreIPC/MessageID.h:
17         * WebKit2.xcodeproj/project.pbxproj:
18
19         Message directly to WebResourceLoader instead of NetworkProcessConnection:
20         * NetworkProcess/NetworkResourceLoader.cpp:
21         (WebKit::NetworkResourceLoader::connection):
22         (WebKit::NetworkResourceLoader::didReceiveResponse):
23         (WebKit::NetworkResourceLoader::didReceiveData):
24         (WebKit::NetworkResourceLoader::didFinishLoading):
25         (WebKit::NetworkResourceLoader::didFail):
26         (WebKit::NetworkResourceLoader::willSendRequest):
27         * NetworkProcess/NetworkResourceLoader.h:
28         (WebKit::NetworkResourceLoader::destinationID):
29
30         For now handle the only relevant message class which is the WebResourceLoader class:
31         * WebProcess/Network/NetworkProcessConnection.cpp:
32         (WebKit::NetworkProcessConnection::didReceiveMessage):
33         * WebProcess/Network/NetworkProcessConnection.h:
34         * WebProcess/Network/NetworkProcessConnection.messages.in:
35
36         Allow access to WebResourceLoaders by identifier:
37         * WebProcess/Network/WebResourceLoadScheduler.cpp:
38         * WebProcess/Network/WebResourceLoadScheduler.h:
39         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
40
41         Directly handle resource loading messages instead of having WebResourceLoadScheduler do it:
42         * WebProcess/Network/WebResourceLoader.cpp:
43         (WebKit::WebResourceLoader::willSendRequest):
44         (WebKit::WebResourceLoader::didReceiveResponse):
45         (WebKit::WebResourceLoader::didReceiveData):
46         (WebKit::WebResourceLoader::didFinishResourceLoad):
47         (WebKit::WebResourceLoader::didFailResourceLoad):
48         (WebKit::WebResourceLoader::didReceiveResource):
49         * WebProcess/Network/WebResourceLoader.h:
50         * WebProcess/Network/WebResourceLoader.messages.in:
51
52 2012-11-14  Andy Estes  <aestes@apple.com>
53
54         Fix the Lion build after r134681.
55
56         * WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
57
58 2012-11-08  Andy Estes  <aestes@apple.com>
59
60         [WebKit2] Need API in UIProcess to enable loading of custom protocols
61         https://bugs.webkit.org/show_bug.cgi?id=101674
62
63         Reviewed by Brady Eidson.
64
65         Enable clients of WebKit2 to implement NSURLProtocol subclasses to
66         control the loading of resources with schemes that WebKit2 cannot
67         handle natively. Since loading happens in a different process, we
68         accomplish this by registering a global NSURLProtocol in the web
69         process and proxying NSURLProtocol and NSURLProtocolClient calls to
70         the client's NSURLProtocol in the UI process.
71
72         * DerivedSources.make: Addded new .messages.in files.
73         * Platform/CoreIPC/MessageID.h:
74         * Shared/WebProcessCreationParameters.cpp: Added the list of supported schemes.
75         (WebKit::WebProcessCreationParameters::encode):
76         (WebKit::WebProcessCreationParameters::decode):
77         * Shared/WebProcessCreationParameters.h:
78         * UIProcess/API/mac/WKBrowsingContextController.h:
79         * UIProcess/API/mac/WKBrowsingContextController.mm:
80         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
81         Added a class method where a client can register a scheme that it supports.
82         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
83         Added a class method where a client can unregister a scheme that it no longer supports.
84         (+[WKBrowsingContextController customSchemes]):
85         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
86         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: Added.
87         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in: Added.
88         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: Added.
89
90         Implemented an NSURLConnectionDelegate that proxies messages to the
91         equivalent NSURLProtocolClient in the web process:
92         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
93         (-[WKCustomProtocolLoader dealloc]):
94         (-[WKCustomProtocolLoader connection:didFailWithError:]):
95         (-[WKCustomProtocolLoader connection:willCacheResponse:]):
96         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
97         (-[WKCustomProtocolLoader connection:didReceiveData:]):
98         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
99         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
100
101         Implemented a proxy that recieves -startLoading and -stopLoading
102         messages from the NSURLProtocol in the web process and starts an
103         NSURLConnection in the UI process, which will instantiate the client's NSURLProtocol:
104         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
105         (WebKit::CustomProtocolManagerProxy::didReceiveMessage):
106         (WebKit::CustomProtocolManagerProxy::startLoading):
107         (WebKit::CustomProtocolManagerProxy::stopLoading):
108
109         * UIProcess/WebContext.h: Declared strings that store names of
110         NSNotifications used for scheme registration in the UI process.
111         * UIProcess/WebProcessProxy.cpp:
112         (WebKit::WebProcessProxy::WebProcessProxy):
113         (WebKit::WebProcessProxy::didReceiveMessage): Forwarded messages to the
114         CustomProtocolManagerProxy.
115         * UIProcess/WebProcessProxy.h:
116         * UIProcess/mac/WebContextMac.mm:
117         (WebKit::WebContext::platformInitializeWebProcess): Added the currently
118         registered schemes to the WebProcessCreationParameters and register
119         NSNotification observers for new scheme registration that forwards to
120         the context's web processes.
121         * WebKit2.xcodeproj/project.pbxproj:
122         * WebKit2Prefix.h: Enabled the CUSTOM_PROTOCOLS macro for the Mac.
123         * WebProcess/Network/CustomProtocols/CustomProtocolManager.h: Added.
124         * WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in: Added.
125         * WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Added.
126         (generateCustomProtocolID): Generate a per-WebProcess unique ID.
127
128         Implemented a global NSURLProtocol that claims to support all schemes
129         registered in the UI process. When NSURLConnection calls -startLoading
130         and -stopLoading, we forward these messages to the client's NSURLProtocol
131         in the UI process:
132         (+[WKCustomProtocol canInitWithRequest:]):
133         (+[WKCustomProtocol canonicalRequestForRequest:]):
134         (+[WKCustomProtocol requestIsCacheEquivalent:toRequest:]):
135         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
136         (-[WKCustomProtocol startLoading]):
137         (-[WKCustomProtocol stopLoading]):
138
139         Implemented a manager that receives NSURLConnectionDelegate messages
140         forwarded from the UI process and passes them to the global NSURLProtocol's NSURLProtocolClient:
141         (WebKit::CustomProtocolManager::shared):
142         (WebKit::CustomProtocolManager::registerCustomProtocolClass):
143         (WebKit::CustomProtocolManager::addCustomProtocol):
144         (WebKit::CustomProtocolManager::removeCustomProtocol):
145         (WebKit::CustomProtocolManager::registerScheme):
146         (WebKit::CustomProtocolManager::unregisterScheme):
147         (WebKit::CustomProtocolManager::supportsScheme):
148         (WebKit::CustomProtocolManager::didReceiveMessage):
149         (WebKit::CustomProtocolManager::didFailWithError):
150         (WebKit::CustomProtocolManager::didLoadData):
151         (WebKit::CustomProtocolManager::didReceiveResponse):
152         (WebKit::CustomProtocolManager::didFinishLoading):
153         (WebKit::CustomProtocolManager::protocolForID):
154
155         * WebProcess/WebProcess.cpp:
156         (WebKit::WebProcess::didReceiveMessage): Forwarded messages to the
157         shared CustomProtocolManager.
158         (WebKit::WebProcess::registerSchemeForCustomProtocol): Register a
159         scheme received from the UI process.
160         (WebKit::WebProcess::unregisterSchemeForCustomProtocol): Unregister a
161         scheme received from the UI process.
162         * WebProcess/WebProcess.h:
163         * WebProcess/WebProcess.messages.in: Declared messages for passing
164         supported schemes from the UI process the web process.
165         * WebProcess/mac/WebProcessMac.mm:
166         (WebKit::WebProcess::platformInitializeWebProcess): Register the
167         schemes contained in the WebProcessCreationParameters.
168
169 2012-11-14  Helder Correia  <helder.correia@nokia.com>
170
171         [TexMap][Cairo] Accelerated compositing debug visuals
172         https://bugs.webkit.org/show_bug.cgi?id=101883
173
174         Reviewed by Kenneth Rohde Christiansen.
175
176         No new tests, just introducing a debug feature.
177
178         Add a Cairo implementation to complement the patch from bug 90116
179         (http://trac.webkit.org/changeset/122275).
180
181         For this feature to be enabled, the environment variable
182         WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
183         both repaint counters and tile borders will be painted.
184
185         A Cairo-specific drawRepaintCounter() implementation was added to
186         TextureMapperGL. A cairo_surface_t is used as scratch buffer to paint
187         the counters. It is then uploaded to a BitmapTexture acquired
188         from the pool and finally draw by TextureMapper. The actual compositing
189         happens inside LayerBackingStore::paintToTextureMapper(). Each
190         LayerBackingStoreTile has a repaint counter which gets incremented in
191         LayerBackingStore::updateTile().
192
193         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
194         (WebKit::shouldShowTileDebugVisuals):
195
196 2012-11-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
197
198         Coordinated Graphics: Rename m_CoordinatedGraphicsLayerClient to m_coordinator
199         https://bugs.webkit.org/show_bug.cgi?id=102133
200
201         Renamed m_CoordinatedGraphicsLayerClient to m_coordinator.
202         Also, there is no need for calling setCoordinator every time the tree changes,
203         since we can call it once when the layer is created, now that LayerTreeCoordinator
204         is the GraphicsLayerFactory.
205
206         Reviewed by Kenneth Rohde Christiansen
207
208         No change in functionality.
209
210         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
211         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
212         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
213         (WebCore::CoordinatedGraphicsLayer::setChildren):
214         (WebCore::CoordinatedGraphicsLayer::addChild):
215         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
216         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
217         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
218         (WebCore::CoordinatedGraphicsLayer::replaceChild):
219         (WebCore::CoordinatedGraphicsLayer::setContentsToImage):
220         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
221         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
222         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
223         (WebCore::CoordinatedGraphicsLayer::syncChildren):
224         (WebCore::CoordinatedGraphicsLayer::syncFilters):
225         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
226         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
227         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
228         (WebCore::CoordinatedGraphicsLayer::ensureImageBackingStore):
229         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed):
230         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
231         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
232         (WebCore::CoordinatedGraphicsLayer::createTile):
233         (WebCore::CoordinatedGraphicsLayer::updateTile):
234         (WebCore::CoordinatedGraphicsLayer::removeTile):
235         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
236         (WebCore::CoordinatedGraphicsLayer::setCoordinator):
237         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
238         (CoordinatedGraphicsLayer):
239         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
240         (WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
241         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
242         (WebKit::LayerTreeCoordinator::paintContents):
243
244 2012-11-14  Anders Carlsson  <andersca@apple.com>
245
246         More steps towards actually hosting layers in the UI process
247         https://bugs.webkit.org/show_bug.cgi?id=102275
248
249         Reviewed by Andreas Kling.
250
251         * Shared/mac/RemoteLayerTreeTransaction.h:
252         (WebKit::RemoteLayerTreeTransaction::rootLayerID):
253         Add a getter for the root layer ID.
254
255         * UIProcess/mac/RemoteLayerTreeHost.h:
256         (RemoteLayerTreeHost):
257         Add root layer member variable. Make the RemoteLayerTreeHost class a GraphicsLayerClient.
258
259         * UIProcess/mac/RemoteLayerTreeHost.mm:
260         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
261         Initialize the root layer to null.
262
263         (WebKit::RemoteLayerTreeHost::notifyAnimationStarted):
264         (WebKit::RemoteLayerTreeHost::notifyFlushRequired):
265         (WebKit::RemoteLayerTreeHost::paintContents):
266         Add empty stubs.
267
268         (WebKit::RemoteLayerTreeHost::commit):
269         Try to get the root layer.
270
271         (WebKit::RemoteLayerTreeHost::getOrCreateLayer):
272         Look up the layer with the given ID in the m_layers hash table and create it if it doesn't exist.
273
274 2012-11-14  Brady Eidson  <beidson@apple.com>
275
276         Fix the Production build after r134640 broke it.
277
278         * WebProcess/Network/WebResourceLoader.h:
279         (WebKit::WebResourceLoader::resourceLoadIdentifier): Use the un-used.
280
281 2012-11-14  Tim Horton  <timothy_horton@apple.com>
282
283         PDFPlugin should make use of PDFKit's fluid zooming
284         https://bugs.webkit.org/show_bug.cgi?id=101962
285         <rdar://problem/12555229>
286
287         Reviewed by Anders Carlsson.
288
289         Expose the notion of a frame that handles page scale gestures via WebFrame and to the bundle via WKBundleFrame.
290         The only frames that will purport to handle page scale gestures are those which contain PluginDocuments
291         backed by PDFPlugin, for now. Also, allow PDFKit to do its own fluid zooming animation.
292
293         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
294         (WKBundleFrameHandlesPageScaleGesture): Provide WKBundleFrameHandlesPageScaleGesture to
295         inform the injected bundle whether or not the frame handles scaling itself.
296         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: Add WKBundleFrameHandlesPageScaleGesture.
297         * WebProcess/Plugins/PDF/PDFPlugin.mm:
298         (WebKit::PDFPlugin::geometryDidChange): Allow PDFKit to use its fluid zooming instead of changing
299         the scale factor immediately.
300         * WebProcess/WebPage/WebFrame.cpp:
301         (WebKit::WebFrame::handlesPageScaleGesture): For now, the only frames that handle page scale
302         gestures themselves are plugins that purport to handle page scale changes themselves (i.e. only PDFPlugin).
303         * WebProcess/WebPage/WebFrame.h:
304         (WebFrame):
305
306 2012-11-14  Tim Horton  <timothy_horton@apple.com>
307
308         PDFPlugin should support downloading PDFs
309         https://bugs.webkit.org/show_bug.cgi?id=102152
310         <rdar://problem/12555313>
311
312         Reviewed by Alexey Proskuryakov.
313
314         Clicking on the "Download PDF" HUD button should download the current
315         PDF to the Downloads folder.
316
317         * UIProcess/WebPageProxy.cpp:
318         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder): Added. Save the
319         PDF data to disk, in the Downloads folder. This will only save files with
320         the .pdf extension, and of MIME type "application/pdf".
321         * UIProcess/WebPageProxy.h:
322         (WebPageProxy): Add savePDFToFileInDownloadsFolder.
323         * UIProcess/WebPageProxy.messages.in: Add savePDFToFileInDownloadsFolder.
324         * WebProcess/Plugins/PDF/PDFPlugin.h:
325         (PDFPlugin): Add saveToPDF().
326         * WebProcess/Plugins/PDF/PDFPlugin.mm:
327         (-[WKPDFLayerControllerDelegate saveToPDF]): Forward saveToPDF delegate callback to PDFPlugin.
328         (WebKit::PDFPlugin::saveToPDF): Hand WebPageProxy the raw data for the
329         current PDF, which it will save to the Downloads folder. We receive
330         the suggested filename during loading.
331         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
332         (WebKit::SimplePDFPlugin::suggestedFilename): Expose a getter for suggestedFilename.
333         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
334         (WebKit::SimplePDFPlugin::pluginInfo): Add a missing space after an operator.
335
336 2012-11-14  Brady Eidson  <beidson@apple.com>
337
338         Part of "Move loading responsibility out of WebResourceLoadScheduler into a new WebResourceLoader"
339         https://bugs.webkit.org/show_bug.cgi?id=102259
340
341         Reviewed by Alexey Proskuryakov.
342
343         WebResourceLoadScheduler has taken on too many responsibilities that shouldn't belong to it.
344
345         We should create a WebResourceLoader that will eventually act as an intermediary between
346         WebCore::ResourceLoader and NetworkResourceLoader.
347
348         This patch is prep-work: It adds a new skeleton class to the WebProcess.
349
350         * WebKit2.xcodeproj/project.pbxproj:
351
352         Add the new WebResourceLoader class which is a very thin skeleton for now:
353         * WebProcess/Network/WebResourceLoader.cpp: Added.
354         (WebKit::WebResourceLoader::create):
355         (WebKit::WebResourceLoader::WebResourceLoader):
356         (WebKit::WebResourceLoader::~WebResourceLoader):
357         * WebProcess/Network/WebResourceLoader.h: Added.
358         (WebKit::WebResourceLoader::coreLoader):
359
360         Adapt WebResourceLoadScheduler to use this new class where appropriate:
361         * WebProcess/Network/WebResourceLoadScheduler.cpp:
362         (WebKit::WebResourceLoadScheduler::scheduleLoad):
363         (WebKit::WebResourceLoadScheduler::addMainResourceLoad):
364         (WebKit::WebResourceLoadScheduler::remove):
365         (WebKit::WebResourceLoadScheduler::willSendRequest):
366         (WebKit::WebResourceLoadScheduler::didReceiveResponse):
367         (WebKit::WebResourceLoadScheduler::didReceiveData):
368         (WebKit::WebResourceLoadScheduler::didFinishResourceLoad):
369         (WebKit::WebResourceLoadScheduler::didReceiveResource):
370         (WebKit::WebResourceLoadScheduler::didFailResourceLoad):
371         * WebProcess/Network/WebResourceLoadScheduler.h:
372
373
374 2012-11-14  Brady Eidson  <beidson@apple.com>
375
376         Deliver data from NetworkProcess to resources progressively.
377         https://bugs.webkit.org/show_bug.cgi?id=102171
378
379         Reviewed by Alexey Proskuryakov.
380
381         Instead of buffering up the data for an entire resource and delivering it in one chunk, we need
382         to deliver data progressively.
383
384         This allows progressive parsing of textual resources and progressive rendering of images,
385         as well as allows endless multipart resources (e.g., multipart jpegs) to work at all.
386
387         * NetworkProcess/NetworkResourceLoader.cpp:
388         (WebKit::NetworkResourceLoader::didReceiveData): Don't buffer data locally (for now) but rather
389           pass it straight through to the WebProcess.
390         (WebKit::NetworkResourceLoader::didFinishLoading): Only notify didFinishLoading instead of
391           delivering a chunk of buffered data.
392         (WebKit::NetworkResourceLoader::didFail):
393         * NetworkProcess/NetworkResourceLoader.h:
394
395         * WebProcess/Network/NetworkProcessConnection.cpp:
396         (WebKit::NetworkProcessConnection::didReceiveData): Pass through towards ResourceLoader.
397         (WebKit::NetworkProcessConnection::didFinishResourceLoad):
398         (WebKit::NetworkProcessConnection::didFailResourceLoad):
399         * WebProcess/Network/NetworkProcessConnection.h:
400         * WebProcess/Network/NetworkProcessConnection.messages.in:
401
402         * WebProcess/Network/WebResourceLoadScheduler.cpp:
403         (WebKit::WebResourceLoadScheduler::didReceiveData): Hand this chunk of data to the ResourceLoader directly.
404         (WebKit::WebResourceLoadScheduler::didFinishResourceLoad):
405         * WebProcess/Network/WebResourceLoadScheduler.h:
406
407 2012-11-14  Anton Obzhirov  <a.obzhirov@samsung.com>
408
409         Add platform implementation of remote web inspector server for GTK port.
410         https://bugs.webkit.org/show_bug.cgi?id=88094 
411
412         Reviewed by Gustavo Noronha Silva.
413
414         The platform implementation is based on GSocket API (WebInspectorServerGtk.cpp and WebSocketServerGtk.cpp).
415         The server listens on port 2999 by default. IP address of the server can be set
416         in WEBKIT_INSPECTOR_SERVER (for example export WEBKIT_INSPECTOR_SERVER="192.168.124.130:2999").
417         The server is started during WebKit context initialization.
418         Once a page is loaded insector server can be accessed via other WebKit based browser.
419         New WebKit API gtk tests have beed added.
420         inspectorPageIndex.html has been moved to new location to share the file between GTK and Qt ports.
421
422         Test: test-page-list, test-remote-debugging-message, test-open-debugging-session
423
424         * GNUmakefile.am:
425         * GNUmakefile.list.am:
426         * Platform/Logging.cpp:
427         (WebKit):
428         (WebKit::getChannelFromName):
429         (WebKit::initializeLogChannelsIfNecessary):
430         * Platform/Logging.h:
431         (WebKit):
432         * UIProcess/API/gtk/tests/GNUmakefile.am:
433         * UIProcess/API/gtk/tests/InspectorTestServer.cpp: Added.
434         (loadChangedCallback):
435         (main):
436         * UIProcess/API/gtk/tests/TestInspectorServer.cpp: Added.
437         (stopTestServer):
438         (sigAbortHandler):
439         (testServerMonitorThreadFunc):
440         (startTestServerMonitor):
441         (startTestServer):
442         (testInspectorServerPageList):
443         (testRemoteDebuggingMessage):
444         (openRemoteDebuggingSession):
445         (beforeAll):
446         (afterAll):
447         * UIProcess/InspectorServer/WebInspectorServer.h:
448         (WebInspectorServer):
449         * UIProcess/InspectorServer/WebSocketServer.h:
450         (WebSocketServer):
451         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
452         (WebKit::WebSocketServerConnection::WebSocketServerConnection):
453         (WebKit::WebSocketServerConnection::shutdownNow):
454         (WebKit::WebSocketServerConnection::shutdownAfterSendOrNow):
455         (WebKit::WebSocketServerConnection::didCloseSocketStream):
456         (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
457         (WebKit):
458         (WebKit::WebSocketServerConnection::didUpdateBufferedAmount):
459         * UIProcess/InspectorServer/WebSocketServerConnection.h:
460         (WebSocketServerConnection):
461         * UIProcess/InspectorServer/front-end: Added.
462         * UIProcess/InspectorServer/front-end/inspectorPageIndex.html: Added.
463         * UIProcess/InspectorServer/gtk: Added.
464         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: Added.
465         (WebKit):
466         (WebKit::WebInspectorServer::platformResourceForPath):
467         (WebKit::WebInspectorServer::buildPageList):
468         * UIProcess/InspectorServer/gtk/WebSocketServerGtk.cpp: Added.
469         (WebKit):
470         (WebKit::connectionCallback):
471         (WebKit::WebSocketServer::platformInitialize):
472         (WebKit::WebSocketServer::platformListen):
473         (WebKit::WebSocketServer::platformClose):
474         * UIProcess/gtk/WebContextGtk.cpp:
475         (WebKit::initInspectorServer):
476         (WebKit):
477         (WebKit::WebContext::platformInitializeWebProcess):
478         * WebKit2.qrc:
479         * config.h:
480         * qt/Resources/inspectorPageIndex.html: Removed.
481
482 2012-11-14  Christophe Dumez  <christophe.dumez@intel.com>
483
484         [EFL][WK2][AC] Print out warning if we fallback back to software mode
485         https://bugs.webkit.org/show_bug.cgi?id=102188
486
487         Reviewed by Kenneth Rohde Christiansen.
488
489         Print out a warning if accelerated compositing is enabled but the
490         implementation is falling back to software mode for some reason.
491
492         * UIProcess/API/efl/EwkViewImpl.cpp:
493         (EwkViewImpl::createGLSurface):
494
495 2012-11-14  Sheriff Bot  <webkit.review.bot@gmail.com>
496
497         Unreviewed, rolling out r134531.
498         http://trac.webkit.org/changeset/134531
499         https://bugs.webkit.org/show_bug.cgi?id=102193
500
501         Makes >70 tests crash on EFL and Qt bots. (Requested by drott
502         on #webkit).
503
504         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
505         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
506         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
507         (WebCore::CoordinatedGraphicsLayer::setChildren):
508         (WebCore::CoordinatedGraphicsLayer::addChild):
509         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
510         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
511         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
512         (WebCore::CoordinatedGraphicsLayer::replaceChild):
513         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
514         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
515         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
516         (WebCore::CoordinatedGraphicsLayer::syncChildren):
517         (WebCore::CoordinatedGraphicsLayer::syncFilters):
518         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
519         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
520         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
521         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
522         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
523         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed):
524         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
525         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
526         (WebCore::CoordinatedGraphicsLayer::createTile):
527         (WebCore::CoordinatedGraphicsLayer::updateTile):
528         (WebCore::CoordinatedGraphicsLayer::removeTile):
529         (WebCore::CoordinatedGraphicsLayer::setCoordinatedGraphicsLayerClient):
530         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
531         (CoordinatedGraphicsLayer):
532         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
533         (WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
534         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
535         (WebKit::LayerTreeCoordinator::createGraphicsLayer):
536
537 2012-11-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
538
539         [EFL][WK2] Add a button parameter to mouseClick, mouseDown, mouseUp functions
540         https://bugs.webkit.org/show_bug.cgi?id=102065
541
542         Reviewed by Laszlo Gombos.
543
544         mouseClick(), mouseDown() and mouseUp() test functions are only able to test a left button of mouse now.
545         However, EFL API test framwork needs to test various mouse buttons. For example, context menu test needs
546         to simulate a right mouse button. So, button type parameter needs to be added for it.
547
548         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
549         (EWK2UnitTest::EWK2UnitTestBase::mouseClick):
550         (EWK2UnitTest::EWK2UnitTestBase::mouseDown):
551         (EWK2UnitTest::EWK2UnitTestBase::mouseUp):
552         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
553         (EWK2UnitTestBase):
554
555 2012-11-13  Yael Aharon  <yael.aharon@intel.com>
556
557         [EFL][WK2] New window size should consult the window attributes
558         https://bugs.webkit.org/show_bug.cgi?id=102122
559
560         Reviewed by Kenneth Rohde Christiansen.
561
562         Pass the size that was specified in window.open to the embedder.
563
564         * UIProcess/API/efl/EwkViewImpl.cpp:
565         (EwkViewImpl::createNewPage):
566         * UIProcess/API/efl/EwkViewImpl.h:
567         (EwkViewImpl):
568         * UIProcess/API/efl/ewk_view.h:
569         * UIProcess/efl/PageUIClientEfl.cpp:
570         (WebKit::PageUIClientEfl::createNewPage):
571
572 2012-11-13  No'am Rosenthal  <noam.rosenthal@nokia.com>
573
574         Coordinated Graphics: Rename m_CoordinatedGraphicsLayerClient to m_coordinator
575         https://bugs.webkit.org/show_bug.cgi?id=102133
576
577         Renamed m_CoordinatedGraphicsLayerClient to m_coordinator.
578         Also, there is no need for calling setCoordinator every time the tree changes,
579         since we can call it once when the layer is created, now that LayerTreeCoordinator
580         is the GraphicsLayerFactory.
581
582         Reviewed by Kenneth Rohde Christiansen.
583
584         No change in functionality.
585
586         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
587         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
588         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
589         (WebCore::CoordinatedGraphicsLayer::setChildren):
590         (WebCore::CoordinatedGraphicsLayer::addChild):
591         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
592         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
593         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
594         (WebCore::CoordinatedGraphicsLayer::replaceChild):
595         (WebCore::CoordinatedGraphicsLayer::setContentsToImage):
596         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
597         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
598         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
599         (WebCore::CoordinatedGraphicsLayer::syncChildren):
600         (WebCore::CoordinatedGraphicsLayer::syncFilters):
601         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
602         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
603         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
604         (WebCore::CoordinatedGraphicsLayer::ensureImageBackingStore):
605         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed):
606         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
607         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
608         (WebCore::CoordinatedGraphicsLayer::createTile):
609         (WebCore::CoordinatedGraphicsLayer::updateTile):
610         (WebCore::CoordinatedGraphicsLayer::removeTile):
611         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
612         (WebCore::CoordinatedGraphicsLayer::setCoordinator):
613         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
614         (CoordinatedGraphicsLayer):
615         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
616         (WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
617         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
618         (WebKit::LayerTreeCoordinator::paintContents):
619
620 2012-11-13  Brady Eidson  <beidson@apple.com>
621
622         REGRESSION(r134328) - ASSERT(isMainThread()) when subresources redirect in the NetworkProcessPass through
623         https://bugs.webkit.org/show_bug.cgi?id=102167
624
625         Reviewed by Simon Fraser.
626
627         willSendRequest comes in on a background thread but we need to do HostRecord accounting on the main thread.
628
629         So we'll just dispatch the receivedRedirect call to the main thread RunLoop.
630
631         * NetworkProcess/NetworkResourceLoader.cpp:
632         (WebKit::NetworkResourceLoader::willSendRequest):
633
634 2012-11-13  Timothy Hatcher  <timothy@apple.com>
635
636         Make InspectorFrontendHost.moveWindowBy work in WebKit2 for Mac.
637
638         https://bugs.webkit.org/show_bug.cgi?id=102154
639
640         Reviewed by Joseph Pecoraro.
641
642         * UIProcess/WebInspectorProxy.h:
643         * UIProcess/mac/WebInspectorProxyMac.mm:
644         (WebKit::getWindowFrame): Added. Call setInspectorWindowFrame.
645         (WebKit::setWindowFrame): Added. Call inspectorWindowFrame.
646         (WebKit::WebInspectorProxy::setInspectorWindowFrame): Added.
647         (WebKit::WebInspectorProxy::inspectorWindowFrame): Added.
648         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create and set the WKPageUIClient
649         with getWindowFrame and setWindowFrame.
650
651 2012-11-13  Jon Lee  <jonlee@apple.com>
652
653         Reduce snapshot waiting time
654         https://bugs.webkit.org/show_bug.cgi?id=102147
655         <rdar://problem/12695539>
656
657         Reviewed by Brian Weinstein.
658
659         * WebProcess/Plugins/PluginView.cpp: Reduce to 1 second. Improves impressions of responsiveness.
660
661 2012-11-13  Anders Carlsson  <andersca@apple.com>
662
663         Factor the code to enter accelerated compositing given a layer out into a separate method
664         https://bugs.webkit.org/show_bug.cgi?id=102155
665
666         Reviewed by Andreas Kling.
667
668         * UIProcess/API/mac/WKView.mm:
669         (-[WKView _enterAcceleratedCompositingMode:]):
670         (-[WKView _enterAcceleratedCompositingModeWithRootLayer:]):
671         * UIProcess/API/mac/WKViewInternal.h:
672
673 2012-11-13  Anders Carlsson  <andersca@apple.com>
674
675         RemoteGraphicsLayer destructor should call GraphicsLayer::willBeDestroyed
676         https://bugs.webkit.org/show_bug.cgi?id=102135
677
678         Reviewed by Andreas Kling.
679
680         Call GraphicsLayer::willBeDestroyed from the RemoteGraphicsLayer destructor and move
681         the call to RemoteLayerTreeContext::layerWillBeDestroyed to the overridden
682         willBeDestroyed member function.
683
684         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
685         (RemoteGraphicsLayer):
686         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
687         (WebKit::RemoteGraphicsLayer::~RemoteGraphicsLayer):
688         (WebKit::RemoteGraphicsLayer::willBeDestroyed):
689         (WebKit):
690
691 2012-11-13  Brady Eidson  <beidson@apple.com>
692
693         Split NetworkRequest up into a request class and a loading class.
694         https://bugs.webkit.org/show_bug.cgi?id=102049
695
696         Reviewed by Alexey Proskuryakov.
697
698         NetworkRequest unintentionally grew into a class that managed actual loading.
699
700         This patch splits it into "NetworkResourceLoadParameters" for all request-related data
701         and "NetworkResourceLoader" for handling the actual load itself.
702
703         Change HostRecord to manage NetworkResourceLoaders instead of NetworkRequests:
704         * NetworkProcess/HostRecord.cpp:
705         (WebKit::HostRecord::~HostRecord):
706         (WebKit::HostRecord::schedule):
707         (WebKit::HostRecord::addLoadInProgress):
708         (WebKit::HostRecord::remove):
709         (WebKit::HostRecord::hasRequests):
710         (WebKit::HostRecord::limitRequests):
711         * NetworkProcess/HostRecord.h:
712         (WebKit::HostRecord::loadersPending):
713
714         A new class to be a container for all the data required to start a network load:
715         * Shared/Network/NetworkResourceLoadParameters.cpp:
716         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
717         (WebKit::NetworkResourceLoadParameters::encode):
718         (WebKit::NetworkResourceLoadParameters::decode):
719         * Shared/Network/NetworkResourceLoadParameters.h:
720         (WebKit::NetworkResourceLoadParameters::request):
721         (WebKit::NetworkResourceLoadParameters::priority):
722         (WebKit::NetworkResourceLoadParameters::contentSniffingPolicy):
723
724         Pass a single NetworkResourceLoadParameters around instead of multiple bits of data:
725         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
726         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
727         * NetworkProcess/NetworkConnectionToWebProcess.h:
728         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
729         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
730         (WebKit::NetworkResourceLoadScheduler::scheduleResourceLoad):
731         (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost):
732         * NetworkProcess/NetworkResourceLoadScheduler.h:
733
734         The actual ResourceHandleClient that does the actual loading:
735         * NetworkProcess/NetworkResourceLoader.cpp: Renamed from Source/WebKit2/NetworkProcess/NetworkRequest.cpp.
736         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
737         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
738         (WebKit::NetworkResourceLoader::priority):
739         (WebKit::NetworkResourceLoader::start):
740         (WebKit::requestsToStopMutex):
741         (WebKit::requestsToStop):
742         (WebKit::NetworkResourceLoader::scheduleStopOnMainThread):
743         (WebKit::NetworkResourceLoader::performStops):
744         (WebKit::NetworkResourceLoader::stop):
745         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
746         (WebKit::NetworkResourceLoader::didReceiveResponse):
747         (WebKit::NetworkResourceLoader::didReceiveData):
748         (WebKit::NetworkResourceLoader::didFinishLoading):
749         (WebKit::NetworkResourceLoader::didFail):
750         (WebKit::responseMap):
751         (WebKit::generateWillSendRequestID):
752         (WebKit::didReceiveWillSendRequestHandled):
753         (WebKit::NetworkResourceLoader::willSendRequest):
754         (WebKit::NetworkResourceLoader::didSendData):
755         (WebKit::NetworkResourceLoader::didReceiveCachedMetadata):
756         (WebKit::NetworkResourceLoader::wasBlocked):
757         (WebKit::NetworkResourceLoader::cannotShowURL):
758         (WebKit::NetworkResourceLoader::willCacheResponse):
759         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
760         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
761         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge):
762         (WebKit::NetworkResourceLoader::receivedCancellation):
763         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
764         (WebKit::NetworkResourceLoader::supportsDataArray):
765         (WebKit::NetworkResourceLoader::didReceiveDataArray):
766         (WebKit::NetworkResourceLoader::willStopBufferingData):
767         (WebKit::NetworkResourceLoader::createAsyncFileStream):
768         * NetworkProcess/NetworkResourceLoader.h:
769         (WebKit::NetworkResourceLoader::create):
770         (WebKit::NetworkResourceLoader::identifier):
771         (WebKit::NetworkResourceLoader::connectionToWebProcess):
772
773         * WebKit2.xcodeproj/project.pbxproj:
774
775         * WebProcess/Network/WebResourceLoadScheduler.cpp:
776         (WebKit::WebResourceLoadScheduler::scheduleLoad):
777
778 2012-11-13  Anders Carlsson  <andersca@apple.com>
779
780         Store destroyed layers in the remote layer tree transaction
781         https://bugs.webkit.org/show_bug.cgi?id=102127
782
783         Reviewed by Andreas Kling.
784
785         * Shared/mac/RemoteLayerTreeTransaction.h:
786         (RemoteLayerTreeTransaction):
787         * Shared/mac/RemoteLayerTreeTransaction.mm:
788         (WebKit::RemoteLayerTreeTransaction::encode):
789         (WebKit::RemoteLayerTreeTransaction::decode):
790         (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
791         (WebKit):
792         (WebKit::RemoteLayerTreeTransaction::dump):
793         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
794         (RemoteGraphicsLayer):
795         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
796         (WebKit::RemoteGraphicsLayer::~RemoteGraphicsLayer):
797         (WebKit::RemoteGraphicsLayer::removeFromParent):
798         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
799         (RemoteLayerTreeContext):
800         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
801         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
802         (WebKit::RemoteLayerTreeContext::flushLayers):
803
804 2012-11-13  Timothy Hatcher  <timothy@apple.com>
805
806         Adjust the Web Inspector window title frame if needed to prevent it from intersecting the dock button.
807
808         https://bugs.webkit.org/show_bug.cgi?id=102073
809
810         Reviewed by Joseph Pecoraro.
811
812         * UIProcess/mac/WebInspectorProxyMac.mm:
813         (-[WKWebInspectorWindow _customTitleFrame]): Added. Adjust the title frame.
814
815 2012-11-13  Anders Carlsson  <andersca@apple.com>
816
817         Store layer positions and sizes in the transaction
818         https://bugs.webkit.org/show_bug.cgi?id=102115
819
820         Reviewed by Andreas Kling.
821
822         * Shared/mac/RemoteLayerTreeTransaction.h:
823         (LayerProperties):
824         * Shared/mac/RemoteLayerTreeTransaction.mm:
825         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
826         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
827         (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
828         (WebKit::dumpChangedLayers):
829         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
830         (RemoteGraphicsLayer):
831         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
832         (WebKit::RemoteGraphicsLayer::setPosition):
833         (WebKit::RemoteGraphicsLayer::setSize):
834
835 2012-11-13  Anders Carlsson  <andersca@apple.com>
836
837         The layer tree transaction should include the root layer
838         https://bugs.webkit.org/show_bug.cgi?id=102109
839
840         Reviewed by Andreas Kling.
841
842         Keep the root layer ID in the layer tree transaction and encode/decode and dump it.
843
844         * Shared/mac/RemoteLayerTreeTransaction.h:
845         (RemoteLayerTreeTransaction):
846         * Shared/mac/RemoteLayerTreeTransaction.mm:
847         (WebKit::RemoteLayerTreeTransaction::encode):
848         (WebKit::RemoteLayerTreeTransaction::decode):
849         (WebKit::RemoteLayerTreeTransaction::setRootLayerID):
850         (WebKit):
851         (WebKit::RemoteLayerTreeTransaction::dump):
852         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
853         (RemoteLayerTreeContext):
854         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
855         (WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
856         (WebKit::RemoteLayerTreeContext::setRootLayer):
857         (WebKit::RemoteLayerTreeContext::flushLayers):
858
859 2012-11-13  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
860
861         [WK2] TiledBackingStore: WebChromeClient::pageRect() should consider viewport size
862         https://bugs.webkit.org/show_bug.cgi?id=101946
863
864         Reviewed by Noam Rosenthal.
865
866         WebChromeClient::pageRect() should consider viewport size when TILED_BACKING_STORE enabled.
867
868         Based on patch by Kenneth Rohde Christiansen.
869
870         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
871         (WebKit::WebChromeClient::pageRect):
872
873 2012-11-13  Huang Dongsung  <luxtella@company100.net>
874
875         Coordinated Graphics: Directly composited animated GIFs only render the first image.
876         https://bugs.webkit.org/show_bug.cgi?id=102043
877
878         Reviewed by Noam Rosenthal.
879
880         CoordinatedGraphicsLayer::setContentsToImage() checks the pointer to the image,
881         not nativeImagePtr, so Coordinated Graphics currently draws only the first frame
882         of gif animations. This patch makes Coordinated Graphics draw gif animations.
883
884         In addition, this patch modifies the style of direct image compositing
885         code to match other parts of CoordinatedGraphicsLayer.
886
887         Test: ManualTests/animated-gif-on-compositing-layer.html
888
889         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
890         (WebCore::CoordinatedGraphicsLayer::didChangeImageBacking):
891         (WebCore):
892         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
893         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
894         (WebCore::CoordinatedGraphicsLayer::setContentsToImage):
895         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
896         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
897         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
898         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
899         (WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):
900         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
901         (CoordinatedGraphicsLayer):
902
903 2012-11-12  Huang Dongsung  <luxtella@company100.net>
904
905         [Qt] REGRESSION(134142): overscaled tiles in pixel test results and MiniBrowser
906         https://bugs.webkit.org/show_bug.cgi?id=101918
907
908         Reviewed by Noam Rosenthal.
909
910         Currently, CoordinatedBackingStore can keep out-dated contents size, because the
911         size of CoordinatedBackingStore is set by only LayerTreeRenderer::createTile().
912         Although the size of GraphicsLayer is changed, LayerTreeRenderer::createTile()
913         is not called. However, LayerTreeRenderer::createTile() is always called, when
914         the contents scale of GraphicsLayer is changed.
915
916         This patch makes sure that we reset the backing store's size to the
917         layer size when UpdateTile or RemoveTile are called.
918
919         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
920         (WebKit::CoordinatedBackingStore::setSize):
921         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
922         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
923         (CoordinatedBackingStore):
924         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
925         (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
926         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
927         (LayerTreeCoordinatorProxy):
928         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
929         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
930         (WebKit::LayerTreeRenderer::getBackingStore):
931         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
932         (WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize):
933         (WebKit):
934         (WebKit::LayerTreeRenderer::createTile):
935         (WebKit::LayerTreeRenderer::removeTile):
936         (WebKit::LayerTreeRenderer::updateTile):
937         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
938         (LayerTreeRenderer):
939         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
940         (WebCore::CoordinatedGraphicsLayer::createTile):
941         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
942         (CoordinatedGraphicsLayerClient):
943         (CoordinatedGraphicsLayer):
944         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
945         (WebKit::CoordinatedTile::updateBackBuffer):
946         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
947         (CoordinatedTileClient):
948         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
949         (WebKit::LayerTreeCoordinator::createTile):
950         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
951         (LayerTreeCoordinator):
952
953 2012-11-12  Sam Weinig  <sam@webkit.org>
954
955         <rdar://problem/12445176>
956         WebProcess needs permission to open AppleUpstreamUserClient
957
958         Rubber-stamped by Dan Bernstein.
959
960         * WebProcess/com.apple.WebProcess.sb.in:
961
962 2012-11-12  Simon Fraser  <simon.fraser@apple.com>
963
964         Build fix after r134346 and 134347.
965         
966         Use frameView.isFlipped, not frameView.flipped in the assertion.
967
968         * UIProcess/mac/WebInspectorProxyMac.mm:
969         (WebKit::WebInspectorProxy::createInspectorWindow):
970
971 2012-11-12  Timothy Hatcher  <timothy@apple.com>
972
973         Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).
974
975         https://bugs.webkit.org/show_bug.cgi?id=102023
976
977         Reviewed by Anders Carlsson.
978
979         * Resources/Dock.pdf: Added.
980         * UIProcess/WebInspectorProxy.cpp:
981         (WebKit::WebInspectorProxy::attach): Set the SetAttachedWindow message.
982         (WebKit::WebInspectorProxy::detach): Ditto.
983         (WebKit::WebInspectorProxy::attachAvailabilityChanged): Added. Call platformAttachAvailabilityChanged.
984         * UIProcess/WebInspectorProxy.h:
985         * UIProcess/WebInspectorProxy.messages.in: Added AttachAvailabilityChanged message.
986         * UIProcess/mac/WebInspectorProxyMac.mm:
987         (-[WKWebInspectorProxyObjCAdapter attach:]): Added. Call WebInspectorProxy::attach.
988         (-[WKWebInspectorWindow _cursorForResizeDirection:]): Added.
989         (WebKit::WebInspectorProxy::createInspectorWindow): Create the dock button and add it.
990         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Added. Update hidden state of the dock button.
991         * WebKit2.xcodeproj/project.pbxproj: Added Dock.pdf.
992         * WebProcess/WebPage/WebInspector.cpp:
993         (WebKit::WebInspector::setAttachedWindow): Added. Call through to the frontend client.
994         (WebKit::WebInspector::updateDockingAvailability): Send AttachAvailabilityChanged message.
995         * WebProcess/WebPage/WebInspector.h:
996         * WebProcess/WebPage/WebInspector.messages.in: Added SetAttachedWindow message.
997
998         * UIProcess/efl/WebInspectorProxyEfl.cpp:
999         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Added stub.
1000         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1001         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.
1002         * UIProcess/qt/WebInspectorProxyQt.cpp:
1003         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.
1004         * UIProcess/win/WebInspectorProxyWin.cpp:
1005         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.
1006
1007 2012-11-12  Anders Carlsson  <andersca@apple.com>
1008
1009         Include child layers in the remote layer tree transaction
1010         https://bugs.webkit.org/show_bug.cgi?id=102026
1011
1012         Reviewed by Andreas Kling.
1013
1014         * Shared/mac/RemoteLayerTreeTransaction.h:
1015         * Shared/mac/RemoteLayerTreeTransaction.mm:
1016         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1017         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1018         Encode and decode child layer IDs.
1019
1020         (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
1021         Grab all child layer IDs and stick them in a vector.
1022
1023         (WebKit::dumpChangedLayers):
1024         Dump child layer IDs as well.
1025
1026         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
1027         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1028         (WebKit::RemoteGraphicsLayer::setChildren):
1029         (WebKit::RemoteGraphicsLayer::addChild):
1030         (WebKit::RemoteGraphicsLayer::addChildAtIndex):
1031         (WebKit::RemoteGraphicsLayer::addChildAbove):
1032         (WebKit::RemoteGraphicsLayer::addChildBelow):
1033         (WebKit::RemoteGraphicsLayer::replaceChild):
1034         Call noteSublayersChanged.
1035
1036         (WebKit::RemoteGraphicsLayer::noteSublayersChanged):
1037         Note that the Children property changed.
1038
1039 2012-11-12  Anders Carlsson  <andersca@apple.com>
1040
1041         Send along the current remote layer tree transaction with the commit message
1042         https://bugs.webkit.org/show_bug.cgi?id=102014
1043
1044         Reviewed by Tim Horton.
1045
1046         Add encode and decode member functions to RemoteLayerTreeTransaction and RemoteLayerTreeTransaction::LayerProperties.
1047
1048         * Shared/mac/RemoteLayerTreeTransaction.h:
1049         * Shared/mac/RemoteLayerTreeTransaction.mm:
1050         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1051         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1052         (WebKit::RemoteLayerTreeTransaction::encode):
1053         (WebKit::RemoteLayerTreeTransaction::decode):
1054         * UIProcess/mac/RemoteLayerTreeHost.h:
1055         * UIProcess/mac/RemoteLayerTreeHost.messages.in:
1056         * UIProcess/mac/RemoteLayerTreeHost.mm:
1057         (WebKit::RemoteLayerTreeHost::commit):
1058         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1059         (WebKit::RemoteLayerTreeContext::flushLayers):
1060
1061 2012-11-12  Brady Eidson  <beidson@apple.com>
1062
1063         Get rid of the CrossOriginRedirectReceived message to the NetworkProcess.
1064         https://bugs.webkit.org/show_bug.cgi?id=102010
1065
1066         Reviewed by Alexey Proskuryakov.
1067
1068         This message was a stop-gap measure for when the NetworkProcess did scheduling but not loading.
1069         Now that the NetworkProcess does loading it doesn't need to be told when redirect is received.
1070
1071         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1072         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Get rid of the message to the NetworkProcess.
1073
1074         * NetworkProcess/NetworkRequest.cpp:
1075         (WebKit::NetworkRequest::willSendRequest): After willSendRequest is dispatched to the WebProcess, directly call
1076           "receivedRedirect" on the NetworkResourceLoadScheduler.
1077
1078         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1079         (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Renamed from crossOriginRedirectReceived, as the
1080           function already checks to see if the redirect was actually cross-origin.
1081         * NetworkProcess/NetworkResourceLoadScheduler.h:
1082
1083         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1084         (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): A no-op so the WebProcess doesn't
1085           do any host record accounting of its own.
1086
1087 2012-11-12  Tim Horton  <timothy_horton@apple.com>
1088
1089         PDFPlugin should use PDFKit's context menu instead of the default WebKit one
1090         https://bugs.webkit.org/show_bug.cgi?id=101896
1091         <rdar://problem/12555173>
1092
1093         Reviewed by Anders Carlsson.
1094
1095         Show the context menu that PDFKit vends us instead of the default WebKit one
1096         when PDFPlugin is told to show a context menu.
1097
1098         Also, react to the didChangeContentScaleFactor callback, so that when the context
1099         menu (or HUD) is used to change the scale factor, we can inform PluginView.
1100
1101         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
1102         Add pdfLayerController:didChangeContentScaleFactor: delegate callback.
1103         Rename tileScaleFactor to contentScaleFactor.
1104         Add rightMouseDown: and menuForEvent: on PDFLayerController.
1105         * WebProcess/Plugins/PDF/PDFPlugin.h:
1106         (PDFPlugin):
1107         Add notifyContentScaleFactorChanged, handleContextMenuEvent, and nsEventForWebMouseEvent.
1108         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1109         (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeContentScaleFactor:]): Forward content scale factor changes to PDFPlugin.
1110         (WebKit::PDFPlugin::pdfDocumentDidLoad): Rename tileScaleFactor to contentScaleFactor.
1111         (WebKit::PDFPlugin::geometryDidChange): Rename tileScaleFactor to contentScaleFactor.
1112         (WebKit::eventTypeFromWebEvent): It turns out we can infer whether the mouse is being dragged during a MouseMove event
1113         by whether it has a mouse button associated with it or not, so we don't need to track this state manually.
1114         (WebKit::PDFPlugin::nsEventForWebMouseEvent): Factor the part of handleMouseEvent that creates NSEvents* out into its own function.
1115         (WebKit::PDFPlugin::handleMouseEvent):
1116         Don't track mouseButtonIsDown manually, make use of the new nsEventForWebMouseEvent.
1117         Hand rightMouseDown: to PDFLayerController instead of mouseDown: if necessary.
1118         (WebKit::PDFPlugin::handleContextMenuEvent): Grab the relevant NSMenu from PDFKit and display it.
1119         (WebKit::PDFPlugin::handleKeyboardEvent): Don't pass a bogus mouseButtonIsDown to eventTypeFromWebEvent.
1120         (WebKit::PDFPlugin::notifyContentScaleFactorChanged): Update PluginView and co.'s notion of page scale when
1121         PDFKit changes it (generally from the context menu/HUD). Also update page size and scrollbar size/position.
1122         (WebKit::PDFPlugin::setScrollOffset): Don't call SimplePDFPlugin's implementation, as PDFKit handles invalidation itself.
1123         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1124         (WebKit::PDFPluginChoiceAnnotation::updateGeometry): Rename tileScaleFactor to contentScaleFactor.
1125         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1126         (WebKit::PDFPluginTextAnnotation::updateGeometry): Rename tileScaleFactor to contentScaleFactor.
1127         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Make m_scrollOffset protected.
1128
1129 2012-11-12  Anders Carlsson  <andersca@apple.com>
1130
1131         Add a RemoteLayerTreeHost object in the UI process
1132         https://bugs.webkit.org/show_bug.cgi?id=101999
1133
1134         Reviewed by Tim Horton.
1135
1136         Add a (mostly empty) RemoteLayerTreeHost class that will live in the UI process and host the layer tree.
1137
1138         * DerivedSources.make:
1139         Add RemoteLayerTreeHost.messages.in.
1140
1141         * Platform/CoreIPC/MessageID.h:
1142         Add a RemoteLayerTreeHost message class.
1143
1144         * UIProcess/WebProcessProxy.cpp:
1145         (WebKit::WebProcessProxy::addMessageReceiver):
1146         (WebKit::WebProcessProxy::removeMessageReceiver):
1147         (WebKit::WebProcessProxy::didReceiveMessage):
1148         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1149         * UIProcess/WebProcessProxy.h:
1150         Add a message receiver map to the web process proxy.
1151
1152         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1153         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1154         Add a RemoteLayerTreeHost member variable.
1155
1156         * UIProcess/mac/RemoteLayerTreeHost.h:
1157         Add new class.
1158
1159         * UIProcess/mac/RemoteLayerTreeHost.messages.in:
1160         Add new messages file with a single Commit message.
1161         
1162         * UIProcess/mac/RemoteLayerTreeHost.mm:
1163         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
1164         Add the layer tree host as a message receiver.
1165
1166         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
1167         Remote the layer tree host as a message receiver.
1168
1169         (WebKit::RemoteLayerTreeHost::didReceiveMessage):
1170         Call the generated member function.
1171
1172         (WebKit::RemoteLayerTreeHost::commit):
1173         Add an empty stub for now.
1174
1175         * WebKit2.xcodeproj/project.pbxproj:
1176         Add new files.
1177
1178         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1179         (WebKit::RemoteLayerTreeContext::flushLayers):
1180         Send a commit message to the remote layer tree host.
1181
1182 2012-11-12  Tim Horton  <timothy_horton@apple.com>
1183
1184         PDFPlugin should support non-1 device scale factor
1185         https://bugs.webkit.org/show_bug.cgi?id=101923
1186
1187         Reviewed by Alexey Proskuryakov.
1188
1189         Do the appropriate plumbing to ensure that PDFPlugin handles device scale factor > 1
1190         (it's called contentsScaleFactor in plugins), both for normal drawing and for snapshotting.
1191
1192         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add deviceScaleFactor setter/getter to PDFLayerController.
1193         * WebProcess/Plugins/PDF/PDFPlugin.h:
1194         (PDFPlugin): Override contentsScaleFactorChanged.
1195         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1196         (WebKit::PDFPlugin::pdfDocumentDidLoad): Plumb device scale factor through to PDFLayerController.
1197         (WebKit::PDFPlugin::contentsScaleFactorChanged): Plumb device scale factor through to PDFLayerController
1198         when we're notified that it has changed.
1199         (WebKit::PDFPlugin::snapshot): Create snapshots with the device scale factor applied.
1200
1201 2012-11-12  Anders Carlsson  <andersca@apple.com>
1202
1203         Rename RemoteLayerTreeController to RemoteLayerTreeContext
1204         https://bugs.webkit.org/show_bug.cgi?id=101993
1205
1206         Reviewed by Andreas Kling.
1207
1208         * WebKit2.xcodeproj/project.pbxproj:
1209         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
1210         (RemoteGraphicsLayer):
1211         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1212         (WebKit::RemoteGraphicsLayer::create):
1213         (WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
1214         (WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
1215         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h.
1216         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm.
1217         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1218         (RemoteLayerTreeDrawingArea):
1219         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1220         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1221         (WebKit::RemoteLayerTreeDrawingArea::graphicsLayerFactory):
1222         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
1223         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
1224
1225 2012-11-12  Anders Carlsson  <andersca@apple.com>
1226
1227         Add debug only code to dump the contents of a transaction
1228         https://bugs.webkit.org/show_bug.cgi?id=101991
1229
1230         Reviewed by Andreas Kling.
1231
1232         * Shared/mac/RemoteLayerTreeTransaction.h:
1233         * Shared/mac/RemoteLayerTreeTransaction.mm:
1234         (WebKit::writeIndent):
1235         (WebKit::dumpChangedLayers):
1236         (WebKit::RemoteLayerTreeTransaction::dump):
1237
1238 2012-11-12  Anders Carlsson  <andersca@apple.com>
1239
1240         Store name changes in the layer transaction
1241         https://bugs.webkit.org/show_bug.cgi?id=101981
1242
1243         Reviewed by Andreas Kling.
1244
1245         * Shared/mac/RemoteLayerTreeTransaction.h:
1246         (LayerProperties):
1247         Add new LayerProperties class.
1248
1249         (RemoteLayerTreeTransaction):
1250         * Shared/mac/RemoteLayerTreeTransaction.mm:
1251         (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
1252         Find the changed layer properties for the given layer and apply the changed properties.
1253
1254         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
1255         (WebKit::RemoteGraphicsLayer::layerID):
1256         Add new getter.
1257
1258         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1259         (WebKit::generateLayerID):
1260         (WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
1261         Give each remote graphics layer a unique ID.
1262
1263 2012-11-12  Brady Eidson  <beidson@apple.com>
1264
1265         NetworkProcess: Use an accurate shouldContentSniff value when creating ResourceHandles
1266         https://bugs.webkit.org/show_bug.cgi?id=101872
1267
1268         Reviewed by Alexey Proskuryakov.
1269
1270         The WebProcess now passes "shouldContentSniff" over to the NetworkProcess with the requests so it can be respected.
1271
1272         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1273         (WebKit::NetworkConnectionToWebProcess::scheduleNetworkRequest): Update to pass through "shouldContentSniff"
1274         * NetworkProcess/NetworkConnectionToWebProcess.h:
1275         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1276
1277         * NetworkProcess/NetworkRequest.cpp:
1278         (WebKit::NetworkRequest::NetworkRequest):
1279         (WebKit::NetworkRequest::start):
1280         * NetworkProcess/NetworkRequest.h:
1281         (WebKit::NetworkRequest::create):
1282
1283         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1284         (WebKit::NetworkResourceLoadScheduler::scheduleNetworkRequest): Update to pass through "shouldContentSniff"
1285         * NetworkProcess/NetworkResourceLoadScheduler.h:
1286         * WebProcess/Network/NetworkProcessConnection.h:
1287
1288         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1289         (WebKit::WebResourceLoadScheduler::scheduleLoad): Update to pass through "shouldContentSniff"
1290
1291 2012-11-12  Anders Carlsson  <andersca@apple.com>
1292
1293         More work towards packaging layer changes up into a transaction object
1294         https://bugs.webkit.org/show_bug.cgi?id=101969
1295
1296         Reviewed by Andreas Kling.
1297
1298         * Shared/mac/RemoteLayerTreeTransaction.h:
1299         * Shared/mac/RemoteLayerTreeTransaction.mm:
1300         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
1301         (WebKit::RemoteLayerTreeTransaction::~RemoteLayerTreeTransaction):
1302         (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
1303         Add empty stubs.
1304
1305         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1306         (WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
1307         Call layerPropertiesChanged on the current transaction.
1308
1309         * WebProcess/WebPage/mac/RemoteLayerTreeController.h:
1310         * WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
1311         (WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
1312         Initialize m_currentTransaction till 0.
1313
1314         (WebKit::RemoteLayerTreeController::currentTransaction):
1315         Add getter. This may only be called from beneath flushLayers.
1316
1317         (WebKit::RemoteLayerTreeController::flushLayers):
1318         Create a transaction before flusing the compositing state.
1319
1320 2012-11-12  Anders Carlsson  <andersca@apple.com>
1321
1322         More work on remote layer flushing
1323         https://bugs.webkit.org/show_bug.cgi?id=101960
1324
1325         Reviewed by Andreas Kling.
1326
1327         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
1328         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1329         (WebKit::RemoteGraphicsLayer::flushCompositingState):
1330         Call recursiveCommitChanges.
1331
1332         (WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
1333         Add stub function for now.
1334
1335         (WebKit::RemoteGraphicsLayer::recursiveCommitChanges):
1336         Call flushCompositingStateForThisLayerOnly and then call recursiveCommitChanges recursively on all the child layers.
1337
1338         * WebProcess/WebPage/mac/RemoteLayerTreeController.h:
1339         * WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
1340         (WebKit::RemoteLayerTreeController::create):
1341         (WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
1342         This now takes a web page.
1343
1344         (WebKit::RemoteLayerTreeController::setRootLayer):
1345         Add empty function.
1346
1347         (WebKit::RemoteLayerTreeController::layerFlushTimerFired):
1348         Call flushLayers explicitly.
1349
1350         (WebKit::RemoteLayerTreeController::flushLayers):
1351         Force a layout and then sync all the compositing layers.
1352
1353         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1354         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1355         RemoteLayerTreeController::create now takes a web page.
1356
1357         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
1358         Call the remote layer tree controller.
1359
1360 2012-11-12  Anders Carlsson  <andersca@apple.com>
1361
1362         Layer property changes should schedule a remote layer flush
1363         https://bugs.webkit.org/show_bug.cgi?id=101951
1364
1365         Reviewed by Andreas Kling.
1366
1367         * Shared/mac/RemoteLayerTreeTransaction.h:
1368         * Shared/mac/RemoteLayerTreeTransaction.mm:
1369         New class. For now this just contains the changed layer properties flags but this will be extended
1370         to cover changed layers as well.
1371
1372         * WebKit2.xcodeproj/project.pbxproj:
1373         Add new files.
1374
1375         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
1376         (WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
1377         Initialize m_uncommittedLayerChanges.
1378
1379         (WebKit::RemoteGraphicsLayer::setName):
1380         Set the name and call noteLayerPropertiesChanged.
1381
1382         (WebKit::RemoteGraphicsLayer::noteLayerPropertiesChanged):
1383         Notify that a flush is required (if required).
1384
1385         * WebProcess/WebPage/mac/RemoteLayerTreeController.h:
1386         Add a layer flush timer.
1387
1388         * WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
1389         (WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
1390         Initialize the layer flush timer.
1391
1392         (WebKit::RemoteLayerTreeController::scheduleLayerFlush):
1393         Schedule the layer flush timer if needed.
1394
1395         (WebKit::RemoteLayerTreeController::layerFlushTimerFired):
1396         Empty stub for now.
1397
1398         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1399         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
1400         Call the remote layer tree controller.
1401
1402 2012-11-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1403
1404         [EFL] Add implementations of device - user conversion methods
1405         https://bugs.webkit.org/show_bug.cgi?id=101938
1406
1407         Reviewed by Laszlo Gombos.
1408
1409         Consider the deviceScaleFactor when convertion to/from user
1410         and device units.
1411
1412         This affects DOM API's such as window.moveTo, resizeTo etc.
1413
1414         * UIProcess/efl/PageClientBase.cpp:
1415         * UIProcess/efl/PageClientBase.h:
1416         (PageClientBase):
1417         * UIProcess/efl/PageClientDefaultImpl.cpp:
1418         (WebKit::PageClientDefaultImpl::convertToDeviceSpace):
1419         (WebKit):
1420         (WebKit::PageClientDefaultImpl::convertToUserSpace):
1421         * UIProcess/efl/PageClientDefaultImpl.h:
1422         (PageClientDefaultImpl):
1423         * UIProcess/efl/PageClientLegacyImpl.cpp:
1424         (WebKit::PageClientLegacyImpl::convertToDeviceSpace):
1425         (WebKit):
1426         (WebKit::PageClientLegacyImpl::convertToUserSpace):
1427         * UIProcess/efl/PageClientLegacyImpl.h:
1428         (PageClientLegacyImpl):
1429
1430 2012-11-12  Yael Aharon  <yael.aharon@intel.com>
1431
1432         [EFL][WK2][AC] Black screen when applications use software backend.
1433         https://bugs.webkit.org/show_bug.cgi?id=101659
1434
1435         Reviewed by Kenneth Rohde Christiansen.
1436
1437         If creating openGL context fails, automatically fallback to software rendering.
1438
1439         * UIProcess/API/efl/EwkViewImpl.cpp:
1440         (EwkViewImpl::EwkViewImpl):
1441         (EwkViewImpl::displayTimerFired):
1442         (EwkViewImpl::createGLSurface):
1443         (EwkViewImpl::enterAcceleratedCompositingMode):
1444         * UIProcess/API/efl/EwkViewImpl.h:
1445         (EwkViewImpl::hardwareAccelerationEnabled):
1446         (EwkViewImpl):
1447         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1448         (WebKit::LayerTreeRenderer::LayerTreeRenderer):
1449         (WebKit::LayerTreeRenderer::ensureRootLayer):
1450         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1451         (WebKit::LayerTreeRenderer::setAccelerationMode):
1452         (LayerTreeRenderer):
1453         * UIProcess/efl/PageClientBase.cpp:
1454         (WebKit::PageClientBase::createDrawingAreaProxy):
1455
1456 2012-11-12  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1457
1458         [WK2] Indentation nit on WebPage
1459         https://bugs.webkit.org/show_bug.cgi?id=101928
1460
1461         Reviewed by Kenneth Rohde Christiansen.
1462
1463         * WebProcess/WebPage/WebPage.cpp:
1464         (WebKit::WebPage::setViewportSize):
1465
1466 2012-11-12  Jiyeon Kim  <jiyeon0402.kim@samsung.com>
1467
1468         [EFL][WK2] Add ewk_settings_offline_web_application_cache_enabled set/get APIs
1469         https://bugs.webkit.org/show_bug.cgi?id=101688
1470
1471         Reviewed by Gyuyoung Kim.
1472
1473         Add ewk_settings_offline_web_application_cache_get API to be used for enabling disabling the web application cache.
1474         Add ewk_settings_offline_web_application_cache_set API to be used for getting the web application cache status.
1475         In addition, offline web application cache is enabled by default.
1476
1477         * UIProcess/API/efl/EwkViewImpl.cpp:
1478         (EwkViewImpl::EwkViewImpl):
1479         * UIProcess/API/efl/ewk_settings.cpp:
1480         (ewk_settings_offline_web_application_cache_enabled_set):
1481         (ewk_settings_offline_web_application_cache_enabled_get):
1482         * UIProcess/API/efl/ewk_settings.h:
1483         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
1484         (TEST_F):
1485
1486 2012-11-11  Shinya Kawanaka  <shinyak@chromium.org>
1487
1488         [Shadow] ElementShadow should have RuleFeatureSet for select attribute selectors.
1489         https://bugs.webkit.org/show_bug.cgi?id=101180
1490
1491         Reviewed by Dimitri Glazkov.
1492
1493         * win/WebKit2.def:
1494         * win/WebKit2CFLite.def:
1495
1496 2012-11-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1497
1498         Unreviewed, rolling out r134144.
1499         http://trac.webkit.org/changeset/134144
1500         https://bugs.webkit.org/show_bug.cgi?id=101876
1501
1502         seems to break win 7 chromium browser test (Requested by
1503         hayato on #webkit).
1504
1505         * win/WebKit2.def:
1506         * win/WebKit2CFLite.def:
1507
1508 2012-11-11  Kenichi Ishibashi  <bashi@chromium.org>
1509
1510         WTFString::utf8() should have a mode of conversion to use replacement character
1511         https://bugs.webkit.org/show_bug.cgi?id=101678
1512
1513         Reviewed by Alexey Proskuryakov.
1514
1515         Update the symbol for String::utf8().
1516
1517         * win/WebKit2.def:
1518         * win/WebKit2CFLite.def:
1519
1520 2012-11-10  Zeno Albisser  <zeno@webkit.org>
1521
1522         [Qt][WK2] Use QLibraryInfo to search for executables.
1523         https://bugs.webkit.org/show_bug.cgi?id=101774
1524
1525         Reviewed by Simon Hausmann.
1526
1527         This allows finding the WebProcess or the PluginProcess
1528         in it's installed location. This is necessary when
1529         deploying QtWebKit with an installer.
1530
1531         * Shared/qt/ProcessExecutablePathQt.cpp:
1532         (WebKit::executablePath):
1533
1534 2012-11-09  Huang Dongsung  <luxtella@company100.net>
1535
1536         Coordinated Graphics: Rename tileRect from targetRect.
1537         https://bugs.webkit.org/show_bug.cgi?id=101705
1538
1539         Reviewed by Noam Rosenthal.
1540
1541         Messages::LayerTreeCoordinatorProxy::CreateTileForLayer contains the targetRect
1542         variable. The targetRect stands for the rect of the tile created. This patch
1543         renames tileRect to enhance the clearity.
1544
1545         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1546         (WebKit::CoordinatedBackingStoreTile::swapBuffers):
1547         (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
1548         (WebKit::CoordinatedBackingStore::updateTile):
1549         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
1550         (CoordinatedBackingStoreTile):
1551         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
1552         (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
1553         (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
1554         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
1555         (LayerTreeCoordinatorProxy):
1556         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
1557         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1558         (WebKit::LayerTreeRenderer::updateTile):
1559         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1560         (TileUpdate):
1561         (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate):
1562         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1563         (WebCore::CoordinatedGraphicsLayer::createTile):
1564         (WebCore::CoordinatedGraphicsLayer::updateTile):
1565         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1566         (CoordinatedGraphicsLayerClient):
1567         (CoordinatedGraphicsLayer):
1568         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
1569         (CoordinatedTileClient):
1570         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1571         (WebKit::LayerTreeCoordinator::createTile):
1572         (WebKit::LayerTreeCoordinator::updateTile):
1573         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
1574         (LayerTreeCoordinator):
1575
1576 2012-11-09  Noam Rosenthal  <noam.rosenthal@nokia.com>
1577
1578         Allow ports to decide whether an image should be directly composited
1579         https://bugs.webkit.org/show_bug.cgi?id=101827
1580
1581         Reviewed by Simon Fraser.
1582
1583         Implement shouldDirectlyCompositeImage for coordinated graphics, effectively disabling direct
1584         compositing of images with width or height larger than 2000 pixels.
1585
1586         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1587         (WebCore::CoordinatedGraphicsLayer::shouldDirectlyCompositeImage):
1588         (WebCore):
1589         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1590         (CoordinatedGraphicsLayer):
1591
1592 2012-11-09  Huang Dongsung  <luxtella@company100.net>
1593
1594         Coordinated Graphics: Antialias the edge-tiles of CoordinatedBackingStore.
1595         https://bugs.webkit.org/show_bug.cgi?id=101818
1596
1597         Reviewed by Noam Rosenthal.
1598
1599         Since we now have the entire surfaceRect, we can antialias the edge-tiles.
1600
1601         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1602         (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
1603         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
1604         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
1605         (CoordinatedBackingStore):
1606
1607 2012-11-09  Rick Byers  <rbyers@chromium.org>
1608
1609         No tests for changing mouse cursors
1610         https://bugs.webkit.org/show_bug.cgi?id=100550
1611
1612         Reviewed by Adam Barth.
1613
1614         Add necessary exports for Internals::getCurrentCursorInfo
1615
1616         * win/WebKit2.def:
1617         * win/WebKit2CFLite.def:
1618
1619 2012-11-09  Vivek Galatage  <vivekgalatage@gmail.com>
1620
1621         Add missing exports setMediaTypeOverride, setResolutionOverride and layerTreeAsText to WebKit2CFLite.def
1622         https://bugs.webkit.org/show_bug.cgi?id=101816
1623
1624         Reviewed by Anders Carlsson.
1625
1626         Add missing exports setMediaTypeOverride, setResolutionOverride and layerTreeAsText to WebKit2CFLite.def to fix win-cairo build.
1627
1628         * win/WebKit2CFLite.def:
1629
1630 2012-11-09  Huang Dongsung  <luxtella@company100.net>
1631
1632         Coordinated Graphics: Amend CoordinatedBackingStore::paintToTextureMapper to fit its own semantic.
1633         https://bugs.webkit.org/show_bug.cgi?id=101701
1634
1635         Reviewed by Noam Rosenthal.
1636
1637         Currently, all subclasses of TextureMapperPlatformLayer implement
1638         paintToTextureMapper to draw its own texture on the given targetRect. Subclasses
1639         can scale the texture to fit the size of the targetRect. However, only
1640         CoordinatedBackingStore::paintToTextureMapper draws its texture using its own
1641         texture size. There is no bug yet, because TextureMapperLayer uses
1642         CoordinatedBackingStore only as a backing store, not a content layer. So,
1643         TextureMapperLayer always request CoordinatedBackingStore to draw using its own
1644         texture size. However, we can use CoordinatedBackingStore as a content layer in
1645         the future. So this patch fixes this potential bug.
1646
1647         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1648         (WebKit::CoordinatedBackingStore::setSize):
1649         (WebKit):
1650         (WebKit::mapToContents):
1651         (WebKit::paintTilesToTextureMapper):
1652         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
1653         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
1654         (CoordinatedBackingStore):
1655         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
1656         (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
1657         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
1658         (LayerTreeCoordinatorProxy):
1659         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
1660         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1661         (WebKit::LayerTreeRenderer::createTile):
1662         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1663         (LayerTreeRenderer):
1664         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1665         (WebCore::CoordinatedGraphicsLayer::createTile):
1666         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1667         (CoordinatedGraphicsLayerClient):
1668         (CoordinatedGraphicsLayer):
1669         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
1670         (WebKit::CoordinatedTile::updateBackBuffer):
1671         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
1672         (CoordinatedTileClient):
1673         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1674         (WebKit::LayerTreeCoordinator::createTile):
1675         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
1676         (LayerTreeCoordinator):
1677
1678 2012-11-09  Brady Eidson  <beidson@apple.com>
1679
1680         Implement NetworkProcess willSendRequest
1681         https://bugs.webkit.org/show_bug.cgi?id=101812
1682
1683         Reviewed by Alexey Proskuryakov.
1684
1685         Message to the WebProcess to get the new request, if any.
1686
1687         Because network callbacks are coming in on a background thread we have to jump through hoops to synchronously
1688         ask the WebProcess, but these hoops follow an established pattern of using async messaging with BlockingResourceMap.
1689
1690         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1691         (WebKit::NetworkConnectionToWebProcess::willSendRequestHandled): Pass the new request back to NetworkRequest for handling.
1692         * NetworkProcess/NetworkConnectionToWebProcess.h:
1693         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1694
1695         * NetworkProcess/NetworkRequest.cpp:
1696         (WebKit::NetworkRequest::didFail):
1697         (WebKit::responseMap):
1698         (WebKit::generateWillSendRequestID):
1699         (WebKit::didReceiveWillSendRequestHandled):
1700         (WebKit::NetworkRequest::willSendRequest): Asynchronously message the WebProcess but synchronous wait for a reply back.
1701         * NetworkProcess/NetworkRequest.h:
1702
1703         * WebProcess/Network/NetworkProcessConnection.cpp:
1704         (WebKit::NetworkProcessConnection::willSendRequest): Ask the WebResourceLoadScheduler for the new request then
1705           message back to the NetworkProcess with the reply.
1706         * WebProcess/Network/NetworkProcessConnection.h:
1707
1708         * WebProcess/Network/NetworkProcessConnection.messages.in:
1709
1710         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1711         (WebKit::WebResourceLoadScheduler::willSendRequest):
1712         * WebProcess/Network/WebResourceLoadScheduler.h:
1713
1714 2012-11-09  Tim Horton  <timothy_horton@apple.com>
1715
1716         PDFPlugin should support clicking on external links
1717         https://bugs.webkit.org/show_bug.cgi?id=101647
1718         <rdar://problem/12555222>
1719
1720         Reviewed by Alexey Proskuryakov.
1721
1722         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add details about clickedLinkWithURL: callback.
1723         * WebProcess/Plugins/PDF/PDFPlugin.h:
1724         (PDFPlugin): Add clickedLink() and storage for the last mouse event that was dispatched.
1725         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1726         (-[WKPDFLayerControllerDelegate pdfLayerController:clickedLinkWithURL:]): Forward the URL to PDFPlugin.
1727         (WebKit::PDFPlugin::handleMouseEvent): Store the last mouse event that was dispatched.
1728         We use this to get the correct mouse button and modifier keys, so that command-clicking, etc. links works.
1729         (WebKit::PDFPlugin::clickedLink): Request a load given the new URL.
1730
1731         * PluginProcess/PluginControllerProxy.h:
1732         (PluginControllerProxy):
1733         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1734         (WebKit::NetscapePlugin::shouldAllowScripting):
1735         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1736         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
1737         * WebProcess/Plugins/Plugin.h:
1738         * WebProcess/Plugins/PluginProxy.cpp:
1739         (WebKit::PluginProxy::shouldAllowScripting):
1740         * WebProcess/Plugins/PluginProxy.h:
1741         * WebProcess/Plugins/PluginView.cpp:
1742         (WebKit::PluginView::shouldAllowScripting):
1743         * WebProcess/Plugins/PluginView.h:
1744         Add shouldAllowScripting() function to Plugin (and plumb through PluginProxy and PluginView, etc.)
1745
1746         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1747         (WebKit::WebFrameLoaderClient::allowScript): Override allowScript(); if the frame is hosting a PluginDocument,
1748         ask its plugin whether it should allow execution of JavaScript and JavaScript URLs or not.
1749         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1750
1751         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Disable scripting for SimplePDFPlugin (and, by inheritance, PDFPlugin).
1752
1753 2012-11-09  Brady Eidson  <beidson@apple.com>
1754
1755         Implement WebResourceBuffer::isEmpty()
1756         https://bugs.webkit.org/show_bug.cgi?id=101805
1757
1758         Reviewed by Alexey Proskuryakov.
1759
1760         This is required to make the existing subresource loading in NetworkProcess work correctly,
1761         as there's an isEmpty() check in the WebProcess that decides whether or not to actually deliver 
1762         the data to the ResourceLoader.
1763
1764         * Shared/WebResourceBuffer.cpp:
1765         (WebKit::WebResourceBuffer::isEmpty):
1766         * Shared/WebResourceBuffer.h:
1767
1768 2012-11-09  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
1769
1770         [EFL][WK2][AC] Fixed layers are shaking when scrolling
1771         https://bugs.webkit.org/show_bug.cgi?id=101549
1772
1773         Reviewed by Kenneth Rohde Christiansen.
1774
1775         At the time of adjusting positions for fixed layers, the locations of
1776         fixed layers are calculated incorrectly because the contentsSize is empty.
1777
1778         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1779         (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): Call the
1780         setContentsSize function in LayerTreeCoordinatorProxy in order to calculate
1781         the locations of fixed layers correctly.
1782
1783 2012-11-09  Brady Eidson  <beidson@apple.com>
1784
1785         NetworkRequest refactoring
1786         https://bugs.webkit.org/show_bug.cgi?id=101777
1787
1788         Reviewed by Alexey Proskuryakov.
1789
1790         Move all of the ResourceHandleClient stubs from the .h to the .cpp in one patch
1791         to make future patches cleaner.
1792
1793         Also completely remove the declaration for shouldCacheResponse() for now.
1794
1795         * NetworkProcess/NetworkRequest.cpp:
1796         (WebKit::NetworkRequest::willSendRequest):
1797         (WebKit::NetworkRequest::didSendData):
1798         (WebKit::NetworkRequest::didReceiveCachedMetadata):
1799         (WebKit::NetworkRequest::wasBlocked):
1800         (WebKit::NetworkRequest::cannotShowURL):
1801         (WebKit::NetworkRequest::willCacheResponse):
1802         (WebKit::NetworkRequest::shouldUseCredentialStorage):
1803         (WebKit::NetworkRequest::didReceiveAuthenticationChallenge):
1804         (WebKit::NetworkRequest::didCancelAuthenticationChallenge):
1805         (WebKit::NetworkRequest::receivedCancellation):
1806         (WebKit::NetworkRequest::canAuthenticateAgainstProtectionSpace):
1807         (WebKit::NetworkRequest::supportsDataArray):
1808         (WebKit::NetworkRequest::didReceiveDataArray):
1809         (WebKit::NetworkRequest::willStopBufferingData):
1810         (WebKit::NetworkRequest::createAsyncFileStream):
1811         * NetworkProcess/NetworkRequest.h:
1812
1813 2012-11-09  Alexey Proskuryakov  <ap@apple.com>
1814
1815         CookieJar uses Document class, which is a layering violation
1816         https://bugs.webkit.org/show_bug.cgi?id=101621
1817
1818         Reviewed by Brady Eidson.
1819
1820         * UIProcess/API/C/WKAPICast.h: Don't include CookieJar.h, its completely unnecessary.
1821
1822 2012-11-09  peavo@outlook.com  <peavo@outlook.com>
1823
1824         WinCairo build fails to link
1825         https://bugs.webkit.org/show_bug.cgi?id=101739
1826
1827         Reviewed by Kentaro Hara.
1828
1829         * win/WebKit2CFLite.def:
1830
1831 2012-11-09  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1832
1833         [EFL][WK2] REGRESSION (r134043): API tests crashes
1834         https://bugs.webkit.org/show_bug.cgi?id=101742
1835
1836         Reviewed by Kenneth Rohde Christiansen.
1837
1838         Do not assert on PassRefPtr<WebContext> after it becomes 0.
1839
1840         * UIProcess/efl/BatteryProvider.cpp:
1841         (BatteryProvider::BatteryProvider):
1842         * UIProcess/efl/NetworkInfoProvider.cpp:
1843         (NetworkInfoProvider::NetworkInfoProvider):
1844
1845 2012-11-09  Yael Aharon  <yael.aharon@intel.com>
1846
1847         [EFL][WK2][AC] Random crashes in layout tests on the bot
1848         https://bugs.webkit.org/show_bug.cgi?id=101687
1849
1850         Reviewed by Kenneth Rohde Christiansen.
1851
1852         Speculative fix for a crash on the bot.
1853         If didCommitLoad() is called before the view size was set, we will
1854         try to paint an empty area, and that will crash.
1855
1856         * UIProcess/API/efl/EwkViewImpl.cpp:
1857         (EwkViewImpl::update):
1858
1859 2012-11-09  Jinwoo Song  <jinwoo7.song@samsung.com>
1860
1861         [EFL][WK2] Make classes for client use WebContext instead of WKContext
1862         https://bugs.webkit.org/show_bug.cgi?id=101564
1863
1864         Reviewed by Kenneth Rohde Christiansen.
1865
1866         EwkContext class has been refactored to use WebContext instead of WKContext in r133844,
1867         so this patch makes client classes use WebContext
1868
1869         * UIProcess/API/efl/ewk_context.cpp:
1870         (EwkContext::EwkContext):
1871         * UIProcess/efl/BatteryProvider.cpp:
1872         (BatteryProvider::~BatteryProvider):
1873         (BatteryProvider::create):
1874         (BatteryProvider::BatteryProvider):
1875         (BatteryProvider::didChangeBatteryStatus):
1876         * UIProcess/efl/BatteryProvider.h:
1877         (BatteryProvider):
1878         * UIProcess/efl/ContextHistoryClientEfl.cpp:
1879         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
1880         * UIProcess/efl/ContextHistoryClientEfl.h:
1881         (WebKit::ContextHistoryClientEfl::create):
1882         (ContextHistoryClientEfl):
1883         * UIProcess/efl/NetworkInfoProvider.cpp:
1884         (NetworkInfoProvider::create):
1885         (NetworkInfoProvider::NetworkInfoProvider):
1886         (NetworkInfoProvider::~NetworkInfoProvider):
1887         * UIProcess/efl/NetworkInfoProvider.h:
1888         (NetworkInfoProvider):
1889
1890 2012-11-09  Jinwoo Song  <jinwoo7.song@samsung.com>
1891
1892         [EFL][WK2] Fix build warning in test_ewk2_context.cpp: [-Wwrite-strings]
1893         https://bugs.webkit.org/show_bug.cgi?id=101666
1894
1895         Reviewed by Kenneth Rohde Christiansen.
1896
1897         Use constant character pointer to fix [-Wwrite-strings] warning.
1898
1899         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1900         (TEST_F):
1901
1902 2012-11-09  Christophe Dumez  <christophe.dumez@intel.com>
1903
1904         [EFL][WK2] Add support for custom cursors
1905         https://bugs.webkit.org/show_bug.cgi?id=101723
1906
1907         Reviewed by Kenneth Rohde Christiansen.
1908
1909         EwkViewImpl::setCursor() now properly handles custom
1910         cursors.
1911
1912         * UIProcess/API/efl/EwkViewImpl.cpp:
1913         (EwkViewImpl::EwkViewImpl):
1914         (EwkViewImpl::setCursor):
1915         * UIProcess/API/efl/EwkViewImpl.h:
1916         (EwkViewImpl):
1917
1918 2012-11-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1919
1920         [EFL] Add a method to the TextCheckerEnchant class to check whether any dictionary is loaded
1921         https://bugs.webkit.org/show_bug.cgi?id=101570
1922
1923         Reviewed by Gustavo Noronha Silva.
1924
1925         To do not get the vector of loaded languages, WebKit2-EFL calls
1926         TextCheckerEnchant::hasDictionary() method to check whether the
1927         dictionaries vector is empty.
1928
1929         * UIProcess/API/efl/ewk_settings.cpp:
1930         (ewk_settings_continuous_spell_checking_enabled_set):
1931         * UIProcess/API/efl/ewk_text_checker.cpp:
1932         (Ewk_Text_Checker::hasDictionary):
1933         (Ewk_Text_Checker):
1934         * UIProcess/API/efl/ewk_text_checker_private.h:
1935         (Ewk_Text_Checker):
1936
1937 2012-11-08  Timothy Hatcher  <timothy@apple.com>
1938
1939         Always use a textured window for the Web Inspector.
1940
1941         https://bugs.webkit.org/show_bug.cgi?id=101693
1942
1943         Reviewed by Joseph Pecoraro.
1944
1945         * UIProcess/mac/WebInspectorProxyMac.mm:
1946         (WebKit::WebInspectorProxy::createInspectorWindow): Removed the conditional for a textured window.
1947
1948 2012-11-08  Huang Dongsung  <luxtella@company100.net>
1949
1950         Coordinated Graphics: Don't send the messages for releasing resources during purging.
1951         https://bugs.webkit.org/show_bug.cgi?id=101685
1952
1953         Reviewed by Noam Rosenthal.
1954
1955         We don't need to send the messages related to releasing resources to UI Process
1956         during purging, because UI Process already had removed all resources.
1957         This patch gives us reducing slight messaging overhead and increasing readability.
1958
1959         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
1960         (WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
1961         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1962         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
1963         (WebKit::LayerTreeCoordinator::purgeReleasedImages):
1964         (WebKit::LayerTreeCoordinator::removeTile):
1965         (WebKit::LayerTreeCoordinator::removeUpdateAtlas):
1966         (WebKit::LayerTreeCoordinator::purgeBackingStores):
1967         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
1968         (LayerTreeCoordinator):
1969
1970 2012-11-08  KyungTae Kim  <ktf.kim@samsung.com>
1971
1972         [WK2] Unused parameters on LayerTreeRenderer.cpp
1973         https://bugs.webkit.org/show_bug.cgi?id=101653
1974
1975         Reviewed by Noam Rosenthal.
1976
1977         Because the 'tileID' parameter is not used now,
1978         comment out it to fix build warning -Wunused-parameter
1979
1980         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1981         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
1982
1983 2012-11-08  Christophe Dumez  <christophe.dumez@intel.com>
1984
1985         [EFL][WK2] Add proper support for fullscreen API to MiniBrowser
1986         https://bugs.webkit.org/show_bug.cgi?id=101615
1987
1988         Reviewed by Kenneth Rohde Christiansen.
1989
1990         * UIProcess/API/efl/EwkViewImpl.cpp:
1991         (EwkViewImpl::enterFullScreen):
1992         * UIProcess/API/efl/ewk_security_origin.cpp:
1993         (EwkSecurityOrigin::EwkSecurityOrigin):
1994         * UIProcess/API/efl/ewk_security_origin_private.h:
1995         (EwkSecurityOrigin::create): Add factory method to construct a
1996         EwkSecurityOrigin from a KURL.
1997         (EwkSecurityOrigin):
1998         * UIProcess/API/efl/ewk_view.cpp:
1999         (ewk_view_fullscreen_exit): Add public API function to exit
2000         fullscreen mode.
2001         * UIProcess/API/efl/ewk_view.h: Add security origin parameter
2002         to fullscreen_enter smart function since this information is
2003         useful to the user agent.
2004         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2005         (fullScreenCallback):
2006         (fullScreenExitCallback):
2007         (TEST_F):
2008
2009 2012-11-08  Brady Eidson  <beidson@apple.com>
2010
2011         Have NetworkProcess do the actual loading of subresources.
2012         https://bugs.webkit.org/show_bug.cgi?id=101640
2013
2014         Reviewed by Alexey Proskuryakov.
2015
2016         This adds actual loading of subresources in the NetworkProcess.
2017
2018         Currently a resource just gets its entire buffer of data built up and then delivered to the WebProcess in one chunk.
2019
2020         Many FIXMEs point the path towards much better behavior.
2021
2022         Project file stuff:
2023         * WebKit2.xcodeproj/project.pbxproj:
2024
2025         Add a new Logging channel for scheduling so the one for loading can be separate:
2026         * Platform/Logging.cpp:
2027         * Platform/Logging.h:
2028
2029         Add an enhancement FIXME:
2030         * NetworkProcess/HostRecord.cpp:
2031         (WebKit::HostRecord::remove):
2032
2033         NetworkRequest now derives from ResourceHandleClient and does actual loading, messaging WebProcess as it does:
2034         * NetworkProcess/NetworkRequest.cpp:
2035         (WebKit::NetworkRequest::NetworkRequest):
2036         (WebKit::NetworkRequest::~NetworkRequest):
2037         (WebKit::NetworkRequest::start):
2038         (WebKit::requestsToStopMutex):
2039         (WebKit::requestsToStop):
2040         (WebKit::NetworkRequest::scheduleStopOnMainThread): Stop
2041         (WebKit::NetworkRequest::performStops):
2042         (WebKit::NetworkRequest::stop): Does NetworkRequest cleanup that happens no matter the state of the network load.
2043         (WebKit::NetworkRequest::didReceiveResponse):
2044         (WebKit::NetworkRequest::didReceiveData):
2045         (WebKit::NetworkRequest::didFinishLoading):
2046         (WebKit::NetworkRequest::didFail):
2047         * NetworkProcess/NetworkRequest.h:
2048
2049         Change some logging and now invalid asserts, as well as starting requests in-process instead of relying on WebProcess:
2050         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
2051         (WebKit::NetworkResourceLoadScheduler::scheduleNetworkRequest):
2052         (WebKit::NetworkResourceLoadScheduler::addLoadInProgress):
2053         (WebKit::NetworkResourceLoadScheduler::removeLoadIdentifier):
2054         (WebKit::NetworkResourceLoadScheduler::crossOriginRedirectReceived):
2055         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
2056         (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost):
2057         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoadIdentifiers):
2058         (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoadIdentifier):
2059         * NetworkProcess/NetworkResourceLoadScheduler.h:
2060         (NetworkResourceLoadScheduler):
2061
2062         Add a "ShareableResource" which includes a SharedMemory block, an offset into that block, and a size:
2063         * Shared/ShareableResource.cpp: Added.
2064         (WebKit::ShareableResource::Handle::Handle):
2065         (WebKit::ShareableResource::Handle::encode):
2066         (WebKit::ShareableResource::Handle::decode):
2067         (WebKit::ShareableResource::create):
2068         (WebKit::ShareableResource::ShareableResource):
2069         (WebKit::ShareableResource::~ShareableResource):
2070         (WebKit::ShareableResource::createHandle):
2071         (WebKit::ShareableResource::data):
2072         (WebKit::ShareableResource::size):
2073         * Shared/ShareableResource.h: 
2074         (WebKit::ShareableResource::Handle::isNull):
2075         (WebKit::ShareableResource::Handle::size):
2076
2077         Add an implementation of WebCore::ResourceBuffer that wraps a ShareableResource instead of a SharedBuffer:
2078         * Shared/WebResourceBuffer.cpp:
2079         (WebKit::WebResourceBuffer::WebResourceBuffer):
2080         (WebKit::WebResourceBuffer::~WebResourceBuffer):
2081         (WebKit::WebResourceBuffer::data):
2082         (WebKit::WebResourceBuffer::size):
2083         * Shared/WebResourceBuffer.h:
2084         (WebResourceBuffer):
2085         (WebKit::WebResourceBuffer::create):
2086
2087         Add messaging that responds to resource load events from the NetworkProcess and passes them to the scheduler:
2088         * WebProcess/Network/NetworkProcessConnection.cpp:
2089         (WebKit::NetworkProcessConnection::didReceiveResponse):
2090         (WebKit::NetworkProcessConnection::didReceiveResource):
2091         (WebKit::NetworkProcessConnection::didFailResourceLoad):
2092         * WebProcess/Network/NetworkProcessConnection.h:
2093         * WebProcess/Network/NetworkProcessConnection.messages.in:
2094
2095         Takes resource load events passed from the NetworkProcess and hands them off directly to WebCore ResourceLoaders:
2096         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2097         (WebKit::WebResourceLoadScheduler::scheduleLoad): Update some logging.
2098         (WebKit::WebResourceLoadScheduler::addMainResourceLoad): Ditto.
2099         (WebKit::WebResourceLoadScheduler::remove): Ditto.
2100         (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): Ditto.
2101         (WebKit::WebResourceLoadScheduler::servePendingRequests): Ditto.
2102         (WebKit::WebResourceLoadScheduler::didReceiveResponse): Call through to ResourceLoader.
2103         (WebKit::WebResourceLoadScheduler::didReceiveResource): Ditto.
2104         (WebKit::WebResourceLoadScheduler::didFailResourceLoad): Ditto.
2105         * WebProcess/Network/WebResourceLoadScheduler.h:
2106
2107 2012-11-08  Huang Dongsung  <luxtella@company100.net>
2108
2109         Coordinated Graphics: Remove an invisible TiledBackingStore of CoordinatedGraphicsLayer.
2110         https://bugs.webkit.org/show_bug.cgi?id=101424
2111
2112         Reviewed by Noam Rosenthal.
2113
2114         We must remove an invisible TiledBackingStore of CoordinatedGraphicsLayer.
2115         Currently, CoordinatedGraphicsLayer only removes a TiledBackingStore if
2116         !drawsContent() while TextureMapperLayer::updateBackingStore() removes a backing
2117         store if (!m_state.drawsContent || !m_state.contentsVisible || m_size.isEmpty()).
2118         CoordinatedGraphicsLayer must have the same behavior.
2119
2120         In addition, this patch makes LayerTreeRenderer remove a backing store from
2121         GraphicsLayerTextureMapper when CoordinatedBackingStore does not have any tiles.
2122
2123         Test: compositing/nested-direct-image-compositing.html
2124
2125         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2126         (WebKit::CoordinatedBackingStore::removeTile):
2127         (WebKit::CoordinatedBackingStore::isEmpty):
2128         (WebKit):
2129         (WebKit::CoordinatedBackingStore::commitTileOperations):
2130         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
2131         (CoordinatedBackingStore):
2132         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2133         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
2134         (WebKit):
2135         (WebKit::LayerTreeRenderer::removeTile):
2136         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2137         (LayerTreeRenderer):
2138         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2139         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2140
2141 2012-11-08  Tim Horton  <timothy_horton@apple.com>
2142
2143         [WK2] Print preview should vend images to the UIProcess instead of PDFs
2144         https://bugs.webkit.org/show_bug.cgi?id=101382
2145         <rdar://problem/9866766>
2146
2147         Reviewed by Alexey Proskuryakov.
2148
2149         In the interests of keeping PDF processing inside the WebProcess, we should
2150         remove print preview's reliance on PDFs, by handing bitmaps back instead.
2151
2152         * Shared/ShareableBitmap.cpp:
2153         (WebKit::ShareableBitmap::create): Add an optional SharedMemory::Protection argument, so we can make
2154         ShareableBitmaps from read-only handles if desired. Defaults to read-write as previously.
2155         (WebKit::ShareableBitmap::createHandle): Add an optional SharedMemory::Protection argument, so we can make
2156         read-only handles if desired. Defaults to read-write as previously.
2157         * Shared/ShareableBitmap.h:
2158         * UIProcess/API/mac/WKPrintingView.h:
2159         (WebImage): Store WebImages instead of raw PDF data for previews.
2160         * UIProcess/API/mac/WKPrintingView.mm:
2161         (pageDidDrawToImage): Add a callback for when a preview we've requested is done rendering into an image.
2162         Cache the image in _pagePreviews if appropriate.
2163         (pageDidDrawToPDF): Do not handle PDF data unless we are expecting a real print callback (not a preview).
2164         (-[WKPrintingView _drawPreview:]): Request an image instead of PDF data when doing a print preview.
2165         * UIProcess/GenericCallback.h:
2166         (ImageCallback): Add a callback type with one argument: a ShareableBitmap::Handle.
2167         I can't use the GenericCallback template because ShareableBitmap::Handle doesn't have a corresponding WK type.
2168         * UIProcess/WebPageProxy.cpp:
2169         (WebKit::WebPageProxy::close): Add support for ImageCallback.
2170         (WebKit::WebPageProxy::imageCallback): Add support for ImageCallback.
2171         (WebKit::WebPageProxy::drawRectToImage): Rename drawRectToPDF to drawRectToImage.
2172         * UIProcess/WebPageProxy.h:
2173         (WebPageProxy): Rename drawRectToPDF to drawRectToImage, add support for ImageCallback.
2174         * UIProcess/WebPageProxy.messages.in: Add support for ImageCallback.
2175         * WebProcess/WebPage/WebPage.cpp:
2176         (WebKit::WebPage::drawRectToImage): Rename drawRectToPDF to drawRectToImage.
2177         Make drawRectToImage create a bitmap snapshot of the page (using the normal snapshotting code),
2178         or, if the page is backed by a *PDFPlugin, draw the PDF document into a bitmap and use that.
2179         * WebProcess/WebPage/WebPage.h:
2180         (WebPage): Rename drawRectToPDF to drawRectToImage.
2181         * WebProcess/WebPage/WebPage.messages.in: Rename drawRectToPDF to drawRectToImage.
2182         * WebProcess/WebPage/mac/WebPageMac.mm:
2183         (WebKit::WebPage::drawPDFDocument): Rename drawRectToPDFFromPDFDocument to drawPDFDocument,
2184         because it's more like drawImage than anything else.
2185
2186 2012-11-08  Simon Hausmann  <simon.hausmann@digia.com>
2187
2188         [Qt] Fix build without WebKit1
2189         https://bugs.webkit.org/show_bug.cgi?id=101583
2190
2191         Reviewed by Tor Arne Vestbø.
2192
2193         WebProcess needs access to the QStyle themeing via the initializeWebKit2Theme() function from
2194         WebKit1. Try to access it depending on whether WebKit1 is built or not, not depending on whether
2195         widgets are available not.
2196
2197         * WebProcess.pro:
2198         * qt/MainQt.cpp:
2199         (WebKit):
2200         (main):
2201
2202 2012-11-08  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2203
2204         [EFL] Unreviewed build fix after r133880.
2205
2206         * UIProcess/API/efl/ewk_context.cpp:
2207         (EwkContext::setAdditionalPluginPath):
2208
2209 2012-11-08  KwangYong Choi  <ky0.choi@samsung.com>
2210
2211         [EFL][WK2] Add ewk_context_additional_plugin_path_set API
2212         https://bugs.webkit.org/show_bug.cgi?id=101530
2213
2214         Reviewed by Gyuyoung Kim.
2215
2216         Add ewk_context_additional_plugin_path_set() to set additional plugin directory.
2217
2218         * UIProcess/API/efl/ewk_context.cpp:
2219         (EwkContext::setAdditionalPluginPath):
2220         (ewk_context_additional_plugin_path_set):
2221         * UIProcess/API/efl/ewk_context.h:
2222         * UIProcess/API/efl/ewk_context_private.h:
2223         (EwkContext):
2224         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2225         (TEST_F):
2226
2227 2012-11-08  Jinwoo Song  <jinwoo7.song@samsung.com>
2228
2229         [EFL][WK2] Use explicit constructor in BatteryProvider, DownloadManagerEfl, NetworkInfoProvider
2230         https://bugs.webkit.org/show_bug.cgi?id=101567
2231
2232         Reviewed by Kentaro Hara.
2233
2234         Added explicit keyword in constructors of BatteryProvider, DownloadManagerEfl,
2235         and NetworkInfoProvider in order to avoid implicit type conversion.
2236
2237         * UIProcess/efl/BatteryProvider.h:
2238         (BatteryProvider):
2239         * UIProcess/efl/DownloadManagerEfl.h:
2240         (DownloadManagerEfl):
2241         * UIProcess/efl/NetworkInfoProvider.h:
2242         (NetworkInfoProvider):
2243
2244 2012-11-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2245
2246         [EFL][WK2] Use smart pointers in EwkContext more actively
2247         https://bugs.webkit.org/show_bug.cgi?id=101565
2248
2249         Reviewed by Gyuyoung Kim.
2250
2251         Since we're using WebContext instead of WKContext starting r133844 we should
2252         use smart pointers accordingly including PassRefPtr.
2253
2254         * UIProcess/API/efl/ewk_context.cpp:
2255         (EwkContext::EwkContext):
2256         (EwkContext::~EwkContext):
2257         (EwkContext::create):
2258         (EwkContext::cookieManager):
2259         (EwkContext::ensureFaviconDatabase):
2260         (EwkContext::setFaviconDatabaseDirectoryPath):
2261         (EwkContext::addVisitedLink):
2262         (EwkContext::setCacheModel):
2263         (EwkContext::cacheModel):
2264         * UIProcess/API/efl/ewk_context_private.h:
2265         (EwkContext):
2266         (EwkContext::webContext):
2267         * UIProcess/API/efl/ewk_database_manager_private.h:
2268         (Ewk_Database_Manager::create):
2269         * UIProcess/API/efl/ewk_storage_manager_private.h:
2270         (Ewk_Storage_Manager::create):
2271         * UIProcess/efl/DownloadManagerEfl.cpp:
2272         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
2273         * UIProcess/efl/RequestManagerClientEfl.cpp:
2274         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2275
2276 2012-11-08  Kangil Han  <kangil.han@samsung.com>
2277
2278         [EFL][MiniBrowser] Add encoding detector option.
2279         https://bugs.webkit.org/show_bug.cgi?id=100931
2280
2281         Reviewed by Gyuyoung Kim.
2282
2283         Add triggering Settings::setUsesEncodingDetector for WK2 UI process.
2284
2285         * WebProcess/WebPage/WebPage.cpp:
2286         (WebKit::WebPage::updatePreferences):
2287
2288 2012-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2289
2290         [GTK] WebKitWebView doesn't notify of favicon changes for known favicons but new pages
2291         https://bugs.webkit.org/show_bug.cgi?id=98874
2292
2293         Reviewed by Martin Robinson.
2294
2295         If the page is unknown (not registered in the icon database) but
2296         the icon is known (registered by another page) favicon-ready
2297         signal is not emitted because the icon has already been imported
2298         from the database. The view always asks for the favicon when the
2299         load has been committed, but it's usually too early and the
2300         favicon of the page is still unkown. We can use
2301         didChangeIconForPageURLCallback to know when to ask for the
2302         favicon emitting a favicon-changed signal. The callback
2303         iconDataReadyForPageURLCallback is still useful to process pending
2304         icon requests, but the favicon-ready signal can be removed in
2305         favor of favicon-changed.
2306
2307         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
2308         (_WebKitFaviconDatabasePrivate): Keep a map of page icons that has
2309         been imported to make sure we only emit favicon-changed signal
2310         when the favicon URI has actually changed, because
2311         didChangeIconForPageURLCallback can be called multiple times for
2312         the same favicon URI in some cases.
2313         (webkit_favicon_database_class_init): Remove favicon-ready signal
2314         and add favicon-changed that includes the new favicon URI for the
2315         given page URI.
2316         (didChangeIconForPageURLCallback): Emit favicon-changed signal if
2317         the favicon URI is new or has changed for the given page URI.
2318         (iconDataReadyForPageURLCallback): Process pending icon requests.
2319         (webkitFaviconDatabaseCreate): Add implementation for
2320         didChangeIconForPageURLCallback.
2321         * UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h:
2322         * UIProcess/API/gtk/WebKitWebView.cpp:
2323         (_WebKitWebViewPrivate): Add favicon URI to make sure we only ask for a
2324         new favicon when the favicon URI has changed.
2325         (webkitWebViewUpdateFavicon): Update the favicon and emit
2326         notify::favicon if it has changed.
2327         (gotFaviconCallback): Update the favicon if the request hasn't
2328         been cancelled.
2329         (webkitWebViewRequestFavicon): Ask for the page favicon.
2330         (webkitWebViewUpdateFaviconURI): Updated the favicon URI and
2331         request the page favicon if the favicon URI has changed.
2332         (faviconChangedCallback): Call webkitWebViewUpdateFaviconURI() with
2333         the given favicon URI.
2334         (webkitWebViewWatchForChangesInFavicon): Connect to
2335         WebKitFaviconDatabase::favicon-changed.
2336         (webkitWebViewDisconnectFaviconDatabaseSignalHandlers): Disconnect
2337         WebKitFaviconDatabase::favicon-changed signal.
2338         (webkitWebViewLoadChanged): Call webkitWebViewUpdateFaviconURI()
2339         with the current favicon URI when the load has been committed.
2340         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
2341         (serverCallback):
2342         (testNotInitialized):
2343         (testGetFavicon):
2344         (testGetFaviconURI):
2345         (testWebViewFavicon):
2346         (beforeAll):
2347         * UIProcess/API/gtk/webkit2marshal.list: Add new marshaler.
2348
2349 2012-11-08  Anders Carlsson  <andersca@apple.com>
2350
2351         Attempt to silence a compiler warning.
2352
2353         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
2354         (WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
2355
2356 2012-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2357
2358         Unreviewed, rolling out r133841.
2359         http://trac.webkit.org/changeset/133841
2360         https://bugs.webkit.org/show_bug.cgi?id=101542
2361
2362         Reverted patches were innocent (Requested by shinyak on
2363         #webkit).
2364
2365         * win/WebKit2.def:
2366         * win/WebKit2CFLite.def:
2367
2368 2012-11-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2369
2370         [EFL][WK2] Make ewk_context use WebContext instead of WKContext
2371         https://bugs.webkit.org/show_bug.cgi?id=101477
2372
2373         Reviewed by Gyuyoung Kim.
2374
2375         Refactor ewk_context to use WebContext as ewk_context is encapsulated in a C++ classes.
2376
2377         * UIProcess/API/efl/EwkViewImpl.cpp:
2378         (EwkViewImpl::EwkViewImpl):
2379         * UIProcess/API/efl/ewk_context.cpp:
2380         (EwkContext::EwkContext):
2381         (EwkContext::~EwkContext):
2382         (EwkContext::create):
2383         (EwkContext::defaultContext):
2384         (EwkContext::cookieManager):
2385         (EwkContext::ensureFaviconDatabase):
2386         (EwkContext::setFaviconDatabaseDirectoryPath):
2387         (EwkContext::addVisitedLink):
2388         (EwkContext::setCacheModel):
2389         (EwkContext::cacheModel):
2390         * UIProcess/API/efl/ewk_context_private.h:
2391         (EwkContext):
2392         (EwkContext::webContext):
2393         * UIProcess/API/efl/ewk_database_manager.cpp:
2394         (Ewk_Database_Manager::Ewk_Database_Manager):
2395         (Ewk_Database_Manager::getDatabaseOrigins):
2396         * UIProcess/API/efl/ewk_database_manager_private.h:
2397         (Ewk_Database_Manager::create):
2398         (Ewk_Database_Manager):
2399         * UIProcess/API/efl/ewk_storage_manager.cpp:
2400         (Ewk_Storage_Manager::Ewk_Storage_Manager):
2401         (Ewk_Storage_Manager::getStorageOrigins):
2402         * UIProcess/API/efl/ewk_storage_manager_private.h:
2403         (Ewk_Storage_Manager::create):
2404         (Ewk_Storage_Manager):
2405         * UIProcess/API/efl/ewk_view.cpp:
2406         (ewk_view_base_add):
2407         * UIProcess/efl/DownloadManagerEfl.cpp:
2408         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
2409         * UIProcess/efl/RequestManagerClientEfl.cpp:
2410         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2411
2412 2012-11-07  Shinya Kawanaka  <shinyak@chromium.org>
2413
2414         Unreviewed, rolling out r133428 and r133749
2415         https://bugs.webkit.org/show_bug.cgi?id=101533
2416
2417         These patches might cause memory regression.
2418
2419         * win/WebKit2.def:
2420         * win/WebKit2CFLite.def:
2421
2422 2012-11-07  Anders Carlsson  <andersca@apple.com>
2423
2424         Add RemoteGraphicsLayer class
2425         https://bugs.webkit.org/show_bug.cgi?id=101535
2426
2427         Reviewed by Simon Fraser.
2428
2429         * WebKit2.xcodeproj/project.pbxproj:
2430         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
2431         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
2432         Add RemoteGraphicsLayer, a subclass of WebCore::GraphicsLayer.
2433
2434         * WebProcess/WebPage/mac/RemoteLayerTreeController.h:
2435         Make RemoteLayerTreeController a GraphicsLayerFactory.
2436
2437         * WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
2438         (WebKit::RemoteLayerTreeController::createGraphicsLayer):
2439         Create a new RemoteGraphicsLayer.
2440
2441         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2442         (WebKit::RemoteLayerTreeDrawingArea::graphicsLayerFactory):
2443         Return the layer tree controller.
2444
2445 2012-11-07  Byungwoo Lee  <bw80.lee@samsung.com>
2446
2447         [WK2] Make WebVibrationProxy to be a member of WebPageProxy.
2448         https://bugs.webkit.org/show_bug.cgi?id=100334
2449
2450         Reviewed by Anders Carlsson.
2451
2452         WebVibrationProxy should be a member of WebPageProxy, because the IPC
2453         messages of WebVibrationProxy have page destination ID.
2454
2455         The r132386 proposed a way to add/delete message receivers that can
2456         handle IPC messages with destination ID.
2457
2458         Previous implementation that creating WebVibrationProxy as a WebContext
2459         member and using the global message receiver for the proxy can make
2460         assertions after r132386.
2461
2462         To handle the vibration IPC messages properly, this patch will do the
2463         followings.
2464
2465         1) Instead of WebContext, WebPageProxy will have the WebVibrationProxy.
2466
2467         2) WebVibrationProxy will add itself to the message receiver map of
2468            the WebContext with page destination ID.
2469
2470         3) When WebProcessProxy received vibration ipc messages, it will
2471            forward the messages to the WebContext first. Then the message
2472            receiver map of the WebContext will handle the messages with the
2473            registered WebVibrationProxy.
2474
2475         4) APIs will be modified to apply these changes.
2476            a) WK API to get WKVibrationRef will use WKPageRef not WKContextRef.
2477            b) EFL APIs and API test for the vibration will also be changed.
2478               - EwkViewImpl will have vibration client. (EwkContext will not
2479                 have it)
2480               - Previous API to register the vibration callback will be removed.
2481               - New signals for vibration will be added to the EwkViewImpl.
2482               - VibrationProxy will be renamed to VibrationClient for the
2483                 consistency with other clients in EwkViewImpl.
2484               - VibrationClient will use EwkViewImpl instead of EwkContext.
2485               - Previous API test for vibration will be moved from context test
2486                 to view test, and it will use the changed API.
2487
2488         * PlatformEfl.cmake:
2489         * UIProcess/API/C/WKContext.cpp:
2490         * UIProcess/API/C/WKContext.h:
2491         * UIProcess/API/C/WKPage.cpp:
2492         (WKPageGetVibration):
2493         * UIProcess/API/C/WKPage.h:
2494         * UIProcess/API/efl/EwkViewCallbacks.h:
2495         (EwkViewCallbacks):
2496         * UIProcess/API/efl/EwkViewImpl.cpp:
2497         (EwkViewImpl::EwkViewImpl):
2498         * UIProcess/API/efl/EwkViewImpl.h:
2499         (WebKit):
2500         (EwkViewImpl):
2501         * UIProcess/API/efl/ewk_context.cpp:
2502         (EwkContext::EwkContext):
2503         * UIProcess/API/efl/ewk_context.h:
2504         * UIProcess/API/efl/ewk_context_private.h:
2505         (WebKit):
2506         (EwkContext):
2507         * UIProcess/API/efl/ewk_view.h:
2508         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2509         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2510         (VibrationCbData):
2511         (onVibrate):
2512         (onCancelVibration):
2513         (loadVibrationHTMLString):
2514         (TEST_F):
2515         * UIProcess/WebContext.cpp:
2516         (WebKit::WebContext::WebContext):
2517         (WebKit::WebContext::~WebContext):
2518         (WebKit::WebContext::disconnectProcess):
2519         * UIProcess/WebContext.h:
2520         (WebKit):
2521         (WebContext):
2522         * UIProcess/WebPageProxy.cpp:
2523         (WebKit::WebPageProxy::WebPageProxy):
2524         (WebKit::WebPageProxy::close):
2525         (WebKit::WebPageProxy::processDidCrash):
2526         * UIProcess/WebPageProxy.h:
2527         (WebKit):
2528         (WebPageProxy):
2529         (WebKit::WebPageProxy::vibration):
2530         * UIProcess/WebVibrationProxy.cpp:
2531         (WebKit::WebVibrationProxy::create):
2532         (WebKit::WebVibrationProxy::WebVibrationProxy):
2533         (WebKit::WebVibrationProxy::~WebVibrationProxy):
2534         (WebKit::WebVibrationProxy::invalidate):
2535         * UIProcess/WebVibrationProxy.h:
2536         (WebKit):
2537         (WebVibrationProxy):
2538         * UIProcess/efl/VibrationClientEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/VibrationProvider.cpp.
2539         (toVibrationClient):
2540         (VibrationClientEfl::vibrateCallback):
2541         (VibrationClientEfl::cancelVibrationCallback):
2542         (VibrationClientEfl::create):
2543         (VibrationClientEfl::VibrationClientEfl):
2544         (VibrationClientEfl::~VibrationClientEfl):
2545         * UIProcess/efl/VibrationClientEfl.h: Renamed from Source/WebKit2/UIProcess/efl/VibrationProvider.h.
2546         (WebKit):
2547         (VibrationClientEfl):
2548
2549 2012-11-07  Anders Carlsson  <andersca@apple.com>
2550
2551         Add empty RemoteLayerTree class
2552         https://bugs.webkit.org/show_bug.cgi?id=101524
2553
2554         Reviewed by Simon Fraser.
2555
2556         Add a new RemoteLayerTree class which will contain the remote graphics layers.
2557
2558         * WebKit2.xcodeproj/project.pbxproj:
2559         * WebProcess/WebPage/mac/RemoteLayerTree.h: Added.
2560         * WebProcess/WebPage/mac/RemoteLayerTree.mm: Added.
2561         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2562         (RemoteLayerTreeDrawingArea):
2563         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2564         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2565
2566 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
2567
2568         [EFL][WK2] Allow client to override setWindowFrame() / getWindowFrame()
2569         https://bugs.webkit.org/show_bug.cgi?id=101496
2570
2571         Reviewed by Kenneth Rohde Christiansen.
2572
2573         Add window_geometry_set() / window_geometry_get() smart functions to
2574         ewk_view allowing the client to provide its own implementation for
2575         those.
2576
2577         This is particularly useful if the application uses elm_win because
2578         the default implementation will not behave correctly in this case.
2579         This is due to the fact that the default implementation interacts
2580         with the Ecore_Evas that contains the view and is not aware of the
2581         parent window widget.
2582
2583         * UIProcess/API/efl/EwkViewImpl.cpp:
2584         (EwkViewImpl::windowGeometry):
2585         (EwkViewImpl::setWindowGeometry):
2586         * UIProcess/API/efl/EwkViewImpl.h:
2587         (EwkViewImpl):
2588         * UIProcess/API/efl/ewk_view.h:
2589         * UIProcess/efl/PageUIClientEfl.cpp:
2590         (WebKit::PageUIClientEfl::getWindowFrame):
2591         (WebKit::PageUIClientEfl::setWindowFrame):
2592
2593 2012-11-07  Alexandru Chiculita  <achicu@adobe.com>
2594
2595         CoordinatedGraphicsArgumentCoders should use ValidatedCustomFitlerOperation instead
2596         https://bugs.webkit.org/show_bug.cgi?id=100905
2597
2598         Reviewed by Noam Rosenthal.
2599
2600         The code now knows how to read a ValidatedCustomFitlerOperation and serialize it to the UI process.
2601
2602         No new tests, the code path is not used yet.
2603
2604         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2605         (CoreIPC::::encode):
2606         (CoreIPC::::decode):
2607         * Shared/CoordinatedGraphics/WebCustomFilterProgram.h:
2608
2609 2012-11-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2610
2611         [EFL][WK2] Add ewk_settings_preferred_minimum_contents_width_get/set API
2612         https://bugs.webkit.org/show_bug.cgi?id=101467
2613
2614         Reviewed by Kenneth Rohde Christiansen.
2615
2616         Added ewk_settings_preferred_minimum_contents_width_get/set API which is used for setting/getting
2617         of default minimum contents width for non viewport meta element sites.
2618
2619         * UIProcess/API/efl/ewk_settings.cpp:
2620         (ewk_settings_preferred_minimum_contents_width_set):
2621         (ewk_settings_preferred_minimum_contents_width_get):
2622         * UIProcess/API/efl/ewk_settings.h:
2623         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
2624         (TEST_F):
2625
2626 2012-11-07  Yael Aharon  <yael.aharon@intel.com>
2627
2628         [EFL][WK2][AC] Avoid creating an empty surface
2629         https://bugs.webkit.org/show_bug.cgi?id=101464
2630
2631         Reviewed by Kenneth Rohde Christiansen.
2632
2633         Make sure we have a valid view size before creating a GL surface.
2634
2635         * UIProcess/API/efl/ewk_view.cpp:
2636         (_ewk_view_smart_calculate):
2637
2638 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
2639
2640         [WK2][UNIX] Crash in WebKit::PluginProcessProxy::scanPlugin()
2641         https://bugs.webkit.org/show_bug.cgi?id=101446
2642
2643         Reviewed by Kenneth Rohde Christiansen.
2644
2645         Make sure that the disposition of the SIGCHLD signal is reset to the default
2646         before calling g_spawn_sync(). If the disposition is set to SIG_IGN, then
2647         g_spawn_sync() will not be able to return the exit status of the child
2648         process, our exit failure check will be useless and the following warning
2649         will be printed:
2650
2651         GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process
2652         was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received
2653         by waitpid(), so exit status can't be returned. This is a bug in the
2654         program calling g_spawn_sync(); either don't request the exit status, or
2655         don't set the SIGCHLD action.
2656
2657         This patch also adds a NULL-check for stdOut to avoid crashing in such
2658         case and makes use of String::split() to parse stdOut instead of doing it
2659         manually.
2660
2661         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2662         (WebKit::PluginProcessProxy::scanPlugin):
2663
2664 2012-11-07  Shinya Kawanaka  <shinyak@chromium.org>
2665
2666         [Shadow] Use setPseudo() instead of setShadowPseudoId().
2667         https://bugs.webkit.org/show_bug.cgi?id=101306
2668
2669         Reviewed by Kent Tamura.
2670
2671         Exposes necessary symbols.
2672
2673         * win/WebKit2.def:
2674         * win/WebKit2CFLite.def:
2675
2676 2012-11-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2677
2678         [EFL][WK2] Make EWK classes Ewk_Objects
2679         https://bugs.webkit.org/show_bug.cgi?id=101057
2680
2681         Reviewed by Kenneth Rohde Christiansen.
2682
2683         Now all the existing EWK classes share common Ewk_Object ref/unref API.
2684
2685         * UIProcess/API/efl/EwkViewCallbacks.h:
2686         * UIProcess/API/efl/EwkViewImpl.h:
2687         (EwkViewImpl):
2688         * UIProcess/API/efl/ewk_database_manager.cpp:
2689         (Ewk_Database_Manager::createOriginList):
2690         * UIProcess/API/efl/ewk_database_manager_private.h:
2691         * UIProcess/API/efl/ewk_file_chooser_request.cpp:
2692         (EwkFileChooserRequest::EwkFileChooserRequest):
2693         (EwkFileChooserRequest::~EwkFileChooserRequest):
2694         (EwkFileChooserRequest::allowMultipleFiles):
2695         (EwkFileChooserRequest::acceptedMIMETypes):
2696         (EwkFileChooserRequest::cancel):
2697         (EwkFileChooserRequest::chooseFiles):
2698         (ewk_file_chooser_request_allow_multiple_files_get):
2699         (ewk_file_chooser_request_accepted_mimetypes_get):
2700         (ewk_file_chooser_request_cancel):
2701         (ewk_file_chooser_request_files_choose):
2702         (ewk_file_chooser_request_file_choose):
2703         * UIProcess/API/efl/ewk_file_chooser_request.h:
2704         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
2705         (EwkFileChooserRequest):
2706         (EwkFileChooserRequest::create):
2707         * UIProcess/API/efl/ewk_form_submission_request.cpp:
2708         (EwkFormSubmissionRequest::EwkFormSubmissionRequest):
2709         (EwkFormSubmissionRequest::~EwkFormSubmissionRequest):
2710         (EwkFormSubmissionRequest::fieldValue):
2711         (EwkFormSubmissionRequest::fieldNames):
2712         (EwkFormSubmissionRequest::submit):
2713         (ewk_form_submission_request_field_names_get):
2714         (ewk_form_submission_request_field_value_get):
2715         (ewk_form_submission_request_submit):
2716         * UIProcess/API/efl/ewk_form_submission_request.h:
2717         * UIProcess/API/efl/ewk_form_submission_request_private.h:
2718         (EwkFormSubmissionRequest):
2719         (EwkFormSubmissionRequest::create):
2720         * UIProcess/API/efl/ewk_intent.cpp:
2721         (EwkIntent::EwkIntent):
2722         (EwkIntent::webIntentData):
2723         (EwkIntent::action):
2724         (EwkIntent::type):
2725         (EwkIntent::service):
2726         (EwkIntent::suggestions):
2727         (EwkIntent::extra):
2728         (EwkIntent::extraKeys):
2729         (ewk_intent_action_get):
2730         (ewk_intent_type_get):
2731         (ewk_intent_service_get):
2732         (ewk_intent_suggestions_get):
2733         (ewk_intent_extra_get):
2734         (ewk_intent_extra_names_get):
2735         * UIProcess/API/efl/ewk_intent.h:
2736         * UIProcess/API/efl/ewk_intent_private.h:
2737         (EwkIntent):
2738         (EwkIntent::create):
2739         * UIProcess/API/efl/ewk_intent_service.cpp:
2740         (EwkIntentService::EwkIntentService):
2741         (EwkIntentService::action):
2742         (EwkIntentService::type):
2743         (EwkIntentService::href):
2744         (EwkIntentService::title):
2745         (EwkIntentService::disposition):
2746         (ewk_intent_service_action_get):
2747         (ewk_intent_service_type_get):
2748         (ewk_intent_service_href_get):
2749         (ewk_intent_service_title_get):
2750         (ewk_intent_service_disposition_get):
2751         * UIProcess/API/efl/ewk_intent_service.h:
2752         * UIProcess/API/efl/ewk_intent_service_private.h:
2753         (EwkIntentService):
2754         (EwkIntentService::create):
2755         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2756         (EwkNavigationPolicyDecision::EwkNavigationPolicyDecision):
2757         (EwkNavigationPolicyDecision::~EwkNavigationPolicyDecision):
2758         (EwkNavigationPolicyDecision::navigationType):
2759         (EwkNavigationPolicyDecision::mouseButton):
2760         (EwkNavigationPolicyDecision::modifiers):
2761         (EwkNavigationPolicyDecision::frameName):
2762         (EwkNavigationPolicyDecision::request):
2763         (EwkNavigationPolicyDecision::accept):
2764         (EwkNavigationPolicyDecision::reject):
2765         (EwkNavigationPolicyDecision::download):
2766         (ewk_navigation_policy_navigation_type_get):
2767         (ewk_navigation_policy_mouse_button_get):
2768         (ewk_navigation_policy_modifiers_get):
2769         (ewk_navigation_policy_frame_name_get):
2770         (ewk_navigation_policy_request_get):
2771         (ewk_navigation_policy_decision_accept):
2772         (ewk_navigation_policy_decision_reject):
2773         (ewk_navigation_policy_decision_download):
2774         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2775         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2776         (EwkNavigationPolicyDecision):
2777         (EwkNavigationPolicyDecision::create):
2778         * UIProcess/API/efl/ewk_resource.cpp:
2779         (EwkResource::EwkResource):
2780         (EwkResource::url):
2781         (EwkResource::isMainResource):
2782         (ewk_resource_url_get):
2783         (ewk_resource_main_resource_get):
2784         * UIProcess/API/efl/ewk_resource.h:
2785         * UIProcess/API/efl/ewk_resource_private.h:
2786         (EwkResource):
2787         (EwkResource::create):
2788         * UIProcess/API/efl/ewk_security_origin.cpp:
2789         (EwkSecurityOrigin::EwkSecurityOrigin):
2790         (EwkSecurityOrigin::host):
2791         (EwkSecurityOrigin::protocol):
2792         (EwkSecurityOrigin::port):
2793         (ewk_security_origin_host_get):
2794         (ewk_security_origin_protocol_get):
2795         (ewk_security_origin_port_get):
2796         * UIProcess/API/efl/ewk_security_origin.h:
2797         * UIProcess/API/efl/ewk_security_origin_private.h:
2798         (EwkSecurityOrigin):
2799         (EwkSecurityOrigin::create):
2800         * UIProcess/API/efl/ewk_storage_manager.cpp:
2801         (Ewk_Storage_Manager::createOriginList):
2802         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
2803         (EwkUrlSchemeRequest):
2804         * UIProcess/API/efl/ewk_view.cpp:
2805         (ewk_view_intent_deliver):
2806         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
2807         (onFileChooserRequest):
2808         (TEST_F):
2809         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
2810         (TEST_F):
2811         * UIProcess/efl/FormClientEfl.cpp:
2812         (WebKit::FormClientEfl::willSubmitForm):
2813         * UIProcess/efl/PageLoadClientEfl.cpp:
2814         (WebKit::PageLoadClientEfl::didReceiveIntentForFrame):
2815         (WebKit::PageLoadClientEfl::registerIntentServiceForFrame):
2816         * UIProcess/efl/PagePolicyClientEfl.cpp:
2817         (WebKit::PagePolicyClientEfl::decidePolicyForNavigationAction):
2818         (WebKit::PagePolicyClientEfl::decidePolicyForNewWindowAction):
2819         * UIProcess/efl/PageUIClientEfl.cpp:
2820         (WebKit::PageUIClientEfl::runOpenPanel):
2821         * UIProcess/efl/ResourceLoadClientEfl.cpp:
2822         (WebKit::ResourceLoadClientEfl::didInitiateLoadForResource):
2823         * UIProcess/efl/ResourceLoadClientEfl.h:
2824
2825 2012-11-07  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2826
2827         [WK2] Return earlier if a plugin snapshot cannot be created.
2828         https://bugs.webkit.org/show_bug.cgi?id=101445
2829
2830         Reviewed by Kenneth Rohde Christiansen.
2831
2832         Currently only the Mac port has support for creating snapshots of
2833         Netscape plugins. Return earlier in PluginProxy::snapshot() so
2834         that we do not pass a null handler to ShareableBitmap::create()
2835         and avoid crashing when running pixel tests with plugins.
2836
2837         * WebProcess/Plugins/PluginProxy.cpp:
2838         (WebKit::PluginProxy::snapshot):
2839
2840 2012-11-07  Kangil Han  <kangil.han@samsung.com>
2841
2842         [EFL][WK2] Change encoding detector API names
2843         https://bugs.webkit.org/show_bug.cgi?id=101450
2844
2845         Reviewed by Gyuyoung Kim.
2846
2847         To make settings API name consistent, we need to change two APIs with respect to encoding detector.
2848
2849         * UIProcess/API/efl/ewk_settings.cpp:
2850         (ewk_settings_encoding_detector_enabled_set):
2851         (ewk_settings_encoding_detector_enabled_get):
2852         * UIProcess/API/efl/ewk_settings.h:
2853         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
2854         (TEST_F):
2855
2856 2012-11-07  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2857
2858         WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
2859         https://bugs.webkit.org/show_bug.cgi?id=93611
2860
2861         Reviewed by Gyuyoung Kim.
2862
2863         When WebKitTestRunner turns on the spelling feature with the resetStateToConsistentValues() method,
2864         it happens that the WebProcess is still not launched (although it is already created).
2865         In this case, isValid() method returns false.
2866
2867         This fix sends a message to the WebProcess messages queue, and the message
2868         will be handled once the WebProcess is ready.
2869
2870         * Target.pri:
2871         Adds missing files to compile spellcheking feature for WebKit2-Qt
2872         to use WebKit C API from WKTextChecker.h.
2873
2874         * UIProcess/WebProcessProxy.cpp:
2875         (WebKit::WebProcessProxy::updateTextCheckerState):
2876         Uses canSendMessage() method instead of isValid() to check whether the message to
2877         the WebProcess can be sent.
2878
2879         * UIProcess/efl/TextCheckerEfl.cpp:
2880         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
2881         Calls TextChecker::setContinuousSpellCheckingEnabled which additionaly invokes the client's method.
2882         WK2-EFL settings for text checker (ewk_settings.cpp) set the default language (if it wasn't set earlier) to
2883         perform the spelling. It allows to pass the tests from editing/spelling directory.
2884
2885 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
2886
2887         Add replaceWithLiteral() method to WTF::String
2888         https://bugs.webkit.org/show_bug.cgi?id=101257
2889
2890         Reviewed by Benjamin Poulain.
2891
2892         Substitute String::replace() calls by String::replaceWithLiteral() where
2893         adequate, for efficiency.
2894
2895         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2896         (WebKit::makeURLString):
2897
2898 2012-11-06  Vivek Galatage  <vivekgalatage@gmail.com>
2899
2900         Move DrawingAreaImpl methods graphicsLayerFactory, setRootCompositingLayer & scheduleCompositingLayerSync under ACCELERATED_COMPOSITING
2901         https://bugs.webkit.org/show_bug.cgi?id=101427
2902
2903         Reviewed by Anders Carlsson.
2904
2905         Moving these methods under the ACCELERATED_COMPOSITING flag.
2906         This fixes broken wincairo due to use of override specifier.
2907
2908         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2909         (WebKit):
2910         * WebProcess/WebPage/DrawingAreaImpl.h:
2911         (DrawingAreaImpl):
2912
2913 2012-11-06  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2914
2915         [EFL][WK2] API test crash with accelerated compositing on.
2916         https://bugs.webkit.org/show_bug.cgi?id=101384
2917
2918         Reviewed by Gyuyoung Kim.
2919
2920         If accelerated compositing is enabled API tests should create GL evas engine
2921         instead of default one.
2922         Also, in API tests first window resize and display often comes earlier
2923         than enterAcceleratedCompositingMode call, so let's create GL surface in
2924         _ewk_view_smart_calculate on first window resize.
2925
2926         * UIProcess/API/efl/ewk_view.cpp:
2927         (_ewk_view_smart_calculate):
2928         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2929         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
2930
2931 2012-11-06  Anders Carlsson  <andersca@apple.com>
2932
2933         Update Java related WKSI function names
2934         https://bugs.webkit.org/show_bug.cgi?id=101414
2935
2936         Reviewed by Sam Weinig.
2937
2938         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2939         (WebKit::PluginInfoStore::shouldUsePlugin):
2940         (WebKit::PluginInfoStore::policyForPlugin):
2941         (WebKit::PluginInfoStore::reactivateInactivePlugin):
2942
2943 2012-11-06  Kiran Muppala  <cmuppala@apple.com>
2944
2945         Add application occlusion criterion to enable/disable process suppression on Mac
2946         https://bugs.webkit.org/show_bug.cgi?id=100997
2947
2948         Reviewed by Alexey Proskuryakov.
2949
2950         Provide support for enabling and disabling process suppression when application is completely occluded on Mac.
2951
2952         * NetworkProcess/NetworkProcess.messages.in: Added message to update application occlusion status.
2953         * NetworkProcess/mac/NetworkProcessMainMac.mm:
2954         (WebKit::NetworkProcessMain): Removed call to take process suppression assertion since ChildProcess
2955         takes one on constrution.
2956         * PluginProcess/PluginProcess.messages.in: Added message to update application occlusion status.
2957         * PluginProcess/mac/PluginProcessMainMac.mm:
2958         (WebKit::PluginProcessMain): Removed call to take process suppression assertion since ChildProcess
2959         takes one on construction.
2960         * Shared/ChildProcess.cpp:
2961         (WebKit::ChildProcess::ChildProcess): Take process suppression assertion on construction.
2962         * Shared/ChildProcess.h:
2963         (WebKit::ChildProcess::applicationIsOccluded):
2964         * Shared/mac/ChildProcessMac.mm: Added.
2965         (WebKit::ChildProcess::setApplicationIsOccluded): Release process suppression assertion if application
2966         becomes occluded or take a new assertion if application becomes visible.
2967         (WebKit::ChildProcess::disableProcessSuppression):
2968         (WebKit::ChildProcess::enableProcessSuppression):
2969         Helper methods to take and release process suppression assertion.
2970         * SharedWorkerProcess/SharedWorkerProcess.messages.in: Added message to update application occlusion status.
2971         * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm:
2972         (WebKit::SharedWorkerProcessMain): Removed call to take process suppression assertion since ChildProcess
2973         takes one on construction.
2974         * UIProcess/Network/NetworkProcessManager.h:
2975         * UIProcess/Network/NetworkProcessProxy.cpp:
2976         (WebKit::NetworkProcessProxy::didFinishLaunching): Update application occlusion status post launch.
2977         * UIProcess/Network/NetworkProcessProxy.h:
2978         (WebKit::NetworkProcessProxy::isValid):
2979         * UIProcess/Network/mac/NetworkProcessManagerMac.mm: Added.
2980         (WebKit::NetworkProcessManager::setApplicationIsOccluded):
2981         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2982         (WebKit::NetworkProcessProxy::setApplicationIsOccluded):
2983         * UIProcess/Plugins/PluginProcessManager.h:
2984         * UIProcess/Plugins/PluginProcessProxy.cpp:
2985         (WebKit::PluginProcessProxy::didFinishLaunching): Update application occlusion status post launch.
2986         * UIProcess/Plugins/PluginProcessProxy.h:
2987         (WebKit::PluginProcessProxy::isValid):
2988         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: Added.
2989         (WebKit::PluginProcessManager::setApplicationIsOccluded):
2990         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2991         (WebKit::PluginProcessProxy::setApplicationIsOccluded):
2992         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
2993         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
2994         (WebKit::SharedWorkerProcessProxy::didFinishLaunching): Update application occlusion status post launch.
2995         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
2996         (WebKit::SharedWorkerProcessProxy::isValid):
2997         * UIProcess/SharedWorkers/mac/SharedWorkerProcessManagerMac.mm: Added.
2998         (WebKit::SharedWorkerProcessManager::setApplicationIsOccluded):
2999         * UIProcess/SharedWorkers/mac/SharedWorkerProcessProxyMac.mm: Added.
3000         (WebKit::SharedWorkerProcessProxy::setApplicationIsOccluded):
3001         * UIProcess/WebContext.cpp:
3002         (WebKit::WebContext::create): Added call to initialize process suppression support.
3003         * UIProcess/WebContext.h:
3004         (WebKit::WebContext::applicationIsOccluded):
3005         * UIProcess/WebProcessProxy.cpp:
3006         (WebKit::WebProcessProxy::didFinishLaunching): Update application occlusion status post launch.
3007         * UIProcess/mac/WebContextMac.mm:
3008         (WebKit::WebContext::applicationBecameVisible):
3009         (WebKit::WebContext::applicationBecameOccluded):
3010         Notification handlers for informing non UI WebKit2 processes of changes to application occlusion state.
3011         (WebKit::WebContext::registerOcclusionNotificationHandlers):
3012         (WebKit::WebContext::initializeProcessSuppressionSupport):
3013         Helper method to register occlusion notification handlers if process suppression support is enabled.
3014         * WebKit2.xcodeproj/project.pbxproj:
3015         * WebProcess/WebProcess.messages.in: Added message to update application occlusion status.
3016         * WebProcess/mac/WebProcessInitialization.mm:
3017         (WebKit::InitializeWebProcess): Removed call to take process supression assertion since ChildProcess
3018         takes one on construction.
3019
3020 2012-11-06  Alexey Proskuryakov  <ap@apple.com>
3021
3022         Clean up which storage cookie jar functions use
3023         https://bugs.webkit.org/show_bug.cgi?id=101395
3024
3025         Reviewed by Brady Eidson.
3026
3027         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
3028         Updated for two new functions.
3029
3030 2012-11-06  Jihye Kang  <jye.kang@samsung.com>
3031
3032         [EFL][WK2] Add ewk_database_manager APIs
3033         https://bugs.webkit.org/show_bug.cgi?id=101193
3034
3035         Reviewed by Gyuyoung Kim.
3036
3037         Add ewk_database_manager to manage web database and
3038         ewk_database_manaager_origins_get to get origins list of web storage.
3039         Add unit tests for ewk_database_manager APIs.
3040
3041         * PlatformEfl.cmake:
3042         * UIProcess/API/efl/ewk_context.cpp:
3043         (Ewk_Context::Ewk_Context):
3044         (Ewk_Context::databaseManager):
3045         (ewk_context_database_manager_get):
3046         * UIProcess/API/efl/ewk_context.h:
3047         * UIProcess/API/efl/ewk_context_private.h:
3048         (Ewk_Context):
3049         * UIProcess/API/efl/ewk_database_manager.cpp: Added.
3050         (Ewk_Database_Manager::Ewk_Database_Manager):
3051         (Ewk_Database_Manager::getDatabaseOrigins):
3052         (Ewk_Database_Manager::createOriginList):
3053         (Ewk_Database_Origins_Async_Get_Context):
3054         (Ewk_Database_Origins_Async_Get_Context::Ewk_Database_Origins_Async_Get_Context):
3055         (getDatabaseOriginsCallback):
3056         (ewk_database_manager_origins_get):
3057         * UIProcess/API/efl/ewk_database_manager.h: Added.
3058         * UIProcess/API/efl/ewk_database_manager_private.h: Added.
3059         (Ewk_Database_Manager):
3060         (Ewk_Database_Manager::create):
3061         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3062         (TEST_F):
3063         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Added.
3064         (OriginData):
3065         (OriginData::OriginData):
3066         (getDatabaseOriginsCallback):
3067         (timerCallback):
3068         (TEST_F):
3069
3070 2012-11-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3071
3072         [EFL][WK2] Refactor Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job to be Ewk_Objects
3073         https://bugs.webkit.org/show_bug.cgi?id=101383
3074
3075         Reviewed by Kenneth Rohde Christiansen.
3076
3077         Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job are Ewk_Objects now.
3078
3079         * UIProcess/API/efl/EwkViewCallbacks.h:
3080         * UIProcess/API/efl/EwkViewImpl.h:
3081         * UIProcess/API/efl/ewk_auth_request.cpp:
3082         (EwkAuthRequest::EwkAuthRequest):
3083         (EwkAuthRequest::~EwkAuthRequest):
3084         (EwkAuthRequest::suggestedUsername):
3085         (EwkAuthRequest::realm):
3086         (EwkAuthRequest::host):
3087         (EwkAuthRequest::continueWithoutCredential):
3088         (EwkAuthRequest::authenticate):
3089         (EwkAuthRequest::isRetrying):
3090         (ewk_auth_request_suggested_username_get):
3091         (ewk_auth_request_cancel):
3092         (ewk_auth_request_authenticate):
3093         (ewk_auth_request_retrying_get):
3094         (ewk_auth_request_realm_get):
3095         (ewk_auth_request_host_get):
3096         * UIProcess/API/efl/ewk_auth_request.h:
3097         * UIProcess/API/efl/ewk_auth_request_private.h:
3098         (EwkAuthRequest):
3099         (EwkAuthRequest::create):
3100         * UIProcess/API/efl/ewk_back_forward_list.h:
3101         * UIProcess/API/efl/ewk_context_private.h:
3102         (EwkContext):
3103         * UIProcess/API/efl/ewk_download_job.cpp:
3104         (EwkDownloadJob::EwkDownloadJob):
3105         (EwkDownloadJob::id):
3106         (EwkDownloadJob::viewImpl):
3107         (ewk_download_job_state_get):
3108         (EwkDownloadJob::state):
3109         (ewk_download_job_request_get):
3110         (EwkDownloadJob::request):
3111         (ewk_download_job_response_get):
3112         (EwkDownloadJob::response):
3113         (ewk_download_job_destination_get):
3114         (EwkDownloadJob::destination):
3115         (ewk_download_job_destination_set):
3116         (EwkDownloadJob::setDestination):
3117         (ewk_download_job_suggested_filename_get):
3118         (EwkDownloadJob::suggestedFileName):
3119         (ewk_download_job_cancel):
3120         (EwkDownloadJob::cancel):
3121         (ewk_download_job_estimated_progress_get):
3122         (EwkDownloadJob::estimatedProgress):
3123         (ewk_download_job_elapsed_time_get):
3124         (EwkDownloadJob::elapsedTime):
3125         (EwkDownloadJob::setResponse):
3126         (EwkDownloadJob::setSuggestedFileName):
3127         (EwkDownloadJob::incrementReceivedData):
3128         (EwkDownloadJob::setState):
3129         * UIProcess/API/efl/ewk_download_job.h:
3130         * UIProcess/API/efl/ewk_download_job_private.h:
3131         (EwkDownloadJob):
3132         (EwkDownloadJob::create):
3133         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
3134         (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
3135         (EwkUrlSchemeRequest::id):
3136         (EwkUrlSchemeRequest::url):
3137         (EwkUrlSchemeRequest::scheme):
3138         (EwkUrlSchemeRequest::path):
3139         (EwkUrlSchemeRequest::finish):
3140         (ewk_url_scheme_request_scheme_get):
3141         (ewk_url_scheme_request_url_get):
3142         (ewk_url_scheme_request_path_get):
3143         (ewk_url_scheme_request_finish):
3144         * UIProcess/API/efl/ewk_url_scheme_request.h:
3145         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
3146         (EwkUrlSchemeRequest):
3147         (EwkUrlSchemeRequest::create):
3148         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
3149         (onAuthenticationRequest):
3150         (TEST_F):
3151         * UIProcess/efl/DownloadManagerEfl.cpp:
3152         (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
3153         (WebKit::DownloadManagerEfl::didReceiveResponse):
3154         (WebKit::DownloadManagerEfl::didCreateDestination):
3155         (WebKit::DownloadManagerEfl::didReceiveData):
3156         (WebKit::DownloadManagerEfl::didFail):
3157         (WebKit::DownloadManagerEfl::didCancel):
3158         (WebKit::DownloadManagerEfl::didFinish):
3159         (WebKit::DownloadManagerEfl::registerDownload):
3160         (WebKit::DownloadManagerEfl::downloadJob):
3161         * UIProcess/efl/DownloadManagerEfl.h:
3162         (DownloadManagerEfl):
3163         * UIProcess/efl/PageLoadClientEfl.cpp:
3164         (WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame):
3165         * UIProcess/efl/RequestManagerClientEfl.cpp:
3166         (WebKit::RequestManagerClientEfl::didReceiveURIRequest):
3167
3168 2012-11-06  Yael Aharon  <yael.aharon@intel.com>
3169
3170         [WK2] Wrong scroll position when going back in history
3171         https://bugs.webkit.org/show_bug.cgi?id=101358
3172
3173         Reviewed by Kenneth Rohde Christiansen.
3174
3175         Reset the contentsSize after a new load was committed. We should not continue
3176         to use the contentsSize of the previous page in any calculation.
3177
3178         * UIProcess/PageViewportController.cpp:
3179         (WebKit::PageViewportController::didCommitLoad):
3180
3181 2012-11-06  Christophe Dumez  <christophe.dumez@intel.com>
3182
3183         [EFL][WK2] Declare all smart callbacks in EwkViewCallbacks.h
3184         https://bugs.webkit.org/show_bug.cgi?id=101360
3185
3186         Reviewed by Kenneth Rohde Christiansen.
3187
3188         Declare all EwkView smart callbacks in EwkViewCallbacks.h
3189         and remove remaining calls to evas_object_smart_callback_call().
3190         It is a good idea to have all the callbacks declared in one
3191         place for convenience and consistency. We also have better
3192         argument type checking if we use the new callback mechanism.
3193
3194         * UIProcess/API/efl/EwkViewCallbacks.h:
3195         (EwkViewCallbacks::CallBack::call):
3196         (CallBack):
3197         (EwkViewCallbacks):
3198         * UIProcess/API/efl/EwkViewImpl.cpp:
3199         (EwkViewImpl::informIconChange):
3200         (EwkViewImpl::informURLChange):
3201         (EwkViewImpl::createNewPage):
3202         (EwkViewImpl::closePage):
3203
3204 2012-11-05  Anders Carlsson  <andersca@apple.com>
3205
3206         Hook up the remote layer tree drawing area to an environment variable
3207         https://bugs.webkit.org/show_bug.cgi?id=101267
3208
3209         Reviewed by Andreas Kling.
3210
3211         * UIProcess/API/mac/WKView.mm:
3212         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3213         (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
3214         (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
3215
3216 2012-11-06  Andras Becsi  <andras.becsi@digia.com>
3217
3218         [Qt][WK2] Fit-to-width broken on pages with viewport meta tag
3219         https://bugs.webkit.org/show_bug.cgi?id=99715
3220
3221         Reviewed by Jocelyn Turcotte.
3222
3223         The initial scale from the viewport attributes should only
3224         be applied if the scale was explicitly specified in the
3225         viewport meta tag.
3226         If the initial scale is auto it should be calculated using
3227         the final contents size, which might be larger than the
3228         layout size, so that the content fits horizontally into
3229         the view.
3230
3231         Also add QML unit tests that cover this functionality.
3232
3233         * UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml:
3234         * UIProcess/API/qt/tests/qmltests/common/test5.html: Added.
3235         * UIProcess/PageViewportController.cpp:
3236         (WebKit::PageViewportController::PageViewportController):
3237         (WebKit::PageViewportController::pageTransitionViewportReady):
3238
3239 2012-11-06  Huang Dongsung  <luxtella@company100.net>
3240
3241         Coordinated Graphics: Remove a parent member in WebLayerInfo.
3242         https://bugs.webkit.org/show_bug.cgi?id=101142
3243
3244         Reviewed by Noam Rosenthal.
3245
3246         The parent member is not used in UI Process, and GraphicsLayer::setParent is
3247         internally used only, so we don't need to send the parent layer id to UI Process.
3248
3249         * Shared/WebLayerTreeInfo.h:
3250         (WebKit::WebLayerInfo::WebLayerInfo):
3251         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3252         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
3253
3254 2012-11-06  Huang Dongsung  <luxtella@company100.net>
3255
3256         Coordinated Graphics: Remove two methods' virtual modifiers in CoordinatedGraphicsLayer.
3257         https://bugs.webkit.org/show_bug.cgi?id=101141
3258
3259         Reviewed by Noam Rosenthal.
3260
3261         The methods exist for only CoordinatedGraphicsLayer and we have no plan to
3262         extend CoordinatedGraphicsLayer.
3263
3264         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
3265         (CoordinatedGraphicsLayer):
3266
3267 2012-11-06  Balazs Kelemen  <kbalazs@webkit.org>
3268
3269         [CoordinatedGraphics] Access to LayerTreeRenderer::m_renderQueue should be thread safe
3270         https://bugs.webkit.org/show_bug.cgi?id=101341
3271
3272         Reviewed by Noam Rosenthal.
3273
3274         The queue can be accessed from public API so we should make
3275         sure it is not updated concurrently with a threaded render loop.
3276
3277         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3278         (WebKit::LayerTreeRenderer::syncRemoteContent):
3279         (WebKit::LayerTreeRenderer::appendUpdate):
3280         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
3281         (LayerTreeRenderer):
3282
3283 2012-11-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3284
3285         [EFL][WK2] Make Ewk_Context Ewk_Object
3286         https://bugs.webkit.org/show_bug.cgi?id=101322
3287
3288         Reviewed by Kenneth Rohde Christiansen.
3289
3290         Ewk_Context is Ewk_Object now and using common ref/unref API.
3291
3292         * UIProcess/API/efl/EwkViewImpl.cpp:
3293         (EwkViewImpl::EwkViewImpl):
3294         * UIProcess/API/efl/EwkViewImpl.h:
3295         (EwkViewImpl::ewkContext):
3296         (EwkViewImpl):
3297         * UIProcess/API/efl/ewk_context.cpp:
3298         (EwkContext::EwkContext):
3299         (EwkContext::~EwkContext):
3300         (EwkContext::create):
3301         (EwkContext::defaultContext):
3302         (EwkContext::cookieManager):
3303         (EwkContext::ensureFaviconDatabase):
3304         (EwkContext::setFaviconDatabaseDirectoryPath):
3305         (EwkContext::faviconDatabase):
3306         (EwkContext::storageManager):
3307         (EwkContext::requestManager):
3308         (EwkContext::vibrationProvider):
3309         (EwkContext::addVisitedLink):
3310         (EwkContext::setCacheModel):
3311         (EwkContext::cacheModel):
3312         (ewk_context_cookie_manager_get):
3313         (ewk_context_favicon_database_directory_set):
3314         (ewk_context_favicon_database_get):
3315         (ewk_context_storage_manager_get):
3316         (EwkContext::wkContext):
3317         (EwkContext::downloadManager):
3318         (EwkContext::historyClient):
3319         (ewk_context_default_get):
3320         (ewk_context_new):
3321         (ewk_context_new_with_injected_bundle_path):
3322         (ewk_context_url_scheme_register):
3323         (ewk_context_vibration_client_callbacks_set):
3324         (ewk_context_history_callbacks_set):
3325         (ewk_context_visited_link_add):
3326         (ewk_context_cache_model_set):
3327         (ewk_context_cache_model_get):
3328         * UIProcess/API/efl/ewk_context.h:
3329         * UIProcess/API/efl/ewk_context_private.h:
3330         (EwkContext):
3331         * UIProcess/API/efl/ewk_view.cpp:
3332         (createEwkView):
3333         (ewk_view_base_add):
3334         (ewk_view_smart_add):
3335         (ewk_view_add_with_context):
3336         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3337         (TEST_F):
3338         * UIProcess/efl/DownloadManagerEfl.cpp:
3339         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
3340         * UIProcess/efl/DownloadManagerEfl.h:
3341         (WebKit::DownloadManagerEfl::create):
3342         (DownloadManagerEfl):
3343         * UIProcess/efl/PageClientBase.cpp:
3344         (WebKit::PageClientBase::handleDownloadRequest):
3345         * UIProcess/efl/RequestManagerClientEfl.cpp:
3346         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
3347         * UIProcess/efl/RequestManagerClientEfl.h:
3348         (WebKit::RequestManagerClientEfl::create):
3349         (RequestManagerClientEfl):
3350
3351 2012-11-06  Balazs Kelemen  <kbalazs@webkit.org>
3352
3353         [CoordinatedGraphics] compositing/iframes/connect-compositing-iframe.html crashes
3354         https://bugs.webkit.org/show_bug.cgi?id=101232
3355
3356         Reviewed by Jocelyn Turcotte.
3357
3358         The crash is happening in CoordinatedGraphicsLayer::flushCompositingState
3359         because we dereferencing a null m_coordinatedGraphicsLayerClient.
3360         This happens when the root layer became composited because it has content overlapping
3361         with an inner iframe that is composited. In this case the RenderLayerCompositor attaches
3362         the layer with RootLayerAttachedViaEnclosingFrame attachment flag and do not call
3363         ChromeClient::attachRootGraphcisLayer so we don't have a chance to set m_coordinatedGraphicsLayerClient.
3364         The solution is to set the client early in the factory method.
3365
3366         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
3367         (WebKit::LayerTreeCoordinator::createGraphicsLayer):
3368
3369 2012-11-06  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
3370
3371         [EFL] [WK2] Random crash in Minibrowser
3372         https://bugs.webkit.org/show_bug.cgi?id=101241
3373
3374         Reviewed by Gyuyoung Kim.
3375
3376         Do not clear GL context and GL surface in exitAcceleratedCompositing.
3377
3378         * UIProcess/API/efl/EwkViewImpl.cpp:
3379         (EwkViewImpl::createGLSurface):
3380         (EwkViewImpl::enterAcceleratedCompositingMode):
3381         (EwkViewImpl::exitAcceleratedCompositingMode):
3382
3383 2012-11-05  Sam Weinig  <sam@webkit.org>
3384
3385         Need a way to send and receive messages between the WKWebProcessPlugIn object and the client
3386         https://bugs.webkit.org/show_bug.cgi?id=101282
3387
3388         Reviewed by Anders Carlsson.
3389
3390         API wise, this adds:
3391             - A connection property on the WKWebProcessPlugInController
3392             - A method to send messages across a WKConnection (sendMessageWithName:body).
3393
3394         It also implements message sending and receiving for WKConnection. Message bodies are currently
3395         restricted to being object graphs with values that are property list types, but in the future, should
3396         support all types conforming to the NSSecureCoding protocol.
3397
3398         * Shared/WebConnection.cpp:
3399         (WebKit::WebConnection::postMessage):
3400         (WebKit::WebConnection::handleMessage):
3401         * Shared/WebConnection.h:
3402         (WebConnection):
3403         * Shared/WebConnection.messages.in:
3404         Switch HandleMessage to be a variadic message to avoid an extra copy and support attachments correctly.
3405
3406         * Shared/mac/ArgumentCodersMac.h:
3407         * Shared/mac/ArgumentCodersMac.mm:
3408         (CoreIPC::typeFromObject):
3409         (CoreIPC::encode):
3410         (CoreIPC::decode):
3411         Add support for encoding/decoding NSArray, NSDate and NSData.
3412
3413         * UIProcess/API/mac/WKConnection.h:
3414         * UIProcess/API/mac/WKConnection.mm:
3415         (-[WKConnection sendMessageWithName:body:]):
3416         (didReceiveMessage):
3417         Implement message sending and receiving.
3418
3419         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
3420         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3421         (-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundleRef:]):
3422         (-[WKWebProcessPlugInController connection]):
3423         Add a wrapper for the WKConnectionRef vended via WKBundleGetApplicationConnection() and expose it as
3424         API on the WKWebProcessPlugInController.
3425
3426 2012-11-05  Jinwoo Song  <jinwoo7.song@samsung.com>
3427
3428         [EFL][WK2] Fix wrong coding style in the boilerplates
3429         https://bugs.webkit.org/show_bug.cgi?id=101283
3430
3431         Reviewed by Gyuyoung Kim.
3432
3433         Fix boilerplate which have wrong coding style.
3434
3435         * UIProcess/efl/InputMethodContextEfl.cpp:
3436         * UIProcess/efl/InputMethodContextEfl.h:
3437         * UIProcess/efl/PageClientDefaultImpl.cpp:
3438         * UIProcess/efl/PageClientDefaultImpl.h:
3439         * UIProcess/efl/PageClientLegacyImpl.cpp:
3440         * UIProcess/efl/PageClientLegacyImpl.h:
3441
3442 2012-11-05  KyungTae Kim  <ktf.kim@samsung.com>
3443
3444         [EFL][WK2] Fix build warning in PageClientLegacyImpl.cpp
3445         https://bugs.webkit.org/show_bug.cgi?id=101266
3446
3447         Reviewed by Laszlo Gombos.
3448
3449         The 'size' is not used when !USE(TILED_BACKING_STORE)
3450         Use UNUSED_PARAM macro for removing -Wunused-parameter warning
3451
3452         * UIProcess/efl/PageClientLegacyImpl.cpp:
3453         (WebKit::PageClientLegacyImpl::updateViewportSize):
3454
3455 2012-11-05  Anders Carlsson  <andersca@apple.com>
3456
3457         Begin stubbing out the new remote layer tree drawing area
3458         https://bugs.webkit.org/show_bug.cgi?id=101256
3459