19a86546998f58fb221c1c203533d178c7e7e60b
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK] The web process can finish while a print operation is still ongoing
4         https://bugs.webkit.org/show_bug.cgi?id=129871
5
6         Reviewed by Martin Robinson.
7
8         This can happen when the last page is closed while the print job
9         is sending data to the printer.
10
11         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
12         process termination when the print job is sending data to the
13         printer and enable it again when job finishes.
14
15 2014-03-09  Jeong Yong-uk  <yong@company100.com>
16
17         Update comment in NetworkResourceLoader
18         https://bugs.webkit.org/show_bug.cgi?id=129997
19
20         Reviewed by Andreas Kling.
21
22         NetworkResourceLoader::resourceHandleStopped() has been renamed to
23         NetworkResourceLoader::cleanup() but the comment is not updated.
24
25         * NetworkProcess/NetworkResourceLoader.cpp:
26         (WebKit::NetworkResourceLoader::start):
27
28 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
29
30         iOS build fix.
31
32         * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
33
34 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
35
36         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
37         https://bugs.webkit.org/show_bug.cgi?id=129812
38
39         Reviewed by Darin Adler.
40
41         * Shared/NativeWebKeyboardEvent.h:
42         * Shared/WebEvent.h:
43         (WebKit::WebKeyboardEvent::handledByInputMethod):
44         (WebKit::WebKeyboardEvent::commands):
45         * Shared/WebEventConversion.cpp:
46         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
47         * Shared/WebKeyboardEvent.cpp:
48         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
49         (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
50         (WebKit::WebKeyboardEvent::encode):
51         (WebKit::WebKeyboardEvent::decode):
52         * Shared/mac/NativeWebKeyboardEventMac.mm:
53         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
54         * Shared/mac/WebEventFactory.h:
55         * Shared/mac/WebEventFactory.mm:
56         (WebKit::WebEventFactory::createWebKeyboardEvent):
57         Keyboard events now carry results of interpretation with them.
58         Ideally, mouse events should also have a handledByInputMethod member, because IMs
59         can handle events, but that can wait until we have actual bugs caused by not diabling
60         default processing for these.
61
62         * UIProcess/API/mac/WKView.mm:
63         (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
64         signature. We don't interpret the event in this code path.
65         (-[WKView doCommandBySelector:]): Added logging.
66         (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
67         infinite loops and re-entrancy. These two work in a unique way in AppKit.
68         Interpret key event before sending it down to WebProcess.
69         (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
70         We need to tell IMs about the event, but key binding processing is moot, all commands
71         are executed on keydown.
72         (-[WKView keyDown:]): Interpret the event.
73         (-[WKView flagsChanged:]): Ditto.
74         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
75         consumedByIM code path.
76         (-[WKView _executeSavedCommandBySelector:]): Added logging.
77
78         * UIProcess/PageClient.h:
79         * UIProcess/ios/PageClientImplIOS.h:
80         * UIProcess/ios/PageClientImplIOS.mm:
81         * UIProcess/mac/PageClientImpl.h:
82         * UIProcess/mac/PageClientImpl.mm:
83         * UIProcess/WebPageProxy.h:
84         * UIProcess/WebPageProxy.messages.in:
85         * UIProcess/ios/WebPageProxyIOS.mm:
86         * UIProcess/mac/WebPageProxyMac.mm:
87         Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
88
89         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
90         (WebKit::WebEditorClient::handleKeyboardEvent):
91         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
92         (WebKit::WebEditorClient::handleKeyboardEvent):
93         (WebKit::WebEditorClient::handleInputMethodKeydown):
94         WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
95         switch between two behaviors.
96
97         * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
98         * WebProcess/WebPage/WebPage.h:
99         Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
100         This means that we sometimes have to pass a null event down to WebCore, but I wasn't
101         able to find any behavior differences from us doing so.
102
103         * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
104         Added a FIXME.
105
106         * WebProcess/WebPage/mac/WebPageMac.mm:
107         (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
108         use current frame as a target, just like input method messages do.
109         (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
110         it only interprets them.
111         Added a check for Esc, as we don't want to handle it in keydown event handler.
112         (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
113         (WebKit::WebPage::insertDictatedText): Ditto.
114         (WebKit::WebPage::executeKeypressCommands): Ditto.
115
116 2014-03-09  Zalan Bujtas  <zalan@apple.com>
117
118         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
119         https://bugs.webkit.org/show_bug.cgi?id=129985
120
121         Reviewed by Simon Fraser.
122
123         This is in preparation to stop passing integral positioned boxes to transform animations.
124
125         No change in behavior.
126
127         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
128
129 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
130
131         [iOS Wk2] Can't scroll after going back to page in page cache
132         https://bugs.webkit.org/show_bug.cgi?id=129989
133         <rdar://problem/16217588>
134
135         Reviewed by Dan Bernstein.
136
137         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
138         function that is called instead of FrameView::forceLayout(). This was unimplemented
139         for the WK2 FrameLoaderClient, so no layout was forced, with the result
140         that the contentSize was never updated and scrolling was broken.
141         
142         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
143         and having it return a bool to say whether the default forceLayout()
144         should be done. WK1 can then continue to have its custom behavior,
145         and Wk2 will simply do a forceLayout().
146         
147         Also remove FrameLaoderClient::forceLayout(), which was never called.
148
149         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
150         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
151         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
152         (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
153
154 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
155
156         [iOS WK2] Get position:fixed working slighlty better
157         https://bugs.webkit.org/show_bug.cgi?id=129988
158
159         Reviewed by Dan Bernstein.
160         
161         iOS uses fixed layout, but does not want fixed elements laid
162         out relative to the frame.
163
164         * WebProcess/WebPage/WebPage.cpp:
165         (WebKit::WebPage::setUseFixedLayout):
166
167 2014-03-08  Jon Lee  <jonlee@apple.com>
168
169         iOS broken after r165342
170         https://bugs.webkit.org/show_bug.cgi?id=129987
171
172         Reviewed by Simon Fraser.
173
174         * NetworkProcess/ios/NetworkProcessIOS.mm:
175         (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
176         platformLowMemoryHandler().
177
178 2014-03-08  Eric Carlson  <eric.carlson@apple.com>
179
180         [iOS] media preferences not initialized correctly in WebKit2
181         https://bugs.webkit.org/show_bug.cgi?id=129983
182
183         Reviewed by Dan Bernstein.
184
185         * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
186         mediaPlaybackRequiresUserGesture correctly for iOS.
187
188 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
189
190         Allow media element to supply the video layer after fullscreen transition has already begun.
191         https://bugs.webkit.org/show_bug.cgi?id=129870
192
193         Reviewed by Eric Carlson.
194
195         WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
196
197         * Shared/mac/RemoteLayerTreeTransaction.h:
198         Remove m_videoLayerIDsPendingFullscreen and accessors.
199
200         * Shared/mac/RemoteLayerTreeTransaction.mm:
201         (WebKit::RemoteLayerTreeTransaction::encode):
202         Don't encode m_videoLayerIDsPendingFullscreen
203
204         (WebKit::RemoteLayerTreeTransaction::decode):
205         Don't decode m_videoLayerIDsPendingFullscreen
206
207         * UIProcess/ios/WebPageProxyIOS.mm:
208         (WebKit::WebPageProxy::didCommitLayerTree):
209         Don't forward didCommitLayerTree to m_videoFullscreenManager.
210
211         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
212         Remove code for synchronizing with the RenderTree.
213         Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
214
215         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
216         Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
217
218         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
219         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
220         Remove initialization for removed members.
221
222         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
223         Rehost the video layer by id and pass on the layer.
224         This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
225
226         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
227         Cleanup the hosting layer.
228
229         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
230         Forward on the video layer's frame to keep the hosted layer in sync with the interface.
231
232         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
233         Forward the videolayer gravity.
234
235         * WebKit2.xcodeproj/project.pbxproj:
236         Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
237
238         * WebProcess/WebPage/WebPage.cpp:
239         (WebKit::WebPage::willCommitLayerTree):
240         Don't invovle the m_videoFullscreenManager in layer tree transactions.
241
242         * WebProcess/ios/WebVideoFullscreenManager.h:
243         Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
244         Instead rehost the video layer directly.
245         Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
246         it can add whatever it likes as needed.
247
248         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
249         No more explicit borrowing and returning video layers.
250         Add functions to keep video layer bounds and gravity in sync with the UI. 
251
252         * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
253         Removed code for synchronizing via RemoteLAyerTreeTransaction.
254
255         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
256         Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
257
258         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
259         Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
260         and hosts it in a context to send to the UIProcess.
261
262         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
263         remove enterFullscreen() and just directly send the IPC message. 
264
265         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
266         Clean up the hosting context.
267
268         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
269         Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
270
271 2014-03-08  Andreas Kling  <akling@apple.com>
272
273         [WK2] Improve the network process low memory handler.
274         <https://webkit.org/b/129977>
275
276         Split the network process low memory handler into platform-specific
277         and shared parts. The shared part tells FastMalloc to release freed
278         pages back to the OS.
279
280         For Mac, added a call to purge the in-memory part of CFURLCache.
281         Remove the malloc_zone_pressure_relief() since that is now taken care
282         of by the shared MemoryPressureHandler code.
283
284         Reviewed by Darin Adler.
285
286         * NetworkProcess/NetworkProcess.cpp:
287         (WebKit::NetworkProcess::initializeNetworkProcess):
288         (WebKit::NetworkProcess::lowMemoryHandler):
289         (WebKit::NetworkProcess::platformLowMemoryHandler):
290         * NetworkProcess/NetworkProcess.h:
291         * NetworkProcess/mac/NetworkProcessMac.mm:
292         (WebKit::NetworkProcess::platformLowMemoryHandler):
293         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
294
295 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
296
297         Remove unnecessary casting in NetworkProcessMainUnix.cpp
298         https://bugs.webkit.org/show_bug.cgi?id=129968
299
300         Reviewed by Andreas Kling.
301
302         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
303         Since socket is an int, int casting is not necessary.
304
305         (WebKit::NetworkProcessMain):
306
307 2014-03-08  Aaron Golden  <golden@inkling.com>
308
309         Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
310         https://bugs.webkit.org/show_bug.cgi?id=129864
311
312         Reviewed by Anders Carlsson.
313
314         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
315         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
316
317 2014-03-07  Tim Horton  <timothy_horton@apple.com>
318
319         [WebKit2][iOS] PDF
320         https://bugs.webkit.org/show_bug.cgi?id=129600
321         <rdar://problem/15260216>
322
323         Reviewed by Anders Carlsson.
324
325         Add a single custom content provider which installs a very primitive PDF view
326         in place of the WKContentView if a PDF is loaded in the main frame.
327
328         * Configurations/WebKit2.xcconfig:
329         Link against CorePDF, for UIPDFPageView.
330
331         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
332         (-[WKWebViewContentProviderRegistry init]):
333         Initialize the registry, using WKPDFView for all PDF MIME types.
334
335         * WebKit2.xcodeproj/project.pbxproj:
336         * UIProcess/ios/WKPDFView.h: Added.
337         * UIProcess/ios/WKPDFView.mm: Added.
338         Add a very simple PDF view based on UIPDFPageView. Additional functionality
339         can come in the future; right now, we just create one view for each page, and
340         depend on CATiledLayer to only paint the pages that are being displayed.
341
342 2014-03-07  Andreas Kling  <akling@apple.com>
343
344         ArgumentEncoder and ArgumentDecoder should be fastmalloced.
345         <https://webkit.org/b/129960>
346
347         Reviewed by Ryosuke Niwa.
348
349         * Platform/IPC/ArgumentDecoder.h:
350         * Platform/IPC/ArgumentEncoder.h:
351
352 2014-03-07  Martin Robinson  <mrobinson@igalia.com>
353
354         Fix the GTK+ build after the recent iOS merge.
355
356         * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
357         * UIProcess/WebPageProxy.h: Ditto.
358
359 2014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
360
361         Unreviewed. Fix build on the EFL port after r165303
362
363         * UIProcess/CoordinatedGraphics/WebView.cpp:
364         (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
365         * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
366         * UIProcess/WebPageProxy.h:
367         * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
368         (WebKit::WebViewEfl::exitFullScreen):
369         (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
370         * UIProcess/efl/WebViewEfl.h: Ditto.
371
372 2014-03-07  Enrica Casucci  <enrica@apple.com>
373
374         [iOS WebKit2] Keyboard accessory comes up when I click a link.
375         https://bugs.webkit.org/show_bug.cgi?id=129949
376         <rdar://problem/16265305>
377
378         Reviewed by Simon Fraser.
379
380         We need to create the accessory view only when needed.
381
382         * UIProcess/ios/WKContentViewInteraction.mm:
383         (-[WKContentView requiresAccessoryView]):
384         (-[WKContentView inputAccessoryView]):
385
386 2014-03-07  Enrica Casucci  <enrica@apple.com>
387
388         [iOS WebKit2] Long-press on a link shows just "Copy".
389         https://bugs.webkit.org/show_bug.cgi?id=129938
390         <rdar://problem/16266054>
391
392         Reviewed by Benjamin Poulain.
393
394         When adding a FIXME comment, I accidentally removed the ! on
395         the if (!element) condition.
396
397         * WebProcess/WebPage/ios/WebPageIOS.mm:
398         (WebKit::WebPage::getPositionInformation):
399
400 2014-03-07  Tim Horton  <timothy_horton@apple.com>
401
402         [WebKit2][iOS] Main-frame custom content providers
403         https://bugs.webkit.org/show_bug.cgi?id=129809
404
405         Reviewed by Dan Bernstein.
406
407         Re-introduce custom content providers to WebKit2 (removed in r152841), but
408         for iOS this time.
409
410         * UIProcess/API/Cocoa/WKWebView.mm:
411         (-[WKWebView initWithFrame:configuration:]):
412         Send the initial MIME types that have custom content providers to the WebProcess.
413
414         (-[WKWebView dealloc]):
415         Unregister our page from the content provider registry.
416         
417         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
418         Install/uninstall the custom content provider. Create a view, if needed,
419         based on the class that the registry has associated with the given MIME type.
420         We unparent the WKContentView while the custom content provider is active,
421         and re-use the existing WKScrollView to contain the custom content provider.
422
423         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
424         Forward loaded data on to the custom content provider for display.
425
426         (-[WKWebView _didCommitLayerTree:WebKit::]):
427         Assert that we aren't getting layer tree commits while using a custom content provider.
428
429         (-[WKWebView viewForZoomingInScrollView:]):
430         If we're using a custom content provider, its view should be used for zooming
431         instead of the (unparented) web content view.
432
433         (-[WKWebView hasContentView]):
434         (-[WKWebView scrollViewWillBeginZooming:withView:]):
435         (-[WKWebView scrollViewWillBeginDragging:]):
436         (-[WKWebView _didFinishScrolling]):
437         (-[WKWebView _updateVisibleContentRects]):
438         If we do not have a parented WKContentView because we are using a custom
439         content provider, we should not forward scroll view related changes to it.
440
441         (-[WKWebView _frameOrBoundsChanged]):
442         Update the minimum size of the custom content provider if the web view size changes.
443
444         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
445         (-[WKWebViewConfiguration copyWithZone:]):
446         (-[WKWebViewConfiguration _contentProviderRegistry]):
447         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
448         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
449         Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
450
451         * UIProcess/API/Cocoa/WKWebViewInternal.h:
452
453         * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
454         A minimal protocol for informing custom content providers of changes to
455         the size of the view, the represented data, and the owning scroll view.
456
457         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
458         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
459         (-[WKWebViewContentProviderRegistry addPage:]):
460         (-[WKWebViewContentProviderRegistry removePage:]):
461         (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
462         (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
463         (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
464         New class, keeps track of a mapping from MIME types to UIViews that
465         conform to the WKWebViewContentProvider protocol.
466
467         * UIProcess/WebPageProxy.cpp:
468         (WebKit::WebPageProxy::WebPageProxy):
469         (WebKit::WebPageProxy::didCommitLoadForFrame):
470         * UIProcess/WebPageProxy.h:
471         * UIProcess/WebPageProxy.messages.in:
472
473         * UIProcess/PageClient.h:
474         * UIProcess/ios/PageClientImplIOS.h:
475         * UIProcess/ios/PageClientImplIOS.mm:
476         (WebKit::PageClientImpl::PageClientImpl):
477         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
478         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
479         * UIProcess/mac/PageClientImpl.h:
480         * UIProcess/mac/PageClientImpl.mm:
481         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
482         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
483         Add parameters to didCommitLoadForMainFrame, indicating if we should use
484         a custom content provider to display the main frame, and what MIME type
485         was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
486         On iOS, forward these to the WKWebView.
487         Also, give PageClientImplIOS a reference to the WKWebView.
488         
489         * UIProcess/ios/WKContentView.mm:
490         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
491         
492         * WebKit2.xcodeproj/project.pbxproj:
493         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
494         (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
495         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
496         Expose whether or not a given frame has a custom content provider to the plug-in.
497
498         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
499         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
500         (WebKit::WebFrameLoaderClient::hasHTMLView):
501         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
502         (WebKit::WebFrameLoaderClient::committedLoad):
503         (WebKit::WebFrameLoaderClient::finishedLoading):
504         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
505         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
506         (WebKit::WebFrameLoaderClient::canCachePage):
507         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
508         (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
509         Restore WebFrameLoaderClient custom representation code, which ensures
510         that data is routed correctly (to the UI process, and not to WebCore) and
511         that we don't try to use the page cache for frames with content providers.
512
513         * WebProcess/WebPage/WebPage.cpp:
514         (WebKit::WebPage::mainFrameHasCustomContentProvider):
515         (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
516         (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
517         (WebKit::WebPage::canShowMIMEType):
518         * WebProcess/WebPage/WebPage.h:
519         * WebProcess/WebPage/WebPage.messages.in:
520         Keep a list of MIME types which can be displayed via custom content providers
521         in WebPage, which will be pushed down from the registry as new providers
522         are added. Plug-ins still take precendence over custom content providers.
523
524 2014-03-07  Anders Carlsson  <andersca@apple.com>
525
526         MigrateHeaders.make should remove C SPI includes from WebKit2 headers
527         https://bugs.webkit.org/show_bug.cgi?id=129937
528         <rdar://problem/15920020>
529
530         Reviewed by Tim Horton.
531
532         * WebKit2.xcodeproj/project.pbxproj:
533         Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
534         to account for WKBase.h now being a public header again.
535
536 2014-03-07  Alexey Proskuryakov  <ap@apple.com>
537
538         REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
539         https://bugs.webkit.org/show_bug.cgi?id=129872
540
541         Reviewed by Tim Horton.
542
543         * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
544         were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
545         But this SPI is unused, and can be simply removed.
546
547         * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
548         locationInWindow is undefined for keyboard events, so we have to use current location.
549         Thankfully, there is a method that returns the location in appropriate coordinate
550         space, unlike +[NSEvent mouseLocation] that we used before.
551
552 2014-03-07  Andy Estes  <aestes@apple.com>
553
554         [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
555         https://bugs.webkit.org/show_bug.cgi?id=129914
556
557         Reviewed by Dan Bernstein.
558
559         We weren't specifying INSTALL_PATH for iOS Simulator builds in
560         BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
561         INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
562         to the root of the iOS Simulator SDK. Fix this by setting
563         INSTALL_PATH_ACTUAL for iphonesimulator.
564
565         * Configurations/BaseXPCService.xcconfig:
566
567 2014-03-07  Andreas Kling  <akling@apple.com>
568
569         [Mac] Notify system malloc of fake memory pressure.
570         <https://webkit.org/b/129908>
571
572         Reviewed by Anders Carlsson.
573
574         * NetworkProcess/mac/NetworkProcessMac.mm:
575         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
576
577             Listen for the fake memory pressure notification and respond by
578             just forwarding to system malloc. We don't do the full WebCore
579             memory pressure handling here, since that will cause stuff that
580             the network process doesn't need to get instantiated.
581
582 2014-03-07  Dean Jackson  <dino@apple.com>
583
584         Attempt to fix the iOS build.
585
586         * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
587
588 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
589
590         [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
591         https://bugs.webkit.org/show_bug.cgi?id=129897
592
593         Reviewed by Benjamin Poulain.
594
595         In WebKit2 on iOS we need to know when layer updates from the web process
596         are stale with respect to visible rect updates from the UI process. Do so
597         by adding an updateID to VisibleContentRectUpdateInfo, and storing it
598         on each side, returning it in RemoteLayerTreeTransaction.
599         
600         Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
601         to group like data members together.
602         
603         * Shared/VisibleContentRectUpdateInfo.cpp:
604         (WebKit::VisibleContentRectUpdateInfo::encode):
605         (WebKit::VisibleContentRectUpdateInfo::decode):
606         * Shared/VisibleContentRectUpdateInfo.h:
607         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
608         (WebKit::VisibleContentRectUpdateInfo::updateID):
609         (WebKit::operator==):
610         * Shared/mac/RemoteLayerTreeTransaction.h:
611         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
612         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
613         * Shared/mac/RemoteLayerTreeTransaction.mm:
614         (WebKit::RemoteLayerTreeTransaction::encode):
615         (WebKit::RemoteLayerTreeTransaction::decode):
616         * UIProcess/WebPageProxy.h:
617         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
618         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
619         * UIProcess/ios/WKContentView.mm:
620         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
621         * WebProcess/WebPage/WebPage.cpp:
622         (WebKit::WebPage::WebPage):
623         (WebKit::WebPage::willCommitLayerTree):
624         * WebProcess/WebPage/WebPage.h:
625         * WebProcess/WebPage/ios/WebPageIOS.mm:
626         (WebKit::WebPage::updateVisibleContentRects):
627
628 2014-03-07  Roger Fong  <roger_fong@apple.com>
629
630         Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
631         https://bugs.webkit.org/show_bug.cgi?id=129873.
632
633         Reviewed by Dean Jackson.
634
635         Remove setSystemWebGLLoadPolicy API.
636         * UIProcess/API/APILoaderClient.h:
637         (API::LoaderClient::resolveWebGLLoadPolicy):
638         * UIProcess/API/C/WKPage.cpp:
639         (WKPageSetPageLoaderClient):
640         * UIProcess/API/C/WKPageLoaderClient.h:
641         * UIProcess/WebPageProxy.cpp:
642         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
643         * UIProcess/WebPageProxy.h:
644         * UIProcess/WebPageProxy.messages.in:
645         * WebProcess/WebPage/mac/WebPageMac.mm:
646         (WebKit::WebPage::webGLPolicyForURL):
647
648         Add API to directly query the WebGL blocking policies from WKSI.
649         * UIProcess/API/C/mac/WKContextPrivateMac.h:
650         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
651         (WKContextShouldBlockWebGL):
652         (WKContextShouldSuggestBlockWebGL):
653
654 2014-03-07  Eric Carlson  <eric.carlson@apple.com>
655
656         Initialize new WKSI functions for WebKit2
657         https://bugs.webkit.org/show_bug.cgi?id=129889
658
659         Reviewed by Simon Fraser.
660
661         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
662         (InitWebCoreSystemInterface):
663
664 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
665
666         [GTK] Use final and override in WebPrintOperationGtk
667         https://bugs.webkit.org/show_bug.cgi?id=129868
668
669         Reviewed by Sergio Villar Senin.
670
671         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
672
673 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
674
675         [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
676         https://bugs.webkit.org/show_bug.cgi?id=129777
677         <rdar://problem/16050832>
678
679         Reviewed by Anders Carlsson.
680
681         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
682         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
683         * WebProcess/com.apple.WebProcess.sb.in:
684
685 2014-03-06  Filip Pizlo  <fpizlo@apple.com>
686
687         If the FTL is build-time enabled then it should be run-time enabled.
688
689         Rubber stamped by Geoffrey Garen.
690
691         * Shared/WebProcessCreationParameters.cpp:
692         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
693         (WebKit::WebProcessCreationParameters::encode):
694         (WebKit::WebProcessCreationParameters::decode):
695         * Shared/WebProcessCreationParameters.h:
696         * UIProcess/mac/WebContextMac.mm:
697         (WebKit::registerUserDefaultsIfNeeded):
698         (WebKit::WebContext::platformInitializeWebProcess):
699         * WebProcess/cocoa/WebProcessCocoa.mm:
700         (WebKit::WebProcess::platformInitializeWebProcess):
701
702 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
703
704         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
705         https://bugs.webkit.org/show_bug.cgi?id=129797
706
707         Reviewed by Gyuyoung Kim.
708
709         * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
710
711 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
712
713         Remove one more setCustomFixedPositionRect() that I missed.
714
715         * UIProcess/DrawingAreaProxy.h:
716
717 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
718
719         Send the fixed position rect to the WebProcess along with the other rects
720         https://bugs.webkit.org/show_bug.cgi?id=129856
721
722         Reviewed by Benjamin Poulain.
723         
724         Remove the functions that pass the custom fixed position rect through
725         the DrawingArea, and replace them by adding this rect to the
726         VisibleContentRectUpdateInfo, along with the "is stable" flag. We
727         then set the custom fixed position rect in the web process for
728         stable updates.
729
730         * Shared/VisibleContentRectUpdateInfo.cpp:
731         (WebKit::VisibleContentRectUpdateInfo::encode):
732         (WebKit::VisibleContentRectUpdateInfo::decode):
733         * Shared/VisibleContentRectUpdateInfo.h:
734         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
735         (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
736         (WebKit::VisibleContentRectUpdateInfo::inStableState):
737         (WebKit::operator==):
738         * UIProcess/DrawingAreaProxy.cpp:
739         * UIProcess/ios/WKContentView.mm:
740         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
741         * WebProcess/WebPage/DrawingArea.h:
742         * WebProcess/WebPage/DrawingArea.messages.in:
743         * WebProcess/WebPage/ios/WebPageIOS.mm:
744         (WebKit::WebPage::updateVisibleContentRects):
745         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
746         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
747         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
748
749 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
750
751         Remove empty class extension in WKContentViewInteraction
752         https://bugs.webkit.org/show_bug.cgi?id=129849
753
754         Reviewed by Enrica Casucci.
755         
756         This empty class extension is cruft left over from refactoring.
757         It can be removed.
758
759         * UIProcess/ios/WKContentViewInteraction.mm:
760
761 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
762
763         [iOS] didUpdateVisibleRect: should use fabs, not abs
764         https://bugs.webkit.org/show_bug.cgi?id=129843
765
766         Reviewed by Benjamin Poulain.
767         
768         When zooming we sent messages to the web process with an unchanging
769         zoom scale because of use of abs() rather than fabs().
770
771         * UIProcess/ios/WKContentView.mm:
772         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
773
774 2014-03-06  Anders Carlsson  <andersca@apple.com>
775
776         Remove WebKit1 header includes from WebKit2
777         https://bugs.webkit.org/show_bug.cgi?id=129824
778
779         Reviewed by Dan Bernstein.
780
781         * UIProcess/mac/WKFullScreenWindowController.mm:
782         (makeResponderFirstResponderIfDescendantOfView):
783         Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
784
785         (-[WKFullScreenWindowController enterFullScreen:]):
786         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
787         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
788         Call makeResponderFirstResponderIfDescendantOfView.
789
790         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
791         Remove unused WebKit1 header import.
792
793         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
794         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
795         Change a category to be on NSObject instead of WebResource.
796
797 2014-03-06  Jon Lee  <jonlee@apple.com>
798
799         iOS build fix.
800
801         Reviewed by Simon Fraser.
802
803         * UIProcess/ios/SmartMagnificationController.mm:
804
805 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
806
807         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
808         https://bugs.webkit.org/show_bug.cgi?id=127944
809
810         Reviewed by Geoffrey Garen.
811
812         * WebProcess/WebCoreSupport/WebChromeClient.h:
813         Update namespaces.
814
815 2014-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
816
817         [GTK] Close the page when the view is disposed instead of when finalized
818         https://bugs.webkit.org/show_bug.cgi?id=129783
819
820         Reviewed by Sergio Villar Senin.
821
822         When a GtkWidget is destroyed, the GObject is disposed, but not
823         finalized if it has additional references. When the destroyed
824         widget is leaked by the application, we leak the page proxy and
825         what is more important the web process in multi-process mode.
826
827         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
828         (webkitWebViewBaseDispose): Close the WebPageProxy.
829
830 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
831
832         AX: Support IOS Accessibility in WK2
833         https://bugs.webkit.org/show_bug.cgi?id=129527
834
835         Build fix.
836
837         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
838         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
839
840 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
841
842         AX: Support IOS Accessibility in WK2
843         https://bugs.webkit.org/show_bug.cgi?id=129527
844
845         Address review comments from Simon noted in bug.
846
847         * UIProcess/ios/WKContentView.mm:
848         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
849         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
850         (-[WKAccessibilityWebPageObject init]):
851         (-[WKAccessibilityWebPageObject dealloc]):
852         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
853         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
854         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
855         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
856         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
857         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
858         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
859
860 2014-03-05  Dean Jackson  <dino@apple.com>
861
862         [WebGL] Use WKSI to see what the system policy for WebGL is
863         https://bugs.webkit.org/show_bug.cgi?id=129722
864         <rdar://problem/15790542>
865
866         Reviewed by Tim Horton.
867
868         Use the WebKitSystemInterface methods WKShouldBlockWebGL
869         and WKShouldSuggestBlockingWebGL to query what the host
870         system thinks about the hardware. Tell the client about
871         the result in a new WebPage method setSystemWebGLPolicy.
872
873         * UIProcess/API/APILoaderClient.h:
874         (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
875         * UIProcess/API/C/WKAPICast.h:
876         (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
877         * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
878         (WKPageSetPageLoaderClient):
879         * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
880         * UIProcess/WebPageProxy.cpp:
881         (WebKit::WebPageProxy::setSystemWebGLPolicy):
882         * UIProcess/WebPageProxy.h:
883         * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
884         * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
885         uses it for hardware detection.
886         * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
887         empty methods for non-Apple platforms.
888         (WebKit::WebPage::WebPage):
889         (WebKit::WebPage::webGLPolicyForURL):
890         (WebKit::WebPage::resolveWebGLPolicyForURL):
891         * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
892         * WebProcess/WebPage/mac/WebPageMac.mm:
893         (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
894         into WKSI and send the result to the client if necessary.
895         (WebKit::WebPage::resolveWebGLPolicyForURL):
896
897 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
898
899         Fix a stupid error in r165118 that caused userVisibleString()
900         to call itself recursively.
901
902         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
903         (WebKit::WebEditorClient::userVisibleString):
904
905 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
906
907         [iOS] Rename the various VisibleExtent variations to exposedContentRect
908         https://bugs.webkit.org/show_bug.cgi?id=129728
909
910         Reviewed by Simon Fraser.
911
912         * WebProcess/WebPage/DrawingArea.h:
913         * WebProcess/WebPage/ios/WebPageIOS.mm:
914         (WebKit::WebPage::updateVisibleContentRects):
915         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
916         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
917         (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
918
919 2014-03-05  Dean Jackson  <dino@apple.com>
920
921         Unreviewed. Fix the Apple-internal builds.
922
923         * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
924
925 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
926
927         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
928         https://bugs.webkit.org/show_bug.cgi?id=129752
929
930         Reviewed by Enrica Casucci.
931         
932         Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
933         all but one by using C functions from WebCoreNSURLExtras.h rather than
934         the NSURL category.
935
936         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
937         (WebKit::WebDragClient::declareAndWriteDragImage):
938         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
939         (WebKit::WebEditorClient::userVisibleString):
940         (WebKit::WebEditorClient::canonicalizeURL):
941         (WebKit::WebEditorClient::canonicalizeURLString):
942
943 2014-03-05  Martin Hock  <mhock@apple.com>
944
945         Add support for sessions to MemoryCache.
946         https://bugs.webkit.org/show_bug.cgi?id=127794
947
948         Reviewed by Sam Weinig.
949
950         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
951         (WebKit::NetworkResourceLoader::sessionID):
952         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
953         * NetworkProcess/mac/DiskCacheMonitor.mm:
954         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
955         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
956         (WebKit::NetworkProcessConnection::didCacheResource):
957         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
958         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
959
960 2014-03-05  Enrica Casucci  <enrica@apple.com>
961
962         [iOS WebKit2] support multi-select and select with groups for iPhone.
963         https://bugs.webkit.org/show_bug.cgi?id=129344
964         <rdar://problem/16206928>
965
966         Reviewed by Simon Fraser.
967
968         This is the remaining work on select element support on iOS.
969         This adds multi-select and select with group support with UI
970         for iPhone that uses UIPickerView.
971
972         * UIProcess/ios/WKContentViewInteraction.mm:
973         (-[WKContentView resignFirstResponder]):
974         (-[WKContentView inputAccessoryView]): Removed incorrect early return.
975         (-[WKContentView _stopAssistingNode]):
976         * UIProcess/ios/forms/WKFormSelectControl.h:
977         * UIProcess/ios/forms/WKFormSelectControl.mm:
978         (adjustedFontSize): Moved here to make it available to both picker and
979         popover based implementations.
980         (-[WKFormSelectControl initWithView:]):
981         * UIProcess/ios/forms/WKFormSelectPicker.mm:
982         (-[WKOptionPickerCell _isSelectable]):
983         (-[WKOptionPickerCell initCommon]):
984         (-[WKOptionPickerCell initWithOptionItem:]):
985         (-[WKOptionGroupPickerCell initWithOptionItem:]):
986         (-[WKOptionGroupPickerCell labelWidthForBounds:]):
987         (-[WKOptionGroupPickerCell layoutSubviews]):
988         (-[WKMultipleSelectPicker initWithView:]):
989         (-[WKMultipleSelectPicker dealloc]):
990         (-[WKMultipleSelectPicker controlView]):
991         (-[WKMultipleSelectPicker controlBeginEditing]):
992         (-[WKMultipleSelectPicker controlEndEditing]):
993         (-[WKMultipleSelectPicker layoutSubviews]):
994         (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
995         (-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
996         (-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
997         (-[WKMultipleSelectPicker findItemIndexAt:]):
998         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
999         (-[WKSelectSinglePicker initWithView:]):
1000         (-[WKSelectSinglePicker controlEndEditing]):
1001         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1002
1003 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
1004
1005         [GTK][CMake] Generate documentation for the DOM bindings
1006         https://bugs.webkit.org/show_bug.cgi?id=126211
1007
1008         Reviewed by Carlos Garcia Campos.
1009
1010         * PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
1011
1012 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1013
1014         Fix the build after r165095
1015
1016         * UIProcess/API/Cocoa/WKWebView.mm:
1017         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1018
1019 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1020
1021         [iOS][WK2] Account for the keyboard when computing the unobscuredRect
1022         https://bugs.webkit.org/show_bug.cgi?id=129660
1023
1024         Reviewed by Enrica Casucci.
1025
1026         Adjust the unobscuredRect when a docked keyboard is on screen.
1027
1028         * UIProcess/API/Cocoa/WKWebView.mm:
1029         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
1030         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1031
1032 2014-03-04  Andy Estes  <aestes@apple.com>
1033
1034         [iOS][WebKit2] Exclude plug-in sandbox profiles from the build
1035         https://bugs.webkit.org/show_bug.cgi?id=129719
1036
1037         Reviewed by Simon Fraser.
1038
1039         * Configurations/WebKit2.xcconfig:
1040
1041 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1042
1043         [iOS][WK2] WKScrollView should be able to cancel touches in content view
1044         https://bugs.webkit.org/show_bug.cgi?id=129711
1045
1046         Reviewed by Simon Fraser.
1047
1048         * UIProcess/ios/WKScrollView.mm:
1049         We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
1050         other gesture recognizers to fail if delayed touches have been dispatched.
1051
1052 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1053
1054         [iOS][WK2] Consider the entire view state on update to find if a change is stable or not
1055         https://bugs.webkit.org/show_bug.cgi?id=129721
1056
1057         Reviewed by Simon Fraser.
1058
1059         Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
1060         is stable or not, we should consider the complete picture from all the type of updates.
1061
1062         * UIProcess/API/Cocoa/WKWebView.mm:
1063         (-[WKWebView _didFinishScrolling]):
1064         (-[WKWebView scrollViewDidScroll:]):
1065         (-[WKWebView scrollViewDidZoom:]):
1066         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
1067         (-[WKWebView _frameOrBoundsChanged]):
1068         (-[WKWebView _updateVisibleContentRects]):
1069         (-[WKWebView _setObscuredInsets:]):
1070         (-[WKWebView _endInteractiveObscuredInsetsChange]):
1071
1072 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
1073
1074         WebVideoFullscreen, should make the hand off of the video layer explicit.
1075         https://bugs.webkit.org/show_bug.cgi?id=128844
1076
1077         Reviewed by Simon Fraser.
1078
1079         This change introduces a more explicit hand-off of the video layer and fullscreen transition.
1080         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
1081         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
1082               enterFullScreen(*) ->
1083                                 <- borrowVideoLayer
1084               willLendVideoLayer ->
1085                didLendVideoLayer ->
1086                                 <- didEnterFullscreen
1087                                 ...
1088                                 <- requestExitFullscreen
1089                   exitFullscreen ->
1090                                 <- returnVideoLayer
1091                                 <- didExitFullscreen
1092         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
1093
1094         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1095         Implement WebVideoFullscreenChangeObserver.
1096         Add support for explicit video layer hand-off.
1097         Add m_videoView to retain the videoLayer's UIView.
1098
1099         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1100         WillLendVideoLayerWithID replaces SetVideoLayerID
1101
1102         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1103         Adopt new methods for explicit video layer hand-off.
1104
1105         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
1106         Observe fullscreen changes.
1107
1108         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
1109         Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
1110         It also removes the videoView from it's super view now that it is safe to do so.
1111
1112         (WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
1113         This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
1114
1115         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
1116         Adopt more explicit fullscreen transition.
1117
1118         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1119         Adopt more explicit fullscreen transition.
1120
1121         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
1122         Adopt more explicit fullscreen transition.
1123
1124         (WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
1125         Adopt more explicit video layer hand-off.
1126
1127         (WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
1128         Adopt more explicit video layer hand-off.
1129
1130         * WebProcess/ios/WebVideoFullscreenManager.cpp:
1131         Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
1132
1133         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
1134         Init three new state members.
1135
1136         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
1137         Update animation state. Don't procede if animation is in progress.
1138
1139         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
1140         Update animation state. Don't procede if animation is in progress.
1141
1142         (WebKit::WebVideoFullscreenManager::willLendVideoLayer):
1143         Adopt more explicit video layer hand-off.
1144         This replaces SetVideoLayer.
1145
1146         (WebKit::WebVideoFullscreenManager::didLendVideoLayer):
1147         This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
1148
1149         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
1150         Adopt more explicit fullscreen transition.
1151
1152         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1153         Adopt more explicit fullscreen transition.
1154
1155         * WebProcess/ios/WebVideoFullscreenManager.h:
1156         Adopt more explicit fullscreen transition.
1157
1158         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1159         Adopt more explicit fullscreen/video layer transition.
1160
1161 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
1162
1163         Get position:fixed working slightly better on iOS WK2
1164         https://bugs.webkit.org/show_bug.cgi?id=129714
1165
1166         Reviewed by Benjamin Poulain.
1167         
1168         Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
1169         again, so it can update fixed and sticky layers.
1170         
1171         Send the scroll position as a FloatPoint, rather than an IntPoint.
1172
1173         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1174         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
1175         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
1176         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1177         * UIProcess/WebPageProxy.h:
1178         * UIProcess/ios/WKContentView.mm:
1179         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1180         Tell the RemoteScrollingCoordinatorProxy about the scroll update.
1181         Only update the customFixedPositionRect if we've finished scrolling or zooming.
1182         * UIProcess/ios/WebPageProxyIOS.mm:
1183         (WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
1184         whether the visible rects changed.
1185
1186 2014-03-04  Conrad Shultz  <conrad_shultz@apple.com>
1187
1188         WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
1189         https://bugs.webkit.org/show_bug.cgi?id=129704
1190
1191         Reviewed by Beth Dakin.
1192
1193         Add NSColor-returning methods to complement the existing UIColor-returning methods.
1194
1195         * UIProcess/API/Cocoa/WKViewPrivate.h:
1196         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
1197
1198         * UIProcess/API/Cocoa/WKWebView.mm:
1199         (-[WKWebView _pageExtendedBackgroundColor]):
1200         Return an NSColor created from the pageExtendedBackgroundColor.
1201
1202         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1203         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
1204
1205         * UIProcess/API/mac/WKView.mm:
1206         (-[WKView _pageExtendedBackgroundColor]):
1207         Return an NSColor created from the pageExtendedBackgroundColor.
1208
1209 2014-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1210
1211         Web Inspector: Give WebProcess private RWI entitlement
1212         https://bugs.webkit.org/show_bug.cgi?id=129710
1213
1214         Reviewed by Timothy Hatcher.
1215
1216         * Configurations/WebContent-iOS.entitlements:
1217         Add entitlements to "WebProcess" when code signing.
1218
1219         * Configurations/WebContentProcess.xcconfig:
1220         Add the private RWI entitlement.
1221
1222 2014-03-04  Enrica Casucci  <enrica@apple.com>
1223
1224         [iOS WebKit2]: Next/Prev button in the accessory bar do not work.
1225         https://bugs.webkit.org/show_bug.cgi?id=129690
1226         <rdar://problem/16073569>
1227
1228         Reviewed by Simon Fraser.
1229
1230         Adding support for Next and Previous buttons in the accessory bar.
1231         When the request is processed by the WebProcess, we identify the next
1232         focusable node that needs to be assisted and we call focus() on the element
1233         letting the focus changing machinery take care of updating the assisted node.
1234         This change also add support for the Clear button, when appropriate and hooks up
1235         the call to the WebProcess.
1236
1237         * UIProcess/WebPageProxy.h:
1238         * UIProcess/ios/WKContentViewInteraction.mm:
1239         (-[WKContentView accessoryTab:]):
1240         (-[WKContentView accessoryClear]):
1241         (-[WKContentView _updateAccessory]):
1242         * UIProcess/ios/WebPageProxyIOS.mm:
1243         (WebKit::WebPageProxy::focusNextAssistedNode):
1244         * WebProcess/WebPage/WebPage.h:
1245         * WebProcess/WebPage/WebPage.messages.in:
1246         * WebProcess/WebPage/ios/WebPageIOS.mm:
1247         (WebKit::nextFocusableElement):
1248         (WebKit::hasFocusableElement):
1249         (WebKit::WebPage::focusNextAssistedNode):
1250         (WebKit::WebPage::getAssistedNodeInformation):
1251
1252 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
1253
1254         Allow iOS DumpRenderTree crashes to show application-specific information
1255         https://bugs.webkit.org/show_bug.cgi?id=129705
1256
1257         Reviewed by David Kilzer.
1258         
1259         Make the WKSI function SetCrashReportApplicationSpecificInformation available
1260         in iOS simulator builds.
1261
1262         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1263         (InitWebCoreSystemInterface):
1264
1265 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
1266
1267         Merge API shims and JSLock
1268         https://bugs.webkit.org/show_bug.cgi?id=129650
1269
1270         Reviewed by Mark Lam.
1271
1272         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
1273         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
1274
1275         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1276         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
1277         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1278
1279 2014-03-03  Enrica Casucci  <enrica@apple.com>
1280
1281         [WK2] Selection remains after reload.
1282         https://bugs.webkit.org/show_bug.cgi?id=129648
1283         <rdar://problem/16207547>
1284
1285         Reviewed by Sam Weinig.
1286
1287         We normally clear the selection when resigninig first responder but
1288         that doesn't get called when reloading the page or when navigating with
1289         back/forward buttons. The correct place to do this is when we get
1290         _didCommitLoadForMainFrame where we already stop assisting the node.
1291         The method we call into webselectionassistant is resignedFirstResponder
1292         which takes care of clearing the selection and removing the selection view.
1293
1294         * UIProcess/ios/WKContentViewInteraction.mm:
1295         (-[WKContentView _stopAssistingNode]):
1296
1297 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
1298
1299         Move EvasGLContext and EvasGLSurface files into the efl common directory.
1300         https://bugs.webkit.org/show_bug.cgi?id=129603
1301
1302         Reviewed by Gyuyoung Kim.
1303
1304         * PlatformEfl.cmake: Update for removed files.
1305
1306 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
1307
1308         [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
1309         https://bugs.webkit.org/show_bug.cgi?id=129649
1310
1311         Reviewed by Sam Weinig.
1312
1313         * WebProcess/WebPage/ios/WebPageIOS.mm:
1314         (WebKit::WebPage::updateVisibleContentRects):
1315         Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
1316         from the UI.
1317
1318 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
1319
1320         [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
1321         https://bugs.webkit.org/show_bug.cgi?id=129641
1322
1323         Reviewed by Sam Weinig.
1324
1325         * UIProcess/API/Cocoa/WKWebView.mm:
1326         (-[WKWebView _didCommitLayerTree:WebKit::]):
1327         Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
1328         In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
1329         did not match the actual WKContentView's area on screen.
1330
1331 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
1332
1333         Forward application suspend resume notifications to the web process.
1334         https://bugs.webkit.org/show_bug.cgi?id=129356
1335
1336         Reviewed by Eric Carlson.
1337
1338         Repost UIApplicationWillEnterForegroundNotification,
1339         UIApplicationDidBecomeActiveNotification and 
1340         UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
1341         As WebUIApplicationWillEnterForegroundNotification,
1342         WebUIApplicationDidBecomeActiveNotification, and
1343         WebUIApplicationWillResignActiveNotification
1344
1345         * UIProcess/WebPageProxy.h:
1346         Add applicationWillEnterForeground()
1347         applicationWillResignActive()
1348         applicationDidBecomeActive()
1349
1350         * UIProcess/ios/WKContentView.mm:
1351         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
1352         Observe notifications.
1353
1354         (-[WKContentView dealloc]):
1355         Stop observing notifications.
1356
1357         (-[WKContentView _applicationWillResignActive:]):
1358         Notify WebPageProxy of the event.
1359
1360         (-[WKContentView _applicationWillEnterForeground:]):
1361         Notify WebPageProxy of the event.
1362
1363         (-[WKContentView _applicationDidBecomeActive:]):
1364         Notify WebPageProxy of the event.
1365
1366         * UIProcess/ios/WebPageProxyIOS.mm:
1367         (WebKit::WebPageProxy::applicationWillEnterForeground):
1368         Send corresponding Message to WebPage.
1369
1370         (WebKit::WebPageProxy::applicationWillResignActive):
1371         Send corresponding Message to WebPage.
1372
1373         (WebKit::WebPageProxy::applicationDidBecomeActive):
1374         Send corresponding Message to WebPage.
1375
1376         * WebProcess/WebPage/WebPage.h:
1377         Add applicationWillEnterForeground()
1378         applicationWillResignActive()
1379         applicationDidBecomeActive()
1380
1381         * WebProcess/WebPage/WebPage.messages.in:
1382         Add applicationWillEnterForeground()
1383         applicationWillResignActive()
1384         applicationDidBecomeActive()
1385
1386         * WebProcess/WebPage/ios/WebPageIOS.mm:
1387         (WebKit::WebPage::applicationWillResignActive):
1388         Post corresponding NSNotification.
1389
1390         (WebKit::WebPage::applicationWillEnterForeground):
1391         Post corresponding NSNotification.
1392
1393         (WebKit::WebPage::applicationDidBecomeActive):
1394         Post corresponding NSNotification.
1395
1396 2014-03-03  Commit Queue  <commit-queue@webkit.org>
1397
1398         Unreviewed, rolling out r165013.
1399         http://trac.webkit.org/changeset/165013
1400         https://bugs.webkit.org/show_bug.cgi?id=129646
1401
1402         New code is not thread safe, asserting on a worker test
1403         (Requested by ap on #webkit).
1404
1405         * NetworkProcess/NetworkResourceLoader.h:
1406         * NetworkProcess/mac/DiskCacheMonitor.h:
1407         * NetworkProcess/mac/DiskCacheMonitor.mm:
1408         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
1409         * WebProcess/Network/NetworkProcessConnection.cpp:
1410         (WebKit::NetworkProcessConnection::didCacheResource):
1411         * WebProcess/Network/NetworkProcessConnection.h:
1412         * WebProcess/Network/NetworkProcessConnection.messages.in:
1413
1414 2014-03-03  Enrica Casucci  <enrica@apple.com>
1415
1416         [iOS WebKit2]: Text fields don't zoom in when focused
1417         https://bugs.webkit.org/show_bug.cgi?id=129632
1418         <rdar://problem/16185230>
1419
1420         Reviewed by Benjamin Poulain.
1421
1422         When focusing the node we need to zoom and center it and possibly
1423         scroll to make it visible.
1424         On iPad we only scroll, without zooming.
1425
1426         * Shared/AssistedNodeInformation.cpp:
1427         (WebKit::AssistedNodeInformation::encode):
1428         (WebKit::AssistedNodeInformation::decode):
1429         * Shared/AssistedNodeInformation.h:
1430         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
1431         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1432         * UIProcess/ios/WKContentView.h:
1433         * UIProcess/ios/WKContentView.mm:
1434         (-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
1435         * UIProcess/ios/WKContentViewInteraction.mm:
1436         (-[WKContentView _displayFormNodeInputView]):
1437         (-[WKContentView _startAssistingNode:]):
1438         * WebProcess/WebPage/ios/WebPageIOS.mm:
1439         (WebKit::WebPage::getAssistedNodeInformation):
1440
1441 2014-03-03  Sam Weinig  <sam@webkit.org>
1442
1443         Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
1444
1445         Reviewed by Simon Fraser.
1446
1447         * UIProcess/ios/WKContentView.mm:
1448         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1449         * WebProcess/WebPage/ios/WebPageIOS.mm:
1450         (WebKit::WebPage::platformInitializeAccessibility):
1451
1452 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
1453
1454         Composited masks not working on iOS after r164890 
1455         https://bugs.webkit.org/show_bug.cgi?id=129630
1456
1457         Reviewed by Jer Noble.
1458         
1459         Fix typo in UIView-related masks code; set the mask layer
1460         on the view, not the maskView.
1461
1462         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1463         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
1464
1465 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
1466
1467         AX: Support IOS Accessibility in WK2
1468         https://bugs.webkit.org/show_bug.cgi?id=129527
1469
1470         Reviewed by Sam Weinig.
1471
1472         Implement enough AX hooks so that accessibility can work in WebKit2.
1473
1474         * Platform/IPC/Connection.h:
1475         * Platform/IPC/mac/ConnectionMac.cpp:
1476         (IPC::Connection::identifier):
1477         * UIProcess/ios/PageClientImplIOS.mm:
1478         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
1479         * UIProcess/ios/WKContentView.h:
1480         * UIProcess/ios/WKContentView.mm:
1481         (-[WKContentView _updateForScreen:]):
1482         (-[WKContentView _setAccessibilityWebProcessToken:]):
1483         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1484         (-[WKContentView _didRelaunchProcess]):
1485         * UIProcess/ios/WebPageProxyIOS.mm:
1486         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
1487         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
1488         * WebKit2.xcodeproj/project.pbxproj:
1489         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1490         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
1491         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
1492         (-[WKAccessibilityWebPageObject init]):
1493         (-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
1494         (-[WKAccessibilityWebPageObject pageScale]):
1495         (-[WKAccessibilityWebPageObject dealloc]):
1496         * WebProcess/WebPage/WebPage.h:
1497         * WebProcess/WebPage/ios/WebPageIOS.mm:
1498         (WebKit::WebPage::platformInitialize):
1499         (WebKit::WebPage::platformInitializeAccessibility):
1500         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
1501         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
1502         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
1503         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
1504         (-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
1505         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
1506         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
1507         (-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
1508         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
1509         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
1510         (-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
1511         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
1512         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
1513         (-[WKAccessibilityWebPageObject accessibilityActionNames]):
1514         (-[WKAccessibilityWebPageObject accessibilityChildren]):
1515         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1516         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1517         (-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
1518         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1519         * WebProcess/WebPage/mac/WebPageMac.mm:
1520         * WebProcess/cocoa/WebProcessCocoa.mm:
1521         (WebKit::WebProcess::platformInitializeProcess):
1522
1523 2014-03-03  Martin Hock  <mhock@apple.com>
1524
1525         Add support for sessions to MemoryCache.
1526         https://bugs.webkit.org/show_bug.cgi?id=127794
1527
1528         Reviewed by Sam Weinig.
1529
1530         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
1531         (WebKit::NetworkResourceLoader::sessionID):
1532         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
1533         * NetworkProcess/mac/DiskCacheMonitor.mm:
1534         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
1535         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
1536         (WebKit::NetworkProcessConnection::didCacheResource):
1537         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
1538         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
1539
1540 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
1541
1542         [iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
1543         https://bugs.webkit.org/show_bug.cgi?id=129620
1544
1545         Reviewed by Simon Fraser.
1546
1547         * WebProcess/WebPage/ios/WebPageIOS.mm:
1548         (WebKit::WebPage::updateVisibleContentRects):
1549
1550 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
1551
1552         Crash when going into video fullscreen on iOS
1553         https://bugs.webkit.org/show_bug.cgi?id=129613
1554
1555         Reviewed by Dean Jackson.
1556         
1557         We shouldn't reparent a UIView's layer without unparenting
1558         the view first.
1559
1560         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1561         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
1562
1563 2014-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1564
1565         [GTK] WebKit2WebExtension GIR can't be used in vala
1566         https://bugs.webkit.org/show_bug.cgi?id=127179
1567
1568         Reviewed by Martin Robinson.
1569
1570         Add a different pkg-config file for the web extensions API.
1571
1572         * GNUmakefile.am:
1573         * PlatformGTK.cmake:
1574         * webkit2gtk-web-extension.pc.in: Added.
1575
1576 2014-03-02  Darin Adler  <darin@apple.com>
1577
1578         Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
1579         https://bugs.webkit.org/show_bug.cgi?id=129592
1580
1581         Reviewed by Sam Weinig.
1582
1583         * UIProcess/WebPageProxy.cpp: Added now-needed include.
1584         * WebProcess/WebPage/WebPage.cpp: Ditto.
1585
1586 2014-03-02  Enrica Casucci  <enrica@apple.com>
1587
1588         [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
1589         https://bugs.webkit.org/show_bug.cgi?id=129594
1590         <rdar://problem/16168978>
1591
1592         Reviewed by Sam Weinig.
1593
1594         As a temporary fix, we are using a synchronous
1595         message to accept autocorrection until we implement
1596         a solution that processes these requests on a thread that
1597         is not the main thread.
1598
1599         * UIProcess/WebPageProxy.h:
1600         * UIProcess/ios/WKContentViewInteraction.mm:
1601         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1602         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1603         * UIProcess/ios/WebPageProxyIOS.mm:
1604         (WebKit::WebPageProxy::applyAutocorrection):
1605         * WebProcess/WebPage/WebPage.h:
1606         * WebProcess/WebPage/WebPage.messages.in:
1607         * WebProcess/WebPage/ios/WebPageIOS.mm:
1608         (WebKit::WebPage::applyAutocorrection):
1609         (WebKit::WebPage::syncApplyAutocorrection):
1610
1611 2014-03-02  Dan Bernstein  <mitz@apple.com>
1612
1613         Try to fix the 32-bit build.
1614
1615         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1616         (adjustedFontSize):
1617
1618 2014-03-02  Sam Weinig  <sam@webkit.org>
1619
1620         Page Cache is not enabled when using the modern WebKit2 API
1621         https://bugs.webkit.org/show_bug.cgi?id=129585
1622
1623         Reviewed by Dan Bernstein.
1624
1625         * UIProcess/API/Cocoa/WKProcessPool.mm:
1626         (-[WKProcessPool initWithConfiguration:]):
1627         Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
1628
1629 2014-03-02  Enrica Casucci  <enrica@apple.com>
1630
1631         [iOS WebKit2] Form controls handling
1632         https://bugs.webkit.org/show_bug.cgi?id=129344
1633         <rdar://problem/16053643>
1634
1635         Reviewed by Simon Fraser.
1636
1637         Adding support for select elements on iOS.
1638         There is full support on iPad, while on iPhone it is
1639         still limited to single select with no groups.
1640         The change also fixes the issue of the keyboard appearing
1641         on screen for types of elements that are implemented with
1642         a popover or a picker.
1643
1644         * Scripts/webkit2/messages.py:
1645         * Shared/AssistedNodeInformation.cpp:
1646         (WebKit::WKOptionItem::encode):
1647         (WebKit::WKOptionItem::decode):
1648         (WebKit::AssistedNodeInformation::encode):
1649         (WebKit::AssistedNodeInformation::decode):
1650         * Shared/AssistedNodeInformation.h:
1651         (WebKit::WKOptionItem::WKOptionItem):
1652         * UIProcess/WebPageProxy.h:
1653         * UIProcess/ios/WKContentViewInteraction.h:
1654         * UIProcess/ios/WKContentViewInteraction.mm:
1655         (-[WKContentView inputView]):
1656         (-[WKContentView assistedNodeSelectOptions]):
1657         (-[WKContentView _startAssistingNode:]):
1658         * UIProcess/ios/WebPageProxyIOS.mm:
1659         (WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
1660         * UIProcess/ios/forms/WKFormSelectControl.h:
1661         * UIProcess/ios/forms/WKFormSelectControl.mm: Added.
1662         (-[WKFormSelectControl initWithView:]):
1663         (+[WKFormSelectControl createPeripheralWithView:]):
1664         (-[WKFormSelectControl assistantView]):
1665         (-[WKFormSelectControl beginEditing]):
1666         (-[WKFormSelectControl endEditing]):
1667         * UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
1668         (-[WKSelectSinglePicker initWithView:]):
1669         (-[WKSelectSinglePicker dealloc]):
1670         (-[WKSelectSinglePicker controlView]):
1671         (-[WKSelectSinglePicker controlBeginEditing]):
1672         (-[WKSelectSinglePicker controlEndEditing]):
1673         (-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
1674         (stringByTrimmingWhitespaceAndNewlines):
1675         (-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
1676         (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
1677         (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
1678         * UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
1679         (stringWithWritingDirection):
1680         (adjustedFontSize):
1681         (-[WKSelectTableViewController initWithView:hasGroups:]):
1682         (-[WKSelectTableViewController viewWillAppear:]):
1683         (-[WKSelectTableViewController numberOfSectionsInTableView:]):
1684         (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
1685         (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
1686         (-[WKSelectTableViewController populateCell:withItem:]):
1687         (-[WKSelectTableViewController findItemIndexAt:]):
1688         (-[WKSelectTableViewController findItemAt:]):
1689         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
1690         (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
1691         (-[WKSelectTableViewController hasText]):
1692         (-[WKSelectTableViewController insertText:]):
1693         (-[WKSelectTableViewController deleteBackward]):
1694         (-[WKSelectPopover initWithView:hasGroups:]):
1695         (-[WKSelectPopover dealloc]):
1696         (-[WKSelectPopover controlView]):
1697         (-[WKSelectPopover controlBeginEditing]):
1698         (-[WKSelectPopover controlEndEditing]):
1699         (-[WKSelectPopover _userActionDismissedPopover:]):
1700         * WebKit2.xcodeproj/project.pbxproj:
1701         * WebProcess/WebPage/WebPage.h:
1702         * WebProcess/WebPage/WebPage.messages.in:
1703         * WebProcess/WebPage/ios/WebPageIOS.mm:
1704         (WebKit::WebPage::setAssistedNodeSelectedIndex):
1705         (WebKit::innerFrameQuad):
1706         (WebKit::WebPage::getPositionInformation):
1707         (WebKit::hasFocusableNode):
1708         (WebKit::WebPage::getAssistedNodeInformation):
1709         (WebKit::WebPage::elementDidFocus):
1710
1711 2014-03-02  Benjamin Poulain  <bpoulain@apple.com>
1712
1713         [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
1714         https://bugs.webkit.org/show_bug.cgi?id=129471
1715
1716         Reviewed by Simon Fraser.
1717
1718         * WebProcess/WebPage/DrawingArea.h:
1719         * WebProcess/WebPage/ios/WebPageIOS.mm:
1720         (WebKit::WebPage::updateVisibleContentRects):
1721         A few interesting changes here:
1722         -Now that we do not use setExposedRect, we can pass the exposed area directly
1723          to the drawing area since everything is now in content coordinates :)
1724         -The scale is now converted to float before being compared to the Page's scaleFactor.
1725          The page's scalefactor being a float, the comparison was failing most of the time.
1726
1727         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1728         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1729         (WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
1730
1731 2014-03-02  Darin Adler  <darin@apple.com>
1732
1733         Change public text iterator API implementations to not depend on 16-bit character pointers
1734         https://bugs.webkit.org/show_bug.cgi?id=129566
1735
1736         Reviewed by Anders Carlsson.
1737
1738         * WebView/WebTextIterator.mm:
1739         (-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
1740         (-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
1741         next text.
1742         (-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
1743         (-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
1744         probably be removing TextIterator::length eventually.
1745
1746         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
1747         * WebProcess/WebPage/WebPage.cpp: Ditto.
1748
1749 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1750
1751         [GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
1752         https://bugs.webkit.org/show_bug.cgi?id=129549
1753
1754         Reviewed by Martin Robinson.
1755
1756         Add a compile error to prevent mixing the UI and web process APIs.
1757
1758         * UIProcess/API/gtk/webkit2.h:
1759         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1760
1761 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1762
1763         [GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
1764         https://bugs.webkit.org/show_bug.cgi?id=129543
1765
1766         Reviewed by Martin Robinson.
1767
1768         We are not installing the C API headers anymore.
1769
1770         * webkit2gtk.pc.in:
1771
1772 2014-03-01  Tim Horton  <timothy_horton@apple.com>
1773
1774         Fix the Mac build.
1775
1776         * UIProcess/mac/ViewGestureController.messages.in:
1777
1778 2014-03-01  Tim Horton  <timothy_horton@apple.com>
1779
1780         WebKit2 View Gestures (Smart Magnification): Support for iOS
1781         https://bugs.webkit.org/show_bug.cgi?id=129146
1782         <rdar://problem/16032668>
1783
1784         Reviewed by Benjamin Poulain.
1785
1786         Add support for double-tap smart magnification on iOS.
1787
1788         * DerivedSources.make:
1789         * UIProcess/API/Cocoa/WKWebView.mm:
1790         (-[WKWebView initWithFrame:configuration:]):
1791         WKContentView is no longer API, so it can know about WKWebView
1792         and will always have one.
1793
1794         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
1795         Don't replace the zoom scale if we're currently animating.
1796
1797         (-[WKWebView _takeViewSnapshot]):
1798         Rename.
1799
1800         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
1801         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
1802         (constrainContentOffset):
1803         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
1804         (-[WKWebView _zoomOutWithOrigin:]):
1805         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
1806         Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
1807         and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
1808         These will use some heuristics to generally center the target rect in the view
1809         in a way that should match WebKit1 fairly closely.
1810
1811         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1812         Don't use the WKContentViewDelegate protocol for things that don't belong there.
1813
1814         * UIProcess/ios/SmartMagnificationController.h: Added.
1815         * UIProcess/ios/SmartMagnificationController.messages.in: Added.
1816         * UIProcess/ios/SmartMagnificationController.mm: Added.
1817         (WebKit::SmartMagnificationController::SmartMagnificationController):
1818         (WebKit::SmartMagnificationController::~SmartMagnificationController):
1819         (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
1820         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
1821         SmartMagnificationController sits off of WKContentView, and sends/receives
1822         messages to the WebProcess to do the smart magnification hit-testing.
1823
1824         * UIProcess/ios/WKContentView.h:
1825         * UIProcess/ios/WKContentView.mm:
1826         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1827         As before, teach WKContentView about its owning WKWebView.
1828
1829         (-[WKContentView _takeViewSnapshot]):
1830         Rename.
1831
1832         (-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
1833         (-[WKContentView _zoomOutWithOrigin:]):
1834         Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.
1835
1836         * UIProcess/ios/WKContentViewInteraction.h:
1837         * UIProcess/ios/WKContentViewInteraction.mm:
1838         (-[WKContentView setupInteraction]):
1839         (-[WKContentView _doubleTapRecognized:]):
1840         (-[WKContentView _twoFingerDoubleTapRecognized:]):
1841         Forward double tap to the SmartMagnificationController.
1842
1843         * UIProcess/mac/ViewGestureController.h:
1844         * UIProcess/mac/ViewGestureController.messages.in:
1845         * UIProcess/mac/ViewGestureControllerMac.mm:
1846         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
1847         Retrieve the minimum/maximum viewport scale from the WebProcess.
1848
1849         * WebKit2.xcodeproj/project.pbxproj:
1850         Add new files.
1851
1852         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1853         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
1854         (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
1855         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
1856         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
1857         Factor out code to send the geometry back to the UI process.
1858
1859         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1860         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
1861         * WebProcess/WebPage/WebPage.cpp:
1862         (WebKit::WebPage::WebPage):
1863         * WebProcess/WebPage/WebPage.h:
1864         We should have a ViewGestureGeometryCollector on iOS too.
1865
1866 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
1867
1868         Unreviewed follow-up to r164905 and r164912.
1869
1870         * Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
1871         * UIProcess/Plugins/PluginProcessProxy.cpp:
1872         (WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.
1873
1874 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
1875
1876         Split UserActivity/CountedUserActivity
1877         https://bugs.webkit.org/show_bug.cgi?id=129520
1878
1879         Reviewed by Sam Weinig.
1880
1881         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
1882         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
1883
1884         * PluginProcess/PluginProcess.h:
1885         (WebKit::PluginProcess::connectionActivity):
1886             - UserActivity->CountedUserActivity
1887         * PluginProcess/mac/PluginProcessMac.mm:
1888         (WebKit::PluginProcess::platformInitializeProcess):
1889             - beginActivity->start
1890         * Shared/ActivityAssertion.cpp:
1891         (WebKit::ActivityAssertion::ActivityAssertion):
1892         (WebKit::ActivityAssertion::~ActivityAssertion):
1893             - beginActivity->increment, endActivity->decrement.
1894         * Shared/ActivityAssertion.h:
1895             - UserActivity->CountedUserActivity
1896         * Shared/ChildProcess.cpp:
1897         (WebKit::ChildProcess::setProcessSuppressionEnabled):
1898             - beginActivity->start, endActivity->stop.
1899         * Shared/ChildProcess.h:
1900             - removed processSuppressionEnabled()
1901         * WebProcess/WebPage/WebPage.cpp:
1902         (WebKit::WebPage::updatePreferences):
1903             - beginActivity->start, endActivity->stop.
1904
1905 2014-03-01  Csaba Osztrogonác  <ossy@webkit.org>
1906
1907         Unreviewed trivial Linux buildfix after r164905.
1908
1909         setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
1910         Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
1911         which means PLATFORM(MAC), because nobody else uses this source file.
1912
1913         But ChildProcessProxy.cpp is used by Linux ports too, so we have to
1914         use the most specific #if guard here, which is PLATFORM(MAC).
1915
1916         * Shared/ChildProcessProxy.cpp:
1917         (WebKit::ChildProcessProxy::didFinishLaunching):
1918
1919 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
1920
1921         [iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
1922         https://bugs.webkit.org/show_bug.cgi?id=129537
1923
1924         Reviewed by Benjamin Poulain.
1925         
1926         When building RemoteLayerTreeTransactions, the ordering of setting created
1927         layers and doing the recursive tree walk was wrong, such that we failed
1928         to noticed layers created during the recursiveBuildTransaction().
1929         
1930         Also harden the UI-side code against Obj-C exceptions thrown when layers
1931         are missing.
1932
1933         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1934         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when 
1935         children are not found, and protect against Obj-C exceptions.
1936         * Shared/mac/RemoteLayerTreeTransaction.mm:
1937         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
1938         Initialize the members.
1939         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1940         (WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
1941         before setting created and destroyed layers, since the walk can create
1942         layers (especially when swapping into tiled layers).
1943
1944 2014-02-28  Jinwoo Song  <jinwoo7.song@samsung.com>
1945
1946         Fix WebKit2 build after r164890
1947         https://bugs.webkit.org/show_bug.cgi?id=129533
1948
1949         Reviewed by Simon Fraser.
1950
1951         LayerRepresentation.h is included to WebPageProxy.h in r164890
1952         but it is not used in non Mac or iOS port.
1953
1954         * UIProcess/WebPageProxy.h:
1955
1956 2014-02-28  Alexey Proskuryakov  <ap@apple.com>
1957
1958         [Mac] Extract _data->_thumbnailView checks into a helper function
1959         https://bugs.webkit.org/show_bug.cgi?id=129517
1960
1961         Reviewed by Sam Weinig.
1962
1963         * UIProcess/API/mac/WKView.mm:
1964         (-[WKView shouldIgnoreMouseEvents]):
1965         (-[WKView scrollWheel:]):
1966         (-[WKView mouseMoved:]):
1967         (-[WKView mouseDown:]):
1968         (-[WKView mouseUp:]):
1969         (-[WKView mouseDragged:]):
1970
1971 2014-02-28  Pratik Solanki  <psolanki@apple.com>
1972
1973         [iOS][WebKit2] Don't use any of the mach exception handling code on iOS
1974         https://bugs.webkit.org/show_bug.cgi?id=129516
1975
1976         Reviewed by Sam Weinig.
1977
1978         This code is not used on iOS after my fix in r164883. We can just move it all under
1979         !PLATFORM(IOS).
1980
1981         * Platform/IPC/Connection.h:
1982         * Platform/IPC/mac/ConnectionMac.cpp:
1983         (IPC::Connection::platformInvalidate):
1984         (IPC::Connection::platformInitialize):
1985         (IPC::Connection::open):
1986         * Shared/ChildProcessProxy.cpp:
1987         (WebKit::ChildProcessProxy::didFinishLaunching):
1988
1989 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
1990
1991         [iOS][WK2] highlight rects should never big bigger than the view
1992         https://bugs.webkit.org/show_bug.cgi?id=129472
1993         <rdar://problem/15673655>
1994
1995         Reviewed by Enrica Casucci.
1996
1997         The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
1998         Use that to constrain our highlight rects.
1999
2000         * UIProcess/ios/WKContentViewInteraction.mm:
2001         (highlightedQuadsFitInRect):
2002         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2003
2004 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
2005
2006         Make UIViews for compositing layers in the UI process on iOS
2007         https://bugs.webkit.org/show_bug.cgi?id=129508
2008
2009         Reviewed by Sam Weinig.
2010         
2011         In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
2012         we need to use UIViews in the compositing layer hierarchy on iOS.
2013         
2014         Make much of the code that currently uses CALayers layer-or-view
2015         agnostic by using a typedef LayerOrView.
2016         
2017         Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
2018         or CALayers; on iOS, we need both paths because we have to set properties
2019         on CALayer for remotely hosted content.
2020         
2021         Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
2022         since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
2023         to be come a .mm file.
2024
2025         * Shared/mac/RemoteLayerTreePropertyApplier.h:
2026         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2027         (-[UIView setSubviews:]):
2028         (WebKit::applyPropertiesToLayer):
2029         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2030         * UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
2031         (asLayer):
2032         * UIProcess/PageClient.h:
2033         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2034         * UIProcess/WebPageProxy.h:
2035         * UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
2036         (asLayer):
2037         * UIProcess/ios/PageClientImplIOS.h:
2038         * UIProcess/ios/PageClientImplIOS.mm:
2039         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
2040         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
2041         * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
2042         (+[WKTransformView layerClass]):
2043         (-[WKRemoteView initWithFrame:contextID:]):
2044         (+[WKRemoteView layerClass]):
2045         (WebKit::RemoteLayerTreeHost::createLayer):
2046         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
2047         (WebKit::layerRepresentationFromLayerOrView):
2048         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2049         * UIProcess/ios/WKContentView.h:
2050         * UIProcess/ios/WKContentView.mm:
2051         (-[WKContentView _setAcceleratedCompositingRootView:]):
2052         * UIProcess/ios/WebPageProxyIOS.mm:
2053         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
2054         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
2055         (WebKit::WebVideoFullscreenManagerProxy::create):
2056         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2057         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
2058         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
2059         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
2060         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
2061         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
2062         (WebKit::WebVideoFullscreenManagerProxy::play):
2063         (WebKit::WebVideoFullscreenManagerProxy::pause):
2064         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2065         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2066         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2067         * UIProcess/mac/PageClientImpl.h:
2068         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2069         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2070         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2071         * UIProcess/mac/RemoteLayerTreeHost.h:
2072         (WebKit::RemoteLayerTreeHost::rootLayer):
2073         * UIProcess/mac/RemoteLayerTreeHost.mm:
2074         (WebKit::RemoteLayerTreeHost::updateLayerTree):
2075         (WebKit::RemoteLayerTreeHost::getLayer):
2076         (WebKit::RemoteLayerTreeHost::createLayer):
2077         * UIProcess/mac/WebPageProxyMac.mm:
2078         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
2079         (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
2080         * WebKit2.xcodeproj/project.pbxproj:
2081         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2082         (PlatformCALayerRemote::recursiveBuildTransaction):
2083
2084 2014-02-28  Anders Carlsson  <andersca@apple.com>
2085
2086         WebKit2.TerminateTwice test is failing.
2087
2088         * UIProcess/WebPageProxy.cpp:
2089         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2090         Turns out this can be called even when we're in the launching state so don't try to
2091         remove the process from the visited link provider when in that state.
2092
2093 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
2094
2095         AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
2096         https://bugs.webkit.org/show_bug.cgi?id=127387
2097
2098         Reviewed by Alexey Proskuryakov.
2099
2100         Speculative fix for crasher. We should check if the connection is still valid before proceeding.
2101
2102         * UIProcess/mac/WebPageProxyMac.mm:
2103         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2104
2105 2014-02-28  Timothy Hatcher  <timothy@apple.com>
2106
2107         Properly handle when Test.html is not present in Production builds.
2108
2109         https://bugs.webkit.org/show_bug.cgi?id=129506
2110
2111         Reviewed by Joseph Pecoraro.
2112
2113         * UIProcess/WebInspectorProxy.cpp:
2114         (WebKit::isMainOrTestInspectorPage):
2115         * UIProcess/mac/WebInspectorProxyMac.mm:
2116         (WebKit::WebInspectorProxy::inspectorTestPageURL):
2117
2118 2014-02-28  Pratik Solanki  <psolanki@apple.com>
2119
2120         [iOS][WebKit2] Don't grab mach exception port on iOS
2121         https://bugs.webkit.org/show_bug.cgi?id=129505
2122         <rdar://problem/15972749>
2123
2124         Reviewed by Anders Carlsson.
2125
2126         Don't grab the mach exception port on iOS so we get crash logs for web process and network
2127         process.
2128
2129         * Shared/ChildProcessProxy.cpp:
2130         (WebKit::ChildProcessProxy::didFinishLaunching):
2131
2132 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
2133
2134         Unreviewed build fix after r164832.
2135
2136         * UIProcess/ios/WebProcessProxyIOS.mm:
2137         (WebKit::WebProcessProxy::updateProcessState): Switch from removed
2138         'isValid' to 'state() != State::Running'
2139
2140 2014-02-28  Anders Carlsson  <andersca@apple.com>
2141
2142         VisitedLinkProvider should keep track of processes, not pages
2143         https://bugs.webkit.org/show_bug.cgi?id=129497
2144
2145         Reviewed by Dan Bernstein.
2146
2147         Use a counted set of WebProcessProxy pointers instead of a set of pages.
2148
2149         * UIProcess/VisitedLinkProvider.cpp:
2150         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2151         Assert that m_processes is null.
2152
2153         (WebKit::VisitedLinkProvider::addProcess):
2154         Add the process to the set.
2155
2156         (WebKit::VisitedLinkProvider::removeProcess):
2157         Remove the process from the set.
2158
2159         * UIProcess/VisitedLinkProvider.h:
2160         
2161         * UIProcess/WebPageProxy.cpp:
2162         (WebKit::WebPageProxy::WebPageProxy):
2163         If our process is currently running, add it to the visited link provider.
2164         Otherwise it will be added in connectionWillOpen.
2165
2166         (WebKit::WebPageProxy::close):
2167         If our process is running, remove it from the visited link provider. 
2168         Otherwise it's either crashed or not yet launched and will not have been added.
2169
2170         (WebKit::WebPageProxy::connectionWillOpen):
2171         Add the process to the visited link provider.
2172
2173         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2174         Remove the process from the visited link provider.
2175
2176 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
2177
2178         [Mac] Stop using some deprecated functions in WKView.mm
2179         https://bugs.webkit.org/show_bug.cgi?id=129455
2180
2181         Reviewed by Anders Carlsson.
2182
2183         * UIProcess/API/mac/WKView.mm:
2184         (-[WKView firstRectForCharacterRange:actualRange:]): Use convertRectToScreen,
2185         which is a replacement for convertBaseToScreen. Don't check for window being null,
2186         because isn't that crazy talk?
2187         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Use event's location
2188         in window instead of current mouse location. Using location that is not synced to
2189         event stream rarely makes sense, and it doesn't look like this is one of those cases.
2190         (-[WKView performDictionaryLookupAtCurrentMouseLocation]): Ditto.
2191
2192 2014-02-27  Jaehun Lim  <ljaehun.lim@samsung.com>
2193
2194         Unreviewed. Fix build after r164832
2195
2196         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
2197         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
2198
2199 2014-02-27  Martin Robinson  <mrobinson@igalia.com>
2200
2201         Fix build after r164832
2202
2203         * UIProcess/DrawingAreaProxyImpl.cpp:
2204         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
2205         by WebProcessProxy::state().
2206
2207 2014-02-27  Tim Horton  <timothy_horton@apple.com>
2208
2209         Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
2210         https://bugs.webkit.org/show_bug.cgi?id=129456
2211         <rdar://problem/16182676>
2212
2213         Reviewed by Simon Fraser.
2214
2215         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2216         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
2217         We were dereferencing the RemoteLayerBackingStore without checking if it exists,
2218         in the accelerated drawing codepath. This case will occur if a layer
2219         previously drew contents, but now does not.
2220
2221 2014-02-27  Anders Carlsson  <andersca@apple.com>
2222
2223         Simplify WebProcessProxy state accessors
2224         https://bugs.webkit.org/show_bug.cgi?id=129453
2225
2226         Reviewed by Andreas Kling.
2227
2228         Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
2229         WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
2230
2231         * Shared/ChildProcessProxy.cpp:
2232         (WebKit::ChildProcessProxy::state):
2233         (WebKit::ChildProcessProxy::sendMessage):
2234         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
2235         * Shared/ChildProcessProxy.h:
2236         (WebKit::ChildProcessProxy::canSendMessage):
2237         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2238         (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
2239         * UIProcess/Network/NetworkProcessProxy.cpp:
2240         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
2241         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2242         (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
2243         * UIProcess/Plugins/PluginProcessProxy.cpp:
2244         (WebKit::PluginProcessProxy::getPluginProcessConnection):
2245         (WebKit::PluginProcessProxy::getSitesWithData):
2246         (WebKit::PluginProcessProxy::clearSiteData):
2247         * UIProcess/WebPageProxy.cpp:
2248         (WebKit::WebPageProxy::WebPageProxy):
2249         (WebKit::WebPageProxy::reattachToWebProcess):
2250         (WebKit::WebPageProxy::waitForDidUpdateViewState):
2251         * UIProcess/WebProcessProxy.cpp:
2252         (WebKit::WebProcessProxy::requestTermination):
2253         (WebKit::WebProcessProxy::enableSuddenTermination):
2254         (WebKit::WebProcessProxy::disableSuddenTermination):
2255         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2256         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2257         * UIProcess/mac/WebPageProxyMac.mm:
2258         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
2259         * UIProcess/mac/WebProcessProxyMac.mm:
2260         (WebKit::WebProcessProxy::updateProcessSuppressionState):
2261
2262 2014-02-27  Simon Fraser  <simon.fraser@apple.com>
2263
2264         Crash tapping on play button on video on iOS
2265         https://bugs.webkit.org/show_bug.cgi?id=129452
2266
2267         Reviewed by Benjamin Poulain.
2268         
2269         node->computedStyle() can return null. Just use
2270         renderer->style() to get the tap highlight color.
2271
2272         * WebProcess/WebPage/ios/WebPageIOS.mm:
2273         (WebKit::WebPage::tapHighlightAtPosition):
2274
2275 2014-02-27  Brian Burg  <bburg@apple.com>
2276
2277         Web Inspector: model tests should use a special Test.html inspector page
2278         https://bugs.webkit.org/show_bug.cgi?id=129190
2279
2280         Reviewed by Timothy Hatcher.
2281
2282         Support creating a separate test inspector page, based on the value of
2283         InspectorController::isUnderTest(). Add this as a separate API call for
2284         WebInspectorProxy. Modify the navigation policy to check the URL against
2285         both normal and test inspector pages.
2286
2287         * UIProcess/WebInspectorProxy.cpp:
2288         (WebKit::isMainOrTestInspectorPage):
2289         (WebKit::decidePolicyForNavigationAction):
2290         (WebKit::WebInspectorProxy::createInspectorPageForTest):
2291         * UIProcess/WebInspectorProxy.h:
2292         * UIProcess/WebInspectorProxy.messages.in:
2293         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2294         (WebKit::WebInspectorProxy::inspectorTestPageURL):
2295         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2296         (WebKit::WebInspectorProxy::inspectorTestPageURL):
2297         * UIProcess/ios/WebInspectorProxyIOS.mm:
2298         (WebKit::WebInspectorProxy::inspectorTestPageURL):
2299         * UIProcess/mac/WebInspectorProxyMac.mm:
2300         (WebKit::WebInspectorProxy::inspectorTestPageURL):
2301         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2302         (WebKit::WebInspectorClient::openInspectorFrontend):
2303         * WebProcess/WebPage/WebInspector.cpp: Some drive-by nullptr refactorings.
2304         (WebKit::WebInspector::WebInspector):
2305         (WebKit::WebInspector::createInspectorPage):
2306         (WebKit::WebInspector::createInspectorPageForTest):
2307         (WebKit::WebInspector::destroyInspectorPage):
2308         * WebProcess/WebPage/WebInspector.h:
2309
2310 2014-02-27  Anders Carlsson  <andersca@apple.com>
2311
2312         Make WebProcessProxy::pages() return an IteratorRange
2313         https://bugs.webkit.org/show_bug.cgi?id=129440
2314
2315         Reviewed by Dan Bernstein.
2316
2317         * UIProcess/API/C/WKPage.cpp:
2318         (WKPageCopyRelatedPages):
2319         Move the implementation of WebPageProxy::relatedPages here.
2320
2321         * UIProcess/WebContext.cpp:
2322         (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit):
2323         Use std::min_element here instead of a manual loop.
2324
2325         * UIProcess/WebPageProxy.cpp:
2326         Remove WebPageProxy::relatedPages().
2327
2328         * UIProcess/WebProcessProxy.cpp:
2329         Remove WebProcessProxy::pages().
2330
2331         * UIProcess/WebProcessProxy.h:
2332         (WebKit::WebProcessProxy::pages):
2333         Make this return an IteratorRange.
2334
2335         (WebKit::WebProcessProxy::pageCount):
2336         New function that returns the page count.
2337
2338 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
2339
2340         [Mac][WK2] Remove hardcoded Cmd+B and Cmd+I from WKView.mm
2341         https://bugs.webkit.org/show_bug.cgi?id=129436
2342
2343         Reviewed by Darin Adler.
2344
2345         * UIProcess/API/mac/WKView.mm: Removed a historic WebKit1 behavior that we don't
2346         need to preserve in WebKit2.
2347
2348 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
2349
2350         [Mac] Remove unused SPI declarations from WKView.mm
2351         https://bugs.webkit.org/show_bug.cgi?id=129434
2352
2353         Reviewed by Sam Weinig.
2354
2355         * UIProcess/API/mac/WKView.mm:
2356
2357 2014-02-26  Michael Saboff  <msaboff@apple.com>
2358
2359         Auto generate bytecode information for bytecode parser and LLInt
2360         https://bugs.webkit.org/show_bug.cgi?id=129181
2361
2362         Reviewed by Mark Lam.
2363
2364         Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
2365         generated Bytecodes.h include file.
2366
2367         * CMakeLists.txt:
2368
2369 2014-02-27  Anders Carlsson  <andersca@apple.com>
2370
2371         Look up already existing VisitedLinkTableController objects by identifier
2372         https://bugs.webkit.org/show_bug.cgi?id=129431
2373
2374         Reviewed by Dan Bernstein.
2375
2376         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2377         (WebKit::visitedLinkTableControllers):
2378         (WebKit::VisitedLinkTableController::getOrCreate):
2379         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
2380         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
2381         * WebProcess/WebPage/VisitedLinkTableController.h:
2382         * WebProcess/WebPage/WebPage.cpp:
2383         (WebKit::WebPage::WebPage):
2384
2385 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2386
2387         [GTK][WK2] Blocks when fetching plugins information
2388         https://bugs.webkit.org/show_bug.cgi?id=115650
2389
2390         Reviewed by Gustavo Noronha Silva.
2391
2392         Use a persistent cache to store the plugins metadata to avoid
2393         having to load all the plugins everytime a plugin is used for the
2394         first time.
2395
2396         * GNUmakefile.am:
2397         * GNUmakefile.list.am:
2398         * PlatformGTK.cmake:
2399         * Shared/Plugins/Netscape/NetscapePluginModule.h:
2400         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2401         (WebKit::NetscapePluginModule::parseMIMEDescription): Make this
2402         method public.
2403         (WebKit::NetscapePluginModule::buildMIMEDescription): Added this
2404         helper to build the MIME description string.
2405         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added.
2406         (WebKit::PluginInfoCache::shared):
2407         (WebKit::PluginInfoCache::PluginInfoCache):
2408         (WebKit::PluginInfoCache::~PluginInfoCache):
2409         (WebKit::PluginInfoCache::saveToFileIdleCallback):
2410         (WebKit::PluginInfoCache::saveToFile):
2411         (WebKit::PluginInfoCache::getPluginInfo):
2412         (WebKit::PluginInfoCache::updatePluginInfo):
2413         * UIProcess/Plugins/gtk/PluginInfoCache.h: Added.
2414         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2415         (WebKit::PluginInfoStore::getPluginInfo): Check first if we have
2416         metadata of the plugin in the cache and update the cache if we
2417         loaded the plugin to get its metadata.
2418
2419 2014-02-27  Ryan Lortie  <desrt@desrt.ca>
2420
2421         need to #include <libgen.h> for basename
2422         https://bugs.webkit.org/show_bug.cgi?id=128597
2423
2424         Reviewed by Carlos Garcia Campos.
2425
2426         * PluginProcess/unix/PluginProcessMainUnix.cpp: include <libgen.h> as required by POSIX for basename
2427
2428 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2429
2430         [GTK] Web Inspector doesn't work with network process enabled
2431         https://bugs.webkit.org/show_bug.cgi?id=127651
2432
2433         Reviewed by Sergio Villar Senin.
2434
2435         The problem is that the web inspector loads so many resources,
2436         that when using the network process, a lot of IPC traffic is
2437         generated causing the send buffer of the socket to be full. When
2438         that happens sendmsg() fails with EAGAIN, because we are using non
2439         blocking sockets, and we are not handling neither EAGAIN nor
2440         EWOULDBLOCK errors (we do when reading from the socket, though).
2441
2442         * Platform/IPC/unix/ConnectionUnix.cpp:
2443         (IPC::Connection::readyReadHandler): Add a log message to know
2444         when reading from the socket fails for any unhandled error.
2445         (IPC::Connection::sendOutgoingMessage): Handle EAGAIN and
2446         EWOULDBLOCK errors to try again in those cases. Also add a log
2447         message for unhandled errors.
2448
2449 2014-02-26  Philippe Normand  <pnormand@igalia.com>
2450
2451         Unreviewed GTK build fix after r164751.
2452
2453         * GNUmakefile.list.am:
2454
2455 2014-02-26  Dan Bernstein  <mitz@apple.com>
2456
2457         iOS build fix.
2458
2459         * UIProcess/ios/forms/WKFormPopover.h:
2460         * UIProcess/ios/forms/WKFormPopover.mm:
2461
2462 2014-02-26  Dan Bernstein  <mitz@apple.com>
2463
2464         Replaced use of the EXCLUDED_SOURCE_FILE_NAMES build setting with #if PLATFORM(…) guards in
2465         the files themselves.
2466
2467         Rubber-stamped by Sam Weinig.
2468
2469         * Configurations/WebKit2.xcconfig: Cleared out EXCLUDED_SOURCE_FILE_NAMES_macosx, and left
2470         EXCLUDED_SOURCE_FILE_NAMES_iphoneos containing just the names of resources the should be
2471         excluded from Copy Files build phases.
2472         * NetworkProcess/ios/NetworkProcessIOS.mm:
2473         * NetworkProcess/mac/NetworkProcessMac.mm:
2474         * Shared/Downloads/ios/DownloadIOS.mm:
2475         * Shared/Downloads/mac/DownloadMac.mm:
2476         * Shared/NativeWebTouchEvent.h:
2477         * Shared/WebPlatformTouchPoint.cpp:
2478         * Shared/WebTouchEvent.cpp:
2479         * Shared/ios/NativeWebKeyboardEventIOS.mm:
2480         * Shared/ios/NativeWebTouchEventIOS.mm:
2481         * Shared/ios/WebIOSEventFactory.h:
2482         * Shared/ios/WebIOSEventFactory.mm:
2483         * Shared/mac/PasteboardTypes.h:
2484         * Shared/mac/PasteboardTypes.mm:
2485         * Shared/mac/PrintInfoMac.mm:
2486         * UIProcess/API/C/WKInspector.cpp:
2487         * UIProcess/API/Cocoa/WKThumbnailView.h:
2488         * UIProcess/API/Cocoa/WKThumbnailView.mm:
2489         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
2490         * UIProcess/API/ios/WKViewIOS.mm:
2491         * UIProcess/API/mac/WKView.mm:
2492         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2493         * UIProcess/ios/PageClientImplIOS.h:
2494         * UIProcess/ios/PageClientImplIOS.mm:
2495         * UIProcess/ios/TextCheckerIOS.mm:
2496         * UIProcess/ios/ViewGestureControllerIOS.mm:
2497         * UIProcess/ios/WKActionSheet.h:
2498         * UIProcess/ios/WKActionSheet.mm:
2499         * UIProcess/ios/WKActionSheetAssistant.h:
2500         * UIProcess/ios/WKActionSheetAssistant.mm:
2501         * UIProcess/ios/WKContentView.mm:
2502         * UIProcess/ios/WKContentViewInteraction.h:
2503         * UIProcess/ios/WKContentViewInteraction.mm:
2504         * UIProcess/ios/WKGeolocationProviderIOS.h:
2505         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2506         * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
2507         * UIProcess/ios/WKScrollView.h:
2508         * UIProcess/ios/WKScrollView.mm:
2509         * UIProcess/ios/WebInspectorProxyIOS.mm:
2510         * UIProcess/ios/WebPageProxyIOS.mm:
2511         * UIProcess/ios/WebProcessProxyIOS.mm:
2512         * UIProcess/ios/forms/WKFormInputControl.h:
2513         * UIProcess/ios/forms/WKFormInputControl.mm:
2514         * UIProcess/ios/forms/WKFormPopover.h:
2515         * UIProcess/ios/forms/WKFormPopover.mm:
2516         * UIProcess/mac/FindIndicatorWindow.h:
2517         * UIProcess/mac/FindIndicatorWindow.mm:
2518         * UIProcess/mac/PageClientImpl.h:
2519         * UIProcess/mac/PageClientImpl.mm:
2520         * UIProcess/mac/TextCheckerMac.mm:
2521         * UIProcess/mac/WKFullKeyboardAccessWatcher.h:
2522         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
2523         * UIProcess/mac/WKPrintingView.h:
2524         * UIProcess/mac/WKPrintingView.mm:
2525         * UIProcess/mac/WebContextMenuProxyMac.h:
2526         * UIProcess/mac/WebContextMenuProxyMac.mm:
2527         * UIProcess/mac/WebInspectorProxyMac.mm:
2528         * UIProcess/mac/WebPageProxyMac.mm:
2529         * UIProcess/mac/WebProcessProxyMac.mm:
2530         * WebProcess/WebCoreSupport/WebChromeClient.h:
2531         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2532         * WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm:
2533         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2534         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
2535         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2536         * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm:
2537         * WebProcess/WebPage/ios/WebPageIOS.mm:
2538         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h:
2539         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2540         * WebProcess/WebPage/mac/WebPageMac.mm:
2541
2542 2014-02-26  Anders Carlsson  <andersca@apple.com>
2543
2544         VisitedLinkProvider should know which pages it belongs to
2545         https://bugs.webkit.org/show_bug.cgi?id=129410
2546
2547         Reviewed by Dan Bernstein.
2548
2549         * UIProcess/VisitedLinkProvider.cpp:
2550         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2551         (WebKit::VisitedLinkProvider::addPage):
2552         (WebKit::VisitedLinkProvider::removePage):
2553         * UIProcess/VisitedLinkProvider.h:
2554         * UIProcess/WebPageProxy.cpp:
2555         (WebKit::WebPageProxy::WebPageProxy):
2556         (WebKit::WebPageProxy::close):
2557
2558 2014-02-26  Enrica Casucci  <enrica@apple.com>
2559
2560         Build fix.
2561
2562         Unexpected line break.
2563
2564         * Configurations/WebKit2.xcconfig:
2565
2566 2014-02-26  Enrica Casucci  <enrica@apple.com>
2567
2568         Build fix.
2569
2570         WKFormInputControl.mm and WKFormPopover.mm should be excluded from OS X builds.
2571
2572         * Configurations/WebKit2.xcconfig:
2573
2574 2014-02-26  Enrica Casucci  <enrica@apple.com>
2575
2576         [iOS WebKit2] Form controls handling: implement date and time controls.
2577         https://bugs.webkit.org/show_bug.cgi?id=129344
2578
2579         Reviewed by Simon Fraser and Joseph Pecoraro.
2580
2581         This is another step in the implementation of form controls on iOS
2582         for WebKit2. This adds support for date and time input elements supporting
2583         the different look and feel for iPhone and iPad.
2584         WKDateTimePicker implements iPhone UI and
2585         WKDateTimePopover implements iPad UI.
2586         WKFormRotatingAccessoryPopover and WKRotatingPopover are
2587         classes that implement the popover object handling the rotation
2588         and they will be used as base class for the select controls as well.
2589
2590         * UIProcess/WebPageProxy.h:
2591         * UIProcess/ios/WKContentViewInteraction.h:
2592         * UIProcess/ios/WKContentViewInteraction.mm:
2593         (-[WKContentView _displayFormNodeInputView]):
2594         (-[WKContentView inputView]):
2595         (-[WKContentView _startAssistingNode:]):
2596         (-[WKContentView _stopAssistingNode]):
2597         * UIProcess/ios/WKFormInputControl.h: Added.
2598         * UIProcess/ios/WKFormInputControl.mm: Added.
2599         (-[WKDateTimePicker datePicker]):
2600         (-[WKDateTimePicker initWithView:datePickerMode:]):
2601         (-[WKDateTimePicker dealloc]):
2602         (-[WKDateTimePicker controlView]):
2603         (-[WKDateTimePicker _timeZoneOffsetFromGMT:]):
2604         (-[WKDateTimePicker _sanitizeInputValueForFormatter:]):
2605         (-[WKDateTimePicker _dateChangedSetAsNumber]):
2606         (-[WKDateTimePicker _dateChangedSetAsString]):
2607         (-[WKDateTimePicker _dateChanged]):
2608         (-[WKDateTimePicker _dateChangeHandler:]):
2609         (-[WKDateTimePicker controlBeginEditing]):
2610         (-[WKDateTimePicker controlEndEditing]):
2611         (-[WKFormInputControl initWithView:]):
2612         (+[WKFormInputControl createPeripheralWithView:]):
2613         (-[WKFormInputControl beginEditing]):
2614         (-[WKFormInputControl endEditing]):
2615         (-[WKFormInputControl assistantView]):
2616         (-[WKDateTimePopoverViewController initWithView:datePickerMode:]):
2617         (-[WKDateTimePopoverViewController innerControl]):
2618         (-[WKDateTimePopoverViewController loadView]):
2619         (-[WKDateTimePopover clear:]):
2620         (-[WKDateTimePopover initWithView:datePickerMode:]):
2621         (-[WKDateTimePopover viewController]):
2622         (-[WKDateTimePopover controlBeginEditing]):
2623         (-[WKDateTimePopover controlEndEditing]):
2624         (-[WKDateTimePopover controlView]):
2625         * UIProcess/ios/WKFormPeripheral.h: Added.
2626         * UIProcess/ios/WKFormPopover.h: Added.
2627         * UIProcess/ios/WKFormPopover.mm: Added.
2628         (-[WKFormRotatingAccessoryPopover initWithView:]):
2629         (-[WKFormRotatingAccessoryPopover accessoryDone]):
2630         (-[WKFormRotatingAccessoryPopover popoverArrowDirections]):
2631         (-[WKFormRotatingAccessoryPopover popoverWasDismissed:]):
2632         (-[WKRotatingPopover initWithView:]):
2633         (-[WKRotatingPopover dealloc]):
2634         (-[WKRotatingPopover popoverController]):
2635         (-[WKRotatingPopover setPopoverController:]):
2636         (-[WKRotatingPopover popoverArrowDirections]):
2637         (-[WKRotatingPopover presentPopoverAnimated:]):
2638         (-[WKRotatingPopover dismissPopoverAnimated:]):
2639         (-[WKRotatingPopover willRotate:]):
2640         (-[WKRotatingPopover didRotate:]):
2641         (-[WKRotatingPopover popoverControllerDidDismissPopover:]):
2642         * UIProcess/ios/WKFormSelectControl.h: Added.
2643         * UIProcess/ios/WebPageProxyIOS.mm:
2644         (WebKit::WebPageProxy::setAssistedNodeValue):
2645         (WebKit::WebPageProxy::setAssistedNodeValueAsNumber):
2646         * WebKit2.xcodeproj/project.pbxproj:
2647         * WebProcess/WebPage/WebPage.h:
2648         * WebProcess/WebPage/WebPage.messages.in:
2649         * WebProcess/WebPage/ios/WebPageIOS.mm:
2650         (WebKit::WebPage::setAssistedNodeValue):
2651         (WebKit::WebPage::setAssistedNodeValueAsNumber):
2652
2653 2014-02-26  Pratik Solanki  <psolanki@apple.com>
2654
2655         [iOS][Webkit2] Enable codesigning entitlement for web process
2656         https://bugs.webkit.org/show_bug.cgi?id=129401
2657         <rdar://problem/16173873>
2658
2659         Reviewed by Geoffrey Garen.
2660
2661         * Configurations/WebContent-iOS.entitlements:
2662
2663 2014-02-26  Anders Carlsson  <andersca@apple.com>
2664
2665         Give VisitedLinkProviders an identifier and send them to the web process
2666         https://bugs.webkit.org/show_bug.cgi?id=129400
2667
2668         Reviewed by Dan Bernstein.
2669
2670         * Shared/WebPageCreationParameters.cpp:
2671         (WebKit::WebPageCreationParameters::encode):
2672         (WebKit::WebPageCreationParameters::decode):
2673         * Shared/WebPageCreationParameters.h:
2674         * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h:
2675         * UIProcess/VisitedLinkProvider.cpp:
2676         (WebKit::generateIdentifier):
2677         (WebKit::VisitedLinkProvider::VisitedLinkProvider):
2678         * UIProcess/VisitedLinkProvider.h:
2679         (WebKit::VisitedLinkProvider::identifier):
2680         * UIProcess/WebContext.cpp:
2681         (WebKit::WebContext::createWebPage):
2682         * UIProcess/WebPageProxy.cpp:
2683         (WebKit::WebPageProxy::WebPageProxy):
2684         (WebKit::WebPageProxy::internalShowContextMenu):
2685         * UIProcess/WebPageProxy.h:
2686
2687 2014-02-26  Jinwoo Song  <jinwoo7.song@samsung.com>
2688
2689         Unreviewed CMAKE build fix after r164751.
2690
2691         * CMakeLists.txt: Renamed WebVisitedLinkProvider.cpp to VisitedLinkTableController.cpp.
2692
2693 2014-02-26  Anders Carlsson  <andersca@apple.com>
2694
2695         Rename WebVisitedLinkProvider to VisitedLinkTableController
2696         https://bugs.webkit.org/show_bug.cgi?id=129396
2697
2698         Reviewed by Dan Bernstein.
2699
2700         * WebKit2.xcodeproj/project.pbxproj:
2701         * WebProcess/WebPage/VisitedLinkTableController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.cpp.
2702         (WebKit::VisitedLinkTableController::create):
2703         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
2704         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
2705         (WebKit::VisitedLinkTableController::isLinkVisited):
2706         (WebKit::VisitedLinkTableController::addVisitedLink):
2707         * WebProcess/WebPage/VisitedLinkTableController.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.h.
2708         * WebProcess/WebPage/WebPage.cpp:
2709         (WebKit::WebPage::WebPage):
2710
2711 2014-02-26  Enrica Casucci  <enrica@apple.com>
2712
2713         Keyboard keeps showing up when clicking links after being shown once.
2714         https://bugs.webkit.org/show_bug.cgi?id=129392
2715
2716         Reviewed by Benjamin Poulain.
2717
2718         This is a regression introduced by http://trac.webkit.org/changeset/164690.
2719         _requiresKeyboardWhenFirstResponder should always return NO, if there is
2720         no assisted node.
2721
2722         * UIProcess/ios/WKContentViewInteraction.mm:
2723         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2724
2725 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
2726
2727         WebProcessProxy::updateProcessState() is causing duplicate symbol linker errors
2728         https://bugs.webkit.org/show_bug.cgi?id=129390
2729
2730         Reviewed by Tim Horton.
2731
2732         Caused by r164737. WebProcessProxy::updateProcessState() is defined in a header, outside of
2733         a class, but isn't inlined.
2734
2735         * UIProcess/WebProcessProxy.h:
2736         (WebKit::WebProcessProxy::updateProcessState):
2737
2738 2014-02-26  Brian Burg  <bburg@apple.com>
2739
2740         Web Replay: route through UserInputBridge when delivering user inputs to WebCore
2741         https://bugs.webkit.org/show_bug.cgi?id=128150
2742
2743         Reviewed by Timothy Hatcher.
2744
2745         When delivering user inputs to WebCore, route calls through the page's UserInputBridge.
2746         This allows us to capture and replay user inputs from WebKit2 solely within WebCore.
2747
2748         * WebProcess/WebPage/WebPage.cpp:
2749         (WebKit::WebPage::tryClose):
2750         (WebKit::WebPage::loadRequest):
2751         (WebKit::WebPage::stopLoadingFrame):
2752         (WebKit::WebPage::stopLoading):
2753         (WebKit::WebPage::reload):
2754         (WebKit::WebPage::contextMenuAtPointInWindow):
2755         (WebKit::handleContextMenuEvent):
2756         (WebKit::handleMouseEvent):
2757         (WebKit::handleWheelEvent):
2758         (WebKit::handleKeyEvent):
2759         (WebKit::WebPage::scroll):
2760         (WebKit::WebPage::logicalScroll):
2761
2762 2014-02-26  Pratik Solanki  <psolanki@apple.com>
2763
2764         [iOS][WebKit2] Adopt SPI for managing tabs
2765         https://bugs.webkit.org/show_bug.cgi?id=129188
2766         <rdar://problem/15939827>
2767
2768         Reviewed by Gavin Barraclough.
2769
2770         Call into assertions SPI to mark tabs as foreground and background.
2771
2772         * Configurations/WebKit2.xcconfig:
2773         * Platform/IPC/Connection.h:
2774         (IPC::Connection::xpcConnection): Expose the xpc_connection_t.
2775         * UIProcess/WebPageProxy.cpp:
2776         (WebKit::WebPageProxy::viewStateDidChange):
2777         * UIProcess/WebProcessProxy.cpp:
2778         (WebKit::WebProcessProxy::didFinishLaunching):
2779         * UIProcess/WebProcessProxy.h:
2780         (WebKit::WebProcessProxy::updateProcessState):
2781         * UIProcess/ios/WebProcessProxyIOS.mm:
2782         (WebKit::WebProcessProxy::updateProcessState): Added. This goes through the list of
2783         WebPageProxies and sets the process state to foreground if one of them is in a window.
2784         Otherwise, it sets it to background.
2785
2786 2014-02-26  Commit Queue  <commit-queue@webkit.org>
2787
2788         Unreviewed, rolling out r164725 and r164731.
2789         http://trac.webkit.org/changeset/164725
2790         http://trac.webkit.org/changeset/164731
2791         https://bugs.webkit.org/show_bug.cgi?id=129382
2792
2793         WebKitTestRunner build is broken on IOS (Requested by smfr on
2794         #webkit).
2795
2796         * UIProcess/API/Cocoa/WKView.h:
2797         * UIProcess/API/ios/WKViewIOS.mm: Added.
2798         (-[WKView initWithCoder:]):
2799         (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
2800         (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
2801         (-[WKView dealloc]):
2802         (-[WKView setFrame:]):
2803         (-[WKView setBounds:]):
2804         (-[WKView scrollView]):
2805         (-[WKView browsingContextController]):
2806         (-[WKView setAllowsBackForwardNavigationGestures:]):
2807         (-[WKView allowsBackForwardNavigationGestures]):
2808         (-[WKView viewForZoomingInScrollView:]):
2809         (-[WKView scrollViewWillBeginZooming:withView:]):
2810         (-[WKView scrollViewWillBeginDragging:]):
2811         (-[WKView _didFinishScrolling]):
2812         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
2813         (-[WKView scrollViewDidEndDecelerating:]):
2814         (-[WKView scrollViewDidScrollToTop:]):
2815         (-[WKView scrollViewDidScroll:]):
2816         (-[WKView scrollViewDidZoom:]):
2817         (-[WKView scrollViewDidEndZooming:withView:atScale:]):
2818         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2819         (-[WKView _frameOrBoundsChanged]):
2820         (-[WKView _updateVisibleContentRects]):
2821         (-[WKView _keyboardChangedWithInfo:adjustScrollView:]):
2822         (-[WKView _keyboardWillChangeFrame:]):
2823         (-[WKView _keyboardDidChangeFrame:]):
2824         (-[WKView _keyboardWillShow:]):
2825         (-[WKView _keyboardWillHide:]):
2826         (-[WKView pageRef]):
2827         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2828         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2829         (-[WKView minimumLayoutSizeOverride]):
2830         (-[WKView setMinimumLayoutSizeOverride:]):
2831         (-[WKView _obscuredInsets]):
2832         (-[WKView _setObscuredInsets:]):
2833         (-[WKView _beginInteractiveObscuredInsetsChange]):
2834         (-[WKView _endInteractiveObscuredInsetsChange]):
2835         (-[WKView _pageExtendedBackgroundColor]):
2836         (-[WKView _setBackgroundExtendsBeyondPage:]):
2837         (-[WKView _backgroundExtendsBeyondPage]):
2838         * WebKit2.xcodeproj/project.pbxproj:
2839
2840 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
2841
2842         Build fix: ContextMenuContextData.* should not be in the Copy Files
2843         phase.
2844
2845         * WebKit2.xcodeproj/project.pbxproj:
2846
2847 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
2848
2849         Fix MiniBrowser/WebKitTestRunner link errors; WKView still
2850         needs to be exported while these tools are using it.
2851
2852         * UIProcess/API/Cocoa/WKView.h:
2853
2854 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
2855
2856         Fix the iOS build by wrapping some context menu stuff in #if ENABLE(CONTEXT_MENUS)
2857
2858         * UIProcess/WebPageProxy.h:
2859
2860 2014-02-26  Martin Hock  <mhock@apple.com>
2861
2862         Create SessionID value-style class for session IDs.
2863         https://bugs.webkit.org/show_bug.cgi?id=129141
2864
2865         The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
2866
2867         Reviewed by Sam Weinig.
2868
2869         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2870         (WebKit::storageSession):
2871         (WebKit::NetworkConnectionToWebProcess::startDownload):
2872         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
2873         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
2874         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
2875         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
2876         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
2877         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
2878         * NetworkProcess/NetworkConnectionToWebProcess.h:
2879         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2880         * NetworkProcess/NetworkProcess.cpp:
2881         (WebKit::NetworkProcess::initializeNetworkProcess):
2882         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
2883         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
2884         * NetworkProcess/NetworkProcess.h:
2885         * NetworkProcess/NetworkProcess.messages.in:
2886         * NetworkProcess/NetworkResourceLoader.h:
2887         * NetworkProcess/RemoteNetworkingContext.h:
2888         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2889         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2890         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
2891         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2892         * Shared/Network/NetworkResourceLoadParameters.cpp:
2893         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2894         * Shared/Network/NetworkResourceLoadParameters.h:
2895         * Shared/SessionTracker.cpp:
2896         (WebKit::staticSessionMap):
2897         (WebKit::storageSessionToID):
2898         (WebKit::SessionTracker::sessionMap):
2899         (WebKit::SessionTracker::session):
2900         (WebKit::SessionTracker::sessionID):
2901         (WebKit::SessionTracker::setSession):
2902         (WebKit::SessionTracker::destroySession):
2903         * Shared/SessionTracker.h: Move code to SessionID class.
2904         * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
2905         (IPC::ArgumentCoder<SessionID>::encode):
2906         (IPC::ArgumentCoder<SessionID>::decode):
2907         * Shared/WebCoreArgumentCoders.h:
2908         * Shared/mac/CookieStorageShim.mm:
2909         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
2910         * UIProcess/APISession.cpp:
2911         (API::generateID):
2912         (API::Session::defaultSession):
2913         (API::Session::legacyPrivateSession):
2914         (API::Session::Session):
2915         (API::Session::isEphemeral):
2916         (API::Session::getID):
2917         * UIProcess/APISession.h:
2918         * UIProcess/WebContext.cpp:
2919         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
2920         (WebKit::WebContext::createNewWebProcess):
2921         * UIProcess/WebContext.h:
2922         * UIProcess/WebPageProxy.h:
2923         (WebKit::WebPageProxy::sessionID):
2924         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2925         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
2926         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2927         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2928         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2929         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
2930         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2931         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2932         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2933         (WebKit::WebFrameNetworkingContext::storageSession):
2934         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2935         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2936         (WebKit::WebFrameNetworkingContext::storageSession):
2937         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2938         * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
2939         (WebKit::WebPage::WebPage):
2940         (WebKit::WebPage::sessionID):
2941         (WebKit::WebPage::isUsingEphemeralSession):
2942         (WebKit::WebPage::setSessionID):
2943         (WebKit::WebPage::updatePreferences):
2944         * WebProcess/WebPage/WebPage.h:
2945         * WebProcess/WebPage/WebPage.messages.in:
2946         * WebProcess/WebProcess.cpp:
2947         (WebKit::WebProcess::ensurePrivateBrowsingSession):
2948         (WebKit::WebProcess::destroyPrivateBrowsingSession):
2949         * WebProcess/WebProcess.h:
2950         * WebProcess/WebProcess.messages.in:
2951
2952 2014-02-26  Anders Carlsson  <andersca@apple.com>
2953
2954         Get rid of WKViewIOS.mm
2955         https://bugs.webkit.org/show_bug.cgi?id=129378
2956
2957         Reviewed by Simon Fraser.
2958
2959         * UIProcess/API/Cocoa/WKView.h:
2960         * UIProcess/API/ios/WKViewIOS.mm: Removed.
2961         * WebKit2.xcodeproj/project.pbxproj:
2962
2963 2014-02-26  Alexey Proskuryakov  <ap@apple.com>
2964
2965         [iOS] Remove some erroneously captured blocks
2966         https://bugs.webkit.org/show_bug.cgi?id=129362
2967
2968         Reviewed by Sam Weinig.
2969
2970         Remove unused captured Objective-C block variables (capturing these doesn't work anyway).
2971
2972         * UIProcess/ios/WKContentViewInteraction.mm:
2973         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2974         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2975
2976 2014-02-26  Brady Eidson  <beidson@apple.com>
2977
2978         Pipe experimental image controls menu up to WebKit2
2979         https://bugs.webkit.org/show_bug.cgi?id=129339
2980
2981         Reviewed by Simon Fraser.
2982
2983         Add a WebKit object to represent the data from a ContextMenuContext object that can be shared via IPC:
2984         * Shared/ContextMenuContextData.cpp: Added.
2985         (WebKit::ContextMenuContextData::ContextMenuContextData):
2986         (WebKit::ContextMenuContextData::encode):
2987         (WebKit::ContextMenuContextData::decode):
2988         * Shared/ContextMenuContextData.h: Added.
2989         (WebKit::ContextMenuContextData::webHitTestResultData):
2990         (WebKit::ContextMenuContextData::isImageControl):
2991
2992         Update the rest of WK2 to use this object instead of WebHitTestResult::Data directly:
2993         * UIProcess/WebPageProxy.cpp:
2994         (WebKit::WebPageProxy::showContextMenu):
2995         (WebKit::WebPageProxy::internalShowContextMenu): Also make an ENABLE(IMAGE_CONTROLS) change here.
2996         * UIProcess/WebPageProxy.h:
2997         * UIProcess/WebPageProxy.messages.in:
2998
2999         * WebProcess/WebPage/WebContextMenu.cpp:
3000         (WebKit::WebContextMenu::show):
3001
3002         * CMakeLists.txt:
3003         * GNUmakefile.list.am:
3004         * WebKit2.xcodeproj/project.pbxproj:
3005
3006 2014-02-26  Enrique Ocaña González  <eocanha@igalia.com>
3007
3008         WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_INDICATOR,HIGHLIGHT}
3009         https://bugs.webkit.org/show_bug.cgi?id=129263
3010
3011         Reviewed by Sergio Villar Senin.
3012
3013         Avoided the need of WEBKIT_FIND_OPTIONS_SHOW_* fields by changing the semantics
3014         of the findOptions field in WebKitFindOptions.
3015
3016         * UIProcess/API/gtk/WebKitFindController.cpp: Now
3017         _WebKitFindControllerPrivate.findOptions is interpreted as WebKit::FindOptions
3018         instead of WebKitFindOptions like before. Now the conversion has to be done in
3019         both ways.
3020         (toWebKitFindOptions): Added conversion function from WebKit::FindOptions to
3021         WebKitFindOptions.
3022         (webkit_find_controller_get_options):
3023         (webKitFindControllerPerform):
3024         (webkit_find_controller_search):
3025         (webkit_find_controller_search_next):
3026         (webkit_find_controller_search_previous):
3027         (webkit_find_controller_count_matches):
3028         * UIProcess/API/gtk/WebKitFindController.h: Removed values that shouldn't be
3029         exposed.
3030
3031 2014-02-26  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
3032
3033         Inspector server should be enabled only when the web sockets is enabled too.
3034         https://bugs.webkit.org/show_bug.cgi?id=129304
3035
3036         Reviewed by Csaba Osztrogonác.
3037
3038         * config.h:
3039
3040 2014-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3041
3042         Unreviewed. Fix GTK+ build after r164702.
3043
3044         * UIProcess/DrawingAreaProxy.cpp:
3045
3046 2014-02-26  Martin Robinson  <mrobinson@igalia.com>
3047
3048         [GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds
3049         https://bugs.webkit.org/show_bug.cgi?id=129319
3050
3051         Reviewed by Carlos Garcia Campos.
3052
3053         * GNUmakefile.am: Do not generate the documentation configuration file if the port
3054         is disabled.
3055
3056 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
3057
3058         [iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
3059         https://bugs.webkit.org/show_bug.cgi?id=129354
3060
3061         Reviewed by Sam Weinig.
3062
3063         During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
3064         DrawingArea and WebPage were in completely inconsistent states.
3065
3066         Some of those disconnect were temporary (like when setting the rect and scale in two different
3067         messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
3068         This was causing various visual glitches.
3069
3070         To fix this, all the updates from the UIProcess are funneled through a single path and the values
3071         are split into 3 different groups/types.
3072         When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
3073         through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
3074         Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
3075         the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
3076         and they are sent to the UIProcess.
3077
3078         At any point, there are 3 types of scale and rects used for different purpose:
3079         -In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
3080          is currently on screen.
3081          That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
3082         -In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
3083          state.
3084         -Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
3085          to setup the rendering.
3086
3087         With this change, there are two paths for updating the page scale factor:
3088         -The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
3089          ->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
3090         -If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
3091          ->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
3092         The two kind of updates frequently conflicts during loading. We differentiate those through the flag
3093         scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.
3094
3095         * DerivedSources.make:
3096         * Scripts/webkit2/messages.py:
3097         (struct_or_class):
3098         * Shared/VisibleContentRectUpdateInfo.cpp: Added.
3099         (WebKit::VisibleContentRectUpdateInfo::encode):
3100         (WebKit::VisibleContentRectUpdateInfo::decode):
3101         * Shared/VisibleContentRectUpdateInfo.h: Added.
3102         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3103         (WebKit::VisibleContentRectUpdateInfo::exposedRect):
3104         (WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
3105         (WebKit::VisibleContentRectUpdateInfo::scale):
3106         (WebKit::operator==):
3107         * Shared/mac/RemoteLayerTreeTransaction.h:
3108         (WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
3109         (WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
3110         * Shared/mac/RemoteLayerTreeTransaction.mm:
3111         (WebKit::RemoteLayerTreeTransaction::encode):
3112         (WebKit::RemoteLayerTreeTransaction::decode):
3113         * UIProcess/API/Cocoa/WKWebView.mm:
3114         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
3115         (-[WKWebView _didFinishScrolling]):
3116         (-[WKWebView scrollViewDidScroll:]):
3117         (-[WKWebView scrollViewDidZoom:]):
3118         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
3119         (-[WKWebView _frameOrBoundsChanged]):
3120         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
3121         (-[WKWebView _setObscuredInsets:]):
3122         (-[WKWebView _endInteractiveObscuredInsetsChange]):
3123         * UIProcess/API/ios/WKViewIOS.mm:
3124         (-[WKView _updateVisibleContentRects]):
3125         * UIProcess/DrawingAreaProxy.cpp:
3126         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3127         (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
3128         * UIProcess/DrawingAreaProxy.h:
3129         (WebKit::DrawingAreaProxy::updateDebugIndicator):
3130         * UIProcess/WebPageProxy.h:
3131         (WebKit::WebPageProxy::displayedContentScale):
3132         (WebKit::WebPageProxy::exposedContentRect):
3133         (WebKit::WebPageProxy::unobscuredContentRect):
3134         * UIProcess/ios/WKContentView.h:
3135         * UIProcess/ios/WKContentView.mm:
3136         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
3137         (-[WKContentView didFinishScrolling]):
3138         (-[WKContentView didZoomToScale:]):
3139         * UIProcess/ios/WebPageProxyIOS.mm:
3140         (WebKit::WebPageProxy::updateVisibleContentRects):
3141         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3142         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3143         (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
3144         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
3145         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
3146         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
3147         * WebKit2.xcodeproj/project.pbxproj:
3148         * WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
3149         (WebKit::ViewUpdateDispatcher::create):
3150         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
3151         (WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
3152         (WebKit::ViewUpdateDispatcher::initializeConnection):
3153         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
3154         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
3155         * WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
3156         * WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.
3157         * WebProcess/WebPage/WebPage.cpp:
3158         (WebKit::WebPage::WebPage):
3159         (WebKit::WebPage::scalePage):
3160         * WebProcess/WebPage/WebPage.h:
3161         (WebKit::WebPage::scaleWasSetByUIProcess):
3162         * WebProcess/WebPage/WebPage.messages.in:
3163         * WebProcess/WebPage/ios/WebPageIOS.mm:
3164         (WebKit::WebPage::tapHighlightAtPosition):
3165         (WebKit::WebPage::updateVisibleContentRects):
3166         (WebKit::WebPage::willStartUserTriggeredZooming):
3167         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3168         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3169         * WebProcess/WebProcess.cpp:
3170         (WebKit::WebProcess::WebProcess):
3171         (WebKit::WebProcess::initializeConnection):
3172         * WebProcess/WebProcess.h:
3173
3174 2014-02-25  Anders Carlsson  <andersca@apple.com>
3175
3176         Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
3177         https://bugs.webkit.org/show_bug.cgi?id=129357
3178
3179         Reviewed by Sam Weinig.
3180
3181         * WebProcess/WebPage/WebPage.cpp:
3182         (WebKit::WebPage::WebPage):
3183         * WebProcess/WebPage/WebVisitedLinkProvider.h:
3184
3185 2014-02-25  Enrica Casucci  <enrica@apple.com>
3186
3187         [WebKit2] Form controls handling.
3188         https://bugs.webkit.org/show_bug.cgi?id=129344
3189         <rdar://problem/16053643>
3190
3191         Reviewed by Simon Fraser and Joseph Pecoraro.
3192
3193         This is the step toward adding support for
3194         form controls iOS style. It adds the logic to
3195         select the appropriate keyboard type based on the
3196         element type and introduces the AssistedNodeInformation
3197         structure used currently for the keyboard type selection
3198         and that will be used to populate pickers and popovers.
3199         It also provides information to enable/disable next/previous
3200         buttons in the accessory view.
3201
3202         * Scripts/webkit2/messages.py:
3203         (struct_or_class):
3204         * Shared/AssistedNodeInformation.cpp: Added.
3205         (WebKit::AssistedNodeInformation::encode):
3206         (WebKit::AssistedNodeInformation::decode):
3207         * Shared/AssistedNodeInformation.h: Added.
3208         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
3209         * UIProcess/PageClient.h:
3210         * UIProcess/WebPageProxy.h:
3211         * UIProcess/WebPageProxy.messages.in:
3212         * UIProcess/ios/PageClientImplIOS.h:
3213         * UIProcess/ios/PageClientImplIOS.mm:
3214         (WebKit::PageClientImpl::startAssistingNode):
3215         * UIProcess/ios/WKContentViewInteraction.h:
3216         * UIProcess/ios/WKContentViewInteraction.mm:
3217         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
3218         (-[WKContentView _updateAccessory]):
3219         (toUITextAutocapitalize):
3220         (-[WKContentView textInputTraits]):
3221         (-[WKContentView assistedNodeInformation]):
3222         (-[WKContentView _startAssistingNode:]):
3223         (-[WKContentView _stopAssistingNode]):
3224         * UIProcess/ios/WebPageProxyIOS.mm:
3225         (WebKit::WebPageProxy::startAssistingNode):
3226         * WebKit2.xcodeproj/project.pbxproj:
3227         * WebProcess/WebPage/WebPage.h:
3228         * WebProcess/WebPage/ios/WebPageIOS.mm:
3229         (WebKit::isAssistableNode):
3230         (WebKit::hasFocusableNode):
3231         (WebKit::WebPage::getAssistedNodeInformation):
3232         (WebKit::WebPage::elementDidFocus):
3233
3234 2014-02-25  Anders Carlsson  <andersca@apple.com>
3235
3236         VisitedLinkProvider should be refcounted
3237         https://bugs.webkit.org/show_bug.cgi?id=129351
3238
3239         Reviewed by Sam Weinig.
3240
3241         * UIProcess/VisitedLinkProvider.cpp:
3242         (WebKit::VisitedLinkProvider::create):
3243         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
3244         * UIProcess/VisitedLinkProvider.h:
3245         * UIProcess/WebContext.cpp:
3246         (WebKit::WebContext::WebContext):
3247         (WebKit::WebContext::processDidFinishLaunching):
3248         (WebKit::WebContext::disconnectProcess):
3249         (WebKit::WebContext::addVisitedLinkHash):
3250         * UIProcess/WebContext.h:
3251
3252 2014-02-25  Anders Carlsson  <andersca@apple.com>
3253
3254         Make WebContext handle populating visited links
3255         https://bugs.webkit.org/show_bug.cgi?id=129348
3256
3257         Reviewed by Tim Horton.
3258
3259         This makes it possible to decouple VisitedLinkProvider from WebContext.
3260
3261         * UIProcess/VisitedLinkProvider.cpp:
3262         (WebKit::VisitedLinkProvider::VisitedLinkProvider):
3263         (WebKit::VisitedLinkProvider::processDidFinishLaunching):
3264         * UIProcess/VisitedLinkProvider.h:
3265         * UIProcess/WebContext.cpp:
3266         (WebKit::WebContext::WebContext):
3267         (WebKit::WebContext::processDidFinishLaunching):
3268         * UIProcess/WebContext.h:
3269
3270 2014-02-25  Anders Carlsson  <andersca@apple.com>
3271
3272         DrawingAreaProxy is using WebCore's Timer
3273         https://bugs.webkit.org/show_bug.cgi?id=129347
3274         <rdar://problem/16078133>
3275
3276         Reviewed by Tim Horton.
3277
3278         Use a RunLoop::Timer instead.
3279
3280         * UIProcess/DrawingAreaProxy.cpp:
3281         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3282         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
3283         * UIProcess/DrawingAreaProxy.h:
3284
3285 2014-02-25  Anders Carlsson  <andersca@apple.com>
3286
3287         Add WKVisitedLinkProvider
3288         https://bugs.webkit.org/show_bug.cgi?id=129343
3289
3290         Reviewed by Sam Weinig.
3291
3292         * UIProcess/API/Cocoa/WKVisitedLinkProvider.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
3293         * UIProcess/API/Cocoa/WKVisitedLinkProvider.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
3294         * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
3295         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
3296         * UIProcess/API/Cocoa/WKWebView.mm:
3297         (-[WKWebView initWithFrame:configuration:]):
3298         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3299         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3300         (-[WKWebViewConfiguration visitedLinkProvider]):
3301         (-[WKWebViewConfiguration setVisitedLinkProvider:]):
3302         * WebKit2.xcodeproj/project.pbxproj:
3303
3304 2014-02-25  Anders Carlsson  <andersca@apple.com>
3305
3306         Simplify visited link style invalidation
3307         https://bugs.webkit.org/show_bug.cgi?id=129340
3308
3309         Reviewed by Dan Bernstein.
3310
3311         * UIProcess/VisitedLinkProvider.cpp:
3312         (WebKit::VisitedLinkProvider::addVisitedLink):
3313         * WebProcess/WebProcess.cpp:
3314         (WebKit::WebProcess::visitedLinkStateChanged):
3315         (WebKit::WebProcess::allVisitedLinkStateChanged):
3316
3317 2014-02-25  Anders Carlsson  <andersca@apple.com>
3318
3319         Fix build.
3320
3321         Remove VisitedLinkStrategy.
3322
3323         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3324         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3325         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3326         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3327
3328 2014-02-25  Alexey Proskuryakov  <ap@apple.com>
3329
3330         Rolling out http://trac.webkit.org/changeset/164611, because it broke
3331         WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
3332
3333         The change was for:
3334
3335         https://bugs.webkit.org/show_bug.cgi?id=129141
3336         Create SessionID class
3337
3338 2014-02-25  Dan Bernstein  <mitz@apple.com>
3339
3340         [Cocoa] Add delegate method for customizing actions on activated elements
3341         https://bugs.webkit.org/show_bug.cgi?id=129290
3342
3343         Reviewed by Anders Carlsson.
3344
3345         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added. Declared new delegate method.
3346
3347         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
3348         (_WKActivatedElementType): Defined enum of element types.
3349         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
3350         (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:]): Added type parameter
3351         to the initializer, used to set the new type property.
3352         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
3353
3354         * UIProcess/Cocoa/UIClient.h:
3355         * UIProcess/Cocoa/UIClient.mm:
3356         (WebKit::UIClient::setDelegate): Initialize webViewActionsForElementDefaultActions member
3357         of m_delegateMethods.
3358         (WebKit::UIClient::actionsForElement): Added. Calls out to the new delegate method if
3359         implemented. Otherwise returns the default actions.
3360
3361         * UIProcess/ios/WKActionSheetAssistant.mm:
3362         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Use new _elementInfo ivar
3363         instead of creating element info here.
3364         (-[WKActionSheetAssistant showImageSheet]): Create element info here and assign it to
3365         _elementInfo ivar if presenting a sheet. Call the UI client to get custom actions.
3366         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
3367         (-[WKActionSheetAssistant cleanupSheet]): Clear _elementInfo ivar.
3368         * WebKit2.xcodeproj/project.pbxproj: Added reference to WKUIDelegatePrivate.h.
3369
3370 2014-02-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3371
3372         Unreviewed EFL build fix attempt after r164562
3373
3374         * CMakeLists.txt: Added WebVisitedLinkProvider.cpp.
3375
3376 2014-02-25  Sergio Villar Senin  <svillar@igalia.com>
3377
3378         [CSS Grid Layout] Add ENABLE flag
3379         https://bugs.webkit.org/show_bug.cgi?id=129153
3380
3381         Reviewed by Simon Fraser.
3382
3383         Added ENABLE_CSS_GRID_LAYOUT feature flag.
3384
3385         * Configurations/FeatureDefines.xcconfig:
3386         * WebProcess/WebPage/WebPage.cpp:
3387         (WebKit::WebPage::updatePreferences):
3388
3389 2014-02-25  Zan Dobersek  <zdobersek@igalia.com>
3390
3391         Unreviewed GTK build fix after r164652.
3392
3393         * GNUmakefile.list.am: Add WebVisitedLinkProvider build targets.
3394
3395 2014-02-24  Anders Carlsson  <andersca@apple.com>
3396
3397         Make it possible to set the visited link provider on a per page basis
3398         https://bugs.webkit.org/show_bug.cgi?id=129288
3399
3400         Reviewed by Andreas Kling.
3401
3402         Add WebVisitedLinkProvider which just calls the web process.
3403
3404         * WebKit2.xcodeproj/project.pbxproj:
3405         * WebProcess/WebPage/WebPage.cpp:
3406         (WebKit::WebPage::WebPage):
3407         * WebProcess/WebPage/WebVisitedLinkProvider.cpp: Added.
3408         (WebKit::WebVisitedLinkProvider::create):
3409         (WebKit::WebVisitedLinkProvider::WebVisitedLinkProvider):
3410         (WebKit::WebVisitedLinkProvider::~WebVisitedLinkProvider):
3411         (WebKit::WebVisitedLinkProvider::isLinkVisited):
3412         (WebKit::WebVisitedLinkProvider::addVisitedLink):
3413         * WebProcess/WebPage/WebVisitedLinkProvider.h: Added.
3414
3415 2014-02-25  Dan Bernstein  <mitz@apple.com>
3416
3417         Build fix for case-sensitive filesystems.
3418
3419         * WebProcess/ios/WebVideoFullscreenManager.cpp:
3420
3421 2014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3422
3423         [GTK] Mark view source mode methods as deprecated
3424         https://bugs.webkit.org/show_bug.cgi?id=128920
3425
3426         Reviewed by Martin Robinson.
3427
3428         Mark WEBKIT_VIEW_MODE_SOURCE as deprecated in documentation and
3429         only show warnings when set_view_mode is used with WEBKIT_VIEW_MODE_SOURCE.
3430
3431         * UIProcess/API/gtk/WebKitWebView.cpp:
3432         (webkit_web_view_set_view_mode):
3433         (webkit_web_view_get_view_mode):
3434         * UIProcess/API/gtk/WebKitWebView.h:
3435
3436 2014-02-24  Alexey Proskuryakov  <ap@apple.com>
3437
3438         [Mac] Stop looking for plug-in profiles in /S/L/Sandbox/Profiles
3439         https://bugs.webkit.org/show_bug.cgi?id=129262
3440         <rdar://problem/16149420>
3441
3442         Reviewed by Sam Weinig.
3443
3444         Remove unused code.
3445
3446         * Shared/Plugins/mac/PluginSandboxProfile.mm:
3447         (WebKit::pluginSandboxProfileDirectory):
3448         (WebKit::pluginSandboxCommonProfile):
3449         (WebKit::pluginSandboxProfile):
3450         (WebKit::pluginHasSandboxProfile):
3451
3452 2014-02-24  Martin Robinson  <mrobinson@igalia.com>
3453
3454         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
3455         https://bugs.webkit.org/show_bug.cgi?id=128417
3456
3457         Reviewed by Carlos Garcia Campos.
3458
3459         * GNUmakefile.am: Generate a config file for generate-gtkdoc.
3460         * PlatformGTK.cmake: Ditto.
3461
3462 2014-02-24  Dan Bernstein  <mitz@apple.com>
3463
3464         32-bit build fix.
3465
3466         * UIProcess/API/Cocoa/_WKElementAction.mm:
3467         (+[_WKElementAction elementActionWithType:customTitle:]):
3468
3469 2014-02-24  Dan Bernstein  <mitz@apple.com>
3470
3471         [Cocoa] Start adding API for customizing actions on activated elements
3472         https://bugs.webkit.org/show_bug.cgi?id=129284
3473
3474         Reviewed by Anders Carlsson.
3475
3476         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
3477         was WKElementActionInfo.
3478         * UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
3479         (-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
3480         initializer from WKElementActionInfo.
3481         (-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
3482         (-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
3483         (-[_WKActivatedElementInfo _interactionLocation]): Ditto.
3484         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.
3485
3486         * UIProcess/API/Cocoa/_WKElementAction.h: Added.
3487         (_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
3488         * UIProcess/API/Cocoa/_WKElementAction.mm: Added.
3489         (-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
3490         initializer from WKActionSheet.mm.
3491         (-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
3492         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
3493         (copyElement): Moved from WKActionSheet.mm.
3494         (saveImage): Ditto.
3495         (addToReadingList): Ditto.
3496         (+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
3497         (+[_WKElementAction elementActionWithType:]): Ditto.
3498         (-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
3499         * UIProcess/API/Cocoa/WKElementActionInternal.h: Added.
3500
3501         * UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
3502         * UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
3503         * UIProcess/ios/WKActionSheetAssistant.mm:
3504         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
3505         (-[WKActionSheetAssistant showImageSheet]):
3506         (-[WKActionSheetAssistant showLinkSheet]):
3507         (-[WKActionSheetAssistant showDataDetectorsSheet]):
3508
3509         * WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
3510         class name check to allow _WK as a class name prefix.
3511
3512 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
3513
3514         Use RetainPtrs for two WKContentView data members
3515         https://bugs.webkit.org/show_bug.cgi?id=129276
3516
3517         Reviewed by Benjamin Poulain.
3518         
3519         The UITextInputTraits were leaked. Fix with RetainPtr goodness.
3520         
3521         Rename the obscure _accessory to _formAccessoryView and
3522         make it a RetainPtr.
3523         
3524         Rearrange the data members of the WKContentView class extension
3525         for better packing and readability.
3526
3527         * UIProcess/ios/WKContentView.h:
3528         * UIProcess/ios/WKContentViewInteraction.h:
3529         * UIProcess/ios/WKContentViewInteraction.mm:
3530         (-[WKContentView cleanupInteraction]):
3531         (-[WKContentView inputAccessoryView]):
3532         (-[WKContentView _updateAccessory]):
3533         (-[WKContentView textInputTraits]):
3534
3535 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
3536
3537         Remove WKInteractionView, move code into WKContentView
3538         https://bugs.webkit.org/show_bug.cgi?id=129275
3539
3540         Reviewed by Benjamin Poulain.
3541         
3542         WKInteractionView as an interim solution as WebKit2 on iOS was being
3543         brought up, and should be removed.
3544         
3545         Move its code into a category on WKContentView, mostly unchanged. The
3546         WKContentView (WKInteraction) categroy now implements the various protocols
3547         that WKInteractionView implemented.
3548         
3549         WKContentView is not an API class, so no longer has WK_API_CLASS, and can
3550         have implementation-related data members. WKContentViewInternal.h is removed.
3551         
3552         WKContentView now exposes a WebPageProxy* rather than a WKPageRef.
3553         
3554         Other changes: WKActionSheetAssistant no longer stores a WebPageProxy,
3555         getting it from the WKContentView instead.
3556         
3557         WKAutoCorrectionData and InteractionInformationAtPosition are stored via unique_ptr
3558         to reduce class size, and avoid having to expose their details in the header.
3559
3560         * Configurations/WebKit2.xcconfig:
3561         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3562         * UIProcess/API/ios/WKViewIOS.mm:
3563         (-[WKView setAllowsBackForwardNavigationGestures:]):
3564         (-[WKView pageRef]):
3565         (-[WKView _pageExtendedBackgroundColor]):
3566         (-[WKView _setBackgroundExtendsBeyondPage:]):
3567         (-[WKView _backgroundExtendsBeyondPage]):
3568         * UIProcess/ios/PageClientImplIOS.mm:
3569         * UIProcess/ios/WKActionSheet.h:
3570         * UIProcess/ios/WKActionSheet.mm:
3571         (-[WKActionSheet initWithView:]):
3572         (+[WKElementAction customElementActionWithTitle:actionHandler:]):
3573         (copyElement):
3574         (saveImage):
3575         (+[WKElementAction standardElementActionWithType:customTitle:]):
3576         (-[WKElementAction runActionWithElementInfo:view:]):
3577         * UIProcess/ios/WKActionSheetAssistant.h:
3578         * UIProcess/ios/WKActionSheetAssistant.mm:
3579         (-[WKActionSheetAssistant initWithView:]):
3580         (-[WKActionSheetAssistant dealloc]):
3581         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
3582         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
3583         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
3584         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3585         (-[WKActionSheetAssistant showImageSheet]):
3586         (-[WKActionSheetAssistant showLinkSheet]):
3587         (-[WKActionSheetAssistant showDataDetectorsSheet]):
3588         (-[WKActionSheetAssistant cleanupSheet]):
3589         * UIProcess/ios/WKContentView.h:
3590         * UIProcess/ios/WKContentView.mm:
3591         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
3592         (-[WKContentView dealloc]):
3593         (-[WKContentView page]):
3594         (-[WKContentView isAssistingNode]):
3595         (-[WKContentView didFinishScrolling]):
3596         (-[WKContentView willStartZoomOrScroll]):
3597         (-[WKContentView willStartUserTriggeredScroll]):
3598         (-[WKContentView willStartUserTriggeredZoom]):
3599         (-[WKContentView didZoomToScale:]):
3600         (-[WKContentView _didCommitLoadForMainFrame]):
3601         (-[WKContentView _didCommitLayerTree:WebKit::]):
3602         * UIProcess/ios/WKContentViewInteraction.h: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.h.
3603         * UIProcess/ios/WKContentViewInteraction.mm: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.mm.
3604         (-[WKContentView setupInteraction]):
3605         (-[WKContentView cleanupInteraction]):
3606         (-[WKContentView positionInformation]):
3607         (-[WKContentView setInputDelegate:]):
3608         (-[WKContentView inputDelegate]):
3609         (-[WKContentView isEditable]):
3610         (-[WKContentView canBecomeFirstResponder]):
3611         (-[WKContentView resignFirstResponder]):
3612         (-[WKContentView _webTouchEventsRecognized:]):
3613         (inflateQuad):
3614         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
3615         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
3616         (-[WKContentView _cancelLongPressGestureRecognizer]):
3617         (-[WKContentView _didScroll]):
3618         (-[WKContentView _requiresKeyboardResetOnReload]):
3619         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
3620         (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
3621         (isSamePair):
3622         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
3623         (-[WKContentView _showImageSheet]):
3624         (-[WKContentView _showLinkSheet]):
3625         (-[WKContentView _showDataDetectorsSheet]):
3626         (-[WKContentView _actionForLongPress]):
3627         (-[WKContentView ensurePositionInformationIsUpToDate:]):
3628         (-[WKContentView _updatePositionInformation]):
3629         (-[WKContentView gestureRecognizerShouldBegin:]):
3630         (-[WKContentView _cancelInteraction]):
3631         (-[WKContentView hasSelectablePositionAtPoint:]):
3632         (-[WKContentView pointIsInAssistedNode:]):
3633         (-[WKContentView webSelectionRects]):
3634         (-[WKContentView _highlightLongPressRecognized:]):
3635         (-[WKContentView _longPressRecognized:]):
3636         (-[WKContentView _singleTapRecognized:]):
3637         (-[WKContentView _doubleTapRecognized:]):
3638         (-[WKContentView _twoFingerDoubleTapRecognized:]):
3639         (-[WKContentView _twoFingerPanRecognized:]):
3640         (-[WKContentView _attemptClickAtLocation:]):
3641         (-[WKContentView useSelectionAssistantWithMode:]):
3642         (-[WKContentView clearSelection]):
3643         (-[WKContentView _positionInformationDidChange:]):
3644         (-[WKContentView _willStartScrollingOrZooming]):
3645         (-[WKContentView _willStartUserTriggeredScrollingOrZooming]):
3646         (-[WKContentView _didEndScrollingOrZooming]):
3647         (-[WKContentView inputAccessoryView]):
3648         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
3649         (-[WKContentView _addShortcut:]):
3650         (-[WKContentView _promptForReplace:]):
3651         (-[WKContentView replace:]):
3652         (-[WKContentView canPerformAction:withSender:]):
3653         (-[WKContentView _resetShowingTextStyle:]):
3654         (-[WKContentView _performAction:]):
3655         (-[WKContentView copy:]):
3656         (-[WKContentView cut:]):
3657         (-[WKContentView paste:]):
3658         (-[WKContentView select:]):
3659         (-[WKContentView selectAll:]):
3660         (-[WKContentView toggleBoldface:]):
3661         (-[WKContentView toggleItalics:]):
3662         (-[WKContentView toggleUnderline:]):
3663         (-[WKContentView _showTextStyleOptions:]):
3664         (-[WKContentView _showDictionary:]):
3665         (-[WKContentView _define:]):
3666         (toWKGestureType):
3667         (toUIWKGestureType):
3668         (toWKSelectionTouch):
3669         (toUIWKSelectionTouch):
3670         (toWKGestureRecognizerState):
3671         (toUIGestureRecognizerState):
3672         (toUIWKSelectionFlags):
3673         (toWKHandlePosition):
3674         (selectionChangedWithGesture):
3675         (selectionChangedWithTouch):
3676         (-[WKContentView _didUpdateBlockSelectionWithTouch:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
3677         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
3678         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
3679         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
3680         (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
3681         (-[WKContentView autocorrectionData]):
3682         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
3683         (-[WKContentView textFirstRect]):
3684         (-[WKContentView textLastRect]):
3685         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
3686         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
3687         (-[WKContentView accessoryDone]):
3688         (-[WKContentView accessoryTab:]):
3689         (-[WKContentView accessoryAutoFill]):
3690         (-[WKContentView accessoryClear]):
3691         (-[WKContentView _updateAccessory]):
3692         (-[WKContentView textInRange:]):
3693         (-[WKContentView replaceRange:withText:]):
3694         (-[WKContentView selectedTextRange]):
3695         (-[WKContentView caretRectForPosition:]):
3696         (-[WKContentView selectionRectsForRange:]):
3697         (-[WKContentView setSelectedTextRange:]):
3698         (-[WKContentView hasMarkedText]):
3699         (-[WKContentView markedText]):
3700         (-[WKContentView markedTextRange]):
3701         (-[WKContentView markedTextStyle]):
3702         (-[WKContentView setMarkedTextStyle:]):
3703         (-[WKContentView setMarkedText:selectedRange:]):
3704         (-[WKContentView unmarkText]):
3705         (-[WKContentView beginningOfDocument]):
3706         (-[WKContentView endOfDocument]):
3707         (-[WKContentView textRangeFromPosition:toPosition:]):
3708         (-[WKContentView positionFromPosition:offset:]):
3709         (-[WKContentView positionFromPosition:inDirection:offset:]):
3710         (-[WKContentView comparePosition:toPosition:]):
3711         (-[WKContentView offsetFromPosition:toPosition:]):
3712         (-[WKContentView tokenizer]):
3713         (-[WKContentView positionWithinRange:farthestInDirection:]):
3714         (-[WKContentView characterRangeByExtendingPosition:inDirection:]):
3715         (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
3716         (-[WKContentView setBaseWritingDirection:forRange:]):
3717         (-[WKContentView firstRectForRange:]):
3718         (-[WKContentView closestPositionToPoint:]):
3719         (-[WKContentView closestPositionToPoint:withinRange:]):
3720         (-[WKContentView characterRangeAtPoint:]):
3721         (-[WKContentView deleteBackward]):
3722         (-[WKContentView insertText:]):
3723         (-[WKContentView hasText]):
3724         (-[WKContentView textInputTraits]):
3725         (-[WKContentView interactionAssistant]):
3726         (-[WKContentView webSelectionAssistant]):
3727         (-[WKContentView selectionRange]):
3728         (-[WKContentView rectForNSRange:]):
3729         (-[WKContentView _markedTextNSRange]):
3730         (-[WKContentView selectedDOMRange]):
3731         (-[WKContentView setSelectedDOMRange:affinityDownstream:]):
3732         (-[WKContentView replaceRangeWithTextWithoutClosingTyping:replacementText:]):
3733         (-[WKContentView rectContainingCaretSelection]):
3734         (-[WKContentView requiresKeyEvents]):
3735         (-[WKContentView handleKeyWebEvent:]):
3736         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
3737         (-[WKContentView setBottomBufferHeight:]):
3738         (-[WKContentView automaticallySelectedOverlay]):
3739         (-[WKContentView selectionGranularity]):
3740         (-[WKContentView insertDictationResult:withCorrectionIdentifier:]):
3741         (-[WKContentView metadataDictionariesForDictationResults]):
3742         (-[WKContentView previousUnperturbedDictationResultBoundaryFromPosition:]):
3743         (-[WKContentView nextUnperturbedDictationResultBoundaryFromPosition:]):
3744         (-[WKContentView moveBackward:]):
3745         (-[WKContentView moveForward:]):
3746         (-[WKContentView characterBeforeCaretSelection]):
3747         (-[WKContentView wordContainingCaretSelection]):
3748         (-[WKContentView wordRangeContainingCaretSelection]):
3749         (-[WKContentView setMarkedText:]):
3750         (-[WKContentView hasContent]):
3751         (-[WKContentView selectAll]):
3752         (-[WKContentView textColorForCaretSelection]):
3753         (-[WKContentView fontForCaretSelection]):
3754         (-[WKContentView hasSelection]):
3755         (-[WKContentView isPosition:atBoundary:inDirection:]):
3756         (-[WKContentView positionFromPosition:toBoundary:inDirection:]):
3757         (-[WKContentView isPosition:withinTextUnit:inDirection:]):
3758         (-[WKContentView rangeEnclosingPosition:withGranularity:inDirection:]):
3759         (-[WKContentView takeTraitsFrom:]):
3760         (-[WKContentView _startAssistingKeyboard]):
3761         (-[WKContentView _stopAssistingKeyboard]):
3762         (-[WKContentView _startAssistingNode]):
3763         (-[WKContentView _stopAssistingNode]):
3764         (-[WKContentView _selectionChanged]):
3765         (-[WKContentView shouldIgnoreWebTouch]):
3766         (-[WKContentView isAnyTouchOverActiveArea:]):
3767         (-[WKTextRange _isCaret]):
3768         (-[WKTextRange _isRanged]):
3769         (+[WKTextRange textRangeWithState:isRange:isEditable:startRect:endRect:selectionRects:selectedTextLength:]):
3770         (-[WKTextRange dealloc]):
3771         (-[WKTextRange description]):
3772         (-[WKTextRange start]):
3773         (-[WKTextRange end]):
3774         (-[WKTextRange isEmpty]):
3775         (-[WKTextRange isEqual:]):
3776         (+[WKTextPosition textPositionWithRect:]):
3777         (-[WKTextPosition isEqual:]):
3778         (-[WKTextPosition description]):
3779         (-[WKTextSelectionRect initWithWebRect:]):
3780         (-[WKTextSelectionRect dealloc]):
3781         (+[WKTextSelectionRect textSelectionRectsWithWebRects:]):
3782         (-[WKTextSelectionRect rect]):
3783         (-[WKTextSelectionRect writingDirection]):
3784         (-[WKTextSelectionRect range]):
3785         (-[WKTextSelectionRect containsStart]):
3786         (-[WKTextSelectionRect containsEnd]):
3787         (-[WKTextSelectionRect isVertical]):
3788         (+[WKAutocorrectionRects autocorrectionRectsWithRects:lastRect:]):
3789         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
3790         (-[WKAutocorrectionContext dealloc]):
3791         * UIProcess/ios/WKContentViewInternal.h: Removed.
3792         * WebKit2.xcodeproj/project.pbxproj:
3793
3794 2014-02-24  Anders Carlsson  <andersca@apple.com>
3795
3796         WKProcessPool should use secondary processes + network process
3797         https://bugs.webkit.org/show_bug.cgi?id=129282
3798
3799         Reviewed by Simon Fraser.
3800
3801         * UIProcess/API/Cocoa/WKProcessPool.mm:
3802         (-[WKProcessPool initWithConfiguration:]):
3803
3804 2014-02-24  Jeremy Jones  <jeremyj@apple.com>
3805
3806         WK2 AVKit fullscreen doesn't display video.
3807         https://bugs.webkit.org/show_bug.cgi?id=128564
3808
3809         Reviewed by Simon Fraser.
3810
3811         * Shared/mac/RemoteLayerTreeTransaction.h:
3812         Add a property to track video layer pending fullscreen.
3813
3814         (WebKit::RemoteLayerTreeTransaction::isVideoLayerIDPendingFullscreen):
3815         (WebKit::RemoteLayerTreeTransaction::addVideoLayerIDPendingFullscreen):
3816         Add a property to track video layer pending fullscreen.
3817
3818         * Shared/mac/RemoteLayerTreeTransaction.mm:
3819         (WebKit::RemoteLayerTreeTransaction::encode):
3820         (WebKit::RemoteLayerTreeTransaction::decode):
3821         Encode and decode m_videoLayerIDsPendingFullscreen.
3822
3823         * UIProcess/ios/WebPageProxyIOS.mm:
3824         (WebKit::WebPageProxy::didCommitLayerTree):
3825         Let WebVideoFullscreenManagerProxy see the RemoteLayerTreeTransaction.
3826
3827         * UIProcess/ios/WebVideoFullscreenManagerProxy.cpp:
3828         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
3829         Look for video layer pending fullscreen on the transaction to initiate
3830         fullscreen.
3831
3832         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
3833         Start looking for the video layer pending fullscreen in the transaction.
3834
3835         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
3836         Override to prevent fullscreen from happening before the layer
3837         is pending fullscreen.
3838
3839         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3840         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3841         Pass a more specific videoLayerID in SetVideoLayerID,
3842         i.e. WebCore::GraphicsLayer::PlatformLayerID.
3843
3844         * WebProcess/WebPage/WebPage.cpp:
3845         (WebKit::WebPage::willCommitLayerTree):
3846         Move webPage specific transaction building here, including,
3847         giving WebVideoFullscreenManager a chance to modify the transaction.
3848
3849         * WebProcess/WebPage/WebPage.h:
3850         Add willCommitLayerTree();
3851
3852         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3853         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
3854         (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
3855         Make and break the connection from CALayer to PlatformCALayerRemoteCustom,
3856         the same way it is done for PlatformCALayerMac.
3857
3858         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3859         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3860         Move WebPage specific transaction building into WebPage::willCommitLayerTree.
3861
3862         * WebProcess/ios/WebVideoFullscreenManager.cpp:
3863         (WebKit::WebVideoFullscreenManager::willCommitLayerTree):
3864         addVideoLayerIDPendingFullscreen on RemoteLayerTreeTransaction when needed.
3865
3866         (WebKit::WebVideoFullscreenManager::setVideoLayer):
3867         Pass along the video layerID.
3868
3869         * WebProcess/ios/WebVideoFullscreenManager.h:
3870         Add willCommitLayerTree() and remove setVideoLayerID().
3871         Add a member to retain the unparented PlatformCALayer.
3872
3873 2014-02-24  Martin Hock  <mhock@apple.com>
3874
3875         Create SessionID value-style class for session IDs.
3876         https://bugs.webkit.org/show_bug.cgi?id=129141
3877
3878         The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
3879
3880         Reviewed by Brady Eidson.
3881
3882         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3883         (WebKit::storageSession):
3884         (WebKit::NetworkConnectionToWebProcess::startDownload):
3885         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3886         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3887         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3888         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3889         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3890         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3891         * NetworkProcess/NetworkConnectionToWebProcess.h:
3892         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3893         * NetworkProcess/NetworkProcess.cpp:
3894         (WebKit::NetworkProcess::initializeNetworkProcess):
3895         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
3896         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
3897         * NetworkProcess/NetworkProcess.h:
3898         * NetworkProcess/NetworkProcess.messages.in:
3899         * NetworkProcess/NetworkResourceLoader.h:
3900         * NetworkProcess/RemoteNetworkingContext.h:
3901         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3902         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3903         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3904         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3905         * Shared/Network/NetworkResourceLoadParameters.cpp:
3906         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3907         * Shared/Network/NetworkResourceLoadParameters.h:
3908         * Shared/SessionTracker.cpp:
3909         (WebKit::staticSessionMap):
3910         (WebKit::storageSessionToID):
3911         (WebKit::SessionTracker::sessionMap):
3912         (WebKit::SessionTracker::session):
3913         (WebKit::SessionTracker::sessionID):
3914         (WebKit::SessionTracker::setSession):
3915         (WebKit::SessionTracker::destroySession):
3916         * Shared/SessionTracker.h: Move code to SessionID class.
3917         * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
3918         (IPC::ArgumentCoder<SessionID>::encode):
3919         (IPC::ArgumentCoder<SessionID>::decode):
3920         * Shared/WebCoreArgumentCoders.h:
3921         * Shared/mac/CookieStorageShim.mm:
3922         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
3923         * UIProcess/APISession.cpp:
3924         (API::generateID):
3925         (API::Session::defaultSession):
3926         (API::Session::legacyPrivateSession):
3927         (API::Session::Session):
3928         (API::Session::isEphemeral):
3929         (API::Session::getID):
3930         * UIProcess/APISession.h:
3931         * UIProcess/WebContext.cpp:
3932         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
3933         (WebKit::WebContext::createNewWebProcess):
3934         * UIProcess/WebContext.h:
3935         * UIProcess/WebPageProxy.h:
3936         (WebKit::WebPageProxy::sessionID):
3937         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3938         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3939         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3940         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3941         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3942         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
3943         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3944         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3945         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3946         (WebKit::WebFrameNetworkingContext::storageSession):
3947         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3948         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3949         (WebKit::WebFrameNetworkingContext::storageSession):
3950         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3951         * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
3952         (WebKit::WebPage::WebPage):
3953         (WebKit::WebPage::sessionID):
3954         (WebKit::WebPage::isUsingEphemeralSession):
3955         (WebKit::WebPage::setSessionID):
3956         (WebKit::WebPage::updatePreferences):
3957         * WebProcess/WebPage/WebPage.h:
3958         * WebProcess/WebPage/WebPage.messages.in:
3959         * WebProcess/WebProcess.cpp:
3960         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3961         (WebKit::WebProcess::destroyPrivateBrowsingSession):
3962         * WebProcess/WebProcess.h:
3963         * WebProcess/WebProcess.messages.in:
3964
3965 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
3966
3967         Remove PDFViewController.*, which is unused
3968         https://bugs.webkit.org/show_bug.cgi?id=129270
3969
3970         Reviewed by Tim Horton.
3971
3972         * UIProcess/mac/PDFViewController.h: Removed.
3973         * UIProcess/mac/PDFViewController.mm: Removed.
3974
3975 2014-02-24  Anders Carlsson  <andersca@apple.com>
3976
3977         Rename WKProcessClass to WKProcessPool
3978         https://bugs.webkit.org/show_bug.cgi?id=129268
3979
3980         Reviewed by Dan Bernstein.
3981
3982         Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.
3983
3984         * Shared/Cocoa/APIObject.mm:
3985         (API::Object::newObject):
3986         * UIProcess/API/Cocoa/WKProcessClass.h:
3987         * UIProcess/API/Cocoa/WKProcessClass.mm:
3988         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
3989         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
3990         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
3991         * UIProcess/API/Cocoa/WKProcessClassPrivate.h:
3992         * UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
3993         * UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
3994         (-[WKProcessPool init]):
3995         (-[WKProcessPool initWithConfiguration:]):
3996         (-[WKProcessPool dealloc]):
3997         (-[WKProcessPool description]):
3998         (-[WKProcessPool configuration]):
3999         (-[WKProcessPool API::]):
4000         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
4001         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
4002         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
4003         (-[WKProcessPoolConfiguration _injectedBundleURL]):
4004         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
4005         (-[WKProcessPoolConfiguration description]):
4006         (-[WKProcessPoolConfiguration copyWithZone:]):
4007         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
4008         * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
4009         (WebKit::wrapper):
4010         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
4011         * UIProcess/API/Cocoa/WKWebView.mm:
4012         (-[WKWebView initWithFrame:configuration:]):
4013         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
4014         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
4015         (-[WKWebViewConfiguration description]):
4016         (-[WKWebViewConfiguration copyWithZone:]):
4017         (-[WKWebViewConfiguration processPool]):
4018         (-[WKWebViewConfiguration setProcessPool:]):
4019         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
4020         (-[WKWebViewConfiguration setProcessClass:]):
4021         (-[WKWebViewConfiguration processClass]):
4022         * UIProcess/API/mac/WKView.mm:
4023         * UIProcess/ios/WKContentView.mm:
4024         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
4025         * WebKit2.xcodeproj/project.pbxproj:
4026
4027 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
4028
4029         Move non-API files out of WebKit2/UIProcess/API/mac
4030         https://bugs.webkit.org/show_bug.cgi?id=129267
4031
4032         Reviewed by Anders Carlsson.
4033
4034         * UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
4035         * UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
4036         * UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
4037         * UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
4038         * UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
4039         * UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
4040         * UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
4041         * UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
4042         * WebKit2.xcodeproj/project.pbxproj:
4043
4044 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
4045
4046         Move non-API files in the API/ios directory out to UIProcess/ios
4047         https://bugs.webkit.org/show_bug.cgi?id=129264
4048
4049         Reviewed by Anders Carlsson.
4050
4051         * UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
4052         * UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
4053         * UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
4054         * UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
4055         * UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
4056         * UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
4057         * UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
4058         * UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
4059         * UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
4060         * UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
4061         * UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
4062         * WebKit2.xcodeproj/project.pbxproj:
4063