Unreviewed. Fix GTK+ build after r164702.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Unreviewed. Fix GTK+ build after r164702.
4
5         * UIProcess/DrawingAreaProxy.cpp:
6
7 2014-02-26  Martin Robinson  <mrobinson@igalia.com>
8
9         [GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds
10         https://bugs.webkit.org/show_bug.cgi?id=129319
11
12         Reviewed by Carlos Garcia Campos.
13
14         * GNUmakefile.am: Do not generate the documentation configuration file if the port
15         is disabled.
16
17 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
18
19         [iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
20         https://bugs.webkit.org/show_bug.cgi?id=129354
21
22         Reviewed by Sam Weinig.
23
24         During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
25         DrawingArea and WebPage were in completely inconsistent states.
26
27         Some of those disconnect were temporary (like when setting the rect and scale in two different
28         messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
29         This was causing various visual glitches.
30
31         To fix this, all the updates from the UIProcess are funneled through a single path and the values
32         are split into 3 different groups/types.
33         When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
34         through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
35         Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
36         the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
37         and they are sent to the UIProcess.
38
39         At any point, there are 3 types of scale and rects used for different purpose:
40         -In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
41          is currently on screen.
42          That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
43         -In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
44          state.
45         -Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
46          to setup the rendering.
47
48         With this change, there are two paths for updating the page scale factor:
49         -The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
50          ->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
51         -If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
52          ->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
53         The two kind of updates frequently conflicts during loading. We differentiate those through the flag
54         scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.
55
56         * DerivedSources.make:
57         * Scripts/webkit2/messages.py:
58         (struct_or_class):
59         * Shared/VisibleContentRectUpdateInfo.cpp: Added.
60         (WebKit::VisibleContentRectUpdateInfo::encode):
61         (WebKit::VisibleContentRectUpdateInfo::decode):
62         * Shared/VisibleContentRectUpdateInfo.h: Added.
63         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
64         (WebKit::VisibleContentRectUpdateInfo::exposedRect):
65         (WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
66         (WebKit::VisibleContentRectUpdateInfo::scale):
67         (WebKit::operator==):
68         * Shared/mac/RemoteLayerTreeTransaction.h:
69         (WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
70         (WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
71         * Shared/mac/RemoteLayerTreeTransaction.mm:
72         (WebKit::RemoteLayerTreeTransaction::encode):
73         (WebKit::RemoteLayerTreeTransaction::decode):
74         * UIProcess/API/Cocoa/WKWebView.mm:
75         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
76         (-[WKWebView _didFinishScrolling]):
77         (-[WKWebView scrollViewDidScroll:]):
78         (-[WKWebView scrollViewDidZoom:]):
79         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
80         (-[WKWebView _frameOrBoundsChanged]):
81         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
82         (-[WKWebView _setObscuredInsets:]):
83         (-[WKWebView _endInteractiveObscuredInsetsChange]):
84         * UIProcess/API/ios/WKViewIOS.mm:
85         (-[WKView _updateVisibleContentRects]):
86         * UIProcess/DrawingAreaProxy.cpp:
87         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
88         (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
89         * UIProcess/DrawingAreaProxy.h:
90         (WebKit::DrawingAreaProxy::updateDebugIndicator):
91         * UIProcess/WebPageProxy.h:
92         (WebKit::WebPageProxy::displayedContentScale):
93         (WebKit::WebPageProxy::exposedContentRect):
94         (WebKit::WebPageProxy::unobscuredContentRect):
95         * UIProcess/ios/WKContentView.h:
96         * UIProcess/ios/WKContentView.mm:
97         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
98         (-[WKContentView didFinishScrolling]):
99         (-[WKContentView didZoomToScale:]):
100         * UIProcess/ios/WebPageProxyIOS.mm:
101         (WebKit::WebPageProxy::updateVisibleContentRects):
102         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
103         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
104         (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
105         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
106         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
107         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
108         * WebKit2.xcodeproj/project.pbxproj:
109         * WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
110         (WebKit::ViewUpdateDispatcher::create):
111         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
112         (WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
113         (WebKit::ViewUpdateDispatcher::initializeConnection):
114         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
115         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
116         * WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
117         * WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.
118         * WebProcess/WebPage/WebPage.cpp:
119         (WebKit::WebPage::WebPage):
120         (WebKit::WebPage::scalePage):
121         * WebProcess/WebPage/WebPage.h:
122         (WebKit::WebPage::scaleWasSetByUIProcess):
123         * WebProcess/WebPage/WebPage.messages.in:
124         * WebProcess/WebPage/ios/WebPageIOS.mm:
125         (WebKit::WebPage::tapHighlightAtPosition):
126         (WebKit::WebPage::updateVisibleContentRects):
127         (WebKit::WebPage::willStartUserTriggeredZooming):
128         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
129         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
130         * WebProcess/WebProcess.cpp:
131         (WebKit::WebProcess::WebProcess):
132         (WebKit::WebProcess::initializeConnection):
133         * WebProcess/WebProcess.h:
134
135 2014-02-25  Anders Carlsson  <andersca@apple.com>
136
137         Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
138         https://bugs.webkit.org/show_bug.cgi?id=129357
139
140         Reviewed by Sam Weinig.
141
142         * WebProcess/WebPage/WebPage.cpp:
143         (WebKit::WebPage::WebPage):
144         * WebProcess/WebPage/WebVisitedLinkProvider.h:
145
146 2014-02-25  Enrica Casucci  <enrica@apple.com>
147
148         [WebKit2] Form controls handling.
149         https://bugs.webkit.org/show_bug.cgi?id=129344
150         <rdar://problem/16053643>
151
152         Reviewed by Simon Fraser and Joseph Pecoraro.
153
154         This is the step toward adding support for
155         form controls iOS style. It adds the logic to
156         select the appropriate keyboard type based on the
157         element type and introduces the AssistedNodeInformation
158         structure used currently for the keyboard type selection
159         and that will be used to populate pickers and popovers.
160         It also provides information to enable/disable next/previous
161         buttons in the accessory view.
162
163         * Scripts/webkit2/messages.py:
164         (struct_or_class):
165         * Shared/AssistedNodeInformation.cpp: Added.
166         (WebKit::AssistedNodeInformation::encode):
167         (WebKit::AssistedNodeInformation::decode):
168         * Shared/AssistedNodeInformation.h: Added.
169         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
170         * UIProcess/PageClient.h:
171         * UIProcess/WebPageProxy.h:
172         * UIProcess/WebPageProxy.messages.in:
173         * UIProcess/ios/PageClientImplIOS.h:
174         * UIProcess/ios/PageClientImplIOS.mm:
175         (WebKit::PageClientImpl::startAssistingNode):
176         * UIProcess/ios/WKContentViewInteraction.h:
177         * UIProcess/ios/WKContentViewInteraction.mm:
178         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
179         (-[WKContentView _updateAccessory]):
180         (toUITextAutocapitalize):
181         (-[WKContentView textInputTraits]):
182         (-[WKContentView assistedNodeInformation]):
183         (-[WKContentView _startAssistingNode:]):
184         (-[WKContentView _stopAssistingNode]):
185         * UIProcess/ios/WebPageProxyIOS.mm:
186         (WebKit::WebPageProxy::startAssistingNode):
187         * WebKit2.xcodeproj/project.pbxproj:
188         * WebProcess/WebPage/WebPage.h:
189         * WebProcess/WebPage/ios/WebPageIOS.mm:
190         (WebKit::isAssistableNode):
191         (WebKit::hasFocusableNode):
192         (WebKit::WebPage::getAssistedNodeInformation):
193         (WebKit::WebPage::elementDidFocus):
194
195 2014-02-25  Anders Carlsson  <andersca@apple.com>
196
197         VisitedLinkProvider should be refcounted
198         https://bugs.webkit.org/show_bug.cgi?id=129351
199
200         Reviewed by Sam Weinig.
201
202         * UIProcess/VisitedLinkProvider.cpp:
203         (WebKit::VisitedLinkProvider::create):
204         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
205         * UIProcess/VisitedLinkProvider.h:
206         * UIProcess/WebContext.cpp:
207         (WebKit::WebContext::WebContext):
208         (WebKit::WebContext::processDidFinishLaunching):
209         (WebKit::WebContext::disconnectProcess):
210         (WebKit::WebContext::addVisitedLinkHash):
211         * UIProcess/WebContext.h:
212
213 2014-02-25  Anders Carlsson  <andersca@apple.com>
214
215         Make WebContext handle populating visited links
216         https://bugs.webkit.org/show_bug.cgi?id=129348
217
218         Reviewed by Tim Horton.
219
220         This makes it possible to decouple VisitedLinkProvider from WebContext.
221
222         * UIProcess/VisitedLinkProvider.cpp:
223         (WebKit::VisitedLinkProvider::VisitedLinkProvider):
224         (WebKit::VisitedLinkProvider::processDidFinishLaunching):
225         * UIProcess/VisitedLinkProvider.h:
226         * UIProcess/WebContext.cpp:
227         (WebKit::WebContext::WebContext):
228         (WebKit::WebContext::processDidFinishLaunching):
229         * UIProcess/WebContext.h:
230
231 2014-02-25  Anders Carlsson  <andersca@apple.com>
232
233         DrawingAreaProxy is using WebCore's Timer
234         https://bugs.webkit.org/show_bug.cgi?id=129347
235         <rdar://problem/16078133>
236
237         Reviewed by Tim Horton.
238
239         Use a RunLoop::Timer instead.
240
241         * UIProcess/DrawingAreaProxy.cpp:
242         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
243         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
244         * UIProcess/DrawingAreaProxy.h:
245
246 2014-02-25  Anders Carlsson  <andersca@apple.com>
247
248         Add WKVisitedLinkProvider
249         https://bugs.webkit.org/show_bug.cgi?id=129343
250
251         Reviewed by Sam Weinig.
252
253         * UIProcess/API/Cocoa/WKVisitedLinkProvider.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
254         * UIProcess/API/Cocoa/WKVisitedLinkProvider.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
255         * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
256         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
257         * UIProcess/API/Cocoa/WKWebView.mm:
258         (-[WKWebView initWithFrame:configuration:]):
259         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
260         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
261         (-[WKWebViewConfiguration visitedLinkProvider]):
262         (-[WKWebViewConfiguration setVisitedLinkProvider:]):
263         * WebKit2.xcodeproj/project.pbxproj:
264
265 2014-02-25  Anders Carlsson  <andersca@apple.com>
266
267         Simplify visited link style invalidation
268         https://bugs.webkit.org/show_bug.cgi?id=129340
269
270         Reviewed by Dan Bernstein.
271
272         * UIProcess/VisitedLinkProvider.cpp:
273         (WebKit::VisitedLinkProvider::addVisitedLink):
274         * WebProcess/WebProcess.cpp:
275         (WebKit::WebProcess::visitedLinkStateChanged):
276         (WebKit::WebProcess::allVisitedLinkStateChanged):
277
278 2014-02-25  Anders Carlsson  <andersca@apple.com>
279
280         Fix build.
281
282         Remove VisitedLinkStrategy.
283
284         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
285         * NetworkProcess/NetworkProcessPlatformStrategies.h:
286         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
287         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
288
289 2014-02-25  Alexey Proskuryakov  <ap@apple.com>
290
291         Rolling out http://trac.webkit.org/changeset/164611, because it broke
292         WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
293
294         The change was for:
295
296         https://bugs.webkit.org/show_bug.cgi?id=129141
297         Create SessionID class
298
299 2014-02-25  Dan Bernstein  <mitz@apple.com>
300
301         [Cocoa] Add delegate method for customizing actions on activated elements
302         https://bugs.webkit.org/show_bug.cgi?id=129290
303
304         Reviewed by Anders Carlsson.
305
306         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added. Declared new delegate method.
307
308         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
309         (_WKActivatedElementType): Defined enum of element types.
310         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
311         (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:]): Added type parameter
312         to the initializer, used to set the new type property.
313         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
314
315         * UIProcess/Cocoa/UIClient.h:
316         * UIProcess/Cocoa/UIClient.mm:
317         (WebKit::UIClient::setDelegate): Initialize webViewActionsForElementDefaultActions member
318         of m_delegateMethods.
319         (WebKit::UIClient::actionsForElement): Added. Calls out to the new delegate method if
320         implemented. Otherwise returns the default actions.
321
322         * UIProcess/ios/WKActionSheetAssistant.mm:
323         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Use new _elementInfo ivar
324         instead of creating element info here.
325         (-[WKActionSheetAssistant showImageSheet]): Create element info here and assign it to
326         _elementInfo ivar if presenting a sheet. Call the UI client to get custom actions.
327         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
328         (-[WKActionSheetAssistant cleanupSheet]): Clear _elementInfo ivar.
329         * WebKit2.xcodeproj/project.pbxproj: Added reference to WKUIDelegatePrivate.h.
330
331 2014-02-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
332
333         Unreviewed EFL build fix attempt after r164562
334
335         * CMakeLists.txt: Added WebVisitedLinkProvider.cpp.
336
337 2014-02-25  Sergio Villar Senin  <svillar@igalia.com>
338
339         [CSS Grid Layout] Add ENABLE flag
340         https://bugs.webkit.org/show_bug.cgi?id=129153
341
342         Reviewed by Simon Fraser.
343
344         Added ENABLE_CSS_GRID_LAYOUT feature flag.
345
346         * Configurations/FeatureDefines.xcconfig:
347         * WebProcess/WebPage/WebPage.cpp:
348         (WebKit::WebPage::updatePreferences):
349
350 2014-02-25  Zan Dobersek  <zdobersek@igalia.com>
351
352         Unreviewed GTK build fix after r164652.
353
354         * GNUmakefile.list.am: Add WebVisitedLinkProvider build targets.
355
356 2014-02-24  Anders Carlsson  <andersca@apple.com>
357
358         Make it possible to set the visited link provider on a per page basis
359         https://bugs.webkit.org/show_bug.cgi?id=129288
360
361         Reviewed by Andreas Kling.
362
363         Add WebVisitedLinkProvider which just calls the web process.
364
365         * WebKit2.xcodeproj/project.pbxproj:
366         * WebProcess/WebPage/WebPage.cpp:
367         (WebKit::WebPage::WebPage):
368         * WebProcess/WebPage/WebVisitedLinkProvider.cpp: Added.
369         (WebKit::WebVisitedLinkProvider::create):
370         (WebKit::WebVisitedLinkProvider::WebVisitedLinkProvider):
371         (WebKit::WebVisitedLinkProvider::~WebVisitedLinkProvider):
372         (WebKit::WebVisitedLinkProvider::isLinkVisited):
373         (WebKit::WebVisitedLinkProvider::addVisitedLink):
374         * WebProcess/WebPage/WebVisitedLinkProvider.h: Added.
375
376 2014-02-25  Dan Bernstein  <mitz@apple.com>
377
378         Build fix for case-sensitive filesystems.
379
380         * WebProcess/ios/WebVideoFullscreenManager.cpp:
381
382 2014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
383
384         [GTK] Mark view source mode methods as deprecated
385         https://bugs.webkit.org/show_bug.cgi?id=128920
386
387         Reviewed by Martin Robinson.
388
389         Mark WEBKIT_VIEW_MODE_SOURCE as deprecated in documentation and
390         only show warnings when set_view_mode is used with WEBKIT_VIEW_MODE_SOURCE.
391
392         * UIProcess/API/gtk/WebKitWebView.cpp:
393         (webkit_web_view_set_view_mode):
394         (webkit_web_view_get_view_mode):
395         * UIProcess/API/gtk/WebKitWebView.h:
396
397 2014-02-24  Alexey Proskuryakov  <ap@apple.com>
398
399         [Mac] Stop looking for plug-in profiles in /S/L/Sandbox/Profiles
400         https://bugs.webkit.org/show_bug.cgi?id=129262
401         <rdar://problem/16149420>
402
403         Reviewed by Sam Weinig.
404
405         Remove unused code.
406
407         * Shared/Plugins/mac/PluginSandboxProfile.mm:
408         (WebKit::pluginSandboxProfileDirectory):
409         (WebKit::pluginSandboxCommonProfile):
410         (WebKit::pluginSandboxProfile):
411         (WebKit::pluginHasSandboxProfile):
412
413 2014-02-24  Martin Robinson  <mrobinson@igalia.com>
414
415         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
416         https://bugs.webkit.org/show_bug.cgi?id=128417
417
418         Reviewed by Carlos Garcia Campos.
419
420         * GNUmakefile.am: Generate a config file for generate-gtkdoc.
421         * PlatformGTK.cmake: Ditto.
422
423 2014-02-24  Dan Bernstein  <mitz@apple.com>
424
425         32-bit build fix.
426
427         * UIProcess/API/Cocoa/_WKElementAction.mm:
428         (+[_WKElementAction elementActionWithType:customTitle:]):
429
430 2014-02-24  Dan Bernstein  <mitz@apple.com>
431
432         [Cocoa] Start adding API for customizing actions on activated elements
433         https://bugs.webkit.org/show_bug.cgi?id=129284
434
435         Reviewed by Anders Carlsson.
436
437         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
438         was WKElementActionInfo.
439         * UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
440         (-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
441         initializer from WKElementActionInfo.
442         (-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
443         (-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
444         (-[_WKActivatedElementInfo _interactionLocation]): Ditto.
445         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.
446
447         * UIProcess/API/Cocoa/_WKElementAction.h: Added.
448         (_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
449         * UIProcess/API/Cocoa/_WKElementAction.mm: Added.
450         (-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
451         initializer from WKActionSheet.mm.
452         (-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
453         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
454         (copyElement): Moved from WKActionSheet.mm.
455         (saveImage): Ditto.
456         (addToReadingList): Ditto.
457         (+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
458         (+[_WKElementAction elementActionWithType:]): Ditto.
459         (-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
460         * UIProcess/API/Cocoa/WKElementActionInternal.h: Added.
461
462         * UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
463         * UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
464         * UIProcess/ios/WKActionSheetAssistant.mm:
465         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
466         (-[WKActionSheetAssistant showImageSheet]):
467         (-[WKActionSheetAssistant showLinkSheet]):
468         (-[WKActionSheetAssistant showDataDetectorsSheet]):
469
470         * WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
471         class name check to allow _WK as a class name prefix.
472
473 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
474
475         Use RetainPtrs for two WKContentView data members
476         https://bugs.webkit.org/show_bug.cgi?id=129276
477
478         Reviewed by Benjamin Poulain.
479         
480         The UITextInputTraits were leaked. Fix with RetainPtr goodness.
481         
482         Rename the obscure _accessory to _formAccessoryView and
483         make it a RetainPtr.
484         
485         Rearrange the data members of the WKContentView class extension
486         for better packing and readability.
487
488         * UIProcess/ios/WKContentView.h:
489         * UIProcess/ios/WKContentViewInteraction.h:
490         * UIProcess/ios/WKContentViewInteraction.mm:
491         (-[WKContentView cleanupInteraction]):
492         (-[WKContentView inputAccessoryView]):
493         (-[WKContentView _updateAccessory]):
494         (-[WKContentView textInputTraits]):
495
496 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
497
498         Remove WKInteractionView, move code into WKContentView
499         https://bugs.webkit.org/show_bug.cgi?id=129275
500
501         Reviewed by Benjamin Poulain.
502         
503         WKInteractionView as an interim solution as WebKit2 on iOS was being
504         brought up, and should be removed.
505         
506         Move its code into a category on WKContentView, mostly unchanged. The
507         WKContentView (WKInteraction) categroy now implements the various protocols
508         that WKInteractionView implemented.
509         
510         WKContentView is not an API class, so no longer has WK_API_CLASS, and can
511         have implementation-related data members. WKContentViewInternal.h is removed.
512         
513         WKContentView now exposes a WebPageProxy* rather than a WKPageRef.
514         
515         Other changes: WKActionSheetAssistant no longer stores a WebPageProxy,
516         getting it from the WKContentView instead.
517         
518         WKAutoCorrectionData and InteractionInformationAtPosition are stored via unique_ptr
519         to reduce class size, and avoid having to expose their details in the header.
520
521         * Configurations/WebKit2.xcconfig:
522         * UIProcess/API/Cocoa/WKWebViewInternal.h:
523         * UIProcess/API/ios/WKViewIOS.mm:
524         (-[WKView setAllowsBackForwardNavigationGestures:]):
525         (-[WKView pageRef]):
526         (-[WKView _pageExtendedBackgroundColor]):
527         (-[WKView _setBackgroundExtendsBeyondPage:]):
528         (-[WKView _backgroundExtendsBeyondPage]):
529         * UIProcess/ios/PageClientImplIOS.mm:
530         * UIProcess/ios/WKActionSheet.h:
531         * UIProcess/ios/WKActionSheet.mm:
532         (-[WKActionSheet initWithView:]):
533         (+[WKElementAction customElementActionWithTitle:actionHandler:]):
534         (copyElement):
535         (saveImage):
536         (+[WKElementAction standardElementActionWithType:customTitle:]):
537         (-[WKElementAction runActionWithElementInfo:view:]):
538         * UIProcess/ios/WKActionSheetAssistant.h:
539         * UIProcess/ios/WKActionSheetAssistant.mm:
540         (-[WKActionSheetAssistant initWithView:]):
541         (-[WKActionSheetAssistant dealloc]):
542         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
543         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
544         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
545         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
546         (-[WKActionSheetAssistant showImageSheet]):
547         (-[WKActionSheetAssistant showLinkSheet]):
548         (-[WKActionSheetAssistant showDataDetectorsSheet]):
549         (-[WKActionSheetAssistant cleanupSheet]):
550         * UIProcess/ios/WKContentView.h:
551         * UIProcess/ios/WKContentView.mm:
552         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
553         (-[WKContentView dealloc]):
554         (-[WKContentView page]):
555         (-[WKContentView isAssistingNode]):
556         (-[WKContentView didFinishScrolling]):
557         (-[WKContentView willStartZoomOrScroll]):
558         (-[WKContentView willStartUserTriggeredScroll]):
559         (-[WKContentView willStartUserTriggeredZoom]):
560         (-[WKContentView didZoomToScale:]):
561         (-[WKContentView _didCommitLoadForMainFrame]):
562         (-[WKContentView _didCommitLayerTree:WebKit::]):
563         * UIProcess/ios/WKContentViewInteraction.h: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.h.
564         * UIProcess/ios/WKContentViewInteraction.mm: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.mm.
565         (-[WKContentView setupInteraction]):
566         (-[WKContentView cleanupInteraction]):
567         (-[WKContentView positionInformation]):
568         (-[WKContentView setInputDelegate:]):
569         (-[WKContentView inputDelegate]):
570         (-[WKContentView isEditable]):
571         (-[WKContentView canBecomeFirstResponder]):
572         (-[WKContentView resignFirstResponder]):
573         (-[WKContentView _webTouchEventsRecognized:]):
574         (inflateQuad):
575         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
576         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
577         (-[WKContentView _cancelLongPressGestureRecognizer]):
578         (-[WKContentView _didScroll]):
579         (-[WKContentView _requiresKeyboardResetOnReload]):
580         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
581         (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
582         (isSamePair):
583         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
584         (-[WKContentView _showImageSheet]):
585         (-[WKContentView _showLinkSheet]):
586         (-[WKContentView _showDataDetectorsSheet]):
587         (-[WKContentView _actionForLongPress]):
588         (-[WKContentView ensurePositionInformationIsUpToDate:]):
589         (-[WKContentView _updatePositionInformation]):
590         (-[WKContentView gestureRecognizerShouldBegin:]):
591         (-[WKContentView _cancelInteraction]):
592         (-[WKContentView hasSelectablePositionAtPoint:]):
593         (-[WKContentView pointIsInAssistedNode:]):
594         (-[WKContentView webSelectionRects]):
595         (-[WKContentView _highlightLongPressRecognized:]):
596         (-[WKContentView _longPressRecognized:]):
597         (-[WKContentView _singleTapRecognized:]):
598         (-[WKContentView _doubleTapRecognized:]):
599         (-[WKContentView _twoFingerDoubleTapRecognized:]):
600         (-[WKContentView _twoFingerPanRecognized:]):
601         (-[WKContentView _attemptClickAtLocation:]):
602         (-[WKContentView useSelectionAssistantWithMode:]):
603         (-[WKContentView clearSelection]):
604         (-[WKContentView _positionInformationDidChange:]):
605         (-[WKContentView _willStartScrollingOrZooming]):
606         (-[WKContentView _willStartUserTriggeredScrollingOrZooming]):
607         (-[WKContentView _didEndScrollingOrZooming]):
608         (-[WKContentView inputAccessoryView]):
609         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
610         (-[WKContentView _addShortcut:]):
611         (-[WKContentView _promptForReplace:]):
612         (-[WKContentView replace:]):
613         (-[WKContentView canPerformAction:withSender:]):
614         (-[WKContentView _resetShowingTextStyle:]):
615         (-[WKContentView _performAction:]):
616         (-[WKContentView copy:]):
617         (-[WKContentView cut:]):
618         (-[WKContentView paste:]):
619         (-[WKContentView select:]):
620         (-[WKContentView selectAll:]):
621         (-[WKContentView toggleBoldface:]):
622         (-[WKContentView toggleItalics:]):
623         (-[WKContentView toggleUnderline:]):
624         (-[WKContentView _showTextStyleOptions:]):
625         (-[WKContentView _showDictionary:]):
626         (-[WKContentView _define:]):
627         (toWKGestureType):
628         (toUIWKGestureType):
629         (toWKSelectionTouch):
630         (toUIWKSelectionTouch):
631         (toWKGestureRecognizerState):
632         (toUIGestureRecognizerState):
633         (toUIWKSelectionFlags):
634         (toWKHandlePosition):
635         (selectionChangedWithGesture):
636         (selectionChangedWithTouch):
637         (-[WKContentView _didUpdateBlockSelectionWithTouch:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
638         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
639         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
640         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
641         (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
642         (-[WKContentView autocorrectionData]):
643         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
644         (-[WKContentView textFirstRect]):
645         (-[WKContentView textLastRect]):
646         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
647         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
648         (-[WKContentView accessoryDone]):
649         (-[WKContentView accessoryTab:]):
650         (-[WKContentView accessoryAutoFill]):
651         (-[WKContentView accessoryClear]):
652         (-[WKContentView _updateAccessory]):
653         (-[WKContentView textInRange:]):
654         (-[WKContentView replaceRange:withText:]):
655         (-[WKContentView selectedTextRange]):
656         (-[WKContentView caretRectForPosition:]):
657         (-[WKContentView selectionRectsForRange:]):
658         (-[WKContentView setSelectedTextRange:]):
659         (-[WKContentView hasMarkedText]):
660         (-[WKContentView markedText]):
661         (-[WKContentView markedTextRange]):
662         (-[WKContentView markedTextStyle]):
663         (-[WKContentView setMarkedTextStyle:]):
664         (-[WKContentView setMarkedText:selectedRange:]):
665         (-[WKContentView unmarkText]):
666         (-[WKContentView beginningOfDocument]):
667         (-[WKContentView endOfDocument]):
668         (-[WKContentView textRangeFromPosition:toPosition:]):
669         (-[WKContentView positionFromPosition:offset:]):
670         (-[WKContentView positionFromPosition:inDirection:offset:]):
671         (-[WKContentView comparePosition:toPosition:]):
672         (-[WKContentView offsetFromPosition:toPosition:]):
673         (-[WKContentView tokenizer]):
674         (-[WKContentView positionWithinRange:farthestInDirection:]):
675         (-[WKContentView characterRangeByExtendingPosition:inDirection:]):
676         (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
677         (-[WKContentView setBaseWritingDirection:forRange:]):
678         (-[WKContentView firstRectForRange:]):
679         (-[WKContentView closestPositionToPoint:]):
680         (-[WKContentView closestPositionToPoint:withinRange:]):
681         (-[WKContentView characterRangeAtPoint:]):
682         (-[WKContentView deleteBackward]):
683         (-[WKContentView insertText:]):
684         (-[WKContentView hasText]):
685         (-[WKContentView textInputTraits]):
686         (-[WKContentView interactionAssistant]):
687         (-[WKContentView webSelectionAssistant]):
688         (-[WKContentView selectionRange]):
689         (-[WKContentView rectForNSRange:]):
690         (-[WKContentView _markedTextNSRange]):
691         (-[WKContentView selectedDOMRange]):
692         (-[WKContentView setSelectedDOMRange:affinityDownstream:]):
693         (-[WKContentView replaceRangeWithTextWithoutClosingTyping:replacementText:]):
694         (-[WKContentView rectContainingCaretSelection]):
695         (-[WKContentView requiresKeyEvents]):
696         (-[WKContentView handleKeyWebEvent:]):
697         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
698         (-[WKContentView setBottomBufferHeight:]):
699         (-[WKContentView automaticallySelectedOverlay]):
700         (-[WKContentView selectionGranularity]):
701         (-[WKContentView insertDictationResult:withCorrectionIdentifier:]):
702         (-[WKContentView metadataDictionariesForDictationResults]):
703         (-[WKContentView previousUnperturbedDictationResultBoundaryFromPosition:]):
704         (-[WKContentView nextUnperturbedDictationResultBoundaryFromPosition:]):
705         (-[WKContentView moveBackward:]):
706         (-[WKContentView moveForward:]):
707         (-[WKContentView characterBeforeCaretSelection]):
708         (-[WKContentView wordContainingCaretSelection]):
709         (-[WKContentView wordRangeContainingCaretSelection]):
710         (-[WKContentView setMarkedText:]):
711         (-[WKContentView hasContent]):
712         (-[WKContentView selectAll]):
713         (-[WKContentView textColorForCaretSelection]):
714         (-[WKContentView fontForCaretSelection]):
715         (-[WKContentView hasSelection]):
716         (-[WKContentView isPosition:atBoundary:inDirection:]):
717         (-[WKContentView positionFromPosition:toBoundary:inDirection:]):
718         (-[WKContentView isPosition:withinTextUnit:inDirection:]):
719         (-[WKContentView rangeEnclosingPosition:withGranularity:inDirection:]):
720         (-[WKContentView takeTraitsFrom:]):
721         (-[WKContentView _startAssistingKeyboard]):
722         (-[WKContentView _stopAssistingKeyboard]):
723         (-[WKContentView _startAssistingNode]):
724         (-[WKContentView _stopAssistingNode]):
725         (-[WKContentView _selectionChanged]):
726         (-[WKContentView shouldIgnoreWebTouch]):
727         (-[WKContentView isAnyTouchOverActiveArea:]):
728         (-[WKTextRange _isCaret]):
729         (-[WKTextRange _isRanged]):
730         (+[WKTextRange textRangeWithState:isRange:isEditable:startRect:endRect:selectionRects:selectedTextLength:]):
731         (-[WKTextRange dealloc]):
732         (-[WKTextRange description]):
733         (-[WKTextRange start]):
734         (-[WKTextRange end]):
735         (-[WKTextRange isEmpty]):
736         (-[WKTextRange isEqual:]):
737         (+[WKTextPosition textPositionWithRect:]):
738         (-[WKTextPosition isEqual:]):
739         (-[WKTextPosition description]):
740         (-[WKTextSelectionRect initWithWebRect:]):
741         (-[WKTextSelectionRect dealloc]):
742         (+[WKTextSelectionRect textSelectionRectsWithWebRects:]):
743         (-[WKTextSelectionRect rect]):
744         (-[WKTextSelectionRect writingDirection]):
745         (-[WKTextSelectionRect range]):
746         (-[WKTextSelectionRect containsStart]):
747         (-[WKTextSelectionRect containsEnd]):
748         (-[WKTextSelectionRect isVertical]):
749         (+[WKAutocorrectionRects autocorrectionRectsWithRects:lastRect:]):
750         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
751         (-[WKAutocorrectionContext dealloc]):
752         * UIProcess/ios/WKContentViewInternal.h: Removed.
753         * WebKit2.xcodeproj/project.pbxproj:
754
755 2014-02-24  Anders Carlsson  <andersca@apple.com>
756
757         WKProcessPool should use secondary processes + network process
758         https://bugs.webkit.org/show_bug.cgi?id=129282
759
760         Reviewed by Simon Fraser.
761
762         * UIProcess/API/Cocoa/WKProcessPool.mm:
763         (-[WKProcessPool initWithConfiguration:]):
764
765 2014-02-24  Jeremy Jones  <jeremyj@apple.com>
766
767         WK2 AVKit fullscreen doesn't display video.
768         https://bugs.webkit.org/show_bug.cgi?id=128564
769
770         Reviewed by Simon Fraser.
771
772         * Shared/mac/RemoteLayerTreeTransaction.h:
773         Add a property to track video layer pending fullscreen.
774
775         (WebKit::RemoteLayerTreeTransaction::isVideoLayerIDPendingFullscreen):
776         (WebKit::RemoteLayerTreeTransaction::addVideoLayerIDPendingFullscreen):
777         Add a property to track video layer pending fullscreen.
778
779         * Shared/mac/RemoteLayerTreeTransaction.mm:
780         (WebKit::RemoteLayerTreeTransaction::encode):
781         (WebKit::RemoteLayerTreeTransaction::decode):
782         Encode and decode m_videoLayerIDsPendingFullscreen.
783
784         * UIProcess/ios/WebPageProxyIOS.mm:
785         (WebKit::WebPageProxy::didCommitLayerTree):
786         Let WebVideoFullscreenManagerProxy see the RemoteLayerTreeTransaction.
787
788         * UIProcess/ios/WebVideoFullscreenManagerProxy.cpp:
789         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
790         Look for video layer pending fullscreen on the transaction to initiate
791         fullscreen.
792
793         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
794         Start looking for the video layer pending fullscreen in the transaction.
795
796         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
797         Override to prevent fullscreen from happening before the layer
798         is pending fullscreen.
799
800         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
801         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
802         Pass a more specific videoLayerID in SetVideoLayerID,
803         i.e. WebCore::GraphicsLayer::PlatformLayerID.
804
805         * WebProcess/WebPage/WebPage.cpp:
806         (WebKit::WebPage::willCommitLayerTree):
807         Move webPage specific transaction building here, including,
808         giving WebVideoFullscreenManager a chance to modify the transaction.
809
810         * WebProcess/WebPage/WebPage.h:
811         Add willCommitLayerTree();
812
813         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
814         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
815         (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
816         Make and break the connection from CALayer to PlatformCALayerRemoteCustom,
817         the same way it is done for PlatformCALayerMac.
818
819         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
820         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
821         Move WebPage specific transaction building into WebPage::willCommitLayerTree.
822
823         * WebProcess/ios/WebVideoFullscreenManager.cpp:
824         (WebKit::WebVideoFullscreenManager::willCommitLayerTree):
825         addVideoLayerIDPendingFullscreen on RemoteLayerTreeTransaction when needed.
826
827         (WebKit::WebVideoFullscreenManager::setVideoLayer):
828         Pass along the video layerID.
829
830         * WebProcess/ios/WebVideoFullscreenManager.h:
831         Add willCommitLayerTree() and remove setVideoLayerID().
832         Add a member to retain the unparented PlatformCALayer.
833
834 2014-02-24  Martin Hock  <mhock@apple.com>
835
836         Create SessionID value-style class for session IDs.
837         https://bugs.webkit.org/show_bug.cgi?id=129141
838
839         The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
840
841         Reviewed by Brady Eidson.
842
843         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
844         (WebKit::storageSession):
845         (WebKit::NetworkConnectionToWebProcess::startDownload):
846         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
847         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
848         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
849         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
850         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
851         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
852         * NetworkProcess/NetworkConnectionToWebProcess.h:
853         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
854         * NetworkProcess/NetworkProcess.cpp:
855         (WebKit::NetworkProcess::initializeNetworkProcess):
856         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
857         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
858         * NetworkProcess/NetworkProcess.h:
859         * NetworkProcess/NetworkProcess.messages.in:
860         * NetworkProcess/NetworkResourceLoader.h:
861         * NetworkProcess/RemoteNetworkingContext.h:
862         * NetworkProcess/mac/RemoteNetworkingContext.mm:
863         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
864         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
865         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
866         * Shared/Network/NetworkResourceLoadParameters.cpp:
867         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
868         * Shared/Network/NetworkResourceLoadParameters.h:
869         * Shared/SessionTracker.cpp:
870         (WebKit::staticSessionMap):
871         (WebKit::storageSessionToID):
872         (WebKit::SessionTracker::sessionMap):
873         (WebKit::SessionTracker::session):
874         (WebKit::SessionTracker::sessionID):
875         (WebKit::SessionTracker::setSession):
876         (WebKit::SessionTracker::destroySession):
877         * Shared/SessionTracker.h: Move code to SessionID class.
878         * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
879         (IPC::ArgumentCoder<SessionID>::encode):
880         (IPC::ArgumentCoder<SessionID>::decode):
881         * Shared/WebCoreArgumentCoders.h:
882         * Shared/mac/CookieStorageShim.mm:
883         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
884         * UIProcess/APISession.cpp:
885         (API::generateID):
886         (API::Session::defaultSession):
887         (API::Session::legacyPrivateSession):
888         (API::Session::Session):
889         (API::Session::isEphemeral):
890         (API::Session::getID):
891         * UIProcess/APISession.h:
892         * UIProcess/WebContext.cpp:
893         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
894         (WebKit::WebContext::createNewWebProcess):
895         * UIProcess/WebContext.h:
896         * UIProcess/WebPageProxy.h:
897         (WebKit::WebPageProxy::sessionID):
898         * WebProcess/InjectedBundle/InjectedBundle.cpp:
899         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
900         * WebProcess/Network/WebResourceLoadScheduler.cpp:
901         (WebKit::WebResourceLoadScheduler::scheduleLoad):
902         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
903         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
904         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
905         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
906         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
907         (WebKit::WebFrameNetworkingContext::storageSession):
908         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
909         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
910         (WebKit::WebFrameNetworkingContext::storageSession):
911         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
912         * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
913         (WebKit::WebPage::WebPage):
914         (WebKit::WebPage::sessionID):
915         (WebKit::WebPage::isUsingEphemeralSession):
916         (WebKit::WebPage::setSessionID):
917         (WebKit::WebPage::updatePreferences):
918         * WebProcess/WebPage/WebPage.h:
919         * WebProcess/WebPage/WebPage.messages.in:
920         * WebProcess/WebProcess.cpp:
921         (WebKit::WebProcess::ensurePrivateBrowsingSession):
922         (WebKit::WebProcess::destroyPrivateBrowsingSession):
923         * WebProcess/WebProcess.h:
924         * WebProcess/WebProcess.messages.in:
925
926 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
927
928         Remove PDFViewController.*, which is unused
929         https://bugs.webkit.org/show_bug.cgi?id=129270
930
931         Reviewed by Tim Horton.
932
933         * UIProcess/mac/PDFViewController.h: Removed.
934         * UIProcess/mac/PDFViewController.mm: Removed.
935
936 2014-02-24  Anders Carlsson  <andersca@apple.com>
937
938         Rename WKProcessClass to WKProcessPool
939         https://bugs.webkit.org/show_bug.cgi?id=129268
940
941         Reviewed by Dan Bernstein.
942
943         Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.
944
945         * Shared/Cocoa/APIObject.mm:
946         (API::Object::newObject):
947         * UIProcess/API/Cocoa/WKProcessClass.h:
948         * UIProcess/API/Cocoa/WKProcessClass.mm:
949         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
950         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
951         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
952         * UIProcess/API/Cocoa/WKProcessClassPrivate.h:
953         * UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
954         * UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
955         (-[WKProcessPool init]):
956         (-[WKProcessPool initWithConfiguration:]):
957         (-[WKProcessPool dealloc]):
958         (-[WKProcessPool description]):
959         (-[WKProcessPool configuration]):
960         (-[WKProcessPool API::]):
961         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
962         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
963         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
964         (-[WKProcessPoolConfiguration _injectedBundleURL]):
965         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
966         (-[WKProcessPoolConfiguration description]):
967         (-[WKProcessPoolConfiguration copyWithZone:]):
968         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
969         * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
970         (WebKit::wrapper):
971         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
972         * UIProcess/API/Cocoa/WKWebView.mm:
973         (-[WKWebView initWithFrame:configuration:]):
974         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
975         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
976         (-[WKWebViewConfiguration description]):
977         (-[WKWebViewConfiguration copyWithZone:]):
978         (-[WKWebViewConfiguration processPool]):
979         (-[WKWebViewConfiguration setProcessPool:]):
980         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
981         (-[WKWebViewConfiguration setProcessClass:]):
982         (-[WKWebViewConfiguration processClass]):
983         * UIProcess/API/mac/WKView.mm:
984         * UIProcess/ios/WKContentView.mm:
985         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
986         * WebKit2.xcodeproj/project.pbxproj:
987
988 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
989
990         Move non-API files out of WebKit2/UIProcess/API/mac
991         https://bugs.webkit.org/show_bug.cgi?id=129267
992
993         Reviewed by Anders Carlsson.
994
995         * UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
996         * UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
997         * UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
998         * UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
999         * UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
1000         * UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
1001         * UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
1002         * UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
1003         * WebKit2.xcodeproj/project.pbxproj:
1004
1005 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
1006
1007         Move non-API files in the API/ios directory out to UIProcess/ios
1008         https://bugs.webkit.org/show_bug.cgi?id=129264
1009
1010         Reviewed by Anders Carlsson.
1011
1012         * UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
1013         * UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
1014         * UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
1015         * UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
1016         * UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
1017         * UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
1018         * UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
1019         * UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
1020         * UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
1021         * UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
1022         * UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
1023         * WebKit2.xcodeproj/project.pbxproj:
1024
1025 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
1026
1027         Rename PageClientImplIOS::m_view to m_contentView
1028         https://bugs.webkit.org/show_bug.cgi?id=129124
1029
1030         Reviewed by Benjamin Poulain.
1031         
1032         Simple rename of m_view to m_contentView in preparation for
1033         also holding onto the WKView.
1034
1035         * UIProcess/API/ios/PageClientImplIOS.h:
1036         * UIProcess/API/ios/PageClientImplIOS.mm:
1037         (WebKit::PageClientImpl::PageClientImpl):
1038         (WebKit::PageClientImpl::createDrawingAreaProxy):
1039         (WebKit::PageClientImpl::viewSize):
1040         (WebKit::PageClientImpl::isViewInWindow):
1041         (WebKit::PageClientImpl::processDidExit):
1042         (WebKit::PageClientImpl::didRelaunchProcess):
1043         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
1044         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1045         (WebKit::PageClientImpl::interpretKeyEvent):
1046         (WebKit::PageClientImpl::positionInformationDidChange):
1047         (WebKit::PageClientImpl::selectionDidChange):
1048         (WebKit::PageClientImpl::screenToRootView):
1049         (WebKit::PageClientImpl::rootViewToScreen):
1050         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
1051         (WebKit::PageClientImpl::takeViewSnapshot):
1052         (WebKit::PageClientImpl::didGetTapHighlightGeometries):
1053         (WebKit::PageClientImpl::didCommitLayerTree):
1054         (WebKit::PageClientImpl::startAssistingNode):
1055         (WebKit::PageClientImpl::stopAssistingNode):
1056
1057 2014-02-24  Enrique Ocaña González  <eocanha@igalia.com>
1058
1059         REGRESSION(r164438): [GTK] Tests /webkit2/WebKitWebView/tls-errors-policy and /webkit2/WebKitWebContext/uri-scheme fail
1060         https://bugs.webkit.org/show_bug.cgi?id=129252
1061
1062         Reviewed by Carlos Garcia Campos.
1063
1064         * UIProcess/API/gtk/WebKitPrivate.cpp: Manage error values generated by the user application and not present in WebCore
1065         (toWebKitError):
1066         (toWebCoreError):
1067
1068 2014-02-24  Alexey Proskuryakov  <ap@apple.com>
1069
1070         <rdar://problem/16059894> Update AppleConnect sandbox profile for XPC process names.
1071
1072         Patch by Ivan Krstić, reviewed and landed by me.
1073
1074         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1075
1076 2014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
1077
1078         Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
1079         https://bugs.webkit.org/show_bug.cgi?id=129255
1080
1081         Reviewed by Csaba Osztrogonác.
1082
1083         ENABLE_WORKERS macro was removed in r159679.
1084         Support is now also removed from xcconfig files.
1085
1086         * Configurations/FeatureDefines.xcconfig:
1087
1088 2014-02-24  Iago Toral Quiroga  <itoral@igalia.com>
1089
1090         [GTK] Wrong active context when destroying GL objects.
1091         https://bugs.webkit.org/show_bug.cgi?id=129244
1092
1093         Reviewed by Martin Robinson.
1094
1095         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1096         (WebKit::LayerTreeHostGtk::invalidate): make context current before destroying GL objects.
1097
1098 2014-02-24  Koop Mast <kwm@FreeBSD.org>
1099
1100         Remove unused error.h header.
1101         https://bugs.webkit.org/show_bug.cgi?id=126774
1102
1103         Reviewed by Anders Carlsson.
1104
1105         This header doesn't exists on FreeBSD. According to
1106         https://www.gnu.org/software/gnulib/manual/html_node/error_002eh.html
1107         the function that this header implements are not present in the file.
1108         So there isn't any need for this header.
1109
1110         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1111
1112 2014-02-24  David Kilzer  <ddkilzer@apple.com>
1113
1114         Remove redundant setting in FeatureDefines.xcconfig
1115
1116         * Configurations/FeatureDefines.xcconfig:
1117
1118 2014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1119
1120         [GTK] Remove unneeded method webkitWebViewBaseRequestExitFullScreen
1121         https://bugs.webkit.org/show_bug.cgi?id=129245
1122
1123         Reviewed by Sergio Villar Senin.
1124
1125         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1126         (webkitWebViewBaseKeyPressEvent): Call FullscreenManager::requestExitFullScreen() directly.
1127         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1128
1129 2014-02-23  Dan Bernstein  <mitz@apple.com>
1130
1131         <rdar://problem/16144508> [iOS] Some definitions of INSTALL_PATH don’t account for INSTALL_PATH_PREFIX
1132         https://bugs.webkit.org/show_bug.cgi?id=129241
1133
1134         Reviewed by Mark Rowe.
1135
1136         * Configurations/Base.xcconfig: Define INSTALL_PATH here in terms of INSTALL_PATH_ACTUAL.
1137         * Configurations/BaseLegacyProcess.xcconfig: Define only INSTALL_PATH_ACTUAL.
1138         * Configurations/BaseTarget.xcconfig: Simplify the definition of
1139         NORMAL_WEBKIT2_FRAMEWORKS_DIR, now that it shouldn’t include SDKROOT for the Simulator.
1140         * Configurations/BaseXPCService.xcconfig: Define only INSTALL_PATH_ACTUAL.
1141         * Configurations/WebKit2.xcconfig: Ditto.
1142
1143 2014-02-23  Sam Weinig  <sam@webkit.org>
1144
1145         Update FeatureDefines.xcconfig
1146
1147         Rubber-stamped by Anders Carlsson.
1148
1149         * Configurations/FeatureDefines.xcconfig:
1150
1151 2014-02-23  Sam Weinig  <sam@webkit.org>
1152
1153         [WebKit2] Add C-SPI to enable/disable telephone number detection
1154         https://bugs.webkit.org/show_bug.cgi?id=129239
1155
1156         Reviewed by Dean Jackson.
1157
1158         * UIProcess/API/C/WKPreferences.cpp:
1159         (WKPreferencesSetTelephoneNumberParsingEnabled):
1160         (WKPreferencesGetTelephoneNumberParsingEnabled):
1161         * UIProcess/API/C/WKPreferencesPrivate.h:
1162
1163 2014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1164
1165         Change a url parameter type with URL in NavigatorContentUtils
1166         https://bugs.webkit.org/show_bug.cgi?id=129202
1167
1168         Reviewed by Sam Weinig.
1169
1170         It would be good if we use *URL* for url parameters instead of using String.
1171
1172         Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
1173
1174         * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
1175         (WebKit::WebNavigatorContentUtilsClient::isProtocolHandlerRegistered):
1176         (WebKit::WebNavigatorContentUtilsClient::unregisterProtocolHandler):
1177
1178 2014-02-23  Sam Weinig  <sam@webkit.org>
1179
1180         Move telephone number detection behind its own ENABLE macro
1181         https://bugs.webkit.org/show_bug.cgi?id=129236
1182
1183         Reviewed by Dean Jackson.
1184
1185         * Configurations/FeatureDefines.xcconfig:
1186         Add ENABLE_TELEPHONE_NUMBER_DETECTION.
1187
1188 2014-02-23  Diego Pino García  <dpino@igalia.com>
1189
1190         [GTK] Fix build after Web Inspector code reorganization (r164543)
1191         https://bugs.webkit.org/show_bug.cgi?id=129231
1192
1193         Reviewed by Dean Jackson.
1194
1195         * PlatformGTK.cmake:
1196         Modify paths to Web Inspector code.
1197
1198 2014-02-22  Joseph Pecoraro  <pecoraro@apple.com>
1199
1200         Remove some unreachable code (-Wunreachable-code)
1201         https://bugs.webkit.org/show_bug.cgi?id=129220
1202
1203         Reviewed by Eric Carlson.
1204
1205         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1206         (WebKit::toAPI):
1207
1208 2014-02-22  Dan Bernstein  <mitz@apple.com>
1209
1210         [Cocoa] WKUIDelegate.h is a project header
1211         https://bugs.webkit.org/show_bug.cgi?id=129215
1212
1213         Reviewed by Anders Carlsson.
1214
1215         * WebKit2.xcodeproj/project.pbxproj: Make it a public header.
1216
1217 2014-02-22  Dan Bernstein  <mitz@apple.com>
1218
1219         <rdar://problem/12500358> [Cocoa] Development variants of XPC services should not be installed in WebKit2.framework/XPCServices
1220         https://bugs.webkit.org/show_bug.cgi?id=129197
1221
1222         Reviewed by Sam Weinig.
1223
1224         * Configurations/BaseXPCService.xcconfig: Made INSTALL_PATH vary based on
1225         WK_XPC_SERVICE_VARIANT. For the Development variant, use an install path outside the
1226         framework. Note that engineering builds using the build action continue to have the
1227         Development variants copied into the framework by a script build phase.
1228         * Configurations/DatabaseService.Development.xcconfig: Set WK_XPC_SERVICE_VARIANT.
1229         * Configurations/DatabaseService.xcconfig: Ditto.
1230         * Configurations/NetworkService.Development.xcconfig: Ditto.
1231         * Configurations/NetworkService.xcconfig: Ditto.
1232         * Configurations/PluginService.32.xcconfig: Ditto.
1233         * Configurations/PluginService.64.xcconfig: Ditto.
1234         * Configurations/PluginService.Development.xcconfig: Ditto.
1235         * Configurations/WebContentService.Development.xcconfig: Ditto.
1236         * Configurations/WebContentService.xcconfig: Ditto.
1237
1238 2014-02-21  Brent Fulgham  <bfulgham@apple.com>
1239
1240         Extend media support for WebVTT sources
1241         https://bugs.webkit.org/show_bug.cgi?id=129156
1242
1243         Reviewed by Eric Carlson.
1244
1245         * Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
1246
1247 2014-02-21  Enrica Casucci  <enrica@apple.com>
1248
1249         [iOS WebKit2] Keyboard appears every time a link is tapped after searching Google
1250         <rdar://problem/16072563>.
1251
1252         Reviewed by Benjamin Poulain.
1253
1254         We need to stop assisting the node if we have
1255         navigated to a different page.
1256
1257         * UIProcess/API/ios/WKContentView.mm:
1258         (-[WKContentView _didCommitLoadForMainFrame]):
1259
1260 2014-02-21  Dan Bernstein  <mitz@apple.com>
1261
1262         Made WKWebView implement all WKContentViewDelegate methods.
1263
1264         Reviewed by Anders Carlsson.
1265
1266         * UIProcess/API/Cocoa/WKWebView.mm:
1267         (-[WKWebView takeViewSnapshotForContentView:]): Moved from WKViewIOS.mm.
1268         * UIProcess/API/ios/WKContentView.h: Made all protocol methods required.
1269         * UIProcess/API/ios/WKViewIOS.mm:
1270         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): Removed code
1271         to set self as the delegate on the content view.
1272
1273 2014-02-21  Sam Weinig  <sam@webkit.org>
1274
1275         <rdar://problem/16073882> Please add _AbandonCoalition key to plugin XPC service Info.plist
1276
1277         Reviewed by Anders Carlsson.
1278
1279         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1280         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
1281
1282 2014-02-21  Jeffrey Pfau  <jpfau@apple.com>
1283
1284         [Mac] Cache callbacks for cache partitioning may be passed null
1285         https://bugs.webkit.org/show_bug.cgi?id=129175
1286
1287         Reviewed by Brady Eidson.
1288
1289         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
1290         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
1291
1292 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
1293
1294         [iOS][WK2] Update the visible content rects on zoom
1295         https://bugs.webkit.org/show_bug.cgi?id=129174
1296
1297         Reviewed by Simon Fraser.
1298
1299         Generalize _updateVisibleContentRects to also act during the zoom and not only at the end.
1300
1301         * UIProcess/API/Cocoa/WKWebView.mm:
1302         (-[WKWebView scrollViewDidZoom:]):
1303         * UIProcess/API/ios/WKViewIOS.mm:
1304         (-[WKView scrollViewDidZoom:]):
1305
1306 2014-02-21  Benjamin Poulain  <benjamin@webkit.org>
1307
1308         jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
1309         https://bugs.webkit.org/show_bug.cgi?id=128893
1310
1311         Reviewed by Darin Adler.
1312
1313         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1314         (WebKit::InjectedBundle::pageNumberForElementById): Remove the explicit conversion to use the right overload.
1315
1316 2014-02-21  Enrica Casucci  <enrica@apple.com>
1317
1318         Support WebSelections in WK2 on iOS.
1319         https://bugs.webkit.org/show_bug.cgi?id=127015
1320         <rdar://problem/15211964>
1321
1322         Reviewed by Benjamin Poulain.
1323
1324         This is the remaining work on block selections for iOS in WK2.
1325         Once a block selection has been created with a long press gesture
1326         on a selectable area, we can interact with it by touching the four
1327         handles at the top, right, bottom and left side of the selection box.
1328         Expanding or shrinking a block selection requires finding the next/previous
1329         block in the direction of the movement, depending on the handle we
1330         are interacting with.
1331         Every time a new block is selected, we compute the thresholds required
1332         to trigger another block change. The thresholds are sent back to the
1333         UIProcess that will use this information to decide when to activate
1334         the new selection, either bigger or smaller.
1335         This patch also fixes a bug in selectWithTwoTouches where the points
1336         were not mapped to the active frame.
1337
1338         * Shared/ios/WKGestureTypes.h:
1339         * UIProcess/API/ios/PageClientImplIOS.h:
1340         * UIProcess/API/ios/PageClientImplIOS.mm:
1341         (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouches):
1342         * UIProcess/API/ios/WKContentView.mm:
1343         (-[WKContentView _didUpdateBlockSelectionWithTouches:withFlags:growThreshold:shrinkThreshold:]):
1344         * UIProcess/API/ios/WKContentViewInternal.h:
1345         * UIProcess/API/ios/WKInteractionView.h:
1346         * UIProcess/API/ios/WKInteractionView.mm:
1347         (-[WKInteractionView hasSelectablePositionAtPoint:]):
1348         (-[WKInteractionView clearSelection]):
1349         (toWKHandlePosition):
1350         (-[WKInteractionView _didUpdateBlockSelectionWithTouches:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
1351         (-[WKInteractionView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
1352         * UIProcess/PageClient.h:
1353         * UIProcess/WebPageProxy.h:
1354         * UIProcess/WebPageProxy.messages.in:
1355         * UIProcess/ios/WebPageProxyIOS.mm:
1356         (WebKit::WebPageProxy::updateBlockSelectionWithTouches):
1357         (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouches):
1358         * WebProcess/WebPage/WebPage.cpp:
1359         * WebProcess/WebPage/WebPage.h:
1360         * WebProcess/WebPage/WebPage.messages.in:
1361         * WebProcess/WebPage/ios/WebPageIOS.mm:
1362         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1363         (WebKit::WebPage::rangeForBlockAtPoint):
1364         (WebKit::WebPage::selectWithGesture):
1365         (WebKit::distanceBetweenRectsForPosition):
1366         (WebKit::rectsEssentiallyTheSame):
1367         (WebKit::containsRange):
1368         (WebKit::unionDOMRanges):
1369         (WebKit::computeEdgeCenter):
1370         (WebKit::WebPage::expandedRangeFromHandle):
1371         (WebKit::WebPage::contractedRangeFromHandle):
1372         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
1373         (WebKit::shouldExpand):
1374         (WebKit::WebPage::changeBlockSelection):
1375         (WebKit::WebPage::updateBlockSelectionWithTouches):
1376         (WebKit::WebPage::clearSelection):
1377         (WebKit::WebPage::selectWithTwoTouches):
1378         (WebKit::WebPage::getPositionInformation):
1379
1380 2014-02-21  Anders Carlsson  <andersca@apple.com>
1381
1382         Make sure to invoke the completion handler for JS alerts
1383         https://bugs.webkit.org/show_bug.cgi?id=129158
1384
1385         Reviewed by Alexey Proskuryakov.
1386
1387         * UIProcess/API/C/WKPage.cpp:
1388         (WKPageSetPageUIClient):
1389
1390 2014-02-20  Zalan Bujtas  <zalan@apple.com>
1391
1392         Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
1393         https://bugs.webkit.org/show_bug.cgi?id=129137
1394
1395         Reviewed by Simon Fraser.
1396
1397         No change in behavior.
1398
1399         * WebProcess/WebPage/FindController.cpp:
1400         (WebKit::FindController::getFindIndicatorBitmapAndRect):
1401
1402 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
1403
1404         Add a missing piece of r164469
1405
1406         * UIProcess/API/Cocoa/WKWebView.mm:
1407         (-[WKWebView scrollViewWillBeginDragging:]):
1408         I forgot to duplicate the change from WKViewIOS in r164469.
1409
1410 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
1411
1412         WKInteractionView always blocks the main thread when sending touch events
1413         https://bugs.webkit.org/show_bug.cgi?id=129059
1414
1415         Reviewed by Enrica Casucci.
1416
1417         Add the asynchronous dispatching to WebKit2.
1418
1419         * Shared/NativeWebTouchEvent.h:
1420         (WebKit::NativeWebTouchEvent::uniqueId):
1421         * Shared/ios/NativeWebTouchEventIOS.mm:
1422         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1423         * UIProcess/API/ios/PageClientImplIOS.mm:
1424         (WebKit::PageClientImpl::doneWithTouchEvent):
1425         * UIProcess/API/ios/WKContentView.h:
1426         * UIProcess/API/ios/WKContentView.mm:
1427         (-[WKContentView willStartUserTriggeredScroll]):
1428         (-[WKContentView willStartUserTriggeredZoom]):
1429         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
1430         * UIProcess/API/ios/WKContentViewInternal.h:
1431         * UIProcess/API/ios/WKInteractionView.h:
1432         * UIProcess/API/ios/WKInteractionView.mm:
1433         (-[WKInteractionView _webTouchEventsRecognized:]):
1434         (-[WKInteractionView _webTouchEvent:WebKit::preventsNativeGestures:]):
1435         (-[WKInteractionView _willStartUserTriggeredScrollingOrZooming]):
1436         * UIProcess/API/ios/WKViewIOS.mm:
1437         (-[WKView scrollViewWillBeginDragging:]):
1438         * WebKit2.xcodeproj/project.pbxproj:
1439
1440 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
1441
1442         Start fixing the view states driven by the WKScrollView
1443         https://bugs.webkit.org/show_bug.cgi?id=129140
1444
1445         Reviewed by Tim Horton and Simon Fraser.
1446
1447         WKScrollView creates a "window" over WKContentView with an area that is exposed,
1448         an area that is unobcured and with a certain scale.
1449
1450         Instead of having 3 loosely related paths for updating WKContentView
1451         when the content "window" change, everything is consolidated behind the
1452         single API -[WKContentView didUpdateVisibleRect:unobscuredRect:scale:].
1453
1454         This patch only fixes the content updates from the UI process side to keep things simple.
1455
1456         * UIProcess/API/Cocoa/WKWebView.mm:
1457         (-[WKWebView _didFinishScrolling]):
1458         (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
1459         (-[WKWebView scrollViewDidEndDecelerating:]):
1460         (-[WKWebView scrollViewDidScrollToTop:]):
1461         (-[WKWebView scrollViewDidScroll:]):
1462         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
1463         (-[WKWebView _frameOrBoundsChanged]):
1464         (-[WKWebView _updateContentWindow]):
1465         (-[WKWebView _setObscuredInsets:]):
1466         * UIProcess/API/ios/WKContentView.h:
1467         * UIProcess/API/ios/WKContentView.mm:
1468         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:]):
1469         (-[WKContentView _updateFixedPositionRect]):
1470         (-[WKContentView didFinishScrolling]):
1471         (-[WKContentView didZoomToScale:]):
1472         * UIProcess/API/ios/WKViewIOS.mm:
1473         (-[WKView contentView:didCommitLayerTree:]):
1474         (-[WKView _didFinishScrolling]):
1475         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
1476         (-[WKView scrollViewDidEndDecelerating:]):
1477         (-[WKView scrollViewDidScrollToTop:]):
1478         (-[WKView scrollViewDidScroll:]):
1479         (-[WKView scrollViewDidEndZooming:withView:atScale:]):
1480         Scrolling is modified to take into account the view position and the obcured content.
1481         Instead of driving the scrolling position from the UIScrollView delegate callbacks,
1482         we use changes in unobscured rect to find changes in "content visible scroll position".
1483
1484         WebPageProxy::didFinishScrolling() is removed. All the scrollOffset updates now go through
1485         the ScrollingCoordinator.
1486
1487         (-[WKView _frameOrBoundsChanged]):
1488         (-[WKView _updateContentWindow]):
1489         (-[WKView _setObscuredInsets:]):
1490         * UIProcess/WebPageProxy.h:
1491         * UIProcess/ios/WebPageProxyIOS.mm:
1492         (WebKit::WebPageProxy::unobscuredContentRect):
1493         (WebKit::WebPageProxy::setUnobscuredContentRect):
1494         * WebProcess/WebPage/WebPage.messages.in:
1495         * WebProcess/WebPage/ios/WebPageIOS.mm:
1496
1497 2014-02-20  Tim Horton  <timothy_horton@apple.com>
1498
1499         Fix a build warning by moving some WKWebView methods from the private category to WKWebView itself.
1500
1501         Reviewed by Anders Carlsson.
1502
1503         * UIProcess/API/Cocoa/WKWebView.mm:
1504         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1505         (-[WKWebView allowsBackForwardNavigationGestures]):
1506
1507 2014-02-20  Enrica Casucci  <enrica@apple.com>
1508
1509         ASSERT on touches callbacks after r164409 on iOS.
1510         https://bugs.webkit.org/show_bug.cgi?id=129135
1511
1512         Reviewed by Alexey Proskuryakov.
1513
1514         The change used incorrecly true and false in TouchesCallbacks and
1515         ImageCallback. It also reintroduced isMainThread() which doesn't work
1516         for iOS.
1517
1518         * UIProcess/GenericCallback.h:
1519         (WebKit::CallbackBase::generateCallbackID):
1520         (WebKit::ImageCallback::performCallbackWithReturnValue):
1521         (WebKit::ImageCallback::invalidate):
1522         * UIProcess/WebPageProxy.h:
1523         (WebKit::TouchesCallback::performCallbackWithReturnValue):
1524         (WebKit::TouchesCallback::invalidate):
1525
1526 2014-02-20  Anders Carlsson  <andersca@apple.com>
1527
1528         We need something like WKPageUIClient in the Obj-C API
1529         https://bugs.webkit.org/show_bug.cgi?id=129123
1530         <rdar://problem/15338439>
1531
1532         Reviewed by Sam Weinig.
1533
1534         * UIProcess/API/APIUIClient.h:
1535         * UIProcess/API/Cocoa/WKUIDelegate.h: Added.
1536         * UIProcess/API/Cocoa/WKWebView.h:
1537         * UIProcess/API/Cocoa/WKWebView.mm:
1538         (-[WKWebView initWithFrame:configuration:]):
1539         (-[WKWebView UIDelegate]):
1540         (-[WKWebView setUIDelegate:]):
1541         * UIProcess/Cocoa/UIClient.h: Added.
1542         * UIProcess/Cocoa/UIClient.mm: Added.
1543         (WebKit::UIClient::UIClient):
1544         (WebKit::UIClient::~UIClient):
1545         (WebKit::UIClient::delegate):
1546         (WebKit::UIClient::setDelegate):
1547         (WebKit::UIClient::runJavaScriptAlert):
1548         (WebKit::UIClient::runJavaScriptConfirm):
1549         (WebKit::UIClient::runJavaScriptPrompt):
1550         * UIProcess/WebPageProxy.h:
1551         (WebKit::WebPageProxy::uiClient):
1552         * WebKit2.xcodeproj/project.pbxproj:
1553
1554 2014-02-20  Brady Eidson  <beidson@apple.com>
1555
1556         Add very basic image control rendering
1557         https://bugs.webkit.org/show_bug.cgi?id=129080
1558
1559         Reviewed by Tim Horton.
1560
1561         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1562         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Expose the 
1563           imageControlsEnabled setting to WKTR.
1564
1565 2014-02-20  Tim Horton  <timothy_horton@apple.com>
1566
1567         Add magnification and swiping properties to WKWebView
1568         https://bugs.webkit.org/show_bug.cgi?id=129117
1569
1570         Reviewed by Dan Bernstein.
1571
1572         * UIProcess/API/Cocoa/WKViewPrivate.h:
1573         Move allowsBackForwardNavigationGestures out of a Mac-only block.
1574
1575         * UIProcess/API/Cocoa/WKWebView.h:
1576         Add allowsBackForwardNavigationGestures to WKWebView for both platforms.
1577         Add magnification properties to WKWebView for Mac.
1578
1579         * UIProcess/API/Cocoa/WKWebView.mm:
1580         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
1581         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1582         (-[WKWebView allowsBackForwardNavigationGestures]):
1583         (-[WKWebView setAllowsMagnification:]):
1584         (-[WKWebView allowsMagnification]):
1585         (-[WKWebView setMagnification:]):
1586         (-[WKWebView magnification]):
1587         (-[WKWebView setMagnification:centeredAtPoint:]):
1588         For iOS, copy implementations from WKViewIOS.
1589         For Mac, forward to the inner WKView.
1590
1591         * UIProcess/API/ios/WKViewIOS.mm:
1592         (-[WKView setAllowsBackForwardNavigationGestures:]):
1593         Fix the logic to tear down the ViewGestureController.
1594
1595         * UIProcess/API/mac/WKView.mm:
1596         (-[WKView setMagnification:centeredAtPoint:]):
1597         (-[WKView setMagnification:]):
1598         (-[WKView magnification]):
1599         Use CG types for API.
1600
1601 == Rolled over to ChangeLog-2014-02-20 ==