bd8a90aa28d89256bdccd4e8631f0bda2e5e8100
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
2
3         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
4         https://bugs.webkit.org/show_bug.cgi?id=141782
5
6         Reviewed by Carlos Garcia Campos.
7
8         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
9         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
10
11             Modified to create scaled size of window.
12
13         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
14         (WebKit::LayerTreeHostGtk::initialize):
15         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
16
17             We should apply device scale factor to the root layer to apply
18             the scale matrix before applying other transform matrices.
19
20         (WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
21         (WebKit::LayerTreeHostGtk::pageScaleFactor): Added.
22
23 2015-09-29  Daniel Bates  <dabates@apple.com>
24
25         Make WebKit for iOS Simulator build with the public iOS 9 SDK
26         https://bugs.webkit.org/show_bug.cgi?id=149652
27
28         Reviewed by Simon Fraser.
29
30         * Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
31         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
32         * WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
33
34 2015-09-29  Brady Eidson  <beidson@apple.com>
35
36         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
37         https://bugs.webkit.org/show_bug.cgi?id=149651
38
39         Rubberstamped by Alex Christensen.
40
41         * DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
42         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
43
44 2015-09-29  Brady Eidson  <beidson@apple.com>
45
46         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
47         https://bugs.webkit.org/show_bug.cgi?id=149651
48
49         Reviewed by Alex Christensen.
50
51         * DatabaseProcess/DatabaseProcess.cpp:
52         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
53         (WebKit::DatabaseProcess::postDatabaseTask):
54         (WebKit::DatabaseProcess::performNextDatabaseTask):
55         (WebKit::DatabaseProcess::fetchWebsiteData):
56         (WebKit::DatabaseProcess::deleteWebsiteData):
57         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
58         * DatabaseProcess/DatabaseProcess.h:
59         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
60         (WebKit::UniqueIDBDatabase::shutdown):
61         (WebKit::UniqueIDBDatabase::shutdownBackingStore):
62         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
63         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
64         (WebKit::UniqueIDBDatabase::openTransaction):
65         (WebKit::UniqueIDBDatabase::beginTransaction):
66         (WebKit::UniqueIDBDatabase::commitTransaction):
67         (WebKit::UniqueIDBDatabase::resetTransaction):
68         (WebKit::UniqueIDBDatabase::rollbackTransaction):
69         (WebKit::UniqueIDBDatabase::postTransactionOperation):
70         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
71         (WebKit::UniqueIDBDatabase::createObjectStore):
72         (WebKit::UniqueIDBDatabase::deleteObjectStore):
73         (WebKit::UniqueIDBDatabase::clearObjectStore):
74         (WebKit::UniqueIDBDatabase::createIndex):
75         (WebKit::UniqueIDBDatabase::deleteIndex):
76         (WebKit::UniqueIDBDatabase::putRecord):
77         (WebKit::UniqueIDBDatabase::getRecord):
78         (WebKit::UniqueIDBDatabase::openCursor):
79         (WebKit::UniqueIDBDatabase::cursorAdvance):
80         (WebKit::UniqueIDBDatabase::cursorIterate):
81         (WebKit::UniqueIDBDatabase::count):
82         (WebKit::UniqueIDBDatabase::deleteRange):
83         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
84         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
85         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
86         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
87         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
88         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
89         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
90         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
91         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
92         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
93         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
94         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
95         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
96         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
97         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
98         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
99         (WebKit::UniqueIDBDatabase::countInBackingStore):
100         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
101         (WebKit::UniqueIDBDatabase::postMainThreadTask):
102         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
103         (WebKit::UniqueIDBDatabase::postDatabaseTask):
104         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
105         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
106         * WebKit2.xcodeproj/project.pbxproj:
107
108 2015-09-29  Chris Dumez  <cdumez@apple.com>
109
110         Memory cache revalidations should refresh the network disk cache
111         https://bugs.webkit.org/show_bug.cgi?id=149606
112
113         Reviewed by Darin Adler.
114
115         Previously, resource revalidations triggered by the memory cache would
116         bypass the disk cache entirely because the requests are conditional. As
117         a result, when the server responds with a 304, we were unable to update
118         the headers (e.g. new expiration date) of the corresponding entry in
119         the disk cache.
120
121         This patch updates our disk cache implementation to not bypass the disk
122         cache when the request is conditional. Instead, we look up the cached
123         entry and force its revalidation from the network. If the server then
124         returns a 304, we are now able to update the headers of this cached
125         entry. In such case though, we let the 304 response through to WebCore
126         unlike revalidations triggered by the disk cache.
127
128         * NetworkProcess/NetworkResourceLoader.cpp:
129         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
130         * NetworkProcess/cache/NetworkCache.cpp:
131         (WebKit::NetworkCache::makeUseDecision):
132         (WebKit::NetworkCache::makeRetrieveDecision):
133
134 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
135
136         printing does not use minimum page zoom factor
137         https://bugs.webkit.org/show_bug.cgi?id=108507
138
139         Reviewed by Darin Adler.
140
141         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
142         should be generated in printing mode.
143
144         * Shared/API/c/WKImage.h:
145         * Shared/API/c/WKSharedAPICast.h:
146         (WebKit::toSnapshotOptions):
147         * Shared/ImageOptions.h:
148         * WebProcess/InjectedBundle/InjectedBundle.cpp:
149         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
150         reference instead of a pointer.
151         * WebProcess/WebPage/WebPage.cpp:
152         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
153         calculate the bitmap height based on the number of pages.
154         (WebKit::WebPage::snapshotAtSize): In case of printing, use
155         PrintContext::spoolAllPagesWithBoundaries() and return.
156
157 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
158
159         Expose 'geometryFlipped' state for debugging/logging purposes
160         https://bugs.webkit.org/show_bug.cgi?id=149557
161
162         Reviewed by Simon Fraser.
163
164         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
165         (WebKit::PlatformCALayerRemote::geometryFlipped): Added.
166         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
167
168 2015-09-28  Brady Eidson  <beidson@apple.com>
169
170         Add an IDB Server that can roundtrip a request back to the client.
171         https://bugs.webkit.org/show_bug.cgi?id=149603
172
173         Reviewed by Alex Christensen.
174
175         * WebProcess/Databases/WebDatabaseProvider.h:
176
177 2015-09-28  Beth Dakin  <bdakin@apple.com>
178
179         Heavy taps on links are sometimes interpreted as the preview gesture
180         https://bugs.webkit.org/show_bug.cgi?id=149304
181         -and corresponding-
182         rdar://problem/22689258
183
184         Rubber-stamped by Tim Horton.
185
186         Rolling out this patch. We should try to fix this at the UIKit-level.
187         * UIProcess/ios/WKContentViewInteraction.h:
188         * UIProcess/ios/WKContentViewInteraction.mm:
189         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
190         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
191
192 2015-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
193
194         Expose a WKWebView API for allowing programmatic focus to trigger node assistance
195         https://bugs.webkit.org/show_bug.cgi?id=149567
196
197         Reviewed by Darin Adler.
198
199         Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
200         starting node assistance when programmatically focusing. Also fixes a bug caused by naively
201         introducing the flag where the autofocus attribute could trigger node assistance before layout
202         occurs, causing an ASSERT to fail in EditorState::postLayoutData.
203
204         I fixed this issue by not assisting the node if the editor state is missing post layout data,
205         instead deferring node assistance until layout has occurred.
206
207         * UIProcess/API/Cocoa/WKWebView.h:
208         * UIProcess/API/Cocoa/WKWebView.mm:
209         (-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
210             is the current default behavior.
211         (-[WKWebView canAssistOnProgrammaticFocus]):
212         (-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
213             assistance behavior upon programmatic focus.
214         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
215         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
216         (-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
217         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
218         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
219         * UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
220         * UIProcess/ios/WKContentViewInteraction.mm:
221         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
222             early if the node assistance flag is set to allow programmatic focus.
223         * UIProcess/ios/WebPageProxyIOS.mm:
224         (WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
225             starting node assistance, immediately trigger node assistance.
226         (WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
227         (WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.
228
229 2015-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
230
231         REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
232         https://bugs.webkit.org/show_bug.cgi?id=148569
233
234         Reviewed by Darin Adler.
235
236         * PlatformGTK.cmake: Add missing inspector files required for
237         layout tests.
238
239 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
240
241         Clean up user media request internal API
242         https://bugs.webkit.org/show_bug.cgi?id=149527
243
244         Reviewed by Tim Horton.
245
246         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
247         (WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
248         (WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
249         (WKUserMediaPermissionRequestAllowBest): Deleted.
250         (WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
251         (WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
252         (WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
253         (WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
254         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
255
256         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
257         (webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
258
259         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
260         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
261           Switch audio/video parameter order to be consistent with everywhere else.
262         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
263         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
264
265         * UIProcess/UserMediaPermissionRequestProxy.cpp:
266         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
267           Switch audio/video parameter order to be consistent with everywhere else.
268         (WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
269         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
270         * UIProcess/UserMediaPermissionRequestProxy.h:
271         (WebKit::UserMediaPermissionRequestProxy::create):
272         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
273         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
274         (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
275         (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
276         (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
277
278         * UIProcess/WebPageProxy.cpp:
279         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
280           Switch audio/video parameter order to be consistent with everywhere else.
281         * UIProcess/WebPageProxy.h: Ditto.
282         * UIProcess/WebPageProxy.messages.in: Ditto.
283
284         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
285         (WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
286           vectors have the same information.
287         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
288           parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
289         deviceUIDAudio -> audioDeviceUID.
290         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
291
292         * WebProcess/WebPage/WebPage.cpp:
293         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
294         * WebProcess/WebPage/WebPage.h:
295
296 2015-09-25  Simon Fraser  <simon.fraser@apple.com>
297
298         [iOS WK2] Add viewport tests and fix runUIScript() timing issues
299         https://bugs.webkit.org/show_bug.cgi?id=149577
300
301         Reviewed by Tim Horton.
302         
303         When calling testRunner.runUIScript() from a page load event, the script could run
304         in the UI process before the current remote layer tree transaction had been handled
305         there. This meant that runUIScript() could query state which was about to change.
306         
307         Fix by delaying the execution of the UI script until a layer tree transaction has
308         been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
309         
310         This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
311         which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.
312         
313         Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
314         that this will grow significantly.
315
316         * UIProcess/API/C/WKPage.cpp:
317         (WKPageCallAfterNextPresentationUpdate):
318         * UIProcess/API/C/WKPagePrivate.h:
319         * UIProcess/API/Cocoa/WKWebView.mm:
320         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
321         * UIProcess/WebPageProxy.cpp:
322         (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
323         * UIProcess/WebPageProxy.h:
324         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
325         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
326         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
327
328 2015-09-25  Alexey Proskuryakov  <ap@apple.com>
329
330         [Mac] Media tests start to time out after a few days of bot uptime
331         https://bugs.webkit.org/show_bug.cgi?id=149468
332
333         Reviewed by Darin Adler.
334
335         Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.
336
337         When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
338         This means that during testing, WebContent uses a temporary directory of the form
339         /private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
340         instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.
341
342         WebKit1 now also better respects a temporary directory of the form
343         /private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
344         makes CoreMedia put its cache inside it.
345
346         As a result, almost everything is isolated per testing process, and deleted at the end.
347         Same with cache directories. The only outliers that I know of are plug-in directories,
348         which are per-process, but are not under the testing root, and thus aren't deleted.
349
350         * PluginProcess/mac/PluginProcessMac.mm:
351         (WebKit::PluginProcess::initializeSandbox):
352         * Shared/ChildProcessProxy.cpp:
353         (WebKit::ChildProcessProxy::fromConnection):
354         (WebKit::ChildProcessProxy::getLaunchOptions):
355         (WebKit::ChildProcessProxy::connect):
356         * Shared/ChildProcessProxy.h:
357         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
358         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
359         * Shared/SandboxInitializationParameters.h:
360         (WebKit::SandboxInitializationParameters::sandboxProfile):
361         (WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
362         (WebKit::SandboxInitializationParameters::userDirectorySuffix):
363         (WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
364         (WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
365         * Shared/ios/ChildProcessIOS.mm:
366         (WebKit::ChildProcess::initializeSandbox):
367         * Shared/mac/ChildProcessMac.mm:
368         (WebKit::ChildProcess::initializeSandbox):
369         * UIProcess/Databases/DatabaseProcessProxy.cpp:
370         (WebKit::DatabaseProcessProxy::getLaunchOptions):
371         * UIProcess/Network/NetworkProcessProxy.cpp:
372         (WebKit::NetworkProcessProxy::getLaunchOptions):
373         * UIProcess/Plugins/PluginProcessProxy.cpp:
374         (WebKit::PluginProcessProxy::getLaunchOptions):
375         * UIProcess/WebProcessProxy.cpp:
376         (WebKit::WebProcessProxy::getLaunchOptions):
377
378 2015-09-25  Beth Dakin  <bdakin@apple.com>
379
380         Clicking on a data detected item inside a form control always pops up a map 
381         on force touch trackpad
382         https://bugs.webkit.org/show_bug.cgi?id=149559
383         -and corresponding-
384         rdar://problem/22826796
385
386         Reviewed by Tim Horton.
387
388         Look for Data Detected text for text nodes and HitTestResults that are over 
389         text inside form controls.
390
391         * WebProcess/WebPage/mac/WebPageMac.mm:
392         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
393
394 2015-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
395
396         [GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
397         https://bugs.webkit.org/show_bug.cgi?id=148956
398
399         Reviewed by Žan Doberšek.
400
401         This is because those tests call notifyDone in the onresize event
402         handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
403         before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
404         is called, so if the size has changed the FrameView::resize()
405         method is called and all children are resized, so the onresize
406         handlers happen at that point, before the
407         m_inUpdateBackingStoreState is set to false again. For WTR we
408         could probably just return early from froceReapaint() when
409         m_inUpdateBackingStoreState is true, because in that case we know
410         the layout is updated because of the resize and the actual display
411         is not really needed. But the UI process can also request a force
412         repaint, so we could wait until the backing store update is done
413         and then force the repaint. For WTR it will happen after the
414         dump, but it shouldn't be a problem.
415
416         * WebProcess/WebPage/DrawingAreaImpl.cpp:
417         (WebKit::DrawingAreaImpl::forceRepaint):
418         (WebKit::DrawingAreaImpl::updateBackingStoreState):
419         * WebProcess/WebPage/DrawingAreaImpl.h:
420
421 2015-09-24  Tim Horton  <timothy_horton@apple.com>
422
423         Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
424         https://bugs.webkit.org/show_bug.cgi?id=149543
425
426         Reviewed by Beth Dakin.
427
428         * WebProcess/WebPage/FindController.cpp:
429         (WebKit::FindController::rectsForTextMatches):
430         Don't add empty rects to the list. Later code will just inflate them
431         and end up drawing a nonsensical find hole.
432
433 2015-09-24  Chris Dumez  <cdumez@apple.com>
434
435         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
436         https://bugs.webkit.org/show_bug.cgi?id=149532
437
438         Reviewed by Ryosuke Niwa.
439
440         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
441         no way to construct such Node in WebKit. This avoid having to handle this
442         Node type everywhere.
443
444         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
445         (WebKit::WKDOMNodeClass): Deleted.
446
447 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
448
449         Ran sort-Xcode-project-file.
450
451         * WebKit2.xcodeproj/project.pbxproj:
452
453 2015-09-23  Timothy Horton  <timothy_horton@apple.com>
454
455         Link highlight rect is too rounded on blocks with border-radius
456         https://bugs.webkit.org/show_bug.cgi?id=149511
457
458         Reviewed by Dan Bernstein.
459
460         * UIProcess/ios/WKContentViewInteraction.mm:
461         (nsSizeForTapHighlightBorderRadius):
462         (-[WKContentView _updateTapHighlight]):
463         Scale the border radius from content to view coordinates, just like
464         we do for the rects that WebKit returns us.
465
466 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
467
468         Add a file of pointer-lock to cmake ports
469         https://bugs.webkit.org/show_bug.cgi?id=149453
470
471         Reviewed by Csaba Osztrogonác.
472
473         * WebProcess/WebPage/WebPage.cpp:
474         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.
475
476 2015-09-22  Anders Carlsson  <andersca@apple.com>
477
478         URL of page visited in private browsing still appears in Activity Monitor after page is closed
479         https://bugs.webkit.org/show_bug.cgi?id=149475
480         rdar://problem/22684521
481
482         Reviewed by Dan Bernstein.
483
484         * WebProcess/WebPage/WebPage.cpp:
485         (WebKit::WebPage::close):
486         Make sure to call updateActivePages after removing the page from the page map.
487
488         * WebProcess/cocoa/WebProcessCocoa.mm:
489         (WebKit::WebProcess::updateActivePages):
490         Don't include pages that have private browsing enabled.
491
492 2015-09-22  Tim Horton  <timothy_horton@apple.com>
493
494         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
495         https://bugs.webkit.org/show_bug.cgi?id=149428
496
497         Reviewed by Simon Fraser and Darin Adler.
498
499         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
500         (WebKit::ThreadSafeCoordinatedSurface::create):
501
502 2015-09-22  Andreas Kling  <akling@apple.com>
503
504         [WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
505         <https://webkit.org/b/149463>
506
507         Reviewed by Antti Koivisto.
508
509         Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
510         memory-mapped file. This turns the previously dirty memory into clean memory,
511         reducing our effective footprint.
512
513         I previously believed this would happen automatically when the kernel finds
514         itself under memory pressure, around the same time as it starts dropping
515         volatile pages. Turns out that's not the case. Even under considerable pressure,
516         we never flush this memory to file. So let's take care of it ourselves.
517
518         If this ends up generating more IO activity than we're comfortable with on some
519         scenario, we can look at throttling.
520
521         * NetworkProcess/cache/NetworkCacheData.cpp:
522         (WebKit::NetworkCache::Data::mapToFile):
523
524 2015-09-22  Chris Dumez  <cdumez@apple.com>
525
526         Drop support for legacy EntityReference DOM Node type
527         https://bugs.webkit.org/show_bug.cgi?id=149348
528
529         Reviewed by Darin Adler.
530
531         Drop handling EntityReference Nodes.
532
533         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
534         (WebKit::WKDOMNodeClass): Deleted.
535         * WebProcess/WebPage/ios/WebPageIOS.mm:
536         (WebKit::isAssistableElement):
537
538 2015-09-22  Commit Queue  <commit-queue@webkit.org>
539
540         Unreviewed, rolling out r189616.
541         https://bugs.webkit.org/show_bug.cgi?id=149456
542
543         suspected cause of multiple regressions (Requested by kling on
544         #webkit).
545
546         Reverted changeset:
547
548         "[JSC] Weak should only accept cell pointees."
549         https://bugs.webkit.org/show_bug.cgi?id=148955
550         http://trac.webkit.org/changeset/189616
551
552 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
553
554         Allow DataDetectors to pre-filter telephone number menu items
555         https://bugs.webkit.org/show_bug.cgi?id=149444
556         <rdar://problem/19286320>
557
558         Reviewed by Sam Weinig.
559
560         * Platform/mac/MenuUtilities.mm:
561         (WebKit::menuItemForTelephoneNumber):
562         (WebKit::menuForTelephoneNumber):
563         Let DataDetectors know what kind of items we want, so that they can avoid
564         some unnecessary work in cases where we were just going to throw away the items anyway.
565
566 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
567
568         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
569         https://bugs.webkit.org/show_bug.cgi?id=149399
570
571         Reviewed by Darin Adler.
572
573         This fixes build failure after r189144
574
575         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
576         (WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
577         (WebKit::ThreadSafeCoordinatedSurface::beginPaint):
578         (WebKit::ThreadSafeCoordinatedSurface::endPaint):
579         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
580
581 2015-09-21  Simon Fraser  <simon.fraser@apple.com>
582
583         Add the ability for tests to run script in the UI process in WebKitTestRunner
584         https://bugs.webkit.org/show_bug.cgi?id=149356
585
586         Reviewed by Tim Horton.
587
588         Expose a few private functions for testing.
589
590         * UIProcess/API/Cocoa/WKWebView.mm:
591         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
592
593 2015-09-21  Tim Horton  <timothy_horton@apple.com>
594
595         Layout milestones aren't synchronized with UI-side compositing transactions
596         https://bugs.webkit.org/show_bug.cgi?id=149362
597
598         Reviewed by Anders Carlsson.
599         
600         Because layout milestones are primarily used to synchronize things with
601         the displayed layout/rendering of the page, they should fire at the same
602         time as the contents of the view change.
603
604         However, with UI-side compositing, the layer tree transaction will
605         most likely come in *after* the layout milestones associated with its
606         contents fire, breaking this synchronization.
607
608         Instead, put the layout milestones inside the transaction and fire them
609         immediately after it is committed in the UI process.
610
611         * Shared/mac/RemoteLayerTreeTransaction.h:
612         (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
613         (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
614         (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
615         * Shared/mac/RemoteLayerTreeTransaction.mm:
616         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
617         (WebKit::RemoteLayerTreeTransaction::encode):
618         (WebKit::RemoteLayerTreeTransaction::decode):
619         Add LayoutMilestones to the transaction.
620
621         * UIProcess/API/APILoaderClient.h:
622         (API::LoaderClient::didLayout):
623         * UIProcess/API/APINavigationClient.h:
624         (API::NavigationClient::renderingProgressDidChange):
625         * UIProcess/API/C/WKPage.cpp:
626         (WKPageSetPageLoaderClient):
627         (WKPageSetPageNavigationClient):
628         * UIProcess/Cocoa/NavigationState.h:
629         * UIProcess/Cocoa/NavigationState.mm:
630         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
631         * UIProcess/WebPageProxy.messages.in:
632         * UIProcess/ios/WebPageProxyIOS.mm:
633         (WebKit::WebPageProxy::didCommitLayerTree):
634         Remove the UserData parameter from didLayout/renderingProgressDidChange,
635         except for at the API level where we'll always pass null.
636         Nobody uses UserData on didLayout, and we'll assert if any client sets it
637         (and it won't get passed through to the UI process).
638
639         * UIProcess/WebPageProxy.cpp:
640         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
641         Just call didLayout with the relevant milestones instead of reimplementing it.
642
643         (WebKit::WebPageProxy::didLayout):
644         * UIProcess/WebPageProxy.h:
645         Make didLayout public.
646
647         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
648         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
649         Let WebPage handle dispatching didLayout.
650
651         * WebProcess/WebPage/WebPage.cpp:
652         (WebKit::WebPage::dispatchDidLayout):
653         * WebProcess/WebPage/WebPage.h:
654         Let the DrawingArea handle dispatching didLayout.
655         If it doesn't want to handle it, we'll just do the normal thing
656         and dispatch an async message.
657
658         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
659         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
660         If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
661
662         * WebProcess/WebPage/DrawingArea.h:
663         (WebKit::DrawingArea::dispatchDidLayout):
664         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
665         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
666         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
667         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
668         Queue up milestones as we reach them, and send them in the transaction.
669
670 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
671
672         Remove XHR_TIMEOUT compilation guard
673         https://bugs.webkit.org/show_bug.cgi?id=149260
674
675         Reviewed by Benjamin Poulain.
676
677         * Configurations/FeatureDefines.xcconfig:
678
679 2015-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
680
681         [GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
682         https://bugs.webkit.org/show_bug.cgi?id=149375
683
684         Reviewed by Darin Adler.
685
686         WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
687         since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.
688
689         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
690         (WebKit::WebEditorClient::supportsGlobalSelection):
691
692 2015-09-19  Dan Bernstein  <mitz@apple.com>
693
694         Attempted build fix.
695
696         * mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.
697
698 2015-09-18  Commit Queue  <commit-queue@webkit.org>
699
700         Unreviewed, rolling out r189908.
701         https://bugs.webkit.org/show_bug.cgi?id=149368
702
703         Broke run-webkit-tests --pixel (Requested by ap on #webkit).
704
705         Reverted changeset:
706
707         "printing does not use minimum page zoom factor"
708         https://bugs.webkit.org/show_bug.cgi?id=108507
709         http://trac.webkit.org/changeset/189908
710
711 2015-09-18  Andy Estes  <aestes@apple.com>
712
713         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
714         https://bugs.webkit.org/show_bug.cgi?id=149360
715
716         Reviewed by Tim Horton.
717
718         * UIProcess/ios/WebPageProxyIOS.mm:
719         (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame): Called on m_navigationDelegate if non-null.
720         (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): Ditto.
721
722 2015-09-18  Beth Dakin  <bdakin@apple.com>
723
724         Snapshots broken on iOS
725         https://bugs.webkit.org/show_bug.cgi?id=149354
726
727         Reviewed by Tim Horton.
728
729         We need to send the IOSurface to ViewSnapshot::create() for this to work.
730         * UIProcess/API/Cocoa/WKWebView.mm:
731         (-[WKWebView _takeViewSnapshot]):
732
733 2015-09-18  Chris Dumez  <cdumez@apple.com>
734
735         Drop support for Entity Node type
736         https://bugs.webkit.org/show_bug.cgi?id=149239
737
738         Reviewed by Darin Adler.
739
740         Stop handling the Entity node type.
741
742         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
743
744 2015-09-17  Brian Burg  <bburg@apple.com>
745
746         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
747         https://bugs.webkit.org/show_bug.cgi?id=149006
748         <rdar://problem/22654257>
749         <rdar://problem/22631369>
750
751         Reviewed by Joseph Pecoraro.
752
753         Stop using InspectorController to close the frontend page. Go through
754         the FrontendClient instead. Reduce redundant code paths.
755
756         This change seems to fix some recent crashes that were seen when
757         closing Safari with Web Inspector open. These were caused by the frontend
758         channel not being disconnected at the right time.
759
760         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
761         (WebKit::WebInspectorClient::inspectedPageDestroyed):
762         (WebKit::WebInspectorClient::closeLocalFrontend): Deleted.
763         * WebProcess/WebCoreSupport/WebInspectorClient.h:
764         * WebProcess/WebPage/WebInspector.cpp:
765         (WebKit::WebInspector::close):
766         * WebProcess/WebPage/WebInspectorUI.cpp:
767         (WebKit::WebInspectorUI::establishConnection):
768
769             Save a pointer to the frontend's InspectorController since we may
770             need to use it while the page is being destructed and its getter
771             is no longer accessible.
772
773         (WebKit::WebInspectorUI::closeWindow):
774
775             Explicitly remove the frontend client when closing the frontend.
776
777         * WebProcess/WebPage/WebInspectorUI.h:
778         * WebProcess/WebPage/WebPage.cpp:
779         (WebKit::WebPage::inspector):
780
781             Allow clients to specify whether an inspector should be eagerly created.
782             Without this, we may accidentally create an instance during teardown.
783
784         * WebProcess/WebPage/WebPage.h:
785
786 2015-09-18  Emanuele Aina  <emanuele.aina@collabora.com>
787
788         Fix build with --no-indexed-database after r189831
789         https://bugs.webkit.org/show_bug.cgi?id=149342
790
791         Reviewed by Csaba Osztrogonác.
792
793         * WebProcess/Databases/WebDatabaseProvider.h:
794         Add ENABLE(INDEXED_DATABASE) guard around supportsModernIDB().
795
796 2015-09-17  Beth Dakin  <bdakin@apple.com>
797
798         Heavy taps on links are sometimes interpreted as the preview gesture
799         https://bugs.webkit.org/show_bug.cgi?id=149304
800         -and corresponding-
801         rdar://problem/22689258
802
803         Reviewed by Tim Horton.
804
805         If the preview gesture starts and stop and less than 250 milliseconds have 
806         passed, then call _attemptClickAtLocation to treat it as a normal tap.
807         * UIProcess/ios/WKContentViewInteraction.h:
808         * UIProcess/ios/WKContentViewInteraction.mm:
809         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
810         (-[WKContentView _interactionStartedFromPreviewItemController:]):
811         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
812
813 2015-09-17  Tim Horton  <timothy_horton@apple.com>
814
815         After restoring tabs, swipes back to fast loading pages hang for 3 seconds
816         https://bugs.webkit.org/show_bug.cgi?id=148764
817         <rdar://problem/22568860>
818
819         Reviewed by Beth Dakin.
820
821         * UIProcess/mac/ViewGestureControllerMac.mm:
822         (WebKit::ViewGestureController::endSwipeGesture):
823         Don't wait for the render tree size threshold if we don't have one.
824
825 2015-09-17  Timothy Horton  <timothy_horton@apple.com>
826
827         REGRESSION (r189287): 2.5% PLT regression
828         https://bugs.webkit.org/show_bug.cgi?id=149277
829         <rdar://problem/22657219>
830
831         Reviewed by Anders Carlsson.
832
833         * UIProcess/API/mac/WKView.mm:
834         (-[WKView _takeViewSnapshot]):
835         Don't take an extra unused snapshot.
836
837 2015-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
838
839         [GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
840         https://bugs.webkit.org/show_bug.cgi?id=147453
841
842         Reviewed by Carlos Garcia Campos.
843
844         Except when running on X11, this function always crashes if called before the web view is
845         realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
846         simply realizing the widget before calling that.
847
848         Thanks to Carlos Garnacho for some debugging help.
849
850         * UIProcess/cairo/BackingStoreCairo.cpp:
851         (WebKit::BackingStore::createBackend):
852
853 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
854
855         printing does not use minimum page zoom factor
856         https://bugs.webkit.org/show_bug.cgi?id=108507
857
858         Reviewed by Darin Adler.
859
860         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
861         should be generated in printing mode.
862
863         * Shared/API/c/WKImage.h:
864         * Shared/API/c/WKSharedAPICast.h:
865         (WebKit::toSnapshotOptions):
866         * Shared/ImageOptions.h:
867         * WebProcess/InjectedBundle/InjectedBundle.cpp:
868         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
869         reference instead of a pointer.
870         * WebProcess/WebPage/WebPage.cpp:
871         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
872         calculate the bitmap height based on the number of pages.
873         (WebKit::WebPage::snapshotAtSize): In case of printing, use
874         PrintContext::spoolAllPagesWithBoundaries() and return.
875
876 2015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
877
878         Web Inspector: Fix common typo "supress" => "suppress"
879         https://bugs.webkit.org/show_bug.cgi?id=149199
880
881         Reviewed by Gyuyoung Kim.
882
883         * PluginProcess/mac/PluginProcessMac.mm:
884         (WebKit::PluginProcess::platformInitializeProcess):
885
886 2015-09-16  Dan Bernstein  <mitz@apple.com>
887
888         [iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
889         https://bugs.webkit.org/show_bug.cgi?id=149224
890
891         Reviewed by Tim Horton.
892
893         * Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method.
894         * UIProcess/WKImagePreviewViewController.mm:
895         (-[WKImagePreviewViewController previewActions]): Moved here.
896
897 2015-09-16  Alexey Proskuryakov  <ap@apple.com>
898
899         [Mac] Allow reading from SubmitDiagInfo.domains in Networking process
900         https://bugs.webkit.org/show_bug.cgi?id=149176
901         rdar://problem/22483680
902
903         Reviewed by Darin Adler.
904
905         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
906
907 2015-09-16  Dan Bernstein  <mitz@apple.com>
908
909         [iOS] Unifiy WebKit2PlatformTouchPoint definition
910         https://bugs.webkit.org/show_bug.cgi?id=149221
911
912         Reviewed by Darin Adler.
913
914         * Shared/WebEventConversion.cpp:
915         (WebKit::touchEventType):
916         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
917
918 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
919
920         [GTK] Web Process crash recovery no longer works
921         https://bugs.webkit.org/show_bug.cgi?id=149064
922
923         Reviewed by Žan Doberšek.
924
925         After a web process crash the new DrawingArea is never resized, so
926         nothing is rendered into the web view.
927
928         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
929         (webkitWebViewBaseDidRelaunchWebProcess): Queue a widget resize to ensure
930         the new DrawingAreaProxy is resized.
931
932 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
933
934         Add ShadowRoot interface and Element.prototype.attachShadow
935         https://bugs.webkit.org/show_bug.cgi?id=149187
936
937         Reviewed by Antti Koivisto.
938
939         * Configurations/FeatureDefines.xcconfig:
940
941 2015-09-15  Brady Eidson  <beidson@apple.com>
942
943         Add empty IDBFactory implementation for Modern IDB.
944         https://bugs.webkit.org/show_bug.cgi?id=149191
945
946         Reviewed by Jer Noble.
947
948         * WebProcess/Databases/WebDatabaseProvider.h:
949
950 2015-09-15  Brady Eidson  <beidson@apple.com>
951
952         Move most IDB object encoding/decoding from WebKit2 to WebCore.
953         https://bugs.webkit.org/show_bug.cgi?id=149152
954
955         Reviewed by Alex Christensen.
956
957         * Shared/WebCoreArgumentCoders.cpp:
958         (IPC::ArgumentCoder<IDBDatabaseMetadata>::encode): Deleted.
959         (IPC::ArgumentCoder<IDBDatabaseMetadata>::decode): Deleted.
960         (IPC::ArgumentCoder<IDBIndexMetadata>::encode): Deleted.
961         (IPC::ArgumentCoder<IDBIndexMetadata>::decode): Deleted.
962         (IPC::ArgumentCoder<IDBKeyData>::encode): Deleted.
963         (IPC::ArgumentCoder<IDBKeyData>::decode): Deleted.
964         (IPC::ArgumentCoder<IDBKeyPath>::encode): Deleted.
965         (IPC::ArgumentCoder<IDBKeyPath>::decode): Deleted.
966         (IPC::ArgumentCoder<IDBKeyRangeData>::encode): Deleted.
967         (IPC::ArgumentCoder<IDBKeyRangeData>::decode): Deleted.
968         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::encode): Deleted.
969         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::decode): Deleted.
970         * Shared/WebCoreArgumentCoders.h:
971
972 2015-09-14  Brady Eidson  <beidson@apple.com>
973
974         Make the enum IDBKey::Type into a utility enum class.
975         https://bugs.webkit.org/show_bug.cgi?id=149149
976
977         Reviewed by Alex Christensen.
978
979         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
980         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
981
982         * Shared/WebCoreArgumentCoders.cpp:
983         (IPC::ArgumentCoder<IDBKeyData>::encode):
984         (IPC::ArgumentCoder<IDBKeyData>::decode):
985
986 2015-09-14  Wenson Hsieh  <wenson_hsieh@apple.com>
987
988         WKWebView scroll deceleration rate is not being set properly
989         https://bugs.webkit.org/show_bug.cgi?id=149145
990         <rdar://problem/22064071>
991
992         Reviewed by Simon Fraser.
993
994         We are not currently setting the web view's deceleration rate to the correct preferred value because we
995         are setting the decelerationRate property of the scrollView, which snaps input values to the closer of
996         two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal.
997         To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred
998         value.
999
1000         * UIProcess/API/Cocoa/WKWebView.mm: 
1001         (-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without
1002                 going through the decelerationRate property.
1003
1004 2015-09-14  Dan Bernstein  <mitz@apple.com>
1005
1006         Consolidate touch event code dealing with force.
1007
1008         Reviewed by Beth Dakin.
1009
1010         * Shared/WebEvent.h:
1011         (WebKit::WebPlatformTouchPoint::state):
1012         (WebKit::WebPlatformTouchPoint::setForce):
1013         (WebKit::WebPlatformTouchPoint::force):
1014         * Shared/ios/NativeWebTouchEventIOS.mm:
1015         (WebKit::positionForCGPoint):
1016         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
1017         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1018         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1019         (WebKit::WebPlatformTouchPoint::encode):
1020         (WebKit::WebPlatformTouchPoint::decode):
1021
1022 2015-09-14  Alex Christensen  <achristensen@webkit.org>
1023
1024         Progress towards CMake on Mac.
1025         https://bugs.webkit.org/show_bug.cgi?id=149123
1026
1027         Reviewed by Chris Dumez.
1028
1029         * PlatformMac.cmake:
1030         Added some more sources.
1031
1032 2015-09-14  Dan Bernstein  <mitz@apple.com>
1033
1034         [iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
1035         https://bugs.webkit.org/show_bug.cgi?id=149127
1036
1037         Reviewed by Beth Dakin.
1038
1039         * Platform/spi/ios/UIKitSPI.h:
1040         * UIProcess/ios/WKContentViewInteraction.mm:
1041         (-[WKContentView setupInteraction]):
1042
1043 2015-09-14  Brady Eidson  <beidson@apple.com>
1044
1045         Rename current concrete IDB implementation to "Legacy".
1046         https://bugs.webkit.org/show_bug.cgi?id=149118
1047
1048         Reviewed by Alex Christensen.
1049
1050         * CMakeLists.txt:
1051
1052 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1053
1054         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
1055         https://bugs.webkit.org/show_bug.cgi?id=149110
1056
1057         Reviewed by Csaba Osztrogonác.
1058
1059         It is not good implementation we support both create() factory function and public constructor.
1060         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
1061         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
1062         std::make_unique<> directly.
1063
1064         * UIProcess/API/efl/EwkView.cpp:
1065         (EwkView::EwkView):
1066         (EwkView::createGLSurface):
1067
1068 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1069
1070         Remove all uses of PassRefPtr in crypto, storage, and history
1071         https://bugs.webkit.org/show_bug.cgi?id=149091
1072
1073         Reviewed by Andreas Kling.
1074
1075         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1076         (WebKit::StorageNamespaceImpl::storageArea):
1077         * WebProcess/Storage/StorageNamespaceImpl.h:
1078
1079 2015-09-13  Dan Bernstein  <mitz@apple.com>
1080
1081         Define HAVE_LINK_PREVIEW in WebKit2
1082         https://bugs.webkit.org/show_bug.cgi?id=149099
1083
1084         Reviewed by Sam Weinig.
1085
1086         * Platform/spi/ios/UIKitSPI.h:
1087         * UIProcess/WKImagePreviewViewController.mm:
1088         * config.h:
1089
1090 2015-09-12  Myles C. Maxfield  <mmaxfield@apple.com>
1091
1092         [Cocoa] Allow testing with the system language
1093         https://bugs.webkit.org/show_bug.cgi?id=148671
1094
1095         Reviewed by Anders Carlsson and Alexey Proskuryakov.
1096
1097         This patch adds two new SPI functions for setting and retrieving a vector of
1098         override languages to/from the WKContextConfiguration. The implementation of
1099         these functions holds state inside WebProcessPoolConfiguration. Then, when
1100         we launch a process, the WebProcessProxy will inject these override languages
1101         into the ProcessLauncher::LaunchOptions so that the ProcessLauncher can
1102         inject these languages into the XPC Bootstrap message. Then, in the Web
1103         Process's main(), the XPC Boostrap message is read, and the platform
1104         languages are set via NSUserDefaults setting a volatile domain.
1105
1106         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1107         (main): Set the volatile domain with NSUserDefaults.
1108         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1109         (API::ProcessPoolConfiguration::copy):
1110         * UIProcess/API/APIProcessPoolConfiguration.h: Hold state for the override
1111         languages.
1112         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1113         (WKContextConfigurationCopyOverrideLanguages): SPI.
1114         (WKContextConfigurationSetOverrideLanguages): Ditto.
1115         * UIProcess/API/C/WKContextConfigurationRef.h:
1116         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1117         (WebKit::connectToService): Inject the languages into the XPC Bootstrap
1118         message.
1119         * UIProcess/WebProcessProxy.cpp:
1120         (WebKit::WebProcessProxy::getLaunchOptions): Inject the override languages
1121         into the ProcessLauncher::LaunchOptions.
1122
1123 2015-09-12  Alexey Proskuryakov  <ap@apple.com>
1124
1125         [iOS] Allow UDP networking
1126         https://bugs.webkit.org/show_bug.cgi?id=149081
1127         rdar://problem/22291743
1128
1129         Reviewed by Sam Weinig.
1130
1131         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1132         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1133
1134 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
1135
1136         Web Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
1137         https://bugs.webkit.org/show_bug.cgi?id=149089
1138
1139         Reviewed by Brian Burg.
1140
1141         * CMakeLists.txt:
1142         * WebKit2.xcodeproj/project.pbxproj:
1143         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp: Added.
1144         (WebKit::WebInspectorFrontendAPIDispatcher::WebInspectorFrontendAPIDispatcher):
1145         (WebKit::WebInspectorFrontendAPIDispatcher::reset):
1146         (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
1147         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
1148         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
1149         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateExpressionOnLoad):
1150         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h: Added.
1151         * WebProcess/WebPage/WebInspectorUI.cpp:
1152         (WebKit::WebInspectorUI::WebInspectorUI):
1153         (WebKit::WebInspectorUI::establishConnection):
1154         (WebKit::WebInspectorUI::frontendLoaded):
1155         (WebKit::WebInspectorUI::setDockSide):
1156         (WebKit::WebInspectorUI::setDockingUnavailable):
1157         (WebKit::WebInspectorUI::showConsole):
1158         (WebKit::WebInspectorUI::showResources):
1159         (WebKit::WebInspectorUI::showMainResourceForFrame):
1160         (WebKit::WebInspectorUI::startPageProfiling):
1161         (WebKit::WebInspectorUI::stopPageProfiling):
1162         (WebKit::WebInspectorUI::didSave):
1163         (WebKit::WebInspectorUI::didAppend):
1164         (WebKit::WebInspectorUI::sendMessageToFrontend):
1165         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
1166         (WebKit::WebInspectorUI::evaluateExpressionOnLoad): Deleted.
1167         (WebKit::WebInspectorUI::evaluatePendingExpressions): Deleted.
1168         * WebProcess/WebPage/WebInspectorUI.h:
1169         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
1170
1171 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
1172
1173         Web Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
1174         https://bugs.webkit.org/show_bug.cgi?id=149088
1175
1176         Reviewed by Brian Burg.
1177
1178         * UIProcess/WebInspectorProxy.cpp:
1179         (WebKit::getContextMenuFromProposedMenu):
1180         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
1181         * UIProcess/mac/WebInspectorProxyMac.mm:
1182         (WebKit::getContextMenuFromProposedMenu): Deleted.
1183         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1184
1185 2015-09-12  Brian Burg  <bburg@apple.com>
1186
1187         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
1188         https://bugs.webkit.org/show_bug.cgi?id=149071
1189
1190         Reviewed by Joseph Pecoraro.
1191
1192         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1193         (WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
1194         (WebKit::WebInspectorClient::openLocalFrontend): Renamed.
1195         (WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
1196         (WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
1197         (WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
1198         (WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
1199         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1200
1201 2015-09-11  Beth Dakin  <bdakin@apple.com>
1202
1203         Another build fix.
1204
1205         * UIProcess/mac/ViewSnapshotStore.h:
1206         (WebKit::ViewSnapshot::size):
1207         (WebKit::ViewSnapshot::imageSizeInBytes):
1208
1209 2015-09-11  Beth Dakin  <bdakin@apple.com>
1210
1211         Still need view snapshotting code for non-IOSurface for the sim
1212         https://bugs.webkit.org/show_bug.cgi?id=149077
1213
1214         Reviewed by Tim Horton.
1215
1216         This fixes the simulator build.
1217         * UIProcess/API/Cocoa/WKWebView.mm:
1218         (-[WKWebView _takeViewSnapshot]):
1219         (-[WKWebView _zoomToPoint:atScale:animated:]):
1220         * UIProcess/mac/ViewGestureControllerMac.mm:
1221         (WebKit::ViewGestureController::beginSwipeGesture):
1222         (WebKit::ViewGestureController::removeSwipeSnapshot):
1223         * UIProcess/mac/ViewSnapshotStore.h:
1224         (WebKit::ViewSnapshot::setDeviceScaleFactor):
1225         (WebKit::ViewSnapshot::deviceScaleFactor):
1226         (WebKit::ViewSnapshot::surface):
1227         (WebKit::ViewSnapshot::imageSizeInBytes):
1228         (WebKit::ViewSnapshot::size):
1229         * UIProcess/mac/ViewSnapshotStore.mm:
1230         (WebKit::ViewSnapshotStore::singleton):
1231         (WebKit::ViewSnapshotStore::snapshottingContext):
1232         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
1233         (WebKit::ViewSnapshotStore::discardSnapshotImages):
1234         (WebKit::ViewSnapshot::create):
1235         (WebKit::ViewSnapshot::ViewSnapshot):
1236         (WebKit::ViewSnapshot::~ViewSnapshot):
1237         (WebKit::ViewSnapshot::setSurface):
1238         (WebKit::ViewSnapshot::hasImage):
1239         (WebKit::ViewSnapshot::clearImage):
1240         (WebKit::ViewSnapshot::asLayerContents):
1241
1242 2015-09-11  Beth Dakin  <bdakin@apple.com>
1243
1244         Build fix
1245
1246         * UIProcess/mac/ViewGestureControllerMac.mm:
1247         (WebKit::ViewGestureController::beginSwipeGesture):
1248         (WebKit::ViewGestureController::removeSwipeSnapshot):
1249
1250 2015-09-11  Beth Dakin  <bdakin@apple.com>
1251
1252         Should use CARenderServerRenderLayerWithTransform for snapshots on iOS
1253         https://bugs.webkit.org/show_bug.cgi?id=149069
1254         -and corresponding-
1255         rdar://problem/19726953
1256
1257         Reviewed by Tim Horton.
1258
1259         This will let us own the backing IOSurface, which will let us share more code 
1260         with Mac.
1261
1262         Use CARenderServerRenderLayerWithTransform
1263         * UIProcess/API/Cocoa/WKWebView.mm:
1264         (-[WKWebView _takeViewSnapshot]):
1265         (-[WKWebView _zoomToPoint:atScale:animated:]):
1266
1267         We can eliminate things needed for the slot-based API.
1268         * UIProcess/mac/ViewSnapshotStore.h:
1269         (WebKit::ViewSnapshot::setDeviceScaleFactor):
1270         (WebKit::ViewSnapshot::deviceScaleFactor):
1271         (WebKit::ViewSnapshot::surface):
1272         (WebKit::ViewSnapshot::imageSizeInBytes):
1273         (WebKit::ViewSnapshot::size):
1274         * UIProcess/mac/ViewSnapshotStore.mm:
1275         (WebKit::ViewSnapshotStore::singleton):
1276         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
1277         (WebKit::ViewSnapshotStore::discardSnapshotImages):
1278         (WebKit::ViewSnapshot::create):
1279         (WebKit::ViewSnapshot::ViewSnapshot):
1280         (WebKit::ViewSnapshot::~ViewSnapshot):
1281         (WebKit::ViewSnapshot::setSurface):
1282         (WebKit::ViewSnapshot::hasImage):
1283         (WebKit::ViewSnapshot::clearImage):
1284         (WebKit::ViewSnapshot::asLayerContents):
1285         (WebKit::ViewSnapshotStore::snapshottingContext): Deleted.
1286
1287 2015-09-11  Andreas Kling  <akling@apple.com>
1288
1289         [JSC] Weak should only accept cell pointees.
1290         <https://webkit.org/b/148955>
1291
1292         Reviewed by Geoffrey Garen.
1293
1294         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1295         (WebKit::NPRuntimeObjectMap::finalize):
1296         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1297
1298 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1299
1300         Web Inspector: Remove unused files
1301         https://bugs.webkit.org/show_bug.cgi?id=149049
1302
1303         Reviewed by Brian Burg.
1304
1305         * WebProcess/WebPage/efl/WebInspectorEfl.cpp: Removed.
1306         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Removed.
1307
1308 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1309
1310         WebInspectorUI should have a WebPage reference
1311         https://bugs.webkit.org/show_bug.cgi?id=149046
1312
1313         Reviewed by Geoffrey Garen.
1314
1315         * WebProcess/WebPage/WebInspectorUI.cpp:
1316         * WebProcess/WebPage/WebInspectorUI.h:
1317         (WebKit::WebInspectorUI::page): Deleted.
1318         * WebProcess/WebPage/WebPage.cpp:
1319         (WebKit::WebPage::inspectorUI):
1320
1321 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1322
1323         Web Inspector: WebInspectorUI does not need to be an API::Object
1324         https://bugs.webkit.org/show_bug.cgi?id=149045
1325
1326         Reviewed by Timothy Hatcher.
1327
1328         * Shared/API/APIObject.h:
1329         * WebProcess/WebPage/WebInspectorUI.h:
1330
1331 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1332
1333         Web Inspector: Remove unused member in WebPage
1334         https://bugs.webkit.org/show_bug.cgi?id=149040
1335
1336         Reviewed by Brian Burg.
1337
1338         * WebProcess/WebPage/WebPage.cpp:
1339         * WebProcess/WebPage/WebPage.h:
1340
1341 2015-09-10  Daniel Bates  <dabates@apple.com>
1342
1343         sendProcessWillSuspendImminently uses a wrong message flag
1344         https://bugs.webkit.org/show_bug.cgi?id=148995
1345
1346         Reviewed by Alexey Proskuryakov.
1347
1348         Remove use of flag IPC::InterruptWaitingIfSyncMessageArrives as it does not make
1349         sense when sending a sync message.
1350
1351         * UIProcess/Network/NetworkProcessProxy.cpp:
1352         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
1353         * UIProcess/WebProcessProxy.cpp:
1354         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
1355
1356 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1357
1358         Unreviewed build fix after r189572.
1359
1360         * UIProcess/WebInspectorProxy.cpp:
1361         (WebKit::WebInspectorProxy::inspectorPageURL):
1362         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1363         (WebKit::WebInspectorProxy::inspectorBaseURL):
1364         Remove the const on the now static methods.
1365
1366 2015-09-10  Chris Dumez  <cdumez@apple.com>
1367
1368         Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
1369         https://bugs.webkit.org/show_bug.cgi?id=148971
1370         <rdar://problem/22560883>
1371         <rdar://problem/22559225>
1372
1373         Reviewed by Ryosuke Niwa.
1374
1375         ContainerNode::appendChild() now takes a Ref<Node>&& parameter so we
1376         need to update the call sites.
1377
1378         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1379         (WebKit::PDFPlugin::PDFPlugin):
1380         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
1381         (WebKit::PDFPluginAnnotation::attach):
1382         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
1383         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1384         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
1385
1386 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1387
1388         Web Inspector: Make WebInspectorProxy inspectorURL path methods static
1389         https://bugs.webkit.org/show_bug.cgi?id=149021
1390
1391         Reviewed by Brian Burg.
1392
1393         * UIProcess/WebInspectorProxy.cpp:
1394         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
1395         (WebKit::isMainOrTestInspectorPage):
1396         (WebKit::decidePolicyForNavigationAction):
1397         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
1398         (WebKit::WebInspectorProxy::createInspectorPage):
1399         * UIProcess/WebInspectorProxy.h:
1400         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1401         (WebKit::WebInspectorProxy::inspectorPageURL):
1402         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1403         (WebKit::WebInspectorProxy::inspectorBaseURL):
1404         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1405         (WebKit::WebInspectorProxy::inspectorPageURL):
1406         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1407         (WebKit::WebInspectorProxy::inspectorBaseURL):
1408         * UIProcess/mac/WebInspectorProxyMac.mm:
1409         (WebKit::WebInspectorProxy::inspectorPageURL):
1410         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1411         (WebKit::WebInspectorProxy::inspectorBaseURL):
1412
1413 2015-09-09  Joseph Pecoraro  <pecoraro@apple.com>
1414
1415         Web Inspector: Remove dead WebInspectorProxy related code
1416         https://bugs.webkit.org/show_bug.cgi?id=149019
1417
1418         Reviewed by Timothy Hatcher.
1419
1420         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
1421         * UIProcess/WebInspectorProxy.cpp:
1422         * UIProcess/WebInspectorProxy.h:
1423         * UIProcess/mac/WebInspectorProxyMac.mm:
1424         (-[WKWebInspectorProxyObjCAdapter attachRight:]): Deleted.
1425         (-[WKWebInspectorProxyObjCAdapter attachBottom:]): Deleted.
1426
1427 2015-09-09  Anders Carlsson  <andersca@apple.com>
1428
1429         Remove an unused NSString SPI constant
1430         https://bugs.webkit.org/show_bug.cgi?id=149009
1431
1432         Reviewed by Dan Bernstein.
1433
1434         * UIProcess/API/Cocoa/WKWebView.mm:
1435         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1436
1437 2015-09-09  Dan Bernstein  <mitz@apple.com>
1438
1439         Updated availability annotations for iOS 9 and OS X El Capitan.
1440
1441         Rubber-stamped by Anders Carlsson.
1442
1443         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
1444         * UIProcess/API/Cocoa/WKError.h:
1445         * UIProcess/API/Cocoa/WKErrorPrivate.h:
1446         * UIProcess/API/Cocoa/WKFrameInfo.h:
1447         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1448         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1449         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1450         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1451         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1452         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
1453         * UIProcess/API/Cocoa/WKUIDelegate.h:
1454         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1455         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1456         * UIProcess/API/Cocoa/WKViewPrivate.h:
1457         * UIProcess/API/Cocoa/WKWebView.h:
1458         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1459         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1460         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1461         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1462         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
1463         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1464         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
1465         * UIProcess/API/Cocoa/_WKElementAction.h:
1466         * UIProcess/API/Cocoa/_WKLayoutMode.h:
1467         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
1468         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1469         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1470         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
1471         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1472         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1473         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
1474
1475 2015-09-09  Alexey Proskuryakov  <ap@apple.com>
1476
1477         fast/dom/rtl-scroll-to-leftmost-and-resize.html is a flaky timeout - IPC drops messages
1478         https://bugs.webkit.org/show_bug.cgi?id=148951
1479
1480         Reviewed by Anders Carlsson.
1481
1482         * Platform/IPC/Connection.cpp:
1483         (IPC::Connection::waitForMessage): Don't modify m_waitingForMessage without holding
1484         a lock. This is not part of this fix, but seems necessary for correctness.
1485         (IPC::Connection::processIncomingMessage): Don't interrupt a wait that has already succeeded.
1486
1487 2015-09-08  Daniel Bates  <dabates@apple.com>
1488
1489         [Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser
1490         https://bugs.webkit.org/show_bug.cgi?id=148980
1491
1492         Reviewed by Alexey Proskuryakov.
1493
1494         Expose SPI web preference to enable/disable- and query the state of- accelerated drawing
1495         so that we can toggle this setting in MiniBrowser on Mac.
1496
1497         * UIProcess/API/Cocoa/WKPreferences.mm:
1498         (-[WKPreferences _acceleratedDrawingEnabled]): Added.
1499         (-[WKPreferences _setAcceleratedDrawingEnabled:]): Added.
1500         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1501
1502 2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
1503
1504         Web Inspector: Remove unused file: WebInspectorFrontendClient.h
1505         https://bugs.webkit.org/show_bug.cgi?id=148979
1506
1507         Reviewed by Brian Burg.
1508
1509         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed.
1510         Unused now. WebInspectorUI subclasses InspectorFrontendClient itself.
1511
1512 2015-09-07  Andy Estes  <aestes@apple.com>
1513
1514         [Mac] DebugRelease builds should link against libWebKitSystemInterfaceElCapitan.a on 10.11
1515         https://bugs.webkit.org/show_bug.cgi?id=148946
1516         <rdar://problem/22603981>
1517
1518         Reviewed by Dan Bernstein.
1519
1520         * Configurations/DebugRelease.xcconfig:
1521
1522 2015-09-05  Michael Catanzaro  <mcatanzaro@igalia.com>
1523
1524         Leak in WebContextInjectedBundleClient::getInjectedBundleInitializationUserData
1525         https://bugs.webkit.org/show_bug.cgi?id=148769
1526
1527         Fix suggested by Zan Dobersek.
1528
1529         Reviewed by Darin Adler.
1530
1531         * UIProcess/WebContextInjectedBundleClient.cpp:
1532         (WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
1533
1534 2015-09-04  Brian Burg  <bburg@apple.com>
1535
1536         Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
1537         https://bugs.webkit.org/show_bug.cgi?id=148492
1538
1539         Reviewed by Joseph Pecoraro.
1540
1541         Stop using InspectorForwarding.h.
1542
1543         * WebProcess/WebPage/WebInspector.h:
1544         * WebProcess/WebPage/WebInspectorUI.h:
1545
1546 2015-09-04  Brian Burg  <bburg@apple.com>
1547
1548         Web Inspector: InspectorController should support multiple frontend channels
1549         https://bugs.webkit.org/show_bug.cgi?id=148538
1550
1551         Reviewed by Joseph Pecoraro.
1552
1553         Explicitly disconnect the frontend channel when closing the frontend.
1554
1555         Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
1556         {open,close}FrontendConnection in the WebInspector class.
1557
1558         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1559         (WebKit::WebInspectorClient::openInspectorFrontend):
1560         (WebKit::WebInspectorClient::closeInspectorFrontend):
1561         * WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
1562         * WebProcess/WebPage/WebInspector.cpp:
1563         (WebKit::WebInspector::openFrontendConnection):
1564         (WebKit::WebInspector::closeFrontendConnection):
1565         (WebKit::WebInspector::remoteFrontendConnected):
1566         (WebKit::WebInspector::remoteFrontendDisconnected):
1567         (WebKit::WebInspector::createInspectorPage): Deleted.
1568         (WebKit::WebInspector::closeFrontend): Deleted.
1569         * WebProcess/WebPage/WebInspector.h:
1570
1571 2015-09-04  Dan Bernstein  <mitz@apple.com>
1572
1573         [iOS] Disable backspace key navigation by default
1574         https://bugs.webkit.org/show_bug.cgi?id=148808
1575
1576         Reviewed by Tim Horton.
1577
1578         * Shared/WebPreferencesDefinitions.h: Defined DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED as
1579           false on iOS, true elsewhere, and made it the default value of the
1580           backspaceKeyNavigationEnabled preference key.
1581
1582 2015-09-04  Beth Dakin  <bdakin@apple.com>
1583
1584         Need to be able to test default behaviors on force click
1585         https://bugs.webkit.org/show_bug.cgi?id=148758
1586
1587         Reviewed by Tim Horton.
1588
1589         The hit test seems to return synchronously in WKTR, so we need to do the hit 
1590         test last before we clear state otherwise we will trample the hit test 
1591         result.
1592         * UIProcess/mac/WKImmediateActionController.mm:
1593         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1594         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1595
1596 2015-09-03  Commit Queue  <commit-queue@webkit.org>
1597
1598         Unreviewed, rolling out r189338.
1599         https://bugs.webkit.org/show_bug.cgi?id=148785
1600
1601         Caused tons of crashes (Requested by cdumez on #webkit).
1602
1603         Reverted changeset:
1604
1605         "Web Inspector: InspectorController should support multiple
1606         frontend channels"
1607         https://bugs.webkit.org/show_bug.cgi?id=148538
1608         http://trac.webkit.org/changeset/189338
1609
1610 2015-09-03  Brian Burg  <bburg@apple.com>
1611
1612         Web Inspector: InspectorController should support multiple frontend channels
1613         https://bugs.webkit.org/show_bug.cgi?id=148538
1614
1615         Reviewed by Joseph Pecoraro.
1616
1617         Explicitly disconnect the frontend channel when closing the frontend.
1618
1619         Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
1620         {open,close}FrontendConnection in the WebInspector class.
1621
1622         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1623         (WebKit::WebInspectorClient::openInspectorFrontend):
1624         (WebKit::WebInspectorClient::closeInspectorFrontend):
1625         * WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
1626         * WebProcess/WebPage/WebInspector.cpp:
1627         (WebKit::WebInspector::openFrontendConnection):
1628         (WebKit::WebInspector::closeFrontendConnection):
1629         (WebKit::WebInspector::remoteFrontendConnected):
1630         (WebKit::WebInspector::remoteFrontendDisconnected):
1631         (WebKit::WebInspector::createInspectorPage): Deleted.
1632         (WebKit::WebInspector::closeFrontend): Deleted.
1633         * WebProcess/WebPage/WebInspector.h:
1634
1635 2015-09-03  Timothy Hatcher  <timothy@apple.com>
1636
1637         Web Inspector: Closing the Safari window when the Web Inspector is one of the other windows in split screen mode can cause the entire screen to go black
1638         https://bugs.webkit.org/show_bug.cgi?id=148777
1639
1640         Reviewed by Brian Burg.
1641
1642         * UIProcess/mac/WebInspectorProxyMac.mm:
1643         (WebKit::WebInspectorProxy::platformDidClose):
1644         (WebKit::WebInspectorProxy::platformHide):
1645         (WebKit::WebInspectorProxy::platformAttach):
1646         Call close instead of orderOut: to make fullscreen and tile modes with Web Inspector work as expected.
1647
1648 2015-09-03  Brady Eidson  <beidson@apple.com>
1649
1650         Move SecurityOriginData from WK2 to WebCore.
1651         https://bugs.webkit.org/show_bug.cgi?id=148739
1652
1653         Reviewed by Tim Horton.
1654
1655         This will be needed for upcoming IndexedDB work.
1656
1657         * CMakeLists.txt:
1658         * DatabaseProcess/DatabaseProcess.h:
1659         * DatabaseProcess/DatabaseProcess.messages.in:
1660         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1661         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1662         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1663         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp:
1664         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h:
1665         * NetworkProcess/NetworkProcess.cpp:
1666         * NetworkProcess/NetworkProcess.h:
1667         * NetworkProcess/NetworkProcess.messages.in:
1668         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1669         * Shared/WebCrossThreadCopier.cpp:
1670         * Shared/WebCrossThreadCopier.h:
1671         * Shared/WebsiteData/WebsiteData.cpp:
1672         * UIProcess/API/APINavigationClient.h:
1673         * UIProcess/API/APIUIClient.h:
1674         * UIProcess/API/C/WKPage.cpp:
1675         * UIProcess/API/Cocoa/WKUserContentController.mm:
1676         * UIProcess/API/gtk/WebKitUIClient.cpp:
1677         * UIProcess/Cocoa/NavigationState.h:
1678         * UIProcess/Cocoa/NavigationState.mm:
1679         * UIProcess/Cocoa/UIDelegate.h:
1680         * UIProcess/Cocoa/UIDelegate.mm:
1681         * UIProcess/Storage/StorageManager.cpp:
1682         * UIProcess/Storage/StorageManager.h:
1683         * UIProcess/Storage/StorageManager.messages.in:
1684         * UIProcess/UserContent/WebScriptMessageHandler.h:
1685         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1686         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1687         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
1688         * UIProcess/WebCookieManagerProxy.cpp:
1689         * UIProcess/WebPageProxy.h:
1690         * UIProcess/WebPageProxy.messages.in:
1691         * WebKit2.xcodeproj/project.pbxproj:
1692         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1693         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1694         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
1695         * WebProcess/Storage/StorageAreaMap.cpp:
1696         * WebProcess/UserContent/WebUserContentController.cpp:
1697         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1698         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1699         * WebProcess/WebProcess.cpp:
1700         * WebProcess/WebProcess.h:
1701         * WebProcess/WebProcess.messages.in:
1702
1703 2015-09-03  Tim Horton  <timothy_horton@apple.com>
1704
1705         [Mac] Add support for testing swipes
1706         https://bugs.webkit.org/show_bug.cgi?id=148700
1707
1708         Reviewed by Beth Dakin.
1709
1710         * UIProcess/API/mac/WKView.mm:
1711         (takeWindowSnapshot):
1712         (-[WKView _takeViewSnapshot]):
1713         Fall back to the non-hardware snapshotting path if the hardware path fails,
1714         which usually happens if the view is fully off-screen (as in the case
1715         of WebKitTestRunner).
1716
1717 2015-09-02  Tim Horton  <timothy_horton@apple.com>
1718
1719         Add a modern API way to know that the navigation gesture snapshot was removed, for WebKitTestRunner
1720         https://bugs.webkit.org/show_bug.cgi?id=148693
1721
1722         Reviewed by Anders Carlsson.
1723
1724         * UIProcess/API/APINavigationClient.h:
1725         (API::NavigationClient::didRemoveNavigationGestureSnapshot):
1726         * UIProcess/API/C/WKPage.cpp:
1727         (WKPageSetPageNavigationClient):
1728         * UIProcess/API/C/WKPageNavigationClient.h:
1729         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1730         * UIProcess/Cocoa/NavigationState.h:
1731         * UIProcess/Cocoa/NavigationState.mm:
1732         (WebKit::NavigationState::setNavigationDelegate):
1733         (WebKit::NavigationState::navigationGestureSnapshotWasRemoved):
1734         * UIProcess/PageClient.h:
1735         * UIProcess/WebPageProxy.cpp:
1736         (WebKit::WebPageProxy::navigationGestureDidEnd):
1737         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
1738         * UIProcess/ios/PageClientImplIOS.h:
1739         * UIProcess/ios/PageClientImplIOS.mm:
1740         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1741         * UIProcess/mac/PageClientImpl.h:
1742         * UIProcess/mac/PageClientImpl.mm:
1743         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1744         * UIProcess/API/gtk/PageClientImpl.cpp:
1745         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1746         * UIProcess/API/gtk/PageClientImpl.h:
1747         * UIProcess/CoordinatedGraphics/WebView.h:
1748         Add a callback for WKTR when the swipe snapshot is removed.
1749
1750 2015-09-02  Andreas Kling  <akling@apple.com>
1751
1752         ScrollbarThemes should be returned by reference.
1753         <https://webkit.org/b/147551>
1754
1755         Reviewed by Zalan Bujtas.
1756
1757         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1758         (WebKit::PDFPlugin::paintControlForLayerInContext):
1759
1760 2015-09-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1761
1762         REGRESSION(r188206): [EFL] Adjust scrollbar width to ewk_view_contents_size_get API test 
1763         https://bugs.webkit.org/show_bug.cgi?id=148701
1764
1765         Reviewed by Csaba Osztrogonác.
1766
1767         r188206 applied to use non-overlay scrollbar on EFL minibrowser. So we need to
1768         adjust scrollwidth to ewk_view_contents_size_get API test as well.
1769
1770         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1771         (TEST_F):
1772
1773 2015-09-02  Emanuele Aina  <emanuele.aina@collabora.com>
1774
1775         Fix build with ENABLE(DATABASE_PROCESS) and !ENABLE(INDEXED_DATABASE)
1776         https://bugs.webkit.org/show_bug.cgi?id=146550
1777
1778         Reviewed by Brady Eidson.
1779
1780         Given that INDEXED_DATABASE at the moment is the only user of
1781         DATABASE_PROCESS, their guards got inevitably mixed up with various
1782         levels of consistency. Since the --no-indexed-database flag from
1783         build-webkit leaves DATABASE_PROCESS enabled, this resulted in build
1784         failures.
1785
1786         * DatabaseProcess/DatabaseProcess.cpp:
1787         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1788         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1789         * Shared/Databases/DatabaseProcessCreationParameters.h:
1790         * UIProcess/WebProcessPool.cpp:
1791         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1792         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1793         Add missing ENABLE(INDEXED_DATABASE) guards and moved the
1794         misplaced ones.
1795
1796         * DatabaseProcess/DatabaseProcess.h:
1797         Ditto, and also add a forward declaration for SecurityOriginData since
1798         with INDEXED_DATABASE off SecurityOriginData.h is no longer included
1799         by way of UniqueIDBDatabaseIdentifier.h.
1800
1801 2015-09-01  Brian Burg  <bburg@apple.com>
1802
1803         Web Inspector: opt the Inspector process out of page visibility-based process suppression when running tests
1804         https://bugs.webkit.org/show_bug.cgi?id=148686
1805
1806         Reviewed by Timothy Hatcher.
1807
1808         This may be the cause of debug test timeouts and high execution time variance
1809         that have been plaguing the bots. Process suppression shouldn't happen for
1810         inspector process during tests anyway, so it shouldn't hurt to flip this.
1811
1812         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1813
1814             The stated default here is incorrect, the default value is true.
1815
1816         * UIProcess/API/Cocoa/WKPreferences.mm:
1817         (-[WKPreferences _pageVisibilityBasedProcessSuppressionEnabled]): Added.
1818         (-[WKPreferences _setPageVisibilityBasedProcessSuppressionEnabled:]): Added.
1819         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1820         * UIProcess/mac/WebInspectorProxyMac.mm:
1821         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1822
1823 2015-09-01  Alexey Proskuryakov  <ap@apple.com>
1824
1825         Update sandbox after r179367
1826         https://bugs.webkit.org/show_bug.cgi?id=148683
1827         rdar://problem/21767401
1828
1829         Reviewed by Darin Adler.
1830
1831         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1832
1833 2015-08-26  Andy Estes  <aestes@apple.com>
1834
1835         [Content Filtering] Determine navigation and content policy before continuing to filter a load
1836         https://bugs.webkit.org/show_bug.cgi?id=148506
1837
1838         Reviewed by Brady Eidson.
1839
1840         Deleted parts of r188486 and r188851.
1841
1842         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1843         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1844         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1845         * WebProcess/WebPage/WebFrame.cpp:
1846         (WebKit::WebFrame::convertMainResourceLoadToDownload):
1847
1848 2015-08-31  Chris Dumez  <cdumez@apple.com>
1849
1850         Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
1851         https://bugs.webkit.org/show_bug.cgi?id=148454
1852
1853         Reviewed by Ryosuke Niwa.
1854
1855         Update Range API call sites to reflect changes.
1856
1857         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
1858         (-[WKDOMRange collapse:]):
1859         (-[WKDOMRange startContainer]):
1860         (-[WKDOMRange startOffset]):
1861         (-[WKDOMRange endContainer]):
1862         (-[WKDOMRange endOffset]):
1863         (-[WKDOMRange isCollapsed]):
1864         (-[WKDOMRange text]): Deleted.
1865         * WebProcess/WebPage/FindController.cpp:
1866         (WebKit::FindController::getImageForFindMatch):
1867         (WebKit::FindController::selectFindMatch):
1868         * WebProcess/WebPage/WebPage.cpp:
1869         (WebKit::targetFrameForEditing):
1870         (WebKit::WebPage::firstRectForCharacterRangeAsync): Deleted.
1871         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1872         (WebKit::targetFrameForEditing):
1873         * WebProcess/WebPage/ios/WebPageIOS.mm:
1874         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1875         (WebKit::WebPage::rangeForBlockAtPoint):
1876         (WebKit::containsRange):
1877         (WebKit::unionDOMRanges):
1878         (WebKit::WebPage::contractedRangeFromHandle):
1879         * WebProcess/WebPage/mac/WebPageMac.mm:
1880         (WebKit::WebPage::dictionaryPopupInfoForRange):
1881         (WebKit::WebPage::firstRectForCharacterRange): Deleted.
1882
1883 2015-08-31  Tim Horton  <timothy_horton@apple.com>
1884
1885         iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
1886         https://bugs.webkit.org/show_bug.cgi?id=148599
1887         <rdar://problem/17914031>
1888
1889         Reviewed by Beth Dakin.
1890
1891         * WebProcess/WebPage/FindController.cpp:
1892         (WebKit::FindController::findString):
1893         (WebKit::FindController::didFindString):
1894         * WebProcess/WebPage/FindController.h:
1895         Add didFindString() for FindControllerIOS.
1896
1897         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1898         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
1899         (WebKit::FindController::updateFindIndicator):
1900         (WebKit::setCompositionSelectionChangeEnabledInAllFrames):
1901         (WebKit::FindController::willFindString):
1902         (WebKit::FindController::didFindString):
1903         (WebKit::FindController::didFailToFindString):
1904         (WebKit::FindController::didHideFindIndicator):
1905         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
1906         (WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
1907         Adopt TextIndicator and shrink-wrapping.
1908
1909         We'll re-create the indicator if the device/page scale factor change;
1910         this is the only case in which a TextIndicator sticks around when
1911         page scale changes -- we should come up with a better model!
1912
1913 2015-08-31  Antti Koivisto  <antti@apple.com>
1914
1915         Network Cache: Stale content after back navigation
1916         https://bugs.webkit.org/show_bug.cgi?id=148634
1917
1918         Reviewed by Chris Dumez.
1919
1920         It is possible to get an older version of the previous page when navigating back. This can happen
1921         if the main resource load has not completed before navigating away from the page.
1922
1923         Network cache entry is normally updated when the load completes. In case of cancellation we would leave
1924         any existing entry as-is. However we render incrementally and user might have seen some content from
1925         the partial load already. Navigating back to the cached page could show older version of the content.
1926
1927         * NetworkProcess/NetworkResourceLoader.cpp:
1928         (WebKit::NetworkResourceLoader::abort):
1929
1930             If a network load is canceled by the client after receiving response but before the load has completed
1931             remove any existing cache entry for it.
1932
1933 2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
1934
1935         Migrate GraphicsContexts from pointers to references
1936         https://bugs.webkit.org/show_bug.cgi?id=148561
1937
1938         Reviewed by Tim Horton.
1939
1940         * PluginProcess/PluginControllerProxy.cpp:
1941         (WebKit::PluginControllerProxy::paint):
1942         * Shared/cairo/ShareableBitmapCairo.cpp:
1943         (WebKit::ShareableBitmap::paint):
1944         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1945         (WebKit::imageForRect):
1946         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1947         (WebKit::InjectedBundleRangeHandle::renderedImage):
1948         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1949         (WebKit::NetscapePlugin::paint):
1950         (WebKit::NetscapePlugin::snapshot):
1951         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1952         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
1953         (WebKit::NetscapePlugin::platformPaint):
1954         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1955         (WebKit::NetscapePlugin::platformPaint):
1956         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1957         (WebKit::NetscapePlugin::platformPaint):
1958         * WebProcess/Plugins/PDF/PDFPlugin.h:
1959         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1960         (WebKit::PDFPlugin::updateControlTints):
1961         (WebKit::PDFPlugin::paintControlForLayerInContext):
1962         * WebProcess/Plugins/Plugin.cpp:
1963         (WebKit::Plugin::updateControlTints):
1964         * WebProcess/Plugins/Plugin.h:
1965         * WebProcess/Plugins/PluginProxy.cpp:
1966         (WebKit::PluginProxy::paint):
1967         * WebProcess/Plugins/PluginProxy.h:
1968         * WebProcess/Plugins/PluginView.cpp:
1969         (WebKit::PluginView::paint):
1970         * WebProcess/Plugins/PluginView.h:
1971         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1972         (WebKit::convertCairoSurfaceToShareableBitmap):
1973         * WebProcess/WebPage/WebPage.cpp:
1974         (WebKit::WebPage::drawRect):
1975         (WebKit::WebPage::snapshotAtSize):
1976         (WebKit::WebPage::snapshotNode):
1977         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1978         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
1979
1980 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
1981
1982         [Mac] Restructure WebMediaSessionManager for testing
1983         https://bugs.webkit.org/show_bug.cgi?id=148593
1984
1985         Reviewed by Jer Noble.
1986
1987         * UIProcess/mac/PageClientImpl.mm:
1988         (WebKit::PageClientImpl::mediaSessionManager): Call WebMediaSessionManager::singleton, not
1989           WebMediaSessionManagerMac::singleton.
1990
1991 2015-08-28  Jer Noble  <jer.noble@apple.com>
1992
1993         [iOS] Add WebKit/WebKit2 settings to control automatic data loading
1994         https://bugs.webkit.org/show_bug.cgi?id=148579
1995
1996         Reviewed by Anders Carlsson.
1997
1998         Add a property to WKWebViewConfiguration to control whether clients are allowed
1999         to load media data automatically.  Pass this configuration on through to WebCore.
2000
2001         * Shared/WebPreferencesDefinitions.h:
2002         * UIProcess/API/Cocoa/WKWebView.mm:
2003         (-[WKWebView initWithFrame:configuration:]):
2004         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2005         (-[WKWebViewConfiguration init]):
2006         (-[WKWebViewConfiguration copyWithZone:]):
2007         (-[WKWebViewConfiguration _mediaDataLoadsAutomatically]):
2008         (-[WKWebViewConfiguration _setMediaDataLoadsAutomatically:]):
2009         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2010         * WebProcess/WebPage/WebPage.cpp:
2011         (WebKit::WebPage::updatePreferences):
2012
2013 2015-08-28  Jer Noble  <jer.noble@apple.com>
2014
2015         [iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
2016         https://bugs.webkit.org/show_bug.cgi?id=147512
2017
2018         Reviewed by Anders Carlsson.
2019
2020         Default the value of allowsInlineMediaPlayback to YES on iPad and NO on iPhone and iPod.
2021         Add a new configuration property, _inlineMediaPlaybackRequiresPlaysInlineAttribute, which
2022         defaults to NO on iPad and YES on iPhone and iPad.
2023
2024         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2025         (-[WKWebViewConfiguration init]):
2026         * Shared/WebPreferencesDefinitions.h:
2027         * UIProcess/API/C/WKPreferences.cpp:
2028         (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
2029         (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
2030         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2031         * UIProcess/API/Cocoa/WKWebView.mm:
2032         (-[WKWebView initWithFrame:configuration:]):
2033         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2034         (-[WKWebViewConfiguration init]):
2035         (-[WKWebViewConfiguration copyWithZone:]):
2036         (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
2037         (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
2038         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2039         * WebProcess/WebPage/WebPage.cpp:
2040         (WebKit::WebPage::updatePreferences):
2041
2042 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
2043
2044         Add navigation gesture callbacks to WKPageNavigationClient
2045         https://bugs.webkit.org/show_bug.cgi?id=148568
2046         <rdar://problem/22371346>
2047
2048         Reviewed by Anders Carlsson.
2049
2050         * UIProcess/API/APINavigationClient.h:
2051         (API::NavigationClient::didBeginNavigationGesture):
2052         (API::NavigationClient::willEndNavigationGesture):
2053         (API::NavigationClient::didEndNavigationGesture):
2054         * UIProcess/API/C/WKPage.cpp:
2055         (WKPageSetPageNavigationClient):
2056         * UIProcess/API/C/WKPageNavigationClient.h:
2057         * UIProcess/WebPageProxy.cpp:
2058         (WebKit::WebPageProxy::navigationGestureDidBegin):
2059         (WebKit::WebPageProxy::navigationGestureWillEnd):
2060         (WebKit::WebPageProxy::navigationGestureDidEnd):
2061
2062 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
2063
2064         Get rid of the DynamicSizeWithMinimumViewSize layout mode
2065         https://bugs.webkit.org/show_bug.cgi?id=148554
2066
2067         Reviewed by Anders Carlsson.
2068
2069         * UIProcess/API/C/WKLayoutMode.h:
2070         * UIProcess/API/Cocoa/WKViewPrivate.h:
2071         * UIProcess/API/Cocoa/WKWebView.mm:
2072         (-[WKWebView _layoutMode]):
2073         (-[WKWebView _setLayoutMode:]):
2074         (-[WKWebView _setMinimumViewSize:]): Deleted.
2075         (-[WKWebView _minimumViewSize]): Deleted.
2076         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2077         * UIProcess/API/Cocoa/_WKLayoutMode.h:
2078         * UIProcess/API/mac/WKView.mm:
2079         (-[WKView _setMinimumViewSize:]): Deleted.
2080         (-[WKView _minimumViewSize]): Deleted.
2081         * UIProcess/WebPageProxy.cpp:
2082         (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced): Deleted.
2083         * UIProcess/WebPageProxy.h:
2084         * UIProcess/mac/WKViewLayoutStrategy.mm:
2085         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
2086         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2087         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]): Deleted.
2088         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]): Deleted.
2089         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]): Deleted.
2090         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]): Deleted.
2091         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]): Deleted.
2092         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]): Deleted.
2093         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]): Deleted.
2094         * WebProcess/WebPage/DrawingArea.h:
2095         (WebKit::DrawingArea::replyWithFenceAfterNextFlush): Deleted.
2096         * WebProcess/WebPage/WebPage.cpp:
2097         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced): Deleted.
2098         * WebProcess/WebPage/WebPage.h:
2099         * WebProcess/WebPage/WebPage.messages.in:
2100         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2101         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2102         (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush): Deleted.
2103
2104 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
2105
2106         [Mac] Right-clicking on GIFs spins the UI process for a while
2107         https://bugs.webkit.org/show_bug.cgi?id=148566
2108         <rdar://problem/22460854>
2109
2110         Reviewed by Brady Eidson.
2111
2112         * UIProcess/WebPageProxy.cpp:
2113         (WebKit::WebPageProxy::internalShowContextMenu):
2114         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2115         * UIProcess/WebPageProxy.h:
2116         * UIProcess/mac/WebPageProxyMac.mm:
2117         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2118         Move all of the code to make a Share menuitem into platformInitializeShareMenuItem.
2119         Make an NSImage directly from the image data if possible.
2120
2121 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
2122
2123         [CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
2124         https://bugs.webkit.org/show_bug.cgi?id=148552
2125
2126         Reviewed by Žan Doberšek.
2127
2128         LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES, not
2129         WebKit2_INCLUDE_DIRECTORIES. (So that warnings from libseccomp headers are suppressed. Not
2130         that there are any right now.)
2131
2132         * PlatformGTK.cmake:
2133
2134 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
2135
2136         Minor fixes in reportUnexpectedSyscall
2137         https://bugs.webkit.org/show_bug.cgi?id=148551
2138
2139         Reviewed by Žan Doberšek.
2140
2141         There is an off-by-one in the static assert.
2142
2143         Also, an unsigned long long is passed in, but the parameter is an int. Then it's passed to
2144         writeUnsignedInt, which takes an unsigned int. Let's use unsigned int instead. (The value
2145         is a syscall number, so it's safe to truncate regardless -- it never be anywhere near as
2146         large as an int, unless the input is malicious, in which case truncating it is the right
2147         thing to do anyway -- so this is just a matter of style.)
2148
2149         * Shared/linux/SeccompFilters/Syscall.cpp:
2150         (WebKit::reportUnexpectedSyscall):
2151
2152 2015-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2153
2154         [GTK] Simplify the internal API to create a WebView
2155         https://bugs.webkit.org/show_bug.cgi?id=148570
2156
2157         Reviewed by Žan Doberšek.
2158
2159         Now that all the information required to create a WebView is in
2160         API::PageConfiguration, we can simplify the internal API to
2161         receive only the configuration instead of receiving a long list of
2162         parameters that we use to build a new API::PageConfiguration.
2163
2164         * UIProcess/API/C/gtk/WKView.cpp:
2165         (WKViewCreate):
2166         * UIProcess/API/C/gtk/WKView.h:
2167         * UIProcess/API/gtk/WebKitWebContext.cpp:
2168         (webkitWebContextCreatePageForWebView):
2169         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2170         (webkitWebViewBaseCreate):
2171         (webkitWebViewBaseCreateWebPage):
2172         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2173         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2174         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2175
2176 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
2177
2178         Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
2179         https://bugs.webkit.org/show_bug.cgi?id=148553
2180
2181         Reviewed by Zalan Bujtas.
2182
2183         * UIProcess/API/mac/WKView.mm:
2184         (-[WKView _supportsArbitraryLayoutModes]):
2185         (-[WKView _updateSupportsArbitraryLayoutModes]):
2186         (-[WKView _didCommitLoadForMainFrame]):
2187         * UIProcess/API/mac/WKViewInternal.h:
2188         * UIProcess/mac/PageClientImpl.mm:
2189         (WebKit::PageClientImpl::beganEnterFullScreen):
2190         (WebKit::PageClientImpl::beganExitFullScreen):
2191         * UIProcess/mac/WKFullScreenWindowController.mm:
2192         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
2193         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
2194         It's not OK to just randomly change the layout mode, because the client
2195         can change it or its properties out from under us, and also because we
2196         weren't resetting it to whatever the client had specified.
2197
2198         I recently implemented a better way to override layout modes, for PDF,
2199         so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
2200         we should just use the "normal" mode (ViewSize), since we've already ensured
2201         a minimum size by setting contentMinSize.
2202
2203 2015-08-27  Alexey Proskuryakov  <ap@apple.com>
2204
2205         pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
2206         https://bugs.webkit.org/show_bug.cgi?id=148550
2207
2208         Reviewed by Tim Horton.
2209
2210         This fixes flakiness on plugins/plugin-javascript-access.html.
2211
2212         * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PluginInfo>::decode):
2213
2214 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
2215
2216         Factor out Lookup invocation
2217         https://bugs.webkit.org/show_bug.cgi?id=148509
2218
2219         Reviewed by Anders Carlsson.
2220
2221         * Shared/DictionaryPopupInfo.cpp: Removed.
2222         * Shared/DictionaryPopupInfo.h: Removed.
2223         Moved to WebCore.
2224
2225         * Shared/WebCoreArgumentCoders.cpp:
2226         (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
2227         (IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
2228         Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.
2229
2230         * Shared/WebCoreArgumentCoders.h:
2231         * Shared/WebHitTestResult.h:
2232         * Shared/mac/ArgumentCodersMac.h:
2233         * UIProcess/API/mac/WKView.mm:
2234         (+[WKView hideWordDefinitionWindow]):
2235         (-[WKView _dismissContentRelativeChildWindows]):
2236         * UIProcess/PageClient.h:
2237         * UIProcess/WebPageProxy.h:
2238         * UIProcess/WebPageProxy.messages.in:
2239         * UIProcess/mac/PageClientImpl.h:
2240         * UIProcess/mac/PageClientImpl.mm:
2241         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2242         * UIProcess/mac/WKImmediateActionController.mm:
2243         (-[WKImmediateActionController _animationControllerForText]):
2244         * UIProcess/mac/WebPageProxyMac.mm:
2245         * WebKit2.xcodeproj/project.pbxproj:
2246         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2247         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2248         (WebKit::PDFPlugin::lookupTextAtLocation):
2249         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2250         * WebProcess/WebPage/WebPage.h:
2251         * WebProcess/WebPage/mac/WebPageMac.mm:
2252         (WebKit::WebPage::performDictionaryLookupAtLocation):
2253         (WebKit::WebPage::performDictionaryLookupForSelection):
2254         (WebKit::WebPage::dictionaryPopupInfoForRange):
2255         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
2256         (WebKit::WebPage::lookupTextAtLocation):
2257         Adjust to new names and move stuff to WebCore.
2258
2259 2015-08-27  Brian Burg  <bburg@apple.com>
2260
2261         Web Inspector: FrontendChannel should know its own connection type
2262         https://bugs.webkit.org/show_bug.cgi?id=148482
2263
2264         Reviewed by Joseph Pecoraro.
2265
2266         * WebProcess/WebPage/WebInspector.h: add connectionType().
2267
2268 2015-08-27  Csaba Osztrogonác  <ossy@webkit.org>
2269
2270         [EFL] REGRESSION: 50+ layout tests crash
2271         https://bugs.webkit.org/show_bug.cgi?id=148471
2272
2273         Reviewed by Gyuyoung Kim.
2274
2275         * UIProcess/CoordinatedGraphics/WebView.cpp:
2276         (WebKit::WebView::WebView):
2277
2278 2015-08-27  Zan Dobersek  <zdobersek@igalia.com>
2279
2280         Fix WKMutableArray creations in WKUserMediaPermissionRequest
2281         https://bugs.webkit.org/show_bug.cgi?id=148489
2282
2283         Reviewed by Carlos Garcia Campos.
2284
2285         Call WKMutableArrayCreate() to create the WKMutableArray objects.
2286         WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()' 
2287         just sets a null value to the variable that is then returned and
2288         queried for size in WebKitTestRunner's TestController, resulting
2289         in a crash.
2290
2291         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
2292         (WKUserMediaPermissionRequestDeviceNamesVideo):
2293         (WKUserMediaPermissionRequestDeviceNamesAudio):
2294
2295 2015-08-26  Emanuele Aina  <emanuele.aina@collabora.com>
2296
2297         [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
2298         https://bugs.webkit.org/show_bug.cgi?id=148493
2299
2300         Reviewed by Gyuyoung Kim.
2301
2302         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2303         Replace ThreadCondition::signal() calls with Condition::notifyOne().
2304         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2305         Replace ThreadCondition usage with Condition.
2306
2307 2015-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2308
2309         Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
2310         https://bugs.webkit.org/show_bug.cgi?id=148442
2311         <rdar://problem/21609257>
2312
2313         Reviewed by Tim Horton.
2314
2315         A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
2316         invalidated when its host removes its reference to it.
2317
2318         * UIProcess/mac/RemoteLayerTreeHost.mm:
2319         (WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
2320             PlatformCAAnimationRemotes to the RemoteLayerTreeHost.
2321
2322 2015-08-26  Beth Dakin  <bdakin@apple.com>
2323
2324         REGRESSION: Safari navigates after a cancelled force click
2325         https://bugs.webkit.org/show_bug.cgi?id=148491
2326         -and corresponding-
2327         rdar://problem/22394323
2328
2329         Reviewed by Tim Horton.
2330
2331         Use the current stage to determine which type of cancel this is.
2332         * WebProcess/WebPage/mac/WebPageMac.mm:
2333         (WebKit::WebPage::immediateActionDidCancel):
2334
2335 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
2336
2337         Media Session: make MediaSessionMetadata a class
2338         https://bugs.webkit.org/show_bug.cgi?id=148486
2339
2340         Reviewed by Jer Noble.
2341
2342         * Shared/WebCoreArgumentCoders.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
2343         * UIProcess/WebPageProxy.h: Ditto.
2344
2345 2015-08-26  Zan Dobersek  <zdobersek@igalia.com>
2346
2347         Unreviewed.
2348
2349         Fix the crashes in GTK+'s WebKitTestRunner by setting the process pool
2350         on the API::PageConfiguration object in webkitWebViewBaseCreate().
2351
2352         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2353         (webkitWebViewBaseCreate):
2354
2355 2015-08-25  Beth Dakin  <bdakin@apple.com>
2356
2357         Speculative build fix.
2358
2359         * UIProcess/ios/WKContentViewInteraction.mm:
2360         (-[WKContentView setupInteraction]):
2361
2362 2015-08-25  Beth Dakin  <bdakin@apple.com>
2363
2364         Long press gesture recognizer should adjust delay based on other recognizers
2365         https://bugs.webkit.org/show_bug.cgi?id=148402
2366         -and corresponding-
2367         rdar://problem/22278723
2368
2369         Reviewed by Tim Horton.
2370
2371         Call _setAdjustsDelayBasedOnOtherRecognizers with a value of YES.
2372         * UIProcess/ios/WKContentViewInteraction.mm:
2373         (-[WKContentView setupInteraction]):
2374
2375 2015-08-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2376
2377         Unreviewed, EFL and GTK build fix since r188895.
2378
2379         * CMakeLists.txt: Rename Rename VisitedLinkProvider to VisitedLinkStore.
2380
2381 2015-08-24  Anders Carlsson  <andersca@apple.com>
2382
2383         Rename VisitedLinkProvider to VisitedLinkStore
2384         https://bugs.webkit.org/show_bug.cgi?id=148406
2385
2386         Reviewed by Tim Horton.
2387
2388         * DerivedSources.make:
2389         * Shared/API/APIObject.h:
2390         * Shared/Cocoa/APIObject.mm:
2391         (API::Object::newObject):
2392         * UIProcess/API/APIPageConfiguration.cpp:
2393         (API::PageConfiguration::copy):
2394         (API::PageConfiguration::visitedLinkStore):
2395         (API::PageConfiguration::setVisitedLinkStore):
2396         (API::PageConfiguration::visitedLinkProvider): Deleted.
2397         (API::PageConfiguration::setVisitedLinkProvider): Deleted.
2398         * UIProcess/API/APIPageConfiguration.h:
2399         * UIProcess/API/C/WKContext.cpp:
2400         (WKContextAddVisitedLink):
2401         (WKContextClearVisitedLinks):
2402         * UIProcess/API/Cocoa/WKWebView.mm:
2403         (-[WKWebView initWithFrame:configuration:]):
2404         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
2405         (-[_WKVisitedLinkStore init]):
2406         (-[_WKVisitedLinkStore dealloc]):
2407         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
2408         (-[_WKVisitedLinkStore removeAll]):
2409         (-[_WKVisitedLinkStore _apiObject]):
2410         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
2411         (WebKit::wrapper):
2412         * UIProcess/VisitedLinkProvider.cpp:
2413         (WebKit::generateIdentifier): Deleted.
2414         (WebKit::VisitedLinkProvider::create): Deleted.
2415         (WebKit::VisitedLinkProvider::~VisitedLinkProvider): Deleted.
2416         (WebKit::VisitedLinkProvider::VisitedLinkProvider): Deleted.
2417         (WebKit::VisitedLinkProvider::addProcess): Deleted.
2418         (WebKit::VisitedLinkProvider::removeProcess): Deleted.
2419         (WebKit::VisitedLinkProvider::addVisitedLinkHash): Deleted.
2420         (WebKit::VisitedLinkProvider::removeAll): Deleted.
2421         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection): Deleted.
2422         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection): Deleted.
2423         (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage): Deleted.
2424         (WebKit::nextPowerOf2): Deleted.
2425         (WebKit::tableSizeForKeyCount): Deleted.
2426         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): Deleted.
2427         (WebKit::VisitedLinkProvider::resizeTable): Deleted.
2428         (WebKit::VisitedLinkProvider::sendTable): Deleted.
2429         * UIProcess/VisitedLinkStore.cpp: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.cpp.
2430         (WebKit::generateIdentifier):
2431         (WebKit::VisitedLinkStore::create):
2432         (WebKit::VisitedLinkStore::~VisitedLinkStore):
2433         (WebKit::VisitedLinkStore::VisitedLinkStore):
2434         (WebKit::VisitedLinkStore::addProcess):
2435         (WebKit::VisitedLinkStore::removeProcess):
2436         (WebKit::VisitedLinkStore::addVisitedLinkHash):
2437         (WebKit::VisitedLinkStore::removeAll):
2438         (WebKit::VisitedLinkStore::webProcessWillOpenConnection):
2439         (WebKit::VisitedLinkStore::webProcessDidCloseConnection):
2440         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
2441         (WebKit::nextPowerOf2):
2442         (WebKit::tableSizeForKeyCount):
2443         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
2444         (WebKit::VisitedLinkStore::resizeTable):
2445         (WebKit::VisitedLinkStore::sendTable):
2446         * UIProcess/VisitedLinkStore.h: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.h.
2447         * UIProcess/VisitedLinkStore.messages.in: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.messages.in.
2448         * UIProcess/WebPageProxy.cpp:
2449         (WebKit::WebPageProxy::WebPageProxy):
2450         (WebKit::WebPageProxy::processDidFinishLaunching):
2451         (WebKit::WebPageProxy::creationParameters):
2452         * UIProcess/WebPageProxy.h:
2453         * UIProcess/WebProcessPool.cpp:
2454         (WebKit::WebProcessPool::WebProcessPool):
2455         (WebKit::WebProcessPool::createWebPage):
2456         * UIProcess/WebProcessPool.h:
2457         * UIProcess/WebProcessProxy.cpp:
2458         (WebKit::WebProcessProxy::shutDown):
2459         (WebKit::WebProcessProxy::addVisitedLinkStore):
2460         (WebKit::WebProcessProxy::didDestroyVisitedLinkStore):
2461         (WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
2462         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
2463         * UIProcess/WebProcessProxy.h:
2464         * WebKit2.xcodeproj/project.pbxproj:
2465         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2466         (WebKit::VisitedLinkTableController::addVisitedLink):
2467
2468 2015-08-24  Tim Horton  <timothy_horton@apple.com>
2469
2470         (Finally...) get rid of WKViewIOS
2471         https://bugs.webkit.org/show_bug.cgi?id=148404
2472
2473         Reviewed by Anders Carlsson.
2474
2475         * UIProcess/API/Cocoa/WKView.h:
2476         * UIProcess/API/ios/WKViewIOS.mm: Removed.
2477         * UIProcess/ios/PageClientImplIOS.h:
2478         * UIProcess/ios/PageClientImplIOS.mm:
2479         (WebKit::PageClientImpl::PageClientImpl): Deleted.
2480         (WebKit::PageClientImpl::didRelaunchProcess): Deleted.
2481         (WebKit::PageClientImpl::refView): Deleted.
2482         (WebKit::PageClientImpl::derefView): Deleted.
2483         * UIProcess/ios/WKContentView.h:
2484         * UIProcess/ios/WKContentView.mm:
2485         (-[WKContentView initWithFrame:processPool:configuration:wkView:]): Deleted.
2486         * WebKit2.xcodeproj/project.pbxproj:
2487         Get rid of WKViewIOS and references to it.
2488
2489         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
2490         (WebKit::DatabaseProcess::initializeSandbox):
2491         * NetworkProcess/ios/NetworkProcessIOS.mm:
2492         (WebKit::NetworkProcess::initializeSandbox):
2493         * Shared/Plugins/mac/PluginSandboxProfile.mm:
2494         (WebKit::pluginSandboxProfileDirectory):
2495         * Shared/ios/ChildProcessIOS.mm:
2496         (WebKit::ChildProcess::initializeSandbox):
2497         * WebProcess/cocoa/WebProcessCocoa.mm:
2498         (WebKit::WebProcess::initializeSandbox):
2499         Look for WKWebView instead of WKView if we have it.
2500
2501 2015-08-24  Anders Carlsson  <andersca@apple.com>
2502
2503         Rename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
2504         https://bugs.webkit.org/show_bug.cgi?id=148398
2505
2506         Reviewed by Tim Horton.
2507
2508         We'd like to call the abstract classes providers and the concrete classes stores in WebKit. Begin by renaming
2509         _WKVisitedLinkProvider to _WKVisitedLinkStore, but keep the former around as a deprecated class.
2510
2511         * Shared/API/Cocoa/WebKitPrivate.h:
2512         * Shared/Cocoa/APIObject.mm:
2513         (API::Object::newObject):
2514         * UIProcess/API/Cocoa/WKWebView.mm:
2515         (-[WKWebView initWithFrame:configuration:]):
2516         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2517         (-[WKWebViewConfiguration copyWithZone:]):
2518         (-[WKWebViewConfiguration _visitedLinkStore]):
2519         (-[WKWebViewConfiguration _setVisitedLinkStore:]):
2520         (-[WKWebViewConfiguration _visitedLinkProvider]):
2521         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
2522         (-[WKWebViewConfiguration _validate]):
2523         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2524         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
2525         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
2526         (-[_WKVisitedLinkProvider init]): Deleted.
2527         (-[_WKVisitedLinkProvider dealloc]): Deleted.
2528         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]): Deleted.
2529         (-[_WKVisitedLinkProvider removeAll]): Deleted.
2530         (-[_WKVisitedLinkProvider _apiObject]): Deleted.
2531         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h.
2532         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm.
2533         (-[_WKVisitedLinkStore init]):
2534         (-[_WKVisitedLinkStore dealloc]):
2535         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
2536         (-[_WKVisitedLinkStore removeAll]):
2537         (-[_WKVisitedLinkStore _apiObject]):
2538         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h.
2539         (WebKit::wrapper):
2540         * WebKit2.xcodeproj/project.pbxproj:
2541
2542 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2543
2544         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
2545         https://bugs.webkit.org/show_bug.cgi?id=147320
2546
2547         Reviewed by Simon Fraser.
2548
2549         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
2550         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
2551         as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.
2552
2553         No new tests, since this change does not add new functionality.
2554
2555         * WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
2556         (WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
2557             fall back to a BasicWheelEventDeltaFilter.
2558         (WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
2559             of zeroing out non-predominant axes.
2560         * WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.
2561
2562 2015-08-23  Andy Estes  <aestes@apple.com>
2563
2564         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
2565         https://bugs.webkit.org/show_bug.cgi?id=147872
2566         rdar://problem/22044000
2567
2568         Reviewed by Dan Bernstein.
2569         
2570         The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
2571         the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.
2572
2573         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2574         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2575         Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
2576         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2577
2578 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
2579
2580         Typo fix after r188842.
2581
2582         * CMakeLists.txt:
2583
2584 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
2585
2586         Speculative buildfix after r188828.
2587
2588         * CMakeLists.txt:
2589
2590 2015-08-22  Tim Horton  <timothy_horton@apple.com>
2591
2592         Factor out and add logging to swipe-start hysteresis code
2593         https://bugs.webkit.org/show_bug.cgi?id=148361
2594
2595         Reviewed by Darin Adler.
2596
2597         * UIProcess/ViewGestureController.cpp:
2598         (WebKit::ViewGestureController::ViewGestureController):
2599         * UIProcess/mac/ViewGestureController.h:
2600         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2601         (WebKit::ViewGestureController::shouldIgnorePinnedState):
2602         (WebKit::ViewGestureController::setShouldIgnorePinnedState):
2603         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
2604         (WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
2605         (WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
2606         Move pending-swipe members into PendingSwipeTracker.
2607
2608         * UIProcess/mac/ViewGestureControllerMac.mm:
2609         (WebKit::scrollEventCanInfluenceSwipe):
2610         (WebKit::deltaShouldCancelSwipe):
2611         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
2612         (WebKit::ViewGestureController::handleScrollWheelEvent):
2613         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
2614         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
2615         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
2616         (WebKit::ViewGestureController::PendingSwipeTracker::reset):
2617         (WebKit::ViewGestureController::trackSwipeGesture):
2618         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
2619         Move pending-swipe methods into PendingSwipeTracker.
2620         Clean up the logic a bit.
2621         Add some logging.
2622
2623 2015-08-22  Timothy Horton  <timothy_horton@apple.com>
2624
2625         WebKitTestRunner should use WKWebView on OS X and iOS
2626         https://bugs.webkit.org/show_bug.cgi?id=143743
2627         <rdar://problem/16947123>
2628
2629         Reviewed by Anders Carlsson.
2630         Patch by Enrica Casucci and myself.
2631
2632         * UIProcess/API/Cocoa/WKWebView.mm:
2633         (-[WKWebView _windowOcclusionDetectionEnabled]):
2634         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
2635         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2636         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
2637
2638         * Shared/WebPreferencesDefinitions.h:
2639         Remove a completely unused WebPreference. It is a WebCore Setting,
2640         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
2641         instead of as a WKPreference, so there's no need for the WebPreference.
2642
2643         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2644         (WKBundlePageAddUserScript):
2645         (WKBundlePageAddUserStyleSheet):
2646         (WKBundlePageRemoveAllUserContent):
2647         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2648         * WebProcess/WebPage/WebPage.cpp:
2649         (WebKit::WebPage::addUserScript):
2650         (WebKit::WebPage::addUserStyleSheet):
2651         (WebKit::WebPage::removeAllUserContent):
2652         * WebProcess/WebPage/WebPage.h:
2653         Add WKBundlePage functions for user script and style sheet manipulation.
2654         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
2655         (used by the WKBundle functions), so they work correctly with the modern API.
2656
2657 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2658
2659         Unreviewed, attempt to fix GTK build after r188718
2660
2661         * CMakeLists.txt: Build WKPageConfigurationRef.cpp
2662         * PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp
2663
2664 2015-08-22  Antti Koivisto  <antti@apple.com>
2665
2666         Decode data URLs in web process
2667         https://bugs.webkit.org/show_bug.cgi?id=148128
2668
2669         Reviewed by Darin Adler.
2670
2671         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2672         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2673
2674             Don't send data: loads to the network process, handle them locally.
2675
2676         (WebKit::WebResourceLoadScheduler::startLocalLoad):
2677
2678             Call ResourceLoder::start() directly.
2679
2680 2015-08-21  Commit Queue  <commit-queue@webkit.org>
2681
2682         Unreviewed, rolling out r188807, r188813, and r188815.
2683         https://bugs.webkit.org/show_bug.cgi?id=148349
2684
2685         lots of 32-bit build problems, better to resolve separately
2686         and try again (Requested by thorton on #webkit).
2687
2688         Reverted changesets:
2689
2690         "WebKitTestRunner should use WKWebView on OS X and iOS"
2691         https://bugs.webkit.org/show_bug.cgi?id=143743
2692         http://trac.webkit.org/changeset/188807
2693
2694         "Stop building WebKitTestRunner for 32-bit platforms"
2695         https://bugs.webkit.org/show_bug.cgi?id=143743
2696         http://trac.webkit.org/changeset/188813
2697
2698         "Stop building WebKitTestRunner for 32-bit platforms"
2699         https://bugs.webkit.org/show_bug.cgi?id=143743
2700         http://trac.webkit.org/changeset/188815
2701
2702 2015-08-21  Timothy Horton  <timothy_horton@apple.com>
2703
2704         WebKitTestRunner should use WKWebView on OS X and iOS
2705         https://bugs.webkit.org/show_bug.cgi?id=143743
2706         <rdar://problem/16947123>
2707
2708         Reviewed by Anders Carlsson.
2709         Patch by Enrica Casucci and myself.
2710
2711         * UIProcess/API/Cocoa/WKWebView.mm:
2712         (-[WKWebView _windowOcclusionDetectionEnabled]):
2713         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
2714         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2715         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
2716
2717         * Shared/WebPreferencesDefinitions.h:
2718         Remove a completely unused WebPreference. It is a WebCore Setting,
2719         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
2720         instead of as a WKPreference, so there's no need for the WebPreference.
2721
2722         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2723         (WKBundlePageAddUserScript):
2724         (WKBundlePageAddUserStyleSheet):
2725         (WKBundlePageRemoveAllUserContent):
2726         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2727         * WebProcess/WebPage/WebPage.cpp:
2728         (WebKit::WebPage::addUserScript):
2729         (WebKit::WebPage::addUserStyleSheet):
2730         (WebKit::WebPage::removeAllUserContent):
2731         * WebProcess/WebPage/WebPage.h:
2732         Add WKBundlePage functions for user script and style sheet manipulation.
2733         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
2734         (used by the WKBundle functions), so they work correctly with the modern API.
2735
2736 2015-08-21  Alexey Proskuryakov  <ap@apple.com>
2737
2738         Improve how UI events are dispatched by WebKitTestRunner
2739         https://bugs.webkit.org/show_bug.cgi?id=148326
2740
2741         Reviewed by Anders Carlsson.
2742
2743         Added "fully synchronous mode for testing", in which all messages are dispatched
2744         synchronously.
2745
2746         When an async message is sent in this mode, it is wrapped into a sync one automatically.
2747
2748         A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
2749         or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
2750         This makes sure that we don't increase potential for IPC misuse.
2751
2752         * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!
2753
2754         * UIProcess/API/C/WKPage.cpp:
2755         (WKPageSetShouldSendEventsSynchronously): Deleted.
2756         * UIProcess/API/C/WKPagePrivate.h:
2757         We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.
2758
2759         * WebProcess/WebPage/EventDispatcher.cpp:
2760         (WebKit::EventDispatcher::wheelEvent):
2761         (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
2762         Removed code that was only needed to support pseudo-syncronous scrolling in tests.
2763
2764         * Platform/IPC/Connection.cpp:
2765         (IPC::Connection::sendMessage):
2766         (IPC::Connection::dispatchSyncMessage):
2767         (IPC::Connection::dispatchMessage):
2768         * Platform/IPC/Connection.h:
2769         (IPC::Connection::allowFullySynchronousModeForTesting):
2770         (IPC::Connection::sendSync):
2771         * Platform/IPC/MessageDecoder.cpp:
2772         (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
2773         (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
2774         (IPC::MessageDecoder::setImportanceAssertion):
2775         (IPC::MessageDecoder::unwrapForTesting):
2776         * Platform/IPC/MessageDecoder.h:
2777         (IPC::MessageDecoder::UUID):
2778         * Platform/IPC/MessageEncoder.cpp:
2779         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
2780         (IPC::MessageEncoder::setFullySynchronousModeForTesting):
2781         (IPC::MessageEncoder::wrapForTesting):
2782         * Platform/IPC/MessageEncoder.h:
2783         (IPC::MessageEncoder::UUID):
2784         * Platform/IPC/MessageFlags.h:
2785         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2786         (API::ProcessPoolConfiguration::copy):
2787         * UIProcess/API/APIProcessPoolConfiguration.h:
2788         * UIProcess/API/C/WKContextConfigurationRef.cpp:
2789         (WKContextConfigurationSetMediaKeysStorageDirectory):
2790         (WKContextConfigurationAllowFullySynchronousModeForTesting):
2791         * UIProcess/API/C/WKContextConfigurationRef.h:
2792
2793         * UIProcess/WebPageProxy.cpp:
2794         (WebKit::WebPageProxy::WebPageProxy):
2795         (WebKit::WebPageProxy::handleMouseEvent):
2796         (WebKit::WebPageProxy::sendWheelEvent):
2797         (WebKit::WebPageProxy::handleKeyboardEvent):
2798         (WebKit::WebPageProxy::handleTouchEvent):
2799         * UIProcess/WebPageProxy.h:
2800         (WebKit::WebPageProxy::renderTreeSize):
2801         (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
2802         * UIProcess/WebProcessPool.cpp:
2803         (WebKit::WebProcessPool::processDidFinishLaunching):
2804         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2805         (WKBundlePagePostMessage):
2806         (WKBundlePagePostSynchronousMessageForTesting):
2807         (WKBundlePagePostSynchronousMessage): Deleted.
2808         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2809         * WebProcess/WebPage/WebPage.cpp:
2810         (WebKit::WebPage::mouseEvent):
2811         (WebKit::handleWheelEvent):
2812         (WebKit::WebPage::wheelEvent):
2813         (WebKit::handleKeyEvent):
2814         (WebKit::WebPage::keyEvent):
2815         (WebKit::WebPage::validateCommand):
2816         (WebKit::WebPage::touchEvent):
2817         (WebKit::WebPage::scroll):
2818         (WebKit::WebPage::postMessage):
2819         (WebKit::WebPage::postSynchronousMessageForTesting):
2820         (WebKit::WebPage::mouseEventSyncForTesting): Deleted.
2821         (WebKit::WebPage::wheelEventSyncForTesting): Deleted.
2822         (WebKit::WebPage::keyEventSyncForTesting): Deleted.
2823         (WebKit::WebPage::touchEventSyncForTesting): Deleted.
2824         (WebKit::WebPage::postSynchronousMessage): Deleted.
2825         * WebProcess/WebPage/WebPage.h:
2826
2827 2015-08-20  Matt Rajca  <mrajca@apple.com>
2828
2829         Media Session: let UI clients change the volume of the focused media element
2830         https://bugs.webkit.org/show_bug.cgi?id=148289
2831
2832         Reviewed by Tim Horton.
2833
2834         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
2835         (WKMediaSessionFocusManagerSetVolumeOfFocusedMediaElement):
2836         * UIProcess/API/C/WKMediaSessionFocusManager.h:
2837         * UIProcess/WebMediaSessionFocusManager.cpp:
2838         (WebKit::WebMediaSessionFocusManager::updatePlaybackAttribute):
2839         (WebKit::WebMediaSessionFocusManager::setVolumeOfFocusedMediaElement):
2840         * UIProcess/WebMediaSessionFocusManager.h:
2841         * UIProcess/WebPageProxy.cpp:
2842         (WebKit::WebPageProxy::setVolumeOfMediaElement):
2843         * UIProcess/WebPageProxy.h:
2844         * WebProcess/WebPage/WebPage.cpp:
2845         (WebKit::WebPage::setVolumeOfMediaElement):
2846         * WebProcess/WebPage/WebPage.h:
2847         * WebProcess/WebPage/WebPage.messages.in:
2848
2849 2015-08-21  Anders Carlsson  <andersca@apple.com>
2850
2851         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
2852         https://bugs.webkit.org/show_bug.cgi?id=148324
2853
2854         Reviewed by Tim Horton.
2855
2856         * UIProcess/mac/WKPrintingView.mm:
2857         (prepareDataForPrintingOnSecondaryThread):
2858         (-[WKPrintingView knowsPageRange:]):
2859
2860 2015-08-21  Chris Dumez  <cdumez@apple.com>
2861
2862         Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
2863         https://bugs.webkit.org/show_bug.cgi?id=148205
2864
2865         Reviewed by Antti Koivisto.
2866
2867         After r188640, successful revalidation of resources in the memory cache
2868         would cause us to drop the corresponding resource in the disk cache.
2869         This patch addresses the issue by not removing the cache entry if the
2870         response is a successful revalidation (i.e. status code == 304).
2871
2872         Longer term, we should probably update the entry in the disk cache (if
2873         it exists) when it is revalidated by the memory cache. Currently,
2874         revalidation by the memory cache bypasses the disk cache and goes
2875         straight to the network. Then, when the response comes back as a 304,
2876         we try and store the response in the cache. However, a 304 status code
2877         is not cacheable so the cache rejects it.
2878
2879         * NetworkProcess/cache/NetworkCache.cpp:
2880         (WebKit::NetworkCache::Cache::store):
2881
2882 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
2883
2884         [EFL] Revise PlatformWebView ctor according to r188718
2885         https://bugs.webkit.org/show_bug.cgi?id=148282
2886
2887         Reviewed by Gyuyoung Kim.
2888
2889         * PlatformEfl.cmake:
2890
2891 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2892
2893         GTK build fix after r188693.
2894
2895         * UIProcess/API/gtk/PageClientImpl.h:
2896         Delete mediaDocumentNaturalSizeChanged which could be renamed to imageOrMediaDocumentSizeChanged, 
2897         but there's no reason to have an empty function overriding another virtual function that is also empty.
2898
2899 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
2900
2901         [EFL] Fix build error since r188693
2902         https://bugs.webkit.org/show_bug.cgi?id=148279
2903
2904         Reviewed by Gyuyoung Kim.
2905
2906         * UIProcess/efl/WebViewEfl.h:
2907
2908 2015-08-20  Anders Carlsson  <andersca@apple.com>
2909
2910         Use WKPageConfigurationRef in WebKitTestRunner
2911         https://bugs.webkit.org/show_bug.cgi?id=147996
2912
2913         Reviewed by Tim Horton.
2914
2915         * UIProcess/API/ios/WKViewIOS.mm:
2916         (-[WKView _commonInitializationWithConfigurationRef:]):
2917         (-[WKView initWithFrame:configurationRef:]):
2918         * UIProcess/API/mac/WKView.mm:
2919         (-[WKView initWithFrame:configurationRef:]):
2920         Make sure to copy the configuration, matching what we do in the modern API.
2921         
2922 2015-08-20  Beth Dakin  <bdakin@apple.com>
2923
2924         Standalone image documents should send their size to the UIClient just like 
2925         standalone media documents
2926         https://bugs.webkit.org/show_bug.cgi?id=148195
2927         -and corresponding-
2928         rdar://problem/21951253
2929
2930         Reviewed by Tim Horton.
2931
2932         This patch re-names mediaDocumentNaturalSizeChanged() to 
2933         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
2934         function for both media documents and images.
2935
2936         * UIProcess/API/APIUIClient.h:
2937         (API::UIClient::didClickAutoFillButton):
2938         (API::UIClient::imageOrMediaDocumentSizeChanged):
2939         (API::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
2940         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2941
2942         The WKWebView and PageClient implementations of this function were actually 
2943         not being used, so this patch removes them and just keeps the UIClient stuff.
2944         * UIProcess/API/Cocoa/WKWebView.mm:
2945         (-[WKWebView performDragOperation:]):
2946         (-[WKWebView _mediaDocumentNaturalSizeChanged:]): Deleted.
2947         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2948
2949         More re-naming.
2950         * UIProcess/Cocoa/UIDelegate.h:
2951         * UIProcess/Cocoa/UIDelegate.mm:
2952         (WebKit::UIDelegate::setDelegate):
2953         (WebKit::UIDelegate::UIClient::UIClient):
2954         (WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
2955         (WebKit::UIDelegate::UIClient::imageOrMediaDocumentSizeChanged):
2956         (WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
2957         * UIProcess/PageClient.h:
2958         * UIProcess/WebPageProxy.cpp:
2959         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
2960         (WebKit::WebPageProxy::imageOrMediaDocumentSizeChanged):
2961         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
2962         (WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged): Deleted.
2963         * UIProcess/WebPageProxy.h:
2964         (WebKit::WebPageProxy::useFixedLayoutDidChange):
2965         (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
2966         * UIProcess/WebPageProxy.messages.in:
2967
2968         The WKWebView and PageClient implementations of this function were actually 
2969         not being used, so this patch removes them and just keeps the UIClient stuff.
2970         * UIProcess/ios/PageClientImplIOS.h:
2971         * UIProcess/ios/PageClientImplIOS.mm:
2972         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
2973         * UIProcess/mac/PageClientImpl.h:
2974         * UIProcess/mac/PageClientImpl.mm:
2975         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
2976
2977         More re-naming.
2978         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2979         (WebKit::WebChromeClient::imageOrMediaDocumentSizeChanged):
2980         (WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged): Deleted.
2981         * WebProcess/WebCoreSupport/WebChromeClient.h:
2982         * WebProcess/WebPage/WebPage.cpp:
2983         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
2984         (WebKit::WebPage::mediaDocumentNaturalSizeChanged): Deleted.
2985         * WebProcess/WebPage/WebPage.h:
2986
2987 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
2988
2989         Remove ENABLE_WEBVTT_REGIONS
2990         https://bugs.webkit.org/show_bug.cgi?id=148184
2991
2992         Reviewed by Jer Noble.
2993
2994         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
2995
2996 2015-08-18  Dean Jackson  <dino@apple.com>
2997
2998         Support CSS filters without webkit prefix
2999         https://bugs.webkit.org/show_bug.cgi?id=148138
3000         <rdar://problem/22331434>
3001
3002         Reviewed by Sam Weinig.
3003
3004         Rename WebkitFilter to Filter.
3005
3006         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3007         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
3008         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
3009
3010 2015-08-19  Alex Christensen  <achristensen@webkit.org>
3011
3012         Build TestWTF on Mac with CMake.
3013         https://bugs.webkit.org/show_bug.cgi?id=147972
3014
3015         Reviewed by Tim Horton.
3016
3017         * PlatformMac.cmake:
3018         Make more forwarding headers.
3019
3020 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
3021
3022         Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
3023         https://bugs.webkit.org/show_bug.cgi?id=148140
3024
3025         Reviewed by Geoffrey Garen.
3026
3027         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3028         (WebKit::NetworkCache::Storage::traverse):
3029         * Platform/IPC/Connection.cpp:
3030         (IPC::Connection::SyncMessageState::processIncomingMessage):
3031         (IPC::Connection::SyncMessageState::dispatchMessages):
3032         (IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
3033         (IPC::Connection::sendMessage):
3034         (IPC::Connection::waitForMessage):
3035         (IPC::Connection::processIncomingMessage):
3036         (IPC::Connection::installIncomingSyncMessageCallback):
3037         (IPC::Connection::uninstallIncomingSyncMessageCallback):
3038         (IPC::Connection::hasIncomingSyncMessage):
3039         (IPC::Connection::connectionDidClose):
3040         (IPC::Connection::sendOutgoingMessages):
3041         (IPC::Connection::enqueueIncomingMessage):
3042         (IPC::Connection::dispatchOneMessage):
3043         * Platform/IPC/Connection.h:
3044         * Shared/BlockingResponseMap.h:
3045         (BlockingResponseMap::waitForResponse):
3046         (BlockingResponseMap::didReceiveResponse):
3047         (BlockingResponseMap::cancel):
3048         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3049         (WebKit::PluginInfoCache::saveToFile):
3050         (WebKit::PluginInfoCache::updatePluginInfo):
3051         * UIProcess/Plugins/gtk/PluginInfoCache.h:
3052         * UIProcess/mac/WKPrintingView.h:
3053         * UIProcess/mac/WKPrintingView.mm:
3054         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
3055         (prepareDataForPrintingOnSecondaryThread):
3056         (-[WKPrintingView knowsPageRange:]):
3057
3058 2015-08-19  Chris Dumez  <cdumez@apple.com>
3059
3060         WebKit may keep outdated entry in the disk cache after a reload
3061         https://bugs.webkit.org/show_bug.cgi?id=148137
3062         <rdar://problem/22299547>
3063
3064         Reviewed by Antti Koivisto.
3065
3066         WebKit would keep outdated entry in the disk cache after a reload
3067         in the following scenario:
3068         1. We have an entry in the cache
3069         2. The user reloads
3070         3. We get a fresh resource from the network but this one is not cacheable
3071
3072         In this case, we now remove the stale entry from the cache to make sure
3073         it is not served to following requests (e.g. history navigations).
3074
3075         * NetworkProcess/NetworkResourceLoader.cpp:
3076         (WebKit::NetworkResourceLoader::didFinishLoading):
3077         Remove the entry from the cache if its redirection is no longer
3078         cacheable.
3079
3080         * NetworkProcess/cache/NetworkCache.cpp:
3081         (WebKit::NetworkCache::Cache::store):
3082         If we make the decision not to store the response, then remove the
3083         entry in the cache for this resource if it exists.
3084
3085         (WebKit::NetworkCache::Cache::remove):
3086         * NetworkProcess/cache/NetworkCache.h:
3087         Add new remove() overload taking a ResourceRequest argument so the
3088         call site does not have the compute the key.
3089
3090         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3091         (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
3092         (WebKit::NetworkCache::Storage::remove):
3093         * NetworkProcess/cache/NetworkCacheStorage.h:
3094         When we're asked to remove an entry with a given key, also remove
3095         it from the pending write operations. This pre-existing bug would
3096         prevent the new layout test from passing.
3097
3098 2015-08-18  Zan Dobersek  <zdobersek@igalia.com>
3099
3100         [GLib] GMainLoopSource should receive the std::function<> objects through rvalue references
3101         https://bugs.webkit.org/show_bug.cgi?id=147981
3102
3103         Reviewed by Carlos Garcia Campos.
3104
3105         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3106         (WebKit::NetworkCache::runTaskInQueue): Move the std::function<> into the scheduling call.
3107
3108 2015-08-18  Dan Bernstein  <mitz@apple.com>
3109
3110         [iOS] Safari’s Web Content process crashes when decoding an NSError containing an identity
3111         https://bugs.webkit.org/show_bug.cgi?id=148135
3112
3113         Reviewed by Sam Weinig.
3114
3115         * Configurations/WebContent-iOS.entitlements: Added the com.apple.identities keychain
3116           access group. The Networking process already has it since r169655.
3117
3118         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3119         (WebKit::WebProcessPool::platformInitialize): Always allow the UI process to decode keys.
3120
3121 2015-08-18  Jincheol Jo  <jincheol.jo@navercorp.com>
3122
3123         [EFL] Web Inspector: make to use StringBuilder in inspectorBaseURL
3124         https://bugs.webkit.org/show_bug.cgi?id=148126
3125
3126         Reviewed by Gyuyoung Kim.
3127
3128         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3129         (WebKit::WebInspectorProxy::inspectorBaseURL):
3130         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
3131
3132 2015-08-18  Anders Carlsson  <andersca@apple.com>
3133
3134         Fix build, and fix the version check.
3135
3136         * UIProcess/API/C/WKPage.cpp:
3137         (WKPageSetPageUIClient):
3138
3139 2015-08-18  Anders Carlsson  <andersca@apple.com>
3140
3141         REGRESSION: Playing audio causes near-instant crash
3142         https://bugs.webkit.org/show_bug.cgi?id=148059
3143         rdar://problem/22282680
3144
3145         Reviewed by Sam Weinig.
3146
3147         The version of WebKit that Safari 6.2.8, 7.1.8 and 8.0.8 built against
3148         had an ABI incompatible WKPageUIClientV4 struct. Thankfully we're not going to ship any
3149         versions of Safari that use the "normal" WKPageUIClientV4 struct so just assume that it's always the
3150         broken one and fix it up by converting it to a WKPageUIClientV5 struct and setting that as the page UI client.
3151
3152         * UIProcess/API/C/WKPage.cpp:
3153         (fixUpBotchedPageUIClient):
3154         (WKPageSetPageUIClient):
3155
3156 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
3157
3158         Replace all remaining uses of WTF::Mutex with WTF::Lock
3159         https://bugs.webkit.org/show_bug.cgi?id=148089
3160
3161         Reviewed by Geoffrey Garen.
3162
3163         * DatabaseProcess/DatabaseProcess.cpp:
3164         (WebKit::DatabaseProcess::postDatabaseTask):
3165         (WebKit::DatabaseProcess::performNextDatabaseTask):
3166         * DatabaseProcess/DatabaseProcess.h:
3167         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3168         (WebKit::UniqueIDBDatabase::shutdown):
3169         (WebKit::UniqueIDBDatabase::postMainThreadTask):
3170         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
3171         (WebKit::UniqueIDBDatabase::postDatabaseTask):
3172         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
3173         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
3174         * Platform/IPC/Connection.cpp:
3175         (IPC::Connection::sendSyncMessage):
3176         (IPC::Connection::sendSyncMessageFromSecondaryThread):
3177         (IPC::Connection::waitForSyncReply):
3178         (IPC::Connection::processIncomingSyncReply):
3179         (IPC::Connection::connectionDidClose):
3180         * Platform/IPC/Connection.h:
3181         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3182         (WebKit::CoordinatedGraphicsScene::appendUpdate):
3183         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3184         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3185         (WebKit::ThreadedCompositor::createCompositingThread):
3186         (WebKit::ThreadedCompositor::runCompositingThread):
3187         (WebKit::ThreadedCompositor::terminateCompositingThread):
3188         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3189         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
3190         (WebKit::CustomProtocolManager::addCustomProtocol):
3191         (WebKit::CustomProtocolManager::removeCustomProtocol):
3192         (WebKit::CustomProtocolManager::registerScheme):
3193         (WebKit::CustomProtocolManager::unregisterScheme):
3194         (WebKit::CustomProtocolManager::supportsScheme):
3195         (WebKit::CustomProtocolManager::protocolForID):
3196         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3197         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
3198         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
3199         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
3200         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
3201         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
3202         * WebProcess/Plugins/PluginProcessConnectionManager.h:
3203         * WebProcess/WebPage/EventDispatcher.cpp:
3204         (WebKit::EventDispatcher::addScrollingTreeForPage):
3205         (WebKit::EventDispatcher::removeScrollingTreeForPage):
3206         (WebKit::EventDispatcher::wheelEvent):
3207         * WebProcess/WebPage/EventDispatcher.h:
3208         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3209         (webkitSoupRequestInputStreamReadAsync):
3210         (webkitSoupRequestInputStreamAddData):
3211
3212 2015-08-17  Alex Christensen  <achristensen@webkit.org>
3213
3214         Speculative GTK build fix after r188553
3215
3216         * CMakeLists.txt:
3217         Added new files.
3218
3219 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
3220
3221         Implement IntegerHasher
3222         https://bugs.webkit.org/show_bug.cgi?id=147866
3223
3224         Reviewed by Darin Adler and Anders Carlsson.
3225
3226         Use new #include.
3227
3228         * DatabaseProcess/IndexedDB/IDBIdentifier.h:
3229         * Platform/IPC/StringReference.cpp:
3230
3231 2015-08-13  Anders Carlsson  <andersca@apple.com>
3232
3233         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
3234         https://bugs.webkit.org/show_bug.cgi?id=147989
3235
3236         Reviewed by Tim Horton.
3237
3238         Re-land this and make sure we actually allocate a WKWindowFeatures object.
3239
3240         * Platform/IPC/mac/ConnectionMac.mm:
3241         * Shared/API/APIObject.h:
3242         * Shared/API/c/WKBase.h:
3243         * UIProcess/API/APIWindowFeatures.cpp: Added.
3244         * UIProcess/API/APIWindowFeatures.h: Added.
3245         * UIProcess/API/C/WKAPICast.h:
3246         * UIProcess/API/C/WKPage.cpp:
3247         (WKPageSetPageUIClient):
3248         * UIProcess/API/C/WKPageUIClient.h:
3249         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
3250         (WKWindowFeaturesGetTypeID):
3251         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
3252         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3253         (-[WKWindowFeatures dealloc]):
3254         (-[WKWindowFeatures menuBarVisibility]):
3255         (-[WKWindowFeatures statusBarVisibility]):
3256         (-[WKWindowFeatures toolbarsVisibility]):
3257         (-[WKWindowFeatures allowsResizing]):
3258         (-[WKWindowFeatures x]):
3259         (-[WKWindowFeatures y]):
3260         (-[WKWindowFeatures width]):
3261         (-[WKWindowFeatures height]):
3262         (-[WKWindowFeatures _apiObject]):
3263         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
3264         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
3265         (WebKit::wrapper):
3266         * UIProcess/Cocoa/UIDelegate.mm:
3267         (WebKit::UIDelegate::UIClient::createNewPage):
3268         * WebKit2.xcodeproj/project.pbxproj:
3269
3270 2015-08-17  Sam Weinig  <sam@webkit.org>
3271
3272         API::PageConfiguration's sessionID needs to be set whenever the API::WebsiteDataStore is set
3273         https://bugs.webkit.org/show_bug.cgi?id=148097
3274
3275         Reviewed by Anders Carlsson.
3276
3277         We were getting an empty SessionID set on the WebPageProxy (and crashing asserting down the line)
3278         when using a WKPageConfiguration with a WKWebsiteDataStore set on it.
3279
3280         Tests:
3281             WebKit2.WKPageConfigurationBasicWithDataStore
3282             WebKit2.WKPageConfigurationBasicWithNonPersistentDataStore
3283
3284         * UIProcess/API/APIPageConfiguration.cpp:
3285         (API::PageConfiguration::setWebsiteDataStore):
3286         Set the sessionID member whenever changing the WebsiteDataStore.
3287
3288         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3289         (WKWebsiteDataStoreGetDefaultDataStore):
3290         (WKWebsiteDataStoreCreateNonPersistentDataStore):
3291         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3292         Expose functions for getting default and new non-persistent data stores via the C-SPI. Useful
3293         for testing and transitioning users of the C-SPI to the new model.
3294
3295         * UIProcess/API/Cocoa/WKWebView.mm:
3296         (-[WKWebView initWithFrame:configuration:]):
3297         Remove explicit setting of the sessionID. This is handled by the above call to setWebsiteDataStore().
3298
3299 2015-08-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3300
3301         Cannot change WKWebView scrollView deceleration rate
3302         https://bugs.webkit.org/show_bug.cgi?id=148086
3303         <rdar://problem/21893685>
3304
3305         Reviewed by Simon Fraser.
3306
3307         Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
3308         user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
3309         decelerationRate to the preferred decelerationRate, it will be set to the updated value.
3310
3311         * UIProcess/ios/WKScrollView.mm:
3312         (-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.
3313
3314 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
3315
3316         Adopt shrink-wrapping for TextIndicators on Mac
3317         https://bugs.webkit.org/show_bug.cgi?id=148064
3318
3319         Reviewed by Beth Dakin.
3320
3321         * Shared/WebCoreArgumentCoders.cpp:
3322         (IPC::ArgumentCoder<TextIndicatorData>::encode): Deleted.
3323         (IPC::ArgumentCoder<TextIndicatorData>::decode): Deleted.
3324         * WebProcess/WebPage/FindController.cpp:
3325         (WebKit::FindController::updateFindIndicator):
3326         * WebProcess/WebPage/ios/WebPageIOS.mm:
3327         (WebKit::WebPage::getPositionInformation):
3328         Use the new option, TextIndicatorOptionIncludeMarginIfRangeMatchesSelection,
3329         for iOS and FindController, because we can keep the margins in these cases
3330         because we don't have to animate to/from the blue highlight.
3331
3332 2015-08-16  Timothy Horton  <timothy_horton@apple.com>
3333
3334         Refactor ViewGestureController swipe snapshot removal to be more platform-independent
3335         https://bugs.webkit.org/show_bug.cgi?id=148062
3336
3337         Reviewed by Dan Bernstein.
3338
3339         * Platform/Logging.h:
3340         Add a ViewGestures logging channel.
3341
3342         * UIProcess/ViewGestureController.cpp: Added.
3343         (viewGestureControllersForAllPages):
3344         (WebKit::ViewGestureController::ViewGestureController):
3345         (WebKit::ViewGestureController::~ViewGestureController):
3346         (WebKit::ViewGestureController::gestureControllerForPage):
3347         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
3348         (WebKit::ViewGestureController::didRepaintAfterNavigation):
3349         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
3350         (WebKit::ViewGestureController::didRestoreScrollPosition):
3351         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
3352         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3353         (WebKit::ViewGestureController::checkForActiveLoads):
3354         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
3355         (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
3356         (WebKit::ViewGestureController::SnapshotRemovalTracker::log):
3357         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
3358         (WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
3359         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
3360         (WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
3361         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
3362         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
3363         (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
3364         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
3365         Build a platform-independent SnapshotRemovalTracker, which keeps track of
3366         various events that we wait for before removing the snapshot. This
3367         is constructed from the union of ViewGestureController{IOS, Mac}'s snapshot
3368         removal code, and each platform ViewGestureController can specify which
3369         events to wait for (because this currently differs slightly).
3370
3371         Add logging to SnapshotRemovalTracker to make debugging snapshot removal
3372         issues much easier.
3373
3374         * UIProcess/mac/ViewGestureController.h:
3375         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
3376         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
3377         (WebKit::ViewGestureController::didFailLoadForMainFrame):
3378
3379         * UIProcess/ios/ViewGestureControllerIOS.mm:
3380         (WebKit::ViewGestureController::platformTeardown):
3381         (WebKit::ViewGestureController::beginSwipeGesture):
3382         (WebKit::ViewGestureController::endSwipeGesture):
3383         (WebKit::ViewGestureController::setRenderTreeSize):
3384         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
3385         (WebKit::ViewGestureController::removeSwipeSnapshot):
3386         (viewGestureControllersForAllPages): Deleted.
3387         (WebKit::ViewGestureController::ViewGestureController): Deleted.
3388         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
3389         (WebKit::ViewGestureController::didRestoreScrollPosition): Deleted.
3390         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
3391         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
3392         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
3393         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
3394         (WebKit::ViewGestureController::removeSwipeSnapshotIfReady): Deleted.
3395         * UIProcess/mac/ViewGestureControllerMac.mm:
3396         (WebKit::ViewGestureController::platformTeardown):
3397         (WebKit::ViewGestureController::endSwipeGesture):
3398         (WebKit::ViewGestureController::forceRepaintIfNeeded):
3399         (WebKit::ViewGestureController::removeSwipeSnapshot):
3400         (WebKit::ViewGestureController::ViewGestureController): Deleted.
3401         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
3402         (WebKit::ViewGestureController::beginSwipeGesture): Deleted.
3403         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): Deleted.
3404         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Deleted.
3405         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
3406         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
3407         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
3408         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
3409         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Deleted.
3410         Move shareable snapshot removal code to a new platform-independent ViewGestureController file.
3411         Move the ViewGestureController constructor/destructor to the platform-independent file.
3412
3413         * UIProcess/mac/ViewGestureController.messages.in:
3414         * WebKit2.xcodeproj/project.pbxproj:
3415
3416 2015-08-11  Andy Estes  <aestes@apple.com>
3417
3418         [Cocoa] Add redirect support to CustomProtocolManager
3419         https://bugs.webkit.org/show_bug.cgi?id=147871
3420
3421         Reviewed by Dan Bernstein.
3422         
3423         NSURLProtocols have the ability to generate redirect responses. This change teaches CustomProtocolManager how to handle them.
3424
3425         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
3426         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Called -URLProtocol:wasRedirectedToRequest:redirectResponse: on the NSURLProtocolClient.
3427         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3428         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Defined WasRedirectedToRequest.
3429         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
3430         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Defined empty function.
3431         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
3432         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]): If a redirect response is received, send WasRedirectedToRequest and return nil to ignore the redirect.
3433
3434 2015-08-13  Andy Estes  <aestes@apple.com>
3435
3436         [Cocoa] Downloads do not start if policy decision is made asynchronously
3437         https://bugs.webkit.org/show_bug.cgi?id=147985
3438
3439         Reviewed by Brady Eidson.
3440
3441         * WebProcess/Network/WebResourceLoader.cpp: Updated to include SubresourceLoader.h.
3442         * WebProcess/WebPage/WebFrame.cpp:
3443         (WebKit::WebFrame::convertMainResourceLoadToDownload): Started a new download if the main resource loader is not calling didReceiveResponse.
3444
3445 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
3446
3447         Speculative fix for iOS build failure.
3448
3449         * Shared/mac/RemoteLayerTreeTransaction.h:
3450
3451 2015-08-14  Philippe Normand  <pnormand@igalia.com>
3452
3453         Unreviewed, remove dead code after r188385.
3454
3455         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
3456         (webkitUserMediaPermissionRequestAllow): Deleted.
3457
3458 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3459
3460         Unreviewed. Fix the build with !ENABLE(MEDIA_STREAM) after r188385.
3461
3462         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3463         (WKUserMediaPermissionRequestDeviceNamesVideo):
3464         (WKUserMediaPermissionRequestDeviceNamesAudio):
3465
3466 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3467
3468         Unreviewed. Fix GTK+ build after r188386.
3469
3470         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
3471         (webkitWindowPropertiesUpdateFromWebWindowFeatures):
3472
3473 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3474
3475         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
3476         https://bugs.webkit.org/show_bug.cgi?id=148012
3477         <rdar://problem/19238094>
3478
3479         Reviewed by Simon Fraser.
3480
3481         * UIProcess/mac/PageClientImpl.mm:
3482         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3483         * UIProcess/mac/WKImmediateActionController.mm:
3484         (-[WKImmediateActionController _animationControllerForText]):
3485         Adopt the new SPI, handing it the first text rect, instead of having it
3486         guess where to put the popover.
3487
3488 2015-08-13  Commit Queue  <commit-queue@webkit.org>
3489
3490         Unreviewed, rolling out r188418.
3491         https://bugs.webkit.org/show_bug.cgi?id=148017
3492
3493         Fix EFL after the rollout of r188404 (Requested by smfr on
3494         #webkit).
3495
3496         Reverted changeset:
3497
3498         "[CMake] Unreviewed build fix after r188404"
3499         http://trac.webkit.org/changeset/188418
3500
3501 2015-08-13  Commit Queue  <commit-queue@webkit.org>
3502
3503         Unreviewed, rolling out r188404.
3504         https://bugs.webkit.org/show_bug.cgi?id=148014
3505
3506         Broke 4 API tests (Requested by smfr on #webkit).
3507
3508         Reverted changeset:
3509
3510         "Add WKWindowFeaturesRef and a new modern createNewPage UI
3511         client callback"
3512         https://bugs.webkit.org/show_bug.cgi?id=147989
3513         http://trac.webkit.org/changeset/188404
3514
3515 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3516
3517         Try to fix the Gtk/EFL build.
3518
3519         * WebProcess/WebPage/FindController.cpp:
3520         (WebKit::FindController::updateFindIndicator):
3521
3522 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3523
3524         Refactor and improve TextIndicator to prepare for tests
3525         https://bugs.webkit.org/show_bug.cgi?id=147622
3526
3527         Reviewed by Simon Fraser.
3528
3529         * Shared/WebCoreArgumentCoders.cpp:
3530         (IPC::encodeOptionalImage):
3531         (IPC::decodeOptionalImage):
3532         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3533         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3534         Move encode/decodeOptionalImage to their own functions to avoid duplication.
3535
3536         * UIProcess/API/mac/WKView.mm:
3537         (-[WKView _dictionaryLookupPopoverWillClose:]):
3538         (-[WKView _setTextIndicator:]):
3539         (-[WKView _setTextIndicator:withLifetime:]):
3540         (-[WKView _clearTextIndicatorWithAnimation:]):
3541         (-[WKView _dismissContentRelativeChildWindows]):
3542         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
3543         * UIProcess/API/mac/WKViewInternal.h:
3544         * UIProcess/PageClient.h:
3545         * UIProcess/WebPageProxy.cpp:
3546         (WebKit::WebPageProxy::setTextIndicator):
3547         * UIProcess/WebPageProxy.h:
3548         * UIProcess/ios/PageClientImplIOS.h:
3549         * UIProcess/ios/PageClientImplIOS.mm:
3550         (WebKit::PageClientImpl::setTextIndicator):
3551         (WebKit::PageClientImpl::clearTextIndicator):
3552         * UIProcess/mac/PageClientImpl.h:
3553         * UIProcess/mac/PageClientImpl.mm:
3554         (WebKit::PageClientImpl::setTextIndicator):
3555         (WebKit::PageClientImpl::clearTextIndicator):
3556         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3557         * UIProcess/mac/WKImmediateActionController.mm:
3558         (-[WKImmediateActionController _animationControllerForText]):
3559         * WebProcess/WebPage/FindController.cpp:
3560         (WebKit::FindController::updateFindIndicator):
3561         * WebProcess/WebPage/ios/WebPageIOS.mm:
3562         (WebKit::WebPage::getPositionInformation):
3563         (WebKit::shouldUseTextIndicatorForLink): Deleted.
3564         * WebProcess/WebPage/mac/WebPageMac.mm:
3565         (WebKit::WebPage::dictionaryPopupInfoForRange):
3566         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
3567         Adopt TextIndicatorOptions.
3568         Adjust to Range method renames.
3569
3570 2015-08-13  Jaehun Lim  <ljaehun.lim@samsung.com>
3571
3572         [CMake] Unreviewed build fix after r188404
3573
3574         * CMakeLists.txt: Add UIProcess/API/APIWindowFeatures.cpp, UIProcess/API/C/WKWindowFeaturesRef.cpp
3575
3576 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3577
3578         A focused node should not be assisted when handling touch events synchronously
3579         https://bugs.webkit.org/show_bug.cgi?id=147836
3580         <rdar://problem/22204108>
3581
3582         Reviewed by Enrica Casucci.
3583
3584         Makes interaction with touch handlers no longer assist the currently focused element in the
3585         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
3586         so that an input that programmatically focuses itself and prevents default on a touch event will
3587         be properly assisted when it has been programmatically focused (either through Javascript or the
3588         autofocus attribute) prior to receiving the touch event. This patch also removes the now
3589         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
3590         upon autofocus.
3591
3592         * UIProcess/ios/WKContentViewInteraction.mm:
3593         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Removed
3594             special case to avoid the early return for Gmail Add Account.
3595         * WebProcess/WebCoreSupport/WebChromeClient.h: Added a handler for refocusing an element.
3596         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3597         (WebKit::WebChromeClient::elementDidRefocus): Makes refocusing an element trigger input
3598             assistance on iOS.
3599         * WebProcess/WebPage/WebPage.cpp:
3600         (WebKit::WebPage::dispatchTouchEvent): Removes logic to focus the currently focused element upon
3601             receiving a touch event.
3602
3603 2015-08-13  Anders Carlsson  <andersca@apple.com>
3604
3605         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
3606         https://bugs.webkit.org/show_bug.cgi?id=147989
3607
3608         Reviewed by Tim Horton.
3609
3610         * Platform/IPC/mac/ConnectionMac.mm:
3611         * Shared/API/APIObject.h:
3612         * Shared/API/c/WKBase.h:
3613         * UIProcess/API/APIWindowFeatures.cpp: Added.
3614         * UIProcess/API/APIWindowFeatures.h: Added.
3615         * UIProcess/API/C/WKAPICast.h:
3616         * UIProcess/API/C/WKPage.cpp:
3617         (WKPageSetPageUIClient):
3618         * UIProcess/API/C/WKPageUIClient.h:
3619         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
3620         (WKWindowFeaturesGetTypeID):
3621         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
3622         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3623         (-[WKWindowFeatures dealloc]):
3624         (-[WKWindowFeatures menuBarVisibility]):
3625         (-[WKWindowFeatures statusBarVisibility]):
3626         (-[WKWindowFeatures toolbarsVisibility]):
3627         (-[WKWindowFeatures allowsResizing]):
3628         (-[WKWindowFeatures x]):
3629         (-[WKWindowFeatures y]):
3630         (-[WKWindowFeatures width]):
3631         (-[WKWindowFeatures height]):
3632         (-[WKWindowFeatures _apiObject]):
3633         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
3634         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
3635         (WebKit::wrapper):
3636         * UIProcess/Cocoa/UIDelegate.mm:
3637         (WebKit::UIDelegate::UIClient::createNewPage):
3638         * WebKit2.xcodeproj/project.pbxproj:
3639
3640 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3641
3642         FilterOperation.h should not include FilterEffect.h
3643         https://bugs.webkit.org/show_bug.cgi?id=147970
3644
3645         Reviewed by Daniel Bates.
3646
3647         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
3648         so move its include to FilterOperation.cpp.
3649         
3650         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
3651
3652         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3653
3654 2015-08-12  Anders Carlsson  <andersca@apple.com>
3655
3656         Use WTF::Optional in WindowFeatures
3657         https://bugs.webkit.org/show_bug.cgi?id=147956
3658
3659         Reviewed by Sam Weinig.
3660
3661         * Shared/WebCoreArgumentCoders.cpp:
3662         (IPC::ArgumentCoder<WindowFeatures>::encode): Deleted.
3663         (IPC::ArgumentCoder<WindowFeatures>::decode): Deleted.
3664         * UIProcess/API/C/WKPage.cpp:
3665         (WKPageSetPageUIClient):
3666         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3667         (-[WKWindowFeatures _initWithWindowFeatures:]):
3668
3669 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
3670
3671         Linking device query ability from WebKit2 to clients
3672         https://bugs.webkit.org/show_bug.cgi?id=147263
3673         <rdar://problem/21983345>
3674
3675         Reviewed by Jer Noble.
3676
3677         * Platform/mac/LayerHostingContext.mm:
3678         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
3679         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
3680         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3681         (WKUserMediaPermissionRequestAllow):
3682         (WKUserMediaPermissionRequestDeviceNamesVideo):
3683         (WKUserMediaPermissionRequestDeviceNamesAudio):
3684         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
3685         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3686         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
3687         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3688         * UIProcess/UserMediaPermissionRequestProxy.cpp:
3689         (WebKit::UserMediaPermissionRequestProxy::allow):
3690         (WebKit::UserMediaPermissionRequestProxy::deny):
3691         * UIProcess/UserMediaPermissionRequestProxy.h:
3692         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3693         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
3694
3695
3696 2015-08-12  Alexey Proskuryakov  <ap@apple.com>
3697
3698         [Mac] WebKit processes should have access to com.apple.nesessionmanager.flow-divert-token
3699         https://bugs.webkit.org/show_bug.cgi?id=147949
3700         rdar://problem/22254920
3701
3702         Reviewed by Anders Carlsson.
3703
3704         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3705         * WebProcess/com.apple.WebProcess.sb.in:
3706
3707 2015-08-12  Brian Burg  <bburg@apple.com>
3708
3709         Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
3710         https://bugs.webkit.org/show_bug.cgi?id=147948
3711
3712         Reviewed by Joseph Pecoraro.
3713
3714         * WebProcess/WebPage/WebInspector.cpp:
3715         (WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
3716         * WebProcess/WebPage/WebInspector.h: Add default member variable values.
3717
3718 2015-08-12  Joseph Pecoraro  <pecoraro@apple.com>
3719
3720         Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
3721         https://bugs.webkit.org/show_bug.cgi?id=147844
3722
3723         Reviewed by Brian Burg.
3724
3725         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3726         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
3727         This method should not return without calling either the success
3728         or error callbacks. In this case, it can succeed with an empty list.
3729
3730 2015-08-12  Enrica Casucci  <enrica@apple.com>
3731
3732         Element interaction should not be canceled when the menu is already being shown.
3733         https://bugs.webkit.org/show_bug.cgi?id=147945
3734         rdar://problem/22206433
3735
3736         Reviewed by Beth Dakin.
3737
3738         When preview is canceled by the action menu gesture, we should not stop interacting
3739         with the element, since the information about the element is used for the menu actions.
3740         We now expose a new method in the action sheet assistant to know if the action sheed is
3741         being shown and we use this as an indication that we should not stop the interaction
3742         with the element.
3743
3744         * UIProcess/ios/WKActionSheetAssistant.h:
3745         * UIProcess/ios/WKActionSheetAssistant.mm:
3746         (-[WKActionSheetAssistant isShowingSheet]): Added.
3747         * UIProcess/ios/WKContentViewInteraction.mm:
3748         (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
3749         the interaction if the sheet is being shown.
3750
3751 2015-08-12  Matt Rajca  <mrajca@apple.com>
3752
3753         Fixed the Release build when MEDIA_SESSION is enabled.
3754
3755         * UIProcess/API/C/WKPage.cpp:
3756         (WKPageHandleMediaEvent):
3757
3758 2015-08-07  Matt Rajca  <mrajca@apple.com>
3759
3760         Media Session: notify the UI process when media controls are enabled/disabled
3761         https://bugs.webkit.org/show_bug.cgi?id=147802
3762
3763         Reviewed by Eric Carlson.
3764
3765         * UIProcess/WebMediaSessionFocusManager.cpp:
3766         (WebKit::WebMediaSessionFocusManager::playbackAttributeDidChange): Generalized to take different attributes.
3767         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
3768         * UIProcess/WebMediaSessionFocusManager.h:
3769         * UIProcess/WebPageProxy.cpp:
3770         (WebKit::WebPageProxy::isPlayingMediaDidChange): Process new attributes for enabling/disabling media controls.
3771
3772 2015-08-12  Devin Rousso  <drousso@apple.com>
3773
3774         Web Inspector: Implement selector highlighting for iOS
3775         https://bugs.webkit.org/show_bug.cgi?id=147919
3776
3777         Reviewed by Timothy Hatcher.
3778
3779         * UIProcess/WKInspectorHighlightView.mm:
3780         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
3781         Added offset parameter to start drawing the highlight at that index of the highlight quad list.
3782
3783         (-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
3784         Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
3785
3786         (-[WKInspectorHighlightView update:]):
3787         Now uses the light highlighting for both nodes and lists of nodes.
3788
3789 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3790
3791         NetworkProcess: DNS prefetch happens in the Web Process
3792         https://bugs.webkit.org/show_bug.cgi?id=147824
3793
3794         Reviewed by Alexey Proskuryakov.
3795
3796         DNS prefetch requests started in the WebProcess should be sent to
3797         the network process when it's enabled.
3798
3799         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3800         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Do the
3801         actual DNS prefetch.
3802         * NetworkProcess/NetworkConnectionToWebProcess.h:
3803         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
3804         PrefetchDNS message.
3805         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3806         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
3807         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3808         (WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
3809         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3810         * WebProcess/WebPage/ios/WebPageIOS.mm:
3811         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
3812         FrameLoaderClient to do the DNS prefetch.
3813         * WebProcess/WebProcess.cpp:
3814         (WebKit::WebProcess::prefetchDNS): Send the request to the network
3815         process if it's enabled, otherwise do the actual DNS prefetch.
3816         * WebProcess/WebProcess.h:
3817
3818 2015-08-11  Hunseop Jeong  <hs85.jeong@samsung.com>
3819
3820         Try to fix the EFL build after r188279
3821         https://bugs.webkit.org/show_bug.cgi?id=147917
3822
3823         Reviewed by Gyuyoung Kim.
3824
3825         Replaced the WKPageLoaderClient with variable name because it is removed in r188279.
3826
3827         * UIProcess/efl/PageLoadClientEfl.cpp:
3828         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
3829         * UIProcess/efl/PagePolicyClientEfl.cpp:
3830         (WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
3831
3832 2015-08-11  Andy Estes  <aestes@apple.com>
3833
3834         Tried again to fix the iOS build.
3835
3836         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3837         (-[WKGeolocationProviderIOS initWithProcessPool:]):
3838
3839 2015-08-11  Dan Bernstein  <mitz@apple.com>
3840
3841         Tried to fix the iOS build.
3842
3843         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3844         (-[WKGeolocationProviderIOS initWithProcessPool:]):
3845
3846 2015-08-11  Andy Estes  <aestes@apple.com>
3847
3848         WebFrameLoaderClient::dispatchDecidePolicyForResponse() calls an std::function after it's been moved from
3849         https://bugs.webkit.org/show_bug.cgi?id=147873
3850
3851         Reviewed by Alexey Proskuryakov.
3852         
3853         I noticed during code inspection that we were calling an std::function after WTF::move() has been called on it.
3854         Calling an empty std::function results in a C++ exception being thrown. I don't know how to make a sync IPC
3855         message fail, so I'm not sure how to test this.
3856
3857         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3858         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Called didReceivePolicyDecision instead.
3859
3860 2015-08-11  Beth Dakin  <bdakin@apple.com>
3861
3862         REGRESSION (r188053): Sometimes unable to save an image from Google Search/
3863         imgur via long press
3864         https://bugs.webkit.org/show_bug.cgi?id=147896
3865
3866         Reviewed by Enrica Casucci.
3867
3868         http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when 
3869         the long press gesture is cancelled. However, the gesture will be called with 
3870         the cancelled state when then user taps an item in the action sheet (such as 
3871         “save image”), and sometimes the “cancel” comes in before the image has been 
3872         saved. That is a problem because we need to avoid cleaning up the sheet until 
3873         after the image is saved. Before that patch, we never cleaned up the sheet on 
3874         cancel, so this patch goes back to that behavior. We also have to remove some 
3875         assertions that assume that everything will be totally cleaned up when a new 
3876         sheet is created, but that is not necessarily true due to interactions 
3877         between the preview gesture and the long press gesture. 
3878
3879         Remove assertions.
3880         * UIProcess/ios/WKActionSheetAssistant.mm:
3881         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3882         (-[WKActionSheetAssistant showImageSheet]):
3883         (-[WKActionSheetAssistant showLinkSheet]):
3884         (-[WKActionSheetAssistant showDataDetectorsSheet]):
3885
3886         Revert the part of Enrica’s patch that called cleanupSheet when the gesture 
3887         is cancelled.
3888         * UIProcess/ios/WKContentViewInteraction.mm:
3889         (-[WKContentView _longPressRecognized:]):
3890
3891 2015-08-11  Anders Carlsson  <andersca@apple.com>
3892
3893         Remove unversioned client structs from the C SPI
3894         https://bugs.webkit.org/show_bug.cgi?id=147894
3895
3896         Reviewed by Dan Bernstein.
3897
3898         * Shared/API/c/WKConnectionRef.h:
3899         * UIProcess/API/C/WKContext.h:
3900         * UIProcess/API/C/WKContextConnectionClient.h:
3901         * UIProcess/API/C/WKContextDownloadClient.h:
3902         * UIProcess/API/C/WKContextHistoryClient.h:
3903         * UIProcess/API/C/WKContextInjectedBundleClient.h:
3904         * UIProcess/API/C/WKCookieManager.h:
3905         * UIProcess/API/C/WKDatabaseManager.h:
3906         * UIProcess/API/C/WKGeolocationManager.h:
3907         * UIProcess/API/C/WKIconDatabase.h:
3908         * UIProcess/API/C/WKNotificationProvider.h:
3909         * UIProcess/API/C/WKPageContextMenuClient.h:
3910         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
3911         * UIProcess/API/C/WKPageFindClient.h:
3912         * UIProcess/API/C/WKPageFindMatchesClient.h:
3913         * UIProcess/API/C/WKPageFormClient.h:
3914         * UIProcess/API/C/WKPageLoaderClient.h:
3915         * UIProcess/API/C/WKPagePolicyClient.h:
3916         * UIProcess/API/C/WKPageUIClient.h:
3917         * WebProcess/InjectedBundle/API/c/WKBundle.h:
3918         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
3919         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
3920         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
3921         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
3922         * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
3923         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
3924         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
3925         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3926         * WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
3927         * WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
3928         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3929
3930 2015-08-11  Dan Bernstein  <mitz@apple.com>
3931
3932         Reverted r188255, because it turned out that delegates do nonot need this information.
3933
3934         * UIProcess/API/APIUIClient.h:
3935         (API::UIClient::footerHeight):
3936         (API::UIClient::drawHeader):
3937         (API::UIClient::drawFooter):
3938         (API::UIClient::printFrame):
3939         (API::UIClient::canRunModal):
3940         (API::UIClient::runModal):
3941         * UIProcess/API/C/WKPage.cpp:
3942         (WKPageSetPageUIClient):
3943         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3944         * UIProcess/Cocoa/UIDelegate.h:
3945         * UIProcess/Cocoa/UIDelegate.mm:
3946         (WebKit::UIDelegate::UIDelegate):
3947         (WebKit::UIDelegate::setDelegate):
3948         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
3949         (WebKit::UIDelegate::UIClient::printFrame):
3950         (WebKit::UIDelegate::UIClient::close):
3951         * UIProcess/WebPageProxy.cpp:
3952         (WebKit::WebPageProxy::runOpenPanel):
3953         (WebKit::WebPageProxy::printFrame):
3954         (WebKit::WebPageProxy::printMainFrame):
3955         (WebKit::WebPageProxy::setMediaVolume):
3956         * UIProcess/WebPageProxy.h:
3957         (WebKit::WebPageProxy::setShouldSendEventsSynchronously):
3958         * UIProcess/WebPageProxy.messages.in:
3959         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3960         (WebKit::WebChromeClient::print):
3961         (WebKit::WebChromeClient::exceededDatabaseQuota):
3962
3963 2015-08-11  Dan Bernstein  <mitz@apple.com>
3964
3965         [Cocoa] The UI delegate can't tell if printing was user-initiated
3966         https://bugs.webkit.org/show_bug.cgi?id=147869
3967
3968         Reviewed by Sam Weinig.
3969
3970         * UIProcess/API/APIUIClient.h:
3971         (API::UIClient::printFrame): Added processingUserGesture argument.
3972
3973         * UIProcess/API/C/WKPage.cpp:
3974         (WKPageSetPageUIClient): Updated for new client function signature.
3975
3976         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added userInitiated boolean argument to
3977           -_webView:printFrame:.
3978
3979         * UIProcess/Cocoa/UIDelegate.h: Added bool to m_delegateMethods for the new method.
3980         * UIProcess/Cocoa/UIDelegate.mm:
3981         (WebKit::UIDelegate::UIDelegate):
3982         (WebKit::UIDelegate::setDelegate): Initialized new bool.
3983         (WebKit::UIDelegate::UIClient::printFrame): Pass processingUserGesture as the delegate’s
3984           userInitiated argument.
3985
3986         * UIProcess/WebPageProxy.cpp:
3987         (WebKit::WebPageProxy::printFrame): Added processingUserGesture argument, passing it along
3988           to the client.
3989         * UIProcess/WebPageProxy.h:
3990
3991         * UIProcess/WebPageProxy.messages.in: Added processingUserGesture argument to printFrame.
3992
3993         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3994         (WebKit::WebChromeClient::print): Pass new argument.
3995
3996 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
3997
3998         Add MediaDeviceIdentifier to WebsiteDataTypes
3999         https://bugs.webkit.org/show_bug.cgi?id=147853
4000
4001         Reviewed by Jer Noble.
4002
4003         * Shared/WebsiteData/WebsiteDataTypes.h:
4004
4005 2015-08-10  Sam Weinig  <sam@webkit.org>
4006
4007         Try to fix the 32-bit build.
4008
4009         * UIProcess/API/mac/WKViewInternal.h:
4010
4011 2015-08-08  Sam Weinig  <sam@webkit.org>
4012
4013         Replace WebPageConfiguration with API::PageConfiguration and expose a C-SPI accessor for it
4014         https://bugs.webkit.org/show_bug.cgi?id=147811
4015
4016         Reviewed by Darin Adler.
4017
4018         - Adds the missing pieces from WebPageConfiguration into API::PageConfiguration.
4019         - Adds C-SPI to set and get the WebsiteDataStore on the WKPageConfigurationRef.
4020         - Uses API::PageConfiguration to pass configuration information from WKWebView/WKView 
4021           to WebPageProxy.
4022         - Stores the API::PageConfiguration on the WebPageProxy and exposes a new C-SPI function,
4023           WKPageCopyPageConfiguration, to get a copy of it.
4024
4025         * UIProcess/API/APIPageConfiguration.cpp:
4026         (API::PageConfiguration::create):
4027         (API::PageConfiguration::PageConfiguration):
4028         (API::PageConfiguration::~PageConfiguration):
4029         (API::PageConfiguration::copy):
4030         (API::PageConfiguration::processPool):
4031         (API::PageConfiguration::setRelatedPage):
4032         (API::PageConfiguration::visitedLinkProvider):
4033         (API::PageConfiguration::setVisitedLinkProvider):
4034         (API::PageConfiguration::websiteDataStore):
4035         (API::PageConfiguration::setWebsiteDataStore):
4036         (API::PageConfiguration::sessionID):
4037         (API::PageConfiguration::setSessionID):
4038         (API::PageConfiguration::webPageConfiguration): Deleted.
4039         * UIProcess/API/APIPageConfiguration.h:
4040         (API::PageConfiguration::preferenceValues):
4041         (API::PageConfiguration::treatsSHA1SignedCertificatesAsInsecure):
4042         (API::PageConfiguration::setTreatsSHA1SignedCertificatesAsInsecure):
4043         (API::PageConfiguration::alwaysRunsAtForegroundPriority):
4044         (API::PageConfiguration::setAlwaysRunsAtForegroundPriority):
4045         (API::PageConfiguration::create): Deleted.
4046         * UIProcess/API/C/WKPage.cpp:
4047         (WKPageGetPageGroup):
4048         (WKPageCopyPageConfiguration):
4049         (WKPageLoadURL):
4050         * UIProcess/API/C/WKPage.h:
4051         * UIProcess/API/C/WKPageConfigurationRef.cpp:
4052         (WKPageConfigurationSetRelatedPage):
4053         (WKPageConfigurationGetWebsiteDataStore):
4054         (WKPageConfigurationSetWebsiteDataStore):
4055         * UIProcess/API/C/WKPageConfigurationRef.h:
4056         * UIProcess/API/Cocoa/WKWebView.mm:
4057         (-[WKWebView initWithFrame:configuration:]):
4058         * UIProcess/API/ios/WKViewIOS.mm:
4059         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
4060         * UIProcess/API/mac/WKView.mm:
4061         (-[WKView _setPrimaryTrackingArea:]):
4062         (-[WKView initWithFrame:processPool:configuration:webView:]):
4063         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
4064         (-[WKView initWithFrame:configurationRef:]):
4065         (-[WKView wantsUpdateLayer]):
4066         * UIProcess/API/mac/WKViewInternal.h:
4067         * UIProcess/WebPageProxy.cpp:
4068         (WebKit::WebPageProxy::create):
4069         (WebKit::WebPageProxy::WebPageProxy):
4070         (WebKit::WebPageProxy::~WebPageProxy):
4071         (WebKit::WebPageProxy::configuration):
4072         (WebKit::WebPageProxy::processIdentifier):
4073         * UIProcess/WebPageProxy.h:
4074         (WebKit::WebPageProxy::pageID):
4075         (WebKit::WebPageProxy::sessionID):
4076         * UIProcess/WebProcessPool.cpp:
4077         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
4078         (WebKit::WebProcessPool::createWebPage):
4079         (WebKit::WebProcessPool::download):
4080         * UIProcess/WebProcessPool.h:
4081         * UIProcess/WebProcessProxy.cpp:
4082         (WebKit::WebProcessProxy::webPage):
4083         (WebKit::WebProcessProxy::createWebPage):
4084         * UIProcess/WebProcessProxy.h:
4085         (WebKit::WebProcessProxy::processPool):
4086         * UIProcess/ios/WKContentView.h:
4087         * UIProcess/ios/WKContentView.mm:
4088         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
4089         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
4090         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
4091         (-[WKContentView dealloc]):
4092
4093 2015-08-10  Commit Queue  <commit-queue@webkit.org>
4094
4095         Unreviewed, rolling out r187131 and r187286.
4096         https://bugs.webkit.org/show_bug.cgi?id=147839
4097
4098          Causing mroe frequent crashes with invalid layer bounds
4099         (rdar://problem/21465328) (Requested by smfr on #webkit).
4100
4101         Reverted changesets:
4102
4103         "[iOS] Menu drop down such as on nike.com does not stay"
4104         https://bugs.webkit.org/show_bug.cgi?id=147047
4105         http://trac.webkit.org/changeset/187131
4106
4107         "[iOS] REGRESSION (187131): Loading CuteOverload zooms in to
4108         the top left corner."
4109         https://bugs.webkit.org/show_bug.cgi?id=147251
4110         http://trac.webkit.org/changeset/187286
4111
4112 2015-08-07  Matt Rajca  <mrajca@apple.com>
4113
4114         Media Session: generalize isFocusedContentMediaElementPlaying so it works with other playback attributes
4115         https://bugs.webkit.org/show_bug.cgi?id=147797
4116
4117         Reviewed by Simon Fraser.
4118
4119         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
4120         (WKMediaSessionFocusManagerValueForPlaybackAttribute):
4121         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Deleted.
4122         * UIProcess/API/C/WKMediaSessionFocusManager.h:
4123         * UIProcess/WebMediaSessionFocusManager.cpp:
4124         (WebKit::WebMediaSessionFocusManager::valueForPlaybackAttribute):
4125         (WebKit::WebMediaSessionFocusManager::mediaControlIsEnabledDidChange):
4126         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Deleted.
4127         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
4128         * UIProcess/WebMediaSessionFocusManager.h:
4129
4130 2015-08-10  Zan Dobersek  <zdobersek@igalia.com>
4131
4132         [CoordinatedGraphics] Fix forward declarations of CoordinatedGraphicsLayerState, ViewportAttributes
4133         https://bugs.webkit.org/show_bug.cgi?id=147823
4134
4135         Reviewed by Carlos Garcia Campos.
4136
4137         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
4138         * WebProcess/WebPage/LayerTreeHost.h:
4139
4140 2015-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
4141
4142         [GTK] Crash when the web view is destroyed while the screensaver DBUs proxy is being created
4143         https://bugs.webkit.org/show_bug.cgi?id=147780
4144
4145         Reviewed by Sergio Villar Senin.
4146
4147         We should cancel the screenSaverInhibitCancellable on
4148         dispose. Also use adoptGRef() when creating the cancellable object
4149         to not leak it.
4150
4151         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
4152         (webkitWebViewBaseDispose):
4153         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
4154         (webkitWebViewBaseInhibitScreenSaver):
4155
4156 2015-08-09  Chris Dumez  <cdumez@apple.com>
4157
4158         Follow-up nit fixes after r187691.
4159         https://bugs.webkit.org/show_bug.cgi?id=128006
4160
4161         Reviewed by Gavin Barraclough.
4162
4163         Use modern for-loops instead of explicit iterators.
4164
4165         * Shared/Authentication/AuthenticationManager.cpp:
4166         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
4167         (WebKit::AuthenticationManager::coalesceChallengesMatching):
4168
4169 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
4170
4171         Lightweight locks should be adaptive
4172         https://bugs.webkit.org/show_bug.cgi?id=147545
4173
4174         Reviewed by Geoffrey Garen.
4175
4176         * WebProcess/WebPage/EventDispatcher.cpp:
4177         (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
4178         (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
4179         (WebKit::EventDispatcher::touchEvent):
4180         (WebKit::EventDispatcher::dispatchTouchEvents):
4181         * WebProcess/WebPage/EventDispatcher.h:
4182         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
4183         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
4184         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
4185         * WebProcess/WebPage/ViewUpdateDispatcher.h:
4186
4187 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
4188
4189         Temporarily allow programmatic input assistance for adding Gmail account
4190         https://bugs.webkit.org/show_bug.cgi?id=147792
4191
4192         Reviewed by Enrica Casucci.
4193         <rdar://problem/22126518>
4194
4195         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
4196         in the Gmail 2-factor authentication page.
4197
4198         * UIProcess/ios/WKContentViewInteraction.mm:
4199         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Early