Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2
3         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
4         https://bugs.webkit.org/show_bug.cgi?id=132899
5
6         Reviewed by Beth Dakin.
7         
8         The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
9         need to be correctly encoded/decoded for UI-side compositing, and dumped
10         correctly.
11
12         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
13         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
14         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
15         (WebKit::RemoteScrollingTreeTextStream::dump):
16         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
17         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
18
19 2014-05-13  Anders Carlsson  <andersca@apple.com>
20
21         Another build fix.
22
23         Reviewed by Dan Bernstein.
24
25         * Shared/API/Cocoa/WKFoundation.h:
26         Make sure to include Availability.h
27
28 2014-05-13  Beth Dakin  <bdakin@apple.com>
29
30         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
31         scrolling in News Feed
32         https://bugs.webkit.org/show_bug.cgi?id=132889
33         -and corresponding-
34         <rdar://problem/16715716>
35
36         Reviewed by Simon Fraser.
37
38         Re-name scrollOffsetRelativeToDocument() to 
39         documentScrollPositionRelativeToViewOrigin().
40         * WebProcess/WebPage/FindController.cpp:
41         (WebKit::FindController::rectsForTextMatches):
42         * WebProcess/WebPage/WebPage.cpp:
43         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
44
45 2014-05-13  Dean Jackson  <dino@apple.com>
46
47         [iOS] Page scale update messages for media controls should only fire at the end of zooming
48         https://bugs.webkit.org/show_bug.cgi?id=132857
49         <rdar://problem/16631009>
50
51         Reviewed by Simon Fraser.
52
53         As the user was zooming, the media controls that responded
54         to the page scale (and resized themselves) would do so
55         slightly out of sync with the screen refreshes, and it looked
56         terrible.
57
58         We already know if a pageScale change is happening inside
59         a gesture using the inStableState property of the visibleContentRectUpdateInfo.
60         Simply pass this along to WebCore::Page.
61
62         * WebProcess/WebPage/ios/WebPageIOS.mm:
63         (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
64         WebCore::Page. Note that we have to send this message even if the
65         scale has not changed, since the last changing update might not have
66         been stable.
67
68 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
69
70         [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
71         https://bugs.webkit.org/show_bug.cgi?id=132849
72         <rdar://problem/16863716>
73
74         Reviewed by Anders Carlsson.
75
76         When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
77         state forwarded to the UIProcess.
78
79         For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
80         delegate callbacks.
81         After that update, Safari would modify the insets, thus updating the state again.
82         The first state changed by WKWebView is incomplete, and should never have been set.
83
84         This patch works around the issue by delaying visible update rect in those cases.
85
86         When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes 
87         [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
88         [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
89
90         Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
91
92         * UIProcess/API/Cocoa/WKWebView.mm:
93         (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
94         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
95         (-[WKWebView _updateVisibleContentRects]):
96         * UIProcess/API/Cocoa/WKWebViewInternal.h:
97         * UIProcess/API/ios/WKViewIOS.mm:
98         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
99         * UIProcess/ios/WKScrollView.h:
100         * UIProcess/ios/WKScrollView.mm:
101         (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
102         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
103         (-[WKScrollView setInternalDelegate:]):
104
105 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
106
107         [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
108         https://bugs.webkit.org/show_bug.cgi?id=132848
109         <rdar://problem/16875093>
110
111         Reviewed by Darin Adler.
112
113         The SPI is no longer needed by Safari.
114
115         * UIProcess/API/Cocoa/WKWebView.mm:
116         (-[WKWebView initWithFrame:configuration:]):
117         (-[WKWebView _updateScrollViewBackground]):
118         (-[WKWebView _frameOrBoundsChanged]):
119         (-[WKWebView _setObscuredInsets:]):
120         (-[WKWebView _endAnimatedResize]):
121         (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
122         (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
123         (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
124         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
125
126 2014-05-13  Samuel White  <samuel_white@apple.com>
127
128         AX: Hit testing not accounting for top content inset.
129         https://bugs.webkit.org/show_bug.cgi?id=132876
130
131         Reviewed by Chris Fleizach.
132
133         Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
134
135         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
136         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
137
138 2014-05-13  Enrica Casucci  <enrica@apple.com>
139
140         REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
141         https://bugs.webkit.org/show_bug.cgi?id=132879
142         <rdar://problem/16318049>
143
144         Reviewed by Benjamin Poulain.
145
146         Adds the heuristics to zoom and scroll to ensure the element being focused
147         is fully visible and its text readable.
148
149         * Shared/AssistedNodeInformation.cpp:
150         (WebKit::AssistedNodeInformation::encode):
151         (WebKit::AssistedNodeInformation::decode):
152         * Shared/AssistedNodeInformation.h:
153         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
154         * UIProcess/API/Cocoa/WKWebView.mm:
155         (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
156         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
157         * UIProcess/API/Cocoa/WKWebViewInternal.h:
158         * UIProcess/ios/WKContentView.h:
159         * UIProcess/ios/WKContentView.mm:
160         (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
161         * UIProcess/ios/WKContentViewInteraction.mm:
162         (-[WKContentView _displayFormNodeInputView]):
163         (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
164         * WebProcess/WebPage/ios/WebPageIOS.mm:
165         (WebKit::WebPage::getAssistedNodeInformation):
166
167 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
168
169         Fix the iOS Simulator build.
170
171         * UIProcess/mac/ViewSnapshotStore.h:
172
173 2014-05-13  Tim Horton  <timothy_horton@apple.com>
174
175         Speculative build fix for iOS.
176
177         * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
178         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
179         (WebKit::WebMemoryPressureHandler::shared):
180         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
181         * WebKit2.xcodeproj/project.pbxproj:
182         Make WebMemoryPressureHandlerIOS Obj-C.
183
184 2014-05-13  Anders Carlsson  <andersca@apple.com>
185
186         Another follow-up build fix.
187
188         * Shared/API/Cocoa/WKFoundation.h:
189
190 2014-05-13  Anders Carlsson  <andersca@apple.com>
191
192         Another follow-up build fix.
193
194         * Shared/API/Cocoa/WKFoundation.h:
195
196 2014-05-13  Anders Carlsson  <andersca@apple.com>
197
198         Follow-up fix.
199
200         * UIProcess/API/Cocoa/WKNavigationAction.mm:
201         (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
202         (-[WKNavigationAction _isUserInitiated]):
203
204 2014-05-13  Anders Carlsson  <andersca@apple.com>
205
206         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
207         https://bugs.webkit.org/show_bug.cgi?id=132880
208         <rdar://problem/16901354>
209
210         Reviewed by Dan Bernstein.
211
212         * Shared/API/Cocoa/WKFoundation.h:
213         Add typedef for older systems.
214
215         * UIProcess/API/Cocoa/WKNavigationAction.h:
216         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
217
218         * UIProcess/API/Cocoa/WKNavigationAction.mm:
219         (toWKNavigationType):
220         This can be static now.
221
222         (toNSEventModifierFlags):
223         Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
224
225         (toNSButtonNumber):
226         Helper to convert WebMouseEvent::Button to an AppKit button number.
227
228         (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
229         New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
230
231         (-[WKNavigationAction _isUserInitiated]):
232         Return the new ivar.
233
234         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
235         Remove readwrite overrides.
236
237         * UIProcess/Cocoa/NavigationState.mm:
238         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
239         Use initWithNavigationActionData:
240
241         * UIProcess/Cocoa/UIDelegate.mm:
242         (WebKit::UIDelegate::UIClient::createNewPage):
243         Use initWithNavigationActionData:
244
245 2014-05-13  Tim Horton  <timothy_horton@apple.com>
246
247         WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
248         https://bugs.webkit.org/show_bug.cgi?id=127788
249         <rdar://problem/15928241>
250
251         Reviewed by Anders Carlsson.
252
253         Allow JPEG snapshots. Compression is done asynchronously.
254         Enable JPEG snapshots (for now) on all PLATFORM(MAC).
255         We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
256
257         * UIProcess/API/Cocoa/WKWebView.mm:
258         * UIProcess/API/mac/WKView.mm:
259         (-[WKView _takeViewSnapshot]):
260         Store the image size on the ViewSnapshot.
261         Move IOSurface-related code to ViewSnapshotStore.
262
263         * UIProcess/ios/ViewGestureControllerIOS.mm:
264         (WebKit::ViewGestureController::beginSwipeGesture):
265         Adopt asLayerContents().
266
267         * UIProcess/mac/ViewGestureController.h:
268         * UIProcess/mac/ViewGestureControllerMac.mm:
269         (WebKit::ViewGestureController::retrieveSnapshotForItem):
270         (WebKit::ViewGestureController::beginSwipeGesture):
271         (WebKit::ViewGestureController::removeSwipeSnapshot):
272         Adopt asLayerContents().
273         Put the snapshot on the right layer (the parent of the snapshot image layer);
274         if it's on the snapshot image layer itself, if there is no image, the shadow
275         is displayed on top of the white placeholder.
276         Only reset snapshot purgeability if we're using IOSurface snapshots.
277
278         * UIProcess/mac/ViewSnapshotStore.h:
279         Add a bunch of macros to allow us to switch the snapshot backing store implementation.
280
281         * UIProcess/mac/ViewSnapshotStore.mm:
282         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
283         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
284         (WebKit::ViewSnapshotStore::recordSnapshot):
285         If takeViewSnapshot() fails, don't remove the existing snapshot.
286
287         (WebKit::createIOSurfaceFromImage):
288         (WebKit::compressImageAsJPEG):
289         (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
290         (WebKit::ViewSnapshotStore::didCompressSnapshot):
291         (WebKit::ViewSnapshot::clearImage):
292         (WebKit::ViewSnapshot::asLayerContents):
293         Asynchronously compress snapshots - if we're using JPEG snapshots - for a
294         very large memory win (~20-30x).
295
296 2014-05-12  Darin Adler  <darin@apple.com>
297
298         Make a few icon database improvements
299         https://bugs.webkit.org/show_bug.cgi?id=132812
300
301         Reviewed by Brady Eidson.
302
303         * UIProcess/API/C/WKIconDatabase.cpp:
304         (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
305         out of the bindings into the WebIconDatabase class.
306
307         * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
308
309         * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
310         (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
311         (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
312         (WebKit::WebIconDatabase::invalidate): Use nullptr.
313         (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
314         (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
315         (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
316         (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
317         (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
318         (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
319         WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
320         another copy of the data for each icon.
321
322         * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
323         IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
324         function. Use a reference for the constructor argument. Use override for
325         virtual functions. Use unique_ptr instead of OwnPtr.
326
327 2014-05-12  Mark Lam  <mark.lam@apple.com>
328
329         WebKit2 on iOS needs to capture the main thread's floating point environment.
330         <https://webkit.org/b/132755>
331
332         Reviewed by Geoffrey Garen.
333
334         * Shared/mac/ChildProcessMac.mm:
335         (WebKit::ChildProcess::platformInitialize):
336         - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
337           the ARMv7 FP env to support denormalized numbers.
338         - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
339           fp env.
340
341 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
342
343         [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest 
344         https://bugs.webkit.org/show_bug.cgi?id=132817
345
346         Reviewed by Dirk Schulze.
347
348         To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
349         Besides this patch adds test html page for ewk_view_navigation unit test.
350
351         * UIProcess/API/efl/tests/resources/Page1.html: Added.
352         * UIProcess/API/efl/tests/resources/Page2.html: Added.
353         * UIProcess/API/efl/tests/resources/Page3.html: Added.
354         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
355         (TEST_F):
356
357 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
358
359         Unreviewed, EFL build fix since r168625.
360
361         * UIProcess/efl/WebContextEfl.cpp:
362         (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
363
364 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
365
366         [iOS WK2] Fuzzy tiles on some sites on loading
367         https://bugs.webkit.org/show_bug.cgi?id=132847
368         <rdar://problem/16816178>
369
370         Reviewed by Benjamin Poulain.
371         
372         PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
373         causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
374         scale wrong. Fix by overriding contentsScale() also.
375
376         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
377         (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
378         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
379
380 2014-05-12  Tim Horton  <timothy_horton@apple.com>
381
382         Triple-buffer RemoteLayerBackingStore
383         https://bugs.webkit.org/show_bug.cgi?id=132786
384         <rdar://problem/16877498>
385
386         Reviewed by Simon Fraser.
387
388         We need three buffers because we're currently unable to synchronize
389         with the render server to swap when they're not in use, so we were
390         throwing surfaces away far too frequently.
391
392         This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
393
394         * Shared/mac/RemoteLayerBackingStore.h:
395         (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
396         (WebKit::RemoteLayerBackingStore::volatility): Deleted.
397         * Shared/mac/RemoteLayerBackingStore.mm:
398         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
399         (WebKit::RemoteLayerBackingStore::clearBackingStore):
400         (WebKit::RemoteLayerBackingStore::encode):
401         (WebKit::RemoteLayerBackingStore::decode):
402         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
403         (WebKit::RemoteLayerBackingStore::display):
404         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
405         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
406         (WebKit::RemoteLayerBackingStore::Buffer::discard):
407         (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
408         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
409         (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
410         Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
411         Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
412         We keep a volatility bit because querying IOSurface purgeability is expensive,
413         and we have a guarantee that any changes will happen in the Web process
414         and go through this class (the lack of this guarantee in most cases is why I'm not
415         putting this bit in WebCore::IOSurface itself).
416
417         Make it so that each buffer's volatility can be adjusted individually
418         by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
419
420         Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
421         before swapping front and back if the back buffer (soon to be the front buffer)
422         is still in use by the render server. This means that we will almost never
423         have to throw away a surface because it's in use (and conversely never need
424         to make a new surface).
425
426         Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
427         more aggressively than others.
428
429 2014-05-12  Alexey Proskuryakov  <ap@apple.com>
430
431         REGRESSION (r165972): Can't type into text fields in Flash
432         https://bugs.webkit.org/show_bug.cgi?id=132840
433         <rdar://problem/16671969>
434
435         Reviewed by Anders Carlsson.
436
437         * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
438         got accidentally lost when adding async text input code.
439
440 2014-05-12  Chris Fleizach  <cfleizach@apple.com>
441
442         AX: .js dialogs shown in unload while AX is running crash WebKit.
443         https://bugs.webkit.org/show_bug.cgi?id=123828
444
445         Reviewed by Anders Carlsson.
446
447         Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
448         This allows us to avoid having special behavior for accessibility when the WebProcess needs
449         to wait on a reply.
450
451         * Platform/IPC/Connection.cpp:
452         (IPC::Connection::waitForSyncReply):
453         * Platform/IPC/Connection.h:
454         * Platform/IPC/mac/ConnectionMac.cpp:
455         (IPC::Connection::willSendSyncMessage):
456         (IPC::Connection::didReceiveSyncReply):
457         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
458         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
459         (WebKit::WebChromeClient::runJavaScriptAlert):
460         (WebKit::WebChromeClient::runJavaScriptConfirm):
461         (WebKit::WebChromeClient::runJavaScriptPrompt):
462         (WebKit::WebChromeClient::print):
463         (WebKit::WebChromeClient::exceededDatabaseQuota):
464         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
465         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
466
467 2014-05-12  Alex Christensen  <achristensen@webkit.org>
468
469         Progress on web timing.
470         https://bugs.webkit.org/show_bug.cgi?id=132574
471
472         Reviewed by Alexey Proskuryakov.
473
474         * Shared/WebCoreArgumentCoders.cpp:
475         (IPC::ArgumentCoder<ResourceResponse>::encode):
476         (IPC::ArgumentCoder<ResourceResponse>::decode):
477         Transfer ResourceLoadTiming values if they exist.
478
479 2014-05-12  Dan Bernstein  <mitz@apple.com>
480
481         [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
482         https://bugs.webkit.org/show_bug.cgi?id=132836
483
484         Reviewed by Anders Carlsson.
485
486         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
487         (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
488         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
489
490 2014-05-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
491
492         REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
493         https://bugs.webkit.org/show_bug.cgi?id=132831
494
495         Unreviewed GTK build fix.
496
497         * UIProcess/gtk/WebContextGtk.cpp:
498         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
499         This is now a static member function.
500
501 2014-05-12  Anders Carlsson  <andersca@apple.com>
502
503         WKWebViewConfiguration should fill in the blanks
504         https://bugs.webkit.org/show_bug.cgi?id=132832
505         <rdar://problem/16886408>
506
507         Reviewed by Dan Bernstein.
508
509         * UIProcess/API/Cocoa/WKWebView.mm:
510         (-[WKWebView initWithFrame:configuration:]):
511         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
512         (-[WKWebViewConfiguration init]):
513         (-[WKWebViewConfiguration _validate]):
514         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
515
516 2014-05-12  Anders Carlsson  <andersca@apple.com>
517
518         WKWebView should default to _backgroundExtendsBeyondPage = YES
519         https://bugs.webkit.org/show_bug.cgi?id=132829
520         <rdar://problem/16886364>
521
522         Reviewed by Beth Dakin.
523
524         * UIProcess/API/Cocoa/WKWebView.mm:
525         (-[WKWebView initWithFrame:configuration:]):
526
527 2014-05-12  Anders Carlsson  <andersca@apple.com>
528
529         Pass local storage directory to StorageManager::create
530         https://bugs.webkit.org/show_bug.cgi?id=132827
531
532         Reviewed by Tim Horton.
533
534         Since we know the local storage directory at creation time and we know it never changes,
535         we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
536
537         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
538         (WebKit::LocalStorageDatabaseTracker::create):
539         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
540         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
541         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
542         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
543         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
544         * UIProcess/Storage/StorageManager.cpp:
545         (WebKit::StorageManager::create):
546         (WebKit::StorageManager::StorageManager):
547         (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
548         * UIProcess/Storage/StorageManager.h:
549         * UIProcess/WebContext.cpp:
550         (WebKit::WebContext::WebContext):
551
552 2014-05-11  Anders Carlsson  <andersca@apple.com>
553
554         Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
555         https://bugs.webkit.org/show_bug.cgi?id=132809
556
557         Reviewed by Dan Bernstein.
558
559         * UIProcess/API/C/WKContext.cpp:
560         (WKContextSetLocalStorageDirectory): Deleted.
561
562         * UIProcess/API/C/WKContextConfigurationRef.cpp:
563         (WKContextConfigurationCopyLocalStorageDirectory):
564         (WKContextConfigurationSetLocalStorageDirectory):
565         * UIProcess/API/C/WKContextConfigurationRef.h:
566         Add getters and setters for the local storage directory.
567
568         * UIProcess/API/C/WKContextPrivate.h:
569         Remove WKContextSetLocalStorageDirectory.
570
571         * UIProcess/API/Cocoa/WKProcessGroup.mm:
572         (-[WKProcessGroup initWithInjectedBundleURL:]):
573         Call WebContext::applyPlatformSpecificConfigurationDefaults.
574
575         * UIProcess/API/Cocoa/WKProcessPool.mm:
576         (-[WKProcessPool _initWithConfiguration:]):
577         Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
578
579         * UIProcess/APIContextConfiguration.cpp:
580         (API::ContextConfiguration::webContextConfiguration):
581         Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
582
583         * UIProcess/APIContextConfiguration.h:
584         (API::ContextConfiguration::injectedBundlePath):
585         This should be const.
586
587         (API::ContextConfiguration::localStorageDirectory):
588         (API::ContextConfiguration::setLocalStorageDirectory):
589         Add getter and setter.
590
591         * UIProcess/Storage/StorageManager.cpp:
592         (WebKit::StorageManager::setLocalStorageDirectory):
593         ASSERT that the path isn't null.
594
595         * UIProcess/WebContext.cpp:
596         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
597         New helper function that will fill in platform specific defaults for empty parameters.
598
599         (WebKit::WebContext::WebContext):
600         Get the local storage directory from the configuration.
601
602         (WebKit::WebContext::setLocalStorageDirectory): Deleted.
603         (WebKit::WebContext::localStorageDirectory): Deleted.
604         These are no longer needed.
605
606         * UIProcess/mac/WebContextMac.mm:
607         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
608         This should be a static member function.
609
610 2014-05-12  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
611
612         Typo fix in generate-forwarding-headers
613         https://bugs.webkit.org/show_bug.cgi?id=132820
614
615         Reviewed by Anders Carlsson.
616
617         * Scripts/generate-forwarding-headers.pl:
618         (collectFrameworkHeaderPaths):
619         
620 2014-05-12  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
621
622         [EFL] TLSErrors do not cause page load to fail when not ignored
623         https://bugs.webkit.org/show_bug.cgi?id=131104
624
625         Reviewed by Gyuyoung Kim.
626
627         Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
628
629         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
630
631 2014-05-11  Gordon Sheridan  <gordon_sheridan@apple.com>
632
633         Expose a function to copy favicon data without image conversion.
634         https://bugs.webkit.org/show_bug.cgi?id=132805
635
636         Reviewed by Darin Adler.
637
638         * UIProcess/API/C/WKIconDatabase.cpp:
639         (WKIconDatabaseCopyIconDataForPageURL):
640         Add a function to copy the data from the image of a favicon for an associated page url.
641
642         * UIProcess/API/C/WKIconDatabase.h:
643         Declare WKIconDatabaseCopyIconDataForPageURL.
644
645 2014-05-11  Seongjun Kim  <isAir@company100.com>
646
647         REGRESSION(r168603): [GTK] Build broken.
648         https://bugs.webkit.org/show_bug.cgi?id=132810
649
650         Reviewed by Carlos Garcia Campos.
651
652         * UIProcess/API/gtk/WebKitWebContext.cpp:
653         (createDefaultWebContext):
654         Construct a WebContextConfiguration object and pass it to WebContext::create.
655
656 2014-05-11  Anders Carlsson  <andersca@apple.com>
657
658         Remove local storage directory and sandbox extension from WebProcessCreationParameters
659         https://bugs.webkit.org/show_bug.cgi?id=132808
660
661         Reviewed by Beth Dakin.
662
663         * Shared/WebProcessCreationParameters.cpp:
664         (WebKit::WebProcessCreationParameters::encode):
665         (WebKit::WebProcessCreationParameters::decode):
666         * Shared/WebProcessCreationParameters.h:
667         * UIProcess/WebContext.cpp:
668         (WebKit::WebContext::createNewWebProcess):
669         * WebProcess/cocoa/WebProcessCocoa.mm:
670         (WebKit::WebProcess::platformInitializeWebProcess):
671
672 2014-05-11  Jaehun Lim  <ljaehun.lim@samsung.com>
673
674         Unreviewed, CMake build fix after r168603
675
676         Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
677
678         * CMakeLists.txt:
679
680 2014-05-11  Anders Carlsson  <andersca@apple.com>
681
682         Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
683         https://bugs.webkit.org/show_bug.cgi?id=132806
684         <rdar://problem/16830143>
685
686         Reviewed by Beth Dakin.
687
688         Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
689         configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
690         as a configuration property. More setters will follow.
691
692         * Shared/API/c/WKBase.h:
693         Add WKContextConfigurationRef.
694
695         * Shared/APIObject.h:
696         Add ContextConfiguration enum declaration.
697
698         * UIProcess/API/C/WKAPICast.h:
699         Handle WKContextConfigurationRef.
700
701         * UIProcess/API/C/WKContext.cpp:
702         (WKContextCreate):
703         Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
704
705         (WKContextCreateWithInjectedBundlePath):
706         Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
707
708         (WKContextCreateWithConfiguration):
709         Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
710
711         * UIProcess/API/C/WKContext.h:
712         Add WKContextCreateWithConfiguration.
713
714         * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
715         (WKContextConfigurationCreate):
716         Create an API::ContextConfiguration object.
717
718         (WKContextConfigurationCopyInjectedBundlePath):
719         Return the injected bundle path.
720
721         (WKContextConfigurationSetInjectedBundlePath):
722         Set the injected bundle path.
723
724         * UIProcess/API/C/WKContextConfigurationRef.h: Added.
725         New C SPI header.
726         
727         * UIProcess/API/Cocoa/WKProcessGroup.mm:
728         (-[WKProcessGroup initWithInjectedBundleURL:]):
729         Construct a WebContextConfiguration object and pass it to WebContext::Create.
730     
731         * UIProcess/API/Cocoa/WKProcessPool.mm:
732         (-[WKProcessPool _initWithConfiguration:]):
733         Construct a WebContextConfiguration object and pass it to WebContext::Create.
734
735         * UIProcess/APIContextConfiguration.cpp: Added.
736         New API::ContextConfiguration object.
737
738         (API::ContextConfiguration::webContextConfiguration):
739         Construct a WebContextConfiguration struct from our current configuration.
740
741         * UIProcess/APIContextConfiguration.h: Added.
742         
743         * UIProcess/WebContext.cpp:
744         (WebKit::WebContext::create):
745         Pass the WebContextConfiguration to the constructor.
746
747         (WebKit::WebContext::WebContext):
748         Set the injected bundle path from the WebContextConfiguration object.
749
750         * UIProcess/WebContext.h:
751         Change the WebContext constructor and create function to take a WebContextConfiguration object.
752
753         * WebKit2.xcodeproj/project.pbxproj:
754         Add new files.
755
756 2014-05-10  Csaba Osztrogonác  <ossy@webkit.org>
757
758         [WK2] URTBF after r168585.
759
760         * Platform/IPC/Connection.h:
761         * Shared/ChildProcessProxy.cpp:
762         (WebKit::ChildProcessProxy::terminate):
763
764 2014-05-10  Tim Horton  <timothy_horton@apple.com>
765
766         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
767         https://bugs.webkit.org/show_bug.cgi?id=132793
768         <rdar://problem/16877870>
769
770         Reviewed by Dan Bernstein.
771
772         * UIProcess/API/Cocoa/WKWebView.mm:
773         (-[WKWebView _updateScrollViewBackground]):
774         Don't bypass the cache and make a copy of the CGColor just to set its alpha.
775         Cache the last color and don't bother creating a UIColor nor updating the
776         color on our views if it hasn't changed.
777
778 2014-05-10  Tim Horton  <timothy_horton@apple.com>
779
780         Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
781         https://bugs.webkit.org/show_bug.cgi?id=132790
782         <rdar://problem/16877802>
783
784         Reviewed by Dan Bernstein.
785
786         * UIProcess/ios/WKScrollView.mm:
787         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
788         If only one of the delegates will respond to a selector,
789         we can return it from forwardingTargetForSelector: to avoid
790         NSInvocation overhead.
791
792 2014-05-10  Dan Bernstein  <mitz@apple.com>
793
794         [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
795         https://bugs.webkit.org/show_bug.cgi?id=132776
796
797         Reviewed by Darin Adler.
798
799         * WebKit2.xcodeproj/project.pbxproj:
800
801 2014-05-10  Ryuan Choi  <ryuan.choi@samsung.com>
802
803         [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
804         https://bugs.webkit.org/show_bug.cgi?id=132771
805
806         Reviewed by Gyuyoung Kim.
807
808         Moved ownership of EwkSettings from EwkView to EwkPageGroup.
809
810         * UIProcess/API/efl/EwkView.cpp:
811         (EwkView::EwkView):
812         * UIProcess/API/efl/EwkView.h:
813         (EwkView::settings): Deleted.
814         * UIProcess/API/efl/ewk_page_group.cpp:
815         (EwkPageGroup::EwkPageGroup):
816         * UIProcess/API/efl/ewk_page_group_private.h:
817         (EwkPageGroup::settings):
818         * UIProcess/API/efl/ewk_settings_private.h:
819         * UIProcess/API/efl/ewk_view.cpp:
820         (ewk_view_settings_get):
821
822 2014-05-10  Tim Horton  <timothy_horton@apple.com>
823
824         [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
825         https://bugs.webkit.org/show_bug.cgi?id=132783
826         <rdar://problem/16877326>
827
828         Reviewed by Anders Carlsson.
829
830         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
831         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
832         There's a race window between the BackingStoreFlusher sending the new
833         layer tree to the UI process and updating m_hasFlushed where we can
834         get a reply back in (on the Web process main thread) from the UI process
835         that we committed the new layer tree (didUpdate).
836         This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
837         Since the RELEASE_ASSERT is there only to avoid painting garbage, move
838         our code to set m_hasFlushed=true to after we finish calling CGContextFlush
839         on all of the contexts, instead of after we send the layer tree commit message,
840         which will remove the race entirely.
841
842 2014-05-10  Anders Carlsson  <andersca@apple.com>
843
844         ASSERTION FAILED: !m_connection under RunJavaScriptAlert
845         https://bugs.webkit.org/show_bug.cgi?id=132792
846         <rdar://problem/16691138>
847
848         Reviewed by Dan Bernstein.
849
850         Detect if someone implementing a UI delegate method with a completion handler never calls the completion
851         handler and raise an exception instead of asserting.
852
853         * UIProcess/Cocoa/UIDelegate.mm:
854         (WebKit::CompletionHandlerCallChecker::create):
855         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
856         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
857         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
858         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
859         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
860         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
861         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
862
863 2014-05-10  Anders Carlsson  <andersca@apple.com>
864
865         Use xpc_connection_kill for killing child processes where appropriate
866         https://bugs.webkit.org/show_bug.cgi?id=132788
867         <rdar://problem/16664185>
868
869         Reviewed by Sam Weinig.
870
871         * Platform/IPC/Connection.h:
872         * Platform/IPC/mac/ConnectionMac.mm:
873         (IPC::Connection::kill):
874         * Platform/IPC/mac/XPCPtr.h:
875         (IPC::XPCPtr::operator bool):
876         * Shared/ChildProcessProxy.cpp:
877         (WebKit::ChildProcessProxy::terminate):
878
879 2014-05-10  Anders Carlsson  <andersca@apple.com>
880
881         WebKit2 is leaking an xpc_connection per web process it creates
882         https://bugs.webkit.org/show_bug.cgi?id=132785
883         <rdar://problem/14912160>
884
885         Reviewed by Sam Weinig.
886
887         Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
888
889         Make sure we always adopt any connections that are created.
890
891         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
892         (DatabaseServiceInitializer):
893         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
894         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
895         (NetworkServiceInitializer):
896         * Platform/IPC/Connection.h:
897         (IPC::Connection::Identifier::Identifier):
898         (IPC::Connection::xpcConnection):
899         * Platform/IPC/mac/ConnectionMac.mm:
900         (IPC::Connection::platformInvalidate):
901         (IPC::Connection::platformInitialize):
902         (IPC::Connection::getAuditToken):
903         * Platform/IPC/mac/XPCPtr.h: Added.
904         (IPC::XPCPtr::XPCPtr):
905         (IPC::XPCPtr::~XPCPtr):
906         (IPC::XPCPtr::get):
907         (IPC::XPCPtr::operator!):
908         (IPC::XPCPtr::operator=):
909         (IPC::adoptXPC):
910         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
911         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
912         (PluginServiceInitializer):
913         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
914         (WebKit::BootstrapMain):
915         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
916         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
917         (WebKit::XPCServiceInitializer):
918         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
919         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
920         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
921         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
922         (WebKit::XPCServiceEventHandler):
923         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
924         (WebKit::XPCServiceEventHandler):
925         * UIProcess/Launcher/ProcessLauncher.cpp:
926         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
927         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
928         (WebKit::connectToService):
929         * WebKit2.xcodeproj/project.pbxproj:
930         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
931         (WebContentServiceInitializer):
932
933 2014-05-10  Anders Carlsson  <andersca@apple.com>
934
935         Simplify createDataAvailableSource
936         https://bugs.webkit.org/show_bug.cgi?id=132782
937         <rdar://problem/16815202>
938
939         Reviewed by Sam Weinig.
940
941         * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
942         Rename to make this Objective-C++ so we get the lambda-to-block conversion.
943
944         (IPC::createDataAvailableSource):
945         Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
946
947         (IPC::Connection::open):
948         Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
949
950         * WebKit2.xcodeproj/project.pbxproj:
951         Update for ConnectionMac.cpp to ConnectionMac.mm rename.
952
953 2014-05-10  Anders Carlsson  <andersca@apple.com>
954
955         Follow-up fix.
956
957         Reviewed by Darin Adler.
958
959         * UIProcess/API/Cocoa/WKNavigationResponse.h:
960         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
961         (-[WKNavigationResponse isForMainFrame]):
962         Use a slightly better name.
963
964 2014-05-10  Anders Carlsson  <andersca@apple.com>
965
966         Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
967         https://bugs.webkit.org/show_bug.cgi?id=132781
968         <rdar://problem/16868319>
969
970         Reviewed by Darin Adler.
971
972         * UIProcess/API/Cocoa/WKNavigationResponse.h:
973         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
974         (-[WKNavigationResponse description]):
975         (-[WKNavigationResponse isMainFrameNavigation]):
976         (-[WKNavigationResponse _frame]):
977         (-[WKNavigationResponse frame]): Deleted.
978         (-[WKNavigationResponse setFrame:]): Deleted.
979         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
980         * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
981         * UIProcess/Cocoa/NavigationState.mm:
982         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
983         * WebKit2.xcodeproj/project.pbxproj:
984
985 2014-05-09  Dan Bernstein  <mitz@apple.com>
986
987         [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
988         https://bugs.webkit.org/show_bug.cgi?id=132769
989
990         Reviewed by Sam Weinig.
991
992         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
993         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
994
995 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
996
997         [iOS][WK2] Fix bugs exposed by r168556
998         https://bugs.webkit.org/show_bug.cgi?id=132768
999
1000         Reviewed by Ryosuke Niwa.
1001
1002         Fix two bugs exposed by r168556.
1003         1) We were only changing the page scale factor when the scale was not adjusted by live
1004            resize. The idea was that the scale would either be the same (responsive content)
1005            or that it would be defined by the next viewContentRectUpdate.
1006
1007            Now that we also send resize and scroll events, we must always update the scale since
1008            it affects some APIs observable from JavaScript (like scrolling bounds).
1009
1010         2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
1011            were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
1012            of target.
1013
1014         * WebProcess/WebPage/ios/WebPageIOS.mm:
1015         (WebKit::withinEpsilon):
1016         (WebKit::WebPage::dynamicViewportSizeUpdate):
1017
1018 2014-05-09  Ryuan Choi  <ryuan.choi@samsung.com>
1019
1020         [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
1021         https://bugs.webkit.org/show_bug.cgi?id=132767
1022
1023         Reviewed by Gyuyoung Kim.
1024
1025         IconDatabase should be closed explicitly.
1026
1027         * UIProcess/API/efl/ewk_favicon_database.cpp:
1028         (EwkFaviconDatabase::~EwkFaviconDatabase):
1029
1030 2014-05-09  Anders Carlsson  <andersca@apple.com>
1031
1032         Another build fix.
1033
1034         * mac/MigrateHeadersToWebKit2.make:
1035         Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
1036
1037 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
1038
1039         [iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
1040         https://bugs.webkit.org/show_bug.cgi?id=132765
1041
1042         Reviewed by Tim Horton.
1043
1044         Since WebCore does not update our scroll view on load, we need to do that ourself.
1045
1046         In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
1047         will always invoke the scrolling after didCommitLayerTree() (since r167916).
1048         Consequently, it is now safe again to reset the scroll position ourself on the first frame.
1049
1050         * UIProcess/API/Cocoa/WKWebView.mm:
1051         (-[WKWebView _didCommitLoadForMainFrame]):
1052         (-[WKWebView _didCommitLayerTree:WebKit::]):
1053         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1054         * UIProcess/ios/WKContentView.mm:
1055         (-[WKContentView _didCommitLoadForMainFrame]):
1056
1057 2014-05-09  Anders Carlsson  <andersca@apple.com>
1058
1059         Update availability macros
1060         https://bugs.webkit.org/show_bug.cgi?id=132763
1061         <rdar://problem/15311800>
1062
1063         Reviewed by Dan Bernstein.
1064
1065         * Configurations/WebKit.xcconfig:
1066         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
1067         * Shared/API/Cocoa/WKFoundation.h:
1068         * Shared/API/Cocoa/_WKFrameHandle.h:
1069         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1070         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
1071         * UIProcess/API/Cocoa/WKBackForwardList.h:
1072         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1073         * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
1074         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
1075         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1076         * UIProcess/API/Cocoa/WKConnection.h:
1077         * UIProcess/API/Cocoa/WKFrameInfo.h:
1078         * UIProcess/API/Cocoa/WKNavigation.h:
1079         * UIProcess/API/Cocoa/WKNavigationAction.h:
1080         (NS_ENUM):
1081         * UIProcess/API/Cocoa/WKNavigationData.h:
1082         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1083         (NS_ENUM):
1084         * UIProcess/API/Cocoa/WKNavigationResponse.h:
1085         * UIProcess/API/Cocoa/WKPreferences.h:
1086         * UIProcess/API/Cocoa/WKProcessGroup.h:
1087         * UIProcess/API/Cocoa/WKProcessPool.h:
1088         * UIProcess/API/Cocoa/WKScriptMessage.h:
1089         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
1090         * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
1091         * UIProcess/API/Cocoa/WKUIDelegate.h:
1092         * UIProcess/API/Cocoa/WKUserContentController.h:
1093         * UIProcess/API/Cocoa/WKWebView.h:
1094         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1095         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1096         (NS_OPTIONS):
1097         (NS_ENUM):
1098         * UIProcess/API/Cocoa/WKWindowFeatures.h:
1099         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
1100         (NS_ENUM):
1101         * UIProcess/API/Cocoa/_WKDownload.h:
1102         * UIProcess/API/Cocoa/_WKElementAction.h:
1103         (NS_ENUM):
1104         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1105         * UIProcess/API/Cocoa/_WKScriptWorld.h:
1106         * UIProcess/API/Cocoa/_WKThumbnailView.h:
1107         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
1108         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1109         * WebKit2.xcodeproj/project.pbxproj:
1110         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1111         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
1112         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
1113         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
1114         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
1115         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
1116         * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
1117         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
1118         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
1119         * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
1120         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
1121         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
1122         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
1123         * mac/rewrite-availability-macros.sh: Added.
1124
1125 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
1126
1127         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
1128         https://bugs.webkit.org/show_bug.cgi?id=132409
1129
1130         Reviewed by Timothy Hatcher.
1131
1132         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1133         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1134         (WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
1135         pid per debuggable is no longer needed.
1136
1137         * WebProcess/WebProcess.cpp:
1138         (WebKit::WebProcess::initializeWebProcess):
1139         Immediately pass the parent process pid and audit_token on
1140         to the RemoteInspector singleton when the process is created
1141         so that it can be sent to webinspectord.
1142
1143 2014-05-09  Enrica Casucci  <enrica@apple.com>
1144
1145         REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
1146         https://bugs.webkit.org/show_bug.cgi?id=132761
1147         <rdar://problem/16857491>
1148
1149         Reviewed by Benjamin Poulain.
1150
1151         The interactionAssistant accessor should never create an instance of
1152         UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
1153         The text interaction assistant should only be created when needed so that the rest of
1154         the code could reliably check if we are interacting with text or not.
1155
1156         * UIProcess/ios/WKContentViewInteraction.mm:
1157         (-[WKContentView interactionAssistant]):
1158
1159 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
1160
1161         Fix some issues with scrolling tree logging
1162         https://bugs.webkit.org/show_bug.cgi?id=132762
1163
1164         Reviewed by Tim Horton.
1165         
1166         Only dump viewport constraints when they change, and dump the primary layer on
1167         scrolling nodes.
1168         
1169         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1170         (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
1171
1172 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
1173
1174         [iOS WK2] Fixed elements can go outside the document on pinching
1175         https://bugs.webkit.org/show_bug.cgi?id=132759
1176         <rdar://problem/16870835>
1177
1178         Reviewed by Benjamin Poulain.
1179         
1180         Constrain the rect used to position fixed position objects when pinching (when
1181         the scale goes below the minimumScale). Do so in such a way that there's a smooth
1182         transition between rubber-banding and pinching.
1183
1184         * UIProcess/API/Cocoa/WKWebView.mm:
1185         (-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
1186         (-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
1187         * UIProcess/API/ios/WKViewIOS.mm:
1188         (-[WKView _updateVisibleContentRects]): Ditto.
1189         * UIProcess/ios/WKContentView.h:
1190         * UIProcess/ios/WKContentView.mm:
1191         (adjustedUnexposedEdge): Helper to adjust the left/top.
1192         (adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
1193         (fixedPositionRectFromExposedRect):
1194         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
1195         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
1196
1197 2014-05-09  Zalan Bujtas  <zalan@apple.com>
1198
1199         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
1200         https://bugs.webkit.org/show_bug.cgi?id=132750
1201         <rdar://problem/16803281>
1202
1203         Reviewed by Simon Fraser.
1204
1205         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
1206         
1207         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
1208         different from the backingstore when the passed value is fractional.
1209         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
1210         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
1211
1212         Currently not testable.
1213
1214         * Shared/mac/RemoteLayerBackingStore.h:
1215         (WebKit::RemoteLayerBackingStore::size):
1216         * Shared/mac/RemoteLayerBackingStore.mm:
1217         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
1218         (WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
1219         (WebKit::RemoteLayerBackingStore::display):
1220         (WebKit::RemoteLayerBackingStore::drawInContext):
1221         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1222         (WebKit::PlatformCALayerRemote::updateBackingStore):
1223
1224 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
1225
1226         [iOS][WK2] Set up the resize events
1227         https://bugs.webkit.org/show_bug.cgi?id=132726
1228
1229         Reviewed by Darin Adler and Simon Fraser.
1230
1231         Wire the UI Process updates to FrameView to send the resize events appropriately.
1232
1233         * Shared/VisibleContentRectUpdateInfo.cpp:
1234         (WebKit::VisibleContentRectUpdateInfo::encode):
1235         (WebKit::VisibleContentRectUpdateInfo::decode):
1236         * Shared/VisibleContentRectUpdateInfo.h:
1237         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1238         (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
1239         * UIProcess/API/Cocoa/WKWebView.mm:
1240         (-[WKWebView _updateVisibleContentRects]):
1241         * UIProcess/ios/WKContentView.h:
1242         * UIProcess/ios/WKContentView.mm:
1243         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
1244         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
1245         Pass down the status of the content insets with the view update to main frame's FrameView
1246         when needed.
1247
1248         * WebProcess/WebPage/ios/WebPageIOS.mm:
1249         (WebKit::WebPage::dynamicViewportSizeUpdate):
1250         On live resize, send the resize event, then the scroll events (if needed).
1251
1252         Since JavaScript now gets two chances to change the content (resize event + scroll event),
1253         we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
1254
1255         (WebKit::WebPage::viewportConfigurationChanged):
1256         Define the custom size on load before the app gets a chance to send different rects.
1257         If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
1258
1259         (WebKit::WebPage::updateVisibleContentRects):
1260         Send the resize event when the insets are stable.
1261         Also move the scroll event after the resize event for consistency with live resize.
1262
1263 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
1264
1265         [iOS] Switch geolocation to an explicit authorization query model
1266         https://bugs.webkit.org/show_bug.cgi?id=132717
1267
1268         Reviewed by Sam Weinig.
1269
1270         Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
1271
1272         On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
1273
1274         Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
1275         the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
1276
1277         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1278         (-[WKGeolocationProviderIOS _stopUpdating]):
1279         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
1280         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
1281         (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
1282         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
1283         (-[WKWebAllowDenyPolicyListener deny]):
1284         (-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
1285         (-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
1286         (-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
1287         (-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
1288         (-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
1289
1290 2014-05-09  Gordon Sheridan  <gordon_sheridan@apple.com>
1291
1292         Expose functions necessary for copying favicon between IconDatabases.
1293         https://bugs.webkit.org/show_bug.cgi?id=132709
1294
1295         Reviewed by Brady Eidson.
1296
1297         * UIProcess/API/C/WKIconDatabase.cpp:
1298         (WKIconDatabaseSetIconURLForPageURL):
1299         Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
1300
1301         (WKIconDatabaseCopyIconURLForPageURL):
1302         Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
1303
1304         * UIProcess/API/C/WKIconDatabase.h:
1305         Added declarations for wrapper functions above.
1306
1307 2014-05-09  Tim Horton  <timothy_horton@apple.com>
1308
1309         Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
1310
1311         * UIProcess/API/Cocoa/WKPreferences.h:
1312
1313 2014-05-09  Brent Fulgham  <bfulgham@apple.com>
1314
1315         {TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
1316         https://bugs.webkit.org/show_bug.cgi?id=132746
1317         <rdar://problem/16789588>
1318
1319         Reviewed by Tim Horton.
1320
1321         Don't try to draw the detector UI if no part of the selection bounds are inside
1322         the current tile. Don't limit the detector UI to the bounds of this tile, or else
1323         it will attempt to squeeze itself into the possibly small space available. Let it
1324         draw as if it had the whole screen, and rely on the context clip region to
1325         avoid overdrawing.
1326
1327         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1328         (WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
1329         * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
1330         (WebKit::SelectionOverlayController::drawRect): Ditto.
1331
1332 2014-05-09  Anders Carlsson  <andersca@apple.com>
1333
1334         Production build fix.
1335
1336         Reviewed by Dan Bernstein.
1337
1338         * Configurations/BaseTarget.xcconfig:
1339         Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
1340
1341 2014-05-09  Tim Horton  <timothy_horton@apple.com>
1342
1343         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
1344         https://bugs.webkit.org/show_bug.cgi?id=132667
1345         <rdar://problem/15349483>
1346
1347         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1348         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
1349         Address a missed review comment about a missing std::move.
1350
1351 2014-05-09  Anders Carlsson  <andersca@apple.com>
1352
1353         Rename WebKit2.framework to WebKit.framework
1354         https://bugs.webkit.org/show_bug.cgi?id=132743
1355         <rdar://problem/15920046>
1356
1357         Reviewed by Dan Bernstein.
1358
1359         * Configurations/BaseLegacyProcess.xcconfig:
1360         Change INSTALL_PATH to WebKit.framework.
1361
1362         * Configurations/BaseTarget.xcconfig:
1363         Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
1364
1365         * Configurations/BaseXPCService.xcconfig:
1366         Change WebKit2.framework to WebKit.framework.
1367
1368         * Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
1369         New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
1370
1371         * Configurations/WebKit2.xcconfig:
1372         New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
1373
1374         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
1375         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
1376
1377         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1378         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
1379         
1380         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
1381         * Shared/API/Cocoa/WKRenderingProgressEvents.h:
1382         Update header imports.
1383
1384         * Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
1385         New umbrella header. Imports the modern WebKit API as well as the legacy API.
1386
1387         * Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
1388         Export install name symbols on iOS.
1389
1390         * Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
1391         New umbrella SPI header. Imports the modern WebKit SPI.
1392
1393         * Many headers:
1394         Change WebKit2 includes to WebKit includes.
1395
1396         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1397         (WebKit::XPCServiceEventHandler):
1398         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
1399
1400         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1401         (WebKit::XPCServiceEventHandler):
1402         Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
1403         
1404         * UIProcess/API/Cocoa/WKPreferences.h:
1405         Stop including WKPreferencesRef.h, we have a WebKit2 header that handles this workaround for us now.
1406
1407         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1408         (WebKit::addDYLDEnvironmentAdditions):
1409         (WebKit::connectToService):
1410         (WebKit::createProcess):
1411         (WebKit::ProcessLauncher::launchProcess):
1412         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
1413
1414         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1415         (WebKit::PluginProcessProxy::createPropertyListFile):
1416         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
1417
1418         * UIProcess/mac/WebContextMac.mm:
1419         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
1420         Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
1421         
1422         * WebKit2.xcodeproj/project.pbxproj:
1423         Copy the python message scripts to the WebKit2 framework.
1424         Rename WebKit2.framework to WebKit.framework everywhere.
1425         Add a new WebKit2 target that builds the shim WebKit2 framework.
1426         Move the build script phase that migrates WebKitLegacy headers to WebKit.
1427         Add a new build script phase that adds forwarding headers from WebKit2 to WebKit.
1428
1429         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
1430         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
1431
1432         * mac/MigrateHeadersFromWebKitLegacy.make: Renamed from Source/WebKit/mac/WebKitLegacy/MigrateHeadersFromWebKitLegacy.make.
1433         Move the makefile that migrates WebKitLegacy headers here. On OS X, it copies the header contents and on iOS it creates forarding headers.
1434
1435         * mac/MigrateHeadersToWebKit2.make:
1436         New makefile that creates forwarding headers for the WebKit2 shim framework.
1437
1438         * mac/WKPreferences.h: Added.
1439         Add WebKit2/WKPreferences.h header that imports WebKit2/WKPreferencesref.h.
1440
1441         * mac/WebKit2.m:
1442         Skeleton for the WebKit2 shim framework.
1443
1444         * mac/Info-WebKit2.plist: Added.
1445         New Info.plist file for the WebKit2 shim framework.
1446
1447 2014-05-09  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1448
1449         [WK2] Make generate-forwarding-headers.pl work after WebKit2.framework -> WebKit.framework rename
1450         https://bugs.webkit.org/show_bug.cgi?id=132733
1451
1452         Reviewed by Csaba Osztrogonác.
1453
1454         Rewrite framework's directory name to WebKit2 if the framework is WebKit (former WebKit2)
1455         and then collect headers inside the fixed framework directory and generate forwarding
1456         headers point to the fixed directory.
1457
1458         Leave WebKit2 in @frameworks list during the transition. It can be removed
1459         once <WebKit2/foo.h> style includes were renamed to <WebKit/foo.h> everywhere.
1460
1461         * Scripts/generate-forwarding-headers.pl:
1462         (collectFameworkHeaderPaths):
1463         (createForwardingHeadersForFramework):
1464
1465 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
1466
1467         Automatically zip document bundles used via File API
1468         https://bugs.webkit.org/show_bug.cgi?id=132713
1469         <rdar://problem/13397892>
1470
1471         Reviewed by Anders Carlsson.
1472
1473         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: NetworkProcess
1474         now uses FileCoordination (WebProcess already had this allowed).
1475
1476         * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added final to the class.
1477
1478 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
1479
1480         [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
1481         https://bugs.webkit.org/show_bug.cgi?id=132719
1482         <rdar://problem/16860837>
1483
1484         Reviewed by Benjamin Poulain.
1485         
1486         If we haven't received visible rects from the web process, compute the
1487         fixed position rect, but only after scale has been set.
1488
1489         * WebProcess/WebPage/ios/WebPageIOS.mm:
1490         (WebKit::WebPage::viewportConfigurationChanged):
1491
1492 2014-05-08  Jer Noble  <jer.noble@apple.com>
1493
1494         [Mac, iOS] Add source application accounting to AVURLAsset.
1495         https://bugs.webkit.org/show_bug.cgi?id=132637
1496
1497         Reviewed by Eric Carlson.
1498
1499         Add accessor for sourceApplicationIdentifier.
1500
1501         * NetworkProcess/RemoteNetworkingContext.h:
1502         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1503         (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
1504         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1505         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1506         (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
1507
1508 2014-05-08  Tim Horton  <timothy_horton@apple.com>
1509
1510         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
1511         ​https://bugs.webkit.org/show_bug.cgi?id=132667
1512         <rdar://problem/16861454>
1513
1514         Rubber-stamped by Simon Fraser.
1515
1516         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1517         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1518         Add a null check to fix a crash on layers which lose backing store.
1519
1520 2014-05-08  Beth Dakin  <bdakin@apple.com>
1521
1522         REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
1523         https://bugs.webkit.org/show_bug.cgi?id=132706
1524         -and corresponding-
1525         <rdar://problem/16787957>
1526
1527         Reviewed by Tim Horton.
1528
1529         We need to paint the boxes in Document coordinates. Range::boundingRect() was 
1530         giving us a point that took scroll position into account, and that’s not what we 
1531         want. Here we use Range::textQuads() instead so that we can get something in 
1532         Document coordinates, and then we need to convert that up to the main Document’s 
1533         coordinates.
1534         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1535         (WebKit::textQuadsToBoundingRectForRange):
1536         (WebKit::TelephoneNumberOverlayController::drawRect):
1537
1538         The telephone click function wants a point in Window coordinates.
1539         (WebKit::TelephoneNumberOverlayController::mouseEvent):
1540
1541 2014-05-08  Tim Horton  <timothy_horton@apple.com>
1542
1543         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
1544         https://bugs.webkit.org/show_bug.cgi?id=132667
1545         <rdar://problem/15349483>
1546
1547         Reviewed by Darin Adler.
1548
1549         * Shared/mac/RemoteLayerBackingStore.h:
1550         * Shared/mac/RemoteLayerBackingStore.mm:
1551         (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
1552         (WebKit::RemoteLayerBackingStore::flush): Deleted.
1553         Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
1554         and drops our reference to it. This needs to be called on all backing store between paints.
1555
1556         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1557         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
1558         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1559         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1560         (WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
1561         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1562         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
1563         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
1564         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
1565         (WebKit::flushBackingStoreChangesInTransaction): Deleted.
1566         Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
1567         We will only ever have a single commit in flight at a time, and there's a new
1568         RELEASE_ASSERT to ensure that is the case.
1569         We package up the commit on the main thread; the queue calls CGContextFlush
1570         on all of the newly painted contexts and then tosses the commit over to the UI process.
1571         This is a win in many cases because the Web process main thread can go ahead
1572         and do other non-painting tasks while the queue is blocked on painting.
1573
1574 2014-05-08  Tim Horton  <timothy_horton@apple.com>
1575
1576         [wk2] Don't use the XPC-based plugin process for Adobe Reader
1577         https://bugs.webkit.org/show_bug.cgi?id=132701
1578         <rdar://problem/16792692>
1579
1580         Reviewed by Anders Carlsson.
1581
1582         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1583         (WebKit::shouldUseXPC):
1584         Rename the debugging default to a more modern and accurate name.
1585         Don't use XPC for Adobe Reader.
1586
1587         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
1588         Move the check for plugins that need an executable heap into shouldUseXPC.
1589
1590 2014-05-08  Benjamin Poulain  <benjamin@webkit.org>
1591
1592         [iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
1593         https://bugs.webkit.org/show_bug.cgi?id=132660
1594
1595         Reviewed by Enrica Casucci.
1596
1597         This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
1598         until the last finger leaves the screen.
1599
1600         * UIProcess/WebPageProxy.cpp:
1601         (WebKit::WebPageProxy::handleTouchEventAsynchronously):
1602
1603 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
1604
1605         Make BlobDataFileReference manage its sandbox extension
1606         https://bugs.webkit.org/show_bug.cgi?id=132689
1607
1608         Reviewed by Anders Carlsson.
1609
1610         * CMakeLists.txt:
1611         * PlatformGTK.cmake:
1612         * WebKit2.xcodeproj/project.pbxproj:
1613         Added BlobDataFileReferenceWithSandboxExtension.
1614
1615         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1616         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
1617         (WebKit::NetworkBlobRegistry::registerBlobURL):
1618         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1619         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1620         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
1621         (WebKit::NetworkBlobRegistry::filesInBlob):
1622         (WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
1623         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1624         We no longer track sandbox extensions here. Instead, provide a way to get files
1625         for a blob, which contain extensions and can allow access to themselves.
1626
1627         * NetworkProcess/NetworkResourceLoader.cpp:
1628         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1629         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
1630         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
1631         * NetworkProcess/NetworkResourceLoader.h:
1632         Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
1633
1634         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
1635         (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
1636         (WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
1637         (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
1638         (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
1639         * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
1640         (WebKit::BlobDataFileReferenceWithSandboxExtension::create):
1641         A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
1642         always uses it in BlobRegistryImpl.
1643
1644         * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
1645         * WebProcess/FileAPI/BlobRegistryProxy.h:
1646         Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
1647         a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
1648         as BlobRegistryImpl.
1649
1650 2014-05-08  Brady Eidson  <beidson@apple.com>
1651
1652         "shouldKeepCurrentBackForwardListItemInList" API should pass clientInfo to the callback
1653         <rdar://problem/16855357> and https://bugs.webkit.org/show_bug.cgi?id=132692
1654
1655         Reviewed by Tim Horton.
1656
1657         * UIProcess/API/C/WKPage.cpp:
1658         (WKPageSetPageLoaderClient):
1659         * UIProcess/API/C/WKPageLoaderClient.h:
1660
1661 2014-05-08  Antti Koivisto  <antti@apple.com>
1662
1663         [iOS WebKit2] Can't activate text fields on Facebook
1664         https://bugs.webkit.org/show_bug.cgi?id=132682
1665
1666         Reviewed by Enrica Casucci.
1667
1668         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1669         (WebKit::WebChromeClient::observedContentChange):
1670         
1671             Implement content change observer callback.
1672
1673         * WebProcess/WebPage/WebPage.h:
1674         * WebProcess/WebPage/ios/WebPageIOS.mm:
1675         (WebKit::WebPage::handleSyntheticClick):
1676         
1677             If the event gets canceled by a potential change (a started short-duration timer)
1678             save the position and node so we can continue later.
1679
1680         (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
1681         
1682             If it turns out the observed timer changed nothing continue the click event.
1683
1684         (WebKit::WebPage::completeSyntheticClick):
1685         
1686             Factored click event dispatch part of handleSyntheticClick here.
1687
1688 2014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1689
1690         [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
1691         https://bugs.webkit.org/show_bug.cgi?id=126022
1692
1693         Reviewed by Benjamin Poulain.
1694
1695         Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
1696
1697         When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
1698         with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
1699         and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
1700
1701         This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation.
1702
1703         * UIProcess/CoordinatedGraphics/WebView.cpp:
1704         (WebKit::WebView::didCommitLoadForMainFrame):
1705
1706 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
1707
1708         Put a better version of the assertion back, and add one when we ensureBackingStore.
1709
1710         Reviewed by Tim Horton.
1711
1712         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1713         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1714         (WebKit::PlatformCALayerRemote::ensureBackingStore):
1715
1716 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
1717
1718         This assertion was wrong and fired every time. Remove it.
1719
1720         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1721         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1722
1723 2014-05-07  Enrica Casucci  <enrica@apple.com>
1724
1725         WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
1726         https://bugs.webkit.org/show_bug.cgi?id=132657
1727         <rdar://problem/16468462>
1728
1729         Reviewed by Benjamin Poulain.
1730
1731         With the scrolling model we use on iOS, a programatic scroll
1732         request can be received while we are still animating to reveal
1733         the focused input element. Changing the scroll offset while animating
1734         leads to unpredictable results. We now cancel the animation if
1735         a programatic scroll request is received.
1736
1737         * UIProcess/API/Cocoa/WKWebView.mm:
1738         (-[WKWebView _scrollToContentOffset:WebCore::]):
1739         * WebProcess/WebPage/ios/WebPageIOS.mm:
1740         (WebKit::WebPage::getAssistedNodeInformation):
1741
1742 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
1743
1744         [iOS WK2] Speculative fix for crash in PlatformCALayerRemote::recursiveBuildTransaction
1745         https://bugs.webkit.org/show_bug.cgi?id=132666
1746
1747         Reviewed by Tim Horton.
1748         
1749         Crash reports suggest that owner() can be null. Assert and protect
1750         against this.
1751
1752         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1753         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1754
1755 2014-05-07  Dan Bernstein  <mitz@apple.com>
1756
1757         <rdar://problem/16831276> [iOS] Unparenting a WKWebView that’s loading pauses it
1758         https://bugs.webkit.org/show_bug.cgi?id=132659
1759
1760         Reviewed by Tim Horton.
1761
1762         * UIProcess/Cocoa/NavigationState.h: Added a member variable.
1763         * UIProcess/Cocoa/NavigationState.mm:
1764         (WebKit::NavigationState::didChangeIsLoading): When transitioning into loading state,
1765         acquire a background activity token. When transitioning out of loading state, dispose of
1766         the token.
1767
1768 2014-05-07  Jeremy Jones  <jeremyj@apple.com>
1769
1770         HTMLMediaElement should exitFullscreen when view is removed from the window.
1771         https://bugs.webkit.org/show_bug.cgi?id=132506
1772
1773         Reviewed by Tim Horton.
1774
1775         * UIProcess/WebPageProxy.cpp:
1776         (WebKit::WebPageProxy::viewStateDidChange):
1777         Request WebVideoFUllscreenManagerProxy to exitFullscreen when removed from the window.
1778         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1779         Make requestExitFullscreen() public instead of private.
1780
1781 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
1782
1783         Make blob size computation lazy
1784         https://bugs.webkit.org/show_bug.cgi?id=132653
1785
1786         Reviewed by Anders Carlsson.
1787
1788         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1789         (WebKit::NetworkBlobRegistry::registerBlobURL):
1790         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1791         (WebKit::NetworkBlobRegistry::blobSize):
1792         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1793         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1794         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1795         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
1796         (WebKit::NetworkConnectionToWebProcess::blobSize):
1797         * NetworkProcess/NetworkConnectionToWebProcess.h:
1798         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1799         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
1800         (WebKit::BlobRegistryProxy::registerBlobURL):
1801         (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
1802         (WebKit::BlobRegistryProxy::blobSize):
1803         * WebProcess/FileAPI/BlobRegistryProxy.h:
1804
1805 2014-05-06  Simon Fraser  <simon.fraser@apple.com>
1806
1807         Add scrolling tree logging to RemoteLayerTree output
1808         https://bugs.webkit.org/show_bug.cgi?id=132640
1809
1810         Reviewed by Beth Dakin.
1811         
1812         Support scrolling tree logging in the RemoteLayerTree log channel
1813         output.
1814         
1815         Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
1816         it to avoid logging. Log all the things.
1817
1818         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1819         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
1820         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1821         (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
1822         (WebKit::RemoteScrollingTreeTextStream::increaseIndent):
1823         (WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
1824         (WebKit::RemoteScrollingTreeTextStream::writeIndent):
1825         (WebKit::dumpProperty):
1826         (WebKit::RemoteScrollingTreeTextStream::operator<<):
1827         (WebKit::RemoteScrollingTreeTextStream::dump):
1828         (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
1829         (WebKit::RemoteScrollingCoordinatorTransaction::description):
1830         (WebKit::RemoteScrollingCoordinatorTransaction::dump):
1831         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
1832         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1833         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1834
1835 2014-05-07  Hyowon Kim  <hw1008.kim@samsung.com>
1836
1837         GraphicsLayer::client() should return a reference.
1838         https://bugs.webkit.org/show_bug.cgi?id=126372
1839
1840         Reviewed by Simon Fraser.
1841
1842         GraphicsLayers always have a GraphicsLayerClient attached,
1843         so make client() a reference and remove some unnecessary branches.
1844         The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
1845
1846         * WebProcess/WebPage/PageOverlayController.cpp:
1847         (WebKit::PageOverlayController::initialize):
1848         (WebKit::PageOverlayController::installPageOverlay):
1849         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1850         (WebKit::LayerTreeHostGtk::initialize):
1851         (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
1852         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1853         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1854         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1855         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
1856         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1857         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1858         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1859
1860 2014-05-07  Shivakumar JM  <shiva.jm@samsung.com>
1861
1862         Cleanup the build from unused parameter in UIProcess Module
1863         https://bugs.webkit.org/show_bug.cgi?id=131969
1864
1865         Reviewed by Csaba Osztrogonác.
1866
1867         Fixed unused parameter by omitting the parameter name
1868
1869         * UIProcess/API/C/WKPage.cpp:
1870         (WKPageSetPageFindClient):
1871         * UIProcess/WebFindClient.cpp:
1872         (WebKit::WebFindClient::didFindString):
1873
1874 2014-05-07  Manuel Rego Casasnovas  <rego@igalia.com>
1875
1876         [CSS Grid Layout] Remove runtime feature
1877         https://bugs.webkit.org/show_bug.cgi?id=132382
1878
1879         Reviewed by Benjamin Poulain.
1880
1881         Remove cssGridLayoutEnabled setting usage.
1882
1883         * Shared/WebPreferencesStore.h:
1884         * UIProcess/API/C/WKPreferences.cpp:
1885         (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
1886         (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
1887         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1888         * UIProcess/API/gtk/WebKitSettings.cpp:
1889         (webKitSettingsConstructed):
1890         * UIProcess/gtk/ExperimentalFeatures.cpp:
1891         * UIProcess/gtk/ExperimentalFeatures.h:
1892         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1893         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1894         * WebProcess/WebPage/WebPage.cpp:
1895         (WebKit::WebPage::updatePreferences):
1896         * mac/WebKit2.order:
1897
1898 2014-05-07  Csaba Osztrogonác  <ossy@webkit.org>
1899
1900         URTBF after r168393 to fix !IOS builds.
1901
1902         * Shared/WebEvent.h:
1903
1904 2014-05-06  Brady Eidson  <beidson@apple.com>
1905
1906         Followup to "Add WK2 SPI to prevent the previous back/forward item from remaining in the list"
1907         <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
1908
1909         Reviewed by NOBODY (My mistake while addressing previous review feedback)
1910
1911         * UIProcess/API/C/WKPage.cpp:
1912         (WKPageSetPageLoaderClient): During review feedback, this client switched from default negative to default
1913           positve, so when the client isn't implemented...  return true instead of false.
1914
1915         * UIProcess/WebBackForwardList.cpp:
1916         (WebKit::WebBackForwardList::addItem): Fix nonsensical comments while I'm at it.
1917
1918 2014-05-06  Brady Eidson  <beidson@apple.com>
1919
1920         Add WK2 SPI to prevent the previous back/forward item from remaining in the list
1921         <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
1922
1923         Reviewed by Sam Weinig.
1924
1925         Add new PageLoaderClient SPI to keep the current back/forward item from remaining in the list:
1926         * UIProcess/API/APILoaderClient.h:
1927         (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
1928         * UIProcess/API/C/WKPage.cpp:
1929         (WKPageSetPageLoaderClient):
1930         * UIProcess/API/C/WKPageLoaderClient.h:
1931         * UIProcess/WebPageProxy.cpp:
1932         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
1933         * UIProcess/WebPageProxy.h:
1934
1935         * UIProcess/WebBackForwardList.cpp:
1936         (WebKit::WebBackForwardList::addItem): Use that SPI to determine whether we should insert the new item after
1937         the previous item, or simply replace the previous item.
1938         (WebKit::WebBackForwardList::goToItem): Use that SPI to determine whether the previous item stays or goes.
1939
1940 2014-05-06  Dan Bernstein  <mitz@apple.com>
1941
1942         -[WKWebView isLoading] is NO immediately after -loadRequest: until the provisional load starts
1943         https://bugs.webkit.org/show_bug.cgi?id=132639
1944
1945         Reviewed by Darin Adler.
1946
1947         * UIProcess/PageLoadState.cpp:
1948         (WebKit::PageLoadState::commitChanges): Updated for change from isLoadingState to isLoading.
1949         (WebKit::PageLoadState::isLoading): Renamed from isLoadingState, changed to take Data and
1950         check whether there is a non-null pending API request URL. If so, return true.
1951         * UIProcess/PageLoadState.h:
1952
1953 2014-05-06  Dean Jackson  <dino@apple.com>
1954
1955         [Mac] Allow focus rings to redraw themselves if necessary
1956         https://bugs.webkit.org/show_bug.cgi?id=132593
1957
1958         Reviewed by Simon Fraser.
1959
1960         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1961         (InitWebCoreSystemInterface): Add DrawFocusRingAtTime and DrawCellFocusRingWithFrameAtTime.
1962
1963 2014-05-06  Benjamin Poulain  <benjamin@webkit.org>
1964
1965         <rdar://problem/16833442> [iOS WebKit2]: Keep the order of contentView in _scrollView after rotation
1966         https://bugs.webkit.org/show_bug.cgi?id=132634
1967
1968         Reviewed by Enrica Casucci.
1969
1970         Nice idea of Yongjun.
1971
1972         * UIProcess/API/Cocoa/WKWebView.mm:
1973         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1974         (-[WKWebView _endAnimatedResize]):
1975
1976 2014-05-06  Timothy Hatcher  <timothy@apple.com>
1977
1978         Take WKView's topContentInset into account when docking Web Inspector to the right.
1979
1980         https://bugs.webkit.org/show_bug.cgi?id=132631
1981
1982         Reviewed by Joseph Pecoraro.
1983
1984         * UIProcess/mac/WebInspectorProxyMac.mm:
1985         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Subtract topContentInset
1986         from the height of the frame for the Inspector.
1987
1988 2014-05-06  Benjamin Poulain  <bpoulain@apple.com>
1989
1990         [iOS][WK2] WebKit2 does not set CanPreventNativeGestures on the platform events
1991         https://bugs.webkit.org/show_bug.cgi?id=132594
1992
1993         Reviewed by Simon Fraser.
1994
1995         Set CanPreventNativeGestures on the plaform event.
1996         Change the tracking of WKContentView to be similar to WebPageProxy.
1997
1998         * Shared/WebEvent.h:
1999         (WebKit::WebTouchEvent::WebTouchEvent):
2000         (WebKit::WebTouchEvent::canPreventNativeGestures):
2001         (WebKit::WebTouchEvent::setCanPreventNativeGestures):
2002         * Shared/WebEventConversion.cpp:
2003         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2004         * Shared/ios/WebTouchEventIOS.cpp:
2005         (WebKit::WebTouchEvent::encode):
2006         (WebKit::WebTouchEvent::decode):
2007         * UIProcess/ios/WKContentViewInteraction.mm:
2008         (-[WKContentView _webTouchEventsRecognized:]):
2009
2010 2014-05-06  Benjamin Poulain  <bpoulain@apple.com>
2011
2012         [iOS][WK2] Add tap highlight on the simple UITapGestureRecognizer
2013         https://bugs.webkit.org/show_bug.cgi?id=132623
2014         <rdar://problem/16709507>
2015
2016         Reviewed by Enrica Casucci.
2017
2018         Add a low latency highlight for tap/click.
2019
2020         * UIProcess/PageClient.h:
2021         * UIProcess/WebPageProxy.h:
2022         * UIProcess/WebPageProxy.messages.in:
2023         * UIProcess/ios/PageClientImplIOS.h:
2024         * UIProcess/ios/PageClientImplIOS.mm:
2025         (WebKit::PageClientImpl::commitPotentialTapFailed):
2026         * UIProcess/ios/WKContentViewInteraction.h:
2027         * UIProcess/ios/WKContentViewInteraction.mm:
2028         (-[WKContentView setupInteraction]):
2029         (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2030         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2031         (-[WKContentView _finishInteraction]):
2032         (-[WKContentView _highlightLongPressRecognized:]):
2033         (-[WKContentView _singleTapRecognized:]):
2034         (-[WKContentView _singleTapDidReset:]):
2035         (-[WKContentView _commitPotentialTapFailed]):
2036         (-[WKContentView _singleTapCommited:]):
2037         (-[WKContentView _attemptClickAtLocation:]):
2038         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Added.
2039         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m: Added.
2040         (-[WKSyntheticClickTapGestureRecognizer setGestureRecognizedTarget:action:]):
2041         (-[WKSyntheticClickTapGestureRecognizer setResetTarget:action:]):
2042         (-[WKSyntheticClickTapGestureRecognizer setState:]):
2043         (-[WKSyntheticClickTapGestureRecognizer reset]):
2044         * UIProcess/ios/WebPageProxyIOS.mm:
2045         (WebKit::WebPageProxy::potentialTapAtPosition):
2046         (WebKit::WebPageProxy::commitPotentialTap):
2047         (WebKit::WebPageProxy::cancelPotentialTap):
2048         (WebKit::WebPageProxy::tapHighlightAtPosition):
2049         (WebKit::WebPageProxy::commitPotentialTapFailed):
2050         * WebKit2.xcodeproj/project.pbxproj:
2051         * WebProcess/WebPage/WebPage.h:
2052         * WebProcess/WebPage/WebPage.messages.in:
2053         * WebProcess/WebPage/ios/WebPageIOS.mm:
2054         (WebKit::WebPage::handleSyntheticClick):
2055         (WebKit::WebPage::handleTap):
2056         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2057         (WebKit::WebPage::potentialTapAtPosition):
2058         (WebKit::WebPage::commitPotentialTap):
2059         (WebKit::WebPage::cancelPotentialTap):
2060         (WebKit::WebPage::tapHighlightAtPosition):
2061
2062 2014-05-06  Anders Carlsson  <andersca@apple.com>
2063
2064         Put WebArchive and WebArchiveResource in the API namespace.
2065
2066         Rubber-stamped by Dan Bernstein.
2067
2068         * Shared/API/c/WKSharedAPICast.h:
2069         * Shared/API/c/mac/WKWebArchive.cpp:
2070         (WKWebArchiveGetTypeID):
2071         (WKWebArchiveCreate):
2072         (WKWebArchiveCreateWithData):
2073         (WKWebArchiveCreateFromRange):
2074         (WKWebArchiveCopyMainResource):
2075         * Shared/API/c/mac/WKWebArchiveResource.cpp:
2076         (WKWebArchiveResourceGetTypeID):
2077         (WKWebArchiveResourceCreate):
2078         * Shared/APIWebArchive.cpp: Renamed from Source/WebKit2/Shared/WebArchive.cpp.
2079         (API::WebArchive::create):
2080         (API::WebArchive::WebArchive):
2081         (API::WebArchive::~WebArchive):
2082         (API::WebArchive::mainResource):
2083         (API::WebArchive::subresources):
2084         (API::WebArchive::subframeArchives):
2085         (API::releaseCFData):
2086         (API::WebArchive::data):
2087         (API::WebArchive::coreLegacyWebArchive):
2088         * Shared/APIWebArchive.h: Renamed from Source/WebKit2/Shared/WebArchive.h.
2089         * Shared/APIWebArchiveResource.cpp: Renamed from Source/WebKit2/Shared/WebArchiveResource.cpp.
2090         (API::WebArchiveResource::create):
2091         (API::WebArchiveResource::WebArchiveResource):
2092         (API::WebArchiveResource::~WebArchiveResource):
2093         (API::releaseCFData):
2094         (API::WebArchiveResource::data):
2095         (API::WebArchiveResource::URL):
2096         (API::WebArchiveResource::MIMEType):
2097         (API::WebArchiveResource::textEncoding):
2098         (API::WebArchiveResource::coreArchiveResource):
2099         * Shared/APIWebArchiveResource.h: Renamed from Source/WebKit2/Shared/WebArchiveResource.h.
2100         * WebKit2.xcodeproj/project.pbxproj:
2101
2102 2014-05-06  Alex Christensen  <achristensen@webkit.org>
2103
2104         Removed unnecessary notImplemented.h includes.
2105         https://bugs.webkit.org/show_bug.cgi?id=132587
2106
2107         Reviewed by Anders Carlsson.
2108
2109         * UIProcess/ios/WKContentViewInteraction.mm:
2110         * UIProcess/mac/WebContextMenuProxyMac.mm:
2111         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2112         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2113         Removed notImplemented from list of includes.
2114
2115 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
2116
2117         Implement scan backward and forward in video fullscreen.
2118         https://bugs.webkit.org/show_bug.cgi?id=132517
2119
2120         Reviewed by Simon Fraser.
2121
2122         Plumb through scanning/seeking functions.
2123
2124         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2125         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2126         (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2127         (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2128         (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2129         (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2130         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2131
2132 2014-05-05  Benjamin Poulain  <bpoulain@apple.com>
2133
2134         [iOS][WK2] Prefetch DNS hostnames on tap highlight
2135         https://bugs.webkit.org/show_bug.cgi?id=132509
2136
2137         Reviewed by Alexey Proskuryakov.
2138
2139         * WebProcess/WebPage/ios/WebPageIOS.mm:
2140         (WebKit::WebPage::tapHighlightAtPosition):
2141
2142 2014-05-05  Simon Fraser  <simon.fraser@apple.com>
2143
2144         [iOS WK2] Flickery scrolling inside overflow-scrolling: touch
2145         https://bugs.webkit.org/show_bug.cgi?id=132591
2146         <rdar://problem/16760466>
2147
2148         Reviewed by Tim Horton.
2149         
2150         Avoid triggering layer tree commits that touch the layer's boundsOrigin
2151         while the user is scrolling in the UI process.
2152         
2153         Fix the WKOverflowScrollViewDelegate to pass along an "inUserInteration"
2154         flag to the ScrollingTree to say that we're in the middle of a user interaction
2155         (and also to send a final non-interactive update). That gets passed along
2156         to the web process, and turned into "SyncScrollingLayerPosition" update.
2157         AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() consults
2158         this, and uses it to set a flag on the ScrollableArea to say that the scroll
2159         is a user scroll.
2160         
2161         RenderLayerBacking then makes use of this (in existing code, shared with WK1)
2162         to avoid triggering layer bounds setting. Instead, it now just calls syncBoundsOrigin(),
2163         which updates the GraphicsLayer without touching platform layers. This is necessary
2164         so that GraphicsLayer geometry is up-to-date (used for tiled layer visibility
2165         computations).
2166         
2167         Finally, a hack in GraphicsLayerCA::computeVisibleRect() is conditionalized
2168         for WebKit1 by checking the type of platform layer.
2169
2170         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2171         (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
2172         (WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion):
2173         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
2174         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
2175         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2176         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2177         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
2178         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2179         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2180         (-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
2181         (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
2182         (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
2183         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
2184         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2185         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in:
2186         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2187         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
2188
2189 2014-05-05  Alexey Proskuryakov  <ap@apple.com>
2190
2191         Stop using BlobData on client side
2192         https://bugs.webkit.org/show_bug.cgi?id=132582
2193
2194         Reviewed by Sam Weinig.
2195
2196         Update for WebCore changes.
2197
2198         * CMakeLists.txt:
2199         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2200         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
2201         (WebKit::NetworkBlobRegistry::registerBlobURL):
2202         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2203         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2204         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
2205         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2206         * NetworkProcess/NetworkConnectionToWebProcess.h:
2207         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2208         * Shared/FileAPI/BlobRegistrationData.cpp: Removed.
2209         * Shared/FileAPI/BlobRegistrationData.h: Removed.
2210         * Shared/WebCoreArgumentCoders.cpp:
2211         (IPC::ArgumentCoder<BlobPart>::encode):
2212         (IPC::ArgumentCoder<BlobPart>::decode):
2213         * Shared/WebCoreArgumentCoders.h:
2214         * WebKit2.xcodeproj/project.pbxproj:
2215         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2216         (WebKit::BlobRegistryProxy::registerFileBlobURL):
2217         (WebKit::BlobRegistryProxy::registerBlobURL):
2218         * WebProcess/FileAPI/BlobRegistryProxy.h:
2219
2220 2014-05-05  Beth Dakin  <bdakin@apple.com>
2221
2222         Need a delegate that informs the UI process when the page's pin state changes
2223         https://bugs.webkit.org/show_bug.cgi?id=132583
2224         -and corresponding-
2225         <rdar://problem/16806231>
2226
2227         Reviewed by Anders Carlsson.
2228
2229         New UIClient function pinnedStateDidChange. 
2230
2231         * UIProcess/API/APIUIClient.h:
2232         (API::UIClient::pinnedStateDidChange):
2233
2234         Create WKPageUIClientV3 to add this function.
2235         * UIProcess/API/C/WKPage.cpp:
2236         (WKPageSetPageUIClient):
2237         * UIProcess/API/C/WKPageUIClient.h:
2238
2239         Change default initialization to true instead of false, which makes more sense for 
2240         this API.
2241         * UIProcess/WebPageProxy.cpp:
2242         (WebKit::WebPageProxy::WebPageProxy):
2243         (WebKit::WebPageProxy::didCommitLoadForFrame):
2244         (WebKit::WebPageProxy::resetState):
2245         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
2246         * WebProcess/WebPage/WebPage.cpp:
2247         (WebKit::WebPage::WebPage):
2248
2249 2014-05-05  Anders Carlsson  <andersca@apple.com>
2250
2251         Add SPI to provide the WebCrypto master key
2252         https://bugs.webkit.org/show_bug.cgi?id=132586
2253         <rdar://problem/16091460>
2254
2255         Reviewed by Dan Bernstein.
2256
2257         * UIProcess/API/APILoaderClient.h:
2258         (API::LoaderClient::webCryptoMasterKey):
2259         * UIProcess/API/C/WKPage.cpp:
2260         (WKPageSetPageLoaderClient):
2261         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2262         * UIProcess/Cocoa/NavigationState.h:
2263         * UIProcess/Cocoa/NavigationState.mm:
2264         (WebKit::NavigationState::setNavigationDelegate):
2265         (WebKit::NavigationState::LoaderClient::webCryptoMasterKey):
2266         * UIProcess/WebPageProxy.cpp:
2267         (WebKit::WebPageProxy::wrapCryptoKey):
2268
2269 2014-05-05  Gavin Barraclough  <baraclough@apple.com>
2270
2271         https://bugs.webkit.org/show_bug.cgi?id=132522
2272         Clean up ProcessThrottler
2273
2274         Unreviewed: bad build fix. Will work out what the right include is asap.
2275
2276         * UIProcess/ios/WebProcessProxyIOS.mm:
2277
2278 2014-05-05  Sam Weinig  <sam@webkit.org>
2279
2280         [Cocoa WebKit2] Add SPI to clear all visited links in a VisitedLinkProvider
2281         https://bugs.webkit.org/show_bug.cgi?id=132573
2282
2283         Reviewed by Dan Bernstein.
2284
2285         * Shared/VisitedLinkTable.cpp:
2286         (WebKit::VisitedLinkTable::VisitedLinkTable):
2287         (WebKit::VisitedLinkTable::clear):
2288         * Shared/VisitedLinkTable.h:
2289         Add functions to clear the visited link table.
2290
2291         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
2292         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
2293         (-[_WKVisitedLinkProvider removeAll]):
2294         Add SPI.
2295
2296         * UIProcess/VisitedLinkProvider.cpp:
2297         (WebKit::VisitedLinkProvider::removeAll):
2298         * UIProcess/VisitedLinkProvider.h:
2299         A remove all resets the provider and notifies all the attached processes.
2300
2301         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2302         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
2303         * WebProcess/WebPage/VisitedLinkTableController.h:
2304         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
2305         Add message to clear the visited links for a process.
2306
2307 2014-05-05  Benjamin Poulain  <benjamin@webkit.org>
2308
2309         [iOS][WK2] Special case ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture() for image documents
2310         https://bugs.webkit.org/show_bug.cgi?id=132553
2311
2312         Reviewed by Tim Horton.
2313
2314         When collecting the geometry for the smart magnification gesture, always return the image of an image document
2315         on iOS. On iOS, it does not make much sense to return the whole document rect when the gesture is not over the image.
2316
2317         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2318         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2319
2320 2014-05-02  Gavin Barraclough  <baraclough@apple.com>
2321
2322         https://bugs.webkit.org/show_bug.cgi?id=132522
2323         Clean up ProcessThrottler
2324
2325         Reviewed by Geoffrey Garen.
2326
2327         The initial implementation of ProcessThrottler relied on the reply from the
2328         SetViewState message to ensure the page visibility notifications have a chance
2329         to be delivered. This resulted in:
2330             - unnecessarily complicated interface to ProcessThrottler (in VisibilityState class)
2331             - complexity bleeding out into WebPageProxy (handling 'hiding' state).
2332             - for cases other than view hiding, no suspension notification in the WebContent.
2333
2334         To fix these issues add an explicit handshake from the ProcessThrottler to the WebPage.
2335         This gives us two things:
2336             - All previously posted messages (e.g. SetViewState) will be processed before suspension.
2337             - WebContent is always (bar timeout) notified before suspension.
2338
2339         Since this interlock ensures the SetViewState message will be processed, the WKContentView no
2340         longer needs to request a reply from SetViewState, and WebPageProxy can lose all the 'hiding'
2341         state tracking. In turn, we can simplify VisibilityToken to a couple of simpler types, without
2342         the interface to change state - just acquire/release to keep the process runnable or permit
2343         suspension.
2344
2345         * UIProcess/API/Cocoa/WKWebView.mm:
2346         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2347             - VisibilityToken -> BackgroundActivityToken
2348         * UIProcess/WebPageProxy.cpp:
2349         (WebKit::WebPageProxy::WebPageProxy):
2350             - m_visibilityToken -> m_activityToken, remove m_pendingViewStateUpdates
2351               updateVisibilityToken -> updateActivityToken
2352         (WebKit::WebPageProxy::reattachToWebProcess):
2353             - updateVisibilityToken -> updateActivityToken
2354         (WebKit::WebPageProxy::viewStateDidChange):
2355             - remove m_pendingViewStateUpdates, updateActivityToken after sending SetViewState
2356         (WebKit::WebPageProxy::updateActivityToken):
2357             - m_visibilityToken -> m_activityToken, no need to handle 'hiding' state.
2358         (WebKit::WebPageProxy::updateVisibilityToken): Deleted.
2359             - renamed to updateActivityToken
2360         (WebKit::WebPageProxy::didUpdateViewState): Deleted.
2361             - implementation moved back into header.
2362         * UIProcess/WebPageProxy.h:
2363         (WebKit::WebPageProxy::didUpdateViewState):
2364             - implementation moved back into header.
2365         * UIProcess/WebProcessProxy.cpp:
2366         (WebKit::WebProcessProxy::WebProcessProxy):
2367             - ProcessThrottler constructor now passed WebProcessProxy.
2368         * UIProcess/WebProcessProxy.h:
2369             - added ProcessWillSuspend/ProcessReadyToSuspend
2370         * UIProcess/WebProcessProxy.messages.in:
2371             - added ProcessWillSuspend/ProcessReadyToSuspend
2372         * UIProcess/ios/ProcessAssertion.h:
2373         (WebKit::ProcessAssertion::state):
2374             - accessor
2375         * UIProcess/ios/ProcessThrottler.h:
2376         (WebKit::ProcessThrottler::VisibilityToken::visibility): Deleted.
2377         (WebKit::ProcessThrottler::VisibilityToken::setVisibility): Deleted.
2378             - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
2379         (WebKit::ProcessThrottler::ProcessThrottler): Deleted.
2380         (WebKit::ProcessThrottler::visibilityToken): Deleted.
2381         (WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
2382         (WebKit::ProcessThrottler::assertionState): Deleted.
2383         (WebKit::ProcessThrottler::updateAssertion): Deleted.
2384             - moved implementations to .mm.
2385         * UIProcess/ios/ProcessThrottler.mm:
2386         (WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken):
2387         (WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken):
2388         (WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken):
2389         (WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken):
2390             - new, simpler replacement for VisibilityToken. Instantiate to keep a processes running, release to suspend.
2391         (WebKit::ProcessThrottler::ProcessThrottler):
2392             - constructor, now initializes WebProcessProxy pointer & timer mechanism
2393         (WebKit::ProcessThrottler::assertionState):
2394             - select the appropriate AssertionState give current ActivityTokens.
2395         (WebKit::ProcessThrottler::updateAssertionNow):
2396             - update the current ProcessAssertion.
2397         (WebKit::ProcessThrottler::updateAssertion):
2398             - update the current ProcessAssertion, delay running->suspended transitions to give the process a chance to clean up.
2399         (WebKit::ProcessThrottler::didConnnectToProcess):
2400             - moved from header.
2401         (WebKit::ProcessThrottler::suspendTimerFired):
2402             - timeout to prevent processes from running in the background for too long.
2403         (WebKit::ProcessThrottler::processReadyToSuspend):
2404             - handshake from the WebContent process to acknowledge it is ready to suspend.
2405         (WebKit::ProcessThrottler::VisibilityToken::VisibilityToken): Deleted.
2406         (WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken): Deleted.
2407         (WebKit::ProcessThrottler::VisibilityToken::hideTimerFired): Deleted.
2408         (WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal): Deleted.
2409             - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
2410         * UIProcess/ios/WKContentView.mm:
2411         (-[WKContentView didMoveToWindow]):
2412             - no longer necessary to request a response from SetViewState; this interlock is now managed by the ProcessThrottler.
2413         * UIProcess/ios/WebProcessProxyIOS.mm:
2414         (WebKit::WebProcessProxy::sendProcessWillSuspend):
2415         (WebKit::WebProcessProxy::processReadyToSuspend):
2416             - added ProcessWillSuspend/ProcessReadyToSuspend
2417         * WebProcess/WebProcess.cpp:
2418         (WebKit::WebProcess::processWillSuspend):
2419             - notification from the WebContent process that we will be suspended; for now just send back an ack.
2420         * WebProcess/WebProcess.h:
2421             - added ProcessWillSuspend/ProcessReadyToSuspend
2422         * WebProcess/WebProcess.messages.in:
2423             - added ProcessWillSuspend/ProcessReadyToSuspend
2424
2425 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
2426
2427         Implement beginScrubbing and endScrubbing for video fullscreen.
2428         https://bugs.webkit.org/show_bug.cgi?id=132520
2429
2430         Reviewed by Eric Carlson.
2431
2432         Plumb through beginScrubbing and endScrubbing.
2433
2434         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2435         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2436         (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2437         (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2438         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2439
2440 2014-05-05  Tim Horton  <timothy_horton@apple.com>
2441
2442         Use a layer delegate instead of web_disableAllActions wherever possible
2443         https://bugs.webkit.org/show_bug.cgi?id=132560
2444         <rdar://problem/16459284>
2445
2446         Reviewed by Simon Fraser.
2447
2448         * UIProcess/API/mac/WKView.mm:
2449         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
2450         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2451         (WebKit::RemoteLayerTreeHost::createLayer):
2452         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2453         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
2454         * UIProcess/mac/RemoteLayerTreeHost.mm:
2455         (WebKit::RemoteLayerTreeHost::createLayer):
2456         * UIProcess/mac/ViewGestureControllerMac.mm:
2457         (WebKit::ViewGestureController::beginSwipeGesture):
2458         Make use of WebActionDisablingCALayerDelegate where possible.
2459         Also, UIKit disables actions for us, so don't bother doing anything on iOS.
2460
2461 2014-05-05  Martin Hock  <mhock@apple.com>
2462
2463         Session-aware plugin autostart data
2464         https://bugs.webkit.org/show_bug.cgi?id=131758
2465         <rdar://problem/15906540>
2466
2467         Reviewed by Alexey Proskuryakov.
2468
2469         * Shared/WebProcessCreationParameters.cpp:
2470         * Shared/WebProcessCreationParameters.h:
2471         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2472         (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
2473         (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
2474         (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy):
2475         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
2476         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
2477         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
2478         (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
2479         * UIProcess/Plugins/PlugInAutoStartProvider.h:
2480         * UIProcess/WebContext.cpp:
2481         (WebKit::WebContext::addPlugInAutoStartOriginHash):
2482         (WebKit::WebContext::plugInDidReceiveUserInteraction):
2483         * UIProcess/WebContext.h:
2484         * UIProcess/WebContext.messages.in:
2485         * WebProcess/Plugins/PluginView.cpp:
2486         (WebKit::PluginView::pluginDidReceiveUserInteraction):
2487         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
2488         (WebKit::WebPlugInClient::didStartFromOrigin):
2489         * WebProcess/WebCoreSupport/WebPlugInClient.h:
2490         * WebProcess/WebProcess.cpp:
2491         (WebKit::WebProcess::WebProcess):
2492         (WebKit::WebProcess::isPlugInAutoStartOriginHash):
2493         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
2494         (WebKit::WebProcess::plugInDidStartFromOrigin):
2495         (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
2496         (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
2497         (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
2498         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
2499         * WebProcess/WebProcess.h:
2500         * WebProcess/WebProcess.messages.in:
2501
2502 2014-05-05  Andy Estes  <aestes@apple.com>
2503
2504         Another iOS build fix after r168260.
2505
2506         Removed an unnecessary 'using namespace WebCore'.
2507
2508         * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
2509
2510 2014-05-05  Tim Horton  <timothy_horton@apple.com>
2511
2512         Fix the iOS build.
2513
2514         * UIProcess/API/Cocoa/WKWebView.mm:
2515
2516 2014-05-05  Ryuan Choi  <ryuan.choi@samsung.com>
2517
2518         [EFL][WK2] Refactor favicon database APIs
2519         https://bugs.webkit.org/show_bug.cgi?id=132519
2520
2521         Reviewed by Gyuyoung Kim.
2522
2523         ewebkit2 has two options to get favicon.
2524
2525         The first option is ewk_view_favicon_get with "favicon,changed" signal.
2526         It's simple to use but it always adds the callback to EwkView although applications does not use favicon.
2527
2528         The other option is ewk_favicon_database_icon_get with ewk_favicon_database_icon_change_callback_add API.
2529         But the callback doesn't have information about Ewk_Favicon_Database to call ewk_favicon_database_icon_get.
2530
2531         This patch removed ewk_view_favicon_get and "favicon,changed" signal.
2532         In addition, improved ewk_favicon_database_icon_change_callback.
2533
2534         * UIProcess/API/efl/EwkView.cpp: Remove ewk_favicon_database related code.
2535         (EwkView::EwkView):
2536         (EwkView::~EwkView):
2537         (EwkView::informURLChange):
2538         (EwkView::handleFaviconChanged):
2539         (EwkView::createFavicon): Deleted.
2540         * UIProcess/API/efl/EwkViewCallbacks.h:
2541         * UIProcess/API/efl/ewk_favicon_database.cpp:
2542         (EwkFaviconDatabase::iconDataReadyForPageURL):
2543         (EwkFaviconDatabase::didChangeIconForPageURL): Deleted. dead code.
2544         * UIProcess/API/efl/ewk_favicon_database.h:
2545         Refactor Ewk_Favicon_Database_Icon_Change_Cb and improve doxygen.
2546         * UIProcess/API/efl/ewk_favicon_database_private.h:
2547         * UIProcess/API/efl/ewk_view.cpp:
2548         (ewk_view_favicon_get): Deleted.
2549         * UIProcess/API/efl/ewk_view.h:
2550         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
2551         (EWK2FaviconDatabaseTest::requestFaviconData):
2552         (TEST_F):
2553
2554 2014-05-05  Tim Horton  <timothy_horton@apple.com>
2555
2556         [iOS WebKit2] Swipe snapshots should be taken asynchronously
2557         https://bugs.webkit.org/show_bug.cgi?id=132417
2558         <rdar://problem/16535921>
2559
2560         Reviewed by Anders Carlsson.
2561
2562         Reorganize takeViewSnapshot to return a ViewSnaphot with the image
2563         filled in (the other properties are filled in by ViewSnapshotStore).
2564
2565         Make ViewSnapshotStore use a fixed size instead of count for the snapshot cache.
2566         iOS doesn't use purgeable snapshots, so make the cache much smaller there.
2567
2568         Use CARenderServerCaptureLayerWithTransform to achieve async snapshotting.
2569
2570         Rename WebKit::ViewSnapshotStore::Snapshot to WebKit::ViewSnapshot so that
2571         it can be forward-declared in a bunch of places.
2572
2573         * UIProcess/API/Cocoa/WKWebView.mm:
2574         (-[WKWebView _takeViewSnapshot:]):
2575         Use CARenderServerCaptureLayerWithTransform.
2576
2577         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2578         * UIProcess/API/mac/WKView.mm:
2579         (createIOSurfaceFromImage):
2580         (-[WKView _takeViewSnapshot:]):
2581         Adjust to the new push model.
2582
2583         * UIProcess/API/mac/WKViewInternal.h:
2584         * UIProcess/PageClient.h:
2585         * UIProcess/WebPageProxy.cpp:
2586         (WebKit::WebPageProxy::takeViewSnapshot):
2587         * UIProcess/WebPageProxy.h:
2588         * UIProcess/ios/PageClientImplIOS.h:
2589         * UIProcess/ios/PageClientImplIOS.mm:
2590         (WebKit::PageClientImpl::takeViewSnapshot):
2591         * UIProcess/mac/PageClientImpl.h:
2592         * UIProcess/mac/PageClientImpl.mm:
2593         (WebKit::PageClientImpl::takeViewSnapshot):
2594         Plumbing.
2595
2596         * UIProcess/ios/ViewGestureControllerIOS.mm:
2597         (WebKit::ViewGestureController::beginSwipeGesture):
2598         (WebKit::ViewGestureController::endSwipeGesture):
2599         Realize an object that can be used as the layer contents from the slot ID.
2600
2601         * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
2602         (WebKit::WebMemoryPressureHandler::sharedHandler):
2603         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2604         * UIProcess/WebMemoryPressureHandlerIOS.h:
2605         Add a memory pressure handler for the UI process. This does not use
2606         WebCore's platform independent memory pressure handler because that
2607         mechanism only allows for one handler per process, and we don't want to
2608         stomp on any handlers installed by WebKit1 in a process where the WebKits coexist.
2609
2610         * UIProcess/ios/WKContentView.h:
2611         * UIProcess/ios/WKContentView.mm:
2612         (-[WKContentView _takeViewSnapshot]): Deleted.
2613         Get rid of an unnecessary bounce through WKContentView.
2614
2615         * UIProcess/mac/ViewGestureControllerMac.mm:
2616         (WebKit::ViewGestureController::retrieveSnapshotForItem):
2617         (WebKit::ViewGestureController::endSwipeGesture):
2618         Use the new name, ViewSnapshot.
2619
2620         * UIProcess/mac/ViewSnapshotStore.h:
2621         (WebKit::ViewSnapshot::ViewSnapshot):
2622         * UIProcess/mac/ViewSnapshotStore.mm:
2623         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2624         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2625         (WebKit::ViewSnapshotStore::snapshottingContext):
2626         Use a custom CAContext for snapshotting so that snapshots don't
2627         disappear when the main context is destroyed on hibernation.
2628
2629         (WebKit::ViewSnapshotStore::removeSnapshotImage):
2630         (WebKit::ViewSnapshotStore::pruneSnapshots):
2631         (WebKit::ViewSnapshotStore::recordSnapshot):
2632         (WebKit::ViewSnapshotStore::getSnapshot):
2633         (WebKit::ViewSnapshotStore::discardSnapshots):
2634         (WebKit::ViewSnapshot::clearImage):
2635         (WebKit::ViewSnapshot::hasImage):
2636         (WebKit::createIOSurfaceFromImage): Deleted.
2637         (WebKit::ViewSnapshotStore::Snapshot::clearImage): Deleted.
2638         (WebKit::ViewSnapshotStore::Snapshot::hasImage): Deleted.
2639         Cache by image size instead of counts.
2640
2641         * WebKit2.xcodeproj/project.pbxproj:
2642
2643 2014-05-04  Pratik Solanki  <psolanki@apple.com>
2644
2645         Reduce calls to CFURLCacheCopySharedURLCache
2646         https://bugs.webkit.org/show_bug.cgi?id=132464
2647         <rdar://problem/16806694>
2648
2649         Address review comments by collapsing multi-line code into a single ASSERT.
2650
2651         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2652         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2653
2654 2014-05-04  Pratik Solanki  <psolanki@apple.com>
2655
2656         Shortcircuit shouldUseCredentialStorage callback
2657         https://bugs.webkit.org/show_bug.cgi?id=132308
2658         <rdar://problem/16806708>
2659
2660         Reviewed by Alexey Proskuryakov.
2661
2662         If we are going to return true from the shouldUseCredentialStorage callback then we don't
2663         really need to have CFNetwork/Foundation call us. We can just disable the callback and
2664         CFNetwork will assume true. Add a separate subclass that implements this callback when we
2665         need to return false. We can also eliminate the corresponding async callbacks. This avoids
2666         pingponging between dispatch queue and main thread in the common case.
2667
2668         No new tests because no change in functionality.
2669
2670         * NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
2671         * NetworkProcess/NetworkResourceLoader.h:
2672
2673 2014-05-04  Beth Dakin  <bdakin@apple.com>
2674
2675         Top content inset: Margin tiles should not display in the inset area when pinned 
2676         to the top of the page
2677         https://bugs.webkit.org/show_bug.cgi?id=132535
2678         -and corresponding-
2679         <rdar://problem/16613039>
2680
2681         Reviewed by Simon Fraser.
2682
2683         Encode and decode the ScrollingStateScrollingNode’s m_topContentInset even though 
2684         we don’t use it for anything yet. Since the headerLayer and footerLayer are not 
2685         encoded or decoded yet, I did not encode/decode the insetClipLayer yet, which, 
2686         like the header and footer layers, would not yet be used. 
2687         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2688         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2689         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2690
2691 2014-05-03  Commit Queue  <commit-queue@webkit.org>
2692
2693         Unreviewed, rolling out r168232.
2694         https://bugs.webkit.org/show_bug.cgi?id=132543
2695
2696         broke ~15 tests on WK2 debug (Requested by kling on #webkit).
2697
2698         Reverted changeset:
2699
2700         "Shortcircuit shouldUseCredentialStorage callback"
2701         https://bugs.webkit.org/show_bug.cgi?id=132308
2702         http://trac.webkit.org/changeset/168232
2703
2704 2014-05-03  Tim Horton  <timothy_horton@apple.com>
2705
2706         [iOS] REGRESSION (WebKit2): Page isn't clipped properly during back/forward swipe
2707         https://bugs.webkit.org/show_bug.cgi?id=132538
2708         <rdar://problem/16266027>
2709
2710         Reviewed by Simon Fraser.
2711
2712         * UIProcess/ios/ViewGestureControllerIOS.mm:
2713         (WebKit::ViewGestureController::beginSwipeGesture):
2714         (WebKit::ViewGestureController::endSwipeGesture):
2715         * UIProcess/mac/ViewGestureController.h:
2716         Add a clipping layer above the live swipe layer, which explicitly clips to bounds.
2717
2718 2014-05-02  Pratik Solanki  <psolanki@apple.com>
2719
2720         Shortcircuit shouldUseCredentialStorage callback
2721         https://bugs.webkit.org/show_bug.cgi?id=132308
2722         <rdar://problem/16806708>
2723
2724         Reviewed by Alexey Proskuryakov.
2725
2726         If we are going to return true from the shouldUseCredentialStorage callback then we don't
2727         really need to have CFNetwork/Foundation call us. We can just disable the callback and
2728         CFNetwork will assume true. Add a separate subclass that implements this callback when we
2729         need to return false. We can also eliminate the corresponding async callbacks. This avoids
2730         pingponging between dispatch queue and main thread in the common case.
2731
2732         No new tests because no change in functionality.
2733
2734         * NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
2735         * NetworkProcess/NetworkResourceLoader.h:
2736
2737 2014-05-02  Pratik Solanki  <psolanki@apple.com>
2738
2739         Reduce calls to CFURLCacheCopySharedURLCache
2740         https://bugs.webkit.org/show_bug.cgi?id=132464
2741         <rdar://problem/16806694>
2742
2743         Reviewed by Alexey Proskuryakov.
2744
2745         CFURLCacheCopySharedURLCache grabs a mutex and can sometimes block. Avoid that by stashing
2746         the cache reference in a static.
2747
2748         * NetworkProcess/NetworkResourceLoader.h: Coalesce ifdef'd code.
2749         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2750         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2751         (WebKit::NetworkResourceLoader::willCacheResponseAsync): Use more correct ifdef for
2752         Foundation based callback.
2753
2754 2014-05-03  Sam Weinig  <sam@webkit.org>
2755
2756         [Cocoa WebKit2] Add basic _WKWebsiteDataStore implementation
2757         https://bugs.webkit.org/show_bug.cgi?id=132526
2758
2759         Reviewed by Anders Carlsson.
2760
2761         - Renames WKSession to _WKWebsiteDataStore to better reflect its intended use (renaming
2762           the implementation object will come later).
2763         - Makes _WKWebsiteDataStore work as a wrapped Objective-C object.
2764         - Adds the ability to set a _WKWebsiteDataStore on the WKWebViewConfiguration.
2765
2766         * Shared/Cocoa/APIObject.mm:
2767         (API::Object::newObject):
2768         * UIProcess/API/Cocoa/WKSession.h:
2769         * UIProcess/API/Cocoa/WKSession.mm:
2770         (-[WKSession dealloc]): Deleted.
2771         (-[WKSession ephemeral]): Deleted.
2772         (-[WKSession API::]): Deleted.
2773         * UIProcess/API/Cocoa/WKSessionInternal.h:
2774         (WebKit::wrapper): Deleted.
2775         * UIProcess/API/Cocoa/WKWebView.mm:
2776         (-[WKWebView initWithFrame:configuration:]):
2777         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2778         (-[WKWebViewConfiguration copyWithZone:]):
2779         (-[WKWebViewConfiguration _websiteDataStore]):
2780         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2781         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2782         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.h.
2783         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm.
2784         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2785         (-[_WKWebsiteDataStore isNonPersistentDataStore]):
2786         (-[WKSession ephemeral]): Deleted.
2787         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h.
2788         * WebKit2.xcodeproj/project.pbxproj:
2789
2790 2014-05-03  Simon Fraser  <simon.fraser@apple.com>
2791
2792         [UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
2793         https://bugs.webkit.org/show_bug.cgi?id=132528
2794         <rdar://problem/16671660>
2795
2796         Reviewed by Tim Horton.
2797         
2798         Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
2799         on layers as the result of a filter animation using a reference filter, and just get
2800         ignored anyway, but encoding them maintains consistency of the filters list.
2801
2802         * Shared/WebCoreArgumentCoders.cpp:
2803         (IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
2804         we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
2805         (IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
2806         trying to decode a NONE or REFERENCE filter mark the message as invalid.
2807         (IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
2808         unexpected key types.
2809         * Shared/mac/RemoteLayerTreeTransaction.mm:
2810         (WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
2811         a filter is null (should never happen).
2812
2813 2014-05-02  Dan Bernstein  <mitz@apple.com>
2814
2815         [Cocoa] Remove unused WKErrorRecoveryAttempting
2816         https://bugs.webkit.org/show_bug.cgi?id=132503
2817
2818         Reviewed by Anders Carlsson.
2819
2820         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2821         (didFailProvisionalLoadWithErrorForFrame):
2822         (didFailLoadWithErrorForFrame):
2823         (createErrorWithRecoveryAttempter): Deleted.
2824         (-[WKBrowsingContextController attemptRecoveryFromError:]): Deleted.
2825         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.m: Removed.
2826         * UIProcess/API/Cocoa/_WKFormDelegate.h:
2827         * WebKit2.xcodeproj/project.pbxproj:
2828
2829 2014-05-02  Enrica Casucci  <enrica@apple.com>
2830
2831         REGRESSION (WebKit2) Need to support reanalyze button for Chinese Traditional.
2832         https://bugs.webkit.org/show_bug.cgi?id=132504
2833         <rdar://problem/16778862>
2834
2835         Reviewed by Benjamin Poulain.
2836
2837         For traditional Chinese we support reanalyzing of the text to perform
2838         transformations on the text based on the selected language and keyboard.
2839         This is done by pressing the Reanalyze button on the system
2840         menu. This patch adds the necessary code to canPerformAction to enable
2841         the button when appropriate as well as the implementation of the action
2842         itself.
2843
2844         * UIProcess/ios/WKContentViewInteraction.mm:
2845         (-[WKContentView _reanalyze:]):
2846         (-[WKContentView canPerformAction:withSender:]):
2847
2848 2014-05-02  Enrica Casucci  <enrica@apple.com>
2849
2850         REGRESSION (WebKit2) Need to support transliterate chinese button (简⇄繁) for Traditional Chinese.
2851         https://bugs.webkit.org/show_bug.cgi?id=132500
2852         <rdar://problem/16778870>
2853
2854         Reviewed by Benjamin Poulain.
2855
2856         For traditional Chinese we support the transliterate to simplified Chinese.
2857         This is done by pressing the 简⇄繁 button on the system
2858         menu. This patch adds the necessary code to canPerformAction to enable
2859         the button when appropriate as well as the implementation of the action
2860         itself.
2861
2862         * UIProcess/ios/WKContentViewInteraction.mm:
2863         (-[WKContentView _transliterateChinese:]):
2864         (-[WKContentView canPerformAction:withSender:]):
2865
2866 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
2867
2868         Fullscreen UI does not appear after WebProcess has crashed
2869         https://bugs.webkit.org/show_bug.cgi?id=132442
2870
2871         Reviewed by Darin Adler.
2872
2873         Cleanup WebVideoFullscreenManagerProxy after a WebProcess crash.
2874
2875         * UIProcess/WebPageProxy.cpp:
2876         (WebKit::WebPageProxy::reattachToWebProcess):
2877         recreate WebVideoFullscreenManagerProxy after a WebProcess crash.
2878
2879         (WebKit::WebPageProxy::resetState):
2880         invalidate and release WebVideoFullscreenManagerProxy on crash.
2881
2882         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2883         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2884         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
2885         don't assume m_page is valid.
2886
2887         (WebKit::WebVideoFullscreenManagerProxy::invalidate):
2888         do cleanup invalidation in reponse to a WebProcess crash.
2889
2890 2014-05-02  Benjamin Poulain  <bpoulain@apple.com>
2891
2892         [iOS][WK2] More animation madness for when the extendedBackground is modified in an animation block
2893         https://bugs.webkit.org/show_bug.cgi?id=132497
2894
2895         Reviewed by Beth Dakin.
2896
2897         * UIProcess/API/Cocoa/WKWebView.mm:
2898         (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
2899         Do not early return when _extendedBackgroundExclusionInsets.left is empty. That way, if executed in an animation block,
2900         the top of bottom view will animate from their current size to an empty width.
2901
2902         When creating the layer, set up their height without animation. Otherwise it is possible to see the height animating
2903         while the left inset is animating.
2904
2905         (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
2906         When replacing the scrollview, make sure the frame and color are not animated. Otherwise the transition between
2907         scrollView and _mainExtendedBackgroundView can be visible if _setExtendedBackgroundExclusionInsets: is invoked
2908         in an animation block.
2909
2910         (-[WKWebView _endAnimatedResize]):
2911         Nuke the top and bottom insets when possible. [WKWebView _endAnimatedResize] is unfrequent, so it is a good opportunity
2912         to free the memory.
2913
2914 2014-05-02  Alexey Proskuryakov  <ap@apple.com>
2915
2916         Remove Blob contentDisposition handling
2917         https://bugs.webkit.org/show_bug.cgi?id=132490
2918
2919         Reviewed by Sam Weinig.
2920
2921         * Shared/FileAPI/BlobRegistrationData.cpp:
2922         (WebKit::BlobRegistrationData::encode):
2923         (WebKit::BlobRegistrationData::decode):
2924
2925 2014-05-02  Benjamin Poulain  <benjamin@webkit.org>
2926
2927         [iOS][WK2] Adapt the rubberband constraints when the page get smaller than the scrollview - insets
2928         https://bugs.webkit.org/show_bug.cgi?id=132457
2929
2930         Reviewed by Enrica Casucci.
2931
2932         It is quite common for us to have a WKContentView that is scalled smaller than the WKWebView, content
2933         insets included.
2934
2935         In those cases, update the constraints to fit the content properly in the view.
2936
2937         * UIProcess/ios/WKScrollView.mm:
2938         (valuesAreWithinOnePixel):
2939         (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
2940
2941 2014-05-02  Mark Rowe  <mrowe@apple.com>
2942
2943         -[_WKThumbnailView _requestSnapshotIfNeeded] assumes that taking a snapshot will always succeed
2944         <https://webkit.org/b/132489> / <rdar://problem/16704660>
2945
2946         Reviewed by Tim Horton.
2947
2948         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2949         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Don't attempt to create a CGImageRef if we failed
2950         to create a ShareableBitmap. This handles both the callback receiving a null Handle and a failure
2951         within ShareableBitmap::create.
2952
2953 2014-05-02  Anders Carlsson  <andersca@apple.com>
2954
2955         Clean up FormDataElement
2956         https://bugs.webkit.org/show_bug.cgi?id=132483
2957
2958         Reviewed by Sam Weinig.
2959
2960         * NetworkProcess/NetworkResourceLoader.cpp:
2961         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2962         * Shared/Network/NetworkResourceLoadParameters.cpp:
2963         (WebKit::NetworkResourceLoadParameters::encode):
2964
2965 2014-05-02  Anders Carlsson  <andersca@apple.com>
2966
2967         Add and implement KeyedDecoder::decodeBytes
2968         https://bugs.webkit.org/show_bug.cgi?id=132479
2969
2970         Reviewed by Tim Horton.
2971
2972         * Shared/cf/KeyedDecoder.cpp:
2973         (WebKit::KeyedDecoder::decodeBytes):
2974         * Shared/cf/KeyedDecoder.h:
2975
2976 2014-05-02  Joseph Pecoraro  <pecoraro@apple.com>
2977
2978         [iOS] WebKit2 File Upload Support
2979         https://bugs.webkit.org/show_bug.cgi?id=132024
2980
2981         Reviewed by Enrica Casucci.
2982
2983         * Configurations/WebKit2.xcconfig:
2984         Include MobileCoreServices on iOS for kUTTypeImage/kUTTypeMovie.
2985
2986         * WebKit2.xcodeproj/project.pbxproj:
2987         Add new files.
2988
2989         * UIProcess/WebOpenPanelResultListenerProxy.h:
2990         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
2991         (WebKit::filePathsFromFileURLs):
2992         (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
2993         * UIProcess/WebPageProxy.h:
2994         * UIProcess/WebPageProxy.cpp:
2995         (WebKit::WebPageProxy::runOpenPanel):
2996         (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
2997         * WebProcess/WebPage/WebOpenPanelResultListener.h:
2998         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
2999         (WebKit::WebOpenPanelResultListener::didChooseFilesWithDisplayStringAndIcon):
3000         * WebProcess/WebPage/WebPage.h:
3001         * WebProcess/WebPage/WebPage.messages.in:
3002         * WebProcess/WebPage/WebPage.cpp:
3003         (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
3004         Message forwarding for choosing files and providing a display string and icon,
3005         leading down to the existing WebCore FileChooser method.
3006
3007         * UIProcess/PageClient.h:
3008         * UIProcess/ios/PageClientImplIOS.h:
3009         * UIProcess/ios/PageClientImplIOS.mm:
3010         (WebKit::PageClientImpl::handleRunOpenPanel):
3011         Add a default handler for file open panel on iOS.
3012         Forwards to the content view.
3013
3014         * UIProcess/ios/WKContentViewInteraction.h:
3015         * UIProcess/ios/WKContentViewInteraction.mm:
3016         (-[WKContentView lastInteractionLocation]):
3017         (-[WKContentView _webTouchEventsRecognized:]):
3018         (-[WKContentView _highlightLongPressRecognized:]):
3019         (-[WKContentView _longPressRecognized:]):
3020         (-[WKContentView _singleTapRecognized:]):
3021         (-[WKContentView _doubleTapRecognized:]):
3022         (-[WKContentView _twoFingerDoubleTapRecognized:]):
3023         Keep track of the last interaction location. This matches previous behavior
3024         of showing the file upload popover where the user tapped, to handle
3025         cases where the <input> is hidden.
3026
3027         (-[WKContentView _showRunOpenPanel:resultListener:]):
3028         (-[WKContentView fileUploadPanelDidDismiss:]):
3029         Handle showing the cleaning up after the file upload panel.
3030
3031         * UIProcess/ios/forms/WKFileUploadPanel.h:
3032         * UIProcess/ios/forms/WKFileUploadPanel.mm: Added.
3033         (squareCropRectForSize):
3034         (squareImage):
3035         (thumbnailSizedImageForImage):
3036         (-[_WKFileUploadItem isVideo]):
3037         (-[_WKFileUploadItem fileURL]):
3038         (-[_WKFileUploadItem displayImage]):
3039         (-[_WKImageFileUploadItem initWithFilePath:originalImage:]):
3040         (-[_WKImageFileUploadItem isVideo]):
3041         (-[_WKImageFileUploadItem fileURL]):
3042         (-[_WKImageFileUploadItem displayImage]):
3043         (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]):
3044         (-[_WKVideoFileUploadItem isVideo]):
3045         (-[_WKVideoFileUploadItem fileURL]):
3046         (-[_WKVideoFileUploadItem displayImage]):
3047         Helper class for each image picker selection. Knows how to get
3048         a file URL and thumbnail display image for the item.
3049
3050         (-[WKFileUploadPanel initWithView:]):
3051         (-[WKFileUploadPanel dealloc]):
3052         (-[WKFileUploadPanel _dispatchDidDismiss]):
3053         (-[WKFileUploadPanel _cancel]):
3054         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
3055         Lifetime of the upload panel requires that either cancel or choose
3056         must happen as we go through the file picking process.
3057
3058         (-[WKFileUploadPanel presentWithParameters:WebKit::resultListener:WebKit::]):
3059         (-[WKFileUploadPanel dismiss]):
3060         API to show or dismiss the panel.
3061
3062         (-[WKFileUploadPanel _dismissDisplayAnimated:]):
3063         Helper to clean up the UI as it progresses or completes no matter the device idiom.
3064
3065         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
3066         (-[WKFileUploadPanel _presentFullscreenViewController:animated:]):
3067         UI presentation for the appropriate idiom.
3068
3069         (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
3070         (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
3071         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
3072         Showing the action sheet or image picker.
3073
3074         (-[WKFileUploadPanel popoverControllerDidDismissPopover:]):
3075         (-[WKFileUploadPanel _willMultipleSelectionDelegateBeCalled]):
3076         (-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]):
3077         (-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
3078         (-[WKFileUploadPanel imagePickerControllerDidCancel:]):
3079         Action sheet or image picker handlers.
3080
3081         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
3082         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
3083         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
3084         (-[WKFileUploadPanel _displayStringForPhotos:videos:]):
3085         Processing selections from the image picker to FileUploadItems.
3086
3087 2014-05-01  Simon Fraser  <simon.fraser@apple.com>
3088
3089         [iOS WK2] Animations on vox.com look wrong
3090         https://bugs.webkit.org/show_bug.cgi?id=132462
3091         <rdar://problem/16731884>
3092
3093         Reviewed by Sam Weinig.
3094         
3095         PlatformCALayerRemote was managing animations incorrectly; aninations
3096         would stick around in m_properties.addedAnimations and get added a second
3097         time by mistake.
3098         
3099         Animations have to be managed a little differently to other properties,
3100         since they are not steady-state things. A given commit has to send over
3101         the added and removed animations, and then clear the layer properties.
3102         
3103         Do this by adding PlatformCALayerRemote::didCommit(), which is called
3104         after the layer properties have been encoded, and have it clear the lists
3105         of added and removed animations.
3106         
3107         removeAnimationForKey() also has to remove the animation from addedAnimations
3108         so that an add/remove in the same commit doesn't send the animation to the
3109         UI process.
3110
3111         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3112         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3113         (WebKit::PlatformCALayerRemote::didCommit):
3114         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
3115         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3116         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3117         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3118
3119 2014-05-01  Simon Fraser  <simon.fraser@apple.com>
3120
3121         [iOS WK2] Can't scroll on gatesnotes.com 
3122         https://bugs.webkit.org/show_bug.cgi?id=132459
3123         <rdar://problem/16770909>
3124
3125         Reviewed by Benjamin Poulain.
3126         
3127         The custom UIView hit-testing code was finding views that were created by
3128         the compositing code for clipping, above the UIScrollViews. We only ever
3129         need to find UIScrollViews here for touch overflow-scrolling, so constrain
3130         the hit-testing code to only return UIScrollViews.
3131
3132         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
3133         (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
3134         (-[UIView _findDescendantViewAtPoint:withEvent:]):
3135         (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.
3136
3137 2014-05-02  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3138
3139         REGRESSION(r168118): [GTK] build broken due to shouldTrackVisitedLinks
3140         https://bugs.webkit.org/show_bug.cgi?id=132447
3141
3142         Unreviewed GTK build fix.
3143
3144         shouldTrackVisitedLinks was removed on r168118.
3145         Visited link coloring works as expected after this change.
3146
3147         * UIProcess/gtk/WebContextGtk.cpp:
3148         (WebKit::WebContext::platformInitializeWebProcess): Remove
3149         shouldTrackVisitedLinks parameter.
3150
3151 2014-05-01  Enrica Casucci  <enrica@apple.com>
3152
3153         REGRESSION (WebKit2) Need to support Learn button.
3154         https://bugs.webkit.org/show_bug.cgi?id=132454
3155         <rdar://problem/16778889>
3156
3157         Reviewed by Benjamin Poulain.
3158
3159         For traditional Chinese we support the ability to add shortcuts
3160         for typing. This is done by pressing the Learn button on the system
3161         menu. This patch adds the necessary code to canPerformAction to enable
3162         the button when appropriate as well as the implementation of the action
3163         itself.
3164         It also adds a check for the Replace button not to be shown when the
3165         selection only contains CJ characters.
3166
3167         * UIProcess/ios/WKContentViewInteraction.mm:
3168         (-[WKContentView _addShortcut:]):
3169         (-[WKContentView canPerformAction:withSender:]):
3170
3171 2014-05-01  Benjamin Poulain  <bpoulain@apple.com>
3172
3173         [iOS][WK2] Tweak the extended background exclusion for MobileSafari
3174         https://bugs.webkit.org/show_bug.cgi?id=132449
3175
3176         Reviewed by Beth Dakin.
3177
3178         Some tweaks for Mobile:
3179         -Use UIViews instead of CALayers to have the same animation timing as the top views.
3180         -The left extended background insets should not exclude the top and bottom insets.
3181
3182         Since this code is in the middle of 2 hot paths, also added some performance tweaks.
3183
3184         * UIProcess/API/Cocoa/WKWebView.mm:
3185         (-[WKWebView initWithFrame:configuration:]):
3186         In the normal case, we do not have extended background exclusion. To avoid creating a background view, we use
3187         the scrollview to render the background.
3188         The separate background view is created lazily if needed.
3189
3190         (-[WKWebView _updateScrollViewBackground]):
3191         (-[WKWebView _frameOrBoundsChanged]):
3192         (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
3193         This create the top and bottom extended background view as needed and update their frames for the current insets.
3194
3195         (-[WKWebView _setObscuredInsets:]):
3196         (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
3197         When an exclusion inset is needed, create a view for it, transfer the color from the ScrollView, and reset the color
3198         of the scrollview.
3199
3200 2014-05-01  Alexey Proskuryakov  <ap@apple.com>
3201
3202         Move size computation for Blob constructor into BlobRegistryImpl
3203         https://bugs.webkit.org/show_bug.cgi?id=132439
3204
3205         Reviewed by Sam Weinig.
3206
3207         Plumbing to make this version of registerBlobURL synchronous for now.
3208         I expect to make it async again when data structures on client side are simplified.
3209
3210         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3211         (WebKit::NetworkBlobRegistry::registerBlobURL):
3212         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3213         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3214         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3215         * NetworkProcess/NetworkConnectionToWebProcess.h:
3216         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3217         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
3218         (WebKit::BlobRegistryProxy::registerBlobURL):
3219         * WebProcess/FileAPI/BlobRegistryProxy.h:
3220
3221 2014-05-01  Beth Dakin  <bdakin@apple.com>
3222
3223         REGRESSION(168053): Repro crash navigating to another page after selecting phone 
3224         numbers on a page
3225         https://bugs.webkit.org/show_bug.cgi?id=132444
3226         -and corresponding-
3227         <rdar://problem/16787285>
3228
3229         Reviewed by Darin Adler.
3230
3231         Missing null-check.
3232         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3233         (WebKit::TelephoneNumberOverlayController::drawRect):
3234
3235 2014-05-01  Anders Carlsson  <andersca@apple.com>
3236
3237         Remove WKBundleSetShouldTrackVisitedLinks and associate code
3238         https://bugs.webkit.org/show_bug.cgi?id=132441
3239
3240         Reviewed by Sam Weinig.
3241
3242         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3243         (WKBundleSetShouldTrackVisitedLinks): Deleted.
3244         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3245         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3246         (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Deleted.
3247         * WebProcess/InjectedBundle/InjectedBundle.h:
3248         * WebProcess/WebPage/VisitedLinkTableController.cpp:
3249         (WebKit::VisitedLinkTableController::addVisitedLink):
3250         * WebProcess/WebProcess.cpp:
3251         (WebKit::WebProcess::WebProcess):
3252         (WebKit::WebProcess::setShouldTrackVisitedLinks): Deleted.
3253         * WebProcess/WebProcess.h:
3254         (WebKit::WebProcess::shouldTrackVisitedLinks): Deleted.
3255
3256 2014-05-01  Anders Carlsson  <andersca@apple.com>
3257
3258         window.testRunner.keepWebHistory() should update the UI process state
3259         https://bugs.webkit.org/show_bug.cgi?id=132440
3260
3261         Reviewed by Dan Bernstein.
3262
3263         * UIProcess/API/C/WKPage.cpp:
3264         (WKPageGetAddsVisitedLinks):
3265         (WKPageSetAddsVisitedLinks):
3266         * UIProcess/API/C/WKPagePrivate.h:
3267
3268 2014-05-01  Filip Pizlo  <fpizlo@apple.com>
3269
3270         Roll out r60161.
3271
3272         Rubber stamped by Mark Hahnenberg.
3273         
3274         This breaks our debugging workflow.
3275
3276         * Shared/WebProcessCreationParameters.cpp:
3277         (WebKit::WebProcessCreationParameters::decode):
3278         * UIProcess/mac/WebContextMac.mm:
3279         (WebKit::registerUserDefaultsIfNeeded):
3280         (WebKit::WebContext::platformInitializeWebProcess):
3281
3282 2014-05-01  Anders Carlsson  <andersca@apple.com>
3283
3284         WKWebView doesn't track visited links (for visited link coloring)
3285         https://bugs.webkit.org/show_bug.cgi?id=132438
3286         <rdar://problem/16704519>
3287
3288         Reviewed by Dan Bernstein.
3289
3290         * Shared/WebProcessCreationParameters.cpp:
3291         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3292         (WebKit::WebProcessCreationParameters::encode):
3293         (WebKit::WebProcessCreationParameters::decode):
3294         * Shared/WebProcessCreationParameters.h:
3295         * UIProcess/API/APIHistoryClient.h:
3296         (API::HistoryClient::addsVisitedLinks):
3297         (API::HistoryClient::shouldTrackVisitedLinks): Deleted.
3298         * UIProcess/API/C/WKContext.cpp:
3299         (WKContextSetHistoryClient):
3300         * UIProcess/API/Cocoa/WKWebView.mm:
3301         (-[WKWebView _addsVisitedLinks]):
3302         (-[WKWebView _setAddsVisitedLinks:]):
3303         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3304         * UIProcess/API/mac/WKView.mm:
3305         (-[WKView initWithFrame:context:configuration:webView:]):
3306         * UIProcess/Cocoa/HistoryClient.h:
3307         * UIProcess/Cocoa/HistoryClient.mm:
3308         (WebKit::HistoryClient::shouldTrackVisitedLinks): Deleted.
3309         * UIProcess/VisitedLinkProvider.cpp:
3310         (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage):
3311         * UIProcess/VisitedLinkProvider.h:
3312         * UIProcess/VisitedLinkProvider.messages.in:
3313         * UIProcess/WebContext.cpp:
3314         (WebKit::WebContext::setHistoryClient):
3315         (WebKit::WebContext::createNewWebProcess):
3316         * UIProcess/WebContext.h:
3317         (WebKit::WebContext::processes):
3318         * UIProcess/WebPageProxy.cpp:
3319         (WebKit::WebPageProxy::WebPageProxy):
3320         * UIProcess/WebPageProxy.h:
3321         (WebKit::WebPageProxy::addsVisitedLinks):
3322         (WebKit::WebPageProxy::setAddsVisitedLinks):
3323         * WebProcess/WebPage/VisitedLinkTableController.cpp:
3324         (WebKit::VisitedLinkTableController::addVisitedLink):
3325         * WebProcess/WebProcess.cpp:
3326         (WebKit::WebProcess::initializeWebProcess):
3327         * WebProcess/WebProcess.h:
3328         * WebProcess/WebProcess.messages.in:
3329
3330 2014-05-01  Benjamin Poulain  <bpoulain@apple.com>
3331
3332         [iOS][WK2] The highlight view needs to be in WKWebView coordinates
3333         https://bugs.webkit.org/show_bug.cgi?id=132435
3334         <rdar://problem/16708861>
3335
3336         Reviewed by Tim Horton.
3337
3338         _UIHighlightView needs to be in WKWebView coordinates so that it render unscaled for any page scale factor.
3339         The view needs to be a child of WKContentView so that it moves/scales with the page.
3340
3341         To fix the issue, add an inverse transform root layer for the hightlight, and scale the coordinates to their
3342         inverse scaled counterpart.
3343
3344         The scale is not updated live with the scaling of WKContentView but that should be fine since the view disappear
3345         on any scaling operation (and I would prefer not add live painting during scaling animation).
3346
3347         * UIProcess/ios/WKContentViewInteraction.h:
3348         * UIProcess/ios/WKContentViewInteraction.mm:
3349         (-[WKContentView cleanupInteraction]):
3350         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
3351         (-[WKContentView _cancelInteraction]):
3352
3353 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
3354
3355         [EFL] There are many warnings with software backend
3356         https://bugs.webkit.org/show_bug.cgi?id=132422
3357
3358         Reviewed by Gyuyoung Kim.
3359
3360         * UIProcess/API/efl/EwkView.cpp:
3361         (EwkView::updateCursor):
3362         (EwkView::transformToScreen):
3363
3364 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
3365
3366         Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
3367         Clean up unnecessary methods in the BackForwardClient interface
3368
3369         It broke a regression test and an API test.
3370
3371         * WebKit2.xcodeproj/project.pbxproj:
3372         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
3373         (WebKit::InjectedBundleBackForwardList::clear):
3374         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3375         (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
3376         (WebKit::WebBackForwardListProxy::addItem):
3377         (WebKit::WebBackForwardListProxy::goToItem):
3378         (WebKit::WebBackForwardListProxy::itemAtIndex):
3379         (WebKit::WebBackForwardListProxy::backListCount):
3380         (WebKit::WebBackForwardListProxy::forwardListCount):
3381         (WebKit::WebBackForwardListProxy::close):
3382         (WebKit::WebBackForwardListProxy::clear):
3383         * WebProcess/WebPage/WebBackForwardListProxy.h:
3384         (WebKit::WebBackForwardListProxy::create):
3385         * WebProcess/WebPage/WebPage.cpp:
3386         (WebKit::WebPage::WebPage):
3387         * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.
3388
3389 2014-04-30  Brady Eidson  <beidson@apple.com>
3390
3391         Only reveal selection service UI after a short delay.
3392         <rdar://problem/16777346> and https://bugs.webkit.org/show_bug.cgi?id=132418
3393
3394         Reviewed by Sam Weinig.
3395
3396         * WebProcess/WebPage/SelectionOverlayController.cpp:
3397         (WebKit::SelectionOverlayController::SelectionOverlayController):
3398         (WebKit::SelectionOverlayController::destroyOverlay): Also stop the hover timer.
3399         (WebKit::SelectionOverlayController::selectionRectsDidChange): Mark the highlight as dirty.
3400         (WebKit::SelectionOverlayController::hoverTimerFired): If the mouse is still over the highlight,
3401           set the visible flag and setNeedsDisplay().
3402         * WebProcess/WebPage/SelectionOverlayController.h:
3403
3404         * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
3405         (WebKit::SelectionOverlayController::drawRect): Recreate the highlight if it exists but
3406           is marked as dirty. After doing that, possibly reset the hover timer.
3407           Also, only performing the actual drawing if the visible flag is set.
3408         (WebKit::SelectionOverlayController::mouseEvent): If the mouse moves on or off the highlight,
3409           start or stop the hover timer accordingly.
3410         (WebKit::SelectionOverlayController::mouseHoverStateChanged): Handle starting/stopping the
3411           hover timer.
3412         (WebKit::SelectionOverlayController::clearHighlight): Deleted.
3413
3414 2014-04-30  Benjamin Poulain  <benjamin@webkit.org>
3415
3416         [iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
3417         https://bugs.webkit.org/show_bug.cgi?id=132373
3418         <rdar://problem/16762178>
3419
3420         Reviewed by Tim Horton.
3421
3422         * UIProcess/API/Cocoa/WKWebView.mm:
3423         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3424         Fix a couple of bugs when the left/right obscured insets change, and/or when the minimum layout size
3425         is narrower than the view itself.
3426
3427         In order:
3428         -We need to perfom and update if the insets change since the unobscuredRect will also change.
3429         -The min/max zoom scale should be based on the minimum layout size, that's the definition of minimum layout size
3430          in scrollview coordinate :)
3431         -The old web view width in content coordinate could be narrower than the old view bounds if there are left or right
3432          insets.
3433
3434 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
3435
3436         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
3437         https://bugs.webkit.org/show_bug.cgi?id=132396
3438
3439         Reviewed by Eric Carlson.
3440         
3441         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
3442
3443         * Configurations/FeatureDefines.xcconfig:
3444         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3445         (WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
3446         (WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Deleted.
3447         (WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Deleted.
3448         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3449         * WebProcess/WebPage/WebPage.cpp:
3450         (WebKit::WebPage::updatePreferences):
3451
3452 2014-04-30  Brady Eidson  <beidson@apple.com>
3453
3454         If there are no services available, do not show the service controls UI
3455         <rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
3456
3457         Reviewed by Tim Horton.
3458
3459         Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
3460         are installed and usable on the system:
3461         * UIProcess/mac/ServicesController.h: Added.
3462         (WebKit::ServicesController::imageServicesExist):
3463         (WebKit::ServicesController::selectionServicesExist):
3464