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