<rdar://problem/12500358> [Cocoa] Development variants of XPC services should not...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-02-22  Dan Bernstein  <mitz@apple.com>
2
3         <rdar://problem/12500358> [Cocoa] Development variants of XPC services should not be installed in WebKit2.framework/XPCServices
4         https://bugs.webkit.org/show_bug.cgi?id=129197
5
6         Reviewed by Sam Weinig.
7
8         * Configurations/BaseXPCService.xcconfig: Made INSTALL_PATH vary based on
9         WK_XPC_SERVICE_VARIANT. For the Development variant, use an install path outside the
10         framework. Note that engineering builds using the build action continue to have the
11         Development variants copied into the framework by a script build phase.
12         * Configurations/DatabaseService.Development.xcconfig: Set WK_XPC_SERVICE_VARIANT.
13         * Configurations/DatabaseService.xcconfig: Ditto.
14         * Configurations/NetworkService.Development.xcconfig: Ditto.
15         * Configurations/NetworkService.xcconfig: Ditto.
16         * Configurations/PluginService.32.xcconfig: Ditto.
17         * Configurations/PluginService.64.xcconfig: Ditto.
18         * Configurations/PluginService.Development.xcconfig: Ditto.
19         * Configurations/WebContentService.Development.xcconfig: Ditto.
20         * Configurations/WebContentService.xcconfig: Ditto.
21
22 2014-02-21  Brent Fulgham  <bfulgham@apple.com>
23
24         Extend media support for WebVTT sources
25         https://bugs.webkit.org/show_bug.cgi?id=129156
26
27         Reviewed by Eric Carlson.
28
29         * Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
30
31 2014-02-21  Enrica Casucci  <enrica@apple.com>
32
33         [iOS WebKit2] Keyboard appears every time a link is tapped after searching Google
34         <rdar://problem/16072563>.
35
36         Reviewed by Benjamin Poulain.
37
38         We need to stop assisting the node if we have
39         navigated to a different page.
40
41         * UIProcess/API/ios/WKContentView.mm:
42         (-[WKContentView _didCommitLoadForMainFrame]):
43
44 2014-02-21  Dan Bernstein  <mitz@apple.com>
45
46         Made WKWebView implement all WKContentViewDelegate methods.
47
48         Reviewed by Anders Carlsson.
49
50         * UIProcess/API/Cocoa/WKWebView.mm:
51         (-[WKWebView takeViewSnapshotForContentView:]): Moved from WKViewIOS.mm.
52         * UIProcess/API/ios/WKContentView.h: Made all protocol methods required.
53         * UIProcess/API/ios/WKViewIOS.mm:
54         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): Removed code
55         to set self as the delegate on the content view.
56
57 2014-02-21  Sam Weinig  <sam@webkit.org>
58
59         <rdar://problem/16073882> Please add _AbandonCoalition key to plugin XPC service Info.plist
60
61         Reviewed by Anders Carlsson.
62
63         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
64         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
65
66 2014-02-21  Jeffrey Pfau  <jpfau@apple.com>
67
68         [Mac] Cache callbacks for cache partitioning may be passed null
69         https://bugs.webkit.org/show_bug.cgi?id=129175
70
71         Reviewed by Brady Eidson.
72
73         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
74         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
75
76 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
77
78         [iOS][WK2] Update the visible content rects on zoom
79         https://bugs.webkit.org/show_bug.cgi?id=129174
80
81         Reviewed by Simon Fraser.
82
83         Generalize _updateVisibleContentRects to also act during the zoom and not only at the end.
84
85         * UIProcess/API/Cocoa/WKWebView.mm:
86         (-[WKWebView scrollViewDidZoom:]):
87         * UIProcess/API/ios/WKViewIOS.mm:
88         (-[WKView scrollViewDidZoom:]):
89
90 2014-02-21  Benjamin Poulain  <benjamin@webkit.org>
91
92         jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
93         https://bugs.webkit.org/show_bug.cgi?id=128893
94
95         Reviewed by Darin Adler.
96
97         * WebProcess/InjectedBundle/InjectedBundle.cpp:
98         (WebKit::InjectedBundle::pageNumberForElementById): Remove the explicit conversion to use the right overload.
99
100 2014-02-21  Enrica Casucci  <enrica@apple.com>
101
102         Support WebSelections in WK2 on iOS.
103         https://bugs.webkit.org/show_bug.cgi?id=127015
104         <rdar://problem/15211964>
105
106         Reviewed by Benjamin Poulain.
107
108         This is the remaining work on block selections for iOS in WK2.
109         Once a block selection has been created with a long press gesture
110         on a selectable area, we can interact with it by touching the four
111         handles at the top, right, bottom and left side of the selection box.
112         Expanding or shrinking a block selection requires finding the next/previous
113         block in the direction of the movement, depending on the handle we
114         are interacting with.
115         Every time a new block is selected, we compute the thresholds required
116         to trigger another block change. The thresholds are sent back to the
117         UIProcess that will use this information to decide when to activate
118         the new selection, either bigger or smaller.
119         This patch also fixes a bug in selectWithTwoTouches where the points
120         were not mapped to the active frame.
121
122         * Shared/ios/WKGestureTypes.h:
123         * UIProcess/API/ios/PageClientImplIOS.h:
124         * UIProcess/API/ios/PageClientImplIOS.mm:
125         (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouches):
126         * UIProcess/API/ios/WKContentView.mm:
127         (-[WKContentView _didUpdateBlockSelectionWithTouches:withFlags:growThreshold:shrinkThreshold:]):
128         * UIProcess/API/ios/WKContentViewInternal.h:
129         * UIProcess/API/ios/WKInteractionView.h:
130         * UIProcess/API/ios/WKInteractionView.mm:
131         (-[WKInteractionView hasSelectablePositionAtPoint:]):
132         (-[WKInteractionView clearSelection]):
133         (toWKHandlePosition):
134         (-[WKInteractionView _didUpdateBlockSelectionWithTouches:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
135         (-[WKInteractionView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
136         * UIProcess/PageClient.h:
137         * UIProcess/WebPageProxy.h:
138         * UIProcess/WebPageProxy.messages.in:
139         * UIProcess/ios/WebPageProxyIOS.mm:
140         (WebKit::WebPageProxy::updateBlockSelectionWithTouches):
141         (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouches):
142         * WebProcess/WebPage/WebPage.cpp:
143         * WebProcess/WebPage/WebPage.h:
144         * WebProcess/WebPage/WebPage.messages.in:
145         * WebProcess/WebPage/ios/WebPageIOS.mm:
146         (WebKit::WebPage::rangeForWebSelectionAtPosition):
147         (WebKit::WebPage::rangeForBlockAtPoint):
148         (WebKit::WebPage::selectWithGesture):
149         (WebKit::distanceBetweenRectsForPosition):
150         (WebKit::rectsEssentiallyTheSame):
151         (WebKit::containsRange):
152         (WebKit::unionDOMRanges):
153         (WebKit::computeEdgeCenter):
154         (WebKit::WebPage::expandedRangeFromHandle):
155         (WebKit::WebPage::contractedRangeFromHandle):
156         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
157         (WebKit::shouldExpand):
158         (WebKit::WebPage::changeBlockSelection):
159         (WebKit::WebPage::updateBlockSelectionWithTouches):
160         (WebKit::WebPage::clearSelection):
161         (WebKit::WebPage::selectWithTwoTouches):
162         (WebKit::WebPage::getPositionInformation):
163
164 2014-02-21  Anders Carlsson  <andersca@apple.com>
165
166         Make sure to invoke the completion handler for JS alerts
167         https://bugs.webkit.org/show_bug.cgi?id=129158
168
169         Reviewed by Alexey Proskuryakov.
170
171         * UIProcess/API/C/WKPage.cpp:
172         (WKPageSetPageUIClient):
173
174 2014-02-20  Zalan Bujtas  <zalan@apple.com>
175
176         Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
177         https://bugs.webkit.org/show_bug.cgi?id=129137
178
179         Reviewed by Simon Fraser.
180
181         No change in behavior.
182
183         * WebProcess/WebPage/FindController.cpp:
184         (WebKit::FindController::getFindIndicatorBitmapAndRect):
185
186 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
187
188         Add a missing piece of r164469
189
190         * UIProcess/API/Cocoa/WKWebView.mm:
191         (-[WKWebView scrollViewWillBeginDragging:]):
192         I forgot to duplicate the change from WKViewIOS in r164469.
193
194 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
195
196         WKInteractionView always blocks the main thread when sending touch events
197         https://bugs.webkit.org/show_bug.cgi?id=129059
198
199         Reviewed by Enrica Casucci.
200
201         Add the asynchronous dispatching to WebKit2.
202
203         * Shared/NativeWebTouchEvent.h:
204         (WebKit::NativeWebTouchEvent::uniqueId):
205         * Shared/ios/NativeWebTouchEventIOS.mm:
206         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
207         * UIProcess/API/ios/PageClientImplIOS.mm:
208         (WebKit::PageClientImpl::doneWithTouchEvent):
209         * UIProcess/API/ios/WKContentView.h:
210         * UIProcess/API/ios/WKContentView.mm:
211         (-[WKContentView willStartUserTriggeredScroll]):
212         (-[WKContentView willStartUserTriggeredZoom]):
213         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
214         * UIProcess/API/ios/WKContentViewInternal.h:
215         * UIProcess/API/ios/WKInteractionView.h:
216         * UIProcess/API/ios/WKInteractionView.mm:
217         (-[WKInteractionView _webTouchEventsRecognized:]):
218         (-[WKInteractionView _webTouchEvent:WebKit::preventsNativeGestures:]):
219         (-[WKInteractionView _willStartUserTriggeredScrollingOrZooming]):
220         * UIProcess/API/ios/WKViewIOS.mm:
221         (-[WKView scrollViewWillBeginDragging:]):
222         * WebKit2.xcodeproj/project.pbxproj:
223
224 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
225
226         Start fixing the view states driven by the WKScrollView
227         https://bugs.webkit.org/show_bug.cgi?id=129140
228
229         Reviewed by Tim Horton and Simon Fraser.
230
231         WKScrollView creates a "window" over WKContentView with an area that is exposed,
232         an area that is unobcured and with a certain scale.
233
234         Instead of having 3 loosely related paths for updating WKContentView
235         when the content "window" change, everything is consolidated behind the
236         single API -[WKContentView didUpdateVisibleRect:unobscuredRect:scale:].
237
238         This patch only fixes the content updates from the UI process side to keep things simple.
239
240         * UIProcess/API/Cocoa/WKWebView.mm:
241         (-[WKWebView _didFinishScrolling]):
242         (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
243         (-[WKWebView scrollViewDidEndDecelerating:]):
244         (-[WKWebView scrollViewDidScrollToTop:]):
245         (-[WKWebView scrollViewDidScroll:]):
246         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
247         (-[WKWebView _frameOrBoundsChanged]):
248         (-[WKWebView _updateContentWindow]):
249         (-[WKWebView _setObscuredInsets:]):
250         * UIProcess/API/ios/WKContentView.h:
251         * UIProcess/API/ios/WKContentView.mm:
252         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:]):
253         (-[WKContentView _updateFixedPositionRect]):
254         (-[WKContentView didFinishScrolling]):
255         (-[WKContentView didZoomToScale:]):
256         * UIProcess/API/ios/WKViewIOS.mm:
257         (-[WKView contentView:didCommitLayerTree:]):
258         (-[WKView _didFinishScrolling]):
259         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
260         (-[WKView scrollViewDidEndDecelerating:]):
261         (-[WKView scrollViewDidScrollToTop:]):
262         (-[WKView scrollViewDidScroll:]):
263         (-[WKView scrollViewDidEndZooming:withView:atScale:]):
264         Scrolling is modified to take into account the view position and the obcured content.
265         Instead of driving the scrolling position from the UIScrollView delegate callbacks,
266         we use changes in unobscured rect to find changes in "content visible scroll position".
267
268         WebPageProxy::didFinishScrolling() is removed. All the scrollOffset updates now go through
269         the ScrollingCoordinator.
270
271         (-[WKView _frameOrBoundsChanged]):
272         (-[WKView _updateContentWindow]):
273         (-[WKView _setObscuredInsets:]):
274         * UIProcess/WebPageProxy.h:
275         * UIProcess/ios/WebPageProxyIOS.mm:
276         (WebKit::WebPageProxy::unobscuredContentRect):
277         (WebKit::WebPageProxy::setUnobscuredContentRect):
278         * WebProcess/WebPage/WebPage.messages.in:
279         * WebProcess/WebPage/ios/WebPageIOS.mm:
280
281 2014-02-20  Tim Horton  <timothy_horton@apple.com>
282
283         Fix a build warning by moving some WKWebView methods from the private category to WKWebView itself.
284
285         Reviewed by Anders Carlsson.
286
287         * UIProcess/API/Cocoa/WKWebView.mm:
288         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
289         (-[WKWebView allowsBackForwardNavigationGestures]):
290
291 2014-02-20  Enrica Casucci  <enrica@apple.com>
292
293         ASSERT on touches callbacks after r164409 on iOS.
294         https://bugs.webkit.org/show_bug.cgi?id=129135
295
296         Reviewed by Alexey Proskuryakov.
297
298         The change used incorrecly true and false in TouchesCallbacks and
299         ImageCallback. It also reintroduced isMainThread() which doesn't work
300         for iOS.
301
302         * UIProcess/GenericCallback.h:
303         (WebKit::CallbackBase::generateCallbackID):
304         (WebKit::ImageCallback::performCallbackWithReturnValue):
305         (WebKit::ImageCallback::invalidate):
306         * UIProcess/WebPageProxy.h:
307         (WebKit::TouchesCallback::performCallbackWithReturnValue):
308         (WebKit::TouchesCallback::invalidate):
309
310 2014-02-20  Anders Carlsson  <andersca@apple.com>
311
312         We need something like WKPageUIClient in the Obj-C API
313         https://bugs.webkit.org/show_bug.cgi?id=129123
314         <rdar://problem/15338439>
315
316         Reviewed by Sam Weinig.
317
318         * UIProcess/API/APIUIClient.h:
319         * UIProcess/API/Cocoa/WKUIDelegate.h: Added.
320         * UIProcess/API/Cocoa/WKWebView.h:
321         * UIProcess/API/Cocoa/WKWebView.mm:
322         (-[WKWebView initWithFrame:configuration:]):
323         (-[WKWebView UIDelegate]):
324         (-[WKWebView setUIDelegate:]):
325         * UIProcess/Cocoa/UIClient.h: Added.
326         * UIProcess/Cocoa/UIClient.mm: Added.
327         (WebKit::UIClient::UIClient):
328         (WebKit::UIClient::~UIClient):
329         (WebKit::UIClient::delegate):
330         (WebKit::UIClient::setDelegate):
331         (WebKit::UIClient::runJavaScriptAlert):
332         (WebKit::UIClient::runJavaScriptConfirm):
333         (WebKit::UIClient::runJavaScriptPrompt):
334         * UIProcess/WebPageProxy.h:
335         (WebKit::WebPageProxy::uiClient):
336         * WebKit2.xcodeproj/project.pbxproj:
337
338 2014-02-20  Brady Eidson  <beidson@apple.com>
339
340         Add very basic image control rendering
341         https://bugs.webkit.org/show_bug.cgi?id=129080
342
343         Reviewed by Tim Horton.
344
345         * WebProcess/InjectedBundle/InjectedBundle.cpp:
346         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Expose the 
347           imageControlsEnabled setting to WKTR.
348
349 2014-02-20  Tim Horton  <timothy_horton@apple.com>
350
351         Add magnification and swiping properties to WKWebView
352         https://bugs.webkit.org/show_bug.cgi?id=129117
353
354         Reviewed by Dan Bernstein.
355
356         * UIProcess/API/Cocoa/WKViewPrivate.h:
357         Move allowsBackForwardNavigationGestures out of a Mac-only block.
358
359         * UIProcess/API/Cocoa/WKWebView.h:
360         Add allowsBackForwardNavigationGestures to WKWebView for both platforms.
361         Add magnification properties to WKWebView for Mac.
362
363         * UIProcess/API/Cocoa/WKWebView.mm:
364         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
365         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
366         (-[WKWebView allowsBackForwardNavigationGestures]):
367         (-[WKWebView setAllowsMagnification:]):
368         (-[WKWebView allowsMagnification]):
369         (-[WKWebView setMagnification:]):
370         (-[WKWebView magnification]):
371         (-[WKWebView setMagnification:centeredAtPoint:]):
372         For iOS, copy implementations from WKViewIOS.
373         For Mac, forward to the inner WKView.
374
375         * UIProcess/API/ios/WKViewIOS.mm:
376         (-[WKView setAllowsBackForwardNavigationGestures:]):
377         Fix the logic to tear down the ViewGestureController.
378
379         * UIProcess/API/mac/WKView.mm:
380         (-[WKView setMagnification:centeredAtPoint:]):
381         (-[WKView setMagnification:]):
382         (-[WKView magnification]):
383         Use CG types for API.
384
385 == Rolled over to ChangeLog-2014-02-20 ==