WebPage::close should clear UserMediaPermissionRequestManager
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-09-11  Eric Carlson  <eric.carlson@apple.com>
2
3         WebPage::close should clear UserMediaPermissionRequestManager
4         https://bugs.webkit.org/show_bug.cgi?id=189369
5         <rdar://problem/44196724>
6
7         Reviewed by Youenn Fablet.
8
9         * WebProcess/WebPage/WebPage.cpp:
10         (WebKit::WebPage::close): Clear m_userMediaPermissionRequestManager.
11
12 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
13
14         [macOS] [WK2] Support changing foreground colors via color panel
15         https://bugs.webkit.org/show_bug.cgi?id=189382
16         <rdar://problem/44227311>
17
18         Reviewed by Ryosuke Niwa.
19
20         Adds support for changing font color in a richly editable element in WebKit2 via NSColorPanel. See below for
21         more detail, as well as the WebCore ChangeLog.
22
23         * UIProcess/API/Cocoa/WKWebView.mm:
24         (-[WKWebView changeColor:]):
25
26         Implement this selector; AppKit calls into this when changing font color using NSColorPanel.
27
28         * UIProcess/Cocoa/WebViewImpl.h:
29         * UIProcess/Cocoa/WebViewImpl.mm:
30         (WebKit::WebViewImpl::changeFontColorFromSender):
31
32         Creates and populates new FontAttributeChanges, with only the foreground color determined by asking the sender
33         object for its -color.
34
35         * WebProcess/WebPage/mac/WebPageMac.mm:
36
37         Use the relevant EditAction for the incoming FontAttributeChanges, instead of always specifying
38         EditAction::ChangeAttributes.
39
40         (WebKit::WebPage::changeFontAttributes):
41
42 2018-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
43
44         Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
45         https://bugs.webkit.org/show_bug.cgi?id=188008
46
47         Reviewed by Alex Christensen.
48
49         This patch is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=180307.
50         Variable fonts have CFDictionaries with non-string keys. We need to support that in our IPC code.
51
52         * Shared/cf/ArgumentCodersCF.cpp:
53         (IPC::encode):
54         (IPC::decode):
55
56 2018-09-11  Adrian Perez de Castro  <aperez@igalia.com>
57
58         [WPE][GTK] API documentation is unclear about how to modify requests before sending them
59         https://bugs.webkit.org/show_bug.cgi?id=189505
60
61         Reviewed by Michael Catanzaro.
62
63         Add notes to the API documentation to make explicit where modification
64         of WebKitURIRequest instances affects the request data sent over the
65         network.
66
67         * UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
68         modifications to the associated WebKitURIRequest do not affect the
69         actual request. Point to WebKitPage::send-request instead.
70         * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
71         * UIProcess/API/glib/WebKitWebView.cpp:
72         (webkit_web_view_class_init): Ditto for the description of the
73         WebKitWebView::decide-policy signal. Also fix the syntax of example.
74         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
75         (webkit_web_page_class_init): Indicate that modifications to the
76         WebKitURIRequest will change the actual network request data.
77
78 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
79
80         Unreviewed, attempt to fix Apple builds after r235903
81         https://bugs.webkit.org/show_bug.cgi?id=188872
82
83         If it really needs to be inlined, it will need to move to the header....
84
85         * UIProcess/WebPageProxy.cpp:
86         (WebKit::WebPageProxy::pageClient const):
87
88 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
89
90         Unreviewed, fix build after r235903
91         https://bugs.webkit.org/show_bug.cgi?id=188872
92
93         This broke all ports except GTK. Need to add a missing header.
94
95         * UIProcess/PageClient.h:
96
97 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
98
99         Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
100         https://bugs.webkit.org/show_bug.cgi?id=189506
101
102         Reviewed by Tim Horton.
103
104         m_pipStandbyElement is only defined in
105         WebKit/WebProcess/FullScreen/WebFullScreenManager.h
106         only when ENABLE(VIDEO) (see
107         https://bugs.webkit.org/show_bug.cgi?id=181338)
108
109         * WebProcess/FullScreen/WebFullScreenManager.cpp:
110         (WebKit::WebFullScreenManager::setPIPStandbyElement):
111
112 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
113
114         WebPageProxy should hold a WeakPtr to its PageClient
115         https://bugs.webkit.org/show_bug.cgi?id=188872
116
117         Reviewed by Ryosuke Niwa.
118
119         This ensures the PageClient reference is always valid when used.
120
121         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
122         (WebKit::WebPageProxy::startDrag):
123         (WebKit::WebPageProxy::setDragCaretRect):
124         * UIProcess/PageClient.h:
125         * UIProcess/WebPageProxy.cpp:
126         (WebKit::PageClientProtector::PageClientProtector):
127         (WebKit::PageClientProtector::~PageClientProtector):
128         (WebKit::WebPageProxy::WebPageProxy):
129         (WebKit::m_resetRecentCrashCountTimer):
130         (WebKit::WebPageProxy::pageClient const):
131         (WebKit::WebPageProxy::reattachToWebProcess):
132         (WebKit::WebPageProxy::initializeWebPage):
133         (WebKit::WebPageProxy::close):
134         (WebKit::WebPageProxy::didChangeBackForwardList):
135         (WebKit::WebPageProxy::willGoToBackForwardListItem):
136         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
137         (WebKit::WebPageProxy::setViewNeedsDisplay):
138         (WebKit::WebPageProxy::requestScroll):
139         (WebKit::WebPageProxy::viewScrollPosition const):
140         (WebKit::WebPageProxy::updateActivityState):
141         (WebKit::WebPageProxy::activityStateDidChange):
142         (WebKit::WebPageProxy::viewDidEnterWindow):
143         (WebKit::WebPageProxy::dispatchActivityStateChange):
144         (WebKit::WebPageProxy::layerHostingModeDidChange):
145         (WebKit::WebPageProxy::viewSize const):
146         (WebKit::WebPageProxy::startDrag):
147         (WebKit::WebPageProxy::didPerformDragOperation):
148         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
149         (WebKit::WebPageProxy::findPlugin):
150         (WebKit::WebPageProxy::handleTouchEventSynchronously):
151         (WebKit::WebPageProxy::handleTouchEvent):
152         (WebKit::WebPageProxy::preferencesDidChange):
153         (WebKit::WebPageProxy::didCreateMainFrame):
154         (WebKit::WebPageProxy::didCreateSubframe):
155         (WebKit::WebPageProxy::didStartProgress):
156         (WebKit::WebPageProxy::didChangeProgress):
157         (WebKit::WebPageProxy::didFinishProgress):
158         (WebKit::WebPageProxy::didDestroyNavigation):
159         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
160         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
161         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
162         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
163         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
164         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
165         (WebKit::WebPageProxy::didCommitLoadForFrame):
166         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
167         (WebKit::WebPageProxy::didFinishLoadForFrame):
168         (WebKit::WebPageProxy::didFailLoadForFrame):
169         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
170         (WebKit::WebPageProxy::didReceiveTitleForFrame):
171         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
172         (WebKit::WebPageProxy::didReachLayoutMilestone):
173         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
174         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
175         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
176         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
177         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
178         (WebKit::WebPageProxy::decidePolicyForResponse):
179         (WebKit::WebPageProxy::unableToImplementPolicy):
180         (WebKit::WebPageProxy::didNavigateWithNavigationData):
181         (WebKit::WebPageProxy::didPerformClientRedirect):
182         (WebKit::WebPageProxy::didPerformServerRedirect):
183         (WebKit::WebPageProxy::didUpdateHistoryTitle):
184         (WebKit::WebPageProxy::closePage):
185         (WebKit::WebPageProxy::setWindowFrame):
186         (WebKit::WebPageProxy::getWindowFrame):
187         (WebKit::WebPageProxy::getWindowFrameWithCallback):
188         (WebKit::WebPageProxy::screenToRootView):
189         (WebKit::WebPageProxy::rootViewToScreen):
190         (WebKit::WebPageProxy::syncRootViewToScreen):
191         (WebKit::WebPageProxy::accessibilityScreenToRootView):
192         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
193         (WebKit::WebPageProxy::didChangeViewportProperties):
194         (WebKit::WebPageProxy::runOpenPanel):
195         (WebKit::WebPageProxy::showShareSheet):
196         (WebKit::WebPageProxy::handleDownloadRequest):
197         (WebKit::WebPageProxy::didChangeContentSize):
198         (WebKit::WebPageProxy::showColorPicker):
199         (WebKit::WebPageProxy::showDataListSuggestions):
200         (WebKit::WebPageProxy::compositionWasCanceled):
201         (WebKit::WebPageProxy::registerInsertionUndoGrouping):
202         (WebKit::WebPageProxy::canUndoRedo):
203         (WebKit::WebPageProxy::executeUndoRedo):
204         (WebKit::WebPageProxy::clearAllEditCommands):
205         (WebKit::WebPageProxy::setTextIndicator):
206         (WebKit::WebPageProxy::clearTextIndicator):
207         (WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
208         (WebKit::WebPageProxy::showPopupMenu):
209         (WebKit::WebPageProxy::showContextMenu):
210         (WebKit::WebPageProxy::registerEditCommand):
211         (WebKit::WebPageProxy::canUndo):
212         (WebKit::WebPageProxy::canRedo):
213         (WebKit::WebPageProxy::setToolTip):
214         (WebKit::WebPageProxy::setCursor):
215         (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves):
216         (WebKit::WebPageProxy::didReceiveEvent):
217         (WebKit::WebPageProxy::resetState):
218         (WebKit::WebPageProxy::resetStateAfterProcessExited):
219         (WebKit::WebPageProxy::creationParameters):
220         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
221         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
222         (WebKit::WebPageProxy::updateAcceleratedCompositingMode):
223         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
224         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
225         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
226         (WebKit::WebPageProxy::didFinishLoadingDataForCustomContentProvider):
227         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
228         (WebKit::WebPageProxy::showCorrectionPanel):
229         (WebKit::WebPageProxy::dismissCorrectionPanel):
230         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
231         (WebKit::WebPageProxy::recordAutocorrectionResponse):
232         (WebKit::WebPageProxy::useDarkAppearance const):
233         (WebKit::WebPageProxy::showDictationAlternativeUI):
234         (WebKit::WebPageProxy::removeDictationAlternatives):
235         (WebKit::WebPageProxy::dictationAlternatives):
236         (WebKit::WebPageProxy::setEditableElementIsFocused):
237         (WebKit::WebPageProxy::takeViewSnapshot):
238         (WebKit::WebPageProxy::wrapCryptoKey):
239         (WebKit::WebPageProxy::unwrapCryptoKey):
240         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
241         (WebKit::WebPageProxy::navigationGestureDidBegin):
242         (WebKit::WebPageProxy::navigationGestureWillEnd):
243         (WebKit::WebPageProxy::navigationGestureDidEnd):
244         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
245         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
246         (WebKit::WebPageProxy::isPlayingMediaDidChange):
247         (WebKit::WebPageProxy::videoControlsManagerDidChange):
248         (WebKit::WebPageProxy::handleControlledElementIDResponse const):
249         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
250         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
251         (WebKit::WebPageProxy::didHandleAcceptedCandidate):
252         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
253         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
254         (WebKit::WebPageProxy::showPlaybackTargetPicker):
255         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
256         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled):
257         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
258         (WebKit::WebPageProxy::didChangeBackgroundColor):
259         (WebKit::WebPageProxy::didRestoreScrollPosition):
260         (WebKit::WebPageProxy::userInterfaceLayoutDirection):
261         (WebKit::WebPageProxy::didInsertAttachment):
262         (WebKit::WebPageProxy::didRemoveAttachment):
263         * UIProcess/WebPageProxy.h:
264         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
265         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
266         * UIProcess/gtk/WebPageProxyGtk.cpp:
267         (WebKit::WebPageProxy::viewWidget):
268         (WebKit::WebPageProxy::editorStateChanged):
269         * UIProcess/ios/WebPageProxyIOS.mm:
270         (WebKit::WebPageProxy::computeCustomFixedPositionRect const):
271         (WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
272         (WebKit::WebPageProxy::overflowScrollViewDidScroll):
273         (WebKit::WebPageProxy::overflowScrollWillStartScroll):
274         (WebKit::WebPageProxy::overflowScrollDidEndScroll):
275         (WebKit::WebPageProxy::didCommitLayerTree):
276         (WebKit::WebPageProxy::layerTreeCommitComplete):
277         (WebKit::WebPageProxy::didReceivePositionInformation):
278         (WebKit::WebPageProxy::saveImageToLibrary):
279         (WebKit::WebPageProxy::interpretKeyEvent):
280         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
281         (WebKit::WebPageProxy::couldNotRestorePageState):
282         (WebKit::WebPageProxy::restorePageState):
283         (WebKit::WebPageProxy::restorePageCenterAndScale):
284         (WebKit::WebPageProxy::didGetTapHighlightGeometries):
285         (WebKit::WebPageProxy::startAssistingNode):
286         (WebKit::WebPageProxy::stopAssistingNode):
287         (WebKit::WebPageProxy::showInspectorHighlight):
288         (WebKit::WebPageProxy::hideInspectorHighlight):
289         (WebKit::WebPageProxy::showInspectorIndication):
290         (WebKit::WebPageProxy::hideInspectorIndication):
291         (WebKit::WebPageProxy::enableInspectorNodeSearch):
292         (WebKit::WebPageProxy::disableInspectorNodeSearch):
293         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
294         (WebKit::WebPageProxy::showPlaybackTargetPicker):
295         (WebKit::WebPageProxy::commitPotentialTapFailed):
296         (WebKit::WebPageProxy::didNotHandleTapAsClick):
297         (WebKit::WebPageProxy::didCompleteSyntheticClick):
298         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
299         (WebKit::WebPageProxy::editorStateChanged):
300         (WebKit::WebPageProxy::showValidationMessage):
301         (WebKit::WebPageProxy::didHandleStartDataInteractionRequest):
302         (WebKit::WebPageProxy::didHandleAdditionalDragItemsRequest):
303         (WebKit::WebPageProxy::didConcludeEditDataInteraction):
304         (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):
305         * UIProcess/mac/WebPageProxyMac.mm:
306         (WebKit::WebPageProxy::windowAndViewFramesChanged):
307         (WebKit::WebPageProxy::insertDictatedTextAsync):
308         (WebKit::WebPageProxy::setPromisedDataForImage):
309         (WebKit::WebPageProxy::didPerformDictionaryLookup):
310         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
311         (WebKit::WebPageProxy::makeFirstResponder):
312         (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
313         (WebKit::WebPageProxy::colorSpace):
314         (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
315         (WebKit::WebPageProxy::setPluginComplexTextInputState):
316         (WebKit::WebPageProxy::executeSavedCommandBySelector):
317         (WebKit::WebPageProxy::intrinsicContentSizeDidChange):
318         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
319         (WebKit::WebPageProxy::acceleratedCompositingRootLayer const):
320         (WebKit::WebPageProxy::showPDFContextMenu):
321         (WebKit::WebPageProxy::showTelephoneNumberMenu):
322         (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates const):
323         (WebKit::WebPageProxy::editorStateChanged):
324         (WebKit::WebPageProxy::startWindowDrag):
325         (WebKit::WebPageProxy::platformWindow):
326         (WebKit::WebPageProxy::rootViewToWindow):
327         (WebKit::WebPageProxy::showValidationMessage):
328         (WebKit::WebPageProxy::inspectorAttachmentView):
329         (WebKit::WebPageProxy::remoteObjectRegistry):
330         * UIProcess/win/WebPageProxyWin.cpp:
331         (WebKit::WebPageProxy::viewWidget):
332         * UIProcess/wpe/WebPageProxyWPE.cpp:
333         (WebKit::WebPageProxy::viewBackend):
334
335 2018-09-11  Chris Dumez  <cdumez@apple.com>
336
337         Regression(PSON): "Swipe back" snapshot is missing when navigating back cross-process
338         https://bugs.webkit.org/show_bug.cgi?id=189482
339         <rdar://problem/44317222>
340
341         Reviewed by Geoffrey Garen.
342
343         The issue was that when we swap process on navigation, we:
344         1. Call processDidTerminate() which calls resetState() and clears the displayed content
345         2. Reattach the WebPageProxy to a new WebProcess
346         3. Trigger the navigation
347         4. Take the navigation snapshot
348
349         When the navigation snapshot occurs at step 4, the view is already blank in the case of
350         process swap. To avoid the issue, we take the navigation snapshot earlier, before calling
351         processDidTerminate() and we suppress the next navigation snapshot as it would be blank.
352
353         At some point, we will likely want to display the previous' WebProcess content longer,
354         until the new WebProcess has something interesting to display. Once this is implemented,
355         we'll likely be able to drop the early snapshotting logic.
356
357         * UIProcess/WebPageProxy.cpp:
358         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
359         (WebKit::WebPageProxy::continueNavigationInNewProcess):
360         (WebKit::WebPageProxy::restoreFromSessionState):
361         (WebKit::WebPageProxy::didCommitLoadForFrame):
362         * UIProcess/WebPageProxy.h:
363         (WebKit::WebPageProxy::suppressNextAutomaticNavigationSnapshot):
364
365 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
366
367         Add Web API Statistics Collection
368         https://bugs.webkit.org/show_bug.cgi?id=187773
369         <rdar://problem/44155162>
370
371         Reviewed by Brent Fulgham.
372
373         * Shared/WebCoreArgumentCoders.cpp:
374         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
375         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
376         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
377
378 == Rolled over to ChangeLog-2018-09-11 ==