Mass remove all the empty directories
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
2
3         Mass remove all the empty directories
4
5         Rubberstamped by Ryosuke Niwa.
6
7         * Platform/CoreIPC/gtk: Removed.
8         * Platform/CoreIPC/qt: Removed.
9         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Removed.
10         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Removed.
11         * PluginProcess/gtk: Removed.
12         * Shared/API/c/win: Removed.
13         * Shared/Plugins/Netscape/win: Removed.
14         * Shared/cg/win: Removed.
15         * Shared/win: Removed.
16         * UIProcess/API/C/win: Removed.
17         * UIProcess/API/gtk/webkit: Removed.
18         * UIProcess/Launcher/win: Removed.
19         * UIProcess/Plugins/gtk: Removed.
20         * UIProcess/Plugins/win: Removed.
21         * UIProcess/texmap: Removed.
22         * UIProcess/win: Removed.
23         * WebProcess/Authentication/mac: Removed.
24         * WebProcess/Cookies/efl: Removed.
25         * WebProcess/Cookies/gtk: Removed.
26         * WebProcess/Downloads/cf/win: Removed.
27         * WebProcess/Downloads/cfnet: Removed.
28         * WebProcess/Downloads/curl: Removed.
29         * WebProcess/Downloads/efl: Removed.
30         * WebProcess/Downloads/gtk: Removed.
31         * WebProcess/Downloads/mac: Removed.
32         * WebProcess/Downloads/qt: Removed.
33         * WebProcess/Downloads/soup: Removed.
34         * WebProcess/FullScreen/gtk: Removed.
35         * WebProcess/FullScreen/mac: Removed.
36         * WebProcess/FullScreen/qt: Removed.
37         * WebProcess/FullScreen/win: Removed.
38         * WebProcess/InjectedBundle/API/c/win: Removed.
39         * WebProcess/InjectedBundle/win: Removed.
40         * WebProcess/KeyValueStorage: Removed.
41         * WebProcess/Network/CustomProtocols/mac: Removed.
42         * WebProcess/Plugins/Netscape/gtk: Removed.
43         * WebProcess/Plugins/Netscape/win: Removed.
44         * WebProcess/WebCoreSupport/win: Removed.
45         * WebProcess/WebPage/LayerTreeCoordinator: Removed.
46         * WebProcess/WebPage/ca/mac: Removed.
47         * WebProcess/WebPage/ca/win: Removed.
48         * WebProcess/WebPage/win: Removed.
49         * WebProcess/win: Removed.
50         * qt/Resources: Removed.
51
52 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
53
54         [CMAKE] Build fix after r148147, r148148
55         https://bugs.webkit.org/show_bug.cgi?id=114395
56
57         Unreviewed build fix.
58
59         Use StorageAreaImpl, StorageNamespaceImpl instead of StorageAreaProxy, StorageNamespaceProxy.
60
61         * CMakeLists.txt:
62
63 2013-04-10  Anders Carlsson  <andersca@apple.com>
64
65         Add a stubbed out StorageAreaMap class
66         https://bugs.webkit.org/show_bug.cgi?id=114392
67
68         Reviewed by Andreas Kling.
69
70         The intention is that StorageAreaMap is going to take over responsibility for storing the storage values in the
71         web process, as well as dispatching events. A StorageAreaMap will be shared between multiple StorageAreaImpl objects,
72         for example if multiple frames with the same origin use local storage.
73
74         * DerivedSources.make:
75         * UIProcess/Storage/StorageManager.cpp:
76         (WebKit::StorageManager::StorageArea::dispatchEvents):
77         (WebKit::StorageManager::setItem):
78         * WebKit2.xcodeproj/project.pbxproj:
79         * WebProcess/Storage/StorageAreaImpl.cpp:
80         (WebKit::StorageAreaImpl::StorageAreaImpl):
81         (WebKit::StorageAreaImpl::~StorageAreaImpl):
82         * WebProcess/Storage/StorageAreaMap.cpp: Added.
83         (WebKit):
84         (WebKit::StorageAreaMap::create):
85         (WebKit::StorageAreaMap::StorageAreaMap):
86         (WebKit::StorageAreaMap::~StorageAreaMap):
87         (WebKit::StorageAreaMap::didSetItem):
88         (WebKit::StorageAreaMap::dispatchStorageEvent):
89         * WebProcess/Storage/StorageAreaMap.h: Added.
90         (WebKit):
91         (StorageAreaMap):
92         * WebProcess/Storage/StorageAreaMap.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaImpl.messages.in.
93
94 2013-04-10  Anders Carlsson  <andersca@apple.com>
95
96         Rename StorageAreaProxy to StorageAreaImpl.
97
98         Rubber-stamped by Beth Dakin.
99
100         * DerivedSources.make:
101         * UIProcess/Storage/StorageManager.cpp:
102         (WebKit::StorageManager::StorageArea::dispatchEvents):
103         (WebKit::StorageManager::setItem):
104         * WebKit2.xcodeproj/project.pbxproj:
105         * WebProcess/Storage/StorageAreaImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp.
106         * WebProcess/Storage/StorageAreaImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h.
107         * WebProcess/Storage/StorageAreaImpl.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.messages.in.
108         * WebProcess/Storage/StorageNamespaceImpl.cpp:
109         (WebKit::StorageNamespaceImpl::storageArea):
110         * WebProcess/Storage/StorageNamespaceImpl.h:
111         (WebKit):
112         (StorageNamespaceImpl):
113
114 2013-04-10  Anders Carlsson  <andersca@apple.com>
115
116         Rename StorageNamespaceProxy to StorageNamespaceImpl.
117
118         Rubber-stamped by Beth Dakin.
119
120         * WebKit2.xcodeproj/project.pbxproj:
121         * WebProcess/Storage/StorageAreaProxy.cpp:
122         (WebKit::StorageAreaProxy::create):
123         (WebKit::StorageAreaProxy::StorageAreaProxy):
124         * WebProcess/Storage/StorageAreaProxy.h:
125         (StorageAreaProxy):
126         * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp.
127         * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h.
128         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
129         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
130
131 2013-04-10  Tim Horton  <timothy_horton@apple.com>
132
133         [wk2] Un-pollute TCADA methods with "PageOverlayLayerMap::iterator end"
134         https://bugs.webkit.org/show_bug.cgi?id=114387
135
136         Reviewed by Simon Fraser.
137
138         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
139         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
140         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
141         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
142         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
143         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
144         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
145         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
146
147 2013-04-10  Tim Horton  <timothy_horton@apple.com>
148
149         [wk2] REGRESSION: Find highlight does not update when the view is resized
150         https://bugs.webkit.org/show_bug.cgi?id=114382
151         <rdar://problem/13599797>
152
153         Reviewed by Simon Fraser.
154
155         Invalidate the page overlays from TiledCoreAnimationDrawingArea::updateGeometry.
156         This will have no effect if the page overlay hasn't previously asked to be painted
157         (as drawsContent will remain false on the layer).
158
159         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
160         (TiledCoreAnimationDrawingArea): Add invalidateAllPageOverlays.
161         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
162         (WebKit::TiledCoreAnimationDrawingArea::invalidateAllPageOverlays): Factor this out of didChangeScrollOffsetForAnyFrame.
163         (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Call invalidateAllPageOverlays.
164         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Call invalidateAllPageOverlays.
165
166 2013-04-10  Beth Dakin  <bdakin@apple.com>
167
168         FindBanner matches are offset when the WKView has a header or footer
169         https://bugs.webkit.org/show_bug.cgi?id=114314
170         -and corresponding-
171         <rdar://problem/13522434>
172
173         Reviewed by Simon Fraser.
174
175         When calculating the matching rects, also adjust to the scroll offset that is  
176         relative to the Document.
177         * WebProcess/WebPage/FindController.cpp:
178         (WebKit::FindController::rectsForTextMatches):
179
180 2013-04-10  Tobias Mueller  <tobiasmue@gnome.org>
181
182         Fixed build failure in Plugin.h: FloatPoint was not in namespace WebCore
183
184         make[1]: *** Waiting for unfinished jobs....
185         In file included from Source/WebKit2/PluginProcess/PluginCreationParameters.h:31:0,
186                          from Source/WebKit2/PluginProcess/PluginCreationParameters.cpp:27:
187         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:58: error: 'FloatPoint' in namespace 'WebCore' does not name a type
188         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:77: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
189         cc1plus: warning: unrecognized command line option "-Wno-c++11-extensions" [enabled by default]
190         make[1]: *** [Source/WebKit2/PluginProcess/libwebkit2gtk_3_0_la-PluginCreationParameters.lo] Error 1
191
192         It now passes that make target.
193
194         https://bugs.webkit.org/show_bug.cgi?id=111862
195
196         Reviewed by Darin Adler.
197
198         * WebProcess/Plugins/Plugin.h:
199         (WebCore): Added FloatPoint to the WebCore namespace
200
201 2013-04-08  Anders Carlsson  <andersca@apple.com>
202
203         Remove unneeded headers from FrameLoader.h
204         https://bugs.webkit.org/show_bug.cgi?id=114223
205
206         Reviewed by Geoffrey Garen.
207
208         Include HistoryController.h from WebCore.
209
210         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
211         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
212         * WebProcess/WebPage/WebPage.cpp:
213
214 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
215
216         Removed bitrotted TimeoutChecker code
217         https://bugs.webkit.org/show_bug.cgi?id=114336
218
219         Reviewed by Alexey Proskuryakov.
220
221         This mechanism hasn't worked for a while.
222
223         MarkL is working on a new version of this feature with a distinct
224         implementation.
225
226         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
227         (WebKit::NPJSObject::construct):
228         (WebKit::NPJSObject::invoke):
229         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
230         (WebKit::NPRuntimeObjectMap::evaluate):
231
232 2013-04-09  Mark Rowe  <mrowe@apple.com>
233
234         <rdar://problem/13617144> WKNavigationData needs to expose the destination of the navigation
235
236         Introduce WKNavigationDataCopyNavigationDestinationURL to access the destination of the navigation.
237
238         Reviewed by Dan Bernstein.
239
240         * UIProcess/API/C/WKNavigationData.cpp:
241         (WKNavigationDataCopyURL): Add a note about returning the URL from the original request for sake of
242         backwards-compatibility.
243         (WKNavigationDataCopyNavigationDestinationURL): Return the URL from our underlying WebNavigationDataStore.
244         * UIProcess/API/C/WKNavigationData.h:
245         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
246         (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the current URL in to the WebNavigationDataStore
247         object. WKNavigationData can retrieve the value that we were previously storing here via the originalRequest.
248
249 2013-04-09  Mark Rowe  <mrowe@apple.com>
250
251         <rdar://problem/13617104> WKPageCopySessionState needs to provide more context to the filter callback
252
253         Introduce a new value type for WKPageSessionStateFilterCallback that represents the passing
254         of whole WKBackForwardListItemRefs to the filter callback. This allows clients to consider
255         more than the original URL of the item when filtering entries from the session state.
256
257         Reviewed by Darin Adler.
258
259         * UIProcess/API/C/WKPage.cpp:
260         (WKPageGetSessionBackForwardListItemValueType): Return a static string representing our new value type.
261         * UIProcess/API/C/WKPage.h:
262         * UIProcess/cf/WebBackForwardListCF.cpp:
263         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Call the filter function with each of the
264         possible value types in turn, respecting the first false value, if any, that is returned.
265
266 2013-04-10  Anton Obzhirov  <a.obzhirov@samsung.com>
267
268         [GTK] Add support for Page Visibility
269         https://bugs.webkit.org/show_bug.cgi?id=97324
270
271         Reviewed by Sam Weinig.
272
273         Added new unittest to test page visibility using GTK Widget visibility API.
274
275         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
276         (testWebViewPageVisibility):
277         (beforeAll):
278         * UIProcess/API/gtk/tests/WebViewTest.cpp:
279         (WebViewTest::showInWindow):
280         * UIProcess/API/gtk/tests/WebViewTest.h:
281
282 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
283
284         REGRESSION (r146518): WebKit2APITests/TestInspector is failing
285         https://bugs.webkit.org/show_bug.cgi?id=113281
286
287         Reviewed by Darin Adler.
288
289         Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific
290         WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the
291         inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists
292         and opening it (and thus unable to bring it to front) otherwise.
293
294         Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close()
295         message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this
296         the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was
297         successful.
298
299         (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable.
300         (InspectorTest::bringToFront): Quit the loop without checking the removed member variable.
301         (InspectorTest::closed): Do not quit the loop as it is not run anymore.
302         (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some
303         unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks.
304         (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper
305         method and running the loop.
306         (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it.
307         (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time.
308         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
309         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
310         (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore
311         so the loop is not run.
312         (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time.
313         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
314         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
315         (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow
316         instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed.
317         * UIProcess/WebInspectorProxy.cpp:
318         (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will
319         open the inspector if it's not yet visible or bring it to the front otherwise. 
320
321 2013-04-10  Zan Dobersek  <zandobersek@gmail.com>
322
323         [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
324         https://bugs.webkit.org/show_bug.cgi?id=113498
325
326         Reviewed by Martin Robinson.
327
328         The method was introduced in r147004.
329
330         * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
331         of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
332         InspectorTest::resizeViewAndAttach.
333         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
334         (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
335         widget height.
336         (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
337         gtk_widget_get_allocated_width method to return the widget width.
338
339 2013-04-09  Antoine Quint  <graouts@apple.com>
340
341         WKFrameIsDisplayingMarkupDocument should return true for Web Archives
342         https://bugs.webkit.org/show_bug.cgi?id=114291
343
344         Reviewed by Dean Jackson.
345
346         Also return true for the Web Archive MIME type since a Web Archive
347         is displaying a markup document by nature.
348
349         * UIProcess/WebFrameProxy.cpp:
350         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
351
352 2013-04-09  Anders Carlsson  <andersca@apple.com>
353
354         REGRESSION (r147454): Youtube annotation links to new window broken
355         https://bugs.webkit.org/show_bug.cgi?id=114242
356         <rdar://problem/13609940>
357
358         Reviewed by Beth Dakin.
359
360         Set the current user gesture to "DefinitelyProcessingNewUserGesture" if popups are allowed.
361
362         * WebProcess/Plugins/PluginView.cpp:
363         (WebKit::PluginView::performFrameLoadURLRequest):
364
365 2013-04-09  Anders Carlsson  <andersca@apple.com>
366
367         If we fail to decode a message name, pass the message length as the name
368         https://bugs.webkit.org/show_bug.cgi?id=114305
369         <rdar://problem/13605703>
370
371         Reviewed by Sam Weinig.
372
373         * Platform/CoreIPC/ArgumentDecoder.h:
374         (CoreIPC::ArgumentDecoder::length):
375         * Platform/CoreIPC/Connection.cpp:
376         (CoreIPC::Connection::processIncomingMessage):
377
378 2013-04-08  Dean Jackson  <dino@apple.com>
379
380         Don't create another plugin process for restarted plugins
381         https://bugs.webkit.org/show_bug.cgi?id=114233
382
383         Reviewed by Geoff Garen.
384
385         A snapshotting plugin starts in a separate process from
386         regular plugins. This can be a little confusing to users
387         because they might see two plugin processes. We can set
388         the minimum life and timeout on the snapshotting process
389         to much smaller values, since the process doesn't need
390         to live that long. This will reduce some potential
391         confusion. Also, since there is another plugin process
392         running real plugins, it should be paged in if it needs
393         to restart.
394
395         There was, however, a bug in the process management. A
396         restarted plugin received a special PluginProcess::Type,
397         so that it could cross fade into the page nicely. This
398         caused it to start a *third* plugin process. Instead
399         mark a restarted flag directly on the PluginProxy and
400         revert back to two process types.
401
402         * PluginProcess/PluginProcess.h: Remove TypeRestartedProcess.
403
404         * UIProcess/Plugins/PluginProcessProxy.cpp: Add two new
405             timeout values for snapshotting processes.
406         (WebKit::PluginProcessProxy::didFinishLaunching): Chose which
407             of the timeout pairs to use.
408
409         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
410         (WebKit::PluginProxy::pluginLayer): Don't look at the process type, instead
411             look at the process flag to see if we are restarted.
412         * WebProcess/Plugins/PluginProxy.cpp:
413         (WebKit::PluginProxy::create): Copy the new flag into constructor.
414         (WebKit::PluginProxy::PluginProxy): Remember the flag.
415         * WebProcess/Plugins/PluginProxy.h: Add a new m_restartedProcess flag.
416
417         * WebProcess/WebPage/WebPage.cpp:
418         (WebKit::WebPage::createPlugin): When we are creating the proxy, separate
419             the concept of snapshotting and restarting.
420
421 2013-04-09  Tim Horton  <timothy_horton@apple.com>
422
423         [wk2] IconDatabase images should be decoded in the WebProcess
424         https://bugs.webkit.org/show_bug.cgi?id=112524
425         <rdar://problem/10133914>
426
427         Reviewed by Oliver Hunt.
428
429         In the interests of keeping decoding of data coming in from the greater Internet
430         in the WebProcess, move decoding of favicons from the UIProcess to the WebProcess.
431
432         * UIProcess/WebIconDatabase.cpp:
433         (WebKit::WebIconDatabase::setIconBitmapForIconURL):
434         Receive a ShareableBitmap handle from the WebProcess instead of a DataReference.
435         Use the new setIconBitmapForIconURL IconDatabase method.
436
437         * UIProcess/WebIconDatabase.h:
438         (WebIconDatabase):
439         Rename setIconDataForIconURL to setIconBitmapForIconURL.
440
441         * UIProcess/WebIconDatabase.messages.in: Ditto.
442
443         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
444         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
445         In the WebProcess, decode the incoming icon and draw it into a ShareableBitmap.
446
447 2013-04-09  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
448
449         [EFL] Declare TEST_THEME_DIR in a single place.
450         https://bugs.webkit.org/show_bug.cgi?id=114285
451
452         Reviewed by Anders Carlsson.
453
454         * PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is
455         now defined in OptionsEfl.cmake.
456
457 2013-04-09  Rafael Brandao  <rafael.lobo@openbossa.org>
458
459         [CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
460         https://bugs.webkit.org/show_bug.cgi?id=112582
461
462         Reviewed by Andreas Kling.
463
464         We've been exposing different time unit for requestAnimationFrame because
465         of wrong conversion before serviceScriptedAnimations function calls.
466         Fixed it to use seconds instead of milliseconds.
467
468         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
469         (WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion.
470
471 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
472
473         [Qt][WK2] Remove obsolete QtWebPageFindClient forward declaration from qquickwebview_p.h.
474         https://bugs.webkit.org/show_bug.cgi?id=114284
475
476         Reviewed by Andreas Kling.
477
478         The class QtWebPageFindClient was removed in r142073 when the functionality
479         was folded into QQuickWebViewPrivate.
480
481         * UIProcess/API/qt/qquickwebview_p.h:
482         (WebKit):
483
484 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
485
486         Fix GTK WebKit2 build after r148005.
487         https://bugs.webkit.org/show_bug.cgi?id=114270
488
489         Reviewed by Andreas Kling.
490
491         Fix GTK build break that went through the buildbot undetected.
492
493         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
494         (webkit_file_chooser_request_get_selected_files):
495
496 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
497
498         [Qt][WK2] Remove direct references to WebPageProxy from QQuickWebPage.
499         https://bugs.webkit.org/show_bug.cgi?id=112850
500
501         Reviewed by Andreas Kling.
502
503         Removes direct references to WebPageProxy from QQuickWebPage and prepares the
504         class for the move to QRawWebView. The access to the device scale factor and
505         CoordinatedGraphicsScene is provided through QQuickWebViewPrivate, and therefore
506         accessors to these properties are temporarily added. Eventually, this access will
507         be provided through QRawWebView when the move is complete.
508
509         This also moves the pointer to QtWebPageEventHandler from QQuickWebPagePrivate
510         to QQuickWebViewPrivate as it is mainly used from there.
511
512         * UIProcess/API/qt/qquickwebpage.cpp:
513         (QQuickWebPagePrivate::QQuickWebPagePrivate):
514         (QQuickWebPagePrivate::paint):
515         (QQuickWebPage::updatePaintNode):
516         * UIProcess/API/qt/qquickwebpage_p.h:
517         * UIProcess/API/qt/qquickwebpage_p_p.h:
518         (QQuickWebPagePrivate):
519         * UIProcess/API/qt/qquickwebview.cpp:
520         (QQuickWebViewPrivate::initialize):
521         (QQuickWebViewPrivate::handleMouseEvent):
522         (QQuickWebViewPrivate::processDidCrash):
523         (QQuickWebViewPrivate::coordinatedGraphicsScene):
524         (QQuickWebViewPrivate::deviceScaleFactor):
525         (QQuickWebViewPrivate::setIntrinsicDeviceScaleFactor):
526         (QQuickWebViewFlickablePrivate::onComponentComplete):
527         (QQuickWebView::keyPressEvent):
528         (QQuickWebView::keyReleaseEvent):
529         (QQuickWebView::inputMethodEvent):
530         (QQuickWebView::focusInEvent):
531         (QQuickWebView::itemChange):
532         (QQuickWebView::touchEvent):
533         (QQuickWebView::wheelEvent):
534         (QQuickWebView::hoverEnterEvent):
535         (QQuickWebView::hoverMoveEvent):
536         (QQuickWebView::hoverLeaveEvent):
537         (QQuickWebView::dragMoveEvent):
538         (QQuickWebView::dragEnterEvent):
539         (QQuickWebView::dragLeaveEvent):
540         (QQuickWebView::dropEvent):
541         * UIProcess/API/qt/qquickwebview_p_p.h:
542         (WebCore):
543         (WebKit):
544         (QQuickWebViewPrivate):
545
546 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
547
548         [Qt][WK2] Use C API to enable Navigator Qt Object.
549         https://bugs.webkit.org/show_bug.cgi?id=112810
550
551         Reviewed by Andreas Kling.
552
553         Replace the direct reference to the WebPageProxy with use of
554         C API.
555
556         * UIProcess/API/qt/qquickwebview.cpp:
557         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
558
559 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
560
561         [WK2] Add C API to copy selected files from WebOpenPanelParameters.
562         https://bugs.webkit.org/show_bug.cgi?id=112339
563
564         Reviewed by Andreas Kling.
565
566         Replaces the existing WebOpenPanelParameters::selectedFileNames() method
567         to return a copy of the selected file names and exposes it through the
568         C API. This is done in order to reduce the direct use of WebKit2 internal
569         classes. The implementation is very similar to the one in 
570         WebOpenPanelParameters::acceptMIMETypes().
571
572         This also updates the GTK port, which is the other user of selectedFileNames.
573
574         * Shared/WebOpenPanelParameters.cpp:
575         (WebKit::WebOpenPanelParameters::selectedFileNames):
576         (WebKit):
577         * Shared/WebOpenPanelParameters.h:
578         (WebOpenPanelParameters):
579         * UIProcess/API/C/WKOpenPanelParameters.cpp:
580         (WKOpenPanelParametersCopySelectedFileNames):
581         * UIProcess/API/C/WKOpenPanelParameters.h:
582         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
583         (webkit_file_chooser_request_get_selected_files):
584         * UIProcess/qt/QtWebPageUIClient.cpp:
585         (WebKit::QtWebPageUIClient::runOpenPanel):
586
587 2013-04-09  Jinwoo Song  <jinwoo7.song@samsung.com>
588
589         [WK2] Remove build warnings for unused parameters
590         https://bugs.webkit.org/show_bug.cgi?id=114234
591
592         Reviewed by Andreas Kling.
593
594         Fix build warnings -Wunused-parameter.
595
596         * UIProcess/Storage/StorageManager.cpp:
597         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
598         * UIProcess/WebContext.cpp:
599         (WebKit::WebContext::requestNetworkingStatistics):
600         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
601         * WebProcess/Storage/StorageAreaProxy.cpp:
602         (WebKit::StorageAreaProxy::removeItem):
603         (WebKit::StorageAreaProxy::clear):
604         (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
605         (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
606         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
607         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
608         * WebProcess/WebPage/WebPage.cpp:
609         (WebKit::WebPage::didFinishLoad):
610         * WebProcess/WebProcess.cpp:
611         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
612
613 2013-04-09  Thiago Marcos P. Santos  <thiago.santos@intel.com>
614
615         [WK2] Drop WebProcess capabilities on Linux using seccomp filters
616         https://bugs.webkit.org/show_bug.cgi?id=89875
617
618         Reviewed by Maciej Stachowiak.
619
620         Introduce the foundations of the SeccompFilter-based sandbox. The
621         hardening of the WebProcess (and potentially PluginProcess, etc)
622         works by a combination of the two things:
623
624         - Blocking syscalls that are not used, reducing the size of the attack
625         surface.
626         - Trapping sensitive syscalls and delegating the execution of these
627         syscalls to a separated trusted process subject to a set of policies.
628
629         The initial implementation traps the open()-family of syscalls on WebKit
630         EFL's and Qt's WebProcess, but it could be easily used by any Linux port,
631         since the code is suppose to be Linux-compliant. The list of syscalls handled
632         by the broker process should definitely grow as we mature the
633         implementation. Other syscalls needs to be handled to get this sandbox
634         fully functional, like unlink(), mkdir(), etc.
635
636         The broker process should be initialized as early as possible on the
637         sandboxed process main() function, because it only does a fork(), which
638         is cheap on Linux. That also aims to minimize the resident memory footprint
639         of the broker process.
640
641         Opening of files for upload and saving downloads is not supported yet,
642         since it should be handled to the UIProcess in a similar fashion as
643         the Mac port does.
644
645         * PlatformEfl.cmake:
646         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Added.
647         (WebKit):
648         (WebKit::OpenSyscall::createFromOpenatContext):
649         (WebKit::OpenSyscall::createFromCreatContext):
650         (WebKit::OpenSyscall::OpenSyscall):
651         (WebKit::OpenSyscall::setResult):
652         (WebKit::OpenSyscall::execute):
653         (WebKit::OpenSyscall::encode):
654         (WebKit::OpenSyscall::decode):
655         (WebKit::OpenSyscallResult::OpenSyscallResult):
656         (WebKit::OpenSyscallResult::~OpenSyscallResult):
657         (WebKit::OpenSyscallResult::encode):
658         (WebKit::OpenSyscallResult::decode):
659         * Shared/linux/SeccompFilters/OpenSyscall.h: Added.
660         (CoreIPC):
661         (WebKit):
662         (OpenSyscall):
663         (WebKit::OpenSyscall::setPath):
664         (WebKit::OpenSyscall::setFlags):
665         (WebKit::OpenSyscall::setMode):
666         (OpenSyscallResult):
667         (WebKit::OpenSyscallResult::fd):
668         (WebKit::OpenSyscallResult::errorNumber):
669         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Added.
670         (WebKit):
671         (SeccompBrokerClient):
672         (WebKit::sendMessage):
673         (WebKit::receiveMessage):
674         (WebKit::SIGSYSHandler):
675         (WebKit::registerSIGSYSHandler):
676         (WebKit::SeccompBrokerClient::shared):
677         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
678         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
679         (WebKit::SeccompBrokerClient::dispatch):
680         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount):
681         (WebKit::SeccompBroker::launchProcess):
682         (WebKit::SeccompBroker::initialize):
683         (WebKit::SeccompBroker::runLoop):
684         * Shared/linux/SeccompFilters/SeccompBroker.h: Added.
685         (WebKit):
686         (SeccompBroker):
687         (WebKit::SeccompBroker::setSyscallPolicy):
688         (WebKit::SeccompBroker::SeccompBroker):
689         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added.
690         (WebKit):
691         (WebKit::SeccompFilters::SeccompFilters):
692         (WebKit::SeccompFilters::~SeccompFilters):
693         (WebKit::SeccompFilters::addRule):
694         (WebKit::SeccompFilters::initialize):
695         * Shared/linux/SeccompFilters/SeccompFilters.h: Added.
696         (WebKit):
697         (SeccompFilters):
698         (WebKit::SeccompFilters::context):
699         (WebKit::SeccompFilters::platformInitialize):
700         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Added.
701         (WebKit):
702         (WebKit::SigactionSyscall::createFromContext):
703         * Shared/linux/SeccompFilters/SigactionSyscall.h: Added.
704         (WebKit):
705         (SigactionSyscall):
706         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Added.
707         (WebKit):
708         (WebKit::SigprocmaskSyscall::createFromContext):
709         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Added.
710         (WebKit):
711         (SigprocmaskSyscall):
712         * Shared/linux/SeccompFilters/Syscall.cpp: Added.
713         (WebKit):
714         (WebKit::Syscall::createFromContext):
715         (WebKit::Syscall::createFromDecoder):
716         (WebKit::Syscall::Syscall):
717         (WebKit::SyscallResult::createFromDecoder):
718         (WebKit::SyscallResult::SyscallResult):
719         * Shared/linux/SeccompFilters/Syscall.h: Added.
720         (CoreIPC):
721         (WebKit):
722         (Syscall):
723         (WebKit::Syscall::~Syscall):
724         (WebKit::Syscall::type):
725         (WebKit::Syscall::setContext):
726         (WebKit::Syscall::context):
727         (SyscallResult):
728         (WebKit::SyscallResult::~SyscallResult):
729         (WebKit::SyscallResult::type):
730         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Added.
731         (WebKit):
732         (WebKit::removeTrailingSlash):
733         (WebKit::SyscallPolicy::hasPermissionForPath):
734         (WebKit::SyscallPolicy::addFilePermission):
735         (WebKit::SyscallPolicy::addDirectoryPermission):
736         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
737         * Shared/linux/SeccompFilters/SyscallPolicy.h: Added.
738         (WebKit):
739         (SyscallPolicy):
740         * Target.pri:
741         * WebKit2.pri:
742         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Added.
743         (WebKit):
744         (WebKit::SeccompFiltersWebProcessEfl::SeccompFiltersWebProcessEfl):
745         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
746         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Added.
747         (WebKit):
748         (SeccompFiltersWebProcessEfl):
749         * WebProcess/qt/SeccompFiltersWebProcessQt.cpp: Added.
750         (WebKit):
751         (WebKit::SeccompFiltersWebProcessQt::SeccompFiltersWebProcessQt):
752         (WebKit::SeccompFiltersWebProcessQt::platformInitialize):
753         * WebProcess/qt/SeccompFiltersWebProcessQt.h: Added.
754         (WebKit):
755         (SeccompFiltersWebProcessQt):
756         * WebProcess/qt/WebProcessQt.cpp:
757         (WebKit::WebProcess::platformInitializeWebProcess):
758         * WebProcess/soup/WebProcessSoup.cpp:
759         (WebKit::WebProcess::platformInitializeWebProcess):
760
761 2013-04-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
762
763         [WK2][EFL] Mark not implemented methods in TextCheckerEfl.
764         https://bugs.webkit.org/show_bug.cgi?id=112261
765
766         Reviewed by Anders Carlsson.
767
768         There's no need to call client's methods in TextCheckerEfl.cpp if they are not
769         implemented. Mark them as not implemented until we provide proper implementation.
770
771         * UIProcess/efl/TextCheckerEfl.cpp:
772         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
773         (WebKit::TextChecker::setGrammarCheckingEnabled):
774         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
775         (WebKit::TextChecker::checkGrammarOfString):
776         (WebKit::TextChecker::spellingUIIsShowing):
777         (WebKit::TextChecker::toggleSpellingUIIsShowing):
778         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
779         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
780
781 2013-04-08  Benjamin Poulain  <benjamin@webkit.org>
782
783         Remove HTML Notification
784         https://bugs.webkit.org/show_bug.cgi?id=114231
785
786         Reviewed by Ryosuke Niwa.
787
788         * Configurations/FeatureDefines.xcconfig:
789
790 2013-04-08  Tim Horton  <timothy_horton@apple.com>
791
792         Don't run primary plugin detection if plugin snapshotting is off
793         https://bugs.webkit.org/show_bug.cgi?id=114222
794         <rdar://problem/13603988>
795
796         Reviewed by Dean Jackson.
797
798         * WebProcess/WebPage/WebPage.cpp:
799         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
800
801 2013-04-08  Patrick Gansterer  <paroga@webkit.org>
802
803         [WIN] Remove WebKit2 source code
804         https://bugs.webkit.org/show_bug.cgi?id=114096
805
806         Reviewed by Anders Carlsson.
807
808         Remove conditional includes for the windows platform.
809
810         * Shared/API/c/WKBase.h:
811         * UIProcess/API/C/WKAPICast.h:
812
813 2013-04-08  Geoffrey Garen  <ggaren@apple.com>
814
815         Stop #include-ing all of JavaScriptCore in every DOM-related file
816         https://bugs.webkit.org/show_bug.cgi?id=114220
817
818         Reviewed by Sam Weinig.
819
820         * Shared/WebCoreArgumentCoders.cpp:
821         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
822
823 2013-04-08  Brady Eidson  <beidson@apple.com>
824
825         Web/Plugin process deadlock initializing async plugins.
826         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
827
828         Reviewed by Anders Carlsson.
829
830        The "Async initialization complete" messages probably don't have to be synchronous.
831
832         * PluginProcess/WebProcessConnection.cpp:
833         (WebKit::WebProcessConnection::createPluginAsynchronously): Notify of initialization success/failure asynchronously.
834         * WebProcess/Plugins/PluginProxy.messages.in: 
835
836 2013-04-08  Anders Carlsson  <andersca@apple.com>
837
838         Add an async version of ResourceHandle::didReceiveResponse
839         https://bugs.webkit.org/show_bug.cgi?id=114215
840
841         Reviewed by Sam Weinig.
842
843         * NetworkProcess/NetworkResourceLoader.cpp:
844         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
845         Send the message and then call continueDidReceiveResponse.
846
847 2013-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
848
849         [GTK] Build Platform as a separate static library
850         https://bugs.webkit.org/show_bug.cgi?id=114164
851
852         Reviewed by Martin Robinson.
853
854         This way we reduce a bit the amount of files compiled twice
855         because of the plugin process.
856
857         * GNUmakefile.am:
858         * GNUmakefile.list.am:
859         * Platform/gtk/WorkQueueGtk.cpp: Remove unused header.
860         * Platform/unix/SharedMemoryUnix.cpp: Ditto.
861
862 2013-04-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
863
864         [WK2][EFL] WebView: Add callbacks to the WKViewClient to remove direct access to page viewport controller
865         https://bugs.webkit.org/show_bug.cgi?id=110741
866
867         Reviewed by Anders Carlsson.
868
869         Provided WKViewClient with didRequestScroll, didRenderFrame and didCompletePageTransition
870         callbacks so that direct access from WebView to page viewport controller is avoided.
871
872         Implementation of callbacks is also added to keep the current EFL WK2 functionality.
873
874         * UIProcess/API/C/efl/WKView.h:
875         * UIProcess/efl/PageLoadClientEfl.cpp:
876         (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
877
878             Moved here code from deleted WebView::didCommitLoad.
879
880         * UIProcess/efl/ViewClientEfl.cpp:
881         (WebKit::ViewClientEfl::didChangeContentsPosition):
882         (WebKit):
883         (WebKit::ViewClientEfl::didRenderFrame):
884         (WebKit::ViewClientEfl::didCompletePageTransition):
885         (WebKit::ViewClientEfl::ViewClientEfl):
886         * UIProcess/efl/ViewClientEfl.h:
887         (ViewClientEfl):
888         * UIProcess/efl/WebView.cpp:
889         (WebKit::WebView::pageDidRequestScroll):
890         (WebKit::WebView::didRenderFrame):
891         (WebKit::WebView::pageTransitionViewportReady):
892         * UIProcess/efl/WebViewClient.cpp:
893         (WebKit::WebViewClient::didChangeContentsPosition):
894         (WebKit):
895         (WebKit::WebViewClient::didRenderFrame):
896         (WebKit::WebViewClient::didCompletePageTransition):
897         * UIProcess/efl/WebViewClient.h:
898         (WebCore):
899
900 2013-04-08  Andras Becsi  <andras.becsi@digia.com>
901
902         [Qt][WK2] WebView's interactive property is not fully respected
903         https://bugs.webkit.org/show_bug.cgi?id=113066
904
905         Reviewed by Jocelyn Turcotte.
906
907         WK2 sign-off by Benjamin Poulain.
908
909         The QML WebView inherits the "interactive" property from Flickable
910         which is true by default, and disables the interaction with the
911         Flickable if set to false.
912         Resulting from the design of the WebView panning and flicking is
913         disabled by Flickable but to be consistent we also need to disable
914         double-tap gestures and pinch gestures since they would trigger
915         scale and position changes.
916
917         * UIProcess/qt/PageViewportControllerClientQt.cpp:
918         (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
919         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
920         (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
921         * UIProcess/qt/QtWebPageEventHandler.cpp:
922         (WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
923
924 2013-04-07  David Kilzer  <ddkilzer@apple.com>
925
926         Remove the rest of SVG_DOM_OBJC_BINDINGS
927         <http://webkit.org/b/114112>
928
929         Reviewed by Geoffrey Garen.
930
931         * Configurations/FeatureDefines.xcconfig:
932         - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
933
934 2013-04-06  Geoffrey Garen  <ggaren@apple.com>
935
936         Try to fix the WebKit2 build.
937
938         * NetworkProcess/NetworkResourceLoader.cpp:
939         (WebKit):
940         * NetworkProcess/NetworkResourceLoader.h:
941         (NetworkResourceLoader): Removed a defunct function.
942
943 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
944
945         [WK2] --no-tiled-backing-store build fails because FloatPoint is not declared
946         https://bugs.webkit.org/show_bug.cgi?id=113618
947
948         Reviewed by Simon Fraser.
949
950         * WebProcess/Plugins/Plugin.h: Forward declared FloatPoint
951
952 2013-04-05  Geoffrey Garen  <ggaren@apple.com>
953
954         Made USE(JSC) unconditional
955         https://bugs.webkit.org/show_bug.cgi?id=114058
956
957         Reviewed by Anders Carlsson.
958
959         * Shared/linux/WebMemorySamplerLinux.cpp:
960         (WebKit::WebMemorySampler::sampleWebKit):
961         * config.h:
962
963 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
964
965         [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
966         https://bugs.webkit.org/show_bug.cgi?id=113627
967
968         Reviewed by Simon Fraser.
969
970         Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
971         with --no-tiled-backing-store build option:
972         * UIProcess/API/C/efl/WKView.cpp:
973         * UIProcess/API/efl/EvasGLContext.cpp:
974         * UIProcess/API/efl/EvasGLContext.h:
975         * UIProcess/API/efl/EvasGLSurface.cpp:
976         * UIProcess/API/efl/EvasGLSurface.h:
977         * UIProcess/API/efl/EwkView.cpp:
978         (EwkView::EwkView):
979         (EwkView::displayTimerFired):
980         (EwkView::takeSnapshot):
981         * UIProcess/API/efl/EwkView.h:
982         (WebKit):
983         (EwkView):
984         * UIProcess/API/efl/SnapshotImageGL.cpp:
985         * UIProcess/API/efl/SnapshotImageGL.h:
986         * UIProcess/PageViewportController.cpp:
987         * UIProcess/PageViewportController.h:
988         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
989         * UIProcess/efl/ViewClientEfl.cpp:
990         (WebKit::ViewClientEfl::didChangeContentsSize):
991         * UIProcess/efl/WebView.cpp:
992         (WebKit::WebView::didCommitLoad):
993         (WebKit::WebView::updateViewportSize):
994         (WebKit::WebView::didChangeViewportProperties):
995         (WebKit::WebView::pageDidRequestScroll):
996         (WebKit::WebView::didRenderFrame):
997         (WebKit::WebView::pageTransitionViewportReady):
998
999 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
1000
1001         [EFL][WK2] --no-tiled-backing-store build fails because of not used #if USE(COORDINATED_GRAPHICS)
1002         https://bugs.webkit.org/show_bug.cgi?id=113629
1003
1004         Reviewed by Simon Fraser.
1005
1006         Wrapped code related to coordinated graphics with #if USE(COORDINATED_GRAPHICS)
1007         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
1008         * UIProcess/efl/WebView.cpp:
1009         (WebKit::WebView::initialize):
1010         (WebKit):
1011         (WebKit::WebView::paintToCairoSurface):
1012         (WebKit::WebView::updateViewportSize):
1013
1014 2013-04-05  Timothy Hatcher  <timothy@apple.com>
1015
1016         Allow the Web Inspector to use WebSQL.
1017
1018         This fixes an exception on load in the Safari Web Inspector.
1019
1020         https://webkit.org/b/114040
1021         rdar://problem/13581422
1022
1023         Reviewed by Anders Carlsson.
1024
1025         * UIProcess/mac/WebInspectorProxyMac.mm:
1026         (WebKit::exceededDatabaseQuota): Added.
1027         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota.
1028
1029 2013-04-04  Brady Eidson  <beidson@apple.com>
1030
1031         Add SPI to get a copy of the context menu at a given point.
1032         <rdar://problem/13450908> and https://bugs.webkit.org/show_bug.cgi?id=113958
1033
1034         Reviewed by Andy Estes.
1035
1036         Add the new accessor: 
1037         * WebProcess/WebPage/WebPage.cpp:
1038         (WebKit::WebPage::contextMenuAtPoint):
1039         * WebProcess/WebPage/WebPage.h:
1040
1041         Expose the new SPI:
1042         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1043         (WKBundlePageCopyContextMenuAtPoint):
1044         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1045
1046 2013-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1047
1048         [WK2][EFL] WebView should own page position and scale factor
1049         https://bugs.webkit.org/show_bug.cgi?id=111075
1050
1051         Reviewed by Andreas Kling.
1052
1053         View content position and content scale factor should belong to WebView
1054         rather than to EwkView as it decreases EwkView usage inside EFL-agnostic
1055         WebView and improves WebView encapsulation.
1056
1057         * UIProcess/API/C/efl/WKView.cpp:
1058         (WKViewGetContentScaleFactor):
1059         (WKViewSetContentScaleFactor):
1060
1061             New WKView API was added to set and get content scale factor.
1062             The view content scale factor is not the same as page scale factor:
1063             it always applies to content but not necessarily applies to the page.
1064             The view content scale factor is calculated by viewport controller
1065             and applies immediately for painting in UI process. Page scale factor
1066             is updated later after the frame is rendered to accomplish the pending
1067             scale change.
1068
1069         (WKViewGetContentPosition):
1070         (WKViewSetContentPosition):
1071
1072             New WKView API was added to set and get content position.
1073             Content position is set in UI units.
1074
1075         * UIProcess/API/C/efl/WKView.h:
1076         * UIProcess/API/efl/EwkView.cpp:
1077         (EwkView::EwkView):
1078         * UIProcess/API/efl/EwkView.h:
1079         (EwkView):
1080         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1081         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
1082         (WebKit::PageViewportControllerClientEfl::setPageScaleFactor):
1083         * UIProcess/efl/WebView.cpp:
1084         (WebKit::WebView::WebView):
1085         (WebKit::WebView::paintToCairoSurface):
1086         (WebKit::WebView::transformToScene):
1087         (WebKit::WebView::updateViewportSize):
1088         (WebKit::WebView::pageDidRequestScroll):
1089         * UIProcess/efl/WebView.h:
1090         (WebKit::WebView::setContentScaleFactor):
1091         (WebKit::WebView::contentScaleFactor):
1092         (WebView):
1093         (WebKit::WebView::setContentPosition):
1094         (WebKit::WebView::contentPosition):
1095
1096 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
1097
1098         [GTK][WK2] WebKitLoaderClient: add missing initializers
1099         https://bugs.webkit.org/show_bug.cgi?id=112961
1100
1101         Reviewed by Carlos Garcia Campos.
1102
1103         There are two new attributes: pluginLoadPolicy and pluginDidFail.
1104
1105         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1106         (attachLoaderClientToView):
1107
1108 2013-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1109
1110         [WK2][EFL] Encapsulate view states set-up within WebView
1111         https://bugs.webkit.org/show_bug.cgi?id=110877
1112
1113         Reviewed by Benjamin Poulain.
1114
1115         View states set-up is encapsulated within WebView. This change
1116         reduces both usage of EwkView inside WebView class and usage of
1117         WebPageProxy inside EwkView class.
1118
1119         New WKView API was added so that EwkView can define whether or not
1120         the view is visible and focused.
1121
1122         * UIProcess/API/C/efl/WKView.cpp:
1123         (WKViewIsFocused):
1124         (WKViewSetIsFocused):
1125         (WKViewIsVisible):
1126         (WKViewSetIsVisible):
1127         * UIProcess/API/C/efl/WKView.h:
1128         * UIProcess/API/efl/EwkView.cpp:
1129         (::handleEvent):
1130         (EwkView::handleEvasObjectShow):
1131         (EwkView::handleEwkViewFocusIn):
1132         (EwkView::handleEwkViewFocusOut):
1133         * UIProcess/API/efl/EwkView.h:
1134         * UIProcess/efl/WebView.cpp:
1135         (WebKit::WebView::WebView):
1136         (WebKit::WebView::setFocused):
1137         (WebKit):
1138         (WebKit::WebView::setVisible):
1139         (WebKit::WebView::isViewFocused):
1140         (WebKit::WebView::isViewVisible):
1141         * UIProcess/efl/WebView.h:
1142         (WebKit::WebView::isFocused):
1143         (WebView):
1144         (WebKit::WebView::isVisible):
1145
1146 2013-04-04  KwangYong Choi  <ky0.choi@samsung.com>
1147
1148         [EFL][WK2] Add support for getting page contents as string
1149         https://bugs.webkit.org/show_bug.cgi?id=106752
1150
1151         Reviewed by Andreas Kling.
1152
1153         Modified ewk_view_page_contents_get() API to get page contents as string.
1154         EWK_PAGE_CONTENTS_TYPE_STRING is added to Ewk_Page_Contents_Type.
1155         Now, we can use both EWK_PAGE_CONTENTS_TYPE_MHTML and EWK_PAGE_CONTENTS_TYPE_STRING
1156         for getting page contents.
1157
1158         * UIProcess/API/efl/ewk_view.cpp:
1159         (Ewk_Page_Contents_Context):
1160         (ewkViewPageContentsAsMHTMLCallback):
1161         (ewkViewPageContentsAsStringCallback):
1162         (ewk_view_page_contents_get):
1163         * UIProcess/API/efl/ewk_view.h:
1164         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1165         (PageContentsAsMHTMLCallback):
1166         (PageContentsAsStringCallback):
1167         (TEST_F):
1168
1169 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1170
1171         [Cairo] Stop passing raw pointers to BitmapImage::create()
1172         https://bugs.webkit.org/show_bug.cgi?id=113945
1173
1174         Reviewed by Martin Robinson.
1175
1176         Pass a smart pointer in to BitmapImage::create() instead of a raw one
1177         for the cairo surface. The factory method prototype was updated for
1178         cairo in r147643.
1179
1180         * Shared/cairo/ShareableBitmapCairo.cpp:
1181         (WebKit::ShareableBitmap::createImage):
1182
1183 2013-04-03  Dean Jackson  <dino@apple.com>
1184
1185         Expose settings to disable plugin snapshotting autostart and primary detection
1186         https://bugs.webkit.org/show_bug.cgi?id=113918
1187
1188         Reviewed by Tim Horton.
1189
1190         Three new settings: snapshotAllPlugIns, primaryPlugInSnapshotDetectionEnabled and
1191         autostartOriginPlugInSnapshottingEnabled.
1192         These are exposed via WKPreferences (WebKit2 only, since that's the only port actively
1193         using the feature).
1194
1195         * Shared/WebPreferencesStore.h: Add macros for new settings.
1196         * UIProcess/API/C/WKPreferences.cpp: Getters and setters for new settings.
1197         (WKPreferencesSetSnapshotAllPlugIns):
1198         (WKPreferencesGetSnapshotAllPlugIns):
1199         (WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled):
1200         (WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled):
1201         (WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled):
1202         (WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled):
1203         * UIProcess/API/C/WKPreferencesPrivate.h:
1204         * WebProcess/WebPage/WebPage.cpp:
1205         (WebKit::WebPage::updatePreferences): Forward settings updates.
1206         (WebKit::WebPage::addPluginView): Don't run primary plugin detection if the setting is false.
1207         (WebKit::WebPage::didFinishLoad): Ditto.
1208
1209 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1210
1211         [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
1212         https://bugs.webkit.org/show_bug.cgi?id=113929
1213
1214         Reviewed by Martin Robinson.
1215
1216         Update code now that PassNativeImagePtr is now a typedef to PassRefPtr<cairo_surface_t>
1217         instead of NativeImageCairo*.
1218
1219         * Shared/gtk/ArgumentCodersGtk.cpp:
1220         (CoreIPC::decodeImage):
1221         * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp:
1222         (WKIconDatabaseTryGetCairoSurfaceForURL):
1223         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1224         (getIconSurfaceSynchronously):
1225
1226 2013-04-04  Sze Howe Koh  <szehowe.koh@gmail.com>
1227
1228         [Qt] docs: Fix module name format
1229         https://bugs.webkit.org/show_bug.cgi?id=113209
1230
1231         Reviewed by Jocelyn Turcotte.
1232
1233         Make QDoc-generated documentation follow the conventions at
1234         http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation
1235
1236         * UIProcess/API/qt/qquickwebview.cpp:
1237
1238 2013-04-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1239
1240         [WK2][EFL] WebView should own view size
1241         https://bugs.webkit.org/show_bug.cgi?id=110753
1242
1243         Reviewed by Andreas Kling.
1244
1245         WebView owns view size. WKViewGetSize and WKViewSetSize API
1246         is exposed accordingly. Usage of EFL-specific ewkView inside
1247         toolkit-agnostic WebView class is reduced.
1248
1249         * UIProcess/API/C/efl/WKView.cpp:
1250         (WKViewGetSize):
1251         (WKViewSetSize):
1252         * UIProcess/API/C/efl/WKView.h:
1253         * UIProcess/API/efl/EwkView.cpp:
1254         (EwkView::setDeviceScaleFactor):
1255         (EwkView::size):
1256         (EwkView::deviceSize):
1257         (EwkView::scheduleUpdateDisplay):
1258         (EwkView::handleEvasObjectCalculate):
1259         * UIProcess/API/efl/EwkView.h:
1260         (EwkView):
1261         * UIProcess/efl/WebView.cpp:
1262         (WebKit::WebView::setSize):
1263         (WebKit):
1264         (WebKit::WebView::paintToCurrentGLContext):
1265         (WebKit::WebView::updateViewportSize):
1266         (WebKit::WebView::viewSize):
1267         (WebKit::WebView::dipSize):
1268         * UIProcess/efl/WebView.h:
1269         (WebView):
1270         (WebKit::WebView::size):
1271
1272 2013-04-03  Anders Carlsson  <andersca@apple.com>
1273
1274         Don't try to set the exception port for server connections
1275         https://bugs.webkit.org/show_bug.cgi?id=113910
1276         <rdar://problem/11248925>
1277
1278         Reviewed by Darin Adler.
1279
1280         Treat a SetExceptionPort message to the server connection as an invalid message.
1281
1282         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1283         (CoreIPC::Connection::receiveSourceEventHandler):
1284
1285 2013-04-02  Mark Rowe  <mrowe@apple.com>
1286
1287         <http://webkit.org/b/113898> Eliminate some code duplication by introducing an array of handlers to register / unregister.
1288
1289         Reviewed by Antti Koivisto.
1290
1291         * UIProcess/mac/WebContextMac.mm:
1292         (OcclusionNotificationHandler): Structure containing the notification name, type and handler.
1293         (WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array.
1294         (WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array.
1295
1296 2013-04-02  Mark Rowe  <mrowe@apple.com>
1297
1298         Enable process suppression when no windows in the application have drawn recently.
1299         <http://webkit.org/b/113854> / <rdar://problem/13540351>
1300
1301         Reviewed by Darin Adler.
1302
1303         * UIProcess/mac/WebContextMac.mm:
1304         (WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped.
1305         (WebKit::applicationWindowModificationsStopped): Note that modifications have stopped.
1306         (WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications.
1307         (WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications.
1308         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded
1309         or the application has not drawn recently.
1310         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto.
1311         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto.
1312
1313 2013-04-03  Dean Jackson  <dino@apple.com>
1314
1315         Cross fade into restarted plugin
1316         https://bugs.webkit.org/show_bug.cgi?id=113868
1317
1318         Reviewed by Tim Horton.
1319
1320         Add a new plugin process type that indicates this is a plugin that
1321         has been restarted from snapshotting. On Apple ports, this allows
1322         us to animate the appearance of the plugin so that it crossfades
1323         with the snapshot. Other ports will have to add their own fading.
1324
1325         * PluginProcess/PluginProcess.h: New Type: TypeRestartedProcess.
1326         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1327         (WebKit::PluginProxy::pluginLayer): When the plugin's CALayer is created, if it
1328             is a restarted plugin, add an opacity animation to fade it in.
1329         * WebProcess/WebPage/WebPage.cpp:
1330         (WebKit::WebPage::createPlugin): Mark restarted plugins with the new process type.
1331
1332 2013-04-03  Alexey Proskuryakov  <ap@apple.com>
1333
1334         <rdar://problem/13564588> Add a temporary workaround for a build failure.
1335
1336         Fix suggested by Mark Rowe.
1337
1338         * Shared/mac/ChildProcessMac.mm:
1339
1340 2013-04-03  Alexey Proskuryakov  <ap@apple.com>
1341
1342         [WK2] XMLHttpRequest upload events don't work with NetworkProcess
1343         https://bugs.webkit.org/show_bug.cgi?id=113887
1344
1345         Reviewed by Brady Eidson.
1346
1347         Just forward didSendData client call to WebProcess.
1348
1349         * NetworkProcess/NetworkResourceLoader.cpp:
1350         (WebKit::NetworkResourceLoader::didSendData):
1351         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Tweaked a comment.
1352         * WebProcess/Network/WebResourceLoader.cpp:
1353         (WebKit::WebResourceLoader::didSendData):
1354         * WebProcess/Network/WebResourceLoader.h:
1355         * WebProcess/Network/WebResourceLoader.messages.in:
1356
1357 2013-04-02  Ryosuke Niwa  <rniwa@webkit.org>
1358
1359         Remove code for Mac 10.5 and earlier from WTF and WebKit2
1360         https://bugs.webkit.org/show_bug.cgi?id=113844
1361
1362         Reviewed by Benjamin Poulain.
1363
1364         Removed the code for 10.5 and removed if-def for 10.6.
1365
1366         * Shared/mac/PasteboardTypes.mm:
1367         (WebKit::PasteboardTypes::forEditing):
1368
1369 2013-04-02  Anders Carlsson  <andersca@apple.com>
1370
1371         Be more robust against empty message receiver names in incoming messages
1372         https://bugs.webkit.org/show_bug.cgi?id=113833
1373         <rdar://problem/13284433>
1374
1375         Reviewed by Beth Dakin.
1376
1377         Turns out that we either send or receive messages whose receiver names are empty. This leads to bad things when we try to look
1378         up the message receiver name in a hash map since the empty name is used to represent an empty hash map value.
1379
1380         * Platform/CoreIPC/Connection.cpp:
1381         (CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue):
1382         Sprinkle assertions.
1383
1384         (CoreIPC::Connection::processIncomingMessage):
1385         If the message receiver name is not valid, make sure to call didReceiveInvalidMessage on the client thread.
1386
1387         (CoreIPC::Connection::dispatchDidReceiveInvalidMessage):
1388         Add new helper function.
1389
1390 2013-04-02  Simon Cooper  <scooper@apple.com>
1391
1392         [Mac][WK2] Don’t let plug-ins use System V shared memory
1393         https://bugs.webkit.org/show_bug.cgi?id=113466
1394         <rdar://problem/13159030>
1395
1396         Reviewed, tweaked and landed by Alexey Proskuryakov.
1397
1398         Instead of allowing plug-ins to request System V shm, give them a
1399         temporary but usable alternative if they try to request it.
1400
1401         * PluginProcess/mac/PluginProcessShim.mm:
1402
1403 2013-04-02  Anders Carlsson  <andersca@apple.com>
1404
1405         Add WKContextSetInvalidMessageFunction
1406         https://bugs.webkit.org/show_bug.cgi?id=113820
1407         <rdar://problem/12679817>
1408
1409         Reviewed by Tim Horton.
1410
1411         * UIProcess/API/C/WKContext.cpp:
1412         (WKContextSetInvalidMessageFunction):
1413         Call WebContext::didReceiveInvalidMessage.
1414
1415         * UIProcess/API/C/WKContextPrivate.h:
1416         * UIProcess/WebContext.cpp:
1417         (WebKit::WebContext::setInvalidMessageCallback):
1418         Set the global variable.
1419
1420         (WebKit::WebContext::didReceiveInvalidMessage):
1421         Construct a message name string and call the invalid message callback.
1422
1423         * UIProcess/WebProcessProxy.cpp:
1424         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
1425         Call WebContext::didReceiveInvalidMessage.
1426
1427 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
1428
1429         [Mac] Remove WKCreateNSURLConnectionDelegateProxy
1430         https://bugs.webkit.org/show_bug.cgi?id=113810
1431
1432         Reviewed by Anders Carlsson.
1433
1434         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1435         (InitWebCoreSystemInterface):
1436
1437 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
1438
1439         <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
1440         https://bugs.webkit.org/show_bug.cgi?id=113803
1441
1442         Reviewed by Darin Adler.
1443
1444         * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::startWithHandle):
1445         Just pass nil instead of proxy.
1446
1447 2013-04-02  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1448
1449         [WK2] Remove repeating code in declaration of WK2 API classes
1450         https://bugs.webkit.org/show_bug.cgi?id=112782
1451
1452         Reviewed by Benjamin Poulain.
1453
1454         The following two lines of code had been repeated in every WK2 API
1455         object class:
1456         1) static const Type APIType = SomeAPIType;
1457         2) virtual Type type() const { return APIType; }
1458
1459         This patch introduces template class 'TypedAPIObject' inherited
1460         from WebKit::APIObject and it contains the common functionality. 
1461         So the new pattern is that API object classes are inherited from
1462         TypedAPIObject (rather than from WebKit::APIObject directly) passing
1463         the corresponding API object type as a template parameter.
1464
1465         The existing API object classes are modified accordingly to the
1466         proposed pattern.
1467
1468         * Shared/APIObject.h:
1469         (WebKit):
1470         (TypedAPIObject):
1471         (WebKit::TypedAPIObject::~TypedAPIObject):
1472         (WebKit::TypedAPIObject::TypedAPIObject):
1473         * Shared/ImmutableArray.h:
1474         (ImmutableArray):
1475         * Shared/ImmutableDictionary.h:
1476         (ImmutableDictionary):
1477         * Shared/WebArchive.h:
1478         (WebArchive):
1479         * Shared/WebArchiveResource.h:
1480         (WebArchiveResource):
1481         * Shared/WebBackForwardListItem.h:
1482         (WebBackForwardListItem):
1483         * Shared/WebBatteryStatus.h:
1484         (WebBatteryStatus):
1485         * Shared/WebCertificateInfo.h:
1486         * Shared/WebConnection.h:
1487         (WebConnection):
1488         * Shared/WebContextMenuItem.h:
1489         (WebContextMenuItem):
1490         * Shared/WebData.h:
1491         * Shared/WebError.h:
1492         (WebKit::WebError::errorCode):
1493         * Shared/WebGeolocationPosition.h:
1494         (WebGeolocationPosition):
1495         * Shared/WebGeometry.h:
1496         * Shared/WebGraphicsContext.h:
1497         (WebGraphicsContext):
1498         * Shared/WebHitTestResult.h:
1499         * Shared/WebImage.h:
1500         (WebImage):
1501         * Shared/WebNetworkInfo.h:
1502         (WebNetworkInfo):
1503         * Shared/WebNumber.h:
1504         * Shared/WebOpenPanelParameters.h:
1505         (WebOpenPanelParameters):
1506         * Shared/WebRenderLayer.h:
1507         * Shared/WebRenderObject.h:
1508         * Shared/WebSecurityOrigin.h:
1509         * Shared/WebSerializedScriptValue.h:
1510         (WebSerializedScriptValue):
1511         * Shared/WebString.h:
1512         * Shared/WebURL.h:
1513         * Shared/WebURLRequest.h:
1514         (WebURLRequest):
1515         * Shared/WebURLResponse.h:
1516         (WebURLResponse):
1517         * Shared/WebUserContentURLPattern.h:
1518         * Shared/mac/ObjCObjectGraph.h:
1519         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
1520         (AuthenticationChallengeProxy):
1521         * UIProcess/Authentication/AuthenticationDecisionListener.h:
1522         (AuthenticationDecisionListener):
1523         * UIProcess/Authentication/WebCredential.h:
1524         (WebCredential):
1525         * UIProcess/Authentication/WebProtectionSpace.h:
1526         (WebProtectionSpace):
1527         * UIProcess/Downloads/DownloadProxy.h:
1528         (DownloadProxy):
1529         * UIProcess/GeolocationPermissionRequestProxy.h:
1530         (GeolocationPermissionRequestProxy):
1531         * UIProcess/Notifications/NotificationPermissionRequest.h:
1532         (NotificationPermissionRequest):
1533         * UIProcess/Notifications/WebNotification.h:
1534         (WebNotification):
1535         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1536         (WebNotificationManagerProxy):
1537         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1538         (WebPluginSiteDataManager):
1539         * UIProcess/WebApplicationCacheManagerProxy.h:
1540         (WebApplicationCacheManagerProxy):
1541         * UIProcess/WebBackForwardList.h:
1542         (WebBackForwardList):
1543         * UIProcess/WebBatteryManagerProxy.h:
1544         (WebBatteryManagerProxy):
1545         * UIProcess/WebContext.h:
1546         (WebContext):
1547         * UIProcess/WebCookieManagerProxy.h:
1548         (WebCookieManagerProxy):
1549         * UIProcess/WebDatabaseManagerProxy.h:
1550         (WebDatabaseManagerProxy):
1551         * UIProcess/WebEditCommandProxy.h:
1552         (WebEditCommandProxy):
1553         * UIProcess/WebFrameProxy.h:
1554         (WebFrameProxy):
1555         * UIProcess/WebGeolocationManagerProxy.h:
1556         (WebGeolocationManagerProxy):
1557         * UIProcess/WebGrammarDetail.h:
1558         (WebGrammarDetail):
1559         * UIProcess/WebIconDatabase.h:
1560         (WebIconDatabase):
1561         * UIProcess/WebInspectorProxy.h:
1562         (WebInspectorProxy):
1563         * UIProcess/WebKeyValueStorageManagerProxy.h:
1564         (WebKeyValueStorageManagerProxy):
1565         * UIProcess/WebMediaCacheManagerProxy.h:
1566         (WebMediaCacheManagerProxy):
1567         * UIProcess/WebNavigationData.h:
1568         (WebNavigationData):
1569         * UIProcess/WebNetworkInfoManagerProxy.h:
1570         (WebNetworkInfoManagerProxy):
1571         * UIProcess/WebOpenPanelResultListenerProxy.h:
1572         (WebOpenPanelResultListenerProxy):
1573         * UIProcess/WebPageGroup.h:
1574         (WebPageGroup):
1575         * UIProcess/WebPageProxy.h:
1576         (WebPageProxy):
1577         * UIProcess/WebPreferences.cpp:
1578         (WebKit::WebPreferences::WebPreferences):
1579         * UIProcess/WebPreferences.h:
1580         (WebPreferences):
1581         * UIProcess/WebResourceCacheManagerProxy.h:
1582         (WebResourceCacheManagerProxy):
1583         * UIProcess/WebTextChecker.h:
1584         (WebTextChecker):
1585         * UIProcess/WebVibrationProxy.h:
1586         (WebVibrationProxy):
1587         * UIProcess/efl/WebPopupItemEfl.h:
1588         (WebPopupItemEfl):
1589         * UIProcess/efl/WebView.h:
1590         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1591         (WebSoupRequestManagerProxy):
1592         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1593         (InjectedBundleNodeHandle):
1594         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1595         (InjectedBundleRangeHandle):
1596         * WebProcess/InjectedBundle/InjectedBundle.h:
1597         (InjectedBundle):
1598         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
1599         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1600         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
1601         (InjectedBundleDOMWindowExtension):
1602         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1603         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
1604         (InjectedBundleNavigationAction):
1605         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1606         (InjectedBundleScriptWorld):
1607         * WebProcess/WebPage/PageOverlay.h:
1608         (PageOverlay):
1609         * WebProcess/WebPage/WebFrame.h:
1610         (WebFrame):
1611         * WebProcess/WebPage/WebInspector.h:
1612         (WebInspector):
1613         * WebProcess/WebPage/WebPage.h:
1614         (WebPage):
1615         * WebProcess/WebPage/WebPageGroupProxy.h:
1616         (WebPageGroupProxy):
1617
1618 2013-04-01  Timothy Hatcher  <timothy@apple.com>
1619
1620         Allow changing Web Inspector dock sides without undocking first.
1621
1622         https://webkit.org/b/113661
1623         rdar://problem/13543127
1624
1625         Reviewed by Joseph Pecoraro.
1626
1627         * UIProcess/WebInspectorProxy.cpp:
1628         (WebKit::WebInspectorProxy::createInspectorPage): Send AttachedBottom and
1629         AttachedRight messages so InspectorFrontendClientLocal knows which side we
1630         are attached.
1631
1632         (WebKit::WebInspectorProxy::canAttach): If we are already attached, allow
1633         attaching again to allow switching sides.
1634
1635 2013-04-01  Anders Carlsson  <andersca@apple.com>
1636
1637         Nor this! (Who reviewed this anyway!)
1638
1639         * WebProcess/Storage/StorageNamespaceProxy.cpp:
1640         (WebKit::StorageNamespaceProxy::storageArea):
1641
1642 2013-04-01  Anders Carlsson  <andersca@apple.com>
1643
1644         Didn't mean to commit this!
1645
1646         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1647
1648 2013-04-01  Alexey Proskuryakov  <ap@apple.com>
1649
1650         https://bugs.webkit.org/show_bug.cgi?id=113721
1651         <rdar://problem/13549181> REGRESSION (r146929): HTTP auth credentials not reused during session
1652
1653         Reviewed by Brady Eidson.
1654
1655         * NetworkProcess/NetworkResourceLoader.h:
1656         * NetworkProcess/NetworkResourceLoader.cpp:
1657         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Added an override that
1658         we still need. It's not great, but causes no trouble for NetworkProcess.
1659         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Implement in
1660         terms of sync version to avoid duplicating logic.
1661
1662 2013-03-05  Anders Carlsson  <andersca@apple.com>
1663
1664         Apply changes from storage events locally
1665         https://bugs.webkit.org/show_bug.cgi?id=111502
1666
1667         Reviewed by Sam Weinig.
1668
1669         * WebProcess/Storage/StorageAreaProxy.cpp:
1670         (WebKit::StorageAreaProxy::StorageAreaProxy):
1671         Store the security origin as a member variable.
1672
1673         (WebKit::StorageAreaProxy::dispatchStorageEvent):
1674         Set the item and call the appropriate event dispatch function.
1675     
1676         (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
1677         (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
1678         Add stubs.
1679
1680         * WebProcess/Storage/StorageAreaProxy.h:
1681
1682 2013-04-01  Alexey Proskuryakov  <ap@apple.com>
1683
1684         <rdar://problem/13490123> Sandbox extension tracking is incorrect when restoring a session
1685         https://bugs.webkit.org/show_bug.cgi?id=113709
1686
1687         Reviewed by Anders Carlsson.
1688
1689         * WebProcess/WebPage/WebPage.cpp:
1690         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Added an assertion
1691         to catch extension tracking logic errors that could result in giving an extension to
1692         non-local pages.
1693         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Just like
1694         below, clearing m_pendingProvisionalSandboxExtension appears incorrect, even though
1695         I am not aware of any scenarios where this happens in practice.
1696         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): The load may
1697         be failing exactly because a new one cancels it, so we shouldn't be preventing
1698         the new one from using its extension.
1699
1700 2013-04-01  Brady Eidson  <beidson@apple.com>
1701
1702         SharedMemory release build hardening.
1703         <rdar://problem/13546860> and https://bugs.webkit.org/show_bug.cgi?id=113710
1704
1705         Reviewed by Anders Carlsson.
1706
1707         Successful creation of a memory entry with a size less than the size we requested should be treated
1708         as a failure to create the SharedMemory object.
1709
1710         * Platform/mac/SharedMemoryMac.cpp:
1711         (WebKit::SharedMemory::createFromVMBuffer): Early return if the port we get is bogus for our needs.
1712         (WebKit::SharedMemory::createHandle): Ditto.
1713         (WebKit::SharedMemory::create): Guarantee we pass valid input in to mach_vm_map.
1714
1715 2013-03-30  Csaba Osztrogonác  <ossy@webkit.org>
1716
1717         Unreviewed buildfix after r147260.
1718
1719         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1720         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1721
1722 2013-03-29  Seokju Kwon  <seokju.kwon@gmail.com>
1723
1724         [EFL] Unreviewed build fix after r147251
1725         https://bugs.webkit.org/show_bug.cgi?id=113631
1726
1727         Unreviewed build fix.
1728
1729         Add NETWORK_PROCESS guard.
1730
1731         * UIProcess/WebResourceCacheManagerProxy.cpp:
1732         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
1733
1734 2013-03-29  Brady Eidson  <beidson@apple.com>
1735
1736         Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
1737         <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616
1738
1739         Reviewed by Alexey Proskuryakov.
1740
1741         These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
1742         A RefPtr<> protector fixes that.
1743
1744         Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.
1745
1746         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1747         (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.
1748
1749         * WebProcess/Network/WebResourceLoader.cpp:
1750         (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
1751         (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
1752         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
1753         (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
1754           ResourceLoader, and null check it before delivering the "didFinishLoader" call.
1755         * WebProcess/Network/WebResourceLoader.h:
1756
1757 2013-03-29  Brady Eidson  <beidson@apple.com>
1758
1759         Should never send events to plugins waiting on asynchronous initialization.
1760         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
1761
1762         Reviewed by Anders Carlsson.
1763
1764         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
1765
1766         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
1767
1768         * WebProcess/Plugins/PluginProxy.cpp:
1769         (WebKit::PluginProxy::handleMouseEvent):
1770         (WebKit::PluginProxy::handleWheelEvent):
1771         (WebKit::PluginProxy::handleMouseEnterEvent):
1772         (WebKit::PluginProxy::handleMouseLeaveEvent):
1773         (WebKit::PluginProxy::handleKeyboardEvent):
1774         (WebKit::PluginProxy::handleEditingCommand):
1775         (WebKit::PluginProxy::isEditingCommandEnabled):
1776         (WebKit::PluginProxy::handlesPageScaleFactor):
1777
1778 2013-03-29  Brady Eidson  <beidson@apple.com>
1779
1780         Should never send events to plugins waiting on asynchronous initialization.
1781         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
1782
1783         Reviewed by Anders Carlsson.
1784
1785         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
1786
1787         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
1788
1789         * WebProcess/Plugins/PluginProxy.cpp:
1790         (WebKit::PluginProxy::handleMouseEvent):
1791         (WebKit::PluginProxy::handleWheelEvent):
1792         (WebKit::PluginProxy::handleMouseEnterEvent):
1793         (WebKit::PluginProxy::handleMouseLeaveEvent):
1794         (WebKit::PluginProxy::handleKeyboardEvent):
1795         (WebKit::PluginProxy::handleEditingCommand):
1796         (WebKit::PluginProxy::isEditingCommandEnabled):
1797         (WebKit::PluginProxy::handlesPageScaleFactor):
1798
1799 2013-03-29  Alexey Proskuryakov  <ap@apple.com>
1800
1801         Expose FeatureObserver data to WebKit clients
1802         https://bugs.webkit.org/show_bug.cgi?id=113613
1803
1804         Reviewed by Sam Weinig.
1805
1806         * Shared/APIClientTraits.cpp:
1807         * Shared/APIClientTraits.h:
1808         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1809         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1810         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1811         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1812         Added a new injected bundle client call, featuresUsedInPage.
1813
1814         * WebProcess/WebPage/WebPage.cpp:
1815         (WebKit::WebPage::close):
1816         (WebKit::WebPage::didCommitLoad):
1817         (WebKit::WebPage::reportUsedFeatures):
1818         * WebProcess/WebPage/WebPage.h:
1819         Report features used in a page when navigating away, or when closing.
1820
1821 2013-03-29  Brady Eidson  <beidson@apple.com>
1822
1823         Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
1824         <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616
1825
1826         Reviewed by Alexey Proskuryakov.
1827
1828         These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
1829         A RefPtr<> protector fixes that.
1830
1831         Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.
1832
1833         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1834         (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.
1835
1836         * WebProcess/Network/WebResourceLoader.cpp:
1837         (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
1838         (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
1839         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
1840         (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
1841           ResourceLoader, and null check it before delivering the "didFinishLoader" call.
1842         * WebProcess/Network/WebResourceLoader.h:
1843
1844 2013-03-29  Brady Eidson  <beidson@apple.com>
1845
1846         Should never send events to plugins waiting on asynchronous initialization.
1847         <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612
1848
1849         Reviewed by Anders Carlsson.
1850
1851         Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.
1852
1853         A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:
1854
1855         * WebProcess/Plugins/PluginProxy.cpp:
1856         (WebKit::PluginProxy::handleMouseEvent):
1857         (WebKit::PluginProxy::handleWheelEvent):
1858         (WebKit::PluginProxy::handleMouseEnterEvent):
1859         (WebKit::PluginProxy::handleMouseLeaveEvent):
1860         (WebKit::PluginProxy::handleKeyboardEvent):
1861         (WebKit::PluginProxy::handleEditingCommand):
1862         (WebKit::PluginProxy::isEditingCommandEnabled):
1863         (WebKit::PluginProxy::handlesPageScaleFactor):
1864
1865 2013-03-29  Brady Eidson  <beidson@apple.com>
1866
1867         "Empty cache..." clears the disk cache from each WebProcess.
1868         <rdar://problem/12456652> and https://bugs.webkit.org/show_bug.cgi?id=113603
1869
1870         Reviewed by Sam Weinig.
1871
1872         * NetworkProcess/NetworkProcess.cpp:
1873         (WebKit::NetworkProcess::NetworkProcess):
1874         (WebKit::NetworkProcess::terminate): Override ChildProcess::terminate to allow us to finish clearing the cache.
1875         * NetworkProcess/NetworkProcess.h:
1876
1877         * NetworkProcess/NetworkProcess.messages.in: Add the ClearCacheForAllOrigins message.
1878
1879         * NetworkProcess/mac/NetworkProcessMac.mm:
1880         (WebKit::NetworkProcess::clearCacheForAllOrigins): Clear the disk cache.
1881         (WebKit::NetworkProcess::platformTerminate): Wait for the clear to complete.
1882
1883         * UIProcess/WebResourceCacheManagerProxy.cpp:
1884         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Message the network process, also.
1885
1886         * WebProcess/mac/WebProcessMac.mm:
1887         (WebKit::WebProcess::platformClearResourceCaches): Don't clear the disk cache if we use the network process.
1888
1889 2013-03-28  Brady Eidson  <beidson@apple.com>
1890
1891         We leak NetworkConnectionToWebProcess objects.
1892         <rdar://problem/13393118> and https://bugs.webkit.org/show_bug.cgi?id=113551
1893
1894         Reviewed by Anders Carlsson.
1895
1896         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1897         (WebKit::NetworkConnectionToWebProcess::didClose): Remove this from the global set
1898           of NetworkConnectionToWebProcess objects.
1899
1900 2013-03-28  Brady Eidson  <beidson@apple.com>
1901
1902         Resources are never revalidated/reloaded if a cached response exists on disk.
1903         <rdar://problem/13479890> and https://bugs.webkit.org/show_bug.cgi?id=113542
1904
1905         Reviewed by Alexey Proskuryakov.
1906
1907         Trying to get a cached resource in didReceiveResponse and then aborting the load
1908         meant we never performed any new loads.
1909
1910         We can check and see if the data is cached data inside didReceiveBuffer, instead.
1911
1912         * NetworkProcess/NetworkResourceLoader.cpp:
1913         (WebKit::NetworkResourceLoader::didReceiveResponse): Don't try for cached resources here.
1914         (WebKit::NetworkResourceLoader::didReceiveData): This callback should never be used.
1915         (WebKit::NetworkResourceLoader::didReceiveBuffer): Try to see if this data objected represents
1916           a file based mmaped buffer.
1917         * NetworkProcess/NetworkResourceLoader.h:
1918
1919         Refactor these utility functions to start from either a CFURLCachedResponse or a SharedBuffer:
1920         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1921         (CFCachedURLResponseGetMemMappedData):
1922         (CFURLCacheIsMemMappedData):
1923         (WebKit::tryGetShareableHandleFromCFData):
1924         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
1925         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
1926
1927 2013-03-28  Tim Horton  <timothy_horton@apple.com>
1928
1929         [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
1930         https://bugs.webkit.org/show_bug.cgi?id=113430
1931         <rdar://problem/12729564>
1932
1933         Reviewed by Brady Eidson.
1934
1935         http://trac.webkit.org/changeset/147152 was wrong, and should have been
1936         (as the ChangeLog stated) testing the argument to redirectDataToPlugin,
1937         not the value of m_pluginView.
1938
1939         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1940         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
1941
1942 2013-03-28  Tim Horton  <timothy_horton@apple.com>
1943
1944         [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
1945         https://bugs.webkit.org/show_bug.cgi?id=113430
1946         <rdar://problem/12729564>
1947
1948         Reviewed by Brady Eidson.
1949
1950         Ignore redirectDataToPlugin(0), which is only called from PluginDocument::detach(),
1951         and only after r125500. Otherwise, PluginDocuments that are put into the page cache
1952         but leave later can clear a totally different and legitimate PluginView from the
1953         WebFrameLoaderClient, causing data to be lost and PluginDocument loads to stall.
1954
1955         This restores our behavior to the pre-r125500 state, which should be fine, as we
1956         clear WebFrameLoaderClient's m_pluginView when the load fails or finishes. This
1957         matches the changes made in r125500 for every platform other than Chromium and WebKit2.
1958
1959         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1960         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
1961
1962 2013-03-28  Tim Horton  <timothy_horton@apple.com>
1963
1964         PDFPlugin: shouldUsePDFPlugin can't use pdfLayerControllerClass() because it asserts if it's not available
1965         https://bugs.webkit.org/show_bug.cgi?id=113533
1966         <rdar://problem/13528720>
1967
1968         Reviewed by Simon Fraser.
1969
1970         * WebProcess/WebPage/WebPage.cpp:
1971         * WebProcess/WebPage/mac/WebPageMac.mm:
1972         (WebKit::WebPage::shouldUsePDFPlugin):
1973         Move shouldUsePDFPlugin to WebPageMac, where it belongs, and explicitly look up PDFLayerController
1974         instead of using pdfLayerControllerClass(), which ASSERT()s if it isn't available.
1975
1976 2013-03-28  Brady Eidson  <beidson@apple.com>
1977
1978         Reduce PluginProcess lifetime.
1979         <rdar://problem/12465479> and https://bugs.webkit.org/show_bug.cgi?id=113523
1980
1981         Reviewed by Sam Weinig.
1982
1983         Lower the minimum process lifetime from 30 minutes to 2 minutes.
1984         Lower the "shutdown after last plugin goes away" period from 10 minutes to 1 minute.
1985
1986         * UIProcess/Plugins/PluginProcessProxy.cpp:
1987
1988 2013-03-28  Zan Dobersek  <zdobersek@igalia.com>
1989
1990         [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
1991         https://bugs.webkit.org/show_bug.cgi?id=112546
1992
1993         Reviewed by Martin Robinson.
1994
1995         * GNUmakefile.am: Reference the platform_webcore_cppflags and GTK, libsecret and libsoup dependencies' cflags amongst the
1996         libPlatformGtk2's CPPFLAGS.
1997         * Scripts/generate-forwarding-headers.pl: Remove the Platform framework from the list of the frameworks to be searched
1998         for forwarding headers, it's at the moment not necessary to be included.
1999         * Shared/gtk/ArgumentCodersGtk.cpp: Adjust the forwarding header for GtkVersioning.h that's been moved back under the
2000         WebCore framework.
2001         * Shared/gtk/WebEventFactory.cpp: Ditto.
2002         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
2003         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Ditto.
2004
2005 2013-03-27  Tim Horton  <timothy_horton@apple.com>
2006
2007         Unreviewed Qt build fix after http://trac.webkit.org/changeset/147067.
2008
2009         * WebProcess/WebPage/WebPage.cpp:
2010
2011 2013-03-27  Tim Horton  <timothy_horton@apple.com>
2012
2013         PDFPlugin: Enable PDFPlugin only if its dependencies exist on the system
2014         https://bugs.webkit.org/show_bug.cgi?id=113372
2015         <rdar://problem/12685301>
2016
2017         Reviewed by Alexey Proskuryakov.
2018
2019         * Shared/mac/PDFKitImports.h: Wrap in #if PLATFORM(MAC).
2020         * WebProcess/WebPage/WebPage.cpp:
2021         (WebKit::WebPage::createPlugin): Use shouldUsePDFPlugin.
2022         (WebKit::WebPage::shouldUsePDFPlugin): If the PDFPlugin setting is enabled but PDFLayerController is not available, don't use PDFPlugin.
2023         * WebProcess/WebPage/WebPage.h:
2024         (WebPage): Add shouldUsePDFPlugin
2025         * WebProcess/WebPage/mac/WebPageMac.mm:
2026         (WebKit::WebPage::platformPreferencesDidChange): Use shouldUsePDFPlugin.
2027
2028 2013-03-27  Sam Weinig  <sam@webkit.org>
2029
2030         [WebKit2] Need SPI to determine whether a plug-in is blocked
2031         https://bugs.webkit.org/show_bug.cgi?id=113463
2032
2033         Reviewed by Anders Carlsson.
2034
2035         Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in,
2036         including whether it is blocked by x-protect.
2037
2038         * UIProcess/WebLoaderClient.cpp:
2039         * UIProcess/API/C/WKAPICast.h:
2040         (WebKit::toWKPluginLoadPolicy):
2041         (WebKit::toPluginModuleLoadPolicy):
2042         Move to a shared location.
2043
2044         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2045         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2046         (WKContextIsPlugInUpdateAvailable):
2047         (WKPlugInInfoPathKey):
2048         (WKPlugInInfoBundleIdentifierKey):
2049         (WKPlugInInfoVersionKey):
2050         (WKPlugInInfoLoadPolicyKey):
2051         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
2052         (WKContextCopyPlugInInfoForBundleIdetifier):
2053         Add new SPI and dictionary keys.
2054
2055         * UIProcess/Plugins/PluginInfoStore.cpp:
2056         (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
2057         * UIProcess/Plugins/PluginInfoStore.h:
2058         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2059         (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
2060         Add function to lookup plug-ins by bundle identifier.
2061
2062 2013-03-27  Beth Dakin  <bdakin@apple.com>
2063
2064         WKBundlePagePrivateMac.h is not being exported
2065         https://bugs.webkit.org/show_bug.cgi?id=113470
2066         -and corresponding-
2067         <rdar://problem/13522909>
2068
2069         Reviewed by Sam Weinig.
2070
2071         Mark it as private instead of project.
2072         * WebKit2.xcodeproj/project.pbxproj:
2073
2074 2013-03-26  Beth Dakin  <bdakin@apple.com>
2075
2076         Need WK2 API to give a WebView a header and footer
2077         https://bugs.webkit.org/show_bug.cgi?id=113352
2078         -and corresponding-
2079         <rdar://problem/13383835>
2080
2081         Reviewed by Simon Fraser.
2082
2083         New API allows setting and getting layers for a header and footer.
2084
2085         * WebKit2.xcodeproj/project.pbxproj:
2086         * WebProcess/InjectedBundle/API/c/mac: Added.
2087         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
2088         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
2089         (WKBundlePageGetHeaderLayer):
2090         (WKBundlePageSetHeaderLayer):
2091         (WKBundlePageGetFooterLayer):
2092         (WKBundlePageSetFooterLayer):
2093         * WebProcess/WebPage/WebPage.h:
2094         (WebPage):
2095         * WebProcess/WebPage/mac/WebPageMac.mm:
2096         (WebKit::WebPage::setTopOverhangImage):
2097         (WebKit::WebPage::setBottomOverhangImage):
2098         (WebKit):
2099         (WebKit::WebPage::getHeaderLayer):
2100         (WebKit::WebPage::setHeaderLayerWithHeight):
2101         (WebKit::WebPage::getFooterLayer):
2102         (WebKit::WebPage::setFooterLayerWithHeight):
2103
2104 2013-03-27  Jer Noble  <jer.noble@apple.com>
2105
2106         Going full screen and cancelling gets system into a weird state
2107         https://bugs.webkit.org/show_bug.cgi?id=113445
2108
2109         Reviewed by Eric Carlson.
2110
2111         Replace an array of BOOL member variables to track full screen state with a single enum, and
2112         add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new,
2113         more specific enum to be more stringent about the state when responding to WebProcess
2114         messages. Also only set the placeholder view's target once in full screen mode.
2115
2116         * UIProcess/mac/WKFullScreenWindowController.h:
2117         * UIProcess/mac/WKFullScreenWindowController.mm:
2118         (-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen,
2119             or waiting to enter full screen.
2120         (-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog
2121             has not already been made active.
2122         (-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable.
2123         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
2124         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target.
2125         (-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target.
2126         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
2127         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
2128         (-[WKFullScreenWindowController performClose:]): Ditto.
2129         (-[WKFullScreenWindowController close]): Ditto.
2130         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
2131
2132 2013-03-27  Brady Eidson  <beidson@apple.com>
2133
2134         Blind attempt at fixing the release build.
2135
2136         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2137         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2138
2139 2013-03-27  Brady Eidson  <beidson@apple.com>
2140
2141         Mem mapped resource data improvements.
2142         <rdar://problem/13196481> and https://bugs.webkit.org/show_bug.cgi?id=113422
2143
2144         Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen).
2145
2146         Remove timer-based approach support code:
2147         * NetworkProcess/NetworkResourceLoader.cpp:
2148         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2149         (WebKit::NetworkResourceLoader::abortInProgressLoad):
2150         (WebKit::NetworkResourceLoader::didFinishLoading):
2151         * NetworkProcess/NetworkResourceLoader.h:
2152
2153         Add an object to encapsulate monitoring a resource going in to the disk cache.
2154         It listens for a callback on the cached response indicating it is disk backed
2155         and also sets a timeout so we don't keep the monitor alive and waiting forever.
2156         * NetworkProcess/mac/DiskCacheMonitor.h: Added.
2157         (WebKit::DiskCacheMonitor::destinationID):
2158         (WebKit::DiskCacheMonitor::connectionToWebProcess):
2159         (WebKit::DiskCacheMonitor::resourceRequest):
2160         * NetworkProcess/mac/DiskCacheMonitor.mm: Added.
2161         (CFCachedURLResponseSetBecameFileBackedCallBackBlock):
2162         (WebKit::monitorFileBackingStoreCreation):
2163         (WebKit::DiskCacheMonitor::DiskCachingMonitor):
2164         (WebKit::DiskCacheMonitor::connection):
2165
2166         Refactoring and monitor certain cached responses:
2167         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2168         (CFCachedURLResponseGetMemMappedData):
2169         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData
2170           to explicitly get an mem-mapped data object.
2171         (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
2172         (WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum
2173           size then set up a disk caching monitor.
2174
2175         * WebKit2.xcodeproj/project.pbxproj:
2176
2177 2013-03-26  Timothy Hatcher  <timothy@apple.com>
2178
2179         Add support for dock-to-right of the Web Inspector in the Mac port.
2180
2181         Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
2182
2183         https://webkit.org/b/113341
2184         rdar://problem/10368152
2185
2186         Reviewed by Joseph Pecoraro.
2187
2188         * Resources/Dock.pdf: Removed.
2189         * Resources/DockBottom.pdf: Added.
2190         * Resources/DockRight.pdf: Added.
2191         * Shared/WebPreferencesStore.h:
2192         * UIProcess/WebInspectorProxy.cpp:
2193         (WebKit::WebInspectorProxy::WebInspectorProxy):
2194         (WebKit::WebInspectorProxy::attachBottom):
2195         (WebKit::WebInspectorProxy::attachRight):
2196         (WebKit::WebInspectorProxy::attach):
2197         (WebKit::WebInspectorProxy::detach):
2198         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
2199         (WebKit::WebInspectorProxy::createInspectorPage):
2200         (WebKit::WebInspectorProxy::canAttach):
2201         * UIProcess/WebInspectorProxy.h:
2202         (WebInspectorProxy):
2203         * UIProcess/WebInspectorProxy.messages.in:
2204         * UIProcess/mac/WebInspectorProxyMac.mm:
2205         (-[WKWebInspectorProxyObjCAdapter attachRight:]):
2206         (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
2207         (-[WKWebInspectorWindow _cursorForResizeDirection:]):
2208         (-[WKWebInspectorWindow _customTitleFrame]):
2209         (WebKit::createDockButton):
2210         (WebKit::WebInspectorProxy::createInspectorWindow):
2211         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2212         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2213         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2214         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
2215         (WebKit::WebInspectorProxy::platformAttach):
2216         (WebKit::WebInspectorProxy::platformDetach):
2217         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
2218         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
2219         * WebKit2.xcodeproj/project.pbxproj:
2220         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2221         (WebKit::WebInspectorFrontendClient::attachWindow):
2222         (WebKit::WebInspectorFrontendClient::setAttachedWindowWidth):
2223         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2224         (WebInspectorFrontendClient):
2225         * WebProcess/WebPage/WebInspector.cpp:
2226         (WebKit::WebInspector::attachBottom):
2227         (WebKit::WebInspector::attachRight):
2228         (WebKit::WebInspector::setAttachedWindowWidth):
2229         (WebKit::WebInspector::attachedBottom):
2230         (WebKit::WebInspector::attachedRight):
2231         (WebKit::WebInspector::detached):
2232         * WebProcess/WebPage/WebInspector.h:
2233         (WebInspector):
2234         * WebProcess/WebPage/WebInspector.messages.in:
2235
2236 2013-03-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2237
2238         [CoordGfx] Support to share GraphicsSurface flags with client.
2239         https://bugs.webkit.org/show_bug.cgi?id=112982
2240
2241         Reviewed by Noam Rosenthal.
2242
2243         Covered by existing WebGL tests.
2244
2245         This patch adds support to pass GraphicsSurface flags
2246         during it's client creation.
2247
2248         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2249         (CoreIPC::::encode):
2250         (CoreIPC::::decode):
2251
2252 2013-03-26  Hayato Ito  <hayato@chromium.org>
2253
2254         Allow ShadowContents in HitTests by default.
2255         https://bugs.webkit.org/show_bug.cgi?id=113171
2256
2257         Reviewed by Dimitri Glazkov.
2258
2259         * WebProcess/WebPage/WebFrame.cpp:
2260         (WebKit::WebFrame::hitTest):
2261         * WebProcess/WebPage/WebPage.cpp:
2262         (WebKit::WebPage::highlightPotentialActivation):
2263         (WebKit::WebPage::findZoomableAreaForPoint):
2264         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2265         * WebProcess/WebPage/mac/WebPageMac.mm:
2266         (WebKit::WebPage::shouldDelayWindowOrderingEvent):
2267         (WebKit::WebPage::acceptsFirstMouse):
2268
2269 2013-03-26  Tim Horton  <timothy_horton@apple.com>
2270
2271         [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
2272         https://bugs.webkit.org/show_bug.cgi?id=107539
2273         <rdar://problem/13032692>
2274
2275         Reviewed by Simon Fraser.
2276
2277         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2278         (InitWebCoreSystemInterface): Update WebCoreSystemInterface.
2279         * WebProcess/WebPage/WebPage.cpp:
2280         (WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary;
2281         Page defaults to in-window, which is wrong in many cases - we depend on
2282         Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually
2283         a state change or not.
2284         (WebKit::WebPage::setIsInWindow):
2285         * WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen.
2286         (WebKit::WebProcess::WebProcess):
2287         (WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process.
2288         (WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero,  clean up unused rendering resources.
2289         * WebProcess/WebProcess.h:
2290
2291 2013-03-26  Dean Jackson  <dino@apple.com>
2292
2293         When a primary plugin is restarted, also start similar plugins
2294         https://bugs.webkit.org/show_bug.cgi?id=113265
2295
2296         Reviewed by Tim Horton.
2297
2298         Remember the origin of the primary plugin, so that we can
2299         autostart anything that is similar.
2300
2301         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
2302         (WebKit::WebPlugInClient::WebPlugInClient): Keep a pointer to the WebPage.
2303         (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Pass the page onto the process.
2304         * WebProcess/WebCoreSupport/WebPlugInClient.h:
2305         (WebPlugInClient): New member variable for the WebPage we were created with.
2306         * WebProcess/WebPage/WebPage.cpp:
2307         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Remember the origin information
2308             for the primary plugin.
2309         (WebKit::WebPage::matchesPrimaryPlugIn): Returns true if we're seeing something that
2310             looks like the primary plugin.
2311         * WebProcess/WebPage/WebPage.h: New method matchesPrimaryPlugIn.
2312         * WebProcess/WebProcess.cpp:
2313         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check if the page thinks this is
2314             the primary plugin.
2315         * WebProcess/WebProcess.h: Accept a reference to the page in shouldPlugInAutoStartFromOrigin.
2316
2317 2013-03-26  Alexey Proskuryakov  <ap@apple.com>
2318
2319         Follow-up to:
2320         <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
2321         https://bugs.webkit.org/show_bug.cgi?id=113256
2322
2323         Reviewed by Mark Rowe.
2324
2325         * NetworkProcess/NetworkResourceLoader.h: Added some forgotten OVERRIDEs.
2326
2327 2013-03-26  Alexey Proskuryakov  <ap@apple.com>
2328
2329         <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
2330         https://bugs.webkit.org/show_bug.cgi?id=113256
2331
2332         Reviewed by Brady Eidson.
2333
2334         Use asynchronous version of ResourceHandle/ResourceHandleClient in NetworkProcess.
2335         We now run WebCore code on main thread, so we can't block it.
2336
2337         * DerivedSources.make:
2338         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2339         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
2340         * NetworkProcess/NetworkResourceLoader.messages.in: Added.
2341         * WebKit2.xcodeproj/project.pbxproj:
2342         Made NetworkResourceLoader a message receiver. Messages that used to be sync are
2343         now async, and responses need to be sent to the loader.
2344
2345         * NetworkProcess/NetworkResourceLoader.cpp:
2346         (WebKit::NetworkResourceLoader::willSendRequestAsync): This now happens on main
2347         thread, and thus cannot be sync.
2348         (WebKit::NetworkResourceLoader::continueWillSendRequest): Notify the resource
2349         handle once a response is ready.
2350         (WebKit::NetworkResourceLoader::didSendData): Removed unnecessary WebCore prefixes.
2351         (WebKit::NetworkResourceLoader::didReceiveCachedMetadata): Ditto.
2352         (WebKit::NetworkResourceLoader::wasBlocked):  Ditto.
2353         (WebKit::NetworkResourceLoader::cannotShowURL): Ditto.
2354         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): This function
2355         doesn't call through to WebProcess, so we can keep it synchronous. But we still
2356         need to implement the async version, since that's what ResourceHandle calls.
2357         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
2358         Made async.
2359         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
2360         Notify ResourceHandle when response is ready.
2361         (WebKit::NetworkResourceLoader::didReceiveDataArray): Removed unnecessary WebCore prefixes.
2362         (WebKit::NetworkResourceLoader::willCacheResponseAsync): This matches default
2363         implementation, but we are overriding everything to make it clearer what's missing.
2364         (WebKit::NetworkResourceLoader::willStopBufferingData): Removed unnecessary WebCore prefixes.
2365
2366         * NetworkProcess/NetworkResourceLoader.h: Updated to use async client methods.
2367         Keep ResourceRequest around while handling willSendRequest, as we need the original
2368         to recombine the request. Removed CFNet version of willCacheResponse for now,
2369         as we are not using it yet.
2370
2371         * Shared/Authentication/AuthenticationManager.cpp: Assert that methods touching
2372         a global HashMap all run on main thread. Changed generateAuthenticationChallengeID()
2373         to use regular increment, as there is no need to run it from a secondary thread.
2374
2375         * WebProcess/Network/NetworkProcessConnection.cpp:
2376         (WebKit::NetworkProcessConnection::didReceiveSyncMessage): We no longer have any
2377         sync messages.
2378
2379         * WebProcess/Network/WebResourceLoader.h:
2380         * WebProcess/Network/WebResourceLoader.cpp:
2381         (WebKit::WebResourceLoader::willSendRequest):
2382         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
2383         * WebProcess/Network/WebResourceLoader.messages.in:
2384         Changed to use async messages.
2385
2386 2013-03-26  Tim Horton  <timothy_horton@apple.com>
2387
2388         [wk2] Don't send intrinsic content size updates more than once per runloop
2389         https://bugs.webkit.org/show_bug.cgi?id=113258
2390         <rdar://problem/13492038>
2391
2392         Reviewed by Simon Fraser.
2393
2394         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2395         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2396         Only start the zero-delay timer if it's not already active.
2397
2398 2013-03-26  Tony Chang  <tony@chromium.org>
2399
2400         Autogenerate the scrollAnimatorEnabled setting in Settings.in
2401         https://bugs.webkit.org/show_bug.cgi?id=113253
2402
2403         Reviewed by James Robinson.
2404
2405         * WebProcess/WebPage/WebPage.cpp:
2406         (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
2407         (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).
2408
2409 2013-03-26  Andras Becsi  <andras.becsi@digia.com>
2410
2411         [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
2412         https://bugs.webkit.org/show_bug.cgi?id=113328
2413
2414         Reviewed by Jocelyn Turcotte.
2415
2416         Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249
2417
2418         We use QProcess::start() with a commandline string to start the web process
2419         and the string is treated by QProcess as a whitespace delimeted list of the
2420         command and the arguments, thus we have to escape the path to the process
2421         binaries so that if the path contains spaces we still run the appropriate
2422         command.
2423
2424         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2425         (WebKit::ProcessLauncher::launchProcess):
2426
2427 2013-03-26  Andras Becsi  <andras.becsi@digia.com>
2428
2429         [Qt][WK2] QML WebView asserts when double clicking a link
2430         https://bugs.webkit.org/show_bug.cgi?id=113329
2431
2432         Reviewed by Jocelyn Turcotte.
2433
2434         Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30288
2435
2436         Remove an erroneous assert which is no longer valid if
2437         mouse gestures are enabled.
2438
2439         * UIProcess/qt/QtWebPageEventHandler.cpp:
2440         (WebKit::QtWebPageEventHandler::handleInputEvent):
2441
2442 2013-03-26  Tim Horton  <timothy_horton@apple.com>
2443
2444         [wk2] Don't send intrinsic content size updates more than once per runloop
2445         https://bugs.webkit.org/show_bug.cgi?id=113258
2446         <rdar://problem/13492038>
2447
2448         Reviewed by Anders Carlsson.
2449
2450         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2451         (TiledCoreAnimationDrawingArea):
2452         Add a zero-delay timer for intrinsic content size updates.
2453         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2454         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2455         Add a zero-delay timer for intrinsic content size updates.
2456         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2457         Start our new one-shot zero-delay timer.
2458         (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
2459         Inform the WebPage that the intrinsic content size has changed.
2460
2461 2013-03-26  Simon Cooper  <scooper@apple.com>
2462
2463         bundle-ids need to be sanitized before using them in filesystem paths
2464         https://bugs.webkit.org/show_bug.cgi?id=113030
2465         <rdar://problem/13300254>
2466
2467         Reviewed by Alexey Proskuryakov.
2468
2469         When choosing / looking for a specialized Sandbox for a Plugin the
2470         bundle-id needs to be sanitized before using it to construct a
2471         filesystem name to look up. The “/“ character should not be allowed
2472         and transformed into something else, in this case a “:”
2473
2474         * PluginProcess/mac/PluginProcessMac.mm:
2475         (WebKit::loadSandboxProfile):
2476
2477 2013-03-26  Zeno Albisser  <zeno@webkit.org>
2478
2479         [Qt] UIProcess should initialize WebCoreSystemInterface.
2480         https://bugs.webkit.org/show_bug.cgi?id=113300
2481
2482         The WebCoreSystemInterface is necessary to detect supported
2483         mime types on Mac OS. In particular it is needed for download
2484         support.
2485         This patch fixes in particular the previously failing
2486         Qt API qmltest WebViewDownload::test_downloadRequest.
2487         The test was crashing when using QTKit, because functions
2488         in WebCoreSystemInterface could not be resolved on the UIProcess side.
2489
2490         Reviewed by Jocelyn Turcotte.
2491
2492         * UIProcess/qt/WebContextQt.cpp:
2493         (WebKit::WebContext::platformInitializeWebProcess):
2494
2495 2013-03-25  Kent Tamura  <tkent@chromium.org>
2496
2497         Rename ENABLE_INPUT_TYPE_DATETIME
2498         https://bugs.webkit.org/show_bug.cgi?id=113254
2499
2500         Reviewed by Kentaro Hara.
2501
2502         Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
2503         Actually I'd like to remove the code, but we shouldn't remove it yet
2504         because we shipped products with it on some platforms.
2505
2506         * Configurations/FeatureDefines.xcconfig:
2507
2508 2013-03-25  Dean Jackson  <dino@apple.com>
2509
2510         Cleanup plugin snapshotting autostart decision making
2511         https://bugs.webkit.org/show_bug.cgi?id=113231
2512
2513         Reviewed by Tim Horton.
2514
2515         Two major changes to the way snapshotting plugins may autostart.
2516
2517         The first is that previously WebCore was keeping a hash that
2518         represented the combination of page origin, plugin origin and
2519         mime type. WebKit was responsible for deciding if that particular
2520         hash should autostart. Now, WebKit keeps the hash, and WebCore
2521         just asks us whether the combination of origins and mimetype
2522         should start immediately. You can see this change the in WebPluginClient
2523         and WebProcess APIs.
2524
2525         The second change is that we now keep two types of structures
2526         around to decide whether a plugin should autostart. One is the
2527         existing page + plugin origin combination. The other is simply
2528         the plugin origin, which allows plugins from major providers
2529         to autostart no matter what page they were embedded on.
2530
2531         * Shared/WebProcessCreationParameters.cpp:
2532         (WebKit::WebProcessCreationParameters::encode): Encode the new parameter.
2533         (WebKit::WebProcessCreationParameters::decode): Decode the new parameter.
2534         * Shared/WebProcessCreationParameters.h: Also keep a list of strings around.
2535
2536         * UIProcess/API/C/WKContext.cpp:
2537         (WKContextSetPlugInAutoStartOrigins): The C API to send the list of plugin
2538             origins over to the context.
2539         * UIProcess/API/C/WKContext.h:
2540
2541         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2542         (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash): Renamed from addAutoStartOrigin.
2543             No functional change other than new names for members.
2544         (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy): Ditto.
2545         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Ditto.
2546         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Ditto.
2547         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray): New method that converts the
2548             incoming ImmutableArray into a Vector of Strings.
2549         (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Rename for new members.
2550         * UIProcess/Plugins/PlugInAutoStartProvider.h: Renaming member variables. Adding
2551             some typedefs to clean up code.
2552         (WebKit::PlugInAutoStartProvider::autoStartOrigins): New accessor.
2553
2554         * UIProcess/WebContext.cpp:
2555         (WebKit::WebContext::createNewWebProcess): Renaming, and copy the new parameter into the process creation.
2556         (WebKit::WebContext::addPlugInAutoStartOriginHash): Renaming.
2557         (WebKit::WebContext::setPlugInAutoStartOriginHashes): Renaming.
2558         (WebKit::WebContext::setPlugInAutoStartOrigins): New method.
2559         * UIProcess/WebContext.h: Adds the new setPlugInAutoStartOrigin method.
2560
2561         * WebProcess/Plugins/PluginView.cpp:
2562         (WebKit::PluginView::didInitializePlugin): Drive-by fix that was attempting to restart plugins
2563             that were in the process of restarting.
2564         (WebKit::PluginView::pluginDidReceiveUserInteraction): Temporarily suspend update of
2565             expiration time if the user interacts with a plugin.
2566
2567         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
2568         (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Renaming.
2569         (WebKit::WebPlugInClient::didStartFromOrigin): Ditto.
2570         * WebProcess/WebCoreSupport/WebPlugInClient.h: Renaming.
2571
2572         * WebProcess/WebProcess.cpp: Drive-by - noticed that we forgot to count seconds in
2573             a timeout threshold.
2574         (WebKit::WebProcess::initializeWebProcess): Also add the list of origins when we initialize.
2575         (WebKit::addCaseFoldedCharacters): Copied from WebCore - adds a String to a hash input.
2576         (WebKit::hashForPlugInOrigin): Copied from WebCore - hashing function.
2577         (WebKit::WebProcess::isPlugInAutoStartOriginHash): Renaming.
2578         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check the list of pure origins first. If
2579             that fails, fall back to the hash list of pairs.
2580         (WebKit::WebProcess::plugInDidStartFromOrigin): Renaming.
2581         (WebKit::WebProcess::didAddPlugInAutoStartOriginHash): Ditto.
2582         (WebKit::WebProcess::resetPlugInAutoStartOriginHashes): Ditto.
2583         (WebKit::WebProcess::plugInDidReceiveUserInteraction): Ditto.
2584         * WebProcess/WebProcess.h: Renaming some methods, but also adding the input of the new
2585             origin-only list.
2586
2587         * WebProcess/WebProcess.messages.in: Renaming a message.
2588
2589 2013-03-25  Maxim Ermilov  <maxim.ermilov@canonical.com>
2590
2591         [Qt] Qml WebKit needs preferences to change security knobs
2592         https://bugs.webkit.org/show_bug.cgi?id=111979
2593
2594         Reviewed by Jocelyn Turcotte.
2595
2596         * UIProcess/API/qt/qwebpreferences.cpp:
2597         (QWebPreferencesPrivate::testAttribute):
2598         (QWebPreferencesPrivate::setAttribute):
2599         (QWebPreferences::universalAccessFromFileURLsAllowed):
2600         (QWebPreferences::setUniversalAccessFromFileURLsAllowed):
2601         (QWebPreferences::fileAccessFromFileURLsAllowed):
2602         (QWebPreferences::setFileAccessFromFileURLsAllowed):
2603         * UIProcess/API/qt/qwebpreferences_p.h:
2604         * UIProcess/API/qt/qwebpreferences_p_p.h:
2605
2606 2013-03-23  Geoffrey Garen  <ggaren@apple.com>
2607
2608         Added a setting for whether JavaScript markup is enabled
2609         https://bugs.webkit.org/show_bug.cgi?id=112999
2610
2611         Rolled out a line from r146664 that was left over from before I adopted
2612         the Settings.in way of adding a new setting.
2613
2614         Reviewed by Ryosuke Niwa.
2615
2616         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2617         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): No need
2618         to initialize / override -- Settings.in settings do this automatically.
2619
2620         Also, dydx noticed that this line of code had a typo, and was totaly wrong.
2621
2622 2013-03-21  Kiran Muppala  <cmuppala@apple.com>
2623
2624         Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
2625         https://bugs.webkit.org/show_bug.cgi?id=112308
2626
2627         Reviewed by Gavin Barraclough.
2628
2629         Add private preference for enabling/disabling hidden page DOM timer
2630         throttling and CSS animation suspension.  The preference should be
2631         enabled by default only on Mac, where WebKit2 is a private API and
2632         hence compatibility is less of a issue.
2633
2634         * Shared/WebPreferencesStore.h:
2635         * UIProcess/API/C/WKPreferences.cpp:
2636         (WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled):
2637         (WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled):
2638         (WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled):
2639         (WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled):
2640         * UIProcess/API/C/WKPreferencesPrivate.h:
2641         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2642         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Allow
2643         WebKitTestRunner to override hiddenPageDOMTimerThrottlingEnabled.
2644         * WebProcess/WebPage/WebPage.cpp:
2645         (WebKit::WebPage::updatePreferences):
2646
2647 2013-03-22  Tim Horton  <timothy_horton@apple.com>
2648
2649         Plugin Snapshotting: Auto-start dominant plugins
2650         https://bugs.webkit.org/show_bug.cgi?id=113111
2651         <rdar://problem/13475726>
2652
2653         Reviewed by Dean Jackson.
2654
2655         * WebProcess/Plugins/PluginView.cpp:
2656         (WebKit::PluginView::didInitializePlugin):
2657         (WebKit::PluginView::paint):
2658         (WebKit::PluginView::invalidateRect):
2659         (WebKit::PluginView::isAcceleratedCompositingEnabled):
2660         Acknowledge the new "Restarting" DisplayState.
2661
2662 2013-03-21  Jer Noble  <jer.noble@apple.com>
2663
2664         After switching to another space and back, video races to catch up with audio
2665         https://bugs.webkit.org/show_bug.cgi?id=113006
2666
2667         Reviewed by Anders Carlsson.
2668
2669         Add an observer for the NSWorkspaceActiveSpaceDidChangeNotification notification, and trigger
2670         a visibility update when that notification is observed.
2671
2672         * UIProcess/API/mac/WKView.mm:
2673         (-[WKView dealloc]): Unregister the observer.
2674         (-[WKView _activeSpaceDidChange:]): Notify the view that its visibility may have changed.
2675         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add the observer.
2676
2677 2013-03-21  Geoffrey Garen  <ggaren@apple.com>
2678
2679         Added a setting for whether JavaScript markup is enabled
2680         https://bugs.webkit.org/show_bug.cgi?id=112999
2681
2682         Reviewed by Maciej Stachowiak.
2683
2684         This setting is useful for clients that want protection from script
2685         injection attacks.
2686
2687         * Shared/WebPreferencesStore.h:
2688         * UIProcess/API/C/WKPreferences.cpp:
2689         (WKPreferencesGetJavaScriptMarkupEnabled):
2690         (WKPreferencesSetJavaScriptMarkupEnabled):
2691         (WKPreferencesGetJavaScriptEnabled):
2692         * UIProcess/API/C/WKPreferences.h:
2693         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
2694         (-[WKBrowsingContextGroup allowsJavaScriptMarkup]):
2695         (-[WKBrowsingContextGroup setAllowsJavaScriptMarkup:]):
2696         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2697         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2698         * WebProcess/WebPage/WebPage.cpp:
2699         (WebKit::WebPage::updatePreferences): Plumbed through to API.
2700
2701 2013-03-22  Mario Sanchez Prada  <mario.prada@samsung.com>
2702
2703         [GTK] Include the right GL header for GLES2
2704         https://bugs.webkit.org/show_bug.cgi?id=113034
2705
2706         Reviewed by Martin Robinson.
2707
2708         Include GLES2/gl2.h when using GLES2.
2709
2710         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2711
2712 2013-03-22  Timothy Hatcher  <timothy@apple.com>
2713
2714         Fix an assert when opening the Web Inspector window for the first time.
2715
2716         rdar://problem/13471765
2717         https://webkit.org/b/113053
2718
2719         Reviewed by Eric Carlson.
2720
2721         * UIProcess/mac/WebInspectorProxyMac.mm:
2722         (WebKit::WebInspectorProxy::createInspectorWindow): Assign m_inspectorWindow
2723         earlier so it is ready for when center is called and windowDidMove: gets called.
2724
2725 2013-03-21  Tim Horton  <timothy_horton@apple.com>
2726
2727         [wk2] Page Overlays: Don't create backing store until the client asks us to paint
2728         https://bugs.webkit.org/show_bug.cgi?id=112989
2729         <rdar://problem/13355759>
2730
2731         Reviewed by Anders Carlsson.
2732
2733         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2734         (WebKit::WebInspectorClient::highlight):
2735         * WebProcess/WebPage/FindController.cpp:
2736         (WebKit::FindController::updateFindUIAfterPageScroll):
2737         Invalidate the entire overlay on installation, to maintain existing behavior
2738         on platforms where the fade-in animation is not performed by invalidating the overlay.
2739
2740         * WebProcess/WebPage/WebPage.cpp:
2741         (WebKit::WebPage::installPageOverlay):
2742         Don't invalidate the overlay upon installation.
2743
2744         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2745         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
2746         Create backing store for the page overlay layer the first time it is painted into.
2747         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2748         Don't update the size of the page overlay layer unless we intend for it to have backing store.
2749         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2750         Don't create backing store when we create the page overlay layer.
2751
2752 2013-03-21  Brady Eidson  <beidson@apple.com>
2753
2754         If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
2755         <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
2756
2757         Reviewed by Geoff Garen.
2758
2759         Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load
2760         completes and - if the resource is disk backed - send it to the WebProcess for sharing:
2761         * NetworkProcess/NetworkResourceLoader.cpp:
2762         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2763         (WebKit::NetworkResourceLoader::diskCacheTimerFired):
2764         (WebKit::NetworkResourceLoader::didReceiveResponse):
2765         (WebKit::NetworkResourceLoader::didReceiveData):
2766         (WebKit::NetworkResourceLoader::didFinishLoading):
2767         * NetworkProcess/NetworkResourceLoader.h:
2768
2769         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2770         (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
2771
2772         Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer
2773         doesn't already exist:
2774         * Platform/SharedMemory.h:
2775         * Platform/mac/SharedMemoryMac.cpp:
2776         (WebKit::SharedMemory::create):
2777         (WebKit::SharedMemory::createFromVMBuffer):
2778         (WebKit::SharedMemory::~SharedMemory):
2779
2780         Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer:
2781         * Shared/ShareableResource.cpp:
2782         (WebKit::shareableResourceDeallocate):
2783         (WebKit::createShareableResourceDeallocator):
2784         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
2785         * Shared/ShareableResource.h:
2786
2787         * Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest.
2788
2789         * WebProcess/Network/NetworkProcessConnection.cpp:
2790         (WebKit::NetworkProcessConnection::didReceiveMessage):
2791         (WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache
2792           and try to replace its encoded data with the shared mmap'ed buffer.
2793         * WebProcess/Network/NetworkProcessConnection.h:
2794         * WebProcess/Network/NetworkProcessConnection.messages.in:
2795
2796         * WebProcess/Network/WebResourceLoader.cpp:
2797         (WebKit::WebResourceLoader::didReceiveResource):
2798
2799 2013-03-21  Tim Horton  <timothy_horton@apple.com>
2800
2801         Unreviewed build fix, forgot to stage one file.
2802
2803         * WebProcess/WebPage/DrawingArea.h:
2804         (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame):
2805         (DrawingArea):
2806
2807 2013-03-21  Tim Horton  <timothy_horton@apple.com>
2808
2809         [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
2810         https://bugs.webkit.org/show_bug.cgi?id=111662
2811         <rdar://problem/13355808>
2812
2813         Reviewed by Dean Jackson.
2814
2815         Instead of setNeedsDisplay()ing the whole page overlay layer every time through
2816         TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
2817         necessary to keep things painted in the right place when we scroll (the overlay
2818         is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.
2819
2820         This works with threaded scrolling because overlay installation forces us
2821         into main-thread scrolling mode.
2822
2823         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2824         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2825         Plumb scroll offset changes through to the drawing area, so it can invalidate the page overlay.
2826         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2827         (TiledCoreAnimationDrawingArea):
2828         Add didChangeScrollOffsetForAnyFrame, for WebFrameLoaderClient to call us back when any frame scrolls.
2829         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2830         (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame):
2831         Invalidate the page overlay when any frame scrolls, so that find indicators in subframes are kept in the right place.
2832         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2833         Stop unconditionally invalidating the page overlay when we flush layers.
2834
2835 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2836
2837         [Mac] Move NSOperationQueue out of NetworkingContext
2838         https://bugs.webkit.org/show_bug.cgi?id=112970
2839
2840         Reviewed by Brady Eidson.
2841
2842         * NetworkProcess/NetworkResourceLoader.h:
2843         * NetworkProcess/mac/RemoteNetworkingContext.h:
2844         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2845         Tell ResourceHandle to use an operation queue in the new way.
2846
2847 2013-03-21  Timothy Hatcher  <timothy@apple.com>
2848
2849         Support connecting the Web Inspector without showing it.
2850
2851         This allows you to get the debugger attached in the background. When a breakpoint is hit
2852         the Inspector will open. This change also reduces some WebProcess messaging by removing
2853         the DidLoadInspectorPage message and stops sending the SetAttachedWindow message on close.
2854
2855         https://bugs.webkit.org/show_bug.cgi?id=112445
2856
2857         Reviewed by Sam Weinig.
2858
2859         * UIProcess/API/C/WKInspector.cpp:
2860         (WKInspectorIsConnected): Added.
2861         (WKInspectorConnect): Added.
2862         (WKInspectorHide): Added.
2863
2864         * UIProcess/API/C/WKInspector.h:
2865         Added new APIs.
2866
2867         * UIProcess/WebInspectorProxy.cpp:
2868         (WebKit::WebInspectorProxy::WebInspectorProxy):
2869         Initialize new state booleans.
2870
2871         (WebKit::WebInspectorProxy::invalidate):
2872         Don't set state booleans that didClose already resets.
2873
2874         (WebKit::WebInspectorProxy::connect): Added.
2875         (WebKit::WebInspectorProxy::show):
2876         Open if we are already connected. Call connect().
2877
2878         (WebKit::WebInspectorProxy::hide): Added.
2879
2880         (WebKit::WebInspectorProxy::close):
2881         Call didClose we can detach or close the window immediately instead of waiting for a
2882         message from the WebProcess.
2883
2884         (WebKit::WebInspectorProxy::attach):
2885         (WebKit::WebInspectorProxy::detach):
2886         Check for !m_page to match other functions.
2887
2888         (WebKit::WebInspectorProxy::createInspectorPage):
2889         (WebKit::WebInspectorProxy::didLoadInspectorPage):
2890         Removed. Moved logic to open().
2891
2892         (WebKit::WebInspectorProxy::open): Added.
2893
2894         (WebKit::WebInspectorProxy::didClose):
2895         Clear new state booleans. Don't perform work again if already closed. Use platformDetach()
2896         instead of detach() to avoid sending the SetAttachedWindow message.
2897
2898         (WebKit::WebInspectorProxy::bringToFront):
2899         Call open() if we are not visible yet, otherwise platformBringToFront.
2900
2901         * UIProcess/WebInspectorProxy.h:
2902         (WebKit::WebInspectorProxy::isConnected): Added.
2903
2904         * UIProcess/WebInspectorProxy.messages.in: Removed DidLoadInspectorPage.
2905
2906         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2907         (WebKit::WebInspectorProxy::platformHide): Added stub.
2908
2909         * UIProcess/mac/WebInspectorProxyMac.mm:
2910         (WebKit::WebInspectorProxy::platformHide): Added.
2911
2912         * UIProcess/qt/WebInspectorProxyQt.cpp:
2913         (WebKit::WebInspectorProxy::platformHide): Added stub.
2914
2915         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2916         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2917         Removed frontendLoaded().
2918
2919         * WebProcess/WebPage/WebInspector.cpp:
2920         * WebProcess/WebPage/WebInspector.h:
2921         Removed didLoadInspectorPage().
2922
2923 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2924
2925         Build fix.
2926
2927         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Include CurrentTime.h, as needed
2928         to call currentTime().
2929
2930 2013-03-21  Tim Horton  <timothy_horton@apple.com>
2931
2932         Tiled page overlay layers don't create tiles until the first flush after they switch to being tiled
2933         https://bugs.webkit.org/show_bug.cgi?id=112860
2934         <rdar://problem/13468400>
2935
2936         Reviewed by Simon Fraser.
2937
2938         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2939         (TiledCoreAnimationDrawingArea): Add storage for m_clipsToExposedRect.
2940         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2941         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2942         The page overlay layer will never have children, so we can use flushCompositingState instead of the ForThisLayerOnly variant.
2943         Pass the visible rect of the page overlay layer (computed by intersecting its bounds with the exposed
2944         rect that comes from the WKView) to flushCompositingState; don't bother setting the visible rect manually.
2945         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
2946         Store m_clipsToExposedRect so we can use it in flushLayers.
2947
2948 2013-03-20  Benjamin Poulain  <bpoulain@apple.com>
2949
2950         [WK2] Remove VIEW_MODE_CSS_MEDIA from WebKit2
2951         https://bugs.webkit.org/show_bug.cgi?id=112849
2952
2953         Reviewed by Sam Weinig.
2954
2955         The code was added in r137148 for the sole purpose of testing,
2956         and it is not even being properly tested.
2957
2958         Remove the code until someone actually implement the feature in WebKit2.
2959
2960         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2961         (WKBundlePageCanShowMIMEType):
2962         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2963         * WebProcess/WebPage/WebPage.cpp:
2964         * WebProcess/WebPage/WebPage.h:
2965         (WebPage):
2966
2967 2013-03-20  Zan Dobersek  <zdobersek@igalia.com>
2968
2969         [GTK] Build ANGLE sources into a separate library from libWebCore.la
2970         https://bugs.webkit.org/show_bug.cgi?id=112778
2971
2972         Reviewed by Martin Robinson.
2973
2974         * GNUmakefile.am: Add libLevelDB.la to the libwebkit2gtk library if using the OpenGL accelerated backend.
2975
2976 2013-03-20  Andras Becsi  <andras.becsi@digia.com>
2977
2978         [Qt][WK2] Clean up sanity checks related to gesture recognition
2979         https://bugs.webkit.org/show_bug.cgi?id=112679
2980
2981         Reviewed by Jocelyn Turcotte.
2982
2983         The only callers of the panGestureActive and pinchGestureActive member
2984         functions of the page viewport controller client are event delivery
2985         related sanity check assers, thus they can be replaced by checking
2986         for the corresponding internal states and therefore the superfluous
2987         members can be removed.
2988         Also update other asserts in the page viewport controller client to
2989         be more accurate about the expected states.
2990
2991         * UIProcess/qt/PageViewportControllerClientQt.cpp:
2992         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
2993         (WebKit::PageViewportControllerClientQt::touchBegin):
2994         (WebKit::PageViewportControllerClientQt::panGestureStarted):
2995         (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
2996         * UIProcess/qt/PageViewportControllerClientQt.h:
2997         (PageViewportControllerClientQt):
2998         * UIProcess/qt/QtWebPageEventHandler.cpp:
2999         (WebKit::QtWebPageEventHandler::handleInputEvent):
3000
3001 2013-03-20  Andras Becsi  <andras.becsi@digia.com>
3002
3003         [Qt][WK2] Refactor handling of content suspension to properly cover corner cases
3004         https://bugs.webkit.org/show_bug.cgi?id=111751
3005
3006         Reviewed by Jocelyn Turcotte.
3007
3008         The current suspend / resume infrastructure turned out to be insufficient to cover
3009         all corner cases during transitions between gestures of complex gesture chains.
3010
3011         The requirements for robust suspend / resume handling are:
3012             - Keep the content suspended while the user is continuously interacting,
3013         eg. does not lift the finger between transition from a pan to a pinch gesture
3014         and vice versa.
3015             - The content should not be suspended unnecessarily (like for a tap gesture),
3016         only during panning and scroll animation (flick), as well as pinch zoom and scale
3017         animation (also includes double-tap-to-zoom).
3018             - The content should never end up stuck in suspended state after long gesture
3019         chains and continuous interaction.
3020
3021         This patch reintroduces reference counting based suspension in form of a new
3022         ViewportInteractionTracker member class to make it possible to reliably control the
3023         suspend / resume cycles during scrolling and scaling.
3024         During continuous gestures, while the user is interacting, the reference count is
3025         increased without actually suspending the content to prevent resuming unnecessarily
3026         during continuous interaction. At the same time this also assures that the page is
3027         not suspended for simple tap gestures, which was a side-effect of the previous
3028         approach based on update deferrers.
3029         The newly added functionality replaces boolean members that tried to achive the
3030         above requirements.
3031         Additionally this patch also removes the redundant m_hasSuspendedContent member
3032         from the PageViewportController since WebPageProxy already keeps this information.
3033
3034         * UIProcess/PageViewportController.cpp:
3035         (WebKit::PageViewportController::PageViewportController):
3036         (WebKit::PageViewportController::pageDidRequestScroll):
3037         (WebKit::PageViewportController::updateMinimumScaleToFit):
3038         * UIProcess/PageViewportController.h:
3039         (PageViewportController):
3040         * UIProcess/WebPageProxy.h:
3041         (WebKit::WebPageProxy::areActiveDOMObjectsAndAnimationsSuspended):
3042         * UIProcess/qt/PageViewportControllerClientQt.cpp:
3043         (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):
3044         (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::begin):
3045         (WebKit):
3046         (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::end):
3047         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
3048         (WebKit::PageViewportControllerClientQt::flickMoveStarted):
3049         (WebKit::PageViewportControllerClientQt::flickMoveEnded):
3050         (WebKit::PageViewportControllerClientQt::pageItemPositionChanged):
3051         (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged):
3052         (WebKit::PageViewportControllerClientQt::touchBegin):
3053         (WebKit::PageViewportControllerClientQt::touchEnd):
3054         (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
3055         (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
3056         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
3057         (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
3058         (WebKit::PageViewportControllerClientQt::pinchGestureCancelled):
3059         (WebKit::PageViewportControllerClientQt::didChangeContentsSize):
3060         * UIProcess/qt/PageViewportControllerClientQt.h:
3061         (ViewportInteractionTracker):
3062         (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::ViewportInteractionTracker):
3063         (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::inProgress):
3064         (PageViewportControllerClientQt):
3065
3066 2013-03-19  Kenneth Rohde Christiansen  <kenneth@webkit.org> and Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3067
3068         [EFL][WK2] Separate WebView further from EwkView
3069         https://bugs.webkit.org/show_bug.cgi?id=111591
3070
3071         Reviewed by Caio Marcelo de Oliveira Filho.
3072
3073         Main points are:
3074         - WKView API has no dependency on EFL types
3075         - WebView class does not store the Evas_Object
3076
3077         * UIProcess/API/C/efl/WKView.cpp:
3078         (WKViewCreate):
3079
3080             WKView creation does not require any EFL objects to be passed.
3081
3082         * UIProcess/API/C/efl/WKView.h:
3083         * UIProcess/API/efl/EwkView.cpp:
3084         (EwkView::EwkView):
3085         (EwkView::create):
3086
3087             WKViewRef is passed to EwkView constructor from outside rather than
3088             created inside.
3089
3090         (EwkView::webView):
3091         * UIProcess/API/efl/EwkView.h:
3092         (EwkView):
3093         (EwkView::wkView):
3094         (EwkView::page):
3095
3096             EwkView keeps WKViewRef rather than pointer to WebView class.
3097
3098         * UIProcess/API/efl/ewk_view_private.h: Added.
3099         (EWKViewCreate):
3100         (EWKViewGetWKView):
3101
3102             Added private API to create ewk view evas object and return its WKViewRef.
3103
3104         * UIProcess/API/efl/ewk_view.cpp:
3105         (ewkCreateEvasObject):
3106         (ewk_view_smart_add):
3107         (ewk_view_add):
3108         (ewk_view_add_with_context):
3109         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3110         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3111
3112             Updated accordingly to the new APIs.
3113
3114         * UIProcess/efl/WebView.cpp:
3115         (WebKit::WebView::WebView):
3116         (WebKit::WebView::create):
3117         (WebKit):
3118         (WebKit::WebView::setEwkView):
3119         (WebKit::WebView::isViewFocused):
3120         (WebKit::WebView::isViewVisible):
3121         * UIProcess/efl/WebView.h:
3122         (WebView):
3123
3124             Implementation of updated WKView API.
3125
3126 2013-03-19  Dean Jackson  <dino@apple.com>
3127
3128         Allow PlugIn Snapshotting to be tested
3129         https://bugs.webkit.org/show_bug.cgi?id=98696
3130
3131         Reviewed by Tim Horton.
3132
3133         Use the new maximumPlugInSnapshotAttempts setting rather than a hardcoded
3134         value. At the same time, if this value is 0, then snapshot immediately
3135         (don't wait to get a snapshot and test it).
3136
3137         * WebProcess/Plugins/PluginView.cpp:
3138         (WebKit::PluginView::didInitializePlugin): Snapshot immediately if maximum attempts are 0.
3139         (WebKit::PluginView::pluginSnapshotTimerFired): Use setting rather than file local variable.
3140
3141 2013-03-19  Dean Jackson  <dino@apple.com>
3142
3143         Restarting a snapshotted plugin should restart all plugins from the same domain on the page
3144         https://bugs.webkit.org/show_bug.cgi?id=112725
3145
3146         Reviewed by Tim Horton.
3147
3148         When we add a plugin domain hash to the list of sites that autostart, we
3149         send a message to our owning process. That message might not return before
3150         another plugin queries if it is in the list. So, before we send the message,
3151         add the current hash to the list with a very small timeout. That way the
3152         response will be to either extend the timeout, or not add the hash (in which
3153         case it will expire soon).
3154
3155         * WebProcess/WebProcess.cpp:
3156         (WebKit::WebProcess::addPlugInAutoStartOrigin):
3157
3158 2013-03-19  Zan Dobersek  <zdobersek@igalia.com>
3159
3160         [GTK] Fix WebKit2 builds after r146193
3161         https://bugs.webkit.org/show_bug.cgi?id=112700
3162
3163         Reviewed by Martin Robinson.
3164
3165         Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193
3166         to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as
3167         the source of GraphicsLayer objects that should be operated on, making it possible to
3168         support multiple page overlays.
3169
3170         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3171         (WebKit::LayerTreeHostGtk::initialize):
3172         (WebKit::LayerTreeHostGtk::invalidate):
3173         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
3174         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
3175         (WebKit::LayerTreeHostGtk::sizeDidChange):
3176         (WebKit::LayerTreeHostGtk::didInstallPageOverlay):
3177         (WebKit::LayerTreeHostGtk::didUninstallPageOverlay):
3178         (WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay):
3179         (WebKit::LayerTreeHostGtk::paintContents):
3180         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
3181         (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
3182         (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
3183         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3184         (LayerTreeHostGtk):
3185
3186 2013-03-19  Tim Horton  <timothy_horton@apple.com>
3187
3188         [wk2] Should support multiple page overlays, like the API suggests
3189         https://bugs.webkit.org/show_bug.cgi?id=112505
3190         <rdar://problem/13424796>
3191
3192         Reviewed by Simon Fraser.
3193
3194         * WebProcess/WebPage/DrawingAreaImpl.h:
3195         * WebProcess/WebPage/LayerTreeHost.h:
3196         * WebProcess/WebPage/DrawingArea.h:
3197         (WebKit::DrawingArea::didInstallPageOverlay):
3198         (WebKit::DrawingArea::didUninstallPageOverlay):
3199         (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
3200         (WebKit::DrawingArea::setPageOverlayOpacity):
3201         Add PageOverlay argument.
3202
3203         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3204         (WebKit::DrawingAreaImpl::didInstallPageOverlay):
3205         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
3206         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
3207         (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
3208         Add PageOverlay argument, forward it to LayerTreeHost.
3209         (WebKit::DrawingAreaImpl::display):
3210         Paint all of the PageOverlays that WebPage knows about.
3211
3212         * WebProcess/WebPage/PageOverlay.cpp:
3213         (WebKit::PageOverlay::setNeedsDisplay):
3214         (WebKit::PageOverlay::fadeAnimationTimerFired):
3215         Pass the relevant PageOverlay into the DrawingArea methods that now take it.
3216
3217         * WebProcess/WebPage/WebPage.cpp:
3218         (WebKit::WebPage::drawPageOverlay):
3219         Take the PageOverlay to draw as an argument.
3220         (WebKit::WebPage::installPageOverlay):
3221         (WebKit::WebPage::uninstallPageOverlay):
3222         Allow (un)installation of multiple PageOverlays.
3223         (WebKit::WebPage::mouseEvent):
3224         (WebKit::WebPage::mouseEventSyncForTesting):
3225         Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).
3226
3227         * WebProcess/WebPage/WebPage.h:
3228         (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
3229         (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
3230         (WebKit::WebPage::pageOverlays): Return the whole vector of overlays.
3231
3232         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3233         Add PageOverlay argument to a few methods.
3234         Add storage for a map of PageOverlay->GraphicsLayers.
3235
3236         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3237         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
3238         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
3239         (WebKit::LayerTreeHostMac::sizeDidChange):
3240         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
3241         Operate on all installed PageOverlays, not just the most recently installed one.
3242
3243         (WebKit::LayerTreeHostMac::didInstallPageOverlay):
3244         (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
3245         Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer.
3246
3247         (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
3248         Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.
3249
3250         (WebKit::LayerTreeHostMac::paintContents):
3251         Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
3252         While not ideal (crawling the map), the vast majority of the time there will only be one entry.
3253
3254         (WebKit::LayerTreeHostMac::initialize):
3255         Create layers for all of WebPage's active PageOverlays.
3256         
3257         (WebKit::LayerTreeHostMac::createPageOverlayLayer):
3258         Stick the newly-created GraphicsLayer into the m_pageOverlays map.
3259         Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays.
3260
3261         (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
3262         Remove the relevant overlay from the m_pageOverlays map and tear it down.
3263
3264         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3265         (TiledCoreAnimationDrawingArea):
3266         Add PageOverlay argument to a few methods.
3267         Add storage for a map of PageOverlay->GraphicsLayers.
3268         Add storage for a map of GraphicsLayer->CALayers.
3269
3270         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3271         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
3272         Pass PageOverlay argument on to createPageOverlayLayer.
3273         
3274         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
3275         Pass PageOverlay argument on to destroyPageOverlayLayer.
3276         Refrain from re-enabling threaded scrolling if there are still more overlays installed.
3277         
3278         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
3279         Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.
3280
3281         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
3282         Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
3283         While not ideal (crawling the map), the vast majority of the time there will only be one entry.
3284
3285         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
3286         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3287         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
3288         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
3289         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3290         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3291         Operate on all installed PageOverlays, not just the most recently installed one.
3292
3293         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3294         Stick the newly-created GraphicsLayer into the m_pageOverlays map.
3295         Also, add its platformLayer to our m_pageOverlayPlatformLayers map.
3296
3297         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
3298         Remove the relevant overlay from the m_pageOverlays and m_pageOverlayPlatformLayers maps and tear it down.
3299
3300         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
3301         When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer
3302         has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map),
3303         the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the
3304         layer we have inserted into the root layer. We need to keep the layer ordering consistent with
3305         installation order, as well.
3306
3307         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3308         (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
3309         Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost,
3310         as this patch does not implement multiple overlay support for Coordinated Graphics.
3311         Keep track of the current PageOverlay so that paintContents can hand WebPage the right one.
3312         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay.
3313         (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument.
3314         (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument.
3315         (WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying.
3316         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3317         (CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay.
3318
3319 2013-03-19  Sheriff Bot  <webkit.review.bot@gmail.com>
3320
3321         Unreviewed, rolling out r146183.
3322         http://trac.webkit.org/changeset/146183
3323         https://bugs.webkit.org/show_bug.cgi?id=112673
3324
3325         Caused a few dozens of editing tests to fail on Mac WK2
3326         (Requested by rniwa on #webkit).
3327
3328         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3329         (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
3330         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
3331         (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay):
3332         (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity):
3333         (WebKit::CoordinatedLayerTreeHost::paintContents):
3334         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3335         (CoordinatedLayerTreeHost):
3336         * WebProcess/WebPage/DrawingArea.h:
3337         (WebKit):
3338         (WebKit::DrawingArea::didInstallPageOverlay):
3339         (WebKit::DrawingArea::didUninstallPageOverlay):
3340         (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
3341         (WebKit::DrawingArea::setPageOverlayOpacity):
3342         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3343         (WebKit::DrawingAreaImpl::didInstallPageOverlay):
3344         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
3345         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
3346         (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
3347         (WebKit::DrawingAreaImpl::display):
3348         * WebProcess/WebPage/DrawingAreaImpl.h:
3349         (DrawingAreaImpl):
3350         * WebProcess/WebPage/LayerTreeHost.h:
3351         (LayerTreeHost):
3352         (WebKit::LayerTreeHost::setPageOverlayOpacity):
3353         * WebProcess/WebPage/PageOverlay.cpp:
3354         (WebKit::PageOverlay::setNeedsDisplay):
3355         (WebKit::PageOverlay::fadeAnimationTimerFired):
3356         * WebProcess/WebPage/WebPage.cpp:
3357         (WebKit::WebPage::drawPageOverlay):
3358         (WebKit::WebPage::installPageOverlay):
3359         (WebKit::WebPage::uninstallPageOverlay):
3360         (WebKit::WebPage::mouseEvent):
3361         (WebKit::WebPage::mouseEventSyncForTesting):
3362         * WebProcess/WebPage/WebPage.h:
3363         (WebKit):
3364         (WebPage):
3365         (WebKit::WebPage::hasPageOverlay):
3366         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3367         (WebKit):
3368         (LayerTreeHostMac):
3369         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3370         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
3371         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
3372         (WebKit::LayerTreeHostMac::sizeDidChange):
3373         (WebKit::LayerTreeHostMac::didInstallPageOverlay):
3374         (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
3375         (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
3376         (WebKit::LayerTreeHostMac::paintContents):
3377         (WebKit::LayerTreeHostMac::initialize):
3378         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
3379         (WebKit::LayerTreeHostMac::createPageOverlayLayer):
3380         (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
3381         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3382         (TiledCoreAnimationDrawingArea):
3383         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3384         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
3385         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
3386         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
3387         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
3388         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
3389         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3390         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
3391         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
3392         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3393         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3394         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3395         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
3396         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
3397
3398 2013-03-18  Tim Horton  <timothy_horton@apple.com>
3399
3400         [wk2] Should support multiple page overlays, like the API suggests
3401         https://bugs.webkit.org/show_bug.cgi?id=112505
3402         <rdar://problem/13424796>
3403
3404         Reviewed by Simon Fraser.
3405
3406         * WebProcess/WebPage/DrawingAreaImpl.h:
3407         * WebProcess/WebPage/LayerTreeHost.h:
3408         * WebProcess/WebPage/DrawingArea.h:
3409         (WebKit::DrawingArea::didInstallPageOverlay):
3410         (WebKit::DrawingArea::didUninstallPageOverlay):
3411         (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
3412         (WebKit::DrawingArea::setPageOverlayOpacity):
3413         Add PageOverlay argument.
3414
3415         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3416         (WebKit::DrawingAreaImpl::didInstallPageOverlay):
3417         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
3418         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
3419         (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
3420         Add PageOverlay argument, forward it to LayerTreeHost.
3421         (WebKit::DrawingAreaImpl::display):
3422         Paint all of the PageOverlays that WebPage knows about.
3423
3424         * WebProcess/WebPage/PageOverlay.cpp:
3425         (WebKit::PageOverlay::setNeedsDisplay):
3426         (WebKit::PageOverlay::fadeAnimationTimerFired):
3427         Pass the relevant PageOverlay into the DrawingArea methods that now take it.
3428
3429         * WebProcess/WebPage/WebPage.cpp:
3430         (WebKit::WebPage::drawPageOverlay):
3431         Take the PageOverlay to draw as an argument.
3432         (WebKit::WebPage::installPageOverlay):
3433         (WebKit::WebPage::uninstallPageOverlay):
3434         Allow (un)installation of multiple PageOverlays.
3435         (WebKit::WebPage::mouseEvent):
3436         (WebKit::WebPage::mouseEventSyncForTesting):
3437         Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).
3438
3439         * WebProcess/WebPage/WebPage.h:
3440         (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
3441         (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
3442         (WebKit::WebPage::pageOverlays): Return the whole vector of overlays.
3443
3444         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3445         Add PageOverlay argument to a few methods.
3446         Add storage for a map of PageOverlay->GraphicsLayers.
3447
3448         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3449         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
3450         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
3451         (WebKit::LayerTreeHostMac::sizeDidChange):
3452         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
3453         Operate on all installed PageOverlays, not just the most recently installed one.
3454
3455         (WebKit::LayerTreeHostMac::didInstallPageOverlay):
3456         (WebKit::LayerTreeHostMac::didUninstallPageOverlay):