Add magnify and rotate gesture event support for Mac
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2
3         Add magnify and rotate gesture event support for Mac
4         https://bugs.webkit.org/show_bug.cgi?id=150179
5         <rdar://problem/8036240>
6
7         Reviewed by Darin Adler.
8
9         * Configurations/FeatureDefines.xcconfig:
10         New feature flag.
11
12         * Shared/NativeWebGestureEvent.h: Added.
13         (WebKit::NativeWebGestureEvent::nativeEvent):
14         * Shared/WebEvent.h:
15         * Shared/WebEventConversion.cpp:
16         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
17         (WebKit::platform):
18         * Shared/WebEventConversion.h:
19         * Shared/mac/NativeWebGestureEventMac.mm: Added.
20         (WebKit::webEventTypeForNSEvent):
21         (WebKit::pointForEvent):
22         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
23         Add and plumb a new native event that wraps a NSEvent of type
24         NSEventTypeMagnify or NSEventTypeRotate (gesture events).
25
26         * Shared/mac/WebGestureEvent.cpp: Added.
27         (WebKit::WebGestureEvent::encode):
28         (WebKit::WebGestureEvent::decode):
29         (WebKit::WebGestureEvent::isGestureEventType):
30         * Shared/mac/WebGestureEvent.h: Added.
31         (WebKit::WebGestureEvent::WebGestureEvent):
32         (WebKit::WebGestureEvent::position):
33         (WebKit::WebGestureEvent::gestureScale):
34         (WebKit::WebGestureEvent::gestureRotation):
35         Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
36
37         * UIProcess/API/Cocoa/WKViewPrivate.h:
38         Remove unnecessary iPhone-only WKView code.
39         Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
40         to react when WebCore decides not to handle a gesture event.
41
42         * UIProcess/API/mac/WKView.mm:
43         (-[WKView magnifyWithEvent:]):
44         Route magnification gesture events to the page, unless we're already
45         in an active view zoom gesture, in which case we'll bypass the page
46         and send the event straight to ViewGestureController.
47
48         (-[WKView rotateWithEvent:]):
49         Route rotation gesture events to the page.
50
51         (-[WKView _gestureEventWasNotHandledByWebCore:]):
52         Let ViewGestureController know that WebCore didn't handle a gesture event.
53         We always give WebCore the first crack at the event if we're not in a zoom,
54         because it could preventDefault() on the Begin phase event, and that should
55         prevent pinch-zoom from starting.
56
57         * UIProcess/PageClient.h:
58         * UIProcess/mac/PageClientImpl.h:
59         * UIProcess/mac/PageClientImpl.mm:
60         (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
61         Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
62
63         * UIProcess/WebPageProxy.cpp:
64         (WebKit::WebPageProxy::handleGestureEvent):
65         (WebKit::WebPageProxy::didReceiveEvent):
66         * UIProcess/WebPageProxy.h:
67         Forward gesture events to EventDispatcher, and let WKView know when WebCore
68         passes on handling them.
69         
70         * UIProcess/mac/ViewGestureController.h:
71         (WebKit::ViewGestureController::hasActiveMagnificationGesture):
72         * UIProcess/mac/ViewGestureControllerMac.mm:
73         (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
74         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
75         Don't try to start a zoom with anything other than a Begin phase event.
76         Try to start a zoom with any events that WebCore doesn't handle.
77         Move dispatch of endMagnificationGesture into ViewGestureController;
78         there is no reason for that to be in WKView anymore.
79
80         * WebKit2.xcodeproj/project.pbxproj:
81         * WebProcess/WebPage/EventDispatcher.cpp:
82         (WebKit::EventDispatcher::gestureEvent):
83         (WebKit::EventDispatcher::dispatchGestureEvent):
84         * WebProcess/WebPage/EventDispatcher.h:
85         * WebProcess/WebPage/EventDispatcher.messages.in:
86         * WebProcess/WebPage/WebPage.cpp:
87         (WebKit::handleGestureEvent):
88         (WebKit::WebPage::gestureEvent):
89         * WebProcess/WebPage/WebPage.h:
90         Dispatch to the main thread and hand off the gesture event to WebCore,
91         asynchronously informing the UI process of whether the event was handled or not.
92
93 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
94
95         [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
96         https://bugs.webkit.org/show_bug.cgi?id=150319
97
98         Reviewed by Žan Doberšek.
99
100         This happens when the inspector is shown/closed very
101         quickly. Since we start the inspector attached by default, when
102         the web inspector is created m_isAttached is set to true, so that
103         when opened, it's attached to the view. If the inspector is closed
104         before it has been actually attached, the inspector view doesn't
105         have a parent, even if the m_isAttached is true. So, we should
106         handle this case instead of asserting. This is what happens in
107         test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
108
109         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
110         (WebKit::WebInspectorProxy::platformDetach): Remove the view from
111         its parent container if it was actually attached.
112
113 2015-10-19  Hunseop Jeong  <hs85.jeong@samsung.com>
114
115         [EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
116         https://bugs.webkit.org/show_bug.cgi?id=150310
117
118         Reviewed by Gyuyoung Kim.
119
120         showContextMenu() doesn't work correctly after r191194 in EFL port.
121         This patch implements WebContextMenuProxyEfl::showContextMenu.
122
123         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
124         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
125         (WebKit::WebContextMenuProxyEfl::showContextMenu):
126         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
127         * UIProcess/efl/WebContextMenuProxyEfl.h:
128
129 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
130
131         [WK2] Simplify unused return warning in WKRetainPtr.h
132         https://bugs.webkit.org/show_bug.cgi?id=150173
133
134         Reviewed by Darin Adler.
135
136         * UIProcess/API/cpp/WKRetainPtr.h:
137         (WebKit::__attribute__):
138         (WebKit::adoptWK): Deleted.
139
140 2015-10-18  Csaba Osztrogonác  <ossy@webkit.org>
141
142         Fix the ENABLE(SECCOMP_FILTERS) build after r187030
143         https://bugs.webkit.org/show_bug.cgi?id=150172
144
145         Reviewed by Alexey Proskuryakov.
146
147         * Shared/linux/SeccompFilters/Syscall.cpp:
148         (WebKit::reportUnexpectedSyscall):
149
150 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
151
152         [GTK] Remove WebKitContextMenu related missing annotation warnings
153         https://bugs.webkit.org/show_bug.cgi?id=150299
154
155         Reviewed by Darin Adler.
156
157         The warnings occur currently because when executing g-ir-scanner,
158         it doesn't consider WebKitContextMenu related .cpp files,
159         but only .h files.
160
161         * PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
162
163 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
164
165         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
166         https://bugs.webkit.org/show_bug.cgi?id=150287
167
168         Reviewed by Simon Fraser.
169
170         * Shared/WebProcessCreationParameters.cpp:
171         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
172         (WebKit::WebProcessCreationParameters::encode): Deleted.
173         (WebKit::WebProcessCreationParameters::decode): Deleted.
174         * Shared/WebProcessCreationParameters.h:
175         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
176         (WebKit::registerUserDefaultsIfNeeded): Deleted.
177         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
178         * WebProcess/cocoa/WebProcessCocoa.mm:
179         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
180
181 2015-10-18  Yusuke Suzuki  <utatane.tea@gmail.com>
182
183         [GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
184         https://bugs.webkit.org/show_bug.cgi?id=150276
185
186         Reviewed by Carlos Garcia Campos.
187
188         After r191194, showContextMenu signature becomes changed, and the implementation
189         is moved from the generic file to the Mac port. It poses the compile error in GTK port.
190         This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
191         to the old one except for dropping SERVICE_CONTROLS support. This is because
192         SERVICE_CONTROLS is not related to GTK.
193
194         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
195         (WebKit::WebContextMenuProxyGtk::showContextMenu):
196         * UIProcess/gtk/WebContextMenuProxyGtk.h:
197
198 2015-10-18  Commit Queue  <commit-queue@webkit.org>
199
200         Unreviewed, rolling out r191250 and r191253.
201         https://bugs.webkit.org/show_bug.cgi?id=150296
202
203         Broke all the tests on Windows (Requested by ap on #webkit).
204
205         Reverted changesets:
206
207         "Stop honoring the user default
208         "WebKitKerningAndLigaturesEnabledByDefault""
209         https://bugs.webkit.org/show_bug.cgi?id=150287
210         http://trac.webkit.org/changeset/191250
211
212         "Build fix after r191250"
213         http://trac.webkit.org/changeset/191253
214
215 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
216
217         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
218         https://bugs.webkit.org/show_bug.cgi?id=150287
219
220         Reviewed by Simon Fraser.
221
222         * Shared/WebProcessCreationParameters.cpp:
223         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
224         (WebKit::WebProcessCreationParameters::encode): Deleted.
225         (WebKit::WebProcessCreationParameters::decode): Deleted.
226         * Shared/WebProcessCreationParameters.h:
227         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
228         (WebKit::registerUserDefaultsIfNeeded): Deleted.
229         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
230         * WebProcess/cocoa/WebProcessCocoa.mm:
231         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
232
233 2015-10-17  Dan Bernstein  <mitz@apple.com>
234
235         [Cocoa] Stop using WKAXRegisterRemoteApp
236         https://bugs.webkit.org/show_bug.cgi?id=150283
237
238         Reviewed by Alexey Proskuryakov.
239
240         * Platform/spi/mac: Added.
241         * Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
242           +[NSAccessibilityRemoteUIElement setRemoteUIApp:].
243
244         * WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
245           the Platform/spi/Cocoa group to the corresponding path in the source tree.
246
247         * WebProcess/cocoa/WebProcessCocoa.mm:
248         (WebKit::registerWithAccessibility): Added.
249         (WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
250           of WKAXRegisterRemoteApp.
251
252 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
253
254         Enhance TextStream for logging, remove subclasses, log more things
255         https://bugs.webkit.org/show_bug.cgi?id=150269
256
257         Reviewed by Zalan Bujtas.
258
259         Remove the various TextStream subclasses that only existed to support indenting,
260         and output additional types. Add output for more WebCore and WebKit2 types, and
261         just use TextStream everywhere.
262         
263         TextStream is enhance to support grouping (open paren and intent), with a 
264         stack-based class to open/end a group.
265         
266         Remove some SVG-specific duplicate output functions.
267         
268         Outdent namespace contents of GraphicsTypes.h.
269
270         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
271         (WebKit::dump):
272         (WebKit::recursiveDumpNodes):
273         (WebKit::RemoteScrollingCoordinatorTransaction::description):
274         (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
275         (WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
276         (WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
277         (WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
278         (WebKit::dumpProperty): Deleted.
279         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
280         (WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
281         (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
282         * Shared/mac/RemoteLayerTreeTransaction.mm:
283         (WebKit::operator<<):
284         (WebKit::dumpChangedLayers):
285         (WebKit::RemoteLayerTreeTransaction::description):
286         (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
287         (WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
288         (WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
289         (WebKit::dumpProperty): Deleted.
290         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
291         (WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
292         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
293         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
294         (WebKit::operator<<):
295
296 2015-10-17  Hunseop Jeong  <hs85.jeong@samsung.com>
297
298         URTBF after r191194 to fix EFL build.
299         https://bugs.webkit.org/show_bug.cgi?id=150272
300
301         Reviewed by Csaba Osztrogonác.
302
303         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
304         (WebKit::WebContextMenuProxyEfl::showContextMenu):
305         * UIProcess/efl/WebContextMenuProxyEfl.h:
306
307 2015-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
308
309         Add a WKWebView input delegate SPI
310         https://bugs.webkit.org/show_bug.cgi?id=149646
311
312         Reviewed by Dan Bernstein.
313
314         Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
315         -[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
316         disallow showing up the keyboard. To make this decision, clients are given a
317         _WKFocusedElementInfo, which contains information about the focused element prior to the
318         keyboard showing up so the client will be able to override default assistance behavior.
319
320         While the information contained in a _WKFocusedElementInfo currently seems like overkill for
321         _webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
322         details of how node assistance works, such as being able to use a custom editor for certain
323         types of nodes.
324
325         * Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
326         * UIProcess/API/Cocoa/WKWebView.h:
327         * UIProcess/API/Cocoa/WKWebView.mm:
328         (-[WKWebView _inputDelegate]):
329         (-[WKWebView _formDelegate]):
330         (-[WKWebView _setInputDelegate:]):
331         (-[WKWebView _setFormDelegate:]):
332         (-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
333         (-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
334         (-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
335         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
336         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
337         (-[WKWebViewConfiguration init]): Deleted.
338         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
339         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
340         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
341         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
342         * UIProcess/API/Cocoa/_WKFormDelegate.h:
343         * UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
344         * UIProcess/ios/WKContentViewInteraction.mm:
345         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
346         (-[WKFocusedElementInfo type]):
347         (-[WKFocusedElementInfo value]):
348         (-[WKFocusedElementInfo isUserInitiated]):
349         (-[WKContentView accessoryAutoFill]):
350         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
351             shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
352         * WebKit2.xcodeproj/project.pbxproj:
353
354 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
355
356         Make TextStream the canonical way to log classes in WebCore
357         https://bugs.webkit.org/show_bug.cgi?id=150256
358
359         Reviewed by Sam Weinig.
360
361         We vacillated between PrintStream and TextStream as being the canonical way
362         to stringify WebCore data structures. This patch solidifies TextStream
363         as the solution, since it has convenient stream syntax, and is what we
364         use for render tree dumps.
365
366         Remove TextStream member functions that output non-simple structs
367         (sizes, points and rects), replacing them with free operator<< functions
368         in the .cpp file for the relevant class. Formatting is currently consistent
369         with RenderTreeAsText output, to avoid breaking tests.
370
371         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
372
373         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
374         (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
375         * Shared/mac/RemoteLayerTreeTransaction.mm:
376         (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
377
378 2015-10-16  Anders Carlsson  <andersca@apple.com>
379
380         Remove some dead menu code
381         https://bugs.webkit.org/show_bug.cgi?id=150247
382
383         Reviewed by Andreas Kling.
384
385         * Shared/WebContextMenuItemData.cpp:
386         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
387         (WebKit::WebContextMenuItemData::encode): Deleted.
388         * Shared/WebContextMenuItemData.h:
389         (WebKit::WebContextMenuItemData::selectionHandler): Deleted.
390         * UIProcess/mac/WebContextMenuProxyMac.mm:
391         (WebKit::nsMenuItem):
392
393 2015-10-16  Anders Carlsson  <andersca@apple.com>
394
395         Move more code to WebContextMenuProxyMac
396         https://bugs.webkit.org/show_bug.cgi?id=150240
397
398         Reviewed by Tim Horton.
399
400         * UIProcess/WebContextMenuProxy.h:
401         * UIProcess/WebPageProxy.cpp:
402         (WebKit::WebPageProxy::internalShowContextMenu):
403         * UIProcess/WebPageProxy.h:
404         (WebKit::WebPageProxy::contextMenuClient):
405         * UIProcess/mac/WebContextMenuProxyMac.h:
406         * UIProcess/mac/WebContextMenuProxyMac.mm:
407         (WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
408         (WebKit::WebContextMenuProxyMac::showContextMenu):
409         * UIProcess/mac/WebPageProxyMac.mm:
410         (WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
411
412 2015-10-16  Tim Horton  <timothy_horton@apple.com>
413
414         Hook up autolayout intrinsic sizing for WKWebView
415         https://bugs.webkit.org/show_bug.cgi?id=150219
416         <rdar://problem/20016905>
417
418         Reviewed by Simon Fraser.
419
420         * UIProcess/API/Cocoa/WKWebView.mm:
421         (-[WKWebView initWithFrame:configuration:]):
422         (-[WKWebView intrinsicContentSize]):
423         (-[WKWebView _setIntrinsicContentSize:]):
424         (-[WKWebView _minimumLayoutWidth]):
425         (-[WKWebView _setMinimumLayoutWidth:]):
426         * UIProcess/API/Cocoa/WKWebViewInternal.h:
427         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
428         Add a simple SPI to specify the minimum width that a WKWebView will attempt
429         to lay out to, similar to WKView except just a width, not a size, and
430         with no option to force the height to the view size. Similar behavior can
431         be achieved by clients by setting custom autolayout constraints on the view.
432
433         * UIProcess/mac/PageClientImpl.mm:
434         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
435         Forward intrinsic content size changes to the WKWebView, not its inner WKView,
436         if we have one.
437
438         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
439         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
440         Only set the autosizing fixed minimum height if we're using that behavior;
441         otherwise, setting it to the view's height will end up accidentally
442         turning on that behavior (which involves an extra layout per resize!).
443
444 2015-10-15  Anders Carlsson  <andersca@apple.com>
445
446         Use the ShowContextMenu message for service menus as well
447         https://bugs.webkit.org/show_bug.cgi?id=150206
448
449         Reviewed by Tim Horton.
450
451         * Shared/ContextMenuContextData.cpp:
452         (WebKit::ContextMenuContextData::ContextMenuContextData):
453         (WebKit::ContextMenuContextData::encode):
454         (WebKit::ContextMenuContextData::decode):
455         * Shared/ContextMenuContextData.h:
456         (WebKit::ContextMenuContextData::type):
457         (WebKit::ContextMenuContextData::ContextMenuContextData):
458         (WebKit::ContextMenuContextData::isServicesMenu):
459         (WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
460         * UIProcess/WebPageProxy.cpp:
461         (WebKit::WebPageProxy::showContextMenu):
462         (WebKit::WebPageProxy::internalShowContextMenu):
463         * UIProcess/WebPageProxy.h:
464         * UIProcess/WebPageProxy.messages.in:
465         * UIProcess/mac/WebContextMenuProxyMac.mm:
466         (WebKit::WebContextMenuProxyMac::populate):
467         (WebKit::WebContextMenuProxyMac::showContextMenu):
468         * UIProcess/mac/WebPageProxyMac.mm:
469         (WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
470         * WebProcess/WebPage/mac/WebPageMac.mm:
471         (WebKit::WebPage::handleSelectionServiceClick):
472
473 2015-10-16  Hunseop Jeong  <hs85.jeong@samsung.com>
474
475         [GTK] Try to fix the build after r191137
476         https://bugs.webkit.org/show_bug.cgi?id=150222
477
478         Reviewed by Carlos Garcia Campos.
479
480         * UIProcess/API/gtk/PageClientImpl.cpp:
481         (WebKit::PageClientImpl::doneWithKeyEvent):
482         (WebKit::PageClientImpl::createPopupMenuProxy):
483         (WebKit::PageClientImpl::createContextMenuProxy):
484         (WebKit::PageClientImpl::createColorPicker):
485         * UIProcess/API/gtk/PageClientImpl.h:
486         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
487         (WebKit::WebContextMenuProxyGtk::populate):
488         (WebKit::WebContextMenuProxyGtk::showContextMenu):
489         (WebKit::WebContextMenuProxyGtk::hideContextMenu):
490         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
491         * UIProcess/gtk/WebContextMenuProxyGtk.h:
492         (WebKit::WebContextMenuProxyGtk::create):
493         (WebKit::WebContextMenuProxyGtk::gtkMenu):
494         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
495         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
496         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
497         (WebKit::WebPopupMenuProxyGtk::create):
498         (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
499
500 2015-10-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
501
502          EFL build fix since r191137
503
504          Unreviewed EFL build fix.
505
506         * UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
507
508 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
509
510         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
511         https://bugs.webkit.org/show_bug.cgi?id=150155
512
513         Reviewed by Tim Horton.
514
515         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
516         (InitWebCoreSystemInterface): Deleted.
517
518 2015-10-15  Dean Jackson  <dino@apple.com>
519
520         Fix the iOS build. And hopefully not breaking the other builds
521         at the same time.
522
523         * UIProcess/PageClient.h:
524         * UIProcess/WebContextMenuProxy.cpp:
525         * UIProcess/WebContextMenuProxy.h:
526         * UIProcess/ios/PageClientImplIOS.h:
527         * UIProcess/ios/PageClientImplIOS.mm:
528         * UIProcess/mac/PageClientImpl.h:
529         * UIProcess/mac/PageClientImpl.mm:
530
531 2015-10-15  Anders Carlsson  <andersca@apple.com>
532
533         Use the context inside WebContextMenuProxyMac
534         https://bugs.webkit.org/show_bug.cgi?id=150196
535
536         Reviewed by Tim Horton.
537
538         * UIProcess/WebContextMenuProxy.h:
539         * UIProcess/WebPageProxy.cpp:
540         (WebKit::WebPageProxy::internalShowContextMenu):
541         * UIProcess/mac/WebContextMenuProxyMac.h:
542         * UIProcess/mac/WebContextMenuProxyMac.mm:
543         (WebKit::WebContextMenuProxyMac::populate):
544         (WebKit::WebContextMenuProxyMac::showContextMenu):
545
546 2015-10-15  Anders Carlsson  <andersca@apple.com>
547
548         Use the context menu location that's stored in the context data
549         https://bugs.webkit.org/show_bug.cgi?id=150194
550
551         Reviewed by Tim Horton.
552
553         * UIProcess/WebContextMenuProxy.h:
554         * UIProcess/WebPageProxy.cpp:
555         (WebKit::WebPageProxy::internalShowContextMenu):
556         * UIProcess/mac/WebContextMenuProxyMac.h:
557         * UIProcess/mac/WebContextMenuProxyMac.mm:
558         (WebKit::WebContextMenuProxyMac::showContextMenu):
559
560 2015-10-15  Anders Carlsson  <andersca@apple.com>
561
562         Store the context menu data and user data in the WebContextMenuProxy object
563         https://bugs.webkit.org/show_bug.cgi?id=150191
564
565         Reviewed by Tim Horton.
566
567         * UIProcess/PageClient.h:
568         * UIProcess/WebContextMenuProxy.cpp:
569         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
570         * UIProcess/WebContextMenuProxy.h:
571         * UIProcess/WebPageProxy.cpp:
572         (WebKit::WebPageProxy::internalShowContextMenu):
573         * UIProcess/ios/PageClientImplIOS.h:
574         * UIProcess/ios/PageClientImplIOS.mm:
575         (WebKit::PageClientImpl::createContextMenuProxy):
576         * UIProcess/mac/PageClientImpl.h:
577         * UIProcess/mac/PageClientImpl.mm:
578         (WebKit::PageClientImpl::createContextMenuProxy):
579         * UIProcess/mac/WebContextMenuProxyMac.h:
580         (WebKit::WebContextMenuProxyMac::create):
581         * UIProcess/mac/WebContextMenuProxyMac.mm:
582         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
583
584 2015-10-15  Dan Bernstein  <mitz@apple.com>
585
586         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
587         https://bugs.webkit.org/show_bug.cgi?id=150189
588
589         Reviewed by Anders Carlsson.
590
591         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
592         (InitWebCoreSystemInterface): Removed initialization.
593
594 2015-10-15  Anders Carlsson  <andersca@apple.com>
595
596         Fix build.
597
598         * UIProcess/API/APIFrameInfo.cpp:
599         (API::FrameInfo::~FrameInfo):
600         * UIProcess/API/APIFrameInfo.h:
601         * UIProcess/API/Cocoa/WKUserContentController.mm:
602
603 2015-10-15  Anders Carlsson  <andersca@apple.com>
604
605         CTTE menu proxies
606         https://bugs.webkit.org/show_bug.cgi?id=150187
607
608         Reviewed by Tim Horton.
609
610         * UIProcess/PageClient.h:
611         * UIProcess/WebPageProxy.cpp:
612         (WebKit::WebPageProxy::showPopupMenu):
613         (WebKit::WebPageProxy::internalShowContextMenu):
614         * UIProcess/WebPopupMenuProxy.h:
615         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
616         * UIProcess/ios/PageClientImplIOS.h:
617         * UIProcess/ios/PageClientImplIOS.mm:
618         (WebKit::PageClientImpl::createPopupMenuProxy):
619         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
620         * UIProcess/mac/PageClientImpl.h:
621         * UIProcess/mac/PageClientImpl.mm:
622         (WebKit::PageClientImpl::createPopupMenuProxy):
623         (WebKit::PageClientImpl::createContextMenuProxy):
624         * UIProcess/mac/WebContextMenuProxyMac.h:
625         (WebKit::WebContextMenuProxyMac::create):
626         (WebKit::WebContextMenuProxyMac::page):
627         * UIProcess/mac/WebContextMenuProxyMac.mm:
628         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
629         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
630         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
631         * UIProcess/mac/WebPopupMenuProxyMac.h:
632         (WebKit::WebPopupMenuProxyMac::create):
633         * UIProcess/mac/WebPopupMenuProxyMac.mm:
634         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
635
636 2015-10-15  Anders Carlsson  <andersca@apple.com>
637
638         Add -[WKFrameInfo _handle]
639         https://bugs.webkit.org/show_bug.cgi?id=150185
640         rdar://problem/23132371
641
642         Reviewed by Tim Horton.
643
644         * UIProcess/API/APIFrameInfo.cpp:
645         (API::FrameInfo::FrameInfo):
646         * UIProcess/API/APIFrameInfo.h:
647         * UIProcess/API/Cocoa/WKFrameInfo.mm:
648         (-[WKFrameInfo _handle]):
649         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
650         * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
651         * UIProcess/WebPageProxy.cpp:
652         (WebKit::WebPageProxy::showPopupMenu):
653         (WebKit::WebPageProxy::internalShowContextMenu):
654         * UIProcess/WebPopupMenuProxy.h:
655         (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
656         * WebKit2.xcodeproj/project.pbxproj:
657
658 2015-10-15  Anders Carlsson  <andersca@apple.com>
659
660         The menu location and menu items should be part of ContextMenuContextData
661         https://bugs.webkit.org/show_bug.cgi?id=150182
662
663         Reviewed by Andreas Kling.
664
665         * Shared/ContextMenuContextData.cpp:
666         (WebKit::ContextMenuContextData::ContextMenuContextData):
667         (WebKit::ContextMenuContextData::encode):
668         (WebKit::ContextMenuContextData::decode):
669         * Shared/ContextMenuContextData.h:
670         (WebKit::ContextMenuContextData::menuLocation):
671         (WebKit::ContextMenuContextData::menuItems):
672         (WebKit::ContextMenuContextData::ContextMenuContextData):
673         * UIProcess/WebPageProxy.cpp:
674         (WebKit::WebPageProxy::showContextMenu):
675         (WebKit::WebPageProxy::internalShowContextMenu):
676         * UIProcess/WebPageProxy.h:
677         * UIProcess/WebPageProxy.messages.in:
678         * UIProcess/mac/WebPageProxyMac.mm:
679         (WebKit::WebPageProxy::showSelectionServiceMenu):
680         * WebProcess/WebPage/WebContextMenu.cpp:
681         (WebKit::WebContextMenu::show):
682
683 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
684
685         [GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
686         https://bugs.webkit.org/show_bug.cgi?id=84960
687
688         Reviewed by Žan Doberšek.
689
690         Add a cross-platform implementation to LegacySessionStateCodingNone
691         using the new SessionState, so that non mac ports can make unit
692         tests that use the legacy session state coding pass.
693
694         * UIProcess/LegacySessionStateCodingNone.cpp:
695         (WebKit::encodeLegacySessionState):
696         (WebKit::decodeLegacySessionState):
697         (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
698         (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
699
700 2015-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
701
702         Unreviewed. Fix wrong #ifdef added in r190615.
703
704         This disabled accelerated compositing unconditionally.
705
706         * UIProcess/gtk/WebPreferencesGtk.cpp:
707         (WebKit::WebPreferences::platformInitializeStore):
708
709 2015-10-14  Zhuo Li  <zachli@apple.com>
710
711         Augment <input type=search>’s recent search history with the time each entry was added,
712         in order to allow time-based clearing of search history.
713         https://bugs.webkit.org/show_bug.cgi?id=148388.
714
715         Reviewed by Darin Adler.
716
717         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
718         that consists search string and time, for recent searches in order to store additional time
719         information.
720
721         All these new RecentSearches are stored in a plist in which the structure looks like:
722         Root {
723             "items": {
724                 autosave name: {
725                     "searches": [
726                         { "searchString": searchString, "date": date },
727                         ...
728                     ]
729                 }
730             }
731         }
732
733         * Scripts/webkit/messages.py:
734         (headers_for_type):
735         * Shared/WebCoreArgumentCoders.cpp:
736         (IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
737         (IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
738         * Shared/WebCoreArgumentCoders.h:
739         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
740         (WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
741         (WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
742         * UIProcess/WebPageProxy.h:
743         * UIProcess/WebPageProxy.messages.in:
744         * UIProcess/efl/WebPageProxyEfl.cpp:
745         (WebKit::WebPageProxy::saveRecentSearches):
746         (WebKit::WebPageProxy::loadRecentSearches):
747         * UIProcess/gtk/WebPageProxyGtk.cpp:
748         (WebKit::WebPageProxy::saveRecentSearches):
749         (WebKit::WebPageProxy::loadRecentSearches):
750         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
751         (WebKit::WebSearchPopupMenu::saveRecentSearches):
752         (WebKit::WebSearchPopupMenu::loadRecentSearches):
753         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
754
755 2015-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>
756
757         Web pages with unscalable viewports shouldn't have a single tap delay
758         https://bugs.webkit.org/show_bug.cgi?id=149968
759         <rdar://problem/23054453>
760
761         Reviewed by Simon Fraser.
762
763         When a viewport is unscalable (specified through the meta viewport tag) we
764         do not add a delay to our single tap gesture recognizer. We do this by
765         disabling or reinitializing the WKContentView's double tap gesture recognizer
766         when the viewport becomes unscalable or scalable, respectively. A viewport is
767         deemed unscalable when it has user-scalable = no, or when the minimum scale is
768         greater than or equal to the maximum scale.
769
770         * UIProcess/API/Cocoa/WKWebView.mm:
771         (-[WKWebView _didCommitLayerTree:]):
772         * UIProcess/ios/WKContentViewInteraction.h:
773         * UIProcess/ios/WKContentViewInteraction.mm:
774         (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
775                 for initializing a double tap gesture recognizer out into a helper function.
776         (-[WKContentView setupInteraction]):
777         (-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
778                 taps on or off.
779
780 2015-10-14  Anders Carlsson  <andersca@apple.com>
781
782         Remove a message that isn't used by anyone
783         https://bugs.webkit.org/show_bug.cgi?id=150136
784
785         Reviewed by Andreas Kling.
786
787         * UIProcess/API/APILoaderClient.h:
788         (API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
789         * UIProcess/API/C/WKPage.cpp:
790         (WKPageSetPageLoaderClient): Deleted.
791         * UIProcess/WebPageProxy.cpp:
792         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
793         * UIProcess/WebPageProxy.h:
794         * UIProcess/WebPageProxy.messages.in:
795         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
796         (WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.
797
798 2015-10-14  Alex Christensen  <achristensen@webkit.org>
799
800         Add SPI for reloading without content blockers
801         https://bugs.webkit.org/show_bug.cgi?id=150058
802         rdar://problem/22742222
803
804         Reviewed by Sam Weinig.
805
806         * Shared/WebPageCreationParameters.cpp:
807         (WebKit::WebPageCreationParameters::encode):
808         (WebKit::WebPageCreationParameters::decode):
809         * Shared/WebPageCreationParameters.h:
810         * UIProcess/API/C/WKPage.cpp:
811         (WKPageReload):
812         (WKPageReloadWithoutContentBlockers):
813         (WKPageReloadFromOrigin):
814         (WKPageTryClose):
815         (WKPageSetUserContentExtensionsEnabled):
816         (WKPageSupportsTextEncoding):
817         * UIProcess/API/C/WKPage.h:
818         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
819         (-[WKBrowsingContextController reload]):
820         (-[WKBrowsingContextController reloadFromOrigin]):
821         (-[WKBrowsingContextController applicationNameForUserAgent]):
822         * UIProcess/API/Cocoa/WKWebView.mm:
823         (-[WKWebView reload]):
824         (-[WKWebView reloadFromOrigin]):
825         (-[WKWebView _setUserContentExtensionsEnabled:]):
826         (-[WKWebView _userContentExtensionsEnabled]):
827         (-[WKWebView _webProcessIdentifier]):
828         (-[WKWebView _killWebContentProcess]):
829         (-[WKWebView _reloadWithoutContentBlockers]):
830         (-[WKWebView _killWebContentProcessAndResetState]):
831         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
832         * UIProcess/API/gtk/WebKitWebView.cpp:
833         (webkit_web_view_reload):
834         (webkit_web_view_reload_bypass_cache):
835         * UIProcess/WebFrameProxy.cpp:
836         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
837         * UIProcess/WebPageProxy.cpp:
838         (WebKit::WebPageProxy::stopLoading):
839         (WebKit::WebPageProxy::reload):
840         (WebKit::WebPageProxy::creationParameters):
841         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
842         (WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
843         * UIProcess/WebPageProxy.h:
844         (WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
845         * WebProcess/WebPage/WebPage.cpp:
846         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
847         (WebKit::WebPage::setDefersLoading):
848         (WebKit::WebPage::reload):
849         (WebKit::WebPage::goForward):
850         (WebKit::WebPage::createDocumentLoader):
851         (WebKit::WebPage::setShouldScaleViewToFitDocument):
852         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
853         (WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
854         * WebProcess/WebPage/WebPage.h:
855         * WebProcess/WebPage/WebPage.messages.in:
856
857 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
858
859         Change GraphicsContext image-drawing functions to take references
860         https://bugs.webkit.org/show_bug.cgi?id=150108
861
862         Reviewed by Tim Horton and Sam Weinig.
863
864         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
865         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
866         null-checks where necessary.
867
868         * Shared/ContextMenuContextData.cpp:
869         (WebKit::ContextMenuContextData::ContextMenuContextData):
870         * Shared/WebCoreArgumentCoders.cpp:
871         (IPC::encodeImage):
872         (IPC::encodeOptionalImage):
873         (IPC::ArgumentCoder<Cursor>::encode):
874         * WebProcess/WebPage/WebFrame.cpp:
875         (WebKit::WebFrame::createSelectionSnapshot):
876
877 2015-10-14  Anders Carlsson  <andersca@apple.com>
878
879         Change the bundle app cache APIs to take a page
880         https://bugs.webkit.org/show_bug.cgi?id=150123
881
882         Reviewed by Sam Weinig.
883
884         This is another step towards getting rid of ApplicationCacheStorage::singleton().
885         Ideally the WKTR tests that use this should be converted to API tests.
886
887         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
888         (WKBundleClearApplicationCache): Deleted.
889         (WKBundleClearApplicationCacheForOrigin): Deleted.
890         (WKBundleSetAppCacheMaximumSize): Deleted.
891         (WKBundleGetAppCacheUsageForOrigin): Deleted.
892         (WKBundleSetApplicationCacheOriginQuota): Deleted.
893         (WKBundleResetApplicationCacheOriginQuota): Deleted.
894         (WKBundleCopyOriginsWithApplicationCache): Deleted.
895         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
896         (WKBundlePageClearApplicationCache):
897         (WKBundlePageClearApplicationCacheForOrigin):
898         (WKBundlePageSetAppCacheMaximumSize):
899         (WKBundlePageGetAppCacheUsageForOrigin):
900         (WKBundlePageSetApplicationCacheOriginQuota):
901         (WKBundlePageResetApplicationCacheOriginQuota):
902         (WKBundlePageCopyOriginsWithApplicationCache):
903         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
904         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
905         * WebProcess/InjectedBundle/InjectedBundle.cpp:
906         (WebKit::InjectedBundle::clearApplicationCache): Deleted.
907         (WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
908         (WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
909         (WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
910         (WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
911         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
912         (WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
913         * WebProcess/InjectedBundle/InjectedBundle.h:
914
915 2015-10-14  Joonghun Park  <jh718.park@samsung.com>
916
917         [EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
918         https://bugs.webkit.org/show_bug.cgi?id=148616
919
920         Reviewed by Gyuyoung Kim.
921
922         This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
923         process-cmd-prefix option doesn't work in two cases.
924         1. When executing run-layout-tests,
925         2. When executing MiniBrowser with web process-cmd-prefix environment variable.
926
927         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
928         (WebKit::parseAndRemoveEnvironments):
929         (WebKit::ProcessLauncher::launchProcess):
930
931 2015-10-13  Yongjun Zhang  <yongjun_zhang@apple.com>
932
933         Use the correct notification strings for view service applications state change.
934         https://bugs.webkit.org/show_bug.cgi?id=150107
935
936         Use the correct notification names "_UIViewServiceHostDidEnterBackgroundNotification" and
937         "_UIViewServiceHostWillEnterForegroundNotification" to listen to view service application state changes.
938
939         Reviewed by Gavin Barraclough.
940
941         * UIProcess/ApplicationStateTracker.mm:
942         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
943
944 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
945
946         Split TypesettingFeatures into kerning and ligatures bools
947         https://bugs.webkit.org/show_bug.cgi?id=150074
948
949         Reviewed by Simon Fraser.
950
951         * Shared/WebProcessCreationParameters.cpp:
952         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
953         (WebKit::WebProcessCreationParameters::encode):
954         (WebKit::WebProcessCreationParameters::decode):
955         * Shared/WebProcessCreationParameters.h:
956         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
957         (WebKit::WebProcessPool::platformInitializeWebProcess):
958         * WebProcess/cocoa/WebProcessCocoa.mm:
959         (WebKit::WebProcess::platformInitializeWebProcess):
960
961 2015-10-13  Dean Jackson  <dino@apple.com>
962
963         Fix iOS-family builds.
964
965         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
966         (WKPageGetObjectRegistry):
967         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
968         (-[WKBrowsingContextController _remoteObjectRegistry]):
969         * UIProcess/API/mac/WKViewInternal.h:
970
971 2015-10-13  Anders Carlsson  <andersca@apple.com>
972
973         Fix 32-bit build.
974
975         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
976         (WKPageGetObjectRegistry):
977
978 2015-10-13  Anders Carlsson  <andersca@apple.com>
979
980         Add and implement WKPageGetObjectRegistry
981         https://bugs.webkit.org/show_bug.cgi?id=150102
982
983         Reviewed by Tim Horton.
984
985         Put the _WKObjectRegistry used by WKPageRef and WKBrowsingContextController on the WKView for now.
986         If we decide to share more code between WKView and WKWebView, the object registry could live in an object that would be shared
987         between WKView and WKWebView.
988
989         * UIProcess/API/C/mac/WKPagePrivateMac.h:
990         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
991         (WKPageGetObjectRegistry):
992         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
993         (-[WKBrowsingContextController _remoteObjectRegistry]):
994         (-[WKBrowsingContextController dealloc]): Deleted.
995         * UIProcess/API/mac/WKView.mm:
996         (-[WKView dealloc]):
997         (-[WKView _remoteObjectRegistry]):
998         * UIProcess/API/mac/WKViewInternal.h:
999
1000 2015-10-13  Chris Dumez  <cdumez@apple.com>
1001
1002         Avoid useless copies in range-loops that are using 'auto'
1003         https://bugs.webkit.org/show_bug.cgi?id=150091
1004
1005         Reviewed by Sam Weinig.
1006
1007         Avoid useless copies in range-loops that are using 'auto'. Also use
1008         'auto*' instead of 'auto' when range values are pointers for clarity.
1009
1010         * UIProcess/VisitedLinkStore.cpp:
1011         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
1012         (WebKit::VisitedLinkStore::resizeTable):
1013         * UIProcess/WebProcessProxy.cpp:
1014         (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
1015         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1016         (WebKit::WebsiteDataStore::fetchData):
1017         (WebKit::WebsiteDataStore::removeData):
1018         (WebKit::WebsiteDataStore::plugins):
1019
1020 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
1021
1022         Add debug settings for using giant tiles (4096x4096)
1023         https://bugs.webkit.org/show_bug.cgi?id=149977
1024         <rdar://problem/23017093>
1025
1026         Reviewed by Tim Horton.
1027
1028         * Shared/WebPreferencesDefinitions.h:
1029         * UIProcess/API/C/WKPreferences.cpp:
1030         (WKPreferencesSetUseGiantTiles):
1031         (WKPreferencesGetUseGiantTiles):
1032         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1033         * WebProcess/WebPage/WebPage.cpp:
1034         (WebKit::WebPage::updatePreferences):
1035
1036 2015-10-13  Brent Fulgham  <bfulgham@apple.com>
1037
1038         [iOS] Avoid crash due to invalid screen bounds
1039         https://bugs.webkit.org/show_bug.cgi?id=150048
1040         <rdar://problem/22112664>
1041
1042         Reviewed by Jer Noble.
1043
1044         Check for an invalid bounds, and reset it to a known state before
1045         attempting to use it.
1046
1047         * WebProcess/ios/WebVideoFullscreenManager.mm:
1048         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
1049
1050 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
1051
1052         [GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
1053         https://bugs.webkit.org/show_bug.cgi?id=150085
1054
1055         Reviewed by Carlos Garcia Campos.
1056
1057         * Shared/gtk/NativeWebTouchEventGtk.cpp:
1058         * Shared/gtk/WebEventFactory.cpp:
1059         * Shared/gtk/WebEventFactory.h:
1060         * UIProcess/API/gtk/PageClientImpl.cpp:
1061         * UIProcess/API/gtk/PageClientImpl.h:
1062         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1063         (webkit_web_view_base_class_init):
1064
1065 2015-10-13  Chris Dumez  <cdumez@apple.com>
1066
1067         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize()
1068         https://bugs.webkit.org/show_bug.cgi?id=150061
1069
1070         Reviewed by Carlos Garcia Campos.
1071
1072         Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize().
1073         Key::HashType is currently a SHA1::Digest, which is a std::array<uint8_t, 20>.
1074
1075         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1076         (WebKit::NetworkCache::Storage::synchronize):
1077
1078 2015-10-12  Philip Chimento  <philip.chimento@gmail.com>
1079
1080         [GTK] OSX linker doesn't understand --whole-archive
1081         https://bugs.webkit.org/show_bug.cgi?id=144557
1082
1083         Reviewed by Martin Robinson.
1084
1085         * PlatformGTK.cmake: Link with extra libraries on Darwin, since
1086         we don't have the --whole-archive linker option.
1087
1088 2015-10-09  Anders Carlsson  <andersca@apple.com>
1089
1090         Don't allow plug-ins to override image types for <embed> elements
1091         https://bugs.webkit.org/show_bug.cgi?id=149979
1092
1093         Reviewed by Tim Horton.
1094
1095         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1096         (WebKit::WebFrameLoaderClient::objectContentType):
1097         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1098
1099 2015-10-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1100
1101         [EFL] Bump Version/X in user agent
1102         https://bugs.webkit.org/show_bug.cgi?id=150013
1103
1104         Reviewed by Csaba Osztrogonác.
1105
1106         EFL port needs to ensure maximum compatibility with existing web sites.
1107         Thus version number needs to be bumped from 5.0 to 8.0 as GTK port.
1108
1109         * UIProcess/efl/WebPageProxyEfl.cpp:
1110         (WebKit::WebPageProxy::standardUserAgent):
1111
1112 2015-10-10  Dan Bernstein  <mitz@apple.com>
1113
1114         [iOS] Remove unnecessary iOS version checks
1115         https://bugs.webkit.org/show_bug.cgi?id=150002
1116
1117         Reviewed by Alexey Proskuryakov.
1118
1119         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1120         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1121         * Platform/IPC/mac/ConnectionMac.mm:
1122         (IPC::AccessibilityProcessSuspendedNotification):
1123         * Platform/spi/ios/SafariServicesSPI.h:
1124         * Platform/spi/ios/UIKitSPI.h:
1125         * Shared/Network/NetworkProcessCreationParameters.cpp:
1126         (WebKit::NetworkProcessCreationParameters::encode):
1127         (WebKit::NetworkProcessCreationParameters::decode):
1128         * Shared/Network/NetworkProcessCreationParameters.h:
1129         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1130         (WebKit::PluginProcessCreationParameters::encode):
1131         (WebKit::PluginProcessCreationParameters::decode):
1132         * Shared/Plugins/PluginProcessCreationParameters.h:
1133         * Shared/WebEventConversion.cpp:
1134         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1135         * Shared/WebProcessCreationParameters.cpp:
1136         (WebKit::WebProcessCreationParameters::encode):
1137         (WebKit::WebProcessCreationParameters::decode):
1138         * Shared/WebProcessCreationParameters.h:
1139         * Shared/ios/NativeWebTouchEventIOS.mm:
1140         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
1141         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1142         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1143         (WebKit::WebPlatformTouchPoint::encode):
1144         (WebKit::WebPlatformTouchPoint::decode):
1145         * UIProcess/API/Cocoa/WKWebView.mm:
1146         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
1147         (shouldAllowPictureInPictureMediaPlayback):
1148         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1149         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1150         (WebKit::WebProcessPool::platformInitializeWebProcess):
1151         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1152         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1153         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1154         * UIProcess/ios/ViewGestureControllerIOS.mm:
1155         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1156         * UIProcess/ios/WKContentViewInteraction.mm:
1157         (-[WKContentView setupInteraction]):
1158         (-[WKContentView _ensureFormAccessoryView]):
1159         (-[WKContentView webSelectionAssistant]):
1160         (-[WKContentView selectionInteractionAssistant]):
1161         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1162         (WebKit::WebVideoFullscreenManagerProxy::create):
1163         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1164         (photoLibraryIcon):
1165         (cameraIcon):
1166         (fallbackIconForFile):
1167         (iconForImageFile):
1168         * WebKit2.xcodeproj/project.pbxproj:
1169         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1170         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1171         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1172         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1173         * WebProcess/cocoa/WebProcessCocoa.mm:
1174         (WebKit::WebProcess::platformInitializeWebProcess):
1175
1176 2015-10-10  Dan Bernstein  <mitz@apple.com>
1177
1178         [iOS] Remove project support for iOS 8
1179         https://bugs.webkit.org/show_bug.cgi?id=149993
1180
1181         Reviewed by Alexey Proskuryakov.
1182
1183         * Configurations/Base.xcconfig:
1184         * Configurations/BaseLegacyProcess.xcconfig:
1185         * Configurations/BaseXPCService.xcconfig:
1186         * Configurations/PluginProcessShim.xcconfig:
1187         * Configurations/SecItemShim.xcconfig:
1188         * Configurations/WebKit.xcconfig:
1189         * Configurations/WebKit2.xcconfig:
1190         * Configurations/WebProcessShim.xcconfig:
1191
1192 2015-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
1193
1194         Unreviewed, rolling out r190689
1195         https://bugs.webkit.org/show_bug.cgi?id=149992
1196
1197         Fixed in other repository.
1198
1199         Reverted changesets:
1200
1201         "Unreviewed, rolling out r190572, r190593, r190594, and r190639."
1202         https://bugs.webkit.org/show_bug.cgi?id=149897
1203
1204 2015-10-09  Beth Dakin  <bdakin@apple.com>
1205
1206         Rubber-stamped by Anders Carlsson.
1207
1208         Remove unnecessary includes.
1209         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1210         * WebProcess/Plugins/Plugin.h:
1211         * WebProcess/Plugins/PluginProxy.h:
1212         * WebProcess/Plugins/PluginView.h:
1213         * WebProcess/WebPage/mac/WebPageMac.mm:
1214
1215 2015-10-09  Beth Dakin  <bdakin@apple.com>
1216
1217         Build fix.
1218
1219         * CMakeLists.txt:
1220         * Shared/API/APIHitTestResult.cpp: Removed.
1221         * Shared/API/APIHitTestResult.h: Removed.
1222         * WebKit2.xcodeproj/project.pbxproj:
1223
1224 2015-10-09  Beth Dakin  <bdakin@apple.com>
1225
1226         Build fix.
1227
1228         * UIProcess/API/APIHitTestResult.cpp: Copied from Shared/API/APIHitTestResult.cpp.
1229         * UIProcess/API/APIHitTestResult.h: Copied from Shared/API/APIHitTestResult.h.
1230         * UIProcess/mac/PageClientImpl.mm:
1231
1232 2015-10-09  Beth Dakin  <bdakin@apple.com>
1233
1234         WKWebView needs SPI to customize immediate actions
1235         https://bugs.webkit.org/show_bug.cgi?id=149939
1236         -and corresponding-
1237         rdar://problem/20016849
1238
1239         Reviewed by Anders Carlsson.
1240
1241         This patch breaks WebHitTestResult into two files. WebHiTestResultData 
1242         continues to live in the WebKit namespace and contains the old 
1243         WebHitTestResult::Data struct. The rest of WebHitTestResult is now 
1244         API::HitTestResult. The patch also adds _WKHitTestResult as Obj-C API to wrap 
1245         API::HitTestResult.
1246
1247         Attempt to keep other ports happy with new files.
1248         * CMakeLists.txt:
1249
1250         WebKit::WebHitTestResult no longer contains the Data struct and is now called 
1251         API::HitTestResult.
1252         * Shared/API/APIHitTestResult.cpp: Copied from Shared/WebHitTestResult.cpp.
1253         (API::HitTestResult::create):
1254         (WebKit::WebHitTestResult::create): Deleted.
1255         (WebKit::WebHitTestResult::Data::Data): Deleted.
1256         (WebKit::WebHitTestResult::Data::~Data): Deleted.
1257         (WebKit::WebHitTestResult::Data::encode): Deleted.
1258         (WebKit::WebHitTestResult::Data::decode): Deleted.
1259         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
1260         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
1261         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Deleted.
1262         * Shared/API/APIHitTestResult.h: Copied from Shared/WebHitTestResult.h.
1263         (API::HitTestResult::absoluteImageURL):
1264         (API::HitTestResult::absolutePDFURL):
1265         (API::HitTestResult::absoluteLinkURL):
1266         (API::HitTestResult::absoluteMediaURL):
1267         (API::HitTestResult::linkLabel):
1268         (API::HitTestResult::linkTitle):
1269         (API::HitTestResult::lookupText):
1270         (API::HitTestResult::isContentEditable):
1271         (API::HitTestResult::isDownloadableMedia):
1272         (API::HitTestResult::HitTestResult):
1273         (WebKit::WebHitTestResult::absoluteImageURL): Deleted.
1274         (WebKit::WebHitTestResult::absolutePDFURL): Deleted.
1275         (WebKit::WebHitTestResult::absoluteLinkURL): Deleted.
1276         (WebKit::WebHitTestResult::absoluteMediaURL): Deleted.
1277         (WebKit::WebHitTestResult::linkLabel): Deleted.
1278         (WebKit::WebHitTestResult::linkTitle): Deleted.
1279         (WebKit::WebHitTestResult::lookupText): Deleted.
1280         (WebKit::WebHitTestResult::isContentEditable): Deleted.
1281         (WebKit::WebHitTestResult::isDownloadableMedia): Deleted.
1282         (WebKit::WebHitTestResult::WebHitTestResult): Deleted.
1283
1284         This is a new obj-c object that we can use for the modern immediate action 
1285         API.
1286         * Shared/API/Cocoa/_WKHitTestResult.h: Added.
1287         * Shared/API/Cocoa/_WKHitTestResult.mm: Added.
1288         (-[_WKHitTestResult dealloc]):
1289         (-[_WKHitTestResult absoluteImageURL]):
1290         (-[_WKHitTestResult absolutePDFURL]):
1291         (-[_WKHitTestResult absoluteLinkURL]):
1292         (-[_WKHitTestResult absoluteMediaURL]):
1293         (-[_WKHitTestResult linkLabel]):
1294         (-[_WKHitTestResult linkTitle]):
1295         (-[_WKHitTestResult lookupText]):
1296         (-[_WKHitTestResult isContentEditable]):
1297         (-[_WKHitTestResult elementBoundingBox]):
1298         (-[_WKHitTestResult copyWithZone:]):
1299         (-[_WKHitTestResult _apiObject]):
1300
1301         _WKHitTestResult wraps API::HitTestResult.
1302         * Shared/API/Cocoa/_WKHitTestResultInternal.h: Added.
1303         (API::wrapper):
1304         * Shared/Cocoa/APIObject.mm:
1305         (API::Object::newObject):
1306
1307         Since we want to use the same enum name for the new enum, use a #define instead of a typedef in the old C SPI. This should keep old clients working in the meantime.
1308         * Shared/API/c/WKImmediateActionTypes.h:
1309
1310         WebHitTestResult::Data is now WebHitTestResultData.
1311         * Shared/ContextMenuContextData.h:
1312         (WebKit::ContextMenuContextData::webHitTestResultData):
1313         (WebKit::ContextMenuContextData::selectedText):
1314
1315         Remove WebHitTestResult, and add WebHitTestResultData for the Data struct.
1316         * Shared/WebHitTestResult.cpp: Removed.
1317         * Shared/WebHitTestResult.h: Removed.
1318         * Shared/WebHitTestResultData.cpp: Added.
1319         (WebKit::WebHitTestResultData::WebHitTestResultData):
1320         (WebKit::WebHitTestResultData::~WebHitTestResultData):
1321         (WebKit::WebHitTestResultData::encode):
1322         (WebKit::WebHitTestResultData::decode):
1323         (WebKit::WebHitTestResultData::platformEncode):
1324         (WebKit::WebHitTestResultData::platformDecode):
1325         (WebKit::WebHitTestResultData::elementBoundingBoxInWindowCoordinates):
1326         * Shared/WebHitTestResultData.h: Added.
1327         * Shared/mac/WebHitTestResult.mm: Removed.
1328         * Shared/mac/WebHitTestResultData.mm: Copied from Shared/mac/WebHitTestResult.mm.
1329         (WebKit::WebHitTestResultData::platformEncode):
1330         (WebKit::WebHitTestResultData::platformDecode):
1331         (WebKit::WebHitTestResult::Data::platformEncode): Deleted.
1332         (WebKit::WebHitTestResult::Data::platformDecode): Deleted.
1333
1334         WebHitTestResult::Data is now WebHitTestResultData.
1335         * UIProcess/API/APIContextMenuClient.h:
1336         (API::ContextMenuClient::~ContextMenuClient):
1337         (API::ContextMenuClient::getContextMenuFromProposedMenu):
1338         (API::ContextMenuClient::customContextMenuItemSelected):
1339         (API::ContextMenuClient::contextMenuDismissed):
1340         (API::ContextMenuClient::showContextMenu):
1341
1342         WebHitTestResult is now WebHitTestResult
1343         * UIProcess/API/APIUIClient.h:
1344         (API::UIClient::runJavaScriptPrompt):
1345         (API::UIClient::setStatusText):
1346         (API::UIClient::mouseDidMoveOverElement):
1347         (API::UIClient::unavailablePluginButtonClicked):
1348         (API::UIClient::pinnedStateDidChange):
1349         (API::UIClient::didBeginTrackingPotentialLongMousePress):
1350         (API::UIClient::didRecognizeLongMousePress):
1351         (API::UIClient::didCancelTrackingPotentialLongMousePress):
1352         * UIProcess/API/C/WKAPICast.h:
1353         * UIProcess/API/C/WKHitTestResult.cpp:
1354         (WKHitTestResultGetTypeID):
1355         (WKHitTestResultCopyAbsoluteImageURL):
1356         * UIProcess/API/C/WKPage.cpp:
1357         (WKPageSetPageContextMenuClient):
1358         (WKPageSetPageUIClient):
1359
1360         New WKWebView SPI _immediateActionAnimationControllerForHitTestResult
1361         * UIProcess/API/Cocoa/WKViewPrivate.h:
1362         * UIProcess/API/Cocoa/WKWebView.mm:
1363         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1364
1365         Attempts to keep other ports happy with the re-name.
1366         * UIProcess/API/efl/WebAccessibility.cpp:
1367         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1368         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
1369         (webkit_hit_test_result_class_init):
1370         (webkitHitTestResultCreate):
1371         (stringIsEqualToCString):
1372         (webkitHitTestResultCompare):
1373         * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
1374         * UIProcess/API/gtk/WebKitUIClient.cpp:
1375         * UIProcess/API/gtk/WebKitWebView.cpp:
1376         (webkitWebViewMakePermissionRequest):
1377         (webkitWebViewMouseTargetChanged):
1378         (contextMenuDismissed):
1379         (webkitWebViewPopulateContextMenu):
1380         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1381
1382         Re-name, and just use uint32_t for the old SPI.
1383         * UIProcess/API/mac/WKView.mm:
1384         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1385         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
1386         (-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
1387         * UIProcess/API/mac/WKViewInternal.h:
1388
1389         PageClient will figure out whether to call into WKWebView or WKView for this 
1390         SPI.
1391         * UIProcess/PageClient.h:
1392         * UIProcess/WebPageProxy.cpp:
1393         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
1394         * UIProcess/WebPageProxy.h:
1395         * UIProcess/mac/PageClientImpl.h:
1396         * UIProcess/mac/PageClientImpl.mm:
1397         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
1398
1399         WebKit::WebHitTestResult::Data is now WebKit::WebHitTestResultData.
1400         * UIProcess/WebPageProxy.messages.in:
1401
1402         WKImmediateActionController calls through to WebPageProxy which calls to 
1403         PageClient, which figures out which API to call. Also cache the type as a 
1404         uint32_t
1405         * UIProcess/mac/WKImmediateActionController.h:
1406         * UIProcess/mac/WKImmediateActionController.mm:
1407         (-[WKImmediateActionController _updateImmediateActionItem]):
1408
1409         WebHitTestResult::Data is now WebHitTestResultData.
1410         * UIProcess/mac/WebPageProxyMac.mm:
1411         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
1412
1413         New files!
1414         * WebKit2.xcodeproj/project.pbxproj:
1415
1416         Deal with the #define situation for the enum.
1417         * WebKit2Prefix.h:
1418
1419         New names for things. WebHitTestResult::Data -> WebHitTestResultData
1420         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1421         * WebProcess/Plugins/PDF/PDFPlugin.h:
1422         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1423         (WebKit::pointInLayoutSpaceForPointInWindowSpace):
1424         (WebKit::PDFPlugin::lookupTextAtLocation):
1425         * WebProcess/Plugins/Plugin.h:
1426         * WebProcess/Plugins/PluginProxy.h:
1427         * WebProcess/Plugins/PluginView.h:
1428         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1429         (WebKit::WebChromeClient::mouseDidMoveOverElement):
1430         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
1431         * WebProcess/WebPage/mac/WebPageMac.mm:
1432         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
1433
1434 2015-10-09  Anders Carlsson  <andersca@apple.com>
1435
1436         Remove two unused WKFrame functions
1437         https://bugs.webkit.org/show_bug.cgi?id=149958
1438
1439         Reviewed by Dan Bernstein.
1440
1441         * UIProcess/API/C/WKFrame.cpp:
1442         (WKFrameCopyChildFrames): Deleted.
1443         (WKFrameGetParentFrame): Deleted.
1444         * UIProcess/API/C/WKFrame.h:
1445
1446 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1447
1448         Format string issues in NetworkCache.cpp
1449         https://bugs.webkit.org/show_bug.cgi?id=149867
1450
1451         Reviewed by Csaba Osztrogonác.
1452
1453         Cast enums to ints before printing them to placate GCC's -Wformat.
1454
1455         * NetworkProcess/cache/NetworkCache.cpp:
1456         (WebKit::NetworkCache::Cache::retrieve):
1457         (WebKit::NetworkCache::Cache::store):
1458
1459 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1460
1461         Format string issue in WebResourceLoadScheduler.cpp
1462         https://bugs.webkit.org/show_bug.cgi?id=149868
1463
1464         Reviewed by Csaba Osztrogonác.
1465
1466         Cast enums to ints before printing them to placate GCC's -Wformat.
1467
1468         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1469         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1470
1471 2015-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1472
1473         [GTK] Stop using a nested main loop for popup menus
1474         https://bugs.webkit.org/show_bug.cgi?id=149920
1475
1476         Reviewed by Sergio Villar Senin.
1477
1478         WebPageProxy used to expect the popup menus to run in a nested
1479         main loop and invalidated the menu right after showing it. But
1480         this is no longer the case, so there's no reason to keep using
1481         the nested main loop.
1482
1483         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1484         (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
1485         (WebKit::WebPopupMenuProxyGtk::cancelTracking):
1486         (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
1487         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): Deleted.
1488         (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Deleted.
1489         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): Deleted.
1490         (WebKit::WebPopupMenuProxyGtk::menuUnmapped): Deleted.
1491         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1492         (WebKit::WebPopupMenuProxyGtk::setActiveItem): Deleted.
1493
1494 2015-10-07  Anders Carlsson  <andersca@apple.com>
1495
1496         Add API for getting a group identifier from a bundle page
1497         https://bugs.webkit.org/show_bug.cgi?id=149902
1498
1499         Reviewed by Tim Horton.
1500
1501         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1502         (WKBundlePageCopyGroupIdentifier):
1503         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1504
1505 2015-10-07  Csaba Osztrogonác  <ossy@webkit.org>
1506
1507         URTBF after r190678 to fix GTK and EFL builds.
1508
1509         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
1510         (WebKit::InjectedBundle::setBundleParameters):
1511         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1512         (WebKit::InjectedBundle::setBundleParameters):
1513
1514 2015-10-07  Commit Queue  <commit-queue@webkit.org>
1515
1516         Unreviewed, rolling out r190572, r190593, r190594, and
1517         r190639.
1518         https://bugs.webkit.org/show_bug.cgi?id=149897
1519
1520         Breaks Mavericks build (Requested by litherum on #webkit).
1521
1522         Reverted changesets:
1523
1524         "Allow WKRetainPtrs to be used as keys in hashing data
1525         structures"
1526         https://bugs.webkit.org/show_bug.cgi?id=149762
1527         http://trac.webkit.org/changeset/190572
1528
1529         "REGRESSION(189668?): http/tests/notifications/events.html
1530         flakily asserts or times out"
1531         https://bugs.webkit.org/show_bug.cgi?id=149218
1532         http://trac.webkit.org/changeset/190593
1533
1534         "Prospective Mavericks build fix."
1535         http://trac.webkit.org/changeset/190594
1536
1537         "Post-review cleanup after r190572."
1538         http://trac.webkit.org/changeset/190639
1539
1540 2015-10-07  Anders Carlsson  <andersca@apple.com>
1541
1542         Provide a way to get a WKFrameInfoRef from a WKFrameRef
1543         https://bugs.webkit.org/show_bug.cgi?id=149896
1544         rdar://problem/23016081
1545
1546         Reviewed by Dan Bernstein.
1547
1548         * UIProcess/API/C/WKFrame.cpp:
1549         (WKFrameCreateFrameInfo):
1550         * UIProcess/API/C/WKFrame.h:
1551
1552 2015-10-07  Anders Carlsson  <andersca@apple.com>
1553
1554         Add unreachable URL to _WKObservablePageState
1555         https://bugs.webkit.org/show_bug.cgi?id=149893
1556         <rdar://problem/23017235>
1557  
1558         Reviewed by Dan Bernstein.
1559
1560         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1561         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1562         (-[WKObservablePageState unreachableURL]):
1563
1564 2015-10-07  Anders Carlsson  <andersca@apple.com>
1565
1566         Add -[WKProcessPool _setObjectsForBundleParametersWithDictionary:]
1567         https://bugs.webkit.org/show_bug.cgi?id=149887
1568
1569         Reviewed by Tim Horton.
1570
1571         * UIProcess/API/Cocoa/WKProcessPool.mm:
1572         (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
1573         Copy the dictionary, archive it, and set the values on the UI side bundle parameter data struct.
1574
1575         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1576         Add new SPI.
1577
1578         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
1579         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
1580         (-[WKWebProcessBundleParameters setParameter:forKey:]):
1581         We can just call setValue:forKey: on the dictionary; it will do the right thing if value is nil.
1582
1583         (-[WKWebProcessBundleParameters setParametersForKeyWithDictionary:]):
1584         Enumerate the dictionary and call setValue:forKey: on each key/value pair.
1585
1586         * WebProcess/InjectedBundle/InjectedBundle.h:
1587         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1588         (WebKit::InjectedBundle::setBundleParameter):
1589         If we fail to unarchive a parameter, don't set it to null.
1590
1591         (WebKit::InjectedBundle::setBundleParameters):
1592         Unarchive the dictionary and update the bundle parameters.
1593
1594         * WebProcess/WebProcess.cpp:
1595         (WebKit::WebProcess::setInjectedBundleParameters):
1596         Call the injected bundle.
1597
1598         * WebProcess/WebProcess.h:
1599         * WebProcess/WebProcess.messages.in:
1600         Add new message.
1601
1602 2015-10-06  Anders Carlsson  <andersca@apple.com>
1603
1604         Expose the bundle parameter object on WKBundleRef
1605         https://bugs.webkit.org/show_bug.cgi?id=149860
1606
1607         Reviewed by Tim Horton.
1608
1609         * WebKit2.xcodeproj/project.pbxproj:
1610         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
1611         (-[WKWebProcessBundleParameters description]):
1612         Add a description that includes the parameters.
1613
1614         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.h:
1615         * WebProcess/InjectedBundle/API/c/mac/WKBundleMac.mm:
1616         (WKBundleGetParameters):
1617         Add getter.
1618
1619         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1620         (WebKit::InjectedBundle::initialize):
1621         Make sure to decode the bundle parameters before calling out to the bundle.
1622
1623 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1624
1625         [GTK] Add autocleanups
1626         https://bugs.webkit.org/show_bug.cgi?id=149588
1627
1628         Reviewed by Darin Adler.
1629
1630         * PlatformGTK.cmake:
1631         * UIProcess/API/gtk/WebKitAutocleanups.h: Added.
1632         * UIProcess/API/gtk/webkit2.h:
1633         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h: Added.
1634         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1635
1636 2015-10-06  Anders Carlsson  <andersca@apple.com>
1637
1638         Try to fix the 32-bit build.
1639
1640         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1641
1642 2015-10-06  Anders Carlsson  <andersca@apple.com>
1643
1644         WKPage needs to expose a KVO-compliant object, similar to WKWebView
1645         https://bugs.webkit.org/show_bug.cgi?id=149851
1646         rdar://problem/22382022
1647
1648         Reviewed by Dan Bernstein.
1649
1650         Move the PageLoadStateObserver object from WKBrowsingContextController out into a separate file and make it
1651         work with any Objective-C object. Use it in WKObservablePageState and add a WKPageCreateObservableState function.
1652
1653         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1654         * UIProcess/API/C/mac/WKPagePrivateMac.mm: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp.
1655         (-[WKObservablePageState initWithPage:]):
1656         (-[WKObservablePageState dealloc]):
1657         (-[WKObservablePageState isLoading]):
1658         (-[WKObservablePageState title]):
1659         (-[WKObservablePageState URL]):
1660         (-[WKObservablePageState hasOnlySecureContent]):
1661         (-[WKObservablePageState estimatedProgress]):
1662         (WKPageCreateObservableState):
1663         (WKPageGetProcessIdentifier):
1664         (WKPageIsURLKnownHSTSHost):
1665         * UIProcess/API/Cocoa/PageLoadStateObserver.h: Added.
1666         (WebKit::PageLoadStateObserver::PageLoadStateObserver):
1667         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1668         (PageLoadStateObserver::PageLoadStateObserver): Deleted.
1669         * WebKit2.xcodeproj/project.pbxproj:
1670
1671 2015-10-06  Daniel Bates  <dbates@webkit.org>
1672
1673         Enable XSLT when building WebKit for iOS using the public iOS SDK
1674         https://bugs.webkit.org/show_bug.cgi?id=149827
1675
1676         Reviewed by Alexey Proskuryakov.
1677
1678         * Configurations/FeatureDefines.xcconfig:
1679
1680 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
1681
1682         Fix ENABLE_OPENGL=OFF builds
1683         https://bugs.webkit.org/show_bug.cgi?id=146511
1684
1685         Reviewed by Darin Adler.
1686
1687         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1688         (webkitWebViewBaseRealize):
1689         (webkitWebViewBaseDraw):
1690         (webkitWebViewBaseDidRelaunchWebProcess):
1691         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
1692         webkitWebViewRenderAcceleratedCompositingResults()
1693         * UIProcess/DrawingAreaProxyImpl.cpp:
1694         * UIProcess/DrawingAreaProxyImpl.h:
1695         * WebProcess/WebPage/DrawingArea.cpp:
1696         (WebKit::DrawingArea::DrawingArea):
1697         * WebProcess/WebPage/DrawingArea.h:
1698         * WebProcess/WebPage/LayerTreeHost.h:
1699         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
1700         setNativeSurfaceHandleForCompositing().
1701         * UIProcess/gtk/WebPreferencesGtk.cpp:
1702         (WebKit::WebPreferences::platformInitializeStore):
1703         Default to no AC if no GL support has been built.
1704         * WebProcess/WebPage/DrawingArea.messages.in:
1705         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
1706         SetNativeSurfaceHandleForCompositing.
1707         * WebProcess/WebPage/DrawingAreaImpl.h:
1708         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1709         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1710         Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
1711         setNativeSurfaceHandleForCompositing().
1712         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
1713         Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
1714         implementation is available, to avoid crashing when building without
1715         any GL support.
1716
1717 2015-10-06  Csaba Osztrogonác  <ossy@webkit.org>
1718
1719         URTBF after r190611.
1720
1721         * CMakeLists.txt:
1722
1723 2015-10-06  Alex Christensen  <achristensen@webkit.org>
1724
1725         Report error when main resource is blocked by content blocker
1726         https://bugs.webkit.org/show_bug.cgi?id=149719
1727         rdar://problem/21970595
1728
1729         Reviewed by Brady Eidson.
1730
1731         * Shared/API/c/WKErrorRef.h:
1732         * WebProcess/WebCoreSupport/WebErrors.h:
1733         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1734         (WebKit::WebFrameLoaderClient::blockedError):
1735         (WebKit::WebFrameLoaderClient::blockedByContentBlockerError):
1736         (WebKit::WebFrameLoaderClient::cannotShowURLError):
1737         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1738         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1739         (WebKit::blockedError):
1740         (WebKit::blockedByContentBlockerError):
1741         (WebKit::cannotShowURLError):
1742         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1743         (WebKit::blockedError):
1744         (WebKit::blockedByContentBlockerError):
1745         (WebKit::cannotShowURLError):
1746         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1747         (WebKit::blockedError):
1748         (WebKit::blockedByContentBlockerError):
1749         (WebKit::cannotShowURLError):
1750         Make a new error type for loads that were blocked by a content blocker.
1751
1752 2015-10-05  Jer Noble  <jer.noble@apple.com>
1753
1754         [iOS] REGRESSION(r190434): Media continues to play when locking screen
1755         https://bugs.webkit.org/show_bug.cgi?id=149822
1756
1757         Reviewed by Brent Fulgham.
1758
1759         Pass through isSuspendedUnderLock when notifying the WebPage that the
1760         applicationWillEnterForeground, and pass that boolean in the userInfo of the
1761         WebUIApplicationWillEnterForegroundNotification.
1762
1763         * UIProcess/ios/WebPageProxyIOS.mm:
1764         (WebKit::WebPageProxy::applicationWillEnterForeground):
1765         * WebProcess/WebPage/WebPage.h:
1766         * WebProcess/WebPage/WebPage.messages.in:
1767         * WebProcess/WebPage/ios/WebPageIOS.mm:
1768         (WebKit::WebPage::applicationWillEnterForeground):
1769
1770 2015-10-05  Anders Carlsson  <andersca@apple.com>
1771
1772         Get rid of some dead code
1773         https://bugs.webkit.org/show_bug.cgi?id=149825
1774
1775         Reviewed by Tim Horton.
1776
1777         * UIProcess/API/APIUIClient.h:
1778         (API::UIClient::didDraw): Deleted.
1779         * UIProcess/API/C/WKPage.cpp:
1780         (WKPageSetPageUIClient): Deleted.
1781         * UIProcess/WebPageProxy.cpp:
1782         (WebKit::WebPageProxy::didDraw): Deleted.
1783         * UIProcess/WebPageProxy.h:
1784
1785 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
1786
1787         Prospective Mavericks build fix.
1788
1789         Unreviewed.
1790
1791         * UIProcess/API/cpp/WKRetainPtr.h:
1792
1793 2015-10-05  Beth Dakin  <bdakin@apple.com>
1794
1795         Compress snapshots on iOS
1796         https://bugs.webkit.org/show_bug.cgi?id=149814
1797         -and corresponding-
1798         rdar://problem/22976230
1799
1800         Reviewed by Simon Fraser.
1801
1802         Compress the snapshot.
1803         * UIProcess/API/Cocoa/WKWebView.mm:
1804         (-[WKWebView _takeViewSnapshot]):
1805
1806         Since the snapshots are converted to YUV asynchronously, it is possible to 
1807         get here and have a snapshot that does not yet have an image, so we have to 
1808         relax this constraint.
1809         * UIProcess/mac/ViewSnapshotStore.mm:
1810         (WebKit::ViewSnapshotStore::recordSnapshot):
1811
1812 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
1813
1814         Allow WKRetainPtrs to be used as keys in hashing data structures
1815         https://bugs.webkit.org/show_bug.cgi?id=149762
1816
1817         Reviewed by Anders Carlsson.
1818
1819         Use RefPtr as a model.
1820
1821         * UIProcess/API/cpp/WKRetainPtr.h:
1822         (WebKit::WKRetainPtr::WKRetainPtr):
1823         (WebKit::WKRetainPtr::isHashTableDeletedValue):
1824         (WebKit::WKRetainPtr::hashTableDeletedValue):
1825         (WTF::HashTraits<WKRetainPtr<P>>::emptyValue):
1826         (WTF::HashTraits<WKRetainPtr<P>>::peek):
1827
1828 2015-10-05  Enrica Casucci  <enrica@apple.com>
1829
1830         Cannot select certain text on Wikipedia homepage even when zoomed in.
1831         https://bugs.webkit.org/show_bug.cgi?id=149758
1832         rdar://problem/22407947
1833
1834         Reviewed by Dan Bernstein.
1835
1836         Several functions that handle gestures for text selection are used for both
1837         editable and non editable content. When used on editable content, the point
1838         where the gesture occurs needs to be constrained within the boundaries of the
1839         editable element. In the WebProcess we decide whether to constrain the point or not only based
1840         on the presence of the assisted node.
1841         That unfortunately does not guarantee that the user is actually editing the element,
1842         but only that the element is focused. Since the knowledge about the interaction exists reliably
1843         in the UI process, this patch adds a parameter to each gesture handler that tries to clip
1844         the point, to indicate whether the user is actually interacting with the element so that
1845         in the WebProcess the assisted node information can be used to constrain the point.
1846
1847         * UIProcess/WebPageProxy.h:
1848         (WebKit::WebPageProxy::deviceOrientation):
1849         * UIProcess/ios/WKContentViewInteraction.mm:
1850         (-[WKContentView _isInteractingWithAssistedNode]):
1851         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
1852         (-[WKContentView selectPositionAtPoint:completionHandler:]):
1853         (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
1854         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
1855         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
1856         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
1857         * UIProcess/ios/WebPageProxyIOS.mm:
1858         (WebKit::WebPageProxy::selectWithGesture):
1859         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
1860         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
1861         (WebKit::WebPageProxy::selectPositionAtPoint):
1862         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
1863         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
1864         * WebProcess/WebPage/WebPage.h:
1865         * WebProcess/WebPage/WebPage.messages.in:
1866         * WebProcess/WebPage/ios/WebPageIOS.mm:
1867         (WebKit::WebPage::selectWithGesture):
1868         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
1869         (WebKit::WebPage::selectPositionAtPoint):
1870         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
1871         (WebKit::WebPage::rangeForGranularityAtPoint):
1872         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1873         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
1874         (WebKit::WebPage::updateSelectionWithExtentPoint):
1875
1876 2015-10-05  Antti Koivisto  <antti@apple.com>
1877
1878         Remove CancelResourceLoader message
1879         https://bugs.webkit.org/show_bug.cgi?id=149801
1880
1881         Reviewed by Andreas Kling.
1882
1883         It has no clients.
1884
1885         * WebProcess/Network/WebResourceLoader.cpp:
1886         (WebKit::WebResourceLoader::messageSenderDestinationID):
1887         (WebKit::WebResourceLoader::detachFromCoreLoader):
1888         (WebKit::WebResourceLoader::cancelResourceLoader): Deleted.
1889         * WebProcess/Network/WebResourceLoader.h:
1890         * WebProcess/Network/WebResourceLoader.messages.in:
1891
1892 2015-10-03  Ricky Mondello  <rmondello@apple.com>
1893
1894         "Plug-in is blocked" message doesn't draw correctly
1895         https://bugs.webkit.org/show_bug.cgi?id=149741
1896         <rdar://problem/22920949>
1897
1898         Patch by Conrad Shultz and Ricky Mondello.
1899
1900         Reviewed by Anders Carlsson.
1901
1902         If a WebKit client sets plug-in X to not be visible to the web, that doesn't mean we shouldn't consult
1903         that plug-in when determining what kind of object type an object is. Properly classifying a non-web-visible
1904         Netscape plug-in as such allows its bounds to properly measured, allowing it to be drawn properly.
1905
1906         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1907         (WebKit::WebFrameLoaderClient::objectContentType): Use PluginData's supportsMimeType, rather than its
1908             supportsWebVisibleMimeType, when determining the ObjectContentType for a MIME type on a url.
1909
1910 2015-10-02  Enrica Casucci  <enrica@apple.com>
1911
1912         Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org.
1913         https://bugs.webkit.org/show_bug.cgi?id=149756
1914         rdar://problem/22332409
1915
1916         Reviewed by Tim Horton.
1917
1918         When loading a new document into the same WebPage object, we need
1919         to clear the assisted node, since there is no guarantee that the
1920         node will be blurred. The bug is caused by the use of a stale
1921         assisted node to constrain the point where the gesture occurs.
1922         A fix for this problem was landed in http://trac.webkit.org/changeset/179885
1923         where the cleanup was added when FrameLoaderClient::detach2 was called.
1924         This method doesn't seem to be called any longer for the main frame,
1925         so the correct solution is to add the cleanup to didCommitLoad in WebPage.
1926         I've also added some checks to webSelectionsRects and selectedTextRange to avoid
1927         the use of postLayoutData when the selection is none.
1928
1929         * UIProcess/ios/WKContentViewInteraction.mm:
1930         (-[WKContentView webSelectionRects]):
1931         (-[WKContentView selectedTextRange]):
1932         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1933         (WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame.
1934         * WebProcess/WebPage/WebPage.cpp:
1935         (WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame.
1936
1937 2015-10-02  Alex Christensen  <achristensen@webkit.org>
1938
1939         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
1940         https://bugs.webkit.org/show_bug.cgi?id=149430
1941         rdar://problem/22742222
1942
1943         Reviewed by Geoffrey Garen.
1944
1945         * WebProcess/WebPage/WebPage.cpp:
1946         (WebKit::WebPage::createDocumentLoader):
1947         Copy the state of whether content extensions are disabled from the Page to the DocumentLoader
1948         when making a DocumentLoader.
1949
1950 2015-10-02  Antoine Quint  <graouts@apple.com>
1951
1952         popstate is fired at the wrong time on load
1953         https://bugs.webkit.org/show_bug.cgi?id=94265
1954
1955         Reviewed by Darin Adler.
1956
1957         Ensure we have a valid page before trying to get to its drawingArea as this could lead
1958         to a crash as observed with fast/loader/stateobjects/pushstate-object-types.html.
1959
1960         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1961         (WebKit::WebFrameLoaderClient::restoreViewState):
1962
1963 2015-10-01  Antti Koivisto  <antti@apple.com>
1964
1965         Network cache: Subresource referer header wrong after cached redirect
1966         https://bugs.webkit.org/show_bug.cgi?id=149709
1967         rdar://problem/22917174
1968
1969         Reviewed by Chris Dumez.
1970
1971         If a main resource is loaded from a cache entry that involved redirects the document
1972         will end up setting the Referer-headers of the subresources to the request URL not the redirected URL
1973
1974         * NetworkProcess/NetworkResourceLoader.cpp:
1975         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
1976
1977             If a cache entry involved a redirect synthesize a minimal willSendRequest message so that WebCore side
1978             runs through the same code paths as when receiving a redirect from network.
1979
1980 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1981
1982         [GTK] Websites with invalid auth header keep loading forever
1983         https://bugs.webkit.org/show_bug.cgi?id=149710
1984
1985         Reviewed by Martin Robinson.
1986
1987         Do not show the remember credentials checkbutton in the auth
1988         dialog if the realm is empty.
1989
1990         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1991         (webkitAuthenticationDialogInitialize):
1992
1993 2015-09-30  Chris Dumez  <cdumez@apple.com>
1994
1995         Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
1996         <rdar://problem/22560715>
1997
1998         Speculative roll out of r188331 as we had a ~2.5% PLT regression around
1999         the time it landed and it seems the most likely culprit. I'll reland if
2000         the perf bots do not recover after the roll out.
2001
2002         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2003         (WebKit::storageSession): Deleted.
2004         * NetworkProcess/NetworkConnectionToWebProcess.h:
2005         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2006         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2007         (webkitWebExtensionDidReceiveMessage):
2008         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2009         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2010         * WebProcess/WebPage/ios/WebPageIOS.mm:
2011         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2012         * WebProcess/WebProcess.cpp:
2013         * WebProcess/WebProcess.h:
2014
2015 2015-09-30  Timothy Horton  <timothy_horton@apple.com>
2016
2017         Compute document marker rects at use time instead of paint time
2018         https://bugs.webkit.org/show_bug.cgi?id=149643
2019
2020         Reviewed by Darin Adler.
2021
2022         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2023         (WebKit::WebChromeClient::didInvalidateDocumentMarkerRects):
2024         * WebProcess/WebCoreSupport/WebChromeClient.h:
2025         Plumb the notification about invalidated document marker rects through to FindController.
2026
2027         * WebProcess/WebPage/FindController.cpp:
2028         (WebKit::FindController::updateFindUIAfterPageScroll):
2029         Make a document-relative PageOverlay, so that we get fast scrolling.
2030
2031         (WebKit::FindController::rectsForTextMatchesInRect):
2032         Return find hole rects in main-FrameView content coordinates, to 
2033         match the document-relative page overlay.
2034         We'll only return rects that intersect the passed-in rect, which
2035         comes from the dirty rect passed to drawRect.
2036
2037         (WebKit::FindController::drawRect):
2038         Inflate the dirty rect by the border width so that we hit all relevant
2039         markers in each tile. Otherwise, we would end up missing the border of a marker
2040         that touched the edge of a tile.
2041
2042         (WebKit::FindController::didInvalidateDocumentMarkerRects):
2043         Repaint (for now, the entire overlay) when document marker rects change.
2044
2045         * WebProcess/WebPage/FindController.h:
2046
2047 2015-09-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2048
2049         [GTK] Build error with -DENABLE_SPELLCHECK=OFF
2050         https://bugs.webkit.org/show_bug.cgi?id=146904
2051
2052         Reviewed by Carlos Garcia Campos.
2053
2054         Add ifdef guards to allow building when SPELLCHECK is not enabled.
2055
2056         * UIProcess/gtk/TextCheckerGtk.cpp:
2057         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
2058         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
2059         (WebKit::TextChecker::setGrammarCheckingEnabled):
2060         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
2061         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
2062         (WebKit::TextChecker::checkSpellingOfString):
2063         (WebKit::TextChecker::getGuessesForWord):
2064         (WebKit::TextChecker::learnWord):
2065         (WebKit::TextChecker::ignoreWord):
2066         (WebKit::TextChecker::requestCheckingOfString):
2067         (WebKit::TextChecker::checkTextOfParagraph):
2068         (WebKit::TextChecker::setSpellCheckingLanguages):
2069         (WebKit::TextChecker::loadedSpellCheckingLanguages):
2070
2071 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
2072
2073         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
2074         https://bugs.webkit.org/show_bug.cgi?id=141782
2075
2076         Reviewed by Carlos Garcia Campos.
2077
2078         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2079         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2080
2081             Modified to create scaled size of window.
2082
2083         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2084         (WebKit::LayerTreeHostGtk::initialize):
2085         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
2086
2087             We should apply device scale factor to the root layer to apply
2088             the scale matrix before applying other transform matrices.
2089
2090         (WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
2091         (WebKit::LayerTreeHostGtk::pageScaleFactor): Added.
2092
2093 2015-09-29  Daniel Bates  <dabates@apple.com>
2094
2095         Make WebKit for iOS Simulator build with the public iOS 9 SDK
2096         https://bugs.webkit.org/show_bug.cgi?id=149652
2097
2098         Reviewed by Simon Fraser.
2099
2100         * Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
2101         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
2102         * WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
2103
2104 2015-09-29  Brady Eidson  <beidson@apple.com>
2105
2106         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
2107         https://bugs.webkit.org/show_bug.cgi?id=149651
2108
2109         Rubberstamped by Alex Christensen.
2110
2111         * DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
2112         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
2113
2114 2015-09-29  Brady Eidson  <beidson@apple.com>
2115
2116         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
2117         https://bugs.webkit.org/show_bug.cgi?id=149651
2118
2119         Reviewed by Alex Christensen.
2120
2121         * DatabaseProcess/DatabaseProcess.cpp:
2122         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
2123         (WebKit::DatabaseProcess::postDatabaseTask):
2124         (WebKit::DatabaseProcess::performNextDatabaseTask):
2125         (WebKit::DatabaseProcess::fetchWebsiteData):
2126         (WebKit::DatabaseProcess::deleteWebsiteData):
2127         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
2128         * DatabaseProcess/DatabaseProcess.h:
2129         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2130         (WebKit::UniqueIDBDatabase::shutdown):
2131         (WebKit::UniqueIDBDatabase::shutdownBackingStore):
2132         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
2133         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
2134         (WebKit::UniqueIDBDatabase::openTransaction):
2135         (WebKit::UniqueIDBDatabase::beginTransaction):
2136         (WebKit::UniqueIDBDatabase::commitTransaction):
2137         (WebKit::UniqueIDBDatabase::resetTransaction):
2138         (WebKit::UniqueIDBDatabase::rollbackTransaction):
2139         (WebKit::UniqueIDBDatabase::postTransactionOperation):
2140         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
2141         (WebKit::UniqueIDBDatabase::createObjectStore):
2142         (WebKit::UniqueIDBDatabase::deleteObjectStore):
2143         (WebKit::UniqueIDBDatabase::clearObjectStore):
2144         (WebKit::UniqueIDBDatabase::createIndex):
2145         (WebKit::UniqueIDBDatabase::deleteIndex):
2146         (WebKit::UniqueIDBDatabase::putRecord):
2147         (WebKit::UniqueIDBDatabase::getRecord):
2148         (WebKit::UniqueIDBDatabase::openCursor):
2149         (WebKit::UniqueIDBDatabase::cursorAdvance):
2150         (WebKit::UniqueIDBDatabase::cursorIterate):
2151         (WebKit::UniqueIDBDatabase::count):
2152         (WebKit::UniqueIDBDatabase::deleteRange):
2153         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
2154         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
2155         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
2156         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
2157         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
2158         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
2159         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
2160         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
2161         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
2162         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
2163         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
2164         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
2165         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
2166         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
2167         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
2168         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
2169         (WebKit::UniqueIDBDatabase::countInBackingStore):
2170         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
2171         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2172         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2173         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2174         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2175         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2176         * WebKit2.xcodeproj/project.pbxproj:
2177
2178 2015-09-29  Chris Dumez  <cdumez@apple.com>
2179
2180         Memory cache revalidations should refresh the network disk cache
2181         https://bugs.webkit.org/show_bug.cgi?id=149606
2182
2183         Reviewed by Darin Adler.
2184
2185         Previously, resource revalidations triggered by the memory cache would
2186         bypass the disk cache entirely because the requests are conditional. As
2187         a result, when the server responds with a 304, we were unable to update
2188         the headers (e.g. new expiration date) of the corresponding entry in
2189         the disk cache.
2190
2191         This patch updates our disk cache implementation to not bypass the disk
2192         cache when the request is conditional. Instead, we look up the cached
2193         entry and force its revalidation from the network. If the server then
2194         returns a 304, we are now able to update the headers of this cached
2195         entry. In such case though, we let the 304 response through to WebCore
2196         unlike revalidations triggered by the disk cache.
2197
2198         * NetworkProcess/NetworkResourceLoader.cpp:
2199         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2200         * NetworkProcess/cache/NetworkCache.cpp:
2201         (WebKit::NetworkCache::makeUseDecision):
2202         (WebKit::NetworkCache::makeRetrieveDecision):
2203
2204 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2205
2206         printing does not use minimum page zoom factor
2207         https://bugs.webkit.org/show_bug.cgi?id=108507
2208
2209         Reviewed by Darin Adler.
2210
2211         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
2212         should be generated in printing mode.
2213
2214         * Shared/API/c/WKImage.h:
2215         * Shared/API/c/WKSharedAPICast.h:
2216         (WebKit::toSnapshotOptions):
2217         * Shared/ImageOptions.h:
2218         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2219         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
2220         reference instead of a pointer.
2221         * WebProcess/WebPage/WebPage.cpp:
2222         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
2223         calculate the bitmap height based on the number of pages.
2224         (WebKit::WebPage::snapshotAtSize): In case of printing, use
2225         PrintContext::spoolAllPagesWithBoundaries() and return.
2226
2227 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2228
2229         Expose 'geometryFlipped' state for debugging/logging purposes
2230         https://bugs.webkit.org/show_bug.cgi?id=149557
2231
2232         Reviewed by Simon Fraser.
2233
2234         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2235         (WebKit::PlatformCALayerRemote::geometryFlipped): Added.
2236         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2237
2238 2015-09-28  Brady Eidson  <beidson@apple.com>
2239
2240         Add an IDB Server that can roundtrip a request back to the client.
2241         https://bugs.webkit.org/show_bug.cgi?id=149603
2242
2243         Reviewed by Alex Christensen.
2244
2245         * WebProcess/Databases/WebDatabaseProvider.h:
2246
2247 2015-09-28  Beth Dakin  <bdakin@apple.com>
2248
2249         Heavy taps on links are sometimes interpreted as the preview gesture
2250         https://bugs.webkit.org/show_bug.cgi?id=149304
2251         -and corresponding-
2252         rdar://problem/22689258
2253
2254         Rubber-stamped by Tim Horton.
2255
2256         Rolling out this patch. We should try to fix this at the UIKit-level.
2257         * UIProcess/ios/WKContentViewInteraction.h:
2258         * UIProcess/ios/WKContentViewInteraction.mm:
2259         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2260         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
2261
2262 2015-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2263
2264         Expose a WKWebView API for allowing programmatic focus to trigger node assistance
2265         https://bugs.webkit.org/show_bug.cgi?id=149567
2266
2267         Reviewed by Darin Adler.
2268
2269         Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
2270         starting node assistance when programmatically focusing. Also fixes a bug caused by naively
2271         introducing the flag where the autofocus attribute could trigger node assistance before layout
2272         occurs, causing an ASSERT to fail in EditorState::postLayoutData.
2273
2274         I fixed this issue by not assisting the node if the editor state is missing post layout data,
2275         instead deferring node assistance until layout has occurred.
2276
2277         * UIProcess/API/Cocoa/WKWebView.h:
2278         * UIProcess/API/Cocoa/WKWebView.mm:
2279         (-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
2280             is the current default behavior.
2281         (-[WKWebView canAssistOnProgrammaticFocus]):
2282         (-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
2283             assistance behavior upon programmatic focus.
2284         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2285         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2286         (-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
2287         (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
2288         (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
2289         * UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
2290         * UIProcess/ios/WKContentViewInteraction.mm:
2291         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
2292             early if the node assistance flag is set to allow programmatic focus.
2293         * UIProcess/ios/WebPageProxyIOS.mm:
2294         (WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
2295             starting node assistance, immediately trigger node assistance.
2296         (WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
2297         (WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.
2298
2299 2015-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2300
2301         REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
2302         https://bugs.webkit.org/show_bug.cgi?id=148569
2303
2304         Reviewed by Darin Adler.
2305
2306         * PlatformGTK.cmake: Add missing inspector files required for
2307         layout tests.
2308
2309 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
2310
2311         Clean up user media request internal API
2312         https://bugs.webkit.org/show_bug.cgi?id=149527
2313
2314         Reviewed by Tim Horton.
2315
2316         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
2317         (WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
2318         (WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
2319         (WKUserMediaPermissionRequestAllowBest): Deleted.
2320         (WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
2321         (WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
2322         (WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
2323         (WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
2324         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
2325
2326         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
2327         (webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
2328
2329         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2330         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
2331           Switch audio/video parameter order to be consistent with everywhere else.
2332         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
2333         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2334
2335         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2336         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
2337           Switch audio/video parameter order to be consistent with everywhere else.
2338         (WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
2339         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
2340         * UIProcess/UserMediaPermissionRequestProxy.h:
2341         (WebKit::UserMediaPermissionRequestProxy::create):
2342         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
2343         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
2344         (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
2345         (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
2346         (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
2347
2348         * UIProcess/WebPageProxy.cpp:
2349         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
2350           Switch audio/video parameter order to be consistent with everywhere else.
2351         * UIProcess/WebPageProxy.h: Ditto.
2352         * UIProcess/WebPageProxy.messages.in: Ditto.
2353
2354         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2355         (WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
2356           vectors have the same information.
2357         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
2358           parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
2359         deviceUIDAudio -> audioDeviceUID.
2360         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2361
2362         * WebProcess/WebPage/WebPage.cpp:
2363         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
2364         * WebProcess/WebPage/WebPage.h:
2365
2366 2015-09-25  Simon Fraser  <simon.fraser@apple.com>
2367
2368         [iOS WK2] Add viewport tests and fix runUIScript() timing issues
2369         https://bugs.webkit.org/show_bug.cgi?id=149577
2370
2371         Reviewed by Tim Horton.
2372         
2373         When calling testRunner.runUIScript() from a page load event, the script could run
2374         in the UI process before the current remote layer tree transaction had been handled
2375         there. This meant that runUIScript() could query state which was about to change.
2376         
2377         Fix by delaying the execution of the UI script until a layer tree transaction has
2378         been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
2379         
2380         This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
2381         which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.
2382         
2383         Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
2384         that this will grow significantly.
2385
2386         * UIProcess/API/C/WKPage.cpp:
2387         (WKPageCallAfterNextPresentationUpdate):
2388         * UIProcess/API/C/WKPagePrivate.h:
2389         * UIProcess/API/Cocoa/WKWebView.mm:
2390         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2391         * UIProcess/WebPageProxy.cpp:
2392         (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
2393         * UIProcess/WebPageProxy.h:
2394         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2395         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2396         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2397
2398 2015-09-25  Alexey Proskuryakov  <ap@apple.com>
2399
2400         [Mac] Media tests start to time out after a few days of bot uptime
2401         https://bugs.webkit.org/show_bug.cgi?id=149468
2402
2403         Reviewed by Darin Adler.
2404
2405         Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.
2406
2407         When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
2408         This means that during testing, WebContent uses a temporary directory of the form
2409         /private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
2410         instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.
2411
2412         WebKit1 now also better respects a temporary directory of the form
2413         /private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
2414         makes CoreMedia put its cache inside it.
2415
2416         As a result, almost everything is isolated per testing process, and deleted at the end.
2417         Same with cache directories. The only outliers that I know of are plug-in directories,
2418         which are per-process, but are not under the testing root, and thus aren't deleted.
2419
2420         * PluginProcess/mac/PluginProcessMac.mm:
2421         (WebKit::PluginProcess::initializeSandbox):
2422         * Shared/ChildProcessProxy.cpp:
2423         (WebKit::ChildProcessProxy::fromConnection):
2424         (WebKit::ChildProcessProxy::getLaunchOptions):
2425         (WebKit::ChildProcessProxy::connect):
2426         * Shared/ChildProcessProxy.h:
2427         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2428         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
2429         * Shared/SandboxInitializationParameters.h:
2430         (WebKit::SandboxInitializationParameters::sandboxProfile):
2431         (WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
2432         (WebKit::SandboxInitializationParameters::userDirectorySuffix):
2433         (WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
2434         (WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
2435         * Shared/ios/ChildProcessIOS.mm:
2436         (WebKit::ChildProcess::initializeSandbox):
2437         * Shared/mac/ChildProcessMac.mm:
2438         (WebKit::ChildProcess::initializeSandbox):
2439         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2440         (WebKit::DatabaseProcessProxy::getLaunchOptions):
2441         * UIProcess/Network/NetworkProcessProxy.cpp:
2442         (WebKit::NetworkProcessProxy::getLaunchOptions):
2443         * UIProcess/Plugins/PluginProcessProxy.cpp:
2444         (WebKit::PluginProcessProxy::getLaunchOptions):
2445         * UIProcess/WebProcessProxy.cpp:
2446         (WebKit::WebProcessProxy::getLaunchOptions):
2447
2448 2015-09-25  Beth Dakin  <bdakin@apple.com>
2449
2450         Clicking on a data detected item inside a form control always pops up a map 
2451         on force touch trackpad
2452         https://bugs.webkit.org/show_bug.cgi?id=149559
2453         -and corresponding-
2454         rdar://problem/22826796
2455
2456         Reviewed by Tim Horton.
2457
2458         Look for Data Detected text for text nodes and HitTestResults that are over 
2459         text inside form controls.
2460
2461         * WebProcess/WebPage/mac/WebPageMac.mm:
2462         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
2463
2464 2015-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2465
2466         [GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
2467         https://bugs.webkit.org/show_bug.cgi?id=148956
2468
2469         Reviewed by Žan Doberšek.
2470
2471         This is because those tests call notifyDone in the onresize event
2472         handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
2473         before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
2474         is called, so if the size has changed the FrameView::resize()
2475         method is called and all children are resized, so the onresize
2476         handlers happen at that point, before the
2477         m_inUpdateBackingStoreState is set to false again. For WTR we
2478         could probably just return early from froceReapaint() when
2479         m_inUpdateBackingStoreState is true, because in that case we know
2480         the layout is updated because of the resize and the actual display
2481         is not really needed. But the UI process can also request a force
2482         repaint, so we could wait until the backing store update is done
2483         and then force the repaint. For WTR it will happen after the
2484         dump, but it shouldn't be a problem.
2485
2486         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2487         (WebKit::DrawingAreaImpl::forceRepaint):
2488         (WebKit::DrawingAreaImpl::updateBackingStoreState):
2489         * WebProcess/WebPage/DrawingAreaImpl.h:
2490
2491 2015-09-24  Tim Horton  <timothy_horton@apple.com>
2492
2493         Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
2494         https://bugs.webkit.org/show_bug.cgi?id=149543
2495
2496         Reviewed by Beth Dakin.
2497
2498         * WebProcess/WebPage/FindController.cpp:
2499         (WebKit::FindController::rectsForTextMatches):
2500         Don't add empty rects to the list. Later code will just inflate them
2501         and end up drawing a nonsensical find hole.
2502
2503 2015-09-24  Chris Dumez  <cdumez@apple.com>
2504
2505         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
2506         https://bugs.webkit.org/show_bug.cgi?id=149532
2507
2508         Reviewed by Ryosuke Niwa.
2509
2510         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
2511         no way to construct such Node in WebKit. This avoid having to handle this
2512         Node type everywhere.
2513
2514         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2515         (WebKit::WKDOMNodeClass): Deleted.
2516
2517 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
2518
2519         Ran sort-Xcode-project-file.
2520
2521         * WebKit2.xcodeproj/project.pbxproj:
2522
2523 2015-09-23  Timothy Horton  <timothy_horton@apple.com>
2524
2525         Link highlight rect is too rounded on blocks with border-radius
2526         https://bugs.webkit.org/show_bug.cgi?id=149511
2527
2528         Reviewed by Dan Bernstein.
2529
2530         * UIProcess/ios/WKContentViewInteraction.mm:
2531         (nsSizeForTapHighlightBorderRadius):
2532         (-[WKContentView _updateTapHighlight]):
2533         Scale the border radius from content to view coordinates, just like
2534         we do for the rects that WebKit returns us.
2535
2536 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2537
2538         Add a file of pointer-lock to cmake ports
2539         https://bugs.webkit.org/show_bug.cgi?id=149453
2540
2541         Reviewed by Csaba Osztrogonác.
2542
2543         * WebProcess/WebPage/WebPage.cpp:
2544         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.
2545
2546 2015-09-22  Anders Carlsson  <andersca@apple.com>
2547
2548         URL of page visited in private browsing still appears in Activity Monitor after page is closed
2549         https://bugs.webkit.org/show_bug.cgi?id=149475
2550         rdar://problem/22684521
2551
2552         Reviewed by Dan Bernstein.
2553
2554         * WebProcess/WebPage/WebPage.cpp:
2555         (WebKit::WebPage::close):
2556         Make sure to call updateActivePages after removing the page from the page map.
2557
2558         * WebProcess/cocoa/WebProcessCocoa.mm:
2559         (WebKit::WebProcess::updateActivePages):
2560         Don't include pages that have private browsing enabled.
2561
2562 2015-09-22  Tim Horton  <timothy_horton@apple.com>
2563
2564         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
2565         https://bugs.webkit.org/show_bug.cgi?id=149428
2566
2567         Reviewed by Simon Fraser and Darin Adler.
2568
2569         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
2570         (WebKit::ThreadSafeCoordinatedSurface::create):
2571
2572 2015-09-22  Andreas Kling  <akling@apple.com>
2573
2574         [WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
2575         <https://webkit.org/b/149463>
2576
2577         Reviewed by Antti Koivisto.
2578
2579         Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
2580         memory-mapped file. This turns the previously dirty memory into clean memory,
2581         reducing our effective footprint.
2582
2583         I previously believed this would happen automatically when the kernel finds
2584         itself under memory pressure, around the same time as it starts dropping
2585         volatile pages. Turns out that's not the case. Even under considerable pressure,
2586         we never flush this memory to file. So let's take care of it ourselves.
2587
2588         If this ends up generating more IO activity than we're comfortable with on some
2589         scenario, we can look at throttling.
2590
2591         * NetworkProcess/cache/NetworkCacheData.cpp:
2592         (WebKit::NetworkCache::Data::mapToFile):
2593
2594 2015-09-22  Chris Dumez  <cdumez@apple.com>
2595
2596         Drop support for legacy EntityReference DOM Node type
2597         https://bugs.webkit.org/show_bug.cgi?id=149348
2598
2599         Reviewed by Darin Adler.
2600
2601         Drop handling EntityReference Nodes.
2602
2603         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2604         (WebKit::WKDOMNodeClass): Deleted.
2605         * WebProcess/WebPage/ios/WebPageIOS.mm:
2606         (WebKit::isAssistableElement):
2607
2608 2015-09-22  Commit Queue  <commit-queue@webkit.org>
2609
2610         Unreviewed, rolling out r189616.
2611         https://bugs.webkit.org/show_bug.cgi?id=149456
2612
2613         suspected cause of multiple regressions (Requested by kling on
2614         #webkit).
2615
2616         Reverted changeset:
2617
2618         "[JSC] Weak should only accept cell pointees."
2619         https://bugs.webkit.org/show_bug.cgi?id=148955
2620         http://trac.webkit.org/changeset/189616
2621
2622 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
2623
2624         Allow DataDetectors to pre-filter telephone number menu items
2625         https://bugs.webkit.org/show_bug.cgi?id=149444
2626         <rdar://problem/19286320>
2627
2628         Reviewed by Sam Weinig.
2629
2630         * Platform/mac/MenuUtilities.mm:
2631         (WebKit::menuItemForTelephoneNumber):
2632         (WebKit::menuForTelephoneNumber):
2633         Let DataDetectors know what kind of items we want, so that they can avoid
2634         some unnecessary work in cases where we were just going to throw away the items anyway.
2635
2636 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
2637
2638         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
2639         https://bugs.webkit.org/show_bug.cgi?id=149399
2640
2641         Reviewed by Darin Adler.
2642
2643         This fixes build failure after r189144
2644
2645         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
2646         (WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
2647         (WebKit::ThreadSafeCoordinatedSurface::beginPaint):
2648         (WebKit::ThreadSafeCoordinatedSurface::endPaint):
2649         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
2650
2651 2015-09-21  Simon Fraser  <simon.fraser@apple.com>
2652
2653         Add the ability for tests to run script in the UI process in WebKitTestRunner
2654         https://bugs.webkit.org/show_bug.cgi?id=149356
2655
2656         Reviewed by Tim Horton.
2657
2658         Expose a few private functions for testing.
2659
2660         * UIProcess/API/Cocoa/WKWebView.mm:
2661         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2662
2663 2015-09-21  Tim Horton  <timothy_horton@apple.com>
2664
2665         Layout milestones aren't synchronized with UI-side compositing transactions
2666         https://bugs.webkit.org/show_bug.cgi?id=149362
2667
2668         Reviewed by Anders Carlsson.
2669         
2670         Because layout milestones are primarily used to synchronize things with
2671         the displayed layout/rendering of the page, they should fire at the same
2672         time as the contents of the view change.
2673
2674         However, with UI-side compositing, the layer tree transaction will
2675         most likely come in *after* the layout milestones associated with its
2676         contents fire, breaking this synchronization.
2677
2678         Instead, put the layout milestones inside the transaction and fire them
2679         immediately after it is committed in the UI process.
2680
2681         * Shared/mac/RemoteLayerTreeTransaction.h:
2682         (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
2683         (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
2684         (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
2685         * Shared/mac/RemoteLayerTreeTransaction.mm:
2686         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
2687         (WebKit::RemoteLayerTreeTransaction::encode):
2688         (WebKit::RemoteLayerTreeTransaction::decode):
2689         Add LayoutMilestones to the transaction.
2690
2691         * UIProcess/API/APILoaderClient.h:
2692         (API::LoaderClient::didLayout):
2693         * UIProcess/API/APINavigationClient.h:
2694         (API::NavigationClient::renderingProgressDidChange):
2695         * UIProcess/API/C/WKPage.cpp:
2696         (WKPageSetPageLoaderClient):
2697         (WKPageSetPageNavigationClient):
2698         * UIProcess/Cocoa/NavigationState.h:
2699         * UIProcess/Cocoa/NavigationState.mm:
2700         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
2701         * UIProcess/WebPageProxy.messages.in:
2702         * UIProcess/ios/WebPageProxyIOS.mm:
2703         (WebKit::WebPageProxy::didCommitLayerTree):
2704         Remove the UserData parameter from didLayout/renderingProgressDidChange,
2705         except for at the API level where we'll always pass null.
2706         Nobody uses UserData on didLayout, and we'll assert if any client sets it
2707         (and it won't get passed through to the UI process).
2708
2709         * UIProcess/WebPageProxy.cpp:
2710         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2711         Just call didLayout with the relevant milestones instead of reimplementing it.
2712
2713         (WebKit::WebPageProxy::didLayout):
2714         * UIProcess/WebPageProxy.h:
2715         Make didLayout public.
2716
2717         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2718         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2719         Let WebPage handle dispatching didLayout.
2720
2721         * WebProcess/WebPage/WebPage.cpp:
2722         (WebKit::WebPage::dispatchDidLayout):
2723         * WebProcess/WebPage/WebPage.h:
2724         Let the DrawingArea handle dispatching didLayout.
2725         If it doesn't want to handle it, we'll just do the normal thing
2726         and dispatch an async message.
2727
2728         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2729         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2730         If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
2731
2732         * WebProcess/WebPage/DrawingArea.h:
2733         (WebKit::DrawingArea::dispatchDidLayout):
2734         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2735         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2736         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2737         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
2738         Queue up milestones as we reach them, and send them in the transaction.
2739
2740 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2741
2742         Remove XHR_TIMEOUT compilation guard
2743         https://bugs.webkit.org/show_bug.cgi?id=149260
2744
2745         Reviewed by Benjamin Poulain.
2746
2747         * Configurations/FeatureDefines.xcconfig:
2748
2749 2015-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2750
2751         [GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
2752         https://bugs.webkit.org/show_bug.cgi?id=149375
2753
2754         Reviewed by Darin Adler.
2755
2756         WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
2757         since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.
2758
2759         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2760         (WebKit::WebEditorClient::supportsGlobalSelection):
2761
2762 2015-09-19  Dan Bernstein  <mitz@apple.com>
2763
2764         Attempted build fix.
2765
2766         * mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.
2767
2768 2015-09-18  Commit Queue  <commit-queue@webkit.org>
2769
2770         Unreviewed, rolling out r189908.
2771         https://bugs.webkit.org/show_bug.cgi?id=149368
2772
2773         Broke run-webkit-tests --pixel (Requested by ap on #webkit).
2774
2775         Reverted changeset:
2776
2777         "printing does not use minimum page zoom factor"
2778         https://bugs.webkit.org/show_bug.cgi?id=108507
2779         http://trac.webkit.org/changeset/189908
2780
2781 2015-09-18  Andy Estes  <aestes@apple.com>
2782
2783         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
2784         https://bugs.webkit.org/show_bug.cgi?id=149360
2785
2786         Reviewed by Tim Horton.
2787
2788         * UIProcess/ios/WebPageProxyIOS.mm:
2789         (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame): Called on m_navigationDelegate if non-null.
2790         (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): Ditto.
2791
2792 2015-09-18  Beth Dakin  <bdakin@apple.com>
2793
2794         Snapshots broken on iOS
2795         https://bugs.webkit.org/show_bug.cgi?id=149354
2796
2797         Reviewed by Tim Horton.
2798
2799         We need to send the IOSurface to ViewSnapshot::create() for this to work.
2800         * UIProcess/API/Cocoa/WKWebView.mm:
2801         (-[WKWebView _takeViewSnapshot]):
2802
2803 2015-09-18  Chris Dumez  <cdumez@apple.com>
2804
2805         Drop support for Entity Node type
2806         https://bugs.webkit.org/show_bug.cgi?id=149239
2807
2808         Reviewed by Darin Adler.
2809
2810         Stop handling the Entity node type.
2811
2812         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2813
2814 2015-09-17  Brian Burg  <bburg@apple.com>
2815
2816         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
2817         https://bugs.webkit.org/show_bug.cgi?id=149006
2818         <rdar://problem/22654257>
2819         <rdar://problem/22631369>
2820
2821         Reviewed by Joseph Pecoraro.
2822
2823         Stop using InspectorController to close the frontend page. Go through
2824         the FrontendClient instead. Reduce redundant code paths.
2825
2826         This change seems to fix some recent crashes that were seen when
2827         closing Safari with Web Inspector open. These were caused by the frontend
2828         channel not being disconnected at the right time.
2829
2830         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2831         (WebKit::WebInspectorClient::inspectedPageDestroyed):
2832         (WebKit::WebInspectorClient::closeLocalFrontend): Deleted.
2833         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2834         * WebProcess/WebPage/WebInspector.cpp:
2835         (WebKit::WebInspector::close):
2836         * WebProcess/WebPage/WebInspectorUI.cpp:
2837         (WebKit::WebInspectorUI::establishConnection):
2838
2839             Save a pointer to the frontend's InspectorController since we may
2840             need to use it while the page is being destructed and its getter
2841             is no longer accessible.
2842
2843         (WebKit::WebInspectorUI::closeWindow):
2844
2845             Explicitly remove the frontend client when closing the frontend.
2846
2847         * WebProcess/WebPage/WebInspectorUI.h:
2848         * WebProcess/WebPage/WebPage.cpp:
2849         (WebKit::WebPage::inspector):
2850
2851             Allow clients to specify whether an inspector should be eagerly created.
2852             Without this, we may accidentally create an instance during teardown.
2853
2854         * WebProcess/WebPage/WebPage.h:
2855
2856 2015-09-18  Emanuele Aina  <emanuele.aina@collabora.com>
2857
2858         Fix build with --no-indexed-database after r189831
2859         https://bugs.webkit.org/show_bug.cgi?id=149342
2860
2861         Reviewed by Csaba Osztrogonác.
2862
2863         * WebProcess/Databases/WebDatabaseProvider.h:
2864         Add ENABLE(INDEXED_DATABASE) guard around supportsModernIDB().
2865
2866 2015-09-17  Beth Dakin  <bdakin@apple.com>
2867
2868         Heavy taps on links are sometimes interpreted as the preview gesture
2869         https://bugs.webkit.org/show_bug.cgi?id=149304
2870         -and corresponding-
2871         rdar://problem/22689258
2872
2873         Reviewed by Tim Horton.
2874
2875         If the preview gesture starts and stop and less than 250 milliseconds have 
2876         passed, then call _attemptClickAtLocation to treat it as a normal tap.
2877         * UIProcess/ios/WKContentViewInteraction.h:
2878         * UIProcess/ios/WKContentViewInteraction.mm:
2879         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2880         (-[WKContentView _interactionStartedFromPreviewItemController:]):
2881         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
2882
2883 2015-09-17  Tim Horton  <timothy_horton@apple.com>
2884
2885         After restoring tabs, swipes back to fast loading pages hang for 3 seconds
2886         https://bugs.webkit.org/show_bug.cgi?id=148764
2887         <rdar://problem/22568860>
2888
2889         Reviewed by Beth Dakin.
2890
2891         * UIProcess/mac/ViewGestureControllerMac.mm:
2892         (WebKit::ViewGestureController::endSwipeGesture):
2893         Don't wait for the render tree size threshold if we don't have one.
2894
2895 2015-09-17  Timothy Horton  <timothy_horton@apple.com>
2896
2897         REGRESSION (r189287): 2.5% PLT regression
2898         https://bugs.webkit.org/show_bug.cgi?id=149277
2899         <rdar://problem/22657219>
2900
2901         Reviewed by Anders Carlsson.
2902
2903         * UIProcess/API/mac/WKView.mm:
2904         (-[WKView _takeViewSnapshot]):
2905         Don't take an extra unused snapshot.
2906
2907 2015-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2908
2909         [GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
2910         https://bugs.webkit.org/show_bug.cgi?id=147453
2911
2912         Reviewed by Carlos Garcia Campos.
2913
2914         Except when running on X11, this function always crashes if called before the web view is
2915         realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
2916         simply realizing the widget before calling that.
2917
2918         Thanks to Carlos Garnacho for some debugging help.
2919
2920         * UIProcess/cairo/BackingStoreCairo.cpp:
2921         (WebKit::BackingStore::createBackend):
2922
2923 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2924
2925         printing does not use minimum page zoom factor
2926         https://bugs.webkit.org/show_bug.cgi?id=108507
2927
2928         Reviewed by Darin Adler.
2929
2930         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
2931         should be generated in printing mode.
2932
2933         * Shared/API/c/WKImage.h:
2934         * Shared/API/c/WKSharedAPICast.h:
2935         (WebKit::toSnapshotOptions):
2936         * Shared/ImageOptions.h:
2937         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2938         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
2939         reference instead of a pointer.
2940         * WebProcess/WebPage/WebPage.cpp:
2941         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
2942         calculate the bitmap height based on the number of pages.
2943         (WebKit::WebPage::snapshotAtSize): In case of printing, use
2944         PrintContext::spoolAllPagesWithBoundaries() and return.
2945
2946 2015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
2947
2948         Web Inspector: Fix common typo "supress" => "suppress"
2949         https://bugs.webkit.org/show_bug.cgi?id=149199
2950
2951         Reviewed by Gyuyoung Kim.
2952
2953         * PluginProcess/mac/PluginProcessMac.mm:
2954         (WebKit::PluginProcess::platformInitializeProcess):
2955
2956 2015-09-16  Dan Bernstein  <mitz@apple.com>
2957
2958         [iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
2959         https://bugs.webkit.org/show_bug.cgi?id=149224
2960
2961         Reviewed by Tim Horton.
2962
2963         * Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method.
2964         * UIProcess/WKImagePreviewViewController.mm:
2965         (-[WKImagePreviewViewController previewActions]): Moved here.
2966
2967 2015-09-16  Alexey Proskuryakov  <ap@apple.com>
2968
2969         [Mac] Allow reading from SubmitDiagInfo.domains in Networking process
2970         https://bugs.webkit.org/show_bug.cgi?id=149176
2971         rdar://problem/22483680
2972
2973         Reviewed by Darin Adler.
2974
2975         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2976
2977 2015-09-16  Dan Bernstein  <mitz@apple.com>
2978
2979         [iOS] Unifiy WebKit2PlatformTouchPoint definition
2980         https://bugs.webkit.org/show_bug.cgi?id=149221
2981
2982         Reviewed by Darin Adler.
2983
2984         * Shared/WebEventConversion.cpp:
2985         (WebKit::touchEventType):
2986         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
2987
2988 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2989
2990         [GTK] Web Process crash recovery no longer works
2991         https://bugs.webkit.org/show_bug.cgi?id=149064
2992
2993         Reviewed by Žan Doberšek.
2994
2995         After a web process crash the new DrawingArea is never resized, so
2996         nothing is rendered into the web view.
2997
2998         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2999         (webkitWebViewBaseDidRelaunchWebProcess): Queue a widget resize to ensure
3000         the new DrawingAreaProxy is resized.
3001
3002 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
3003
3004         Add ShadowRoot interface and Element.prototype.attachShadow
3005         https://bugs.webkit.org/show_bug.cgi?id=149187
3006
3007         Reviewed by Antti Koivisto.
3008
3009         * Configurations/FeatureDefines.xcconfig:
3010
3011 2015-09-15  Brady Eidson  <beidson@apple.com>
3012
3013         Add empty IDBFactory implementation for Modern IDB.
3014         https://bugs.webkit.org/show_bug.cgi?id=149191
3015
3016         Reviewed by Jer Noble.
3017
3018         * WebProcess/Databases/WebDatabaseProvider.h:
3019
3020 2015-09-15  Brady Eidson  <beidson@apple.com>
3021
3022         Move most IDB object encoding/decoding from WebKit2 to WebCore.
3023         https://bugs.webkit.org/show_bug.cgi?id=149152
3024
3025         Reviewed by Alex Christensen.
3026
3027         * Shared/WebCoreArgumentCoders.cpp:
3028         (IPC::ArgumentCoder<IDBDatabaseMetadata>::encode): Deleted.
3029         (IPC::ArgumentCoder<IDBDatabaseMetadata>::decode): Deleted.
3030         (IPC::ArgumentCoder<IDBIndexMetadata>::encode): Deleted.
3031         (IPC::ArgumentCoder<IDBIndexMetadata>::decode): Deleted.
3032         (IPC::ArgumentCoder<IDBKeyData>::encode): Deleted.
3033         (IPC::ArgumentCoder<IDBKeyData>::decode): Deleted.
3034         (IPC::ArgumentCoder<IDBKeyPath>::encode): Deleted.
3035         (IPC::ArgumentCoder<IDBKeyPath>::decode): Deleted.
3036         (IPC::ArgumentCoder<IDBKeyRangeData>::encode): Deleted.
3037         (IPC::ArgumentCoder<IDBKeyRangeData>::decode): Deleted.
3038         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::encode): Deleted.
3039         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::decode): Deleted.
3040         * Shared/WebCoreArgumentCoders.h:
3041
3042 2015-09-14  Brady Eidson  <beidson@apple.com>
3043
3044         Make the enum IDBKey::Type into a utility enum class.
3045         https://bugs.webkit.org/show_bug.cgi?id=149149
3046
3047         Reviewed by Alex Christensen.
3048
3049         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3050         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
3051
3052         * Shared/WebCoreArgumentCoders.cpp:
3053         (IPC::ArgumentCoder<IDBKeyData>::encode):
3054         (IPC::ArgumentCoder<IDBKeyData>::decode):
3055
3056 2015-09-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3057
3058         WKWebView scroll deceleration rate is not being set properly
3059         https://bugs.webkit.org/show_bug.cgi?id=149145
3060         <rdar://problem/22064071>
3061
3062         Reviewed by Simon Fraser.
3063
3064         We are not currently setting the web view's deceleration rate to the correct preferred value because we
3065         are setting the decelerationRate property of the scrollView, which snaps input values to the closer of
3066         two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal.
3067         To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred
3068         value.
3069
3070         * UIProcess/API/Cocoa/WKWebView.mm: 
3071         (-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without
3072                 going through the decelerationRate property.
3073
3074 2015-09-14  Dan Bernstein  <mitz@apple.com>
3075
3076         Consolidate touch event code dealing with force.
3077
3078         Reviewed by Beth Dakin.
3079
3080         * Shared/WebEvent.h:
3081         (WebKit::WebPlatformTouchPoint::state):
3082         (WebKit::WebPlatformTouchPoint::setForce):
3083         (WebKit::WebPlatformTouchPoint::force):
3084         * Shared/ios/NativeWebTouchEventIOS.mm:
3085         (WebKit::positionForCGPoint):
3086         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
3087         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
3088         * Shared/ios/WebPlatformTouchPointIOS.cpp:
3089         (WebKit::WebPlatformTouchPoint::encode):
3090         (WebKit::WebPlatformTouchPoint::decode):
3091
3092 2015-09-14  Alex Christensen  <achristensen@webkit.org>
3093
3094         Progress towards CMake on Mac.
3095         https://bugs.webkit.org/show_bug.cgi?id=149123
3096
3097         Reviewed by Chris Dumez.
3098
3099         * PlatformMac.cmake:
3100         Added some more sources.
3101
3102 2015-09-14  Dan Bernstein  <mitz@apple.com>
3103
3104         [iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
3105         https://bugs.webkit.org/show_bug.cgi?id=149127
3106
3107         Reviewed by Beth Dakin.
3108
3109         * Platform/spi/ios/UIKitSPI.h:
3110         * UIProcess/ios/WKContentViewInteraction.mm:
3111         (-[WKContentView setupInteraction]):
3112
3113 2015-09-14  Brady Eidson  <beidson@apple.com>
3114
3115         Rename current concrete IDB implementation to "Legacy".
3116         https://bugs.webkit.org/show_bug.cgi?id=149118
3117
3118         Reviewed by Alex Christensen.
3119
3120         * CMakeLists.txt:
3121
3122 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3123
3124         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
3125         https://bugs.webkit.org/show_bug.cgi?id=149110
3126
3127         Reviewed by Csaba Osztrogonác.
3128
3129         It is not good implementation we support both create() factory function and public constructor.
3130         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
3131         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
3132         std::make_unique<> directly.
3133
3134         * UIProcess/API/efl/EwkView.cpp:
3135         (EwkView::EwkView):
3136         (EwkView::createGLSurface):
3137
3138 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3139
3140         Remove all uses of PassRefPtr in crypto, storage, and history
3141         https://bugs.webkit.org/show_bug.cgi?id=149091
3142
3143         Reviewed by Andreas Kling.
3144
3145         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3146         (WebKit::StorageNamespaceImpl::storageArea):
3147         * WebProcess/Storage/StorageNamespaceImpl.h:
3148
3149 2015-09-13  Dan Bernstein  <mitz@apple.com>
3150
3151         Define HAVE_LINK_PREVIEW in WebKit2
3152         https://bugs.webkit.org/show_bug.cgi?id=149099
3153
3154         Reviewed by Sam Weinig.
3155
3156         * Platform/spi/ios/UIKitSPI.h:
3157         * UIProcess/WKImagePreviewViewController.mm:
3158         * config.h:
3159
3160 2015-09-12  Myles C. Maxfield  <mmaxfield@apple.com>
3161
3162         [Cocoa] Allow testing with the system language
3163         https://bugs.webkit.org/show_bug.cgi?id=148671
3164
3165         Reviewed by Anders Carlsson and Alexey Proskuryakov.
3166
3167         This patch adds two new SPI functions for setting and retrieving a vector of
3168         override languages to/from the WKContextConfiguration. The implementation of
3169         these functions holds state inside WebProcessPoolConfiguration. Then, when
3170         we launch a process, the WebProcessProxy will inject these override languages
3171         into the ProcessLauncher::LaunchOptions so that the ProcessLauncher can
3172         inject these languages into the XPC Bootstrap message. Then, in the Web
3173         Process's main(), the XPC Boostrap message is read, and the platform
3174         languages are set via NSUserDefaults setting a volatile domain.
3175
3176         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3177         (main): Set the volatile domain with NSUserDefaults.
3178         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3179         (API::ProcessPoolConfiguration::copy):
3180         * UIProcess/API/APIProcessPoolConfiguration.h: Hold state for the override
3181         languages.
3182         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3183         (WKContextConfigurationCopyOverrideLanguages): SPI.
3184         (WKContextConfigurationSetOverrideLanguages): Ditto.
3185         * UIProcess/API/C/WKContextConfigurationRef.h:
3186         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3187         (WebKit::connectToService): Inject the languages into the XPC Bootstrap
3188         message.
3189         * UIProcess/WebProcessProxy.cpp:
3190         (WebKit::WebProcessProxy::getLaunchOptions): Inject the override languages
3191         into the ProcessLauncher::LaunchOptions.
3192
3193 2015-09-12  Alexey Proskuryakov  <ap@apple.com>
3194
3195         [iOS] Allow UDP networking
3196         https://bugs.webkit.org/show_bug.cgi?id=149081
3197         rdar://problem/22291743
3198
3199         Reviewed by Sam Weinig.
3200
3201         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3202         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3203
3204 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
3205
3206         Web Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
3207         https://bugs.webkit.org/show_bug.cgi?id=149089
3208
3209         Reviewed by Brian Burg.
3210
3211         * CMakeLists.txt:
3212         * WebKit2.xcodeproj/project.pbxproj:
3213         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp: Added.
3214         (WebKit::WebInspectorFrontendAPIDispatcher::WebInspectorFrontendAPIDispatcher):
3215         (WebKit::WebInspectorFrontendAPIDispatcher::reset):
3216         (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
3217         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
3218         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
3219         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateExpressionOnLoad):
3220         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h: Added.
3221         * WebProcess/WebPage/WebInspectorUI.cpp:
3222         (WebKit::WebInspectorUI::WebInspectorUI):
3223         (WebKit::WebInspectorUI::establishConnection):
3224         (WebKit::WebInspectorUI::frontendLoaded):
3225         (WebKit::WebInspectorUI::setDockSide):
3226         (WebKit::WebInspectorUI::setDockingUnavailable):
3227         (WebKit::WebInspectorUI::showConsole):
3228         (WebKit::WebInspectorUI::showResources):
3229         (WebKit::WebInspectorUI::showMainResourceForFrame):
3230         (WebKit::WebInspectorUI::startPageProfiling):
3231         (WebKit::WebInspectorUI::stopPageProfiling):
3232         (WebKit::WebInspectorUI::didSave):
3233         (WebKit::WebInspectorUI::didAppend):
3234         (WebKit::WebInspectorUI::sendMessageToFrontend):
3235         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
3236         (WebKit::WebInspectorUI::evaluateExpressionOnLoad): Deleted.
3237         (WebKit::WebInspectorUI::evaluatePendingExpressions): Deleted.
3238         * WebProcess/WebPage/WebInspectorUI.h:
3239         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
3240
3241 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
3242
3243         Web Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
3244         https://bugs.webkit.org/show_bug.cgi?id=149088
3245
3246         Reviewed by Brian Burg.
3247
3248         * UIProcess/WebInspectorProxy.cpp:
3249         (WebKit::getContextMenuFromProposedMenu):
3250         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
3251         * UIProcess/mac/WebInspectorProxyMac.mm:
3252         (WebKit::getContextMenuFromProposedMenu): Deleted.
3253         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3254
3255 2015-09-12  Brian Burg  <bburg@apple.com>
3256
3257         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
3258         https://bugs.webkit.org/show_bug.cgi?id=149071
3259
3260         Reviewed by Joseph Pecoraro.
3261
3262         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3263         (WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
3264         (WebKit::WebInspectorClient::openLocalFrontend): Renamed.
3265         (WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
3266         (WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
3267         (WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
3268         (WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
3269         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3270
3271 2015-09-11  Beth Dakin  <bdakin@apple.com>
3272
3273         Another build fix.
3274
3275         * UIProcess/mac/ViewSnapshotStore.h:
3276         (WebKit::ViewSnapshot::size):
3277         (WebKit::ViewSnapshot::imageSizeInBytes):
3278
3279 2015-09-11  Beth Dakin  <bdakin@apple.com>
3280
3281         Still need view snapshotting code for non-IOSurface for the sim
3282         https://bugs.webkit.org/show_bug.cgi?id=149077
3283
3284         Reviewed by Tim Horton.
3285
3286         This fixes the simulator build.
3287         * UIProcess/API/Cocoa/WKWebView.mm:
3288         (-[WKWebView _takeViewSnapshot]):
3289         (-[WKWebView _zoomToPoint:atScale:animated:]):
3290         * UIProcess/mac/ViewGestureControllerMac.mm:
3291         (WebKit::ViewGestureController::beginSwipeGesture):
3292         (WebKit::ViewGestureController::removeSwipeSnapshot):
3293         * UIProcess/mac/ViewSnapshotStore.h:
3294         (WebKit::ViewSnapshot::setDeviceScaleFactor):
3295         (WebKit::ViewSnapshot::deviceScaleFactor):
3296         (WebKit::ViewSnapshot::surface):
3297         (WebKit::ViewSnapshot::imageSizeInBytes):
3298         (WebKit::ViewSnapshot::size):
3299         * UIProcess/mac/ViewSnapshotStore.mm:
3300         (WebKit::ViewSnapshotStore::singleton):
3301         (WebKit::ViewSnapshotStore::snapshottingContext):
3302         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
3303         (WebKit::ViewSnapshotStore::discardSnapshotImages):
3304         (WebKit::ViewSnapshot::create):
3305         (WebKit::ViewSnapshot::ViewSnapshot):
3306         (WebKit::ViewSnapshot::~ViewSnapshot):
3307         (WebKit::ViewSnapshot::setSurface):
3308         (WebKit::ViewSnapshot::hasImage):
3309         (WebKit::ViewSnapshot::clearImage):
3310         (WebKit::ViewSnapshot::asLayerContents):
3311
3312 2015-09-11  Beth Dakin  <bdakin@apple.com>
3313
3314         Build fix
3315
3316         * UIProcess/mac/ViewGestureControllerMac.mm:
3317         (WebKit::ViewGestureController::beginSwipeGesture):
3318         (WebKit::ViewGestureController::removeSwipeSnapshot):
3319
3320 2015-09-11  Beth Dakin  <bdakin@apple.com>
3321
3322         Should use CARenderServerRenderLayerWithTransform for snapshots on iOS
3323         https://bugs.webkit.org/show_bug.cgi?id=149069
3324         -and corresponding-
3325         rdar://problem/19726953
3326
3327         Reviewed by Tim Horton.
3328
3329         This will let us own the backing IOSurface, which will let us share more code 
3330         with Mac.
3331
3332         Use CARenderServerRenderLayerWithTransform
3333         * UIProcess/API/Cocoa/WKWebView.mm:
3334         (-[WKWebView _takeViewSnapshot]):
3335         (-[WKWebView _zoomToPoint:atScale:animated:]):
3336
3337         We can eliminate things needed for the slot-based API.
3338         * UIProcess/mac/ViewSnapshotStore.h:
3339         (WebKit::ViewSnapshot::setDeviceScaleFactor):
3340         (WebKit::ViewSnapshot::deviceScaleFactor):
3341         (WebKit::ViewSnapshot::surface):
3342         (WebKit::ViewSnapshot::imageSizeInBytes):
3343         (WebKit::ViewSnapshot::size):
3344         * UIProcess/mac/ViewSnapshotStore.mm:
3345         (WebKit::ViewSnapshotStore::singleton):
3346         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
3347         (WebKit::ViewSnapshotStore::discardSnapshotImages):
3348         (WebKit::ViewSnapshot::create):
3349         (WebKit::ViewSnapshot::ViewSnapshot):
3350         (WebKit::ViewSnapshot::~ViewSnapshot):
3351         (WebKit::ViewSnapshot::setSurface):
3352         (WebKit::ViewSnapshot::hasImage):
3353         (WebKit::ViewSnapshot::clearImage):
3354         (WebKit::ViewSnapshot::asLayerContents):
3355         (WebKit::ViewSnapshotStore::snapshottingContext): Deleted.
3356
3357 2015-09-11  Andreas Kling  <akling@apple.com>
3358
3359         [JSC] Weak should only accept cell pointees.
3360         <https://webkit.org/b/148955>
3361
3362         Reviewed by Geoffrey Garen.
3363
3364         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3365         (WebKit::NPRuntimeObjectMap::finalize):
3366         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3367
3368 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3369
3370         Web Inspector: Remove unused files
3371         https://bugs.webkit.org/show_bug.cgi?id=149049
3372
3373         Reviewed by Brian Burg.
3374
3375         * WebProcess/WebPage/efl/WebInspectorEfl.cpp: Removed.
3376         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Removed.
3377
3378 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3379
3380         WebInspectorUI should have a WebPage reference
3381         https://bugs.webkit.org/show_bug.cgi?id=149046
3382
3383         Reviewed by Geoffrey Garen.
3384
3385         * WebProcess/WebPage/WebInspectorUI.cpp:
3386         * WebProcess/WebPage/WebInspectorUI.h:
3387         (WebKit::WebInspectorUI::page): Deleted.
3388         * WebProcess/WebPage/WebPage.cpp:
3389         (WebKit::WebPage::inspectorUI):
3390
3391 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3392
3393         Web Inspector: WebInspectorUI does not need to be an API::Object
3394         https://bugs.webkit.org/show_bug.cgi?id=149045
3395
3396         Reviewed by Timothy Hatcher.
3397
3398         * Shared/API/APIObject.h:
3399         * WebProcess/WebPage/WebInspectorUI.h:
3400
3401 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3402
3403         Web Inspector: Remove unused member in WebPage
3404         https://bugs.webkit.org/show_bug.cgi?id=149040
3405
3406         Reviewed by Brian Burg.
3407
3408         * WebProcess/WebPage/WebPage.cpp:
3409         * WebProcess/WebPage/WebPage.h:
3410
3411 2015-09-10  Daniel Bates  <dabates@apple.com>
3412
3413         sendProcessWillSuspendImminently uses a wrong message flag
3414         https://bugs.webkit.org/show_bug.cgi?id=148995
3415
3416         Reviewed by Alexey Proskuryakov.
3417
3418         Remove use of flag IPC::InterruptWaitingIfSyncMessageArrives as it does not make
3419         sense when sending a sync message.
3420
3421         * UIProcess/Network/NetworkProcessProxy.cpp:
3422         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
3423         * UIProcess/WebProcessProxy.cpp:
3424         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
3425
3426 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3427
3428         Unreviewed build fix after r189572.
3429
3430         * UIProcess/WebInspectorProxy.cpp:
3431         (WebKit::WebInspectorProxy::inspectorPageURL):
3432         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3433         (WebKit::WebInspectorProxy::inspectorBaseURL):
3434         Remove the const on the now static methods.
3435
3436 2015-09-10  Chris Dumez  <cdumez@apple.com>
3437
3438         Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
3439         https://bugs.webkit.org/show_bug.cgi?id=148971
3440         <rdar://problem/22560883>
3441         <rdar://problem/22559225>
3442
3443         Reviewed by Ryosuke Niwa.
3444
3445         ContainerNode::appendChild() now takes a Ref<Node>&& parameter so we
3446         need to update the call sites.
3447
3448         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3449         (WebKit::PDFPlugin::PDFPlugin):
3450         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
3451         (WebKit::PDFPluginAnnotation::attach):
3452         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
3453         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
3454         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
3455
3456 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
3457
3458         Web Inspector: Make WebInspectorProxy inspectorURL path methods static
3459         https://bugs.webkit.org/show_bug.cgi?id=149021
3460
3461         Reviewed by Brian Burg.
3462
3463         * UIProcess/WebInspectorProxy.cpp:
3464         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
3465         (WebKit::isMainOrTestInspectorPage):
3466         (WebKit::decidePolicyForNavigationAction):
3467         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
3468         (WebKit::WebInspectorProxy::createInspectorPage):
3469         * UIProcess/WebInspectorProxy.h:
3470         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3471         (WebKit::WebInspectorProxy::inspectorPageURL):
3472         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3473         (WebKit::WebInspectorProxy::inspectorBaseURL):
3474         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3475         (WebKit::WebInspectorProxy::inspectorPageURL):
3476         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3477         (WebKit::WebInspectorProxy::inspectorBaseURL):
3478         * UIProcess/mac/WebInspectorProxyMac.mm:
3479         (WebKit::WebInspectorProxy::inspectorPageURL):
3480         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3481         (WebKit::WebInspectorProxy::inspectorBaseURL):
3482
3483 2015-09-09  Joseph Pecoraro  <pecoraro@apple.com>
3484
3485         Web Inspector: Remove dead WebInspectorProxy related code
3486         https://bugs.webkit.org/show_bug.cgi?id=149019
3487
3488         Reviewed by Timothy Hatcher.
3489
3490         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
3491         * UIProcess/WebInspectorProxy.cpp:
3492         * UIProcess/WebInspectorProxy.h:
3493         * UIProcess/mac/WebInspectorProxyMac.mm:
3494         (-[WKWebInspectorProxyObjCAdapter attachRight:]): Deleted.
3495         (-[WKWebInspectorProxyObjCAdapter attachBottom:]): Deleted.
3496
3497 2015-09-09  Anders Carlsson  <andersca@apple.com>
3498
3499         Remove an unused NSString SPI constant
3500         https://bugs.webkit.org/show_bug.cgi?id=149009
3501
3502         Reviewed by Dan Bernstein.
3503
3504         * UIProcess/API/Cocoa/WKWebView.mm:
3505         * UIProcess/API/Cocoa/WKWebViewPrivate.h: