Rename WKProcessClass to WKProcessPool
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-02-24  Anders Carlsson  <andersca@apple.com>
2
3         Rename WKProcessClass to WKProcessPool
4         https://bugs.webkit.org/show_bug.cgi?id=129268
5
6         Reviewed by Dan Bernstein.
7
8         Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.
9
10         * Shared/Cocoa/APIObject.mm:
11         (API::Object::newObject):
12         * UIProcess/API/Cocoa/WKProcessClass.h:
13         * UIProcess/API/Cocoa/WKProcessClass.mm:
14         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
15         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
16         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
17         * UIProcess/API/Cocoa/WKProcessClassPrivate.h:
18         * UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
19         * UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
20         (-[WKProcessPool init]):
21         (-[WKProcessPool initWithConfiguration:]):
22         (-[WKProcessPool dealloc]):
23         (-[WKProcessPool description]):
24         (-[WKProcessPool configuration]):
25         (-[WKProcessPool API::]):
26         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
27         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
28         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
29         (-[WKProcessPoolConfiguration _injectedBundleURL]):
30         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
31         (-[WKProcessPoolConfiguration description]):
32         (-[WKProcessPoolConfiguration copyWithZone:]):
33         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
34         * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
35         (WebKit::wrapper):
36         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
37         * UIProcess/API/Cocoa/WKWebView.mm:
38         (-[WKWebView initWithFrame:configuration:]):
39         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
40         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
41         (-[WKWebViewConfiguration description]):
42         (-[WKWebViewConfiguration copyWithZone:]):
43         (-[WKWebViewConfiguration processPool]):
44         (-[WKWebViewConfiguration setProcessPool:]):
45         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
46         (-[WKWebViewConfiguration setProcessClass:]):
47         (-[WKWebViewConfiguration processClass]):
48         * UIProcess/API/mac/WKView.mm:
49         * UIProcess/ios/WKContentView.mm:
50         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
51         * WebKit2.xcodeproj/project.pbxproj:
52
53 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
54
55         Move non-API files out of WebKit2/UIProcess/API/mac
56         https://bugs.webkit.org/show_bug.cgi?id=129267
57
58         Reviewed by Anders Carlsson.
59
60         * UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
61         * UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
62         * UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
63         * UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
64         * UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
65         * UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
66         * UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
67         * UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
68         * WebKit2.xcodeproj/project.pbxproj:
69
70 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
71
72         Move non-API files in the API/ios directory out to UIProcess/ios
73         https://bugs.webkit.org/show_bug.cgi?id=129264
74
75         Reviewed by Anders Carlsson.
76
77         * UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
78         * UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
79         * UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
80         * UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
81         * UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
82         * UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
83         * UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
84         * UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
85         * UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
86         * UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
87         * UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
88         * WebKit2.xcodeproj/project.pbxproj:
89
90 2014-02-24  Simon Fraser  <simon.fraser@apple.com>
91
92         Rename PageClientImplIOS::m_view to m_contentView
93         https://bugs.webkit.org/show_bug.cgi?id=129124
94
95         Reviewed by Benjamin Poulain.
96         
97         Simple rename of m_view to m_contentView in preparation for
98         also holding onto the WKView.
99
100         * UIProcess/API/ios/PageClientImplIOS.h:
101         * UIProcess/API/ios/PageClientImplIOS.mm:
102         (WebKit::PageClientImpl::PageClientImpl):
103         (WebKit::PageClientImpl::createDrawingAreaProxy):
104         (WebKit::PageClientImpl::viewSize):
105         (WebKit::PageClientImpl::isViewInWindow):
106         (WebKit::PageClientImpl::processDidExit):
107         (WebKit::PageClientImpl::didRelaunchProcess):
108         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
109         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
110         (WebKit::PageClientImpl::interpretKeyEvent):
111         (WebKit::PageClientImpl::positionInformationDidChange):
112         (WebKit::PageClientImpl::selectionDidChange):
113         (WebKit::PageClientImpl::screenToRootView):
114         (WebKit::PageClientImpl::rootViewToScreen):
115         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
116         (WebKit::PageClientImpl::takeViewSnapshot):
117         (WebKit::PageClientImpl::didGetTapHighlightGeometries):
118         (WebKit::PageClientImpl::didCommitLayerTree):
119         (WebKit::PageClientImpl::startAssistingNode):
120         (WebKit::PageClientImpl::stopAssistingNode):
121
122 2014-02-24  Enrique Ocaña González  <eocanha@igalia.com>
123
124         REGRESSION(r164438): [GTK] Tests /webkit2/WebKitWebView/tls-errors-policy and /webkit2/WebKitWebContext/uri-scheme fail
125         https://bugs.webkit.org/show_bug.cgi?id=129252
126
127         Reviewed by Carlos Garcia Campos.
128
129         * UIProcess/API/gtk/WebKitPrivate.cpp: Manage error values generated by the user application and not present in WebCore
130         (toWebKitError):
131         (toWebCoreError):
132
133 2014-02-24  Alexey Proskuryakov  <ap@apple.com>
134
135         <rdar://problem/16059894> Update AppleConnect sandbox profile for XPC process names.
136
137         Patch by Ivan Krstić, reviewed and landed by me.
138
139         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
140
141 2014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
142
143         Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
144         https://bugs.webkit.org/show_bug.cgi?id=129255
145
146         Reviewed by Csaba Osztrogonác.
147
148         ENABLE_WORKERS macro was removed in r159679.
149         Support is now also removed from xcconfig files.
150
151         * Configurations/FeatureDefines.xcconfig:
152
153 2014-02-24  Iago Toral Quiroga  <itoral@igalia.com>
154
155         [GTK] Wrong active context when destroying GL objects.
156         https://bugs.webkit.org/show_bug.cgi?id=129244
157
158         Reviewed by Martin Robinson.
159
160         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
161         (WebKit::LayerTreeHostGtk::invalidate): make context current before destroying GL objects.
162
163 2014-02-24  Koop Mast <kwm@FreeBSD.org>
164
165         Remove unused error.h header.
166         https://bugs.webkit.org/show_bug.cgi?id=126774
167
168         Reviewed by Anders Carlsson.
169
170         This header doesn't exists on FreeBSD. According to
171         https://www.gnu.org/software/gnulib/manual/html_node/error_002eh.html
172         the function that this header implements are not present in the file.
173         So there isn't any need for this header.
174
175         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
176
177 2014-02-24  David Kilzer  <ddkilzer@apple.com>
178
179         Remove redundant setting in FeatureDefines.xcconfig
180
181         * Configurations/FeatureDefines.xcconfig:
182
183 2014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
184
185         [GTK] Remove unneeded method webkitWebViewBaseRequestExitFullScreen
186         https://bugs.webkit.org/show_bug.cgi?id=129245
187
188         Reviewed by Sergio Villar Senin.
189
190         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
191         (webkitWebViewBaseKeyPressEvent): Call FullscreenManager::requestExitFullScreen() directly.
192         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
193
194 2014-02-23  Dan Bernstein  <mitz@apple.com>
195
196         <rdar://problem/16144508> [iOS] Some definitions of INSTALL_PATH don’t account for INSTALL_PATH_PREFIX
197         https://bugs.webkit.org/show_bug.cgi?id=129241
198
199         Reviewed by Mark Rowe.
200
201         * Configurations/Base.xcconfig: Define INSTALL_PATH here in terms of INSTALL_PATH_ACTUAL.
202         * Configurations/BaseLegacyProcess.xcconfig: Define only INSTALL_PATH_ACTUAL.
203         * Configurations/BaseTarget.xcconfig: Simplify the definition of
204         NORMAL_WEBKIT2_FRAMEWORKS_DIR, now that it shouldn’t include SDKROOT for the Simulator.
205         * Configurations/BaseXPCService.xcconfig: Define only INSTALL_PATH_ACTUAL.
206         * Configurations/WebKit2.xcconfig: Ditto.
207
208 2014-02-23  Sam Weinig  <sam@webkit.org>
209
210         Update FeatureDefines.xcconfig
211
212         Rubber-stamped by Anders Carlsson.
213
214         * Configurations/FeatureDefines.xcconfig:
215
216 2014-02-23  Sam Weinig  <sam@webkit.org>
217
218         [WebKit2] Add C-SPI to enable/disable telephone number detection
219         https://bugs.webkit.org/show_bug.cgi?id=129239
220
221         Reviewed by Dean Jackson.
222
223         * UIProcess/API/C/WKPreferences.cpp:
224         (WKPreferencesSetTelephoneNumberParsingEnabled):
225         (WKPreferencesGetTelephoneNumberParsingEnabled):
226         * UIProcess/API/C/WKPreferencesPrivate.h:
227
228 2014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
229
230         Change a url parameter type with URL in NavigatorContentUtils
231         https://bugs.webkit.org/show_bug.cgi?id=129202
232
233         Reviewed by Sam Weinig.
234
235         It would be good if we use *URL* for url parameters instead of using String.
236
237         Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
238
239         * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
240         (WebKit::WebNavigatorContentUtilsClient::isProtocolHandlerRegistered):
241         (WebKit::WebNavigatorContentUtilsClient::unregisterProtocolHandler):
242
243 2014-02-23  Sam Weinig  <sam@webkit.org>
244
245         Move telephone number detection behind its own ENABLE macro
246         https://bugs.webkit.org/show_bug.cgi?id=129236
247
248         Reviewed by Dean Jackson.
249
250         * Configurations/FeatureDefines.xcconfig:
251         Add ENABLE_TELEPHONE_NUMBER_DETECTION.
252
253 2014-02-23  Diego Pino García  <dpino@igalia.com>
254
255         [GTK] Fix build after Web Inspector code reorganization (r164543)
256         https://bugs.webkit.org/show_bug.cgi?id=129231
257
258         Reviewed by Dean Jackson.
259
260         * PlatformGTK.cmake:
261         Modify paths to Web Inspector code.
262
263 2014-02-22  Joseph Pecoraro  <pecoraro@apple.com>
264
265         Remove some unreachable code (-Wunreachable-code)
266         https://bugs.webkit.org/show_bug.cgi?id=129220
267
268         Reviewed by Eric Carlson.
269
270         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
271         (WebKit::toAPI):
272
273 2014-02-22  Dan Bernstein  <mitz@apple.com>
274
275         [Cocoa] WKUIDelegate.h is a project header
276         https://bugs.webkit.org/show_bug.cgi?id=129215
277
278         Reviewed by Anders Carlsson.
279
280         * WebKit2.xcodeproj/project.pbxproj: Make it a public header.
281
282 2014-02-22  Dan Bernstein  <mitz@apple.com>
283
284         <rdar://problem/12500358> [Cocoa] Development variants of XPC services should not be installed in WebKit2.framework/XPCServices
285         https://bugs.webkit.org/show_bug.cgi?id=129197
286
287         Reviewed by Sam Weinig.
288
289         * Configurations/BaseXPCService.xcconfig: Made INSTALL_PATH vary based on
290         WK_XPC_SERVICE_VARIANT. For the Development variant, use an install path outside the
291         framework. Note that engineering builds using the build action continue to have the
292         Development variants copied into the framework by a script build phase.
293         * Configurations/DatabaseService.Development.xcconfig: Set WK_XPC_SERVICE_VARIANT.
294         * Configurations/DatabaseService.xcconfig: Ditto.
295         * Configurations/NetworkService.Development.xcconfig: Ditto.
296         * Configurations/NetworkService.xcconfig: Ditto.
297         * Configurations/PluginService.32.xcconfig: Ditto.
298         * Configurations/PluginService.64.xcconfig: Ditto.
299         * Configurations/PluginService.Development.xcconfig: Ditto.
300         * Configurations/WebContentService.Development.xcconfig: Ditto.
301         * Configurations/WebContentService.xcconfig: Ditto.
302
303 2014-02-21  Brent Fulgham  <bfulgham@apple.com>
304
305         Extend media support for WebVTT sources
306         https://bugs.webkit.org/show_bug.cgi?id=129156
307
308         Reviewed by Eric Carlson.
309
310         * Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
311
312 2014-02-21  Enrica Casucci  <enrica@apple.com>
313
314         [iOS WebKit2] Keyboard appears every time a link is tapped after searching Google
315         <rdar://problem/16072563>.
316
317         Reviewed by Benjamin Poulain.
318
319         We need to stop assisting the node if we have
320         navigated to a different page.
321
322         * UIProcess/API/ios/WKContentView.mm:
323         (-[WKContentView _didCommitLoadForMainFrame]):
324
325 2014-02-21  Dan Bernstein  <mitz@apple.com>
326
327         Made WKWebView implement all WKContentViewDelegate methods.
328
329         Reviewed by Anders Carlsson.
330
331         * UIProcess/API/Cocoa/WKWebView.mm:
332         (-[WKWebView takeViewSnapshotForContentView:]): Moved from WKViewIOS.mm.
333         * UIProcess/API/ios/WKContentView.h: Made all protocol methods required.
334         * UIProcess/API/ios/WKViewIOS.mm:
335         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): Removed code
336         to set self as the delegate on the content view.
337
338 2014-02-21  Sam Weinig  <sam@webkit.org>
339
340         <rdar://problem/16073882> Please add _AbandonCoalition key to plugin XPC service Info.plist
341
342         Reviewed by Anders Carlsson.
343
344         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
345         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
346
347 2014-02-21  Jeffrey Pfau  <jpfau@apple.com>
348
349         [Mac] Cache callbacks for cache partitioning may be passed null
350         https://bugs.webkit.org/show_bug.cgi?id=129175
351
352         Reviewed by Brady Eidson.
353
354         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
355         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
356
357 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
358
359         [iOS][WK2] Update the visible content rects on zoom
360         https://bugs.webkit.org/show_bug.cgi?id=129174
361
362         Reviewed by Simon Fraser.
363
364         Generalize _updateVisibleContentRects to also act during the zoom and not only at the end.
365
366         * UIProcess/API/Cocoa/WKWebView.mm:
367         (-[WKWebView scrollViewDidZoom:]):
368         * UIProcess/API/ios/WKViewIOS.mm:
369         (-[WKView scrollViewDidZoom:]):
370
371 2014-02-21  Benjamin Poulain  <benjamin@webkit.org>
372
373         jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
374         https://bugs.webkit.org/show_bug.cgi?id=128893
375
376         Reviewed by Darin Adler.
377
378         * WebProcess/InjectedBundle/InjectedBundle.cpp:
379         (WebKit::InjectedBundle::pageNumberForElementById): Remove the explicit conversion to use the right overload.
380
381 2014-02-21  Enrica Casucci  <enrica@apple.com>
382
383         Support WebSelections in WK2 on iOS.
384         https://bugs.webkit.org/show_bug.cgi?id=127015
385         <rdar://problem/15211964>
386
387         Reviewed by Benjamin Poulain.
388
389         This is the remaining work on block selections for iOS in WK2.
390         Once a block selection has been created with a long press gesture
391         on a selectable area, we can interact with it by touching the four
392         handles at the top, right, bottom and left side of the selection box.
393         Expanding or shrinking a block selection requires finding the next/previous
394         block in the direction of the movement, depending on the handle we
395         are interacting with.
396         Every time a new block is selected, we compute the thresholds required
397         to trigger another block change. The thresholds are sent back to the
398         UIProcess that will use this information to decide when to activate
399         the new selection, either bigger or smaller.
400         This patch also fixes a bug in selectWithTwoTouches where the points
401         were not mapped to the active frame.
402
403         * Shared/ios/WKGestureTypes.h:
404         * UIProcess/API/ios/PageClientImplIOS.h:
405         * UIProcess/API/ios/PageClientImplIOS.mm:
406         (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouches):
407         * UIProcess/API/ios/WKContentView.mm:
408         (-[WKContentView _didUpdateBlockSelectionWithTouches:withFlags:growThreshold:shrinkThreshold:]):
409         * UIProcess/API/ios/WKContentViewInternal.h:
410         * UIProcess/API/ios/WKInteractionView.h:
411         * UIProcess/API/ios/WKInteractionView.mm:
412         (-[WKInteractionView hasSelectablePositionAtPoint:]):
413         (-[WKInteractionView clearSelection]):
414         (toWKHandlePosition):
415         (-[WKInteractionView _didUpdateBlockSelectionWithTouches:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
416         (-[WKInteractionView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
417         * UIProcess/PageClient.h:
418         * UIProcess/WebPageProxy.h:
419         * UIProcess/WebPageProxy.messages.in:
420         * UIProcess/ios/WebPageProxyIOS.mm:
421         (WebKit::WebPageProxy::updateBlockSelectionWithTouches):
422         (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouches):
423         * WebProcess/WebPage/WebPage.cpp:
424         * WebProcess/WebPage/WebPage.h:
425         * WebProcess/WebPage/WebPage.messages.in:
426         * WebProcess/WebPage/ios/WebPageIOS.mm:
427         (WebKit::WebPage::rangeForWebSelectionAtPosition):
428         (WebKit::WebPage::rangeForBlockAtPoint):
429         (WebKit::WebPage::selectWithGesture):
430         (WebKit::distanceBetweenRectsForPosition):
431         (WebKit::rectsEssentiallyTheSame):
432         (WebKit::containsRange):
433         (WebKit::unionDOMRanges):
434         (WebKit::computeEdgeCenter):
435         (WebKit::WebPage::expandedRangeFromHandle):
436         (WebKit::WebPage::contractedRangeFromHandle):
437         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
438         (WebKit::shouldExpand):
439         (WebKit::WebPage::changeBlockSelection):
440         (WebKit::WebPage::updateBlockSelectionWithTouches):
441         (WebKit::WebPage::clearSelection):
442         (WebKit::WebPage::selectWithTwoTouches):
443         (WebKit::WebPage::getPositionInformation):
444
445 2014-02-21  Anders Carlsson  <andersca@apple.com>
446
447         Make sure to invoke the completion handler for JS alerts
448         https://bugs.webkit.org/show_bug.cgi?id=129158
449
450         Reviewed by Alexey Proskuryakov.
451
452         * UIProcess/API/C/WKPage.cpp:
453         (WKPageSetPageUIClient):
454
455 2014-02-20  Zalan Bujtas  <zalan@apple.com>
456
457         Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
458         https://bugs.webkit.org/show_bug.cgi?id=129137
459
460         Reviewed by Simon Fraser.
461
462         No change in behavior.
463
464         * WebProcess/WebPage/FindController.cpp:
465         (WebKit::FindController::getFindIndicatorBitmapAndRect):
466
467 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
468
469         Add a missing piece of r164469
470
471         * UIProcess/API/Cocoa/WKWebView.mm:
472         (-[WKWebView scrollViewWillBeginDragging:]):
473         I forgot to duplicate the change from WKViewIOS in r164469.
474
475 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
476
477         WKInteractionView always blocks the main thread when sending touch events
478         https://bugs.webkit.org/show_bug.cgi?id=129059
479
480         Reviewed by Enrica Casucci.
481
482         Add the asynchronous dispatching to WebKit2.
483
484         * Shared/NativeWebTouchEvent.h:
485         (WebKit::NativeWebTouchEvent::uniqueId):
486         * Shared/ios/NativeWebTouchEventIOS.mm:
487         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
488         * UIProcess/API/ios/PageClientImplIOS.mm:
489         (WebKit::PageClientImpl::doneWithTouchEvent):
490         * UIProcess/API/ios/WKContentView.h:
491         * UIProcess/API/ios/WKContentView.mm:
492         (-[WKContentView willStartUserTriggeredScroll]):
493         (-[WKContentView willStartUserTriggeredZoom]):
494         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
495         * UIProcess/API/ios/WKContentViewInternal.h:
496         * UIProcess/API/ios/WKInteractionView.h:
497         * UIProcess/API/ios/WKInteractionView.mm:
498         (-[WKInteractionView _webTouchEventsRecognized:]):
499         (-[WKInteractionView _webTouchEvent:WebKit::preventsNativeGestures:]):
500         (-[WKInteractionView _willStartUserTriggeredScrollingOrZooming]):
501         * UIProcess/API/ios/WKViewIOS.mm:
502         (-[WKView scrollViewWillBeginDragging:]):
503         * WebKit2.xcodeproj/project.pbxproj:
504
505 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
506
507         Start fixing the view states driven by the WKScrollView
508         https://bugs.webkit.org/show_bug.cgi?id=129140
509
510         Reviewed by Tim Horton and Simon Fraser.
511
512         WKScrollView creates a "window" over WKContentView with an area that is exposed,
513         an area that is unobcured and with a certain scale.
514
515         Instead of having 3 loosely related paths for updating WKContentView
516         when the content "window" change, everything is consolidated behind the
517         single API -[WKContentView didUpdateVisibleRect:unobscuredRect:scale:].
518
519         This patch only fixes the content updates from the UI process side to keep things simple.
520
521         * UIProcess/API/Cocoa/WKWebView.mm:
522         (-[WKWebView _didFinishScrolling]):
523         (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
524         (-[WKWebView scrollViewDidEndDecelerating:]):
525         (-[WKWebView scrollViewDidScrollToTop:]):
526         (-[WKWebView scrollViewDidScroll:]):
527         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
528         (-[WKWebView _frameOrBoundsChanged]):
529         (-[WKWebView _updateContentWindow]):
530         (-[WKWebView _setObscuredInsets:]):
531         * UIProcess/API/ios/WKContentView.h:
532         * UIProcess/API/ios/WKContentView.mm:
533         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:]):
534         (-[WKContentView _updateFixedPositionRect]):
535         (-[WKContentView didFinishScrolling]):
536         (-[WKContentView didZoomToScale:]):
537         * UIProcess/API/ios/WKViewIOS.mm:
538         (-[WKView contentView:didCommitLayerTree:]):
539         (-[WKView _didFinishScrolling]):
540         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
541         (-[WKView scrollViewDidEndDecelerating:]):
542         (-[WKView scrollViewDidScrollToTop:]):
543         (-[WKView scrollViewDidScroll:]):
544         (-[WKView scrollViewDidEndZooming:withView:atScale:]):
545         Scrolling is modified to take into account the view position and the obcured content.
546         Instead of driving the scrolling position from the UIScrollView delegate callbacks,
547         we use changes in unobscured rect to find changes in "content visible scroll position".
548
549         WebPageProxy::didFinishScrolling() is removed. All the scrollOffset updates now go through
550         the ScrollingCoordinator.
551
552         (-[WKView _frameOrBoundsChanged]):
553         (-[WKView _updateContentWindow]):
554         (-[WKView _setObscuredInsets:]):
555         * UIProcess/WebPageProxy.h:
556         * UIProcess/ios/WebPageProxyIOS.mm:
557         (WebKit::WebPageProxy::unobscuredContentRect):
558         (WebKit::WebPageProxy::setUnobscuredContentRect):
559         * WebProcess/WebPage/WebPage.messages.in:
560         * WebProcess/WebPage/ios/WebPageIOS.mm:
561
562 2014-02-20  Tim Horton  <timothy_horton@apple.com>
563
564         Fix a build warning by moving some WKWebView methods from the private category to WKWebView itself.
565
566         Reviewed by Anders Carlsson.
567
568         * UIProcess/API/Cocoa/WKWebView.mm:
569         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
570         (-[WKWebView allowsBackForwardNavigationGestures]):
571
572 2014-02-20  Enrica Casucci  <enrica@apple.com>
573
574         ASSERT on touches callbacks after r164409 on iOS.
575         https://bugs.webkit.org/show_bug.cgi?id=129135
576
577         Reviewed by Alexey Proskuryakov.
578
579         The change used incorrecly true and false in TouchesCallbacks and
580         ImageCallback. It also reintroduced isMainThread() which doesn't work
581         for iOS.
582
583         * UIProcess/GenericCallback.h:
584         (WebKit::CallbackBase::generateCallbackID):
585         (WebKit::ImageCallback::performCallbackWithReturnValue):
586         (WebKit::ImageCallback::invalidate):
587         * UIProcess/WebPageProxy.h:
588         (WebKit::TouchesCallback::performCallbackWithReturnValue):
589         (WebKit::TouchesCallback::invalidate):
590
591 2014-02-20  Anders Carlsson  <andersca@apple.com>
592
593         We need something like WKPageUIClient in the Obj-C API
594         https://bugs.webkit.org/show_bug.cgi?id=129123
595         <rdar://problem/15338439>
596
597         Reviewed by Sam Weinig.
598
599         * UIProcess/API/APIUIClient.h:
600         * UIProcess/API/Cocoa/WKUIDelegate.h: Added.
601         * UIProcess/API/Cocoa/WKWebView.h:
602         * UIProcess/API/Cocoa/WKWebView.mm:
603         (-[WKWebView initWithFrame:configuration:]):
604         (-[WKWebView UIDelegate]):
605         (-[WKWebView setUIDelegate:]):
606         * UIProcess/Cocoa/UIClient.h: Added.
607         * UIProcess/Cocoa/UIClient.mm: Added.
608         (WebKit::UIClient::UIClient):
609         (WebKit::UIClient::~UIClient):
610         (WebKit::UIClient::delegate):
611         (WebKit::UIClient::setDelegate):
612         (WebKit::UIClient::runJavaScriptAlert):
613         (WebKit::UIClient::runJavaScriptConfirm):
614         (WebKit::UIClient::runJavaScriptPrompt):
615         * UIProcess/WebPageProxy.h:
616         (WebKit::WebPageProxy::uiClient):
617         * WebKit2.xcodeproj/project.pbxproj:
618
619 2014-02-20  Brady Eidson  <beidson@apple.com>
620
621         Add very basic image control rendering
622         https://bugs.webkit.org/show_bug.cgi?id=129080
623
624         Reviewed by Tim Horton.
625
626         * WebProcess/InjectedBundle/InjectedBundle.cpp:
627         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Expose the 
628           imageControlsEnabled setting to WKTR.
629
630 2014-02-20  Tim Horton  <timothy_horton@apple.com>
631
632         Add magnification and swiping properties to WKWebView
633         https://bugs.webkit.org/show_bug.cgi?id=129117
634
635         Reviewed by Dan Bernstein.
636
637         * UIProcess/API/Cocoa/WKViewPrivate.h:
638         Move allowsBackForwardNavigationGestures out of a Mac-only block.
639
640         * UIProcess/API/Cocoa/WKWebView.h:
641         Add allowsBackForwardNavigationGestures to WKWebView for both platforms.
642         Add magnification properties to WKWebView for Mac.
643
644         * UIProcess/API/Cocoa/WKWebView.mm:
645         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
646         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
647         (-[WKWebView allowsBackForwardNavigationGestures]):
648         (-[WKWebView setAllowsMagnification:]):
649         (-[WKWebView allowsMagnification]):
650         (-[WKWebView setMagnification:]):
651         (-[WKWebView magnification]):
652         (-[WKWebView setMagnification:centeredAtPoint:]):
653         For iOS, copy implementations from WKViewIOS.
654         For Mac, forward to the inner WKView.
655
656         * UIProcess/API/ios/WKViewIOS.mm:
657         (-[WKView setAllowsBackForwardNavigationGestures:]):
658         Fix the logic to tear down the ViewGestureController.
659
660         * UIProcess/API/mac/WKView.mm:
661         (-[WKView setMagnification:centeredAtPoint:]):
662         (-[WKView setMagnification:]):
663         (-[WKView magnification]):
664         Use CG types for API.
665
666 == Rolled over to ChangeLog-2014-02-20 ==