1 2014-07-29 Tim Horton <timothy_horton@apple.com>
3 WKPDFView paints rotated pages squished
4 https://bugs.webkit.org/show_bug.cgi?id=135401
5 <rdar://problem/17173916>
7 Reviewed by Simon Fraser.
9 * UIProcess/ios/WKPDFView.mm:
10 (-[WKPDFView _computePageAndDocumentFrames]):
11 [page size] returns the crop box's size, ignoring rotation.
12 [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
13 UIPDFPageView will respect rotation when painting, so we
14 should make sure that it is given an aspect ratio that also
15 respects rotation, so that the page isn't squished.
17 2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
19 URTBF for !ENABLE(DATABASE_PROCESS) platforms.
21 * WebProcess/OriginData/WebOriginDataManager.cpp:
22 (WebKit::WebOriginDataManager::getOrigins):
23 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
24 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
25 (WebKit::WebOriginDataManager::deleteAllEntries):
27 2014-07-29 Brady Eidson <beidson@apple.com>
29 Make WKOriginDataManager actually operate on IndexedDatabases.
30 https://bugs.webkit.org/show_bug.cgi?id=135346
32 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
34 * DatabaseProcess/DatabaseProcess.cpp:
35 (WebKit::DatabaseProcess::DatabaseProcess):
36 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
37 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
38 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
39 that have been modified between the given dates.
40 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
41 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
42 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
43 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
44 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
45 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
46 * DatabaseProcess/DatabaseProcess.h:
48 * Shared/WebCrossThreadCopier.cpp:
49 (WebCore::SecurityOriginData>::copy):
50 * Shared/WebCrossThreadCopier.h:
52 * UIProcess/WebOriginDataManagerProxy.cpp:
53 (WebKit::WebOriginDataManagerProxy::getOrigins):
54 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
55 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
56 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
57 (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
59 * WebProcess/OriginData/WebOriginDataManager.cpp:
60 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
61 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
62 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
63 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
65 2014-07-29 Commit Queue <commit-queue@webkit.org>
67 Unreviewed, rolling out r171704.
68 https://bugs.webkit.org/show_bug.cgi?id=135389
70 Broke two IndexedDB tests (Requested by ap on #webkit).
74 "IDB transactions never reset if the Web Process ends before
76 https://bugs.webkit.org/show_bug.cgi?id=135218
77 http://trac.webkit.org/changeset/171704
79 2014-07-29 Daniel Bates <dabates@apple.com>
81 Use WTF::move() instead of std::move() to help ensure move semantics
82 https://bugs.webkit.org/show_bug.cgi?id=135351
84 Reviewed by Alexey Proskuryakov.
86 * UIProcess/API/Cocoa/_WKSessionState.mm:
87 (-[_WKSessionState _initWithSessionState:]):
88 * UIProcess/API/gtk/WebKitUserContent.cpp:
89 (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
90 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
91 (WebKit::ServicesOverlayController::mouseEvent):
93 2014-07-28 Pratik Solanki <psolanki@apple.com>
95 Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
96 https://bugs.webkit.org/show_bug.cgi?id=131782
98 Original patch by Tim Horton.
99 Reviewed by Darin Adler.
101 * NetworkProcess/NetworkResourceLoader.cpp:
102 * WebProcess/Network/NetworkProcessConnection.cpp:
103 Include SharedBuffer.h in implementation files.
105 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
106 Un-indent namespace and remove SharedBuffer forward-declaration.
108 2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
110 [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
111 https://bugs.webkit.org/show_bug.cgi?id=133729
113 Reviewed by Carlos Garcia Campos.
115 Removes WebKitWebViewGroup, effectively reverting the changes
116 introduced by r149117. The motivation for WebKitWebViewGroup
117 was using the user style sheet injection API, which has been
118 moved into WebKitUserContentManager, rendering it unneeded.
120 * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
122 * UIProcess/API/C/gtk/WKView.cpp:
123 (WKViewCreate): Accomodate for changes in the signature of
124 webkitWebViewBaseCreate().
125 * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
126 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
127 view group from WebKitWebContext.
128 (webkitWebContextCreatePageForWebView): Allow passing a
129 WebPreferences object at construction.
130 (webkitWebContextGetDefaultWebViewGroup): Deleted.
131 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
132 * UIProcess/API/gtk/WebKitWebView.cpp:
133 (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
134 directly. Handle the case when webkit_web_view_set_settings()
135 is called on construction by doing an early-return.
136 (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
137 after creating the internal WebPageProxy object.
138 (webkitWebViewSetProperty): Removed "group" property, added
140 (webkitWebViewGetProperty): Ditto.
141 (webkitWebViewDispose): Do not disconnect signal handler for
142 the (now unexistant) WebKitWebViewGroup.
143 (webkit_web_view_class_init): Removed "group" property, added
145 (webkitWebViewHandleAuthenticationChallenge): Access the
146 WebKitWebSettings directly.
147 (webkit_web_view_new_with_related_view): Make new views share
148 settings with their related view.
149 (webkit_web_view_new_with_settings): Added.
150 (webkit_web_view_set_settings): Access the settings directly in
152 (webkit_web_view_get_settings): Ditto.
153 (webkit_web_view_set_zoom_level): Ditto.
154 (webkit_web_view_get_zoom_level): Ditto.
155 (webkitWebViewSettingsChanged): Deleted.
156 (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
157 (webkit_web_view_new_with_group): Deleted.
158 (webkit_web_view_get_group): Deleted.
159 * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
160 to WebKitWebViewGroup.
161 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
162 (webkitWebViewBaseCreate): Allow passing a WebPreferences object
163 for constructing the WebPageProxy.
164 (webkitWebViewBaseUpdatePreferences): Instead of going through
165 the page group, use WebPageProxy::preferences() directly.
166 (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
167 object for constructing the WebPageProxy.
168 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
169 prototypes of the internal functions.
170 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
171 * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
172 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
173 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
174 bits in the documentation.
175 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
176 * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
177 * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
178 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
179 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
180 Accomodate for changes in the signature of
181 webkitWebViewBaseCreate().
183 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
185 Implement webkit_web_view_load_string() in WebKit2
186 https://bugs.webkit.org/show_bug.cgi?id=134735
188 Reviewed by Sergio Villar Senin.
190 Add webkit_web_view_load_bytes() that receives a GBytes to load
191 random data in the web view using the given MIME-Type, encoding
194 * UIProcess/API/gtk/WebKitWebView.cpp:
196 (webkit_web_view_load_bytes):
197 * UIProcess/API/gtk/WebKitWebView.h:
198 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
199 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
201 2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
203 [EFL] Alpha value of ewk_view_bg_color_set is not working
204 https://bugs.webkit.org/show_bug.cgi?id=135333
206 Reviewed by Gyuyoung Kim.
208 evas_object_image_alpha_set should be called for the transparent evas object.
210 * UIProcess/API/efl/EwkView.cpp:
211 (EwkView::handleEvasObjectColorSet):
212 (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
213 * UIProcess/API/efl/EwkView.h:
214 * UIProcess/API/efl/ewk_view.cpp:
215 (ewk_view_bg_color_set): Moved the logic to EwkView.
217 2014-07-28 Mark Rowe <mrowe@apple.com>
219 Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
220 https://bugs.webkit.org/show_bug.cgi?id=135366
222 Reviewed by Dan Bernstein.
224 * Platform/IPC/mac/ConnectionMac.mm:
225 (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
226 normal development with debug builds.
228 2014-07-28 Benjamin Poulain <bpoulain@apple.com>
230 [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
231 https://bugs.webkit.org/show_bug.cgi?id=135368
232 <rdar://problem/16988887>
234 Reviewed by Simon Fraser.
236 We should never assume DrawingAreaProxy exists in the API invoked by the clients
237 of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
238 -In some path on initialization.
241 * UIProcess/API/Cocoa/WKWebView.mm:
242 (-[WKWebView _frameOrBoundsChanged]):
243 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
244 We can safely null check and skip setting the size. If the call was skipped,
245 the size is set on DrawingAreaProxy initialization by querying the current
246 size through the page client.
248 2014-07-28 Roger Fong <roger_fong@apple.com>
250 Disable tagged strings for the plugin process.
251 https://bugs.webkit.org/show_bug.cgi?id=135354
252 <rdar://problem/17295639>.
254 Patch by Alexey Proskuryakov and Roger Fong.
256 Reviewed by Anders Carlsson.
258 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
259 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
260 (WebKit::connectToReExecService):
262 2014-07-25 Jeffrey Pfau <jpfau@apple.com>
264 IDB transactions never reset if the Web Process ends before cleaning up
265 https://bugs.webkit.org/show_bug.cgi?id=135218
267 Reviewed by Darin Adler.
269 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
270 (WebKit::DatabaseToWebProcessConnection::didClose):
271 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
272 (WebKit::UniqueIDBDatabase::unregisterConnection):
273 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
274 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
275 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
276 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
277 (WebKit::UniqueIDBDatabase::didResetTransaction):
278 (WebKit::UniqueIDBDatabase::resetAllTransactions):
279 (WebKit::UniqueIDBDatabase::finalizeRollback):
280 (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
281 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
282 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
283 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
285 2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
287 [GTK] Keep non-DATABASE_PROCESS build
288 https://bugs.webkit.org/show_bug.cgi?id=135321
290 Reviewed by Gyuyoung Kim.
292 This is the patch for r171622 in non-DATABASE_PROCESS builds.
293 Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
296 * UIProcess/WebContext.h:
297 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
299 2014-07-27 Gavin Barraclough <baraclough@apple.com>
301 Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
302 https://bugs.webkit.org/show_bug.cgi?id=135329
303 rdar://problem/17818308
305 Reviewed by Sam Weinig.
307 API may not be stable.
309 * UIProcess/ios/PageClientImplIOS.mm:
310 (WebKit::PageClientImpl::isViewVisible):
311 - changed to use -[WKContentView isBackground]
312 * UIProcess/ios/ProcessAssertionIOS.mm:
313 (-[WKProcessAssertionBackgroundTaskManager init]):
314 - split notification handlers
315 (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
316 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
317 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
318 - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
319 * UIProcess/ios/WKContentView.h:
320 - added isBackground.
321 * UIProcess/ios/WKContentView.mm:
322 (-[WKContentView initWithFrame:context:configuration:webView:]):
323 - check applicationState at init.
324 (-[WKContentView isBackground]):
326 (-[WKContentView _applicationDidEnterBackground:]):
327 (-[WKContentView _applicationWillEnterForeground:]):
328 - update isBackground
330 2014-07-26 Enrica Casucci <enrica@apple.com>
332 [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
333 https://bugs.webkit.org/show_bug.cgi?id=135325
334 <rdar://problem/17682120>
336 Reviewed by Sam Weinig.
338 WKContentView now implements moveByOffset to support the
339 protocol for 3rd party keyboards.
341 * UIProcess/WebPageProxy.h:
342 * UIProcess/ios/WKContentViewInteraction.mm:
343 (-[WKContentView moveByOffset:]):
344 * UIProcess/ios/WebPageProxyIOS.mm:
345 (WebKit::WebPageProxy::moveSelectionByOffset):
346 * WebProcess/WebPage/WebPage.h:
347 * WebProcess/WebPage/WebPage.messages.in:
348 * WebProcess/WebPage/ios/WebPageIOS.mm:
349 (WebKit::WebPage::moveSelectionByOffset):
351 2014-07-26 Timothy Horton <timothy_horton@apple.com>
353 Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
354 https://bugs.webkit.org/show_bug.cgi?id=135319
355 <rdar://problem/17315168>
357 Reviewed by Darin Adler and Antti Koivisto.
359 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
360 (WebKit::WebFrameLoaderClient::committedLoad):
361 Allow data through to WebCore for frames with custom content providers;
362 the only custom content provider currently implemented is main frame PDF
363 on iOS, which will end up creating a PDFDocument in WebCore, which drops all
364 data on the floor immediately, so this won't result in WebCore doing anything
365 with the data, but makes sure that more of the normal document lifecycle is maintained.
367 In the future, we might want to consider ensuring that all custom content providers
368 end up creating a SinkDocument or something similarly generic to ensure that
369 WebCore doesn't try to do anything with their data, but for now, the only client is covered.
371 2014-07-25 Jeremy Jones <jeremyj@apple.com>
373 Parent fullscreen from window instead of view
374 https://bugs.webkit.org/show_bug.cgi?id=135310
376 Reviewed by Jer Noble.
378 Parenting in the view causes an incorrect animation to fullscreen, and can cause
379 fullscreen to only expand to the size of the view instead of the whole window.
381 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
382 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
383 * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
384 (WebKit::screenRectForNode): was clientRectForNode
385 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
386 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
387 (WebKit::clientRectForNode): Deleted.
389 2014-07-25 Oliver Hunt <oliver@apple.com>
391 Creating incorrect sandbox extension for hsts plist due to missing /
392 https://bugs.webkit.org/show_bug.cgi?id=135309
394 Reviewed by Sam Weinig.
396 So it turns out that you do actually need /'s in paths...
397 Now we actually create the correct extension.
399 * UIProcess/mac/WebContextMac.mm:
400 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
402 2014-07-24 Anders Carlsson <andersca@apple.com>
404 WKNavigation's properties are either always nil or don't behave as documented
405 https://bugs.webkit.org/show_bug.cgi?id=135267
406 <rdar://problem/17730536>
408 Reviewed by Andreas Kling.
410 Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
412 * Shared/API/Cocoa/WebKitPrivate.h:
413 * UIProcess/API/Cocoa/WKNavigation.h:
414 * UIProcess/API/Cocoa/WKNavigation.mm:
415 (-[WKNavigation _request]):
416 (-[WKNavigation initialRequest]): Deleted.
417 (-[WKNavigation request]): Deleted.
418 (-[WKNavigation setRequest:]): Deleted.
419 (-[WKNavigation response]): Deleted.
420 (-[WKNavigation error]): Deleted.
421 * UIProcess/API/Cocoa/WKNavigationInternal.h:
422 * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
423 * UIProcess/Cocoa/NavigationState.mm:
424 (WebKit::NavigationState::createLoadRequestNavigation):
425 * WebKit2.xcodeproj/project.pbxproj:
427 2014-07-25 Brady Eidson <beidson@apple.com>
429 Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
430 https://bugs.webkit.org/show_bug.cgi?id=135035
432 Reviewed by Sam Weinig.
434 * DatabaseProcess/DatabaseProcess.cpp:
435 (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
436 (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
437 * DatabaseProcess/DatabaseProcess.h:
438 * DatabaseProcess/DatabaseProcess.messages.in:
440 * UIProcess/API/C/WKOriginDataManager.cpp:
441 (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
442 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
443 (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
444 (WKOriginDataManagerStartObservingChanges): Deleted.
445 (WKOriginDataManagerStopObservingChanges): Deleted.
446 (WKOriginDataManagerSetChangeClient): Deleted.
447 * UIProcess/API/C/WKOriginDataManager.h:
449 * UIProcess/Databases/DatabaseProcessProxy.cpp:
450 (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
451 * UIProcess/Databases/DatabaseProcessProxy.h:
452 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
454 * UIProcess/WebContext.cpp:
455 (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
456 * UIProcess/WebContext.h:
457 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
459 * UIProcess/WebOriginDataManagerProxy.cpp:
460 (WebKit::WebOriginDataManagerProxy::contextDestroyed):
461 (WebKit::WebOriginDataManagerProxy::processDidClose):
462 (WebKit::WebOriginDataManagerProxy::getOrigins):
463 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
464 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
465 (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
466 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
467 (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
468 (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
469 (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
470 (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
471 (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
472 * UIProcess/WebOriginDataManagerProxy.h:
473 * UIProcess/WebOriginDataManagerProxy.messages.in:
475 * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
476 * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
478 * WebKit2.xcodeproj/project.pbxproj:
480 * WebProcess/OriginData/WebOriginDataManager.cpp:
481 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
482 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
483 (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
484 (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
485 (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
486 * WebProcess/OriginData/WebOriginDataManager.h:
487 * WebProcess/OriginData/WebOriginDataManager.messages.in:
489 2014-07-25 Gavin Barraclough <baraclough@apple.com>
491 Yosemite version number is 101000
492 https://bugs.webkit.org/show_bug.cgi?id=135301
494 Reviewed by Sam Weinig.
496 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
497 (WebKit::connectToService):
498 * WebProcess/com.apple.WebProcess.sb.in:
500 2014-07-24 Benjamin Poulain <bpoulain@apple.com>
502 [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
503 https://bugs.webkit.org/show_bug.cgi?id=135277
504 <rdar://problem/17804891>
506 Reviewed by Tim Horton.
508 * WebProcess/WebPage/ios/WebPageIOS.mm:
509 (WebKit::WebPage::dynamicViewportSizeUpdate):
510 There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
511 we should not attempt to use the layer without null checking it first.
513 The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
514 there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
516 Skipping hit testing is safe because it is a completely optional part of this algorithm.
517 When the hit test is not done, the new position is computed based on the relative position prior to
520 2014-07-24 Dan Bernstein <mitz@apple.com>
522 WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
523 https://bugs.webkit.org/show_bug.cgi?id=135129
525 Reviewed by Darin Adler.
527 * Shared/WebBackForwardListItem.cpp:
528 (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
529 WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
530 (WebKit::documentTreesAreEqual): New helper function based on
531 WebCore::HistoryItem::hasSameDocumentTree.
532 (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
533 WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
534 * Shared/WebBackForwardListItem.h:
536 * UIProcess/WebPageProxy.cpp:
537 (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
538 navigation is a same-document navigation.
539 (WebKit::WebPageProxy::goBack): Ditto.
540 (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
542 2014-07-24 Tim Horton <timothy_horton@apple.com>
544 Sometimes WKWebView is blank after resuming the app, until you scroll
545 https://bugs.webkit.org/show_bug.cgi?id=135275
546 <rdar://problem/17803170>
548 Reviewed by Benjamin Poulain.
550 * UIProcess/WebPageProxy.cpp:
551 (WebKit::WebPageProxy::dispatchViewStateChange):
552 If the UI process is waiting for a didUpdateViewState, we need to *always*
553 get a reply from the Web Process, so dispatchViewStateChange should *always*
554 send SetViewState even if nothing changed (so that we get the reply).
556 2014-07-24 Simon Fraser <simon.fraser@apple.com>
558 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
559 https://bugs.webkit.org/show_bug.cgi?id=135221
560 <rdar://problem/17542454>
562 Reviewed by Benjamin Poulain.
564 The call to didCommitLayerTree() can cause one or two visible rect updates,
565 via changes to the UIScrollView contentSize and contentOffset. As a result, we
566 would notify the scrolling tree about a viewport change, but using the old
567 scrolling tree rather than the new one, so we could move layers around for
568 nodes which are about to be removed from the tree.
570 However, we also have to ensure that programmatic scrolls are applied after
571 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
572 store data about programmatic scrolls and return them to the caller, which
573 can apply them after didCommitLayerTree().
575 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
576 for the duration of the tree update, so that we can store requested scroll info in it.
577 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
578 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
579 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
580 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
581 * UIProcess/WebPageProxy.cpp:
582 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
583 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
584 (WebKit::WebPageProxy::editorState):
585 (WebKit::WebPageProxy::canDelete):
586 (WebKit::WebPageProxy::hasSelectedRange):
587 (WebKit::WebPageProxy::isContentEditable):
588 (WebKit::WebPageProxy::maintainsInactiveSelection):
589 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
590 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
591 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
592 by any programmatic scroll.
594 2014-07-24 Peyton Randolph <prandolph@apple.com>
596 Rename feature flag for long-press gesture on Mac.
597 https://bugs.webkit.org/show_bug.cgi?id=135259
599 Reviewed by Beth Dakin.
601 * Configurations/FeatureDefines.xcconfig:
602 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
604 2014-07-24 Dan Bernstein <mitz@apple.com>
606 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
607 https://bugs.webkit.org/show_bug.cgi?id=135229
609 Reviewed by Alexey Proskuryakov.
611 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
613 * Shared/WebCoreArgumentCoders.cpp:
614 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
615 platform data, do that.
616 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
617 * Shared/WebCoreArgumentCoders.h:
619 * Shared/mac/WebCoreArgumentCodersMac.mm:
620 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
621 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
623 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
624 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
625 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
627 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
629 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
630 https://bugs.webkit.org/show_bug.cgi?id=135227
631 <rdar://problem/17279500>
633 Reviewed by Simon Fraser.
635 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
636 instead of sticking the to real viewport in the UIProcess.
638 The sequence of event is:
639 1) A layer becomes fixed in some ScrollingTree transaction.
640 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
641 ScrollingTree update is made.
642 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
643 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
644 and the position is not corrected.
645 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
647 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
648 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
650 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
651 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
652 is called to "fix" the position.
654 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
655 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
656 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
657 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
658 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
659 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
660 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
661 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
662 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
664 2014-07-24 Oliver Hunt <oliver@apple.com>
666 Need to explicitly support location services in webcontent profile
667 https://bugs.webkit.org/show_bug.cgi?id=135251
670 Reviewed by Dan Bernstein.
672 Switching to uikit-app means that we remove the implicit support
673 for location services. This makes us explicitly opt-in.
675 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
677 2014-07-24 Tim Horton <timothy_horton@apple.com>
679 Crash at [WKContentView _applicationWillEnterForeground:] + 28
680 <rdar://problem/17797103>
682 Reviewed by Sam Weinig.
684 * UIProcess/ios/WKContentView.mm:
685 (-[WKContentView _applicationWillEnterForeground:]):
686 Drawing area can be null; null check it!
687 It's ok if we don't hide the content in this case, because if the drawing area is null,
688 it doesn't have any layers in the tree anyway.
690 2014-07-23 Simon Fraser <simon.fraser@apple.com>
692 [iOS WK2] Some help.apple.com pages not scrollable
693 https://bugs.webkit.org/show_bug.cgi?id=135228
694 <rdar://problem/17790792>
696 Reviewed by Benjamin Poulain.
698 On pages which size their document to the device size, the WKContentView size
699 never changes after it's created. In this situation, we never set a bounds
700 on the _rootContentView, so it remains zero-sized which breaks hit testing
701 on all enclosed UIScrollViews for overflow:scroll.
703 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
704 so they are always the size of their parent view, and remove the explicit setting
707 * UIProcess/ios/WKContentView.mm:
708 (-[WKContentView initWithFrame:context:configuration:webView:]):
709 (-[WKContentView setShowingInspectorIndication:]):
710 (-[WKContentView _didCommitLayerTree:]):
712 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
714 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
715 https://bugs.webkit.org/show_bug.cgi?id=135187
717 Reviewed by Simon Fraser.
719 Unfortunately, restricting the input into the document rect does not work.
720 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
721 the valid range should account for that.
723 Instead of playing with the keyboard rect, we can limit the scroll position
724 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
725 range as needed to give access to the content. Using that range is a bit more permissive
726 because the page could scroll to reveal content in the content inset defined by the client
727 of the API (this could actually be quite useful for hybrid apps).
729 There was already a function to change the content offset in the valid scrollview
730 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
731 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
733 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
734 system. The scroll position we get from the WebProcess is in document coordinates, while
735 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
736 To fix that, we scale the input position to get to the same scale as UIScrollView, then
737 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
739 * UIProcess/API/Cocoa/WKWebView.mm:
740 (contentOffsetBoundedInValidRange):
741 (changeContentOffsetBoundedInValidRange):
742 (-[WKWebView _scrollToContentOffset:]):
744 2014-07-23 Commit Queue <commit-queue@webkit.org>
746 Unreviewed, rolling out r171498.
747 https://bugs.webkit.org/show_bug.cgi?id=135223
749 It will regress some scroll position restoration on navigation
750 (r167916). (Requested by smfr on #webkit).
754 "[iOS WK2] Header bar on nytimes articles lands in the wrong
755 place after rubberbanding"
756 https://bugs.webkit.org/show_bug.cgi?id=135221
757 http://trac.webkit.org/changeset/171498
759 2014-07-23 Simon Fraser <simon.fraser@apple.com>
761 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
762 https://bugs.webkit.org/show_bug.cgi?id=135221
764 Reviewed by Tim Horton.
766 The call to didCommitLayerTree() can cause one or two visible rect updates,
767 via changes to the UIScrollView contentSize and contentOffset. As a result, we
768 would notify the scrolling tree about a viewport change, but using the old
769 scrolling tree rather than the new one, so we could move layers around for
770 nodes which are about to be removed from the tree.
772 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
775 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
776 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
778 2014-07-23 Oliver Hunt <oliver@apple.com>
780 Add a pseudo target to create sandbox override roots
781 https://bugs.webkit.org/show_bug.cgi?id=135216
784 Reviewed by Alexey Proskuryakov.
786 Just a duplicate of the standard ios sandbox target, targetting
787 the profile overrides directory. This means we can make roots
790 * WebKit2.xcodeproj/project.pbxproj:
792 2014-07-23 Oliver Hunt <oliver@apple.com>
794 Incorrect commit for sandbox profile
795 https://bugs.webkit.org/show_bug.cgi?id=135214
798 Reviewed by Anders Carlsson.
800 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
802 2014-07-23 Dan Bernstein <mitz@apple.com>
804 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
805 https://bugs.webkit.org/show_bug.cgi?id=135206
807 Reviewed by Anders Carlsson.
809 * Shared/cf/ArgumentCodersCF.cpp:
810 (IPC::copyPersistentRef): Added this helper function. It differs from
811 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
812 ensures that we get a reference to the copy that is in the keychain access group that the
813 Networking process can use.
814 (IPC::encode): Use copyPersistentRef.
816 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
818 Remove CSS_EXCLUSIONS compile flag and leftover code
819 https://bugs.webkit.org/show_bug.cgi?id=135175
821 Reviewed by Zoltan Horvath.
823 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
824 stubs. This removes the flag and the useless code.
826 * Configurations/FeatureDefines.xcconfig:
828 2014-07-23 Timothy Horton <timothy_horton@apple.com>
830 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
831 https://bugs.webkit.org/show_bug.cgi?id=135177
832 <rdar://problem/17764847>
834 Reviewed by Dan Bernstein.
836 * UIProcess/WebPageProxy.cpp:
837 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
838 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
839 * UIProcess/WebPageProxy.h:
840 * UIProcess/WebPageProxy.messages.in:
841 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
842 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
843 * WebProcess/WebPage/WebPage.cpp:
844 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
845 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
846 * WebProcess/WebPage/WebPage.h:
847 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
848 Only send it when the current history item for the main frame changes.
850 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
852 [EFL] EWebKit2.h should contain version information
853 https://bugs.webkit.org/show_bug.cgi?id=135189
855 Reviewed by Gyuyoung Kim.
857 Generate EWebKit2.h to contain the version information.
860 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
862 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
864 [EFL] Do not generate forwarding header for ewk headers
865 https://bugs.webkit.org/show_bug.cgi?id=135147
867 Reviewed by Gyuyoung Kim.
869 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
872 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
873 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
874 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
875 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
876 * UIProcess/efl/TextCheckerClientEfl.h:
878 2014-07-22 Commit Queue <commit-queue@webkit.org>
880 Unreviewed, rolling out r171366.
881 https://bugs.webkit.org/show_bug.cgi?id=135190
883 Broke three API tests (Requested by ap on #webkit).
887 "REGRESSION (r171239): Much more time spent taking snapshots
889 https://bugs.webkit.org/show_bug.cgi?id=135177
890 http://trac.webkit.org/changeset/171366
892 2014-07-22 Oliver Hunt <oliver@apple.com>
894 Reduce the size of the root WebContent sandbox profile
895 https://bugs.webkit.org/show_bug.cgi?id=135182
896 <rdar://problem/17739108>
898 Reviewed by Alexey Proskuryakov.
900 Switch from apple-ui-app to uikit-app as the root of the webcontent
903 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
905 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
907 Unreviewed build fix on EFL port after r171356.
909 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
911 * UIProcess/efl/WebContextEfl.cpp:
912 (WebKit::WebContext::platformMediaCacheDirectory):
914 2014-07-22 Enrica Casucci <enrica@apple.com>
916 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
917 https://bugs.webkit.org/show_bug.cgi?id=135180
918 <rdar://problem/16721055>
920 Reviewed by Simon Fraser.
922 Adds notifications to the WKContentView to know when scrolling starts and ends
923 in an overflow scroll. When scrolling starts, we hide the selection and we restore
924 it when scrolling ends, though not before the selection information in the editor
925 state has been updated.
926 It also adds a new method to the EditorClient class to force the
927 selection update when scrolling is completed.
929 * UIProcess/PageClient.h:
930 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
931 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
932 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
933 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
934 * UIProcess/Scrolling/RemoteScrollingTree.h:
935 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
936 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
937 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
938 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
939 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
940 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
941 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
942 * UIProcess/WebPageProxy.h:
943 * UIProcess/ios/PageClientImplIOS.h:
944 * UIProcess/ios/PageClientImplIOS.mm:
945 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
946 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
947 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
948 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
949 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
950 * UIProcess/ios/WKContentViewInteraction.h:
951 * UIProcess/ios/WKContentViewInteraction.mm:
952 (-[WKContentView _overflowScrollingWillBegin]):
953 (-[WKContentView _overflowScrollingDidEnd]):
954 (-[WKContentView _updateChangedSelection]):
955 * UIProcess/ios/WebPageProxyIOS.mm:
956 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
957 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
958 * WebProcess/WebCoreSupport/WebEditorClient.h:
959 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
960 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
961 (WebKit::WebEditorClient::updateSelection):
963 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
965 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
966 https://bugs.webkit.org/show_bug.cgi?id=135169
967 <rdar://problem/17740149>
969 Reviewed by Tim Horton.
971 * UIProcess/ios/WebPageProxyIOS.mm:
972 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
973 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
974 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
976 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
977 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
980 2014-07-22 Timothy Horton <timothy_horton@apple.com>
982 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
983 https://bugs.webkit.org/show_bug.cgi?id=135177
984 <rdar://problem/17764847>
986 Reviewed by Dan Bernstein.
988 * UIProcess/WebPageProxy.cpp:
989 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
990 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
991 * UIProcess/WebPageProxy.h:
992 * UIProcess/WebPageProxy.messages.in:
993 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
994 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
995 * WebProcess/WebPage/WebPage.cpp:
996 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
997 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
998 * WebProcess/WebPage/WebPage.h:
999 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
1000 Only send it when the current history item for the main frame changes.
1002 2014-07-22 Oliver Hunt <oliver@apple.com>
1004 Add accountsd access to network sandbox profile
1005 https://bugs.webkit.org/show_bug.cgi?id=135176
1008 Reviewed by Anders Carlsson.
1010 This is available to the webcontent process already, but is also
1011 needed for the networking process.
1013 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1015 2014-07-22 Oliver Hunt <oliver@apple.com>
1017 Remove unused com.apple.webkit.* rules from profiles
1018 https://bugs.webkit.org/show_bug.cgi?id=135174
1021 Reviewed by Anders Carlsson.
1023 We never send these rules so we should just remove use of them
1026 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1027 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1029 2014-07-22 Oliver Hunt <oliver@apple.com>
1031 Provide networking process with access to its HSTS db
1032 https://bugs.webkit.org/show_bug.cgi?id=135121
1035 Reviewed by Alexey Proskuryakov.
1037 Add an extension parameter to pass the hsts database file.
1038 This requires us to create the Caches/com.apple.WebKit.Networking
1039 directory in the UI process, as the network sandbox
1040 does not allow it to create the containing directory.
1042 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1043 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1044 * Shared/Network/NetworkProcessCreationParameters.cpp:
1045 (WebKit::NetworkProcessCreationParameters::encode):
1046 (WebKit::NetworkProcessCreationParameters::decode):
1047 * Shared/Network/NetworkProcessCreationParameters.h:
1048 * UIProcess/WebContext.cpp:
1049 (WebKit::WebContext::ensureNetworkProcess):
1050 (WebKit::WebContext::networkingHSTSDatabasePath):
1051 * UIProcess/WebContext.h:
1052 * UIProcess/mac/WebContextMac.mm:
1053 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
1055 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
1057 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
1058 https://bugs.webkit.org/show_bug.cgi?id=135140
1059 <rdar://problem/17754921>
1061 Reviewed by Tim Horton.
1063 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
1064 everything is set up on the LayerTransaction.
1066 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
1067 should be the actual min/max for the current page state.
1069 This patch split the two explicitely.
1070 For layer transactions, the values are taken from the viewport configuration directly.
1071 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
1072 have been updated to take into account allowsUserScaling.
1074 * WebProcess/WebPage/WebPage.cpp:
1075 (WebKit::WebPage::willCommitLayerTree):
1076 * WebProcess/WebPage/ios/WebPageIOS.mm:
1077 (WebKit::WebPage::minimumPageScaleFactor):
1078 (WebKit::WebPage::maximumPageScaleFactor):
1079 (WebKit::WebPage::getAssistedNodeInformation):
1081 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
1083 Web Inspector: Fix unused parameter build warning
1084 https://bugs.webkit.org/show_bug.cgi?id=135151
1086 Reviewed by Joseph Pecoraro.
1088 Fix unused parameter build warning by removing the parameter name
1090 * WebProcess/WebPage/WebInspector.cpp:
1091 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
1093 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
1095 Fix unused parameter build warning in UIProcess module
1096 https://bugs.webkit.org/show_bug.cgi?id=135154
1098 Reviewed by Alexey Proskuryakov.
1100 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
1102 * UIProcess/WebPageProxy.cpp:
1103 (WebKit::WebPageProxy::viewStateDidChange):
1105 2014-07-22 Jeremy Jones <jeremyj@apple.com>
1107 Don't create new UIWindow for video fullscreen.
1108 https://bugs.webkit.org/show_bug.cgi?id=135038
1110 Reviewed by Darin Adler.
1112 Use root UIView to parent fullscreen interface.
1114 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1115 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
1116 * WebProcess/ios/WebVideoFullscreenManager.mm:
1117 (WebKit::screenRectForNode): Use client rect instead of screen rect.
1119 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
1121 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
1122 https://bugs.webkit.org/show_bug.cgi?id=135144
1124 Reviewed by Gyuyoung Kim.
1126 All public enums of ewebkit should start with Ewk prefix.
1127 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
1128 In addition, added missing description and default value for Ewk_Event_Modifier.
1130 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
1131 (toEwkEventMouseButton):
1132 (toEwkEventModifiers):
1133 (EwkNavigationPolicyDecision::mouseButton):
1134 (EwkNavigationPolicyDecision::modifiers):
1135 (ewk_navigation_policy_mouse_button_get):
1136 (ewk_navigation_policy_modifiers_get):
1137 (toEventMouseButton): Deleted.
1138 (toEventModifierKeys): Deleted.
1139 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
1140 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
1142 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
1144 [iOS][WK2] Improve event throttling for Scroll Events
1145 https://bugs.webkit.org/show_bug.cgi?id=135082
1146 <rdar://problem/17445266>
1148 Reviewed by Simon Fraser.
1150 In the WebKit layer, we want a measure that is representative of the responsiveness.
1152 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
1153 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
1155 The value used for eventThrottlingDelay() is computed by averaging the new value with
1156 the old values with a 80/20 split, favoring the old data. Favoring historical data
1157 over the last timing avoid excessively throttling for a single slow frame.
1159 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
1160 a first cut keeping things simple.
1162 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
1163 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
1164 and nothing is throttled.
1166 If is it more than a frame, we throttle such that we can at least render two frames
1167 per event dispatch based on the historical data.
1169 The exact values will need some tweaking, but this set ensures well written pages get
1170 60 events per seconds, while slow pages do not waste too much time on events.
1172 * WebProcess/WebCoreSupport/WebChromeClient.h:
1173 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1174 (WebKit::WebChromeClient::eventThrottlingDelay):
1175 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1176 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1177 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
1178 * WebProcess/WebPage/ViewUpdateDispatcher.h:
1179 * WebProcess/WebPage/WebPage.cpp:
1180 (WebKit::WebPage::WebPage):
1181 (WebKit::WebPage::didFlushLayerTreeAtTime):
1182 (WebKit::WebPage::didCommitLoad):
1183 * WebProcess/WebPage/WebPage.h:
1184 * WebProcess/WebPage/ios/WebPageIOS.mm:
1185 (WebKit::WebPage::eventThrottlingDelay):
1186 (WebKit::WebPage::updateVisibleContentRects):
1187 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1188 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1190 2014-07-21 Simon Fraser <simon.fraser@apple.com>
1192 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
1193 https://bugs.webkit.org/show_bug.cgi?id=135141
1194 <rdar://problem/17627525>
1196 Reviewed by Benjamin Poulain.
1198 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
1199 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
1200 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
1203 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
1206 * UIProcess/API/Cocoa/WKWebView.mm:
1207 (-[WKWebView _computedContentInset]):
1208 (-[WKWebView _setObscuredInsets:]):
1210 2014-07-21 Oliver Hunt <oliver@apple.com>
1212 Remove global cookie workaround from sandbox profiles
1213 https://bugs.webkit.org/show_bug.cgi?id=135138
1216 Reviewed by Alexey Proskuryakov.
1218 Remove the workaround needed for global cookie access, and silencing
1219 of the associated sandbox violation.
1221 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1222 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1223 * UIProcess/mac/WebContextMac.mm:
1224 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
1226 2014-07-21 Oliver Hunt <oliver@apple.com>
1228 Correct sandbox profiles to fix some excess privileges
1229 https://bugs.webkit.org/show_bug.cgi?id=135134
1230 <rdar://problem/17741886>
1231 <rdar://problem/17739080>
1233 Reviewed by Alexey Proskuryakov.
1235 This cleans up our sandbox profiles to fix a few issues - the profiles
1236 no longer allow us to issue file extension we have the ability to consume,
1237 and tightens some of the other file access rules.
1239 This means we have to addd some rules to allow us to access things
1240 that we previously had access to due to lax file system restrictions.
1242 Some of the features were fixable simply by using entitlements on the
1243 process rather than custom rules.
1245 * Configurations/WebContent-iOS.entitlements:
1246 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
1247 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1248 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1250 2014-07-21 Simon Fraser <simon.fraser@apple.com>
1252 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
1253 https://bugs.webkit.org/show_bug.cgi?id=132537
1255 Reviewed by Benjamin Poulain.
1257 Make interaction with form elements inside position:fixed less terrible by re-laying out
1258 fixed elements relative to the document while we have an assisted node. This ensures
1259 that all parts of a position:fixed are accessible (e.g. inputs on the right side
1260 of a fixed-width top bar).
1262 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
1263 and encode/decode it.
1264 (WebKit::AssistedNodeInformation::encode):
1265 (WebKit::AssistedNodeInformation::decode):
1266 * Shared/AssistedNodeInformation.h:
1267 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
1268 * UIProcess/PageClient.h: Add isAssistingNode().
1269 * UIProcess/ios/PageClientImplIOS.h:
1270 * UIProcess/ios/PageClientImplIOS.mm:
1271 (WebKit::PageClientImpl::isAssistingNode):
1272 * UIProcess/ios/WebPageProxyIOS.mm:
1273 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
1274 node, just use the document rect as the custom fixed position rect.
1275 * WebProcess/WebPage/ios/WebPageIOS.mm:
1276 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
1277 since we have to fix it up for position:fixed. If the element is inside fixed
1278 position in the main frame, re-set the fixed position rect to the document rect
1279 (which forces a layout), re-fetch elementRect, then set it back. This ensures
1280 that the UI process gets an elementRect which it can zoom to correctly.
1282 2014-07-21 Timothy Horton <timothy_horton@apple.com>
1284 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
1285 https://bugs.webkit.org/show_bug.cgi?id=135132
1286 <rdar://problem/17719832>
1288 Reviewed by Simon Fraser.
1290 * UIProcess/ProcessThrottler.cpp:
1291 (WebKit::ProcessThrottler::ProcessThrottler):
1292 (WebKit::ProcessThrottler::suspendTimerFired):
1293 * UIProcess/ProcessThrottler.h:
1294 * UIProcess/ios/ViewGestureControllerIOS.mm:
1295 (WebKit::ViewGestureController::ViewGestureController):
1296 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1297 * UIProcess/mac/ViewGestureController.h:
1298 * UIProcess/mac/ViewGestureControllerMac.mm:
1299 (WebKit::ViewGestureController::ViewGestureController):
1300 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1301 We can't use WebCore timers in the UI process because of coexistence concerns
1302 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
1304 2014-07-21 Andy Estes <aestes@apple.com>
1306 [iOS] Handle QuickLook ResourceLoaders in the web process
1307 https://bugs.webkit.org/show_bug.cgi?id=135113
1309 Reviewed by David Kilzer.
1311 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
1312 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
1313 generated the main resource.
1315 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1316 (WebKit::WebResourceLoadScheduler::scheduleLoad):
1318 2014-07-21 Brady Eidson <beidson@apple.com>
1320 DatabaseProcess doesn't relaunch after crashing.
1321 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
1323 Reviewed by Alexey Proskuryakov.
1325 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1326 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
1328 * UIProcess/WebContext.cpp:
1329 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
1330 * UIProcess/WebContext.h:
1332 * UIProcess/WebContextSupplement.h:
1333 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
1335 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
1337 Fix warnings caused by unused parameter.
1338 https://bugs.webkit.org/show_bug.cgi?id=134975
1340 Reviewed by Gyuyoung Kim.
1342 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
1344 * UIProcess/API/efl/EwkView.cpp:
1345 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
1346 * UIProcess/LegacySessionStateCodingNone.cpp:
1347 (WebKit::decodeLegacySessionState):
1349 2014-07-20 Jeremy Jones <jeremyj@apple.com>
1351 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
1352 https://bugs.webkit.org/show_bug.cgi?id=134894
1354 Reviewed by Darin Adler.
1356 Add setCanPlayFastReverse
1358 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
1359 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
1360 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
1361 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
1363 2014-07-20 Jeremy Jones <jeremyj@apple.com>
1365 Decrease flicker when enter and exit fullscreen.
1366 https://bugs.webkit.org/show_bug.cgi?id=134919
1368 Reviewed by Simon Fraser.
1370 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
1372 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
1373 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
1374 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
1375 * WebProcess/ios/WebVideoFullscreenManager.mm:
1376 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
1378 2014-07-20 Dan Bernstein <mitz@apple.com>
1380 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
1381 https://bugs.webkit.org/show_bug.cgi?id=135099
1383 Reviewed by David Kilzer.
1385 * WebProcess/WebPage/ios/WebPageIOS.mm:
1386 (WebKit::WebPage::getPositionInformation): Added a null check.
1388 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
1390 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
1391 https://bugs.webkit.org/show_bug.cgi?id=135047
1393 Reviewed by Darin Adler.
1395 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
1396 in WebProcess as well.
1398 * WebProcess/WebPage/WebPage.h:
1399 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
1400 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1401 (WebKit::WebPage::setAcceleratedCompositingWindowId):
1403 2014-07-18 Oliver Hunt <oliver@apple.com>
1405 We don't provide an extension to the temp file used for uploads
1406 https://bugs.webkit.org/show_bug.cgi?id=135079
1408 Reviewed by Sam Weinig.
1410 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
1411 extensions for the files passed to the content process.
1413 * UIProcess/WebPageProxy.cpp:
1414 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1416 2014-07-18 Tim Horton <timothy_horton@apple.com>
1418 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
1419 https://bugs.webkit.org/show_bug.cgi?id=135080
1420 <rdar://problem/17734714>
1422 Reviewed by Sam Weinig.
1424 * UIProcess/ios/ViewGestureControllerIOS.mm:
1425 (WebKit::ViewGestureController::beginSwipeGesture):
1426 (WebKit::ViewGestureController::canSwipeInDirection):
1428 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
1430 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
1431 https://bugs.webkit.org/show_bug.cgi?id=135077
1433 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
1434 doesn't have title attribute.
1436 Reviewed by Dan Bernstein.
1438 * WebProcess/WebPage/ios/WebPageIOS.mm:
1439 (WebKit::WebPage::getPositionInformation):
1441 2014-07-18 Andy Estes <aestes@apple.com>
1443 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
1444 https://bugs.webkit.org/show_bug.cgi?id=135072
1445 <rdar://problem/17528188>
1447 Reviewed by David Kilzer.
1449 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
1450 * Shared/mac/WebCoreArgumentCodersMac.mm:
1451 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
1452 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
1453 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1454 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
1455 * UIProcess/WebFrameProxy.cpp:
1456 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
1457 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
1458 If the unblock is successful, reload the WebPageProxy.
1459 * UIProcess/WebFrameProxy.h:
1460 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
1461 * UIProcess/WebPageProxy.cpp:
1462 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
1463 request and ignore if so.
1464 * UIProcess/WebPageProxy.h:
1465 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
1466 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1467 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
1468 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1470 2014-07-18 Simon Fraser <simon.fraser@apple.com>
1472 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
1473 https://bugs.webkit.org/show_bug.cgi?id=135078
1474 <rdar://problem/17401823>
1476 Reviewed by Tim Horton.
1478 Fix the logging of requested scroll position and frame scale factor.
1480 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1481 (WebKit::RemoteScrollingTreeTextStream::dump):
1483 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
1485 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
1486 https://bugs.webkit.org/show_bug.cgi?id=135062
1488 Reviewed by Anders Carlsson.
1490 Switch to RetainPtr instead of manual memory management of ivars.
1492 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1493 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1494 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
1495 (-[_WKRemoteObjectInterface identifier]):
1496 (-[_WKRemoteObjectInterface description]):
1497 (-[_WKRemoteObjectInterface dealloc]): Deleted.
1499 2014-07-18 Tim Horton <timothy_horton@apple.com>
1501 Take navigation snapshots whenever the current back-forward item is going to change
1502 https://bugs.webkit.org/show_bug.cgi?id=135058
1503 <rdar://problem/17464515>
1505 Reviewed by Dan Bernstein.
1507 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
1508 snapshot whenever the Web process says that the current back-forward item is going to change.
1509 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
1510 just two places instead of 5.
1512 * UIProcess/WebPageProxy.cpp:
1513 (WebKit::WebPageProxy::goForward):
1514 (WebKit::WebPageProxy::goBack):
1515 (WebKit::WebPageProxy::goToBackForwardItem):
1516 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1517 We no longer need to special-case taking navigation snapshots
1518 when the UI process changes the back forward item or upon
1519 didStartProvisionalLoadForFrame, because we'll always snapshot
1520 in willChangeCurrentHistoryItem in all of these cases.
1522 * UIProcess/WebPageProxy.cpp:
1523 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
1524 * UIProcess/WebPageProxy.h:
1525 * UIProcess/WebPageProxy.messages.in:
1526 Add willChangeCurrentHistoryItem message, which comes from the Web process.
1527 When it arrives, take a navigation snapshot.
1529 * UIProcess/ios/ViewGestureControllerIOS.mm:
1530 (WebKit::ViewGestureController::beginSwipeGesture):
1531 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
1532 so that it doesn't bail from taking the snapshot because we have a snapshot up.
1534 (WebKit::ViewGestureController::endSwipeGesture):
1535 We no longer need to explicitly disable snapshotting while navigating, because
1536 we will avoid taking the snapshot if there's a snapshot being displayed.
1538 * UIProcess/mac/ViewGestureControllerMac.mm:
1539 (WebKit::ViewGestureController::~ViewGestureController):
1540 Remove the snapshot if it's still up when ViewGestureController is destroyed.
1541 The Mac version of ViewGestureController is destroyed on Web process crashes
1542 because it is a message receiver, so it is not guaranteed to have the same
1543 lifetime as the WebPageProxy and friends.
1545 (WebKit::ViewGestureController::trackSwipeGesture):
1546 Make use of recordNavigationSnapshot.
1548 (WebKit::ViewGestureController::endSwipeGesture):
1549 Ditto from the Mac version.
1551 * UIProcess/mac/ViewSnapshotStore.h:
1552 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
1553 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
1554 * UIProcess/mac/ViewSnapshotStore.mm:
1555 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1556 (WebKit::ViewSnapshotStore::recordSnapshot):
1557 Remove the snapshot disabling mechanism and bail from snapshotting if we're
1558 showing a snapshot, as mentioned above.
1560 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1561 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1562 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1563 * WebProcess/WebPage/WebPage.cpp:
1564 (WebKit::WebPage::willChangeCurrentHistoryItem):
1565 * WebProcess/WebPage/WebPage.h:
1566 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
1568 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
1570 REGRESSION: Crash when typing into text field that clears itself on iOS
1572 <https://bugs.webkit.org/show_bug.cgi?id=135044>
1573 <rdar://problem/17640443>
1575 Reviewed by Darin Adler.
1577 * WebProcess/WebPage/ios/WebPageIOS.mm:
1578 (WebKit::WebPage::requestAutocorrectionData):
1579 wordRangeFromPosition() returns null in some cases; null check range
1580 before dereferencing it. Moved some variable declarations around to
1581 better match our style.
1583 2014-07-18 Tim Horton <timothy_horton@apple.com>
1585 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
1586 https://bugs.webkit.org/show_bug.cgi?id=134999
1587 <rdar://problem/17238025>
1589 Reviewed by Sam Weinig.
1591 In some cases, clients may need to throw a WKWebView with no back-forward list over
1592 another WKWebView, and want to participate in gesture swipe as if they were actually
1593 the page being overlaid.
1595 * UIProcess/API/Cocoa/WKWebView.mm:
1596 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1597 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1598 (-[WKWebViewConfiguration copyWithZone:]):
1599 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
1600 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
1601 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1602 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
1603 will use as the real source of back-forward items, and the destination of the swipe navigation.
1604 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
1605 and will be doing the navigation.
1607 * UIProcess/ios/ViewGestureControllerIOS.mm:
1608 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
1609 (WebKit::ViewGestureController::beginSwipeGesture):
1610 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
1611 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
1612 so that when swiping forward from the alternate view, it will have the "right" snapshot.
1613 Get the target back forward item from the alternate view.
1614 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
1616 (WebKit::ViewGestureController::canSwipeInDirection):
1617 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
1619 (WebKit::ViewGestureController::endSwipeGesture):
1620 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
1621 Perform the navigation on the alternate view if necessary.
1623 (WebKit::ViewGestureController::removeSwipeSnapshot):
1624 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
1626 * UIProcess/mac/ViewGestureController.h:
1628 2014-07-17 David Kilzer <ddkilzer@apple.com>
1630 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
1631 <http://webkit.org/b/135006>
1633 Reviewed by Darin Adler.
1635 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
1637 * Configurations/DebugRelease.xcconfig: Remove empty
1638 SECTORDER_FLAGS definition.
1639 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
1640 SECTORDER_FLAGS is only set on Production builds.
1642 2014-07-17 Alexey Proskuryakov <ap@apple.com>
1644 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
1645 https://bugs.webkit.org/show_bug.cgi?id=135032
1646 <rdar://problem/17716602>
1648 Reviewed by Dan Bernstein.
1650 * UIProcess/WebPageProxy.cpp:
1651 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
1652 transaction in resetStateAfterProcessExited() wouldn't be committed.
1653 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
1654 the most important fact that this is a stack object that can't be simply moved to
1655 a different function.
1657 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
1659 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
1660 https://bugs.webkit.org/show_bug.cgi?id=135036
1662 Reviewed by Dan Bernstein.
1664 * WebProcess/WebPage/ios/WebPageIOS.mm:
1665 (WebKit::WebPage::updateVisibleContentRects):
1666 I forgot to update one of the condition after changing from lastTransaction to next transaction
1669 2014-07-17 Enrica Casucci <enrica@apple.com>
1671 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
1672 https://bugs.webkit.org/show_bug.cgi?id=135023
1673 <rdar://problem/17617282>
1675 Reviewed by Benjamin Poulain and Ryosuke Niwa.
1677 WKContentView needs to implement hasContent to correctly show
1678 the appropriate menu bar content. The patch adds this information
1681 * Shared/EditorState.cpp:
1682 (WebKit::EditorState::encode):
1683 (WebKit::EditorState::decode):
1684 * Shared/EditorState.h:
1685 (WebKit::EditorState::EditorState):
1686 * UIProcess/ios/WKContentViewInteraction.mm:
1687 (-[WKContentView hasContent]):
1688 * WebProcess/WebPage/WebPage.cpp:
1689 (WebKit::WebPage::editorState):
1691 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
1693 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
1694 https://bugs.webkit.org/show_bug.cgi?id=135010
1696 Reviewed by Darin Adler.
1698 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
1699 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
1701 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
1702 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
1703 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
1705 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
1708 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
1709 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
1710 is initialized, and doing an animated resize would trash the WebProcess state.
1711 I wish I had a better solution, this is not great.
1713 * UIProcess/API/Cocoa/WKWebView.mm:
1714 (-[WKWebView _processDidExit]):
1715 (-[WKWebView _didCommitLoadForMainFrame]):
1716 (-[WKWebView _didCommitLayerTree:]):
1717 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
1718 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
1719 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
1722 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
1723 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
1725 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
1726 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
1727 everything we need and does not use any synchronous messages.
1729 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
1730 (-[WKWebView _restorePageStateToExposedRect:scale:]):
1731 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
1732 (-[WKWebView _scrollToContentOffset:]):
1733 (-[WKWebView _frameOrBoundsChanged]):
1734 (-[WKWebView _updateVisibleContentRects]):
1735 (-[WKWebView _setMinimumLayoutSizeOverride:]):
1736 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
1737 (-[WKWebView _setInterfaceOrientationOverride:]):
1738 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
1739 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1740 (-[WKWebView _endAnimatedResize]):
1741 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
1742 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1744 2014-07-17 Brent Fulgham <bfulgham@apple.com>
1746 [Mac] Full screen video not always animating in the correct Space
1747 https://bugs.webkit.org/show_bug.cgi?id=135020
1748 <rdar://problem/17542310>
1750 Reviewed by Dean Jackson.
1752 The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
1753 mode. Subsequent fullscreen transitions will always start from this Space, even if you move
1754 the WebKit-hosted application to a different Space.
1756 We can help the display system know when we've moved to a new Space by calling NSWindow's
1757 'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
1758 This method call hooks the window into the current Space so everything works properly.
1760 * UIProcess/mac/WKFullScreenWindowController.mm:
1761 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
1762 new fullscreen window to the current Space before starting transition to fullscreen.
1764 2014-07-17 Timothy Hatcher <timothy@apple.com>
1766 Make console.profile record to the Timeline.
1768 https://bugs.webkit.org/show_bug.cgi?id=134643
1770 Reviewed by Joseph Pecoraro.
1772 * WebProcess/WebPage/WebInspector.cpp:
1773 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
1774 (WebKit::WebInspector::startJavaScriptProfiling):
1775 (WebKit::WebInspector::stopJavaScriptProfiling):
1777 2014-07-17 Brady Eidson <beidson@apple.com>
1779 Crash in ServicesOverlayController::~ServicesOverlayController.
1780 <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
1782 Reviewed by Tim Horton.
1784 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1785 (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
1786 PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
1788 2014-07-17 Tim Horton <timothy_horton@apple.com>
1790 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
1791 https://bugs.webkit.org/show_bug.cgi?id=135018
1792 <rdar://problem/17615038>
1794 Reviewed by Simon Fraser.
1796 * UIProcess/DrawingAreaProxy.h:
1797 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
1798 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1799 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1800 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
1801 * UIProcess/mac/RemoteLayerTreeHost.h:
1802 * UIProcess/mac/RemoteLayerTreeHost.mm:
1803 (WebKit::RemoteLayerTreeHost::detachRootLayer):
1804 Add a mechanism to "hide" drawing area content until the next commit,
1805 by detaching the root layer. RemoteLayerTreeHost will automatically reattach
1806 it at the next commit.
1808 * UIProcess/WebPageProxy.cpp:
1809 (WebKit::WebPageProxy::viewStateDidChange):
1810 * UIProcess/WebPageProxy.h:
1811 Add a parameter to viewStateDidChange specifying whether dispatching the change
1812 to the Web process is deferrable or not. We will also automatically use "Immediate" if
1813 the view is coming in-window, like we did before.
1815 * UIProcess/ios/WKContentView.mm:
1816 (-[WKContentView _applicationWillEnterForeground:]):
1817 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
1818 view state changes when coming into the foreground, and will have removed the root layer
1819 if a commit didn't come in while waitForDidUpdateViewState blocks.
1821 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
1823 [EFL][WK2] Add a "focus,notfound" signal.
1824 https://bugs.webkit.org/show_bug.cgi?id=134674
1826 Reviewed by Gyuyoung Kim.
1828 Add a "focus,notfound" signal to handover focus control to application
1829 because there are no elements of webview to focus on the given direction.
1831 Application can decide to move the focus to next widget of ewk_view or something else
1832 by using this signal.
1834 * UIProcess/API/efl/EwkViewCallbacks.h:
1835 * UIProcess/API/efl/ewk_view.h:
1836 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
1837 (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
1838 (EWK2UnitTest::EWK2UnitTestBase::keyDown):
1839 (EWK2UnitTest::EWK2UnitTestBase::keyUp):
1840 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1841 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1842 (EWK2ViewTest::FocusNotFoundCallback):
1844 * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
1845 (WebKit::PageUIClientEfl::takeFocus):
1847 2014-07-16 Brady Eidson <beidson@apple.com>
1849 Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
1850 https://bugs.webkit.org/show_bug.cgi?id=134984
1852 Reviewed by David Kilzer.
1854 * UIProcess/API/Cocoa/WKProcessPool.mm:
1855 (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
1856 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1858 2014-07-16 Alexey Proskuryakov <ap@apple.com>
1860 A test that hangs at cleanup stage confuses webkitpy hugely
1861 https://bugs.webkit.org/show_bug.cgi?id=122475
1862 <rdar://problem/17184354>
1864 Reviewed by Anders Carlsson.
1866 Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
1867 new process for the same WebPageProxy would hit assertions.
1869 * UIProcess/WebPageProxy.cpp:
1870 (WebKit::WebPageProxy::processDidCrash):
1871 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1873 2014-07-16 David Kilzer <ddkilzer@apple.com>
1875 [iOS] Update order file paths for WebKit and WebKit2
1876 <http://webkit.org/b/134993>
1877 <rdar://problem/17557776>
1879 Reviewed by Darin Adler.
1881 * Configurations/Base.xcconfig: Add order file for iOS
1884 2014-07-16 Brady Eidson <beidson@apple.com>
1886 Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
1887 <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
1889 Reviewed by Dan Bernstein.
1891 Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
1892 * UIProcess/API/Cocoa/WKProcessPool.mm:
1893 (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
1894 (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
1895 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1897 Add a big shiny comment in a few key places:
1898 * DatabaseProcess/DatabaseProcess.cpp:
1899 (WebKit::DatabaseProcess::initializeDatabaseProcess):
1900 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1901 (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
1902 * UIProcess/WebContext.cpp:
1903 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1904 (WebKit::WebContext::ensureDatabaseProcess):
1906 2014-07-16 Enrica Casucci <enrica@apple.com>
1908 REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
1909 https://bugs.webkit.org/show_bug.cgi?id=134992
1910 <rdar://problem/17528020>
1912 Reviewed by Benjamin Poulain.
1914 This patch exposes the scroller and the visible content rect so that
1915 UIKit can implement autoscroll when dragging the selections.
1916 It also changes that way we do hit testing to allow hit test outside
1917 the clipping region and fixes the way we compute the selection rectangle
1918 for the block selection, ensuring that we consider also non text elements
1921 * UIProcess/ios/WKContentViewInteraction.mm:
1922 (-[WKContentView scroller]):
1923 (-[WKContentView visibleRect]):
1924 * WebProcess/WebPage/ios/WebPageIOS.mm:
1925 (WebKit::selectionBoxForRange):
1926 (WebKit::WebPage::rangeForWebSelectionAtPosition):
1927 (WebKit::WebPage::rangeForBlockAtPoint):
1928 (WebKit::WebPage::expandedRangeFromHandle):
1929 (WebKit::WebPage::contractedRangeFromHandle):
1930 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
1931 (WebKit::WebPage::changeBlockSelection):
1933 2014-07-16 Alexey Proskuryakov <ap@apple.com>
1935 <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
1936 CFNetwork cache path in WebContent process
1938 Rubber-stamped by Sam Weinig.
1940 Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
1941 false at this point in initialization sequence. But we did the right thing, as we
1942 always need to set the cache path, even when network process is used for most loading.
1944 * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
1946 2014-07-16 Timothy Horton <timothy_horton@apple.com>
1948 Dispatch top content inset changes immediately if synchronously waiting for view state changes
1949 https://bugs.webkit.org/show_bug.cgi?id=134942
1950 <rdar://problem/17666800>
1952 Reviewed by Simon Fraser.
1954 * UIProcess/API/mac/WKView.mm:
1955 (-[WKView _dispatchSetTopContentInset]):
1956 (-[WKView _setTopContentInset:]):
1957 Move the check from _setTopContentInset: to _dispatchSetTopContentInset
1958 that ensures that we only send the message if the top content inset changed.
1960 2014-07-16 Benjamin Poulain <bpoulain@apple.com>
1962 [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
1963 https://bugs.webkit.org/show_bug.cgi?id=134965
1964 Related to <rdar://problem/17082607>
1966 Reviewed by Tim Horton.
1968 Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
1969 to the page at the new size during the transition.
1971 Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
1972 can be applied to the wrong set of tiles.
1973 This is mostly a problem for unresponsive WebProcess or when the synchronization is done
1976 There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
1977 completely fails to get the new page, the UIProcess is in a somewhat messy state.
1978 I will look into that separately than the layer tree synchronization.
1980 * UIProcess/API/Cocoa/WKWebView.mm:
1981 (-[WKWebView _didCommitLayerTree:]):
1982 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
1983 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
1984 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1985 * UIProcess/PageClient.h:
1986 * UIProcess/WebPageProxy.cpp:
1987 (WebKit::WebPageProxy::WebPageProxy):
1988 (WebKit::WebPageProxy::resetState):
1989 * UIProcess/WebPageProxy.h:
1990 * UIProcess/ios/PageClientImplIOS.h:
1991 * UIProcess/ios/PageClientImplIOS.mm:
1992 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
1993 * UIProcess/ios/WebPageProxyIOS.mm:
1994 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1995 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
1996 (WebKit::WebPageProxy::didCommitLayerTree):
1997 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
1998 * WebProcess/WebPage/WebPage.cpp:
1999 (WebKit::WebPage::WebPage):
2000 (WebKit::WebPage::didCommitLoad):
2001 * WebProcess/WebPage/WebPage.h:
2002 * WebProcess/WebPage/WebPage.messages.in:
2003 * WebProcess/WebPage/ios/WebPageIOS.mm:
2004 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
2005 (WebKit::WebPage::updateVisibleContentRects):
2006 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2007 (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
2008 (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
2010 2014-07-16 Dan Bernstein <mitz@apple.com>
2012 REGRESSION (r170653): Web Content service’s Info.plist has wrong format
2013 https://bugs.webkit.org/show_bug.cgi?id=134973
2015 Reviewed by Alexey Proskuryakov.
2017 * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
2018 script build phases to convert Info.plist back to binary format if the
2019 PLIST_FILE_OUTPUT_FORMAT build setting requires it.
2021 2014-07-15 Benjamin Poulain <bpoulain@apple.com>
2025 * UIProcess/API/Cocoa/WKWebView.mm:
2026 (-[WKWebView _scrollToContentOffset:]):
2027 On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
2028 of those was ignored.
2030 2014-07-15 Dan Bernstein <mitz@apple.com>
2032 WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
2033 https://bugs.webkit.org/show_bug.cgi?id=134951
2035 Reviewed by Tim Horton.
2037 * UIProcess/API/Cocoa/WKWebView.mm:
2038 (-[WKWebView _setFormDelegate:]):
2040 2014-07-15 Benjamin Poulain <benjamin@webkit.org>
2042 [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
2043 https://bugs.webkit.org/show_bug.cgi?id=134952
2044 <rdar://problem/17647116>
2046 Reviewed by Enrica Casucci.
2048 When we received a scroll request, we were taking that offset directly to set the UIScrollView
2049 scroll position. This is a problem if a page request scrolling to an invalid position, we were
2052 This patch limits the position to be inside the document.
2054 -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
2056 Some pages rely on the page scale factor changing instantly, because that is how it worked
2059 On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
2060 dynamically, and the page scale factor can change in response to WebProcess events (the focus
2061 changing for example). To make the page works, the WebProcess does not restrict the scroll position.
2063 In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
2065 -- Why not use changeContentOffsetBoundedInValidRange()?
2067 The scroll offset as seen by the page is relative to the unobscured rect. While the position used
2068 for history item is a visual position. All we need in this case is a position in the view.
2070 * UIProcess/API/Cocoa/WKWebView.mm:
2071 (-[WKWebView _scrollToContentOffset:]):
2072 * UIProcess/WebPageProxy.h:
2073 * UIProcess/ios/WebPageProxyIOS.mm:
2074 (WebKit::WebPageProxy::resendLastVisibleContentRects):
2076 2014-07-15 Timothy Horton <timothy_horton@apple.com>
2078 Dispatch top content inset changes immediately if synchronously waiting for view state changes
2079 https://bugs.webkit.org/show_bug.cgi?id=134942
2080 <rdar://problem/17666800>
2082 Reviewed by Simon Fraser.
2084 * UIProcess/API/mac/WKView.mm:
2085 (-[WKView endDeferringViewInWindowChanges]):
2086 (-[WKView endDeferringViewInWindowChangesSync]):
2087 (-[WKView _dispatchSetTopContentInset]):
2088 (-[WKView _setTopContentInset:]):
2089 Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
2090 This will ensure that the incoming contents have the right top content inset, and we don't
2091 flash between the wrong inset and the right one.
2093 2014-07-15 Enrica Casucci <enrica@apple.com>
2095 REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
2096 https://bugs.webkit.org/show_bug.cgi?id=134934
2097 <rdar://problem/17224638>
2099 Reviewed by Tim Horton.
2101 * UIProcess/ios/WKContentViewInteraction.mm:
2103 Tab and back tab should be handled as special keys that have
2104 a command associated. The command specifies for each key the relevant
2105 action. This patch implements the commands property to create the association
2106 between key and command and the relevant actions that will execute the same
2107 code executed when the used taps on the < > buttons in the accessory bar.
2109 (-[WKContentView keyCommands]):
2110 (-[WKContentView _nextAccessoryTab:]):
2111 (-[WKContentView _prevAccessoryTab:]):
2113 2014-07-15 Oliver Hunt <oliver@apple.com>
2115 More tidying of the webcontent sandbox profile
2116 https://bugs.webkit.org/show_bug.cgi?id=134938
2118 Reviewed by Alexey Proskuryakov.
2120 Remove some excessive abilities from the profile and make
2121 the required ones explicit.
2123 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2125 2014-07-14 Andreas Kling <akling@apple.com>
2127 [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
2128 <https://webkit.org/b/134915>
2130 When we're under memory pressure, the last thing we want to be doing is
2131 creating gratuitous new IOSurfaces. Just wait for the gesture to end before
2132 rendering at the new scale.
2134 Reviewed by Tim Horton.
2136 * WebProcess/WebPage/ios/WebPageIOS.mm:
2137 (WebKit::WebPage::updateVisibleContentRects):
2139 2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
2141 [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
2142 https://bugs.webkit.org/show_bug.cgi?id=134914
2144 Reviewed by Simon Fraser.
2146 Release our copied NSString in dealloc.
2148 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2149 (-[_WKRemoteObjectInterface dealloc]):
2151 2014-07-14 Dean Jackson <dino@apple.com>
2153 [PlugIns] Check for a non-null snapshot image before trying to decode it
2154 https://bugs.webkit.org/show_bug.cgi?id=134913
2155 <rdar://problem/17606033>
2157 Reviewed by Tim Horton.
2159 Changeset r169820 introduced a bug where we could examine the pixels of
2160 an image (looking for solid colors) before checking if the image actually
2163 I added a null check, and moved the code around a bit to avoid checking
2164 for existence three times.
2166 * WebProcess/Plugins/PluginView.cpp:
2167 (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
2168 before trying to look at it.
2170 2014-07-14 Anders Carlsson <andersca@apple.com>
2174 * UIProcess/Cocoa/SessionStateCoding.mm:
2175 (WebKit::encodeSessionState):
2177 2014-07-14 Anders Carlsson <andersca@apple.com>
2179 Use the legacy session coder for encoding/decoding session state
2180 https://bugs.webkit.org/show_bug.cgi?id=134910
2182 Reviewed by Beth Dakin.
2184 * UIProcess/Cocoa/SessionStateCoding.mm:
2185 (WebKit::encodeSessionState):
2186 (WebKit::decodeSessionState):
2188 2014-07-14 Oliver Hunt <oliver@apple.com>
2190 Restrict network process to remote connections
2191 https://bugs.webkit.org/show_bug.cgi?id=134908
2193 Reviewed by Geoffrey Garen.
2195 Further restrict network client
2197 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2199 2014-07-14 Tim Horton <timothy_horton@apple.com>
2201 ASSERT(isMainThread()) under OneShotDisplayLinkHandler
2202 https://bugs.webkit.org/show_bug.cgi?id=134900
2204 Reviewed by Simon Fraser.
2206 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2207 (-[OneShotDisplayLinkHandler displayLinkFired:]):
2208 isMainThread means the Web thread sometimes.
2210 2014-07-14 Tim Horton <timothy_horton@apple.com>
2214 * UIProcess/API/Cocoa/WKWebView.mm:
2215 (-[WKWebView _frameOrBoundsChanged]):
2216 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2217 * UIProcess/API/ios/WKViewIOS.mm:
2218 (-[WKView _frameOrBoundsChanged]):
2220 2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
2222 [UNIX] Log error description when failing to create shared memory file.
2223 https://bugs.webkit.org/show_bug.cgi?id=134892
2225 Reviewed by Darin Adler.
2227 * Platform/unix/SharedMemoryUnix.cpp:
2228 (WebKit::SharedMemory::create): Print the string describing the error number (errno).
2230 2014-07-14 Benjamin Poulain <benjamin@webkit.org>
2232 [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
2233 https://bugs.webkit.org/show_bug.cgi?id=134875
2235 Reviewed by Tim Horton.
2237 On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
2238 changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
2239 at the wrong orientation.
2241 This patch fixes the issue by making a special case for animated resize:
2242 -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
2243 the API's client changing the WKWebView. In that case, we do not update the drawing area.
2244 -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
2245 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
2246 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
2247 order, and the updateGeometry() is always done after the viewport configuration has been updated.
2249 * UIProcess/API/Cocoa/WKWebView.mm:
2250 (-[WKWebView _frameOrBoundsChanged]):
2251 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2252 * UIProcess/ios/WKContentView.h:
2253 * UIProcess/ios/WKContentView.mm:
2254 (-[WKContentView setMinimumSize:]): Deleted.
2256 2014-07-14 Benjamin Poulain <bpoulain@apple.com>
2258 [iOS][WK2] Fix withinEpsilon()
2259 https://bugs.webkit.org/show_bug.cgi?id=134798
2261 Reviewed by Darin Adler.
2263 Move the function back to WKWebView, it is no longer needed in WKContentView.
2265 Use the real types as input to properly verify that the two inputs are within
2266 a small value of the 32bit floating point.
2268 The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
2269 that would not make any difference on float.
2271 The source of those small changes comes from the fact UIProcess does a lot of processing
2272 on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
2273 for scale. When we are getting updates from the WebProcess, we should ignore any small differences
2274 caused by the computations done with less precision.
2276 * UIProcess/API/Cocoa/WKWebView.mm:
2278 * UIProcess/ios/WKContentViewInteraction.h:
2279 (withinEpsilon): Deleted.
2281 2014-07-14 Bear Travis <betravis@adobe.com>
2283 [Feature Queries] Enable Feature Queries on Mac
2284 https://bugs.webkit.org/show_bug.cgi?id=134404
2286 Reviewed by Antti Koivisto.
2288 Enable Feature Queries on Mac and resume running the
2291 * Configurations/FeatureDefines.xcconfig: Turn on
2292 ENABLE_CSS3_CONDITIONAL_RULES.
2294 2014-07-14 Anders Carlsson <andersca@apple.com>
2296 Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
2297 https://bugs.webkit.org/show_bug.cgi?id=134889
2299 Reviewed by Beth Dakin.
2301 * UIProcess/API/C/WKPage.cpp:
2302 * UIProcess/API/C/WKPageLoaderClient.h:
2304 2014-07-14 Dan Bernstein <mitz@apple.com>
2306 REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
2307 https://bugs.webkit.org/show_bug.cgi?id=134887
2309 Reviewed by Tim Horton.
2311 * UIProcess/mac/PageClientImpl.mm:
2312 (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
2313 the client is using WKView directly.
2314 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2315 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2316 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
2318 2014-07-14 Eric Carlson <eric.carlson@apple.com>
2320 [Mac] don't enable low power audio mode on external output devices
2321 https://bugs.webkit.org/show_bug.cgi?id=134877
2323 Reviewed by Sam Weinig.
2325 * PluginProcess/PluginProcess.h: Add an empty implementation of
2326 AudioHardwareListener::audioOutputDeviceChanged.
2328 2014-07-14 Tim Horton <timothy_horton@apple.com>
2330 [iOS] Throttle painting using a UI-process-side CADisplayLink
2331 https://bugs.webkit.org/show_bug.cgi?id=134879
2332 <rdar://problem/17641699>
2334 Reviewed by Simon Fraser.
2336 Just waiting for CA to commit is insufficient to actually throttle to 60fps,
2337 because nothing will block the main runloop from spinning.
2339 Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
2340 the first time it fires after we commit. This is not a guarantee that
2341 our content is on the screen, but we don't have any way to make that guarantee yet.
2343 This will throttle painting, rAF, etc. to the display refresh rate.
2345 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2346 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2347 (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
2348 (-[OneShotDisplayLinkHandler dealloc]):
2349 (-[OneShotDisplayLinkHandler displayLinkFired:]):
2350 (-[OneShotDisplayLinkHandler invalidate]):
2351 (-[OneShotDisplayLinkHandler schedule]):
2352 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2353 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2354 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2355 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2356 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
2358 2014-07-14 Dan Bernstein <mitz@apple.com>
2360 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
2361 https://bugs.webkit.org/show_bug.cgi?id=134878
2363 Reviewed by Sam Weinig.
2365 Route CFNetwork’s calls to Security API through to the UI process.
2367 * NetworkProcess/ios/NetworkProcessIOS.mm:
2368 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
2370 * Shared/mac/SecItemShim.cpp:
2371 (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
2372 CFNetwork with alternate functions to call.
2374 * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
2375 * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
2377 * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
2379 2014-07-14 Dan Bernstein <mitz@apple.com>
2381 <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
2382 https://bugs.webkit.org/show_bug.cgi?id=134666
2384 Reviewed by Tim Horton.
2386 A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
2387 by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
2388 unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
2389 only decoding fails, in this case silently, simply not delivering the
2390 SecItemShim::secItemResponse message.
2392 The fix is to teach ArgumentCodersCF about SecAccessControlRef.
2394 * Shared/cf/ArgumentCodersCF.cpp:
2395 (IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
2396 (IPC::encode): Encode the SecAccessControl serialized into CFData.
2397 (IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
2398 * Shared/cf/ArgumentCodersCF.h:
2399 * config.h: Defined HAVE_SEC_ACCESS_CONTROL.
2401 2014-07-13 Dan Bernstein <mitz@apple.com>
2403 <rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
2404 https://bugs.webkit.org/show_bug.cgi?id=134872
2406 Reviewed by Sam Weinig.
2408 * Shared/InteractionInformationAtPosition.cpp:
2409 (WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
2410 (WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
2411 * Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
2413 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
2415 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
2416 (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
2417 parameter, which is stored in a new ivar.
2418 (-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
2419 into a cached Cocoa image and returns it.
2420 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
2421 initializer, removed _boundingRect property declaration from here.
2423 * UIProcess/ios/WKActionSheetAssistant.mm:
2424 (-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
2425 into the _WKActivatedElementInfo initializer.
2426 (-[WKActionSheetAssistant showLinkSheet]): Ditto.
2428 * WebProcess/WebPage/WebPage.cpp:
2429 (WebKit::WebPage::snapshotNode): Added.
2430 * WebProcess/WebPage/WebPage.h:
2432 * WebProcess/WebPage/ios/WebPageIOS.mm:
2433 (WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
2434 snapshot of it in the image member of the InteractionInformationAtPosition.
2436 2014-07-13 Dan Bernstein <mitz@apple.com>
2438 [Cocoa] Clean up session state API a little
2439 https://bugs.webkit.org/show_bug.cgi?id=134871
2441 Reviewed by Darin Adler.
2443 * UIProcess/API/Cocoa/WKWebView.mm:
2444 (-[WKWebView _sessionState]):
2445 (-[WKWebView _restoreFromSessionState:]): Deleted.
2446 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2448 2014-07-13 Javier Fernandez <jfernandez@igalia.com>
2450 REGRESSION(r171045) [GTK] Build broken.
2451 https://bugs.webkit.org/show_bug.cgi?id=134867
2453 Unreviewed GTK build fix after r171045.
2455 * UIProcess/API/gtk/PageClientImpl.cpp:
2456 (WebKit::PageClientImpl::willRecordNavigationSnapshot):
2457 * UIProcess/API/gtk/PageClientImpl.h:
2459 2014-07-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2461 Unreviewed, EFL build fix since r171045.
2463 * UIProcess/CoordinatedGraphics/WebView.h:
2465 2014-07-12 Dan Bernstein <mitz@apple.com>
2467 [Cocoa] Notify the client when a navigation snapshot is taken
2468 https://bugs.webkit.org/show_bug.cgi?id=134865
2470 Reviewed by Sam Weinig.
2472 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
2474 * UIProcess/Cocoa/NavigationState.h:
2475 * UIProcess/Cocoa/NavigationState.mm:
2476 (WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
2477 m_navigationDelegateMethods.
2478 (WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
2479 WKNavigationDelegate method.
2481 * UIProcess/PageClient.h: Declared new client function.
2483 * UIProcess/WebPageProxy.cpp:
2484 (WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
2485 * UIProcess/WebPageProxy.h:
2487 * UIProcess/ios/PageClientImplIOS.h:
2488 * UIProcess/ios/PageClientImplIOS.mm:
2489 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
2490 NavigationState::willRecordNavigationSnapshot.
2492 * UIProcess/mac/PageClientImpl.h:
2493 * UIProcess/mac/PageClientImpl.mm:
2494 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
2496 * UIProcess/mac/ViewSnapshotStore.mm:
2497 (WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
2498 WebPageProxy::willRecordNavigationSnapshot.
2500 2014-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2502 Unreviewed, fix EFL build break since r171034.
2504 * UIProcess/CoordinatedGraphics/WebView.h:
2505 * UIProcess/efl/WebContextEfl.cpp:
2506 (WebKit::WebContext::platformMediaCacheDirectory):
2508 2014-07-12 Darin Adler <darin@apple.com>
2510 Try to fix 32-bit Mac build.
2512 * UIProcess/mac/PageClientImpl.mm:
2513 (WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
2514 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2515 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2517 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
2519 REGRESSION(r171034) [GTK] Build broken.
2520 https://bugs.webkit.org/show_bug.cgi?id=134861
2522 Unreviewed GTK build fix.
2524 * UIProcess/API/gtk/PageClientImpl.cpp:
2525 (WebKit::PageClientImpl::navigationGestureDidBegin):
2526 (WebKit::PageClientImpl::navigationGestureWillEnd):
2527 (WebKit::PageClientImpl::navigationGestureDidEnd):
2528 * UIProcess/API/gtk/PageClientImpl.h:
2530 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
2532 REGRESSION(r171024) [GTK] Build broken.
2533 https://bugs.webkit.org/show_bug.cgi?id=134859
2535 Unreviewed GTK build fix.
2537 * UIProcess/gtk/WebContextGtk.cpp:
2538 (WebKit::WebContext::platformMediaCacheDirectory):
2540 2014-07-12 Dan Bernstein <mitz@apple.com>
2542 <rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
2543 https://bugs.webkit.org/show_bug.cgi?id=134853
2545 Reviewed by Sam Weinig.
2547 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
2550 * UIProcess/API/Cocoa/WKWebView.mm:
2551 (-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
2553 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
2554 _isShowingNavigationGestureSnapshot.
2556 * UIProcess/Cocoa/NavigationState.h:
2557 * UIProcess/Cocoa/NavigationState.mm:
2558 (WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
2559 m_navigationDelegateMethods.
2560 (WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
2561 WKNavigationDelegate method.
2562 (WebKit::NavigationState::navigationGestureWillEnd): Ditto.
2563 (WebKit::NavigationState::navigationGestureDidEnd): Ditto.
2565 * UIProcess/PageClient.h: Declared new client functions.
2567 * UIProcess/WebPageProxy.cpp:
2568 (WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
2569 (WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
2570 and call the new client function.
2571 (WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
2572 (WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
2573 (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
2574 m_isShowingNavigationGestureSnapshot.
2575 * UIProcess/WebPageProxy.h:
2576 (WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
2578 * UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
2579 * UIProcess/ios/PageClientImplIOS.mm:
2580 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2581 NavigationState function.
2582 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2583 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2585 * UIProcess/ios/ViewGestureControllerIOS.mm:
2586 (WebKit::ViewGestureController::beginSwipeGesture): Added calls to
2587 WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
2588 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2589 WebPageProxy::navigationGestureDidEnd.
2590 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2591 WebPageProxy::navigationGestureSnapshotWasRemoved.
2593 * UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
2594 * UIProcess/mac/PageClientImpl.mm:
2595 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2596 NavigationState function.
2597 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2598 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2600 * UIProcess/mac/ViewGestureControllerMac.mm:
2601 (WebKit::ViewGestureController::beginSwipeGesture): Added call to
2602 WebPageProxy::navigationGestureDidBegin.
2603 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2604 WebPageProxy::navigationGestureDidEnd.
2605 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2606 WebPageProxy::navigationGestureSnapshotWasRemoved.
2608 2014-07-12 Oliver Hunt <oliver@apple.com>
2610 Fix typo in prior patch
2611 https://bugs.webkit.org/show_bug.cgi?id=134858
2613 Reviewed by Sam Weinig.
2617 * UIProcess/mac/WebContextMac.mm:
2618 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2620 2014-07-12 Dan Bernstein <mitz@apple.com>
2622 [Cocoa] Client is not notified of same-document navigations
2623 https://bugs.webkit.org/show_bug.cgi?id=134855
2625 Reviewed by Sam Weinig.
2627 * UIProcess/API/APILoaderClient.h:
2628 (API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
2630 * UIProcess/API/C/WKPage.cpp:
2631 (WKPageSetPageLoaderClient): Ditto.
2633 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
2635 * UIProcess/Cocoa/NavigationState.h: Declare override of
2636 API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
2637 m_navigationDelegateMethods struct.
2638 * UIProcess/Cocoa/NavigationState.mm:
2639 (WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
2641 (WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
2643 (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
2644 the delegate method, if implemented.
2646 * UIProcess/WebPageProxy.cpp:
2647 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
2648 which is forwarded to the client.
2649 * UIProcess/WebPageProxy.h: Added navigationID parameter.
2650 * UIProcess/WebPageProxy.messages.in: Ditto.
2652 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2653 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
2654 (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
2655 (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
2656 (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
2658 2014-07-12 Oliver Hunt <oliver@apple.com>
2660 Extend WebContent sandbox to allow some extra access for frameworks
2661 https://bugs.webkit.org/show_bug.cgi?id=134844
2663 Reviewed by Sam Weinig.
2665 Open up the webcontent sandbox a bit so that some external frameworks
2668 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2669 * Shared/WebProcessCreationParameters.cpp:
2670 (WebKit::WebProcessCreationParameters::encode):
2671 (WebKit::WebProcessCreationParameters::decode):
2672 * Shared/WebProcessCreationParameters.h:
2673 * UIProcess/WebContext.cpp:
2674 (WebKit::WebContext::createNewWebProcess):
2675 (WebKit::WebContext::mediaCacheDirectory):
2676 * UIProcess/WebContext.h:
2677 * UIProcess/mac/WebContextMac.mm:
2678 (WebKit::WebContext::platformMediaCacheDirectory):
2679 * WebProcess/cocoa/WebProcessCocoa.mm:
2680 (WebKit::WebProcess::platformInitializeWebProcess):
2682 2014-07-12 Oliver Hunt <oliver@apple.com>
2684 Temporary work around for <rdar://<rdar://problem/17513375>
2685 https://bugs.webkit.org/show_bug.cgi?id=134848
2687 Reviewed by Sam Weinig.
2689 Temporarily work around <rdar://<rdar://problem/17513375> by
2690 dropping the explicit cookie storage if it points out of the
2693 * UIProcess/mac/WebContextMac.mm:
2694 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2696 2014-07-11 Enrica Casucci <enrica@apple.com>
2698 Implement textStylingAtPosition in WK2.
2699 https://bugs.webkit.org/show_bug.cgi?id=134843
2700 <rdar://problem/17614981>
2702 Reviewed by Benjamin Poulain.
2704 Adding information about typing attributes to EditorState so
2705 that we can implement textStylingAtPosition.
2707 * Shared/EditorState.cpp:
2708 (WebKit::EditorState::encode):
2709 (WebKit::EditorState::decode):
2710 * Shared/EditorState.h:
2711 (WebKit::EditorState::EditorState):
2712 * UIProcess/ios/WKContentViewInteraction.mm:
2713 (-[WKContentView textStylingAtPosition:inDirection:]):
2714 (-[WKContentView canPerformAction:withSender:]):
2715 (-[WKContentView toggleBoldface:]):
2716 (-[WKContentView toggleItalics:]):
2717 (-[WKContentView toggleUnderline:]):
2718 * WebProcess/WebPage/WebPage.cpp:
2719 (WebKit::WebPage::editorState):
2721 2014-07-11 Oliver Hunt <oliver@apple.com>
2723 Tighten WebContent sandbox
2724 https://bugs.webkit.org/show_bug.cgi?id=134834
2726 Reviewed by Sam Weinig.
2728 Define a much tighter sandbox profile for the WebContent process
2730 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2732 2014-07-11 Antti Koivisto <antti@apple.com>
2734 REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
2735 https://bugs.webkit.org/show_bug.cgi?id=134833
2736 <rdar://problem/17580021>
2738 Reviewed by Zalan Bujtas.
2740 Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
2742 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2743 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2745 2014-07-11 Zalan Bujtas <zalan@apple.com>
2747 Subpixel layout: return integral results for offset*, client*, scroll* by default.
2748 https://bugs.webkit.org/show_bug.cgi?id=134651
2750 Reviewed by Simon Fraser.
2752 Revert to returning integral values for Element.offset* client* scroll* by default.
2753 Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
2755 Since snapped dimension depends on both the original point and the width/height of the box,
2756 we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
2758 Covered by existing tests
2760 * Shared/WebPreferencesDefinitions.h:
2761 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2763 2014-07-10 Jinwoo Song <jinwoo7.song@samsung.com>
2765 Unreviewed EFL build fix after r170970.
2767 * UIProcess/efl/WebContextEfl.cpp:
2768 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
2770 2014-07-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
2772 REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
2773 https://bugs.webkit.org/show_bug.cgi?id=134825
2775 Unreviewed GTK build fix.
2777 * Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
2778 * Shared/WebBackForwardListItem.h: Idem.
2779 * UIProcess/gtk/WebContextGtk.cpp:
2780 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
2782 2014-07-10 Benjamin Poulain <bpoulain@apple.com>
2784 [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
2785 https://bugs.webkit.org/show_bug.cgi?id=134820
2787 Reviewed by Andreas Kling.
2789 If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
2792 The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
2793 to remove the observer if we are not already observing on that view.
2795 To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
2796 are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
2797 the view is already nil.
2799 * UIProcess/ios/WKContentViewInteraction.mm:
2800 (-[WKContentView setupInteraction]):
2801 (-[WKContentView cleanupInteraction]):
2803 2014-07-10 Simon Fraser <simon.fraser@apple.com>
2805 [iOS WK2] Move WKInspectorHighlightView to its own file
2806 https://bugs.webkit.org/show_bug.cgi?id=134819
2808 Reviewed by Joseph Pecoraro.
2810 WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
2811 so move it into its own file.
2813 * UIProcess/WKInspectorHighlightView.h: Added.
2814 * UIProcess/WKInspectorHighlightView.mm: Added.
2815 (-[WKInspectorHighlightView dealloc]):
2816 (-[WKInspectorHighlightView _removeAllLayers]):
2817 (-[WKInspectorHighlightView _createLayers:]):
2818 (findIntersectionOnLineBetweenPoints):
2820 (layerPathWithHole):
2822 (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
2823 (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
2824 (-[WKInspectorHighlightView update:]):
2825 * UIProcess/ios/WKContentView.mm:
2826 (-[WKInspectorHighlightView initWithFrame:]): Deleted.
2827 (-[WKInspectorHighlightView dealloc]): Deleted.
2828 (-[WKInspectorHighlightView _removeAllLayers]): Deleted.
2829 (-[WKInspectorHighlightView _createLayers:]): Deleted.
2830 (findIntersectionOnLineBetweenPoints): Deleted.
2831 (quadIntersection): Deleted.
2832 (layerPathWithHole): Deleted.
2833 (layerPath): Deleted.
2834 (-[WKInspectorHighlightView _layoutForNodeHighlight:]): Deleted.
2835 (-[WKInspectorHighlightView _layoutForRectsHighlight:]): Deleted.
2836 (-[WKInspectorHighlightView update:]): Deleted.
2837 * WebKit2.xcodeproj/project.pbxproj:
2839 2014-07-10 Tim Horton <timothy_horton@apple.com>
2841 REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
2842 https://bugs.webkit.org/show_bug.cgi?id=134818
2843 <rdar://problem/17632468>
2845 Reviewed by Anders Carlsson.
2847 * UIProcess/API/Cocoa/WKWebView.mm:
2848 (scrollViewBackgroundColor):
2849 r170935 made it so that we would initialize the scroll view background color to an
2850 invalid color until the first layer tree commit. We should go with white instead.
2852 2014-07-10 Enrica Casucci <enrica@apple.com>
2854 Add a mechanism to notify the UIProcess when an editing command is done executing.
2855 https://bugs.webkit.org/show_bug.cgi?id=134807
2857 Reviewed by Tim Horton.
2859 Some editing commands have an effect on some parts of the system that
2860 run inside the UIProcess. A good example are the cursor movement commands
2861 that require an update of the autocorrection/autosuggestion machinery.
2862 This patch adds a way to reliably know when the command has been executed
2863 in the WebProcess. A previous attempt at solving this problem was added in
2864 r170858 and was partially reverted in r170948.
2865 The change also removes the selectionWillChange notification added in r170858.
2867 * UIProcess/PageClient.h:
2868 * UIProcess/WebPageProxy.cpp:
2869 (WebKit::WebPageProxy::editorStateChanged):
2870 * UIProcess/WebPageProxy.h:
2871 * UIProcess/ios/PageClientImplIOS.h:
2872 * UIProcess/ios/PageClientImplIOS.mm:
2873 (WebKit::PageClientImpl::selectionWillChange): Deleted.
2874 * UIProcess/ios/WKContentViewInteraction.h:
2875 * UIProcess/ios/WKContentViewInteraction.mm:
2876 (-[WKContentView executeEditCommandWithCallback:]):
2877 (-[WKContentView _moveUp:withHistory:]):
2878 (-[WKContentView _moveDown:withHistory:]):
2879 (-[WKContentView _moveLeft:withHistory:]):
2880 (-[WKContentView _moveRight:withHistory:]):
2881 (-[WKContentView _moveToStartOfWord:withHistory:]):
2882 (-[WKContentView _moveToStartOfParagraph:withHistory:]):
2883 (-[WKContentView _moveToStartOfLine:withHistory:]):
2884 (-[WKContentView _moveToStartOfDocument:withHistory:]):
2885 (-[WKContentView _moveToEndOfWord:withHistory:]):
2886 (-[WKContentView _moveToEndOfParagraph:withHistory:]):
2887 (-[WKContentView _moveToEndOfLine:withHistory:]):
2888 (-[WKContentView _moveToEndOfDocument:withHistory:]):
2889 (-[WKContentView _selectionWillChange]): Deleted.
2890 * UIProcess/ios/WebPageProxyIOS.mm:
2891 (WebKit::WebPageProxy::executeEditCommand):
2892 (WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
2893 * WebProcess/WebPage/WebPage.h:
2894 * WebProcess/WebPage/WebPage.messages.in:
2895 * WebProcess/WebPage/ios/WebPageIOS.mm:
2896 (WebKit::WebPage::executeEditCommandWithCallback):
2898 2014-07-10 Joseph Pecoraro <pecoraro@apple.com>
2900 [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
2901 https://bugs.webkit.org/show_bug.cgi?id=134813
2903 Reviewed by Timothy Hatcher.
2905 * UIProcess/mac/WebInspectorProxyMac.mm:
2906 (WebKit::WebInspectorProxy::createInspectorWindow):
2907 Use a selector that will avoid the warning message.
2909 2014-07-10 Oliver Hunt <oliver@apple.com>
2911 Remove use of container relative restrictions in the network process sandbox
2912 https://bugs.webkit.org/show_bug.cgi?id=134816
2914 Reviewed by Anders Carlsson.
2916 As i'm tidying up the various sandboxes and that's meaning we
2917 need to reduce some file restrictions in the network process.
2919 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2921 2014-07-10 Pratik Solanki <psolanki@apple.com>
2923 Unreviewed iOS build fix after r170974. Define id if building a non ObjC file.
2925 * UIProcess/mac/ViewSnapshotStore.h:
2927 2014-07-10 Tim Horton <timothy_horton@apple.com>
2929 Store ViewSnapshots directly on the WebBackForwardListItem
2930 https://bugs.webkit.org/show_bug.cgi?id=134667
2931 <rdar://problem/17082639>
2933 Reviewed by Dan Bernstein.
2935 Make ViewSnapshot a refcounted class. Store it directly on the back-forward item
2936 instead of in a side map referenced by UUID. Switch to a very simple LRU eviction model for now.
2937 This fixes a ton of snapshot management bugs; for example, we would start throwing out snapshots
2938 in the page that was actively being interacted with *first* when evicting snapshots, instead of
2939 preferring older snapshots. Additionally, we would not throw away snapshots when back forward items
2942 There is definitely room for improvement of the eviction mechanism, but this is closer to a time-tested implementation.
2944 * Shared/SessionState.h:
2945 Keep a ViewSnapshot instead of a UUID on the BackForwardListItemState.
2947 * Shared/WebBackForwardListItem.h:
2948 Fix some indented namespace contents.
2950 (WebKit::WebBackForwardListItem::snapshot):
2951 (WebKit::WebBackForwardListItem::setSnapshot):
2952 (WebKit::WebBackForwardListItem::setSnapshotUUID): Deleted.
2953 (WebKit::WebBackForwardListItem::snapshotUUID): Deleted.
2954 Switch the snapshot getter/setter to operate on ViewSnapshots instead of UUIDs.
2956 * UIProcess/API/Cocoa/WKWebView.mm:
2957 (-[WKWebView _takeViewSnapshot]):
2958 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2959 * UIProcess/API/mac/WKView.mm:
2960 (-[WKView _takeViewSnapshot]):
2961 * UIProcess/API/mac/WKViewInternal.h:
2962 * UIProcess/PageClient.h:
2963 * UIProcess/WebPageProxy.cpp:
2964 (WebKit::WebPageProxy::takeViewSnapshot):
2965 * UIProcess/WebPageProxy.h:
2966 * UIProcess/ios/PageClientImplIOS.h:
2967 * UIProcess/ios/PageClientImplIOS.mm:
2968 (WebKit::PageClientImpl::takeViewSnapshot):
2969 * UIProcess/mac/PageClientImpl.h:
2970 * UIProcess/mac/PageClientImpl.mm:
2971 (WebKit::PageClientImpl::takeViewSnapshot):
2972 Adopt ViewSnapshot::create, return a PassRefPtr, and class-ify ViewSnapshot.
2974 * UIProcess/ios/ViewGestureControllerIOS.mm:
2975 (WebKit::ViewGestureController::beginSwipeGesture):
2976 (WebKit::ViewGestureController::endSwipeGesture):
2977 * UIProcess/mac/ViewGestureController.h:
2978 * UIProcess/mac/ViewGestureControllerMac.mm:
2979 (WebKit::ViewGestureController::shouldUseSnapshotForSize):
2980 (WebKit::ViewGestureController::beginSwipeGesture):
2981 (WebKit::ViewGestureController::endSwipeGesture):
2982 Grab the ViewSnapshot directly from the WebBackForwardListItem, and adopt the new functions.
2984 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2985 (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2986 Rename discardSnapshots to discardSnapshotImages, because we're really only discarding
2987 the images; the render tree size/background color "snapshot" remains and is useful.
2989 * UIProcess/mac/ViewSnapshotStore.h:
2990 (WebKit::ViewSnapshot::setRenderTreeSize):
2991 (WebKit::ViewSnapshot::renderTreeSize):
2992 (WebKit::ViewSnapshot::setBackgroundColor):
2993 (WebKit::ViewSnapshot::backgroundColor):
2994 (WebKit::ViewSnapshot::setDeviceScaleFactor):
2995 (WebKit::ViewSnapshot::deviceScaleFactor):
2996 (WebKit::ViewSnapshot::imageSizeInBytes):
2997 (WebKit::ViewSnapshot::surface):
2998 (WebKit::ViewSnapshot::size):
2999 (WebKit::ViewSnapshot::creationTime):
3000 Make ViewSnapshot a refcounted class.
3001 Add create functions which take an image (or slot ID), and relevant sizes.
3002 It is expected that a ViewSnapshot is created with an image, and it is only possible
3003 to remove that image, never to replace it. A new ViewSnapshot is required in that case.
3004 Add setters for things that ViewSnapshotStore sets on the snapshot after the PageClient
3005 retrieves it from the view. Add getters for things that the ViewGestureControllers need.
3007 Remove removeSnapshotImage, getSnapshot, and the snapshot map.
3009 * UIProcess/mac/ViewSnapshotStore.mm:
3010 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
3011 (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
3012 (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
3013 Manage m_snapshotCacheSize and m_snapshotsWithImages via didAddImageToSnapshot and willRemoveImageFromSnapshot.
3014 willRemoveImageFromSnapshot will -always- be called before the ViewSnapshot is destroyed.
3016 (WebKit::ViewSnapshotStore::pruneSnapshots):
3017 Switch to a simple LRU eviction model. As previously mentioned, it's possible to do better, but
3018 this is much less broken than the previous implementation.
3020 (WebKit::ViewSnapshotStore::recordSnapshot):
3021 (WebKit::ViewSnapshotStore::discardSnapshotImages):
3022 (WebKit::ViewSnapshot::create):
3023 (WebKit::ViewSnapshot::ViewSnapshot):
3024 (WebKit::ViewSnapshot::~ViewSnapshot):
3025 (WebKit::ViewSnapshot::hasImage):
3026 (WebKit::ViewSnapshot::clearImage):
3027 (WebKit::ViewSnapshot::asLayerContents):
3028 If a surface is Empty when it comes back from being volatile, throw away the surface
3029 and notify the Store to remove it from m_snapshotCacheSize (via clearImage()).
3031 (WebKit::ViewSnapshotStore::removeSnapshotImage): Deleted.
3032 (WebKit::ViewSnapshotStore::getSnapshot): Deleted.
3033 (WebKit::ViewSnapshotStore::discardSnapshots): Deleted.
3035 2014-07-10 Beth Dakin <bdakin@apple.com>
3037 Need Setting/WKPreference that allows clients to prevent scrollbars from drawing
3038 on a secondary thread
3039 https://bugs.webkit.org/show_bug.cgi?id=134778
3041 <rdar://problem/17595333>
3043 Reviewed by Tim Horton.
3045 This is a requirement for some types of performance tests.
3048 * Shared/WebPreferencesDefinitions.h:
3050 PDFPlugin has to implement this new ScrollableArea virtual function to indicate
3051 the Setting’s value.
3052 * WebProcess/Plugins/PDF/PDFPlugin.h:
3053 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3054 (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
3057 * WebProcess/WebPage/WebPage.cpp:
3058 (WebKit::WebPage::updatePreferences):
3060 2014-07-10 Tim Horton <timothy_horton@apple.com>
3062 [iOS] Frequent assertion failures when swiping back
3064 Reviewed by Dan Bernstein.
3066 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3067 (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3068 Don't create an unused VoidCallback. It will assert when destroyed without being called.
3070 2014-07-10 Oliver Hunt <oliver@apple.com>
3072 Pass sandbox extension for GL cache over to webprocess
3073 https://bugs.webkit.org/show_bug.cgi?id=134806
3075 Reviewed by Anders Carlsson.
3077 Add additional WebProcess parameters to pass an extension
3078 that allows access to the opengl cache directory in the
3079 host application's container.
3081 * Shared/WebProcessCreationParameters.cpp:
3082 (WebKit::WebProcessCreationParameters::encode):
3083 (WebKit::WebProcessCreationParameters::decode):
3084 * Shared/WebProcessCreationParameters.h:
3085 * UIProcess/WebContext.cpp:
3086 (WebKit::WebContext::createNewWebProcess):
3087 (WebKit::WebContext::openGLCacheDirectory):
3088 * UIProcess/WebContext.h:
3089 * UIProcess/mac/WebContextMac.mm:
3090 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
3091 * WebProcess/cocoa/WebProcessCocoa.mm:
3092 (WebKit::WebProcess::platformInitializeWebProcess):
3094 2014-07-10 Dan Bernstein <mitz@apple.com>
3098 * WebProcess/WebPage/ServicesOverlayController.h:
3100 2014-07-09 Brady Eidson <beidson@apple.com>
3102 Phone number highlights should always be visible if the mouse hovers over.
3103 <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
3105 Reviewed by Tim Horton.
3107 This is a fairly extensive rewrite of ServicesOverlayController.
3108 It allows one selection highlight for the entire selection, and as many telephone number highlights as there are numbers.
3109 If a telephone number highlight is hovered over, it wins and is painted.
3110 If no telephone number highlight is hovered but the selection highlight is, then it is painted.
3112 The purposes of each method are self evident by their name, and the concepts are mostly the same as they used to be.
3114 The exception is establishHoveredTelephoneHighlight which gets a more detailed explanation below.
3116 * Platform/Logging.h: Add a Services logging channel.
3118 * WebProcess/WebPage/ServicesOverlayController.h:
3119 (WebKit::TelephoneNumberData::TelephoneNumberData):
3121 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3122 (WebKit::ServicesOverlayController::ServicesOverlayController):
3123 (WebKit::ServicesOverlayController::selectionRectsDidChange):
3124 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
3125 (WebKit::ServicesOverlayController::clearHighlightState):
3126 (WebKit::ServicesOverlayController::drawRect):
3127 (WebKit::ServicesOverlayController::drawSelectionHighlight):
3128 (WebKit::ServicesOverlayController::maybeDrawTelephoneNumberHighlight):
3129 (WebKit::ServicesOverlayController::drawHighlight):
3130 (WebKit::ServicesOverlayController::clearSelectionHighlight):
3131 (WebKit::ServicesOverlayController::clearHoveredTelephoneNumberHighlight):
3132 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight): Starts walking the telephone number ranges and
3133 creating a highlight for each one that doesn’t already have a highlight. If that highlight is also being hovered by
3134 the mouse, then it is set as the hovered telephone number highlight and the method stops creating new highlights.
3135 (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
3136 (WebKit::ServicesOverlayController::mouseEvent):
3137 (WebKit::ServicesOverlayController::handleClick):
3138 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Deleted.
3139 (WebKit::ServicesOverlayController::drawCurrentHighlight): Deleted.
3141 2014-07-10 Timothy Horton <timothy_horton@apple.com>
3143 Assertions or crashes under _takeViewSnapshot when restoring windows
3144 https://bugs.webkit.org/show_bug.cgi?id=134792
3146 Reviewed by Simon Fraser.
3148 * UIProcess/API/mac/WKView.mm:
3149 (-[WKView _takeViewSnapshot]):
3150 Taking a window-server snapshot of a non-visible window tends to not succeed.
3152 2014-07-09 Pratik Solanki <psolanki@apple.com>
3154 Buffer CSS and JS resources in network process before sending over to web process
3155 https://bugs.webkit.org/show_bug.cgi?id=134560
3156 <rdar://problem/16737186>
3158 Reviewed by Antti Koivisto.
3160 For CSS and JS resources, ask the network process to buffer the entire resource instead of
3161 sending it to web process in chunks since the web process can't do anything with a partial
3164 * NetworkProcess/NetworkResourceLoader.cpp:
3165 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3166 * Shared/Network/NetworkResourceLoadParameters.cpp:
3167 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3168 (WebKit::NetworkResourceLoadParameters::encode):
3169 (WebKit::NetworkResourceLoadParameters::decode):
3170 * Shared/Network/NetworkResourceLoadParameters.h:
3171 * WebProcess/Network/WebResourceLoadScheduler.cpp:
3172 (WebKit::WebResourceLoadScheduler::scheduleLoad):
3174 2014-07-09 Benjamin Poulain <bpoulain@apple.com>
3176 [iOS][WK2] Disable text quantization while actively changing the page's scale factor
3177 https://bugs.webkit.org/show_bug.cgi?id=134781
3179 Reviewed by Tim Horton and Myles C. Maxfield.
3181 While zooming a page, text quantization causes glyphs to "move" in order to get to the closest
3182 boundary for the current scale factor.
3184 We do not want this to happen while dynamically changing the scale factor because the effect
3185 is visible. To avoid this, we disable text quantization if the page's scale factor changes
3186 in response to a non-stable contentRect update.
3188 * WebProcess/WebCoreSupport/WebChromeClient.h:
3189 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3190 (WebKit::WebChromeClient::hasStablePageScaleFactor):
3191 * WebProcess/WebPage/WebPage.cpp:
3192 (WebKit::WebPage::WebPage):
3193 * WebProcess/WebPage/WebPage.h:
3194 (WebKit::WebPage::hasStablePageScaleFactor):
3195 * WebProcess/WebPage/ios/WebPageIOS.mm:
3196 (WebKit::WebPage::updateVisibleContentRects):
3198 2014-07-09 Joseph Pecoraro <pecoraro@apple.com>
3200 [iOS] Use UIAlertController API in WKFileUploadPanel instead of SPI
3201 https://bugs.webkit.org/show_bug.cgi?id=134777
3203 Reviewed by Sam Weinig.
3205 * UIProcess/ios/forms/WKFileUploadPanel.mm:
3206 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
3208 2014-07-09 Shivakumar JM <shiva.jm@samsung.com>
3210 [EFL][WK2] Add new Public API in ewk_download_job.h to get size of the data already downloaded.
3211 https://bugs.webkit.org/show_bug.cgi?id=134759
3213 Reviewed by Gyuyoung Kim.
3215 Add new API in ewk_download_job.h to get size of the data already downloaded.
3217 * UIProcess/API/efl/ewk_download_job.cpp:
3218 (ewk_download_job_received_data_length_get):
3219 (EwkDownloadJob::receivedData):
3220 * UIProcess/API/efl/ewk_download_job.h:
3221 * UIProcess/API/efl/ewk_download_job_private.h:
3222 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
3223 (EWK2DownloadJobTest::on_download_requested):
3224 (EWK2DownloadJobTest::on_download_finished):
3226 2014-07-09 Enrica Casucci <enrica@apple.com>
3228 REGRESSION(r170858): Safari freezes upon making a search on a website (yelp.com).
3229 https://bugs.webkit.org/show_bug.cgi?id=134791
3230 <rdar://problem/17616971>
3232 Reviewed by Benjamin Poulain.
3234 After r170858 we notify the keyboard too often about
3235 the changed selection. This patch removes the notification
3236 until we find a better way to do it that doesn't cause
3239 * UIProcess/ios/WKContentViewInteraction.mm:
3240 (-[WKContentView _selectionWillChange]):
3241 (-[WKContentView _selectionChanged]):
3243 2014-07-09 Anders Carlsson <andersca@apple.com>
3245 Safari showing blank pages
3246 https://bugs.webkit.org/show_bug.cgi?id=134790
3247 <rdar://problem/17617166>
3249 Reviewed by Simon Fraser.
3251 * UIProcess/API/Cocoa/WKWebView.mm:
3252 (-[WKWebView initWithFrame:configuration:]):
3253 Make sure to add the content view to the scroll view.
3255 2014-07-09 Anders Carlsson <andersca@apple.com>
3257 Closed web views should never create new web processes
3258 https://bugs.webkit.org/show_bug.cgi?id=134787
3259 <rdar://problem/16892526>
3261 Reviewed by Simon Fraser.
3263 * UIProcess/API/Cocoa/WKWebView.mm:
3264 (-[WKWebView loadHTMLString:baseURL:]):
3265 (-[WKWebView reload]):
3266 (-[WKWebView reloadFromOrigin]):
3267 Return nil if the returned navigation ID is 0.
3269 * UIProcess/WebPageProxy.cpp:
3270 (WebKit::WebPageProxy::reattachToWebProcess):
3271 Assert that the page is not closed.
3273 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3274 (WebKit::WebPageProxy::loadRequest):
3275 (WebKit::WebPageProxy::loadFile):
3276 (WebKit::WebPageProxy::loadData):
3277 (WebKit::WebPageProxy::loadHTMLString):
3278 (WebKit::WebPageProxy::loadAlternateHTMLString):
3279 (WebKit::WebPageProxy::loadPlainTextString):
3280 (WebKit::WebPageProxy::loadWebArchiveData):
3281 Add early returns if the page is closed.
3283 * UIProcess/WebPageProxy.h:
3285 2014-07-09 Anders Carlsson <andersca@apple.com>
3287 Support transparent WKWebViews
3288 https://bugs.webkit.org/show_bug.cgi?id=134779
3289 <rdar://problem/17351058>
3291 Reviewed by Tim Horton.
3293 * UIProcess/API/Cocoa/WKWebView.mm:
3294 (-[WKWebView initWithFrame:configuration:]):
3295 Call _updateScrollViewBackground instead of setting the background color.
3300 (scrollViewBackgroundColor):
3301 Helper function that returns the scroll view background color.
3302 If the web view isn't opaque, we want the scroll view to be transparent.
3304 (-[WKWebView _updateScrollViewBackground]):
3305 Call scrollViewBackgroundColor.
3307 (-[WKWebView setOpaque:]):
3308 Call WebPageProxy::setDrawsBackground and update the scroll view background.
3310 (-[WKWebView setBackgroundColor:]):
3311 Call setBackgroundColor on the content view.
3313 2014-07-09 Andy Estes <aestes@apple.com>
3315 [iOS] WebKit can crash under QuickLookDocumentData::encode() when viewing a QuickLook preview
3316 https://bugs.webkit.org/show_bug.cgi?id=134780
3318 Reviewed by Tim Horton.
3320 Don't use CFDataCreateWithBytesNoCopy() when we can't guarantee the lifetime of the copied-from DataReference
3321 will match or exceed that of the CFDataRef. Copy the data instead.
3323 * WebProcess/Network/WebResourceLoader.cpp:
3324 (WebKit::WebResourceLoader::didReceiveData):
3326 2014-07-09 Pratik Solanki <psolanki@apple.com>
3328 Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
3329 https://bugs.webkit.org/show_bug.cgi?id=134732
3331 Reviewed by Darin Adler.
3333 Buffer the resource in NetworkResourceLoader instead of SynchronousNetworkLoaderClient. This
3334 is in preparation for bug 134560 where we will be supporting JS and CSS resource buffering
3335 that uses AsynchronousNetworkLoaderClient.
3337 * NetworkProcess/NetworkResourceLoader.cpp:
3338 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3339 (WebKit::NetworkResourceLoader::didReceiveBuffer):
3340 (WebKit::NetworkResourceLoader::didFinishLoading):
3341 * NetworkProcess/NetworkResourceLoader.h:
3342 (WebKit::NetworkResourceLoader::bufferedData):
3343 * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
3344 (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
3345 (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
3346 (WebKit::SynchronousNetworkLoaderClient::didFail):
3347 (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
3348 * NetworkProcess/SynchronousNetworkLoaderClient.h:
3350 2014-07-09 Benjamin Poulain <bpoulain@apple.com>
3352 [iOS][WK2] subviews of the unscaled view drift out during CA animations
3353 https://bugs.webkit.org/show_bug.cgi?id=134751
3355 Reviewed by Enrica Casucci.
3357 It is not possible to animate the WKContentView and the inverse view in such a way
3358 that the combined matrix remain the identity for every frame of the animation.
3360 This patch solves the issue by moving the unscaled view as a sibling of WKContentView
3361 instead of a child so that we do not need to update two scales simultaneously.
3363 * UIProcess/API/Cocoa/WKWebView.mm:
3364 (-[WKWebView initWithFrame:configuration:]):
3365 (-[WKWebView _processDidExit]):
3366 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
3367 Set the z scale to 1 or no coordinate transform will work with this view.
3369 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3370 (-[WKWebView _endAnimatedResize]):
3371 * UIProcess/ios/WKContentView.mm:
3372 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
3373 * UIProcess/ios/WKContentViewInteraction.h:
3374 * UIProcess/ios/WKContentViewInteraction.mm:
3375 (-[WKContentView setupInteraction]):
3376 Since we need to observe changes inside the animation block, the code now use KVO to observe changes of scale.
3378 (-[WKContentView cleanupInteraction]):
3379 (-[WKContentView unscaledView]):
3380 (-[WKContentView inverseScale]):
3381 (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
3382 We update the utility views as usual. The extra bits here are to deal with views coming in during an animation.
3384 If a new utility view comes in during a scaling animation, we do not want to start a new animation with the same curve
3385 to end up at the right place. To avoid any issue, we just hide the view until the animation is finished.
3387 (-[WKContentView hitTest:withEvent:]):
3388 (-[WKContentView _showTapHighlight]):
3389 (-[WKContentView _updateUnscaledView]): Deleted.
3391 2014-07-09 Tim Horton <timothy_horton@apple.com>
3393 Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
3394 https://bugs.webkit.org/show_bug.cgi?id=134773
3396 Reviewed by Anders Carlsson.
3398 * UIProcess/API/mac/WKView.mm:
3399 (-[WKView _takeViewSnapshot]):
3400 * UIProcess/mac/ViewSnapshotStore.h:
3401 * UIProcess/mac/ViewSnapshotStore.mm:
3402 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
3403 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
3404 (WebKit::ViewSnapshotStore::recordSnapshot):
3405 (WebKit::ViewSnapshot::clearImage):
3406 (WebKit::ViewSnapshot::asLayerContents):
3407 (WebKit::createIOSurfaceFromImage): Deleted.
3408 (WebKit::compressImageAsJPEG): Deleted.
3409 (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost): Deleted.
3410 (WebKit::ViewSnapshotStore::didCompressSnapshot): Deleted.
3411 Remove all ViewSnapshot(Store) code related to JPEG-encoded snapshots.
3412 Remove the "image" member on ViewSnapshot; Mac will always start out with an IOSurface instead.
3413 Adopt WebCore::IOSurface::createFromImage to make that happen.
3414 Add a comment noting that if a snapshot comes back empty, we should throw it away completely.
3416 2014-07-09 Anders Carlsson <andersca@apple.com>
3418 RemoteLayerBackingStore::ensureBackingStore should ensure that the entire backing store gets redrawn
3419 https://bugs.webkit.org/show_bug.cgi?id=134772
3421 Reviewed by Tim Horton.
3423 * Shared/mac/RemoteLayerBackingStore.h:
3424 (WebKit::RemoteLayerBackingStore::Buffer::operator bool):
3425 * Shared/mac/RemoteLayerBackingStore.mm:
3426 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
3428 2014-07-09 KwangHyuk Kim <hyuki.kim@samsung.com>
3430 [EFL] Fix crash caused by invalid cursor image.
3431 https://bugs.webkit.org/show_bug.cgi?id=134663
3433 Reviewed by Gyuyoung Kim.
3435 Remove calling of updateCursor since the custom cursor image is invalid once a mouse is out of the webview.
3437 * UIProcess/API/efl/EwkView.cpp:
3438 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
3440 2014-07-08 Tim Horton <timothy_horton@apple.com>
3442 Remove WebBackForwardListItems when their owning page goes away
3443 https://bugs.webkit.org/show_bug.cgi?id=134709
3444 <rdar://problem/17584645>
3446 Reviewed by Dan Bernstein.