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