1 2018-04-10 Megan Gardner <megan_gardner@apple.com>
3 Remove block selection code
4 https://bugs.webkit.org/show_bug.cgi?id=184470
6 Reviewed by Timothy Hatcher.
8 Remove block selection code that isn't run and is currently not even used.
9 Had to put this back in for a bug in the mid-year release, but we're past that
10 so it's time for this to go away.
12 * Platform/spi/ios/UIKitSPI.h:
13 * UIProcess/PageClient.h:
14 * UIProcess/WebPageProxy.h:
15 * UIProcess/WebPageProxy.messages.in:
16 * UIProcess/ios/PageClientImplIOS.h:
17 * UIProcess/ios/PageClientImplIOS.mm:
18 (WebKit::PageClientImpl::stopAssistingNode):
19 (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch): Deleted.
20 * UIProcess/ios/WKContentViewInteraction.h:
21 * UIProcess/ios/WKContentViewInteraction.mm:
22 (toSelectionHandlePosition): Deleted.
23 (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]): Deleted.
24 (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]): Deleted.
25 (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]): Deleted.
26 * UIProcess/ios/WebPageProxyIOS.mm:
27 (WebKit::WebPageProxy::saveImageToLibrary):
28 (WebKit::WebPageProxy::updateBlockSelectionWithTouch): Deleted.
29 (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouch): Deleted.
30 * WebProcess/WebPage/WebPage.h:
31 * WebProcess/WebPage/WebPage.messages.in:
32 * WebProcess/WebPage/ios/WebPageIOS.mm:
33 (WebKit::rangeAtWordBoundaryForPosition):
34 (WebKit::distanceBetweenRectsForPosition): Deleted.
35 (WebKit::rectsEssentiallyTheSame): Deleted.
36 (WebKit::unionDOMRanges): Deleted.
37 (WebKit::computeEdgeCenter): Deleted.
38 (WebKit::WebPage::expandedRangeFromHandle): Deleted.
39 (WebKit::WebPage::contractedRangeFromHandle): Deleted.
40 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Deleted.
41 (WebKit::WebPage::rangeForBlockAtPoint): Deleted.
42 (WebKit::shouldExpand): Deleted.
43 (WebKit::WebPage::changeBlockSelection): Deleted.
44 (WebKit::WebPage::updateBlockSelectionWithTouch): Deleted.
46 2018-04-10 Wenson Hsieh <wenson_hsieh@apple.com>
48 [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
49 https://bugs.webkit.org/show_bug.cgi?id=184435
50 <rdar://problem/38726260>
52 Reviewed by Dean Jackson.
54 Adds support for an alternate codepath when computing a zoom rect when double tapping that doesn't take the hit-
55 tested node into account, and instead cycles the zoom scale between 2 fixed values (in addition to the initial
56 scale). In the next patch, these fixed scales will be determined by computing zoom scales needed to make most of
57 the text on the page legible (i.e. the first text legibility zoom scale), and another to make all of the text on
58 the page legible, with the exception of outliers (this is the second text legibility zoom scale).
60 See comments below for more detail.
62 * UIProcess/Cocoa/ViewGestureController.h:
63 * UIProcess/Cocoa/ViewGestureController.messages.in:
64 * UIProcess/ios/SmartMagnificationController.h:
65 * UIProcess/ios/SmartMagnificationController.messages.in:
66 * UIProcess/ios/SmartMagnificationController.mm:
67 (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
68 * UIProcess/mac/ViewGestureControllerMac.mm:
69 (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
70 * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
71 (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
73 Rename the boolean `isReplacedElement` argument to `fitEntireRect` instead. The UI process only uses this on iOS
74 to determine whether or not to fit the entire element rect to the viewport and add padding. This patch renames
75 this variable because we are not zooming to a replaced element in the case where text legibility on the page
76 (rather than element geometry) is being used to figure out the zoom scale, but we still want to fit the entire
77 target rect to the viewport.
79 (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
81 If text legiblity zoom scaling is preferred, then compute first and second-level text legibility zoom scales to
82 zoom to upon double tap (where the second zoom scale is greater than the first). To choose a target zoom
83 scale, choose the lowest target zoom scale that is at least a small amount less than the current scale. If
84 neither of the two scales fulfill this description, then zoom back out to the initial scale. This has the effect
85 of consistently cycling between all three zoom scales as the user double taps.
87 (WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales):
89 Introduce a new helper method that computes and caches target scales to zoom to when double tapping to zoom. If
90 a cached pair of target scales is already present, it skips this computation and immediately returns it.
92 (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
93 (WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
95 Factor out logic to compute min and max zoom scales into a separate helper, and call it from both
96 computeZoomInformationForNode and computeTextLegibilityScales.
98 (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
100 Invalidate cached text legibility scales when layout is triggered.
102 * WebProcess/WebPage/ViewGestureGeometryCollector.h:
103 * WebProcess/WebPage/WebPage.cpp:
104 (WebKit::WebPage::mainFrameDidLayout):
105 * WebProcess/WebPage/WebPage.h:
106 (WebKit::WebPage::viewportConfiguration const):
108 Expose WebPage's ViewportConfiguration as a const reference.
110 * WebProcess/WebPage/ios/WebPageIOS.mm:
111 (WebKit::WebPage::platformPrefersTextLegibilityBasedZoomScaling const):
113 Adds a platform hook for opting into text-legibility-based zoom scaling instead of regular hit-testing-based
114 zoom scaling heuristics.
116 2018-04-10 Wenson Hsieh <wenson_hsieh@apple.com>
118 Fix availability annotations for _WKAttachment SPI
119 https://bugs.webkit.org/show_bug.cgi?id=184473
120 <rdar://problem/39319732>
122 Reviewed by Dan Bernstein.
124 _WKAttachmentInfo is available in WK_MAC_TBA and WK_IOS_TBA, but the SPI method -[_WKAttachment requestInfo:]
125 is currently available in macOS 10.13.4 and iOS 11.3. Instead, the availability of this SPI should match the
126 availability of the SPI object it depends on.
128 * UIProcess/API/Cocoa/_WKAttachment.h:
130 2018-04-10 Chris Dumez <cdumez@apple.com>
132 Avoid constructing a service worker RegistrationStore for private sessions
133 https://bugs.webkit.org/show_bug.cgi?id=184463
134 <rdar://problem/36613948>
136 Reviewed by Youenn Fablet.
138 Avoid constructing a service worker RegistrationStore for private sessions since there
139 is no need for persistence and the registrationDatabaseDirectory is the empty string in
142 * StorageProcess/StorageProcess.cpp:
143 (WebKit::StorageProcess::initializeWebsiteDataStore):
145 2018-04-10 Andy Estes <aestes@apple.com>
147 [iOS] Navigate to URL and page number annotations in WKPDFView
148 https://bugs.webkit.org/show_bug.cgi?id=184410
150 Reviewed by Timothy Hatcher.
152 Implemented navigation to URL and page number (same-document) link annotations in PDFs.
154 * UIProcess/ios/WKPDFView.mm:
155 (-[WKPDFView _scrollToURLFragment:]):
156 (-[WKPDFView web_didSameDocumentNavigation:]):
157 (-[WKPDFView pdfHostViewController:updatePageCount:]):
158 (-[WKPDFView pdfHostViewController:goToURL:]):
159 (-[WKPDFView pdfHostViewController:goToPageIndex:withViewFrustum:]):
161 2018-04-10 Andy Estes <aestes@apple.com>
163 [iOS] WKPDFView should conform to _WKWebViewPrintProvider
164 https://bugs.webkit.org/show_bug.cgi?id=184471
166 Reviewed by Dan Bernstein.
168 * UIProcess/API/Cocoa/WKWebView.mm:
169 (-[WKWebView _printProvider]):
171 The print provider will always be either _contentView or _customContentView, but
172 might not be _currentContentView.
174 * UIProcess/ios/WKPDFView.mm:
175 (-[WKPDFView _wk_pageCountForPrintFormatter:]):
177 Asked _hostViewController for the page count, clamped to 1 if
178 -[_WKWebViewPrintFormatter snapshotFirstPage] is YES.
180 (-[WKPDFView _wk_printedDocument]):
182 Created a CGPDFDocumentRef from _data and returned it.
184 2018-04-10 Youenn Fablet <youenn@apple.com>
186 Beacon redirect responses should be CORS validated
187 https://bugs.webkit.org/show_bug.cgi?id=184378
189 Reviewed by Chris Dumez.
191 Add CORS checks to any redirection response if mode is CORS.
192 Update response tainting and redirected accordingly.
194 * NetworkProcess/NetworkLoadChecker.cpp:
195 (WebKit::NetworkLoadChecker::checkRedirection):
196 (WebKit::NetworkLoadChecker::validateResponse):
197 * NetworkProcess/NetworkLoadChecker.h:
198 * NetworkProcess/PingLoad.cpp:
199 (WebKit::PingLoad::willPerformHTTPRedirection):
201 2018-04-10 Sihui Liu <sihui_liu@apple.com>
203 Loading of multipart response was cancelled because of content policy set in WebFrameLoaderClient::dispatchDecidePolicyForResponse
204 https://bugs.webkit.org/show_bug.cgi?id=184268
205 <rdar://problem/39144446>
207 Reviewed by Chris Dumez.
209 Webpage for multipart stream responses failed to refresh because content policy was set to
210 be ignore when provisonalDocumentLoader was null and navigation ID could not be retrieved.
211 As loading should not stop in this case, we set navigation ID 0 and still ask for content
214 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
215 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
217 2018-04-10 Andy Estes <aestes@apple.com>
219 [iOS] Use PDFKit to render PDFs in WKWebView
220 https://bugs.webkit.org/show_bug.cgi?id=184387
222 Reviewed by Beth Dakin.
224 Adopted PDFHostViewController for rendering PDFs in WKWebView.
226 This patch implements rendering the PDF document and page number indicator. Link
227 navigation, find-in-page, and printing will be implemented in follow-up patches.
229 WKLegacyPDFView is still the default PDF view.
231 * Configurations/WebKit.xcconfig:
233 Linked WebKit with PDFKit on iOS.
235 * UIProcess/API/Cocoa/WKWebView.mm:
236 (-[WKWebView _currentContentView]):
237 (-[WKWebView viewForZoomingInScrollView:]):
239 When WKPDFView loads a PDF document, it replaces itself with a view vended by
240 PDFHostViewController as the WKScrollView's content view. Abstracted WKWebView's
241 concept of the "current content view" to be either the WKContentView or a view of
242 the custom content view's choosing (-web_contentView).
244 (-[WKWebView scrollViewWillBeginZooming:withView:]):
245 (-[WKWebView scrollViewDidZoom:]):
246 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
248 Forwarded these calls to _customContentView if it responds to the equivalent
249 WKWebViewContentProvider selectors.
251 * UIProcess/Cocoa/WKWebViewContentProvider.h:
253 Defined new protocol selectors.
255 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
256 (-[WKWebViewContentProviderRegistry init]):
257 * UIProcess/ios/WKLegacyPDFView.h:
258 * UIProcess/ios/WKLegacyPDFView.mm:
260 Changed ENABLE(WKPDFVIEW) to ENABLE(WKLEGACYPDFVIEW).
262 (-[WKLegacyPDFView web_contentView]):
264 Added. Returns self as the content view.
266 * UIProcess/ios/WKPDFView.h: Added.
267 * UIProcess/ios/WKPDFView.mm: Added.
268 (-[WKPDFView dealloc]):
270 Removed the host view and page number indicator from their superviews.
272 (-[WKPDFView gestureRecognizerShouldBegin:]):
274 Forwarded to _hostViewController.
276 (-[WKPDFView web_initWithFrame:webView:]):
278 Set ours and the scroll view's background color to UIColor.grayColor to match
281 (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
283 Created a PDFHostViewController and set its root view as the scroll view's content
284 view after removing the WKPDFView itself. This allows WKPDFView to act as a
285 placeholder content view until the PDF is loaded. Added the host view controller's
286 page number indicator to the fixed overlay view. Finally, loaded the PDF document
287 by calling -[PDFHostViewController setDocumentData:withScrollView:].
289 (-[WKPDFView _offsetForPageNumberIndicator]):
291 Computed an offset for the page number indicator like WKLegacyPDFView did, taking
292 into account the overlaid accessory views inset, computed unobscured safe area
293 inset, and computed obscured inset.
295 (-[WKPDFView _movePageNumberIndicatorToPoint:animated:]):
297 Moved the page number indicator using the margin and animation duration from
300 (-[WKPDFView _updateLayoutAnimated:]):
302 Added a convenience method to update the PDF view layout and position the page
305 (-[WKPDFView web_setMinimumSize:]):
307 Updated our own frame in case we are still the placeholder content view.
308 Called -_updateLayoutAnimated:.
310 (-[WKPDFView web_setOverlaidAccessoryViewsInset:]):
312 Stored the inset and called -_updateLayoutAnimated:.
314 (-[WKPDFView web_computedContentInsetDidChange]):
316 Called -_updateLayoutAnimated:.
318 (-[WKPDFView web_setFixedOverlayView:]):
320 Stored the fixed overlay view.
322 (-[WKPDFView web_didSameDocumentNavigation:]):
323 (-[WKPDFView web_countStringMatches:options:maxCount:]):
324 (-[WKPDFView web_findString:options:maxCount:]):
325 (-[WKPDFView web_hideFindUI]):
329 (-[WKPDFView web_contentView]):
331 If there is a host view controller, return its root view. Otherwise, return self.
333 (-[WKPDFView web_scrollViewDidScroll:]):
334 (-[WKPDFView web_scrollViewWillBeginZooming:withView:]):
335 (-[WKPDFView web_scrollViewDidEndZooming:withView:atScale:]):
336 (-[WKPDFView web_scrollViewDidZoom:]):
338 Called -[PDFHostViewController updatePDFViewLayout].
340 (-[WKPDFView web_dataRepresentation]):
344 (-[WKPDFView web_suggestedFilename]):
346 Returned _suggestedFilename.
348 (-[WKPDFView web_isBackground]):
350 Returned self.isBackground.
352 * UIProcess/ios/WKSystemPreviewView.mm:
353 (-[WKSystemPreviewView web_contentView]):
355 Added. Returns self as the content view.
357 * WebKit.xcodeproj/project.pbxproj:
359 2018-04-10 Miguel Gomez <magomez@igalia.com>
361 [GTK][WPE] Race condition when destroying webprocesses
362 https://bugs.webkit.org/show_bug.cgi?id=184445
364 Reviewed by Carlos Garcia Campos.
366 Ensure that the WebProcess is properly closing its pages when it's exiting because
367 the UIProcess has invalidated the IPC connection.
369 * WebProcess/WebProcess.cpp:
370 (WebKit::WebProcess::didClose):
372 2018-04-09 Wenson Hsieh <wenson_hsieh@apple.com>
374 Add missing availability macros after r230462
375 https://bugs.webkit.org/show_bug.cgi?id=184426
377 Reviewed by Timothy Hatcher.
379 Annotate new SPI added in r230462 with the appropriate availability macros.
381 * UIProcess/API/Cocoa/WKViewPrivate.h:
382 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
384 2018-04-09 Brent Fulgham <bfulgham@apple.com>
386 Add ProcessPrivilege assertions to places that access NSApp
387 https://bugs.webkit.org/show_bug.cgi?id=184322
388 <rdar://problem/39194560>
390 Reviewed by Per Arne Vollan.
392 Add ProcessPrivilege assertions to places where we interact with NSApp so
393 that we can prevent accidentally using them in the WebContent process.
395 * Shared/mac/ChildProcessMac.mm:
396 (WebKit::ChildProcess::stopNSAppRunLoop):
397 * Shared/mac/HangDetectionDisablerMac.mm:
398 (WebKit::setClientsMayIgnoreEvents):
399 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
400 (WebKit::WebProcessPool::platformInitializeWebProcess):
401 * UIProcess/Cocoa/WebViewImpl.mm:
402 (WebKit::WebViewImpl::WebViewImpl):
403 (WebKit::WebViewImpl::becomeFirstResponder):
404 (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
405 (WebKit::WebViewImpl::validateUserInterfaceItem):
406 (WebKit::WebViewImpl::startSpeaking):
407 (WebKit::WebViewImpl::stopSpeaking):
408 (WebKit::applicationFlagsForDrag):
409 (WebKit::WebViewImpl::doneWithKeyEvent):
410 * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
411 (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
412 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
413 (WebKit::PluginProcessProxy::enterFullscreen):
414 (WebKit::PluginProcessProxy::beginModal):
415 (WebKit::PluginProcessProxy::endModal):
416 * UIProcess/mac/DisplayLink.cpp:
417 (WebKit::DisplayLink::DisplayLink):
418 (WebKit::DisplayLink::~DisplayLink):
419 * UIProcess/mac/PageClientImplMac.mm:
420 (WebKit::PageClientImpl::isViewWindowActive):
421 (WebKit::PageClientImpl::setCursor):
422 * UIProcess/mac/WebPageProxyMac.mm:
423 (WebKit::WebPageProxy::getIsSpeaking):
424 (WebKit::WebPageProxy::speak):
425 (WebKit::WebPageProxy::stopSpeaking):
426 (WebKit::WebPageProxy::startDisplayLink):
427 * UIProcess/mac/WebPopupMenuProxyMac.mm:
428 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
430 2018-04-09 John Wilander <wilander@apple.com>
432 Refactor Ignore HSTS code
433 https://bugs.webkit.org/show_bug.cgi?id=184433
434 <rdar://problem/39298238>
436 Reviewed by Darin Adler.
438 This patch refactors our ignore HSTS code. The convenience functions are moved
439 out of CFNetwork SPI in PAL, and into where they are used. It also switches
440 from performSelector: calls to straight function calls, after checking that
441 there is a responder.
443 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
444 (schemeWasUpgradedDueToDynamicHSTS):
447 Add convenience functions here since they were moved out of
450 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
452 Rename UNUSED to BUNUSED
453 https://bugs.webkit.org/show_bug.cgi?id=184093
455 Reviewed by Yusuke Suzuki.
457 * UIProcess/API/Cocoa/WKWebView.mm:
458 (-[WKWebView _getApplicationManifestWithCompletionHandler:]):
460 2018-04-09 Timothy Hatcher <timothy@apple.com>
462 Add support for setting a background color on WKWebView and WKView
463 https://bugs.webkit.org/show_bug.cgi?id=184426
465 Reviewed by Wenson Hsieh.
467 * UIProcess/API/Cocoa/WKViewPrivate.h: Added _backgroundColor property.
468 * UIProcess/API/Cocoa/WKWebView.mm:
469 (-[WKWebView _backgroundColor]): Added. Call through to WebViewImpl.
470 (-[WKWebView _setBackgroundColor:]): Added. Call through to WebViewImpl.
471 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added _backgroundColor property.
472 * UIProcess/API/mac/WKView.mm:
473 (-[WKView _backgroundColor]): Added. Call through to WebViewImpl.
474 (-[WKView _setBackgroundColor:]): Added. Call through to WebViewImpl.
475 * UIProcess/Cocoa/WebViewImpl.h:
476 * UIProcess/Cocoa/WebViewImpl.mm:
477 (WebKit::WebViewImpl::setBackgroundColor): Added.
478 (WebKit::WebViewImpl::backgroundColor const): Added.
479 (WebKit::WebViewImpl::updateLayer): Use m_backgroundColor when set.
481 2018-04-09 Yousuke Kimoto <yousuke.kimoto@sony.com> and Fujii Hironori <Hironori.Fujii@sony.com>
483 [WinCairo] Add WebKit Shared/win event files for wincairo webkit
484 https://bugs.webkit.org/show_bug.cgi?id=183043
486 Reviewed by Brent Fulgham.
488 * Shared/NativeWebKeyboardEvent.h:
489 (WebKit::NativeWebKeyboardEvent::nativeEvent const):
490 * Shared/NativeWebMouseEvent.h:
491 (WebKit::NativeWebMouseEvent::nativeEvent const):
492 * Shared/NativeWebTouchEvent.h:
493 * Shared/NativeWebWheelEvent.h:
494 (WebKit::NativeWebWheelEvent::nativeEvent const):
495 * Shared/win/NativeWebKeyboardEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h.
496 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
497 * Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h.
498 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
499 * Shared/win/NativeWebTouchEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebTouchEvent.h.
500 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
501 * Shared/win/NativeWebWheelEventWin.cpp: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h.
502 (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
503 * Shared/win/WebEventFactory.cpp: Added.
504 (WebKit::relativeCursorPosition):
506 (WebKit::horizontalScrollChars):
507 (WebKit::verticalScrollLines):
508 (WebKit::clickCount):
509 (WebKit::IsKeyInDownState):
510 (WebKit::modifiersForEvent):
511 (WebKit::modifiersForCurrentKeyState):
512 (WebKit::keyboardEventTypeForEvent):
513 (WebKit::isSystemKeyEvent):
514 (WebKit::isKeypadEvent):
515 (WebKit::textFromEvent):
516 (WebKit::unmodifiedTextFromEvent):
517 (WebKit::keyIdentifierFromEvent):
518 (WebKit::WebEventFactory::createWebMouseEvent):
519 (WebKit::WebEventFactory::createWebWheelEvent):
520 (WebKit::WebEventFactory::createWebKeyboardEvent):
521 (WebKit::WebEventFactory::createWebTouchEvent):
522 * Shared/win/WebEventFactory.h: Copied from Source/WebKit/Shared/NativeWebMouseEvent.h.
523 (WebKit::createNativeEvent):
525 2018-04-09 Brent Fulgham <bfulgham@apple.com>
527 WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll is directly accessing NSScreen
528 https://bugs.webkit.org/show_bug.cgi?id=184344
529 <rdar://problem/39224969>
531 Reviewed by Per Arne Vollan.
533 The implementation of targetPositionInWindowForSelectionAutoscroll uses the display ID to get the
534 screen boundaries of the current display. This causes a bunch of interaction with NSScreen that
535 we do not want to allow in the WebContent process.
537 Instead, we should just use the cached screen information the WebContent process already possesses.
539 This patch makes the following changes:
540 1. We now retrieve the screen rect of the page's display from the cache, rather than interacting with
541 the WindowServer directly.
542 2. Add a new 'toUserSpaceForPrimaryScreen' so we don't have to deal with a nil NSWindow when computing
543 the user space version of the coordinates. A nil Window just means we want to get coordinates in
544 terms of the primary display.
545 3. Keep track of the primary display so we can refer to it later.
546 4. Modify the IPC messages to include the primary display's ID so we can easily access it later.
547 5. Modify the PlatformScreen methods to actually use the primary display when appropriate, rather
548 than whichever screen happened to hash to the lowest value.
550 Reviewed by Per Arne Vollan.
552 * UIProcess/WebProcessPool.cpp:
553 (WebKit::displayReconfigurationCallBack): Update for new getScreenProperties implementation.
554 (WebKit::WebProcessPool::initializeNewWebProcess): Ditto.
555 * WebProcess/WebProcess.cpp:
556 (WebKit::WebProcess::setScreenProperties): Ditto.
557 * WebProcess/WebProcess.h:
558 * WebProcess/WebProcess.messages.in: Ditto.
560 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
562 [WPE] Add API version to library soname and pkg-config files
563 https://bugs.webkit.org/show_bug.cgi?id=180608
565 Reviewed by Žan Doberšek.
568 * wpe/wpe-webkit.pc.in:
570 2018-04-09 Jer Noble <jer.noble@apple.com>
572 Fix the selection assistant selectionView build
573 https://bugs.webkit.org/show_bug.cgi?id=184423
574 <rdar://problem/39288235>
576 Reviewed by Wenson Hsieh.
578 * Platform/spi/ios/UIKitSPI.h:
579 * UIProcess/ios/WKContentView.mm:
580 (-[WKContentView _didExitStableState]):
581 * UIProcess/ios/WKContentViewInteraction.mm:
582 (-[WKContentView _updateChangedSelection:]):
584 2018-04-09 Megan Gardner <megan_gardner@apple.com>
586 Switch to UIWKTextInteractionAssistant for non-editable text
587 https://bugs.webkit.org/show_bug.cgi?id=182834
589 Switch to only using one assistant for text selection.
591 Reviewed by Timothy Hatcher and Andy Estes.
593 * UIProcess/ios/WKContentViewInteraction.mm:
594 (-[WKContentView useSelectionAssistantWithGranularity:]):
596 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
598 Unreviewed, move 'using namespace' back to the right place after r230429
600 * Shared/glib/ProcessExecutablePathGLib.cpp:
602 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
604 Unreviewed, rolling out r230390.
606 Broke accelerated compositing
610 "[GTK] WaylandCompositorDisplay leaks its wl_display"
611 https://bugs.webkit.org/show_bug.cgi?id=184406
612 https://trac.webkit.org/changeset/230390
614 2018-04-09 Wenson Hsieh <wenson_hsieh@apple.com>
616 [Extra zoom mode] Disable fast clicking by default in extra zoom mode
617 https://bugs.webkit.org/show_bug.cgi?id=184411
618 <rdar://problem/38726867>
620 Reviewed by Andy Estes.
622 As it turns out, existing fast-clicking heuristics don't work so well in extra zoom mode. Even at device-width,
623 since the page is scaled to fit within the viewport, having single taps take precedence over double taps leads
624 to a confusing experience when trying to double tap to zoom further on content that contains links and other
625 click targets. Revert to legacy behavior here by disabling these heuristics.
627 * UIProcess/API/Cocoa/WKWebView.mm:
628 (-[WKWebView _initializeWithConfiguration:]):
630 2018-04-06 Wenson Hsieh <wenson_hsieh@apple.com>
632 [Extra zoom mode] Add an SPI hook for clients to opt in to focus overlay UI
633 https://bugs.webkit.org/show_bug.cgi?id=184370
634 <rdar://problem/39250494>
636 Reviewed by Timothy Hatcher and Andy Estes.
638 Add a new SPI hook for internal clients to opt in to showing the focused form control overlay. By default, the
639 overlay is not shown.
641 * UIProcess/API/Cocoa/_WKInputDelegate.h:
643 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
645 [WPE] Use GNU install directories
646 https://bugs.webkit.org/show_bug.cgi?id=184377
648 Reviewed by Carlos Garcia Campos.
650 Merge ProcessExecutablePathGtk and ProcessExecutablePathWPE into ProcessExecutablePathGLib.
651 WPE will now load its secondary processes from PKGLIBEXECDIR, like WebKitGTK+.
654 * Shared/glib/ProcessExecutablePathGLib.cpp: Renamed from Source/WebKit/Shared/gtk/ProcessExecutablePathGtk.cpp.
655 (WebKit::getExecutablePath):
656 (WebKit::findWebKitProcess):
657 (WebKit::executablePathOfWebProcess):
658 (WebKit::executablePathOfPluginProcess):
659 (WebKit::executablePathOfNetworkProcess):
660 (WebKit::executablePathOfStorageProcess):
661 * Shared/wpe/ProcessExecutablePathWPE.cpp: Removed.
665 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>
667 [GTK] WaylandCompositorDisplay leaks its wl_display
668 https://bugs.webkit.org/show_bug.cgi?id=184406
670 Reviewed by Carlos Garcia Campos.
672 * WebProcess/gtk/WaylandCompositorDisplay.cpp:
673 (WebKit::WaylandCompositorDisplay::create): Fix a log message (drive-by).
674 (WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay): Fix the leak.
676 2018-04-08 Zan Dobersek <zdobersek@igalia.com>
678 Non-Cocoa ports use default directory for ServiceWorker data during testing
679 https://bugs.webkit.org/show_bug.cgi?id=183784
681 Reviewed by Youenn Fablet.
683 Add API to WKWebsiteDataStore that enables setting and retrieving the
684 service worker registration directory for a given data store object.
685 This enables setting the temporary directory for testing purposes in
688 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
689 (WKWebsiteDataStoreCopyServiceWorkerRegistrationDirectory):
690 (WKWebsiteDataStoreSetServiceWorkerRegistrationDirectory):
691 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
693 2018-04-08 Fujii Hironori <Hironori.Fujii@sony.com>
695 [CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library
696 https://bugs.webkit.org/show_bug.cgi?id=184127
698 Reviewed by Konstantin Tokarev.
700 * CMakeLists.txt: Link with WebCore as private,
701 WebCoreHeaderInterface as public to WebKit if WebCore is a static
704 * PlatformGTK.cmake: Added PRIVATE keyword for WebKit_LIBRARIES.
705 * PlatformWPE.cmake: Ditto.
706 * PlatformWin.cmake: Ditto.
708 2018-04-08 Andy Estes <aestes@apple.com>
710 [iOS] WKContentView and WKLegacyPDFView should share application state tracking logic
711 https://bugs.webkit.org/show_bug.cgi?id=184402
713 Reviewed by Dan Bernstein.
715 WKContentView and WKLegacyPDFView have nearly identical logic for tracking
716 application foreground state. Let's share it so we can more easily create new
717 content views with proper application state tracking.
719 * UIProcess/ios/WKApplicationStateTrackingView.h: Added.
720 * UIProcess/ios/WKApplicationStateTrackingView.mm: Added.
721 (-[WKApplicationStateTrackingView initWithFrame:webView:]):
722 (-[WKApplicationStateTrackingView willMoveToWindow:]):
723 (-[WKApplicationStateTrackingView didMoveToWindow]):
724 (-[WKApplicationStateTrackingView _applicationDidEnterBackground]):
725 (-[WKApplicationStateTrackingView _applicationDidCreateWindowContext]):
726 (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]):
727 (-[WKApplicationStateTrackingView _applicationWillEnterForeground]):
728 (-[WKApplicationStateTrackingView isBackground]):
730 Moved common logic from WKContentView and WKLegacyPDFView into
731 WKApplicationStateTrackingView.
733 * UIProcess/ios/WKContentView.h:
734 * UIProcess/ios/WKContentView.mm:
735 (-[WKContentView initWithFrame:processPool:configuration:webView:]):
736 (-[WKContentView willMoveToWindow:]):
737 (-[WKContentView _applicationDidCreateWindowContext]):
738 (-[WKContentView didMoveToWindow]): Deleted.
739 (-[WKContentView isBackground]): Deleted.
740 (-[WKContentView _applicationDidEnterBackground]): Deleted.
741 (-[WKContentView _applicationDidFinishSnapshottingAfterEnteringBackground]): Deleted.
742 (-[WKContentView _applicationWillEnterForeground]): Deleted.
744 Made WKContentView a subclass of WKApplicationStateTrackingView.
746 * UIProcess/ios/WKLegacyPDFView.h:
747 * UIProcess/ios/WKLegacyPDFView.mm:
748 (-[WKLegacyPDFView web_initWithFrame:webView:]):
749 (-[WKLegacyPDFView web_isBackground]):
750 (-[WKLegacyPDFView _applicationWillEnterForeground]):
751 (-[WKLegacyPDFView willMoveToWindow:]): Deleted.
752 (-[WKLegacyPDFView didMoveToWindow]): Deleted.
753 (-[WKLegacyPDFView _applicationDidEnterBackground]): Deleted.
754 (-[WKLegacyPDFView _applicationDidCreateWindowContext]): Deleted.
755 (-[WKLegacyPDFView _applicationDidFinishSnapshottingAfterEnteringBackground]): Deleted.
757 Made WKLegacyPDFView a subclass of WKApplicationStateTrackingView.
759 * WebKit.xcodeproj/project.pbxproj:
761 2018-04-08 Dan Bernstein <mitz@apple.com>
763 [Cocoa] Keep library validation disabled for WebContent.Development
764 https://bugs.webkit.org/show_bug.cgi?id=184393
766 Reviewed by Anders Carlsson.
768 * Configurations/WebContent.Development.entitlements: Added. Includes the
769 com.apple.security.cs.disable-library-validation entitlement set to true.
770 * Configurations/WebContentService.Development.xcconfig: Set CODE_SIGN_ENTITLEMENTS to the
772 * WebKit.xcodeproj/project.pbxproj: Added reference to new file.
774 2018-04-06 Brian Burg <bburg@apple.com>
776 REGRESSION(r228371): WebAutomationSession::deleteAllCookies doesn't delete some cookies
777 https://bugs.webkit.org/show_bug.cgi?id=184334
778 <rdar://problem/39212863>
780 Reviewed by Timothy Hatcher.
782 When WebDriver adds a cookie for 'localhost', it actually uses the domain '.localhost' per RFC.
783 When deleting cookies, we first fetch all cookies matching the document's hostname, and
784 then delete them one by one. However, this code path does not add the dot prefix. This causes
785 no cookies to match the requested domain, and thus none of them are deleted.
787 * UIProcess/Automation/WebAutomationSession.cpp:
788 (WebKit::domainByAddingDotPrefixIfNeeded): Extract this helper method.
789 (WebKit::WebAutomationSession::addSingleCookie): Use helper method.
790 (WebKit::WebAutomationSession::deleteAllCookies): Add a dot prefix when
791 requesting to delete all cookies for a hostname.
793 2018-04-06 Youenn Fablet <youenn@apple.com>
795 Response headers should be filtered when sent from NetworkProcess to WebProcess
796 https://bugs.webkit.org/show_bug.cgi?id=184310
798 Reviewed by Ryosuke Niwa.
800 Pass destination parameter to NetworkResourceLoader.
801 Use new sanitization routine to filter response headers as needed:
802 - Cross-origin routines are filtered by removing any non CORS allowed headers.
803 - Same-origin responses are filtered by removing non used headers, except when filtering would be visible by JS (XHR, fetch).
804 In all cases, Set-Cookie/Set-Cookie2 headers are filtered out.
806 * NetworkProcess/NetworkResourceLoadParameters.cpp:
807 (WebKit::NetworkResourceLoadParameters::encode const):
808 (WebKit::NetworkResourceLoadParameters::decode):
809 * NetworkProcess/NetworkResourceLoadParameters.h:
810 * NetworkProcess/NetworkResourceLoader.cpp:
811 (WebKit::NetworkResourceLoader::didReceiveResponse):
812 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
813 (WebKit::NetworkResourceLoader::sanitizeResponseIfPossible):
814 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
815 (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
816 * NetworkProcess/NetworkResourceLoader.h:
817 * WebProcess/Network/WebLoaderStrategy.cpp:
818 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
819 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
820 (WebKit::WebSWContextManagerConnection::updatePreferencesStore):
822 2018-04-05 Ryosuke Niwa <rniwa@webkit.org>
824 Make all sync IPCs during ScriptDisallowedScope set DoNotProcessIncomingMessagesWhenWaitingForSyncReply
825 https://bugs.webkit.org/show_bug.cgi?id=182449
826 <rdar://problem/39222541>
828 Reviewed by Chris Dumez.
830 Release assert that a sync IPC inside ScriptDisallowedScope sets DoNotProcessIncomingMessagesWhenWaitingForSyncReply
831 to avoid executing arbitrary scripts as a result of processing incoming sync IPCs.
833 * Platform/IPC/Connection.h:
834 (IPC::Connection::sendSync): Added the release assertion.
836 2018-04-05 Youenn Fablet <youenn@apple.com>
838 REGRESSION (r230223): LayoutTest http/tests/contentextensions/css-display-none-overflows-rule-data-1.html is crashing
839 https://bugs.webkit.org/show_bug.cgi?id=184306
841 Reviewed by Ryosuke Niwa.
843 * NetworkProcess/NetworkContentRuleListManager.cpp:
844 (WebKit::NetworkContentRuleListManager::addContentRuleLists):
846 2018-04-05 Brent Fulgham <bfulgham@apple.com>
848 WebContent process is calling CGDisplayUsesInvertedPolarity
849 https://bugs.webkit.org/show_bug.cgi?id=184337
850 <rdar://problem/39215702>
852 Reviewed by Zalan Bujtas.
854 The PlatformScreenMac code is still calling display-related routines directly, specifically
855 CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray. These should be brokered from
858 There's also no reason to avoid the brokering behavior on current WebKit builds. Remove
859 the compile guards so all macOS builds use this behavior.
861 Finally, add some ProcessPrivilege assertions to guard against accidentally calling these
862 routines in the future.
864 * UIProcess/WebProcessPool.cpp:
865 (WebKit::WebProcessPool::initializeNewWebProcess): Activate screen brokering code for all builds.
866 * WebProcess/WebProcess.cpp: Ditto.
867 * WebProcess/WebProcess.h: Ditto.
868 * WebProcess/WebProcess.messages.in: Ditto.
870 2018-04-05 Brady Eidson <beidson@apple.com>
872 Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
873 <rdar://problem/39162236> and https://bugs.webkit.org/show_bug.cgi?id=184318
875 Reviewed by Andy Estes.
877 * UIProcess/WebPageProxy.cpp:
878 (WebKit::WebPageProxy::receivedPolicyDecision): Don't consider a swap if the navigation is not in the main frame.
880 2018-04-05 Ryosuke Niwa <rniwa@webkit.org>
882 WebContent process sometimes hangs in WebProcess::ensureNetworkProcessConnection
883 https://bugs.webkit.org/show_bug.cgi?id=184326
885 Reviewed by Chris Dumez.
887 The hang was caused by UI process never sending the reply back to GetNetworkProcessConnection
888 due to m_pendingOutgoingMachMessage being set and the event handler for DISPATCH_MACH_SEND_POSSIBLE
889 never getting called. This is because the event handler registration happens asynchronously,
890 and may not have completed by the time we send the first IPC to the web content process
891 in which case it can timeout and we may never get the callback.
893 Fixed the hang by waiting for the event handler registration to be completed using
894 dispatch_source_set_registration_handler. To do this, this patch adds a new boolean instance variable,
895 m_isInitializingSendSource, to Connection which is set to true between the time mach port is created
896 and until the event handler registration has been completed. platformCanSendOutgoingMessages returns
897 false while m_isInitializingSendSource is set to prevent the attempt to send messages like we do when
898 m_pendingOutgoingMachMessage is set to true.
900 * Platform/IPC/Connection.h:
901 (IPC::Connection::m_isInitializingSendSource): Added.
902 * Platform/IPC/mac/ConnectionMac.mm:
903 (IPC::Connection::platformInvalidate): Set m_isInitializingSendSource to false.
904 (IPC::Connection::sendMessage): Assert that m_isInitializingSendSource is false.
905 (IPC::Connection::platformCanSendOutgoingMessages const): Return false if m_isInitializingSendSource
907 (IPC::Connection::sendOutgoingMessage): Assert that m_isInitializingSendSource is false.
908 (IPC::Connection::initializeSendSource): Set m_isInitializingSendSource to true temporarily until
909 dispatch_source_set_registration_handler's callback is called. Resume and send any pending outgoing
911 (IPC::Connection::resumeSendSource): Extracted from initializeSendSource.
913 2018-04-05 Youenn Fablet <youenn@apple.com>
915 WebRTC data channel only applications require capture permissions for direct connections
916 https://bugs.webkit.org/show_bug.cgi?id=174500
917 <rdar://problem/34134281>
920 Changed the code to suppress: "error: unused variable 'error' [-Werror,-Wunused-variable]"
921 Added some logging to this error case as a side bonus.
923 * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
924 (WebKit::NetworkMDNSRegister::registerMDNSName):
926 2018-04-05 Carlos Garcia Campos <cgarcia@igalia.com>
928 REGRESSION(r229831): Test WebKit2.ProvisionalURLAfterWillSendRequestCallback times out since r229831
929 https://bugs.webkit.org/show_bug.cgi?id=184293
931 Reviewed by Alex Christensen.
933 The problem is that after willSendRequest callback changes the request, the load is cancelled while
934 transitioning to committed state. This happens because the load is not waiting for the response policy check, so
935 it continues and when transitioning to committed, FrameLoader::closeURL() invalidates the current policy check
936 that causes a load failure. The new request returned by the API doesn't have any requester, so it's no longer
937 considered a main resource load. In the network process the resource load task doesn't wait for the response
938 policy and continues the load, sending the data to the web process. Once the first data is received, the load
939 transitions to commit, but the response policy check is still ongoing. This can only happen when using the C API
940 (I don't know about the Cocoa API), but not with the GLib API because it doesn't allow to create a new request,
941 only to modify the passed in one. With the C API we loss other internal things of the request like the priority,
942 but I guess the most important one is the requester.
944 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
945 (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
947 2018-04-04 Ryan Haddad <ryanhaddad@apple.com>
949 Unreviewed, rolling out r230283.
951 Caused webkitpy test failures.
955 "Use CompletionHandlers for DelayedReplies"
956 https://bugs.webkit.org/show_bug.cgi?id=182269
957 https://trac.webkit.org/changeset/230283
959 2018-04-04 Youenn Fablet <youenn@apple.com>
961 webrtc/video-update-often.html is flakily crashing on iOS simulator Debug
962 https://bugs.webkit.org/show_bug.cgi?id=184022
964 Reviewed by Jer Noble.
966 Remove client context once the new context identifier is set.
967 Covered by test no longer crashing locally.
969 * WebProcess/cocoa/PlaybackSessionManager.mm:
970 (WebKit::PlaybackSessionManager::setUpPlaybackControlsManager):
972 2018-04-04 Youenn Fablet <youenn@apple.com>
974 WebRTC data channel only applications require capture permissions for direct connections
975 https://bugs.webkit.org/show_bug.cgi?id=174500
976 <rdar://problem/34134281>
978 Reviewed by Eric Carlson.
980 Add support for MDNS registration and resolution by NetworkProcess.
981 WebProcess gives instruction to do the actual registrations/resolutions.
984 * DerivedSources.make:
985 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
986 (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
987 (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
988 * NetworkProcess/NetworkConnectionToWebProcess.h:
989 (WebKit::NetworkConnectionToWebProcess::mdnsRegister):
990 * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: Added.
991 (WebKit::NetworkMDNSRegister::NetworkMDNSRegister):
992 (WebKit::NetworkMDNSRegister::~NetworkMDNSRegister):
993 (WebKit::NetworkMDNSRegister::unregisterMDNSNames):
994 (WebKit::PendingRegistrationRequest::PendingRegistrationRequest):
995 (WebKit::registerMDNSNameCallback):
996 (WebKit::NetworkMDNSRegister::registerMDNSName):
997 (WebKit::PendingResolutionRequest::PendingResolutionRequest):
998 (WebKit::PendingResolutionRequest::~PendingResolutionRequest):
999 (WebKit::PendingResolutionRequest::timeout):
1000 (WebKit::resolveMDNSNameCallback):
1001 (WebKit::NetworkMDNSRegister::resolveMDNSName):
1002 * NetworkProcess/webrtc/NetworkMDNSRegister.h: Added.
1003 * NetworkProcess/webrtc/NetworkMDNSRegister.messages.in: Added.
1004 * Shared/WebPreferences.yaml:
1005 * UIProcess/API/C/WKPreferences.cpp:
1006 (WKPreferencesSetWebRTCMDNSICECandidatesEnabled):
1007 (WKPreferencesGetWebRTCMDNSICECandidatesEnabled):
1008 * UIProcess/API/C/WKPreferencesRef.h:
1009 * WebKit.xcodeproj/project.pbxproj:
1010 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1011 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1012 * WebProcess/Network/NetworkProcessConnection.cpp:
1013 (WebKit::NetworkProcessConnection::didReceiveMessage):
1014 * WebProcess/Network/webrtc/LibWebRTCNetwork.h:
1015 (WebKit::LibWebRTCNetwork::mdnsRegister):
1016 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1017 (WebKit::LibWebRTCProvider::unregisterMDNSNames):
1018 (WebKit::LibWebRTCProvider::registerMDNSName):
1019 (WebKit::LibWebRTCProvider::resolveMDNSName):
1020 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
1021 * WebProcess/Network/webrtc/WebMDNSRegister.cpp: Added.
1022 (WebKit::WebMDNSRegister::finishedRegisteringMDNSName):
1023 (WebKit::WebMDNSRegister::finishedResolvingMDNSName):
1024 (WebKit::WebMDNSRegister::unregisterMDNSNames):
1025 (WebKit::WebMDNSRegister::registerMDNSName):
1026 (WebKit::WebMDNSRegister::resolveMDNSName):
1027 * WebProcess/Network/webrtc/WebMDNSRegister.h: Added.
1028 * WebProcess/Network/webrtc/WebMDNSRegister.messages.in: Added.
1030 2018-04-04 Alex Christensen <achristensen@webkit.org>
1032 Use CompletionHandlers for DelayedReplies
1033 https://bugs.webkit.org/show_bug.cgi?id=182269
1035 Reviewed by Youenn Fablet.
1037 DelayedReplies should be a noncopyable, non-refcountable type. They should be
1038 called once and only once. This is what CompletionHandlers are for.
1040 No change in behavior. Just cleaner code.
1042 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1043 (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
1044 * NetworkProcess/NetworkConnectionToWebProcess.h:
1045 * NetworkProcess/NetworkResourceLoader.cpp:
1046 (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
1047 (WebKit::sendReplyToSynchronousRequest):
1048 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1049 * NetworkProcess/NetworkResourceLoader.h:
1050 * Platform/IPC/Connection.h:
1051 * Platform/IPC/HandleMessage.h:
1052 (IPC::callMemberFunctionImpl):
1053 (IPC::callMemberFunction):
1054 (IPC::handleMessageDelayed):
1055 * PluginProcess/PluginControllerProxy.cpp:
1056 (WebKit::PluginControllerProxy::setInitializationReply):
1057 (WebKit::PluginControllerProxy::takeInitializationReply):
1058 * PluginProcess/PluginControllerProxy.h:
1059 * PluginProcess/WebProcessConnection.cpp:
1060 (WebKit::WebProcessConnection::destroyPlugin):
1061 (WebKit::WebProcessConnection::createPlugin):
1062 (WebKit::WebProcessConnection::createPluginAsynchronously):
1063 * PluginProcess/WebProcessConnection.h:
1064 * Scripts/webkit/messages.py:
1065 (message_to_struct_declaration):
1066 (generate_message_handler):
1067 * UIProcess/Network/NetworkProcessProxy.cpp:
1068 (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
1069 (WebKit::NetworkProcessProxy::networkProcessCrashed):
1070 (WebKit::NetworkProcessProxy::networkProcessFailedToLaunch):
1071 (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
1072 * UIProcess/Network/NetworkProcessProxy.h:
1073 * UIProcess/Plugins/PluginProcessManager.cpp:
1074 (WebKit::PluginProcessManager::getPluginProcessConnection):
1075 * UIProcess/Plugins/PluginProcessManager.h:
1076 * UIProcess/Plugins/PluginProcessProxy.cpp:
1077 (WebKit::PluginProcessProxy::getPluginProcessConnection):
1078 (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1079 (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
1080 * UIProcess/Plugins/PluginProcessProxy.h:
1081 * UIProcess/Storage/StorageProcessProxy.cpp:
1082 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1083 (WebKit::StorageProcessProxy::didClose):
1084 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
1085 * UIProcess/Storage/StorageProcessProxy.h:
1086 * UIProcess/WebPageProxy.cpp:
1087 (WebKit::ExceededDatabaseQuotaRecords::createRecord):
1088 (WebKit::WebPageProxy::createNewPage):
1089 (WebKit::WebPageProxy::runJavaScriptAlert):
1090 (WebKit::WebPageProxy::runJavaScriptConfirm):
1091 (WebKit::WebPageProxy::runJavaScriptPrompt):
1092 (WebKit::WebPageProxy::webGLPolicyForURL):
1093 (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
1094 (WebKit::WebPageProxy::getToolbarsAreVisible):
1095 (WebKit::WebPageProxy::getMenuBarIsVisible):
1096 (WebKit::WebPageProxy::getStatusBarIsVisible):
1097 (WebKit::WebPageProxy::getWindowFrame):
1098 (WebKit::WebPageProxy::screenToRootView):
1099 (WebKit::WebPageProxy::rootViewToScreen):
1100 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
1101 (WebKit::WebPageProxy::exceededDatabaseQuota):
1102 (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
1103 * UIProcess/WebPageProxy.h:
1104 * UIProcess/WebProcessPool.cpp:
1105 (WebKit::WebProcessPool::networkProcessCrashed):
1106 (WebKit::WebProcessPool::getNetworkProcessConnection):
1107 (WebKit::WebProcessPool::getStorageProcessConnection):
1108 * UIProcess/WebProcessPool.h:
1109 * UIProcess/WebProcessProxy.cpp:
1110 (WebKit::WebProcessProxy::getPluginProcessConnection):
1111 (WebKit::WebProcessProxy::getNetworkProcessConnection):
1112 (WebKit::WebProcessProxy::getStorageProcessConnection):
1113 * UIProcess/WebProcessProxy.h:
1114 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1115 (WebKit::WebSWContextManagerConnection::syncTerminateWorker):
1116 * WebProcess/Storage/WebSWContextManagerConnection.h:
1117 * WebProcess/WebPage/WebPage.h:
1118 * WebProcess/WebPage/ios/WebPageIOS.mm:
1119 (WebKit::WebPage::computePagesForPrintingAndDrawToPDF):
1121 2018-04-04 Alex Christensen <achristensen@webkit.org>
1123 Remove legacyCustomProtocolManager from NetworkSessionCreationParameters
1124 https://bugs.webkit.org/show_bug.cgi?id=182178
1126 Reviewed by Youenn Fablet.
1128 Now that we only make NetworkSessions in the NetworkProcess, we don't need to pass this parameter around.
1130 * NetworkProcess/NetworkProcess.cpp:
1131 (WebKit::NetworkProcess::initializeNetworkProcess):
1132 * NetworkProcess/NetworkSessionCreationParameters.h:
1133 (WebKit::NetworkSessionCreationParameters::decode):
1134 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1135 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1136 * NetworkProcess/mac/RemoteNetworkingContext.mm:
1137 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
1138 * Shared/WebsiteDataStoreParameters.cpp:
1139 (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
1140 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1141 (WebKit::WebsiteDataStore::parameters):
1143 2018-04-04 Alex Christensen <achristensen@webkit.org>
1145 Move PingHandle to WebKitLegacy
1146 https://bugs.webkit.org/show_bug.cgi?id=184145
1148 Reviewed by Youenn Fablet.
1150 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1152 2018-04-04 Brent Fulgham <bfulgham@apple.com>
1154 Failures from mach port reference handling should be fatal
1155 https://bugs.webkit.org/show_bug.cgi?id=184202
1156 <rdar://problem/37771114>
1158 Reviewed by Anders Carlsson.
1160 Update for new location of MachSendRight.h. Switch to
1161 #pragma once in a few places.
1163 * Platform/IPC/mac/ConnectionMac.mm:
1164 (IPC::Connection::platformInvalidate): Adopt new 'safe mach_port_t deallocation' function.
1165 (IPC::Connection::initializeSendSource): Ditto.
1166 (IPC::Connection::receiveSourceEventHandler): Ditto.
1167 * Platform/SharedMemory.h:
1168 * Platform/cocoa/SharedMemoryCocoa.cpp:
1169 (WebKit::SharedMemory::Handle::clear): Ditto.
1170 (WebKit::makeMemoryEntry): Ditto.
1171 (WebKit::SharedMemory::createSendRight const): Ditto.
1172 * Platform/mac/LayerHostingContext.h:
1173 * Platform/mac/LayerHostingContext.mm:
1174 * PluginProcess/PluginControllerProxy.h:
1175 * PluginProcess/PluginProcess.h:
1176 (WebKit::PluginProcess::compositingRenderServerPort const):
1177 * Scripts/messages.py:
1178 (headers_for_type): Update for new location of MachSendRight.
1179 * Shared/Plugins/PluginProcessCreationParameters.h:
1180 * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
1181 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
1182 (WebKit::RemoteLayerBackingStore::encode const):
1183 * Shared/WebCoreArgumentCoders.h:
1184 * Shared/WebProcessCreationParameters.h:
1185 * Shared/mac/WebCoreArgumentCodersMac.mm:
1186 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1187 * UIProcess/DrawingAreaProxy.cpp:
1188 * UIProcess/DrawingAreaProxy.h:
1189 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1190 (WebKit::ProcessLauncher::launchProcess): Ditto. Remove uneeded mach_port_dealloc called after
1191 xpc_dictionary_set_mach_send. While '..._set_mach_send' retains the send right, it gets automatically
1192 released when the message is handled. We only want to manually deallocate the send right if
1193 the message failed to send.
1194 * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
1195 * UIProcess/WebPageProxy.cpp:
1196 * UIProcess/WebPageProxy.h:
1197 * UIProcess/WebPageProxy.messages.in:
1198 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1199 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1200 * UIProcess/mac/WKViewLayoutStrategy.mm:
1201 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1202 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1203 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1204 * WebProcess/Plugins/PluginController.h:
1205 * WebProcess/Plugins/PluginView.h:
1206 * WebProcess/WebPage/DrawingArea.h:
1207 (WebKit::DrawingArea::addFence):
1208 (WebKit::DrawingArea::updateGeometry):
1209 * WebProcess/WebPage/DrawingArea.messages.in:
1210 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1211 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1212 (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
1213 * WebProcess/WebPage/WebPage.cpp:
1214 (WebKit::WebPage::setTopContentInsetFenced):
1215 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1216 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1217 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1218 * WebProcess/WebProcess.h:
1219 (WebKit::WebProcess::compositingRenderServerPort const):
1220 * WebProcess/cocoa/VideoFullscreenManager.mm:
1221 (WebKit::VideoFullscreenManager::setVideoLayerFrameFenced):
1223 2018-04-04 Beth Dakin <bdakin@apple.com>
1225 Fix the print formatter build
1226 https://bugs.webkit.org/show_bug.cgi?id=184289
1228 rdar://problem/39164641
1230 Reviewed by Dan Bernstein.
1232 * UIProcess/API/Cocoa/WKWebView.mm:
1233 (-[WKWebView _webViewPrintFormatter]):
1234 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1235 * UIProcess/_WKWebViewPrintFormatter.h:
1236 * UIProcess/_WKWebViewPrintFormatter.mm:
1237 * UIProcess/_WKWebViewPrintFormatterInternal.h:
1238 * UIProcess/ios/WKContentView.mm:
1239 * UIProcess/ios/WKPDFView.mm:
1241 2018-04-04 Andy Estes <aestes@apple.com>
1243 [iOS] Rename WKPDFView to WKLegacyPDFView
1244 https://bugs.webkit.org/show_bug.cgi?id=184286
1246 Rubber-stamped by Wenson Hsieh.
1248 A series of upcoming patches will implement a new WKPDFView based on PDFKit.
1250 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1251 (-[WKWebViewContentProviderRegistry init]):
1252 * UIProcess/ios/WKLegacyPDFView.h: Renamed from Source/WebKit/UIProcess/ios/WKPDFView.h.
1253 * UIProcess/ios/WKLegacyPDFView.mm: Renamed from Source/WebKit/UIProcess/ios/WKPDFView.mm.
1254 (-[WKLegacyPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
1255 * WebKit.xcodeproj/project.pbxproj:
1257 2018-04-04 Yousuke Kimoto <yousuke.kimoto@sony.com> and Fujii Hironori <Hironori.Fujii@sony.com>
1259 [WinCairo] Add WebKit Shared/win files for wincairo webkit
1260 https://bugs.webkit.org/show_bug.cgi?id=183044
1262 Reviewed by Alex Christensen.
1264 * Shared/win/ChildProcessMainWin.cpp: Added.
1266 2018-04-04 Wenson Hsieh <wenson_hsieh@apple.com>
1268 [Extra zoom mode] Remove effective font size constraints when determining focus zoom scale
1269 https://bugs.webkit.org/show_bug.cgi?id=184287
1270 <rdar://problem/39063886>
1272 Reviewed by Timothy Hatcher.
1274 As it turns out, form controls on some important websites can be very wide, with a small font size, which
1275 renders the approach taken in <https://trac.webkit.org/r230171> moot, since we'll just end up zooming to a scale
1276 that is too large anyways. To mitigate this for now, remove the minimum font scaling threshold while we think of
1277 more clever ways to account for this scenario.
1279 * UIProcess/API/Cocoa/WKWebView.mm:
1280 (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
1282 2018-04-04 Fujii Hironori <Hironori.Fujii@sony.com>
1284 [Win] WebFrameLoaderClient: 'getpid': identifier not found
1285 https://bugs.webkit.org/show_bug.cgi?id=184291
1287 Reviewed by Konstantin Tokarev.
1289 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1290 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1291 Use WTF::getCurrentProcessID() instead of getpid().
1292 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1294 2018-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
1296 ASSERTION FAILED: !m_mainFrame->coreFrame()->loader().frameHasLoaded() || !m_pendingNavigationID when reloading page while a page is loading
1297 https://bugs.webkit.org/show_bug.cgi?id=153210
1299 Reviewed by Alex Christensen.
1301 The assert happens when WebPage::reload() is called twice and the first time the reload is ignored by
1302 FrameLoader because the document URL is empty. In that case the pending navigation is not reset, because
1303 FrameLoader::reload() returns before creating the document loader.
1305 * WebProcess/WebPage/WebPage.cpp:
1306 (WebKit::WebPage::reload): Check if the pending navigation has been reset after calling FrameLoader::reload()
1307 and reset it otherwise.
1309 2018-04-03 Youenn Fablet <youenn@apple.com>
1311 Make NetworkProcess get ContentBlocker information from UIProcess
1312 https://bugs.webkit.org/show_bug.cgi?id=184205
1313 <rdar://problem/39146551>
1316 Updated decode/encode methods to not hit null identifier assertion.
1318 * Shared/WebPageCreationParameters.cpp:
1319 (WebKit::WebPageCreationParameters::encode const):
1320 (WebKit::WebPageCreationParameters::decode):
1321 * Shared/WebPageGroupData.cpp:
1322 (WebKit::WebPageGroupData::encode const):
1323 (WebKit::WebPageGroupData::decode):
1325 2018-04-03 Andy Estes <aestes@apple.com>
1327 [iOS] WKWebView shouldn't know about WKPDFView
1328 https://bugs.webkit.org/show_bug.cgi?id=184283
1330 Reviewed by Timothy Hatcher.
1332 WKWebView shouldn't be checking if _customContentView is a particular kind of
1333 class (e.g., WKPDFView). Instead, it should interact with the _customContentView
1334 using the WKWebViewContentProvider protocol.
1336 Reimplement -_isBackground, -_isDisplayingPDF, -_dataForDisplayedPDF, and
1337 -_suggestedFilenameForDisplayedPDF using new WKWebViewContentProvider protocol
1338 methods that WKPDFView implements.
1340 * UIProcess/API/Cocoa/WKWebView.mm:
1341 (-[WKWebView _isBackground]):
1342 (-[WKWebView _isDisplayingPDF]):
1343 (-[WKWebView _dataForDisplayedPDF]):
1344 (-[WKWebView _suggestedFilenameForDisplayedPDF]):
1345 * UIProcess/Cocoa/WKWebViewContentProvider.h:
1346 * UIProcess/ios/WKPDFView.h:
1347 * UIProcess/ios/WKPDFView.mm:
1348 (-[WKPDFView web_dataRepresentation]):
1349 (-[WKPDFView web_suggestedFilename]):
1350 (-[WKPDFView web_isBackground]):
1351 (-[WKPDFView suggestedFilename]): Deleted.
1352 (-[WKPDFView pdfDocument]): Deleted.
1353 (-[WKPDFView isBackground]): Deleted.
1355 2018-04-03 Brent Fulgham <bfulgham@apple.com>
1357 Guard against keychain/certificate access outside the network process
1358 https://bugs.webkit.org/show_bug.cgi?id=184214
1359 <rdar://problem/38734795>
1361 Reviewed by Youenn Fablet.
1363 Use the ProcessPrivilege assertions to guard against accessing the Keychain from
1364 a non-Networking process.
1366 * Shared/cf/ArgumentCodersCF.cpp:
1367 (IPC::encode): Assert if we access the keychain from a proces other than the Network or UI process.
1368 (IPC::decode): Ditto.
1370 2018-04-03 Youenn Fablet <youenn@apple.com>
1372 NetworkResourceLoader does not need to expose all redirect response headers
1373 https://bugs.webkit.org/show_bug.cgi?id=184114
1374 <rdar://problem/39010557>
1376 Reviewed by Ryosuke Niwa.
1378 WebProcess instructs NetworkProcess whether to sanitize response headers based on a runtime flag.
1379 We sanitize redirection response headers in case this is not related to a navigation load.
1380 Navigation loads may currently require the full response for content blockers.
1382 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1383 (WebKit::NetworkResourceLoadParameters::encode const):
1384 (WebKit::NetworkResourceLoadParameters::decode):
1385 * NetworkProcess/NetworkResourceLoadParameters.h:
1386 * NetworkProcess/NetworkResourceLoader.cpp:
1387 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
1388 (WebKit::NetworkResourceLoader::sanitizeRedirectResponseIfPossible):
1389 (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
1390 * NetworkProcess/NetworkResourceLoader.h:
1391 * Shared/WebPreferences.yaml:
1392 * UIProcess/API/C/WKPreferences.cpp:
1393 (WKPreferencesSetRestrictedHTTPResponseAccess):
1394 (WKPreferencesGetRestrictedHTTPResponseAccess):
1395 * UIProcess/API/C/WKPreferencesRef.h:
1396 * WebProcess/Network/WebLoaderStrategy.cpp:
1397 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
1398 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1399 (WebKit::WebLoaderStrategy::startPingLoad):
1400 (WebKit::WebLoaderStrategy::preconnectTo):
1402 2018-04-03 Youenn Fablet <youenn@apple.com>
1404 Make NetworkProcess get ContentBlocker information from UIProcess
1405 https://bugs.webkit.org/show_bug.cgi?id=184205
1407 Reviewed by Alex Christensen.
1409 Make NetworkProcess get content blockers from UIProcess directly.
1410 Before that patch, WebProcess sent content blockers to NetworkProcess for each PingLoad.
1411 Instead, WebProcess sends the content blocker identifier for each PingLoad and NetworkProcess fetches the content blocker once.
1413 This is both more efficient than passing them for each PingLoad and safer in the sense
1414 that a compromised WebProcess will not be able to bypass any of these.
1415 In the future, NetworkProcess should get the content blocker identifier directly from the WebPageID attached to the request.
1417 Covered by existing beacon+content blocker tests.
1419 Did some refactoring to add a typed content blocker identifier.
1420 Once NetworkProcess fetches a given content blocker, the content blocker will send any modification to NetworkProcess.
1421 Introduced NetworkContentRuleListManager to handle the content blockers in NetworkProcess.
1424 * DerivedSources.make:
1425 * NetworkProcess/NetworkLoadChecker.cpp:
1426 (WebKit::NetworkLoadChecker::checkRequest):
1427 (WebKit::NetworkLoadChecker::continueCheckingRequest):
1428 (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
1429 * NetworkProcess/NetworkLoadChecker.h:
1430 (WebKit::NetworkLoadChecker::setContentExtensionController):
1431 * NetworkProcess/NetworkProcess.cpp:
1432 (WebKit::NetworkProcess::didReceiveMessage):
1433 * NetworkProcess/NetworkProcess.h:
1434 (WebKit::NetworkProcess::networkUserContentController):
1435 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1436 (WebKit::NetworkResourceLoadParameters::encode const):
1437 (WebKit::NetworkResourceLoadParameters::decode):
1438 * NetworkProcess/NetworkResourceLoadParameters.h:
1439 * NetworkProcess/NetworkContentRuleListManager.cpp: Added.
1440 (WebKit::NetworkContentRuleListManager::contentExtensionsBackend):
1441 (WebKit::NetworkContentRuleListManager::addContentRuleLists):
1442 (WebKit::NetworkContentRuleListManager::removeContentRuleList):
1443 (WebKit::NetworkContentRuleListManager::removeAllContentRuleLists):
1444 (WebKit::NetworkContentRuleListManager::remove):
1445 * NetworkProcess/NetworkContentRuleListManager.h: Added.
1446 * NetworkProcess/NetworkContentRuleListManager.messages.in: Added.
1447 * NetworkProcess/PingLoad.cpp:
1448 * Scripts/webkit/messages.py:
1449 * Shared/UserContentControllerIdentifier.h: Added.
1450 * Shared/WebPageCreationParameters.cpp:
1451 (WebKit::WebPageCreationParameters::decode):
1452 * Shared/WebPageCreationParameters.h:
1453 * Shared/WebPageGroupData.cpp:
1454 (WebKit::WebPageGroupData::decode):
1455 * Shared/WebPageGroupData.h:
1456 * UIProcess/Network/NetworkProcessProxy.cpp:
1457 (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
1458 (WebKit::NetworkProcessProxy::contentExtensionRules):
1459 (WebKit::NetworkProcessProxy::didDestroyWebUserContentControllerProxy):
1460 * UIProcess/Network/NetworkProcessProxy.h:
1461 * UIProcess/Network/NetworkProcessProxy.messages.in:
1462 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1463 (WebKit::WebUserContentControllerProxy::get):
1464 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1465 (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
1466 (WebKit::WebUserContentControllerProxy::addProcess):
1467 (WebKit::WebUserContentControllerProxy::removeProcess):
1468 (WebKit::WebUserContentControllerProxy::addUserContentWorldUse):
1469 (WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
1470 (WebKit::WebUserContentControllerProxy::addUserScript):
1471 (WebKit::WebUserContentControllerProxy::removeUserScript):
1472 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1473 (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
1474 (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
1475 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
1476 (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
1477 (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
1478 (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
1479 (WebKit::WebUserContentControllerProxy::addContentRuleList):
1480 (WebKit::WebUserContentControllerProxy::removeContentRuleList):
1481 (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
1482 * UIProcess/UserContent/WebUserContentControllerProxy.h:
1483 (WebKit::WebUserContentControllerProxy::create):
1484 (WebKit::WebUserContentControllerProxy::addNetworkProcess):
1485 (WebKit::WebUserContentControllerProxy::removeNetworkProcess):
1486 (WebKit::WebUserContentControllerProxy::contentExtensionRules):
1487 (WebKit::WebUserContentControllerProxy::identifier const):
1488 * WebKit.xcodeproj/project.pbxproj:
1489 * WebProcess/Network/WebLoaderStrategy.cpp:
1490 (WebKit::WebLoaderStrategy::startPingLoad):
1491 * WebProcess/UserContent/WebUserContentController.cpp:
1492 (WebKit::WebUserContentController::getOrCreate):
1493 (WebKit::WebUserContentController::WebUserContentController):
1494 (WebKit::WebUserContentController::~WebUserContentController):
1495 * WebProcess/UserContent/WebUserContentController.h:
1496 * WebProcess/WebPage/WebPage.h:
1497 (WebKit::WebPage::userContentControllerIdentifier const):
1499 2018-04-03 Andy Estes <aestes@apple.com>
1501 [Mac] Prioritize file promises over filenames during drag and drop
1502 https://bugs.webkit.org/show_bug.cgi?id=184237
1503 <rdar://problem/38278076>
1505 Reviewed by Wenson Hsieh.
1507 * UIProcess/Cocoa/WebViewImpl.mm:
1508 (WebKit::WebViewImpl::performDragOperation):
1510 2018-04-03 Brady Eidson <beidson@apple.com>
1512 Make SessionStorage work with process swapping.
1513 https://bugs.webkit.org/show_bug.cgi?id=184270
1515 Reviewed by Andy Estes.
1517 Due to a minor process accounting error, WebPageProxys weren't always being reconnected with their
1518 WebsiteDataStore's StorageManager when doing process swaps.
1520 Fix that error, and SessionStorage "just works."
1522 * UIProcess/WebPageProxy.cpp:
1523 (WebKit::WebPageProxy::webProcessWillShutDown):
1524 (WebKit::WebPageProxy::processDidTerminate): For NavigationSwap termination, make sure to tell the
1525 process lifetime tracker that this page was removed.
1527 * UIProcess/WebProcessLifetimeObserver.h:
1528 (WebKit::WebProcessLifetimeObserver::webPageWasInvalidated): Renamed from "webPageWasRemoved"
1529 (WebKit::WebProcessLifetimeObserver::webPageWasRemoved): Deleted.
1531 * UIProcess/WebProcessLifetimeTracker.cpp:
1532 (WebKit::WebProcessLifetimeTracker::webPageLeavingWebProcess): Renamed from "webProcessWillShutDown"
1533 (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
1534 (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown): Deleted.
1535 * UIProcess/WebProcessLifetimeTracker.h:
1537 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1538 (WebKit::WebsiteDataStore::webPageWasInvalidated):
1539 (WebKit::WebsiteDataStore::webPageWasRemoved): Deleted.
1540 * UIProcess/WebsiteData/WebsiteDataStore.h:
1542 2018-04-03 Commit Queue <commit-queue@webkit.org>
1544 Unreviewed, rolling out r230210.
1545 https://bugs.webkit.org/show_bug.cgi?id=184277
1547 it is breaking internal bots (Requested by youenn on #webkit).
1551 "Make NetworkProcess get ContentBlocker information from
1553 https://bugs.webkit.org/show_bug.cgi?id=184205
1554 https://trac.webkit.org/changeset/230210
1556 2018-04-03 Wenson Hsieh <wenson_hsieh@apple.com>
1558 [Extra zoom mode] Update time picker to use platform view controller
1559 https://bugs.webkit.org/show_bug.cgi?id=184252
1560 <rdar://problem/38804795>
1562 Reviewed by Andy Estes.
1564 Adjust for some small WKTimePickerViewController changes, and remove some files that we no longer need.
1566 * UIProcess/ios/WKContentViewInteraction.mm:
1567 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1568 (-[WKContentView textInputController:didCommitText:]): Deleted.
1569 (-[WKContentView textInputController:didCommitText:withSuggestion:]): Deleted.
1570 (-[WKContentView textInputControllerDidRequestDismissal:]): Deleted.
1571 * UIProcess/ios/forms/WKTextFormControlViewController.h: Removed.
1572 * UIProcess/ios/forms/WKTextFormControlViewController.mm: Removed.
1573 * UIProcess/ios/forms/WKTextSuggestionButton.h: Removed.
1574 * UIProcess/ios/forms/WKTextSuggestionButton.mm: Removed.
1575 * WebKit.xcodeproj/project.pbxproj:
1577 2018-04-03 Ross Kirsling <ross.kirsling@sony.com>
1579 Xcode prepends line comments from WTF/Compiler.h to *.sb files
1580 https://bugs.webkit.org/show_bug.cgi?id=184166
1582 Reviewed by Brent Fulgham.
1584 * DerivedSources.make:
1585 Strip ;-comments from *.sb.in files before preprocessing so we can stop treating Platform.h/Compiler.h as C89.
1587 2018-04-03 Chris Dumez <cdumez@apple.com>
1589 Drop MainFrame class
1590 https://bugs.webkit.org/show_bug.cgi?id=184191
1592 Reviewed by Darin Adler.
1594 Drop MainFrame class and move contents into Page / Frame since there is a 1:1
1595 relationship between the Page and the MainFrame.
1597 This is ground work for introducing LocalFrame / RemoteFrame concepts.
1599 * Shared/WebRenderLayer.cpp:
1600 * Shared/WebRenderObject.cpp:
1601 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
1602 (WebKit::WebPaymentCoordinator::paymentCoordinator):
1603 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1604 * WebProcess/FullScreen/WebFullScreenManager.cpp:
1605 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1606 (WKBundlePageInstallPageOverlay):
1607 (WKBundlePageUninstallPageOverlay):
1608 (WKBundlePageInstallPageOverlayWithAnimation):
1609 (WKBundlePageUninstallPageOverlayWithAnimation):
1610 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1611 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1612 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1613 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1614 * WebProcess/Plugins/PluginView.cpp:
1615 * WebProcess/Plugins/WebPluginInfoProvider.cpp:
1616 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1617 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1618 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1619 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1620 (WebKit::WebInspectorClient::~WebInspectorClient):
1621 (WebKit::WebInspectorClient::highlight):
1622 (WebKit::WebInspectorClient::hideHighlight):
1623 (WebKit::WebInspectorClient::showPaintRect):
1624 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1625 * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
1626 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1627 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1628 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1629 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1630 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1631 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1632 * WebProcess/WebPage/FindController.cpp:
1633 (WebKit::FindController::updateFindUIAfterPageScroll):
1634 (WebKit::FindController::hideFindUI):
1635 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
1636 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1637 (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
1638 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1639 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1640 * WebProcess/WebPage/WebFrame.cpp:
1641 * WebProcess/WebPage/WebInspector.cpp:
1642 * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
1643 * WebProcess/WebPage/WebPage.cpp:
1644 (WebKit::WebPage::mainFrame const):
1645 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1646 (WebKit::WebPage::plugInIntersectsSearchRect):
1647 * WebProcess/WebPage/WebPage.h:
1648 * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
1649 * WebProcess/WebPage/ios/FindControllerIOS.mm:
1650 * WebProcess/WebPage/ios/WebPageIOS.mm:
1651 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1652 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
1653 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1654 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1655 (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
1656 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1657 * WebProcess/WebPage/mac/WebPageMac.mm:
1658 (WebKit::WebPage::performImmediateActionHitTestAtLocation):
1659 (WebKit::WebPage::dataDetectorsDidPresentUI):
1660 (WebKit::WebPage::dataDetectorsDidChangeUI):
1661 (WebKit::WebPage::dataDetectorsDidHideUI):
1662 * WebProcess/WebProcess.cpp:
1663 * WebProcess/WebStorage/StorageAreaMap.cpp:
1665 2018-04-03 Youenn Fablet <youenn@apple.com>
1667 Make NetworkProcess get ContentBlocker information from UIProcess
1668 https://bugs.webkit.org/show_bug.cgi?id=184205
1670 Reviewed by Alex Christensen.
1672 Make NetworkProcess get content blockers from UIProcess directly.
1673 Before that patch, WebProcess sent content blockers to NetworkProcess for each PingLoad.
1674 Instead, WebProcess sends the content blocker identifier for each PingLoad and NetworkProcess fetches the content blocker once.
1676 This is both more efficient than passing them for each PingLoad and safer in the sense
1677 that a compromised WebProcess will not be able to bypass any of these.
1678 In the future, NetworkProcess should get the content blocker identifier directly from the WebPageID attached to the request.
1680 Covered by existing beacon+content blocker tests.
1682 Did some refactoring to add a typed content blocker identifier.
1683 Once NetworkProcess fetches a given content blocker, the content blocker will send any modification to NetworkProcess.
1684 Introduced NetworkContentRuleListManager to handle the content blockers in NetworkProcess.
1687 * DerivedSources.make:
1688 * NetworkProcess/NetworkLoadChecker.cpp:
1689 (WebKit::NetworkLoadChecker::checkRequest):
1690 (WebKit::NetworkLoadChecker::continueCheckingRequest):
1691 (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
1692 * NetworkProcess/NetworkLoadChecker.h:
1693 (WebKit::NetworkLoadChecker::setContentExtensionController):
1694 * NetworkProcess/NetworkProcess.cpp:
1695 (WebKit::NetworkProcess::didReceiveMessage):
1696 * NetworkProcess/NetworkProcess.h:
1697 (WebKit::NetworkProcess::networkUserContentController):
1698 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1699 (WebKit::NetworkResourceLoadParameters::encode const):
1700 (WebKit::NetworkResourceLoadParameters::decode):
1701 * NetworkProcess/NetworkResourceLoadParameters.h:
1702 * NetworkProcess/NetworkContentRuleListManager.cpp: Added.
1703 (WebKit::NetworkContentRuleListManager::contentExtensionsBackend):
1704 (WebKit::NetworkContentRuleListManager::addContentRuleLists):
1705 (WebKit::NetworkContentRuleListManager::removeContentRuleList):
1706 (WebKit::NetworkContentRuleListManager::removeAllContentRuleLists):
1707 (WebKit::NetworkContentRuleListManager::remove):
1708 * NetworkProcess/NetworkContentRuleListManager.h: Added.
1709 * NetworkProcess/NetworkContentRuleListManager.messages.in: Added.
1710 * NetworkProcess/PingLoad.cpp:
1711 * Scripts/webkit/messages.py:
1712 * Shared/UserContentControllerIdentifier.h: Added.
1713 * Shared/WebPageCreationParameters.cpp:
1714 (WebKit::WebPageCreationParameters::decode):
1715 * Shared/WebPageCreationParameters.h:
1716 * Shared/WebPageGroupData.cpp:
1717 (WebKit::WebPageGroupData::decode):
1718 * Shared/WebPageGroupData.h:
1719 * UIProcess/Network/NetworkProcessProxy.cpp:
1720 (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
1721 (WebKit::NetworkProcessProxy::contentExtensionRules):
1722 (WebKit::NetworkProcessProxy::didDestroyWebUserContentControllerProxy):
1723 * UIProcess/Network/NetworkProcessProxy.h:
1724 * UIProcess/Network/NetworkProcessProxy.messages.in:
1725 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1726 (WebKit::WebUserContentControllerProxy::get):
1727 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1728 (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
1729 (WebKit::WebUserContentControllerProxy::addProcess):
1730 (WebKit::WebUserContentControllerProxy::removeProcess):
1731 (WebKit::WebUserContentControllerProxy::addUserContentWorldUse):
1732 (WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
1733 (WebKit::WebUserContentControllerProxy::addUserScript):
1734 (WebKit::WebUserContentControllerProxy::removeUserScript):
1735 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1736 (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
1737 (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
1738 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
1739 (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
1740 (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
1741 (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
1742 (WebKit::WebUserContentControllerProxy::addContentRuleList):
1743 (WebKit::WebUserContentControllerProxy::removeContentRuleList):
1744 (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
1745 * UIProcess/UserContent/WebUserContentControllerProxy.h:
1746 (WebKit::WebUserContentControllerProxy::create):
1747 (WebKit::WebUserContentControllerProxy::addNetworkProcess):
1748 (WebKit::WebUserContentControllerProxy::removeNetworkProcess):
1749 (WebKit::WebUserContentControllerProxy::contentExtensionRules):
1750 (WebKit::WebUserContentControllerProxy::identifier const):
1751 * WebKit.xcodeproj/project.pbxproj:
1752 * WebProcess/Network/WebLoaderStrategy.cpp:
1753 (WebKit::WebLoaderStrategy::startPingLoad):
1754 * WebProcess/UserContent/WebUserContentController.cpp:
1755 (WebKit::WebUserContentController::getOrCreate):
1756 (WebKit::WebUserContentController::WebUserContentController):
1757 (WebKit::WebUserContentController::~WebUserContentController):
1758 * WebProcess/UserContent/WebUserContentController.h:
1759 * WebProcess/WebPage/WebPage.h:
1760 (WebKit::WebPage::userContentControllerIdentifier const):
1762 2018-04-02 Beth Dakin <bdakin@apple.com>
1764 Fix the managed configurations build
1765 https://bugs.webkit.org/show_bug.cgi?id=184253
1767 rdar://problem/39078586
1769 Reviewed by Dan Bernstein.
1771 * UIProcess/ios/WKContentViewInteraction.mm:
1772 (-[WKContentView canPerformActionForWebView:withSender:]):
1773 (-[WKContentView _defineForWebView:]):
1775 2018-04-02 Carlos Garcia Campos <cgarcia@igalia.com>
1777 [Enchant] Clean up TextCheckerEnchant
1778 https://bugs.webkit.org/show_bug.cgi?id=184233
1780 Reviewed by Michael Catanzaro.
1782 Use TextCheckerEnchant as a singleton now, instead of implementing the singleton here.
1784 * UIProcess/gtk/TextCheckerGtk.cpp:
1785 (WebKit::TextChecker::checkSpellingOfString):
1786 (WebKit::TextChecker::getGuessesForWord):
1787 (WebKit::TextChecker::learnWord):
1788 (WebKit::TextChecker::ignoreWord):
1789 (WebKit::TextChecker::setSpellCheckingLanguages):
1790 (WebKit::TextChecker::loadedSpellCheckingLanguages):
1791 (WebKit::enchantTextChecker): Deleted.
1793 2018-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
1795 [GTK] NetworkProcess from WebKitGtk+ 2.19.9x SIGSEVs in NetworkStorageSession (secret search callback)
1796 https://bugs.webkit.org/show_bug.cgi?id=183346
1798 Reviewed by Michael Catanzaro.
1800 Pass the request cancellable to NetworkStorageSession::getCredentialFromPersistentStorage().
1802 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1803 (WebKit::NetworkDataTaskSoup::authenticate):
1805 2018-04-02 Brady Eidson <beidson@apple.com>
1807 Process swapping on navigation needs to handle server redirects.
1808 <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
1810 Reviewed by Alex Christensen.
1812 The same rules we apply to process swapping for basic navigations need to apply
1813 to server redirects as well.
1815 There's three interesting cases we need to support that are covered by new API tests:
1816 1 - The initial load in a WKWebView redirects cross-origin.
1817 2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com
1818 3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com.
1820 Supporting all 3 of these brought their own little challenges.
1822 By teaching Navigation objects more about redirects I was able to support all 3 cases.
1824 * UIProcess/API/APINavigation.cpp:
1825 (API::Navigation::Navigation):
1826 (API::Navigation::setCurrentRequest):
1827 (API::Navigation::appendRedirectionURL):
1828 (API::Navigation::loggingString const):
1829 (API::Navigation::loggingURL const): Deleted.
1830 * UIProcess/API/APINavigation.h:
1831 (API::Navigation::originalRequest const):
1832 (API::Navigation::currentRequest const):
1833 (API::Navigation::currentRequestProcessIdentifier const):
1834 (API::Navigation::setCurrentRequestIsRedirect):
1835 (API::Navigation::currentRequestIsRedirect const):
1836 (API::Navigation::request const): Deleted.
1838 * UIProcess/API/Cocoa/WKNavigation.mm:
1839 (-[WKNavigation _request]):
1841 * UIProcess/WebPageProxy.cpp:
1842 (WebKit::WebPageProxy::receivedPolicyDecision):
1843 (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server
1844 redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running.
1845 (WebKit::WebPageProxy::didCreateMainFrame):
1846 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a
1847 cross-origin redirect that is just starting back up in a new WebProcess.
1848 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1849 (WebKit::WebPageProxy::didCommitLoadForFrame):
1850 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1851 (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for
1852 a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess.
1853 * UIProcess/WebPageProxy.h:
1854 * UIProcess/WebPageProxy.messages.in:
1856 * UIProcess/WebProcessPool.cpp:
1857 (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always
1858 be used to continue a navigation.
1859 * UIProcess/WebProcessPool.h:
1861 * UIProcess/WebProcessProxy.h:
1862 (WebKit::WebProcessProxy::didCommitProvisionalLoad):
1863 (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const):
1865 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1866 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1867 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1869 2018-04-02 Eric Carlson <eric.carlson@apple.com>
1871 [Extra zoom mode] Replace video with a placeholder image during fullscreen transition
1872 https://bugs.webkit.org/show_bug.cgi?id=184188
1873 <rdar://problem/38940307>
1875 Reviewed by Youenn Fablet.
1877 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
1878 * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
1879 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1880 (WebKit::VideoFullscreenModelContext::willExitFullscreen):
1881 (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen):
1882 (WebKit::VideoFullscreenManagerProxy::willExitFullscreen):
1883 * WebProcess/cocoa/VideoFullscreenManager.h:
1884 * WebProcess/cocoa/VideoFullscreenManager.messages.in:
1885 * WebProcess/cocoa/VideoFullscreenManager.mm:
1886 (WebKit::VideoFullscreenManager::willExitFullscreen):
1888 2018-04-02 Brian Burg <bburg@apple.com>
1890 [Cocoa] Fix some internal builds that consume WebDriver atoms
1891 https://bugs.webkit.org/show_bug.cgi?id=184197
1893 Reviewed by Dan Bernstein.
1895 * WebKit.xcodeproj/project.pbxproj:
1896 Use a Run Script phase to copy WebDriver atoms to WebKit.framework
1897 private headers during the installhdrs phase.
1899 2018-04-02 Ryan Haddad <ryanhaddad@apple.com>
1901 Unreviewed, rolling out r230174.
1903 Caused LayoutTests to exit early with assertion failures.
1907 "Process swapping on navigation needs to handle server
1909 https://bugs.webkit.org/show_bug.cgi?id=184142
1910 https://trac.webkit.org/changeset/230174
1912 2018-04-02 Wenson Hsieh <wenson_hsieh@apple.com>
1914 [Extra zoom mode] Update date picker UI to latest specifications
1915 https://bugs.webkit.org/show_bug.cgi?id=184234
1916 <rdar://problem/38804760>
1918 Reviewed by Timothy Hatcher.
1920 Rename WKTextFormControlListViewControllerDelegate to WKTextInputListViewControllerDelegate and adjust for the
1921 new initializer of WKDatePickerViewController.
1923 * UIProcess/ios/WKContentViewInteraction.mm:
1924 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1926 2018-04-02 Brady Eidson <beidson@apple.com>
1928 Process swapping on navigation needs to handle server redirects.
1929 <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
1931 Reviewed by Alex Christensen.
1933 The same rules we apply to process swapping for basic navigations need to apply
1934 to server redirects as well.
1936 There's three interesting cases we need to support that are covered by new API tests:
1937 1 - The initial load in a WKWebView redirects cross-origin.
1938 2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com
1939 3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com.
1941 Supporting all 3 of these brought their own little challenges.
1943 By teaching Navigation objects more about redirects I was able to support all 3 cases.
1945 * UIProcess/API/APINavigation.cpp:
1946 (API::Navigation::Navigation):
1947 (API::Navigation::setCurrentRequest):
1948 (API::Navigation::appendRedirectionURL):
1949 (API::Navigation::loggingString const):
1950 (API::Navigation::loggingURL const): Deleted.
1951 * UIProcess/API/APINavigation.h:
1952 (API::Navigation::originalRequest const):
1953 (API::Navigation::currentRequest const):
1954 (API::Navigation::currentRequestProcessIdentifier const):
1955 (API::Navigation::setCurrentRequestIsRedirect):
1956 (API::Navigation::currentRequestIsRedirect const):
1957 (API::Navigation::request const): Deleted.
1959 * UIProcess/API/Cocoa/WKNavigation.mm:
1960 (-[WKNavigation _request]):
1962 * UIProcess/WebPageProxy.cpp:
1963 (WebKit::WebPageProxy::receivedPolicyDecision):
1964 (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server
1965 redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running.
1966 (WebKit::WebPageProxy::didCreateMainFrame):
1967 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a
1968 cross-origin redirect that is just starting back up in a new WebProcess.
1969 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1970 (WebKit::WebPageProxy::didCommitLoadForFrame):
1971 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1972 (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for
1973 a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess.
1974 * UIProcess/WebPageProxy.h:
1975 * UIProcess/WebPageProxy.messages.in:
1977 * UIProcess/WebProcessPool.cpp:
1978 (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always
1979 be used to continue a navigation.
1980 * UIProcess/WebProcessPool.h:
1982 * UIProcess/WebProcessProxy.h:
1983 (WebKit::WebProcessProxy::didCommitProvisionalLoad):
1984 (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const):
1986 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1987 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1988 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1990 2018-04-02 Wenson Hsieh <wenson_hsieh@apple.com>
1992 [Extra zoom mode] Zoom level is sometimes excessive when zooming to focused form controls
1993 https://bugs.webkit.org/show_bug.cgi?id=184222
1994 <rdar://problem/39063886>
1996 Reviewed by Timothy Hatcher.
1998 Upon interactively focusing an element, we zoom and scroll to reveal that element. The heuristics introduced in
1999 <https://trac.webkit.org/r168744> work by computing a target scale, and then a point to zoom to given that
2000 scale. Currently, this scale is dependent on the computed font size of the form control, such that the form
2001 control would be scaled to have an effective font size of 16.
2003 However, in extra zoom mode, applying these same heuristics (ironically) results in excessive zoom levels, since
2004 scaling the font up to 16 would cause most form controls to zoom so far in that we lose context of surrounding
2005 elements such as labels and other form controls; the fact that the element is highlighted by the focused form
2006 control overlay makes this even more confusing, since part of the focus overlay highlight rect often ends up
2007 outside the viewport.
2009 To fix this, we make a couple of tweaks to focus rect zooming in extra zoom mode. (1) Instead of computing
2010 target zoom level based on font size, try to zoom such that the focused element rect fills up most of the
2011 viewport (similar to double-tap zooming). This ensures that the focused form control overlay's highlight rect
2012 makes sense in most cases, with few exceptions (e.g. the element frame is larger than the viewport). (2)
2013 Introduce a minimum legible font size of 11, and compute the minimium scale needed such that the form control
2014 font would appear to be at least this legible font size. Then, clamp the target scale chosen by (1) to this
2017 One additional consideration for (1) is that naively scaling to fit the element rect to the viewport (with some
2018 fixed margins) would cause the viewport scale to always change when moving focus between form controls of
2019 different dimensions, even if the current scale is more or less appropriate for all the focusable elements. To
2020 address this, instead of computing a single target zoom scale for an element rect, compute a range of possible
2021 target zoom scales (where the minimum and maximum values depend on the margin we add around the element rect).
2022 If the current scale already falls within this target scale range, then we won't bother adjusting the scale at
2023 all (unless the font size is too small — see (2)). If the current scale falls outside the target scale range, we
2024 then make the minimal adjustment needed to ensure that the element rect fits well within the viewport without
2027 * UIProcess/API/Cocoa/WKWebView.mm:
2028 (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
2030 Move some logic around so that the target scale is computed after computing the visible size. Also renames some
2031 constants local to this function (WKWebViewStandardFontSize, kMinimumHeightToShowContentAboveKeyboard,
2032 UIWebFormAnimationDuration, CaretOffsetFromWindowEdge) such that they now share a consistent naming style.
2034 2018-04-02 Jer Noble <jer.noble@apple.com>
2036 Enable Legacy EME for all WebKit & WebKitLegacy clients
2037 https://bugs.webkit.org/show_bug.cgi?id=184018
2038 <rdar://problem/34887387>
2040 Reviewed by Eric Carlson.
2042 * Shared/WebPreferences.yaml:
2043 * Shared/WebPreferencesDefaultValues.h:
2045 2018-04-02 Jer Noble <jer.noble@apple.com>
2047 REGRESSION (229680): Fullscreen video does not work (youtube, netflix)
2048 https://bugs.webkit.org/show_bug.cgi?id=184235
2050 Reviewed by Eric Carlson.
2052 Enable the Fullscreen API by default.
2054 * Shared/WebPreferences.yaml:
2055 * Shared/WebPreferencesDefaultValues.h:
2057 2018-04-02 Fujii Hironori <Hironori.Fujii@sony.com>
2059 [Win] MSVC can't compile WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent
2060 https://bugs.webkit.org/show_bug.cgi?id=184120
2062 Reviewed by Alex Christensen.
2064 It seems that MSVC can't compile the code using `this` in a
2065 generalized lambda capture in another lambda.
2067 In this case, there is no need to copy `protectedThis` for the
2068 inner lambda. Move `protectedThis` of the outer lambda to the
2069 inner as well as `callback`.
2071 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2072 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
2073 Moved `protectedThis` from the outer lambda to the inner.
2075 2018-04-02 Dan Bernstein <mitz@apple.com>
2077 Build fix after r230121
2079 * Configurations/WebKit.xcconfig: Disabled framework header postprocessing when building for
2081 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Reverted r230159.
2083 2018-04-02 Dan Bernstein <mitz@apple.com>
2085 Fixed the build when BOOL is not bool.
2086 <rdar://problem/39094484>
2088 Reviewed by Jer Noble.
2090 * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
2091 (-[WKFullScreenViewController videoControlsManagerDidChange]): Removed the write-only ivar
2092 _hasControlsManager, the assignment to which was causing the compiler error.
2094 2018-04-02 Ryan Haddad <ryanhaddad@apple.com>
2096 Unreviewed build fix.
2098 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Update availability annotation.
2100 2018-04-02 Michael Catanzaro <mcatanzaro@igalia.com>
2102 [GTK] DragAndDropHandler.cpp should include GUniquePtrGtk.h
2103 https://bugs.webkit.org/show_bug.cgi?id=184119
2105 Reviewed by Daniel Bates.
2107 * UIProcess/gtk/DragAndDropHandler.cpp:
2109 2018-04-02 Frederic Wang <fwang@igalia.com>
2111 Fix warnings for unused lambda captures in Source/WebKit
2112 https://bugs.webkit.org/show_bug.cgi?id=173555
2114 Reviewed by Konstantin Tokarev.
2116 When release logs are disabled, several lambda captures are unused, causing compilation
2117 failures with -Wunused-lambda-capture. This patch marks the corresponding variables as unused
2118 in order to fix these warnings.
2120 Based on initial patch by: Konstantin Tokarev <annulen@yandex.ru>
2122 * NetworkProcess/NetworkResourceLoader.cpp:
2123 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2124 * UIProcess/Network/NetworkProcessProxy.cpp:
2125 (WebKit::NetworkProcessProxy::fetchWebsiteData):
2126 (WebKit::NetworkProcessProxy::deleteWebsiteData):
2127 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2128 * UIProcess/WebProcessProxy.cpp:
2129 (WebKit::WebProcessProxy::fetchWebsiteData):
2130 (WebKit::WebProcessProxy::deleteWebsiteData):
2131 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2132 * UIProcess/ios/WKContentViewInteraction.mm:
2133 (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
2135 2018-04-02 Alejandro G. Castro <alex@igalia.com>
2137 [GTK] Make libwebrtc backend buildable for GTK port
2138 https://bugs.webkit.org/show_bug.cgi?id=178860
2140 Reviewed by Youenn Fablet.
2142 * CMakeLists.txt: Add RTC network classes to the compilation and
2143 the libwebrtc includes.
2144 * PlatformGTK.cmake: Add the libwebrtc directory.
2145 * SourcesGTK.txt: Add RTC files to the compilation.
2147 2018-03-30 Chris Dumez <cdumez@apple.com>
2149 REGRESSION (r229828): Facebook login popup is blank
2150 https://bugs.webkit.org/show_bug.cgi?id=184206
2151 <rdar://problem/39057006>
2153 Reviewed by Wenson Hsieh.
2155 Add assertion to make sure we never try to do a policy check to
2156 a resource response while a policy check for a navigation is
2157 pending. This assertion was being hit by several of our redirection
2158 tests without my fix.
2160 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2161 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2163 2018-03-30 Ryan Haddad <ryanhaddad@apple.com>
2165 Unreviewed, rolling out r230125.
2167 Build fix broke more builds.
2171 "Unreviewed build fix, remove unused lambda capture."
2172 https://trac.webkit.org/changeset/230125
2174 2018-03-30 Ryan Haddad <ryanhaddad@apple.com>
2176 Unreviewed build fix, remove unused lambda capture.
2178 * NetworkProcess/NetworkResourceLoader.cpp:
2179 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2181 2018-03-30 Wenson Hsieh <wenson_hsieh@apple.com>
2183 [Extra zoom mode] Adopt list view controller UI for numeric input types
2184 https://bugs.webkit.org/show_bug.cgi?id=184184
2185 <rdar://problem/37238916>
2187 Reviewed by Timothy Hatcher.
2189 Remove existing logic for presenting a number pad view controller, since number pads will now be handled as a
2190 special case of general text form controls in extra zoom mode.
2192 * UIProcess/ios/WKContentViewInteraction.h:
2193 * UIProcess/ios/WKContentViewInteraction.mm:
2194 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
2195 (-[WKContentView dismissAllInputViewControllers]):
2196 (-[WKContentView _wheelChangedWithEvent:]):
2198 2018-03-30 Dan Bernstein <mitz@apple.com>
2200 Update availability annotations to match the macOS 10.13.4 and iOS 11.3 GM SDKs
2201 https://bugs.webkit.org/show_bug.cgi?id=184173
2203 Reviewed by Alex Christensen.
2205 Changed WK_MAC_TBA and WK_IOS_TBA to 10.13.4 and 11.3, respectively, in all declarations that
2206 appear in the GM SDKs.
2208 * Shared/API/Cocoa/_WKNSWindowExtras.h:
2209 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2210 * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
2211 * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
2212 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2213 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2214 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2215 * UIProcess/API/Cocoa/WKViewPrivate.h:
2216 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2217 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2218 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2219 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2220 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
2221 * UIProcess/API/Cocoa/_WKAttachment.h:
2222 * UIProcess/API/Cocoa/_WKAutomationSession.h:
2223 * UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
2224 * UIProcess/API/Cocoa/_WKDownload.h:
2225 * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
2226 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
2227 * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
2228 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2229 * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
2230 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
2231 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
2232 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
2233 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
2234 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
2236 2018-03-30 Youenn Fablet <youenn@apple.com>
2238 NetworkLoadChecker should upgrade redirects if needed
2239 https://bugs.webkit.org/show_bug.cgi?id=184098
2241 Reviewed by Chris Dumez.
2243 In case of redirections, upgrade URL according CSP.
2245 * NetworkProcess/NetworkLoadChecker.cpp:
2246 (WebKit::NetworkLoadChecker::checkRequest):
2247 (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
2249 2018-03-30 JF Bastien <jfbastien@apple.com>
2251 Update messages.py codegen for String, fix tests
2252 https://bugs.webkit.org/show_bug.cgi?id=184179
2253 <rdar://problem/39041352>
2255 Reviewed by Mark Lam.
2257 I updated some of the code in
2258 https://trac.webkit.org/changeset/230097 and auto-magically used a
2259 script to update copyright headers... and that broke the tests
2260 which checked for a particular date. Update all of the headers.
2262 Part of this change updates the code generated by messages.py
2264 * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
2265 * Scripts/webkit/MessageReceiver-expected.cpp:
2266 * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
2267 * Scripts/webkit/MessagesSuperclass-expected.h:
2268 * Scripts/webkit/messages.py:
2269 * Scripts/webkit/messages_unittest.py:
2270 (GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
2271 generate a better error message
2273 2018-03-29 JF Bastien <jfbastien@apple.com>
2275 Use Forward.h instead of forward-declaring WTF::String
2276 https://bugs.webkit.org/show_bug.cgi?id=184172
2277 <rdar://problem/39026146>
2279 Reviewed by Yusuke Suzuki.
2281 As part of #184164 I'm changing WTF::String, and the forward
2282 declarations are just wrong because I'm making it templated. We
2283 should use Forward.h anyways, so do that instead.
2285 * Scripts/webkit/LegacyMessages-expected.h:
2286 * Scripts/webkit/Messages-expected.h:
2287 * Scripts/webkit/MessagesSuperclass-expected.h:
2288 * UIProcess/WebOpenPanelResultListenerProxy.h:
2290 2018-03-29 Brian Burg <bburg@apple.com>
2292 Web Automation: clipToViewport is ignored for element screenshots
2293 https://bugs.webkit.org/show_bug.cgi?id=184158
2294 <rdar://problem/39014307>
2296 Reviewed by Timothy Hatcher.
2298 In §19.2 Take Element Screenshot, step 5.2 says that we should clip
2299 the element screenshot rect with the visible viewport rect. We don't
2300 do that right now even though we pass over clipToViewport.
2302 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2303 (WebKit::snapshotRectForScreenshot):
2304 Clip the rect to viewport if needed.
2306 (WebKit::WebAutomationSessionProxy::takeScreenshot):
2307 This scrollIntoView is misplaced; by this point we have already done
2308 the math to figure out the screenshot rect. Move it before computing the rect.
2310 2018-03-29 Brent Fulgham <bfulgham@apple.com>
2312 REGRESSION(r230035): ASSERT(MACH_PORT_VALID(m_sendPort)) hit in IPC::Connection::initializeSendSource()
2313 https://bugs.webkit.org/show_bug.cgi?id=184122
2314 <rdar://problem/39003606>
2316 Reviewed by Chris Dumez.
2318 One of the new assertions added in r230035 begin firing while running tests locally. This was happening
2319 because the WebInspector was attempting to open a new connection to a web process that had already
2320 terminated its mach port connection (a dead port).
2322 We should avoid opening new connections when the port we were given is already dead.
2324 * Platform/IPC/Connection.h:
2325 (IPC::Connection::identifierIsValid): Added.
2326 * Platform/IPC/mac/ConnectionMac.mm:
2327 (IPC::Connection::platformInitialize): Do not perform initialization on a dead (or null) port.
2328 (IPC::Connection::open): Add some assertions that ports are in a valid state.
2329 (IPC::Connection::sendOutgoingMessage): Assert that the send port is not dead.
2330 (IPC::Connection::receiveSourceEventHandler): Assert that the receive port is valid.
2331 * UIProcess/ChildProcessProxy.cpp:
2332 (WebKit::ChildProcessProxy::didFinishLaunching): Treat a dead port as a signal that the
2333 child process failed to launch.
2334 * UIProcess/Network/NetworkProcessProxy.cpp:
2335 (WebKit::NetworkProcessProxy::didFinishLaunching): Ditto.
2336 * UIProcess/Plugins/PluginProcessProxy.cpp:
2337 (WebKit::PluginProcessProxy::didFinishLaunching): Ditto.
2338 * UIProcess/Storage/StorageProcessProxy.cpp:
2339 (WebKit::StorageProcessProxy::didFinishLaunching): Ditto.
2340 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2341 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Ditto.
2342 * WebProcess/WebPage/WebInspectorUI.cpp:
2343 (WebKit::WebInspectorUI::establishConnection): Ditto.
2344 * WebProcess/WebProcess.cpp:
2345 (WebKit::WebProcess::ensureNetworkProcessConnection): Ditto.
2346 (WebKit::WebProcess::ensureWebToStorageProcessConnection): Ditto.
2348 2018-03-29 Youenn Fablet <youenn@apple.com>
2350 Synchronize SecurityOrigin related scheme registries with NetworkProcess
2351 https://bugs.webkit.org/show_bug.cgi?id=184140
2353 Reviewed by Chris Dumez.
2355 Add syncing of scheme registries that are used by SecurityOrigin and ContentSecurityPolicy
2356 so that we can properly use them in NetworkProcess as we do in WebProcess.
2357 The registries that are not synced are:
2358 - URLSchemeAsEmptyDocument
2359 - URLSchemeDomainRelaxationForbidden
2360 - URLSchemeAsCachePartitioned
2361 - URLSchemeAsCanDisplayOnlyIfCanRequest
2363 * NetworkProcess/NetworkProcess.cpp:
2364 (WebKit::NetworkProcess::initializeNetworkProcess):
2365 (WebKit::NetworkProcess::registerURLSchemeAsSecure const):
2366 (WebKit::NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy const):
2367 (WebKit::NetworkProcess::registerURLSchemeAsLocal const):
2368 (WebKit::NetworkProcess::registerURLSchemeAsNoAccess const):
2369 (WebKit::NetworkProcess::registerURLSchemeAsDisplayIsolated const):
2370 (WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const):
2371 (WebKit::NetworkProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const):
2372 * NetworkProcess/NetworkProcess.h:
2373 * NetworkProcess/NetworkProcess.messages.in:
2374 * NetworkProcess/NetworkProcessCreationParameters.cpp:
2375 (WebKit::NetworkProcessCreationParameters::encode const):
2376 (WebKit::NetworkProcessCreationParameters::decode):
2377 * NetworkProcess/NetworkProcessCreationParameters.h:
2378 * UIProcess/WebProcessPool.cpp:
2379 (WebKit::WebProcessPool::ensureNetworkProcess):
2380 (WebKit::WebProcessPool::registerURLSchemeAsSecure):
2381 (WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
2382 (WebKit::WebProcessPool::registerURLSchemeAsLocal):
2383 (WebKit::WebProcessPool::registerURLSchemeAsNoAccess):
2384 (WebKit::WebProcessPool::registerURLSchemeAsDisplayIsolated):
2385 (WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled):
2386 (WebKit::WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest):
2388 2018-03-29 Brent Fulgham <bfulgham@apple.com>
2390 REGRESSION(r229480): ERROR: Unhandled web process message 'WebCookieManager:SetHTTPCookieAcceptPolicy'
2391 https://bugs.webkit.org/show_bug.cgi?id=184124
2392 <rdar://problem/38998971>
2394 Reviewed by Chris Dumez.
2396 Cookie accept policy messages were still being sent to the WebContent process after
2397 I removed cookie access in r229480. The WebContent process no longer recognizes these
2398 messages, and generates logging to that effect.
2400 This patch stops sending these unnecessary messages to the WebContent process. Only the
2401 Network process needs to receive this information.
2403 * UIProcess/WebCookieManagerProxy.cpp:
2404 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
2406 2018-03-29 Carlos Eduardo Ramalho <cadubentzen@gmail.com>
2408 [WPE] Floating point exception in WebEventFactory::createWebWheelEvent
2409 https://bugs.webkit.org/show_bug.cgi?id=184037
2411 Reviewed by Žan Doberšek.
2413 * Shared/wpe/WebEventFactory.cpp:
2414 (WebKit::WebEventFactory::createWebWheelEvent): Use std::copysign() to avoid division by 0.
2416 2018-03-28 Zalan Bujtas <zalan@apple.com>
2418 Make it possible to override the screen size
2419 https://bugs.webkit.org/show_bug.cgi?id=184111
2420 <rdar://problem/38972181>
2422 Reviewed by Tim Horton.
2424 * Shared/WebPageCreationParameters.cpp:
2425 (WebKit::WebPageCreationParameters::encode const):
2426 (WebKit::WebPageCreationParameters::decode):
2427 * Shared/WebPageCreationParameters.h:
2428 * UIProcess/WebPageProxy.cpp:
2429 (WebKit::WebPageProxy::creationParameters):
2430 * UIProcess/WebPageProxy.h:
2431 * UIProcess/ios/WebPageProxyIOS.mm:
2432 (WebKit::WebPageProxy::overrideScreenSize):
2433 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2434 (WebKit::WebChromeClient::overrideScreenSize const):
2435 * WebProcess/WebCoreSupport/WebChromeClient.h:
2436 * WebProcess/WebPage/WebPage.cpp:
2437 * WebProcess/WebPage/WebPage.h:
2438 * WebProcess/WebPage/ios/WebPageIOS.mm:
2439 (WebKit::WebPage::overrideScreenSize const):
2441 2018-03-28 Chris Dumez <cdumez@apple.com>
2443 Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
2444 https://bugs.webkit.org/show_bug.cgi?id=183962
2445 <rdar://problem/38817833>
2447 Reviewed by Brady Eidson.
2449 Swap WebProcess on for the initial navigation in a new Window that was opened
2450 via window.open(), when the new URL is cross-origin compared to the opener's
2451 origin. For now, we only swap process if 'noopener' property is set when calling
2452 window.open(). This is because we do not support the remote DOMWindows yet.
2454 * Shared/NavigationActionData.cpp:
2455 (WebKit::NavigationActionData::encode const):
2456 (WebKit::NavigationActionData::decode):
2457 * Shared/NavigationActionData.h:
2458 * UIProcess/API/APINavigation.h:
2459 (API::Navigation::setIsCrossOriginWindowOpenNavigation):
2460 (API::Navigation::isCrossOriginWindowOpenNavigation const):
2461 (API::Navigation::setOpener):
2462 (API::Navigation::opener const):
2463 * UIProcess/WebPageProxy.cpp:
2464 (WebKit::WebPageProxy::receivedPolicyDecision):
2465 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2466 * UIProcess/WebProcessPool.cpp:
2467 (WebKit::WebProcessPool::processForNavigation):
2468 * UIProcess/WebProcessPool.h:
2469 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2470 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2472 2018-03-28 Per Arne Vollan <pvollan@apple.com>
2474 Adopt WEBPROCESS_WINDOWSERVER_BLOCKING compiler guard in WebProcess.
2475 https://bugs.webkit.org/show_bug.cgi?id=183959
2476 <rdar://problem/38965719>
2478 Reviewed by Brent Fulgham.
2480 Use the compile guard to guard the call to CGSSetDenyWindowServerConnections.
2482 * WebProcess/WebProcess.cpp:
2483 (WebKit::WebProcess::initializeProcess):
2485 2018-03-28 Brent Fulgham <bfulgham@apple.com>
2487 Unreviewed build fix after r230045.
2489 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Add missing include (breaks iOS).
2491 2018-03-28 Brent Fulgham <bfulgham@apple.com>
2493 Protect against invalid mach ports returned by mach_port_request_notification
2494 https://bugs.webkit.org/show_bug.cgi?id=184106
2495 <rdar://problem/37865316>
2497 Reviewed by Chris Dumez.
2499 * Platform/IPC/Connection.h:
2500 (IPC::Connection::Identifier::Identifier): Use default initializer syntax.
2501 * Platform/IPC/mac/ConnectionMac.mm:
2502 (IPC::Connection::open): Drive-by-fix: Include formatted mach error message in logging.
2503 (IPC::Connection::receiveSourceEventHandler): Check return value from 'mach_port_request_notification'
2504 and clean up if it experienced an error.
2505 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2506 (WebKit::ProcessLauncher::launchProcess): Ditto.
2508 2018-03-28 Dean Jackson <dino@apple.com>
2510 WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
2511 https://bugs.webkit.org/show_bug.cgi?id=184107
2512 <rdar://problem/38967492>
2514 Reviewed by Tim Horton.
2516 There is no need for this class to be a UIScrollViewDelegate. Instead
2517 the protocol should have an optional method that is effectively
2518 scrollViewDidScroll.
2520 * UIProcess/API/Cocoa/WKWebView.mm:
2521 (-[WKWebView scrollViewDidScroll:]): Call web_scrollViewDidScroll
2523 * UIProcess/Cocoa/WKWebViewContentProvider.h: Remove UIScrollViewDelegate
2524 and add an optional web_scrollViewDidScroll.
2525 * UIProcess/ios/WKPDFView.mm:
2526 (-[WKPDFView web_scrollViewDidScroll:]): Renamed from scrollViewDidScroll.
2527 (-[WKPDFView scrollViewDidScroll:]): Deleted.
2528 * UIProcess/ios/WKSystemPreviewView.mm:
2529 (-[WKSystemPreviewView scrollViewDidScroll:]): Deleted.
2531 2018-03-28 Wenson Hsieh <wenson_hsieh@apple.com>
2533 [Extra zoom mode] Make boosted text autosizing values switchable at runtime
2534 https://bugs.webkit.org/show_bug.cgi?id=184092
2535 <rdar://problem/38939917>
2537 Reviewed by Tim Horton.
2539 Add a private web view preference to switch between normal and boosted text autosizing mode. By default, we use
2540 normal text autosizing values.
2542 * Shared/WebPreferences.yaml:
2543 * UIProcess/API/Cocoa/WKPreferences.mm:
2544 (-[WKPreferences _setShouldEnableTextAutosizingBoost:]):
2545 (-[WKPreferences _shouldEnableTextAutosizingBoost]):
2546 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2548 2018-03-28 Brent Fulgham <bfulgham@apple.com>
2550 Avoid uninitialized mach ports
2551 https://bugs.webkit.org/show_bug.cgi?id=184090
2552 <rdar://problem/37261129>
2554 Reviewed by Chris Dumez.
2556 It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
2557 of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
2558 there is a potential for us to try to use invalid ports.
2560 We should always check return values, and ensure that the mach port variables we seek to initialize are
2561 kept in a valid state.
2563 Reviewed by Chris Dumez.
2565 * NetworkProcess/NetworkProcess.cpp:
2566 (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): Initialize new port to a safe default and
2567 check the return state of the allocation function.
2568 * Platform/IPC/Connection.h:
2569 * Platform/IPC/mac/ConnectionMac.mm:
2570 (IPC::Connection::open): Ditto.
2571 (IPC::Connection::initializeSendSource): Ditto.
2572 (IPC::readFromMachPort): Ditto.
2573 (IPC::Connection::receiveSourceEventHandler): Ditto.
2574 * Platform/SharedMemory.h:
2575 * Platform/cocoa/SharedMemoryCocoa.cpp:
2576 (WebKit::makeMemoryEntry): Ditto.
2577 * Platform/mac/MachUtilities.cpp:
2578 (setMachPortQueueLength): Ditto.
2579 (setMachExceptionPort): Ditto.
2580 * PluginProcess/PluginProcess.cpp:
2581 (WebKit::PluginProcess::createWebProcessConnection): Ditto.
2582 * StorageProcess/StorageProcess.cpp:
2583 (WebKit::StorageProcess::createStorageToWebProcessConnection): Ditto.
2584 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2585 (WebKit::ProcessLauncher::launchProcess): Ditto.
2586 * WebProcess/WebPage/WebInspector.cpp:
2587 (WebKit::WebInspector::openFrontendConnection): Ditto.
2589 2018-03-28 Michael Catanzaro <mcatanzaro@igalia.com>
2591 Fails to build webkitgtk+ after git-svn-id: http://svn.webkit.org/repository/webkit/trunk@229877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2592 https://bugs.webkit.org/show_bug.cgi?id=184081
2594 Unreviewed, switch to use UNUSED_PARAM()
2596 * UIProcess/WebPageProxy.cpp:
2597 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2599 2018-03-28 Tim Horton <timothy_horton@apple.com>
2601 Make use of HAVE(CORE_ANIMATION_RENDER_SERVER) in more places
2602 https://bugs.webkit.org/show_bug.cgi?id=184072
2603 <rdar://problem/38946530>
2605 Reviewed by Dan Bernstein.
2607 * Platform/mac/LayerHostingContext.mm:
2608 (WebKit::LayerHostingContext::createForExternalHostingProcess):
2609 * UIProcess/mac/ViewSnapshotStore.h:
2610 * UIProcess/mac/ViewSnapshotStore.mm:
2611 (WebKit::ViewSnapshot::clearImage):
2613 2018-03-28 Wenson Hsieh <wenson_hsieh@apple.com>
2615 Revert an unnecessary workaround when zooming focused form controls
2616 https://bugs.webkit.org/show_bug.cgi?id=184067
2617 <rdar://problem/38805254>
2619 Reviewed by Tim Horton.
2621 Reverts an unintended change introduced in r227984.
2623 * UIProcess/ios/WKContentViewInteraction.mm:
2624 (-[WKContentView _displayFormNodeInputView]):
2626 2018-03-28 Miguel Gomez <magomez@igalia.com>
2628 [GTK][WPE] Remove UpdateAtlas
2629 https://bugs.webkit.org/show_bug.cgi?id=184042
2631 Reviewed by Žan Doberšek.
2633 Remove all the code related to UpdateAtlas handling.
2635 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2636 (WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
2637 (WebKit::CoordinatedGraphicsScene::commitSceneState):
2638 (WebKit::CoordinatedGraphicsScene::purgeGLResources):
2639 (WebKit::CoordinatedGraphicsScene::syncUpdateAtlases): Deleted.
2640 (WebKit::CoordinatedGraphicsScene::createUpdateAtlas): Deleted.
2641 (WebKit::CoordinatedGraphicsScene::removeUpdateAtlas): Deleted.
2642 (WebKit::CoordinatedGraphicsScene::releaseUpdateAtlases): Deleted.
2643 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2644 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2645 (WebKit::ThreadedCompositor::renderLayerTree):
2646 (WebKit::ThreadedCompositor::releaseUpdateAtlases): Deleted.
2647 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2648 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2649 (WebKit::WebChromeClient::delegatedScrollRequested):
2650 (WebKit::WebChromeClient::resetUpdateAtlasForTesting): Deleted.
2651 * WebProcess/WebCoreSupport/WebChromeClient.h:
2652 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2653 (WebKit::AcceleratedDrawingArea::resetUpdateAtlasForTesting): Deleted.
2654 * WebProcess/WebPage/AcceleratedDrawingArea.h:
2655 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2656 (WebKit::CompositingCoordinator::CompositingCoordinator):
2657 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
2658 (WebKit::CompositingCoordinator::clearPendingStateChanges):
2659 (WebKit::CompositingCoordinator::renderNextFrame):
2660 (WebKit::CompositingCoordinator::purgeBackingStores):
2661 (WebKit::CompositingCoordinator::createUpdateAtlas): Deleted.
2662 (WebKit::CompositingCoordinator::removeUpdateAtlas): Deleted.
2663 (WebKit::CompositingCoordinator::getCoordinatedBuffer): Deleted.
2665 (WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases): Deleted.
2666 (WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired): Deleted.
2667 (WebKit::CompositingCoordinator::releaseAtlases): Deleted.
2668 (WebKit::CompositingCoordinator::clearUpdateAtlases): Deleted.
2669 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2670 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2671 (WebKit::CoordinatedLayerTreeHost::clearUpdateAtlases): Deleted.
2672 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2673 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
2674 (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases): Deleted.
2675 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2676 * WebProcess/WebPage/DrawingArea.h:
2677 * WebProcess/WebPage/LayerTreeHost.h:
2678 (WebKit::LayerTreeHost::setIsDiscardable):
2680 2018-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
2682 REGRESSION(r229998): WebDriver: MiniBrowser is crashing in a lot of tests after r229998
2683 https://bugs.webkit.org/show_bug.cgi?id=184075
2685 Reviewed by Žan Doberšek.
2687 This is because we are using a value after it has been moved.
2689 * UIProcess/Automation/WebAutomationSession.cpp:
2690 (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Save a reference to page in a local variable
2691 before using it when it's also going to be moved in the lambda capture.
2693 2018-03-27 Michael Catanzaro <mcatanzaro@igalia.com>
2695 Unreviewed, fix typo in variable name
2697 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2698 (webkitWebViewBaseCrossingNotifyEvent):
2700 2018-03-27 Per Arne Vollan <pvollan@apple.com>
2702 The layout test fast/canvas/webgl/read-pixels-test.html is timing out.
2703 https://bugs.webkit.org/show_bug.cgi?id=183923
2704 <rdar://problem/38756869>
2706 Reviewed by Brent Fulgham.
2708 Send OpenGL display mask to the WebContent process when the display ID is changing.
2710 * UIProcess/WebPageProxy.cpp:
2711 (WebKit::WebPageProxy::windowScreenDidChange):
2712 * WebProcess/WebPage/WebPage.h:
2713 * WebProcess/WebPage/WebPage.messages.in:
2714 * WebProcess/WebPage/mac/WebPageMac.mm:
2715 (WebKit::WebPage::openGLDisplayMaskChanged):
2717 2018-03-27 Youenn Fablet <youenn@apple.com>
2719 Move request checking out of PingLoad for future reuse in NetworkLoad
2720 https://bugs.webkit.org/show_bug.cgi?id=183865
2722 Reviewed by Chris Dumez.
2724 Introduce NetworkLoadChecker as a way to validate requests before sending them in the network process.
2725 Validation encompasses: CORS checks, CSP and Content Extensions on both main request and redirected requests if any.
2727 Make PingLoad use NetworkLoadChecker. Future patch should make NetworkLoad to use it as well whenever needed.
2729 Make NetworkCORSPreflightChecker takes a CompletionHandler instead of a Function.
2730 Ensure this callback is called even if preflight is not completed by returning a Canceled error.
2732 * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2733 (WebKit::NetworkCORSPreflightChecker::~NetworkCORSPreflightChecker):
2734 (WebKit::NetworkCORSPreflightChecker::returnResult):
2735 (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
2736 (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
2737 (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
2738 * NetworkProcess/NetworkCORSPreflightChecker.h:
2739 * NetworkProcess/NetworkLoadChecker.cpp: Added.
2740 (WebKit::NetworkLoadChecker::NetworkLoadChecker):
2741 (WebKit::NetworkLoadChecker::check):
2742 (WebKit::NetworkLoadChecker::checkRedirection):
2743 (WebKit::NetworkLoadChecker::returnError):
2744 (WebKit::NetworkLoadChecker::checkRequest):
2745 (WebKit::NetworkLoadChecker::checkCORSRequest):
2746 (WebKit::NetworkLoadChecker::checkCORSRedirectedRequest):
2747 (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
2748 (WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):
2749 (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
2750 (WebKit::NetworkLoadChecker::contentExtensionsBackend):
2751 (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
2752 * NetworkProcess/NetworkLoadChecker.h: Added.
2753 (WebKit::NetworkLoadChecker::setCSPResponseHeaders):
2754 (WebKit::NetworkLoadChecker::setContentExtensionRuleLists):
2755 (WebKit::NetworkLoadChecker::url const):
2756 (WebKit::NetworkLoadChecker::storedCredentialsPolicy const):
2757 (WebKit::NetworkLoadChecker::isChecking const):
2758 (WebKit::NetworkLoadChecker::isRedirected const):
2759 * NetworkProcess/PingLoad.cpp:
2760 (WebKit::PingLoad::PingLoad):
2761 (WebKit::PingLoad::~PingLoad):
2762 (WebKit::PingLoad::willPerformHTTPRedirection):
2763 (WebKit::PingLoad::didReceiveChallenge):
2764 (WebKit::PingLoad::wasBlocked):
2765 (WebKit::PingLoad::cannotShowURL):
2766 (WebKit::PingLoad::timeoutTimerFired):
2767 (WebKit::PingLoad::currentURL const):
2768 * NetworkProcess/PingLoad.h:
2769 * WebKit.xcodeproj/project.pbxproj:
2771 2018-03-27 Jiewen Tan <jiewen_tan@apple.com>
2773 [WebAuthN] Implement authenticatorGetAssertion
2774 https://bugs.webkit.org/show_bug.cgi?id=183881
2775 <rdar://problem/37258628>
2777 Reviewed by Brent Fulgham.
2779 * Shared/WebPreferences.yaml:
2780 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
2781 (WebKit::WebCredentialsMessengerProxy::makeCredential):
2782 (WebKit::WebCredentialsMessengerProxy::getAssertion):
2783 (WebKit::WebCredentialsMessengerProxy::getAssertionReply):
2784 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
2785 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
2786 * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
2787 (WebKit::WebCredentialsMessenger::getAssertion):
2788 (WebKit::WebCredentialsMessenger::getAssertionReply):
2789 * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
2791 2018-03-27 Chris Dumez <cdumez@apple.com>
2793 Avoid constructing SecurityOrigin objects from non-main threads
2794 https://bugs.webkit.org/show_bug.cgi?id=184024
2796 Reviewed by Youenn Fablet.
2798 Avoid constructing SecurityOrigin objects from non-main threads as much as possible.
2800 * WebProcess/Storage/WebSWClientConnection.cpp:
2801 (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
2802 (WebKit::WebSWClientConnection::matchRegistration):
2803 (WebKit::WebSWClientConnection::getRegistrations):
2804 * WebProcess/Storage/WebSWClientConnection.h:
2805 * WebProcess/Storage/WebSWOriginTable.cpp:
2806 (WebKit::WebSWOriginTable::contains const):
2807 * WebProcess/Storage/WebSWOriginTable.h:
2809 2018-03-27 Chris Dumez <cdumez@apple.com>
2811 Move online state detection from the WebProcess to the NetworkProcess
2812 https://bugs.webkit.org/show_bug.cgi?id=183989
2813 <rdar://problem/37093299>
2815 Reviewed by Youenn Fablet.
2817 Move online state detection from the WebProcess to the NetworkProcess. This avoid executing the same (expensive) code in
2818 EACH web process whenever a network interface's state changes. Now, the Network Process monitors network interfaces
2819 and determines the online state whenever an interface's state changes. If the onLine state changes, it notifies all
2820 its connected WebProcesses via IPC.
2822 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2823 (WebKit::NetworkConnectionToWebProcess::setOnLineState):
2824 * NetworkProcess/NetworkConnectionToWebProcess.h:
2825 * NetworkProcess/NetworkProcess.cpp:
2826 (WebKit::NetworkProcess::NetworkProcess):
2827 (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
2828 * WebProcess/Network/NetworkProcessConnection.cpp:
2829 (WebKit::NetworkProcessConnection::setOnLineState):
2830 * WebProcess/Network/NetworkProcessConnection.h:
2831 * WebProcess/Network/NetworkProcessConnection.messages.in:
2832 * WebProcess/Network/WebLoaderStrategy.cpp:
2833 (WebKit::WebLoaderStrategy::isOnLine const):
2834 (WebKit::WebLoaderStrategy::addOnlineStateChangeListener):
2835 (WebKit::WebLoaderStrategy::setOnLineState):
2836 * WebProcess/Network/WebLoaderStrategy.h:
2838 2018-03-27 Wenson Hsieh <wenson_hsieh@apple.com>
2840 [Extra zoom mode] Add support for new focused form control overlay behaviors
2841 https://bugs.webkit.org/show_bug.cgi?id=184043
2842 <rdar://problem/38758727>
2844 Reviewed by Tim Horton.
2846 See below for more details.
2848 * UIProcess/ios/WKContentViewInteraction.mm:
2849 (-[WKContentView _willStartScrollingOrZooming]):
2850 (-[WKContentView _didEndScrollingOrZooming]):
2852 Suppress focused form control navigation while the scroll view is undergoing a scroll or zoom animation (e.g.,
2853 when moving from one focused form control to another).
2855 (-[WKContentView textInputController:didCommitText:withSuggestion:]):
2857 When dismissing an input view controller, allow focused form control navigation only after updating assisted
2858 node information to ensure that focus rects aren't stale as the user begins to navigate between forms.
2860 (-[WKContentView rectForFocusedFormControlController:inCoordinateSpace:]):
2861 (-[WKContentView nextRectForFocusedFormControlController:inCoordinateSpace:]):
2862 (-[WKContentView previousRectForFocusedFormControlController:inCoordinateSpace:]):
2863 (-[WKContentView scrollViewForFocusedFormControlController:]):
2864 (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]): Deleted.
2866 Implement some new focused form overlay delegate hooks to vend the scroll view, as well as the rects of next and
2867 previous focusable form controls.
2869 2018-03-27 Brent Fulgham <bfulgham@apple.com>
2871 Further refine cookie read/write logging
2872 https://bugs.webkit.org/show_bug.cgi?id=184044
2873 <rdar://problem/38915610>
2875 Reviewed by Chris Dumez.
2877 Cookie logging was passing the partition, rather than the first party, when logging, which
2878 prevented logging in cases where partitioning or blocking was active. This patch corrects
2879 these calls so that logging is generated in these cases, too.
2881 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2882 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Call log routines if needed.
2883 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Ditto.
2884 * NetworkProcess/NetworkResourceLoader.cpp:
2885 (WebKit::escapeIDForJSON): Make available to use in multiple functions.
2886 (WebKit::NetworkResourceLoader::logCookieInformation const): Revise to use shared
2887 convenience functions.
2888 (WebKit::logBlockedCookieInformation): Added.
2889 (WebKit::logCookieInformationInternal): Added.
2890 (WebKit::NetworkResourceLoader::logCookieInformation): Revise to use shared
2891 convenience functions.
2892 * NetworkProcess/NetworkResourceLoader.h:
2894 2018-03-27 Brian Burg <bburg@apple.com>
2896 Web Automation: support enter/exit fullscreen and hide/restore window operations
2897 https://bugs.webkit.org/show_bug.cgi?id=182837
2898 <rdar://problem/37580732>
2900 Reviewed by Tim Horton.
2902 The W3C specification is more explicit about when to exit fullscreen and
2903 restore the window for a browsing context. So, WebKit needs to have support
2904 for performing these operations on behalf of a driver.
2906 Based on prototyping, it is sufficient to use a JavaScript atom to enter
2907 fullscreen mode. This is included in the patch as EnterFullscreen.js and
2908 can be used to implement the §10.7.5 Fullscreen Window command.
2910 Other window operations cannot be peformed from JavaScript, so we need to
2911 delegate these operations to the session client (i.e., Safari).
2912 This patch adds session client callouts for restoring, minimizing, and
2913 switching to a browsing context.
2915 Exiting fullscreen happens implicitly (per specification) when setting a
2916 window frame without an actual frame, or when switching/restoring/minimizing a window.
2917 If needed, a driver can call Set Window Rect in this way to unfullscreen a context.
2918 Similarly, a driver can restore a minimized window using Set Window Rect.
2920 * UIProcess/API/APIAutomationSessionClient.h:
2921 (API::AutomationSessionClient::requestHideWindowOfPage):
2922 (API::AutomationSessionClient::requestRestoreWindowOfPage):
2923 (API::AutomationSessionClient::requestSwitchToPage):
2924 Add new API client methods.
2926 * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
2927 Add new Cocoa API delegate methods.
2929 * UIProcess/Automation/Automation.json:
2930 Make the switch to browsing context command asynchronous, since this functionality
2931 is not always synchronous, and we prefer to use completion handlers in the delegates.
2933 Add new protocol method for hiding the window of a browsing context.
2934 This is expected to minimize/miniaturize a window for desktop window managers.
2936 * UIProcess/Automation/WebAutomationSession.h:
2937 * UIProcess/Automation/WebAutomationSession.cpp:
2938 (WebKit::WebAutomationSession::switchToBrowsingContext):
2939 Make this function asynchronous. Call out to the session client.
2941 (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext):
2942 Follow the steps in the specification to restore window and exit fullscreen.
2944 (WebKit::WebAutomationSession::hideWindowOfBrowsingContext):
2945 Exit fullscreen and call out to the session client.
2947 (WebKit::WebAutomationSession::exitFullscreenWindowForPage):
2948 This is a little strange. Because there is no async API for exiting fullscreen
2949 from C++ code, we hook into willEnterFullScreen and didExitFullScreen and send
2950 out the response if the page exited fullscreen after we requested it to do so.
2951 Because the W3C specification mandates that drivers only process one command at
2952 a time, there will only ever be one callback installed by this method at a time.
2954 (WebKit::WebAutomationSession::restoreWindowForPage):
2955 (WebKit::WebAutomationSession::hideWindowForPage):
2956 Call out to the session client.
2958 (WebKit::WebAutomationSession::didEnterFullScreenForPage):
2959 (WebKit::WebAutomationSession::didExitFullScreenForPage):
2960 Add methods to be called by instrumentation hooks in WebFullScreenManagerProxy.
2962 * UIProcess/Automation/atoms/EnterFullscreen.js: Added.
2965 * UIProcess/Cocoa/AutomationSessionClient.h:
2966 * UIProcess/Cocoa/AutomationSessionClient.mm:
2967 (WebKit::AutomationSessionClient::AutomationSessionClient):
2968 (WebKit::AutomationSessionClient::requestSwitchToPage):
2969 (WebKit::AutomationSessionClient::requestHideWindowOfPage):
2970 (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
2971 (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
2972 Add boilerplate to convert C++ API client to Objective-C delegate methods.
2974 * UIProcess/WebFullScreenManagerProxy.cpp:
2975 (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
2976 (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
2977 Notify the automation session if the page is under automation and
2978 enters or exits fullscreen.
2980 * WebKit.xcodeproj/project.pbxproj:
2981 Add EnterFullscreen.js to the list of WebDriver atoms. These are copied
2982 as WebKit2 private headers and used by driver implementations.
2984 2018-03-27 Eric Carlson <eric.carlson@apple.com>
2986 Make AVFoundationEnabled preference available on iOS
2987 https://bugs.webkit.org/show_bug.cgi?id=183876
2988 <rdar://problem/38726459>
2990 Reviewed by Youenn Fablet.
2992 * Shared/WebPreferences.yaml: Set AVFoundationEnabled with DEFAULT_AVFOUNDATION_ENABLED.
2993 * Shared/WebPreferencesDefaultValues.h:
2995 * UIProcess/API/Cocoa/WKPreferences.mm:
2996 (-[WKPreferences _setAVFoundationEnabled:]): Enable for iOS.
2997 (-[WKPreferences _avFoundationEnabled]): Ditto.
2998 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3000 2018-03-26 Tim Horton <timothy_horton@apple.com>
3002 Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
3003 https://bugs.webkit.org/show_bug.cgi?id=184030
3004 <rdar://problem/38895281>
3006 Reviewed by Dan Bernstein.
3008 * Configurations/Base.xcconfig:
3009 * Configurations/BaseTarget.xcconfig:
3010 * Configurations/WebKit.xcconfig:
3012 2018-03-26 Tim Horton <timothy_horton@apple.com>
3014 Add and adopt HAVE(CORE_ANIMATION_RENDER_SERVER)
3015 https://bugs.webkit.org/show_bug.cgi?id=184026
3016 <rdar://problem/38883321>
3018 Reviewed by Sam Weinig.
3020 * UIProcess/API/Cocoa/WKWebView.mm:
3021 (-[WKWebView _takeViewSnapshot]):
3022 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
3024 2018-03-26 Wenson Hsieh <wenson_hsieh@apple.com>
3026 [Extra zoom mode] Refactor input view controller presentation and dismissal helpers
3027 https://bugs.webkit.org/show_bug.cgi?id=184020
3028 Work towards <rdar://problem/38758727>
3030 Reviewed by Tim Horton.
3032 We currently have separate presentation and dismissal helpers for each type of view controller corresponding to
3033 a focused element type. This is excessive, considering that all of these helpers are only invoked from one place
3034 (either -presentViewControllerForCurrentAssistedNode or -dismissAllInputViewControllers), with the exception of
3035 the focused form control overlay.
3037 This refactoring allows us to then adjust the timing of first responder restoration logic, such that the focused
3038 form control view controller can receive forwarded events from the web view. See below for more detail.
3040 * UIProcess/ios/WKContentViewInteraction.mm:
3041 (-[WKContentView presentFocusedFormControlViewController:]):
3042 (-[WKContentView dismissFocusedFormControlViewController:]):
3044 Remove logic to restore the web view as first responder.
3046 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
3047 (-[WKContentView dismissAllInputViewControllers]):
3049 Restore first responder after dismissing a view controller that was presented when focusing a form control, only
3050 if the web view was first responder before presentation.
3052 (-[WKContentView presentDatePickerViewController:]): Deleted.
3053 (-[WKContentView dismissDatePickerViewController:]): Deleted.
3054 (-[WKContentView presentTimePickerViewController:]): Deleted.
3055 (-[WKContentView dismissTimePickerViewController:]): Deleted.
3056 (-[WKContentView presentSelectMenuViewController:]): Deleted.
3057 (-[WKContentView dismissSelectMenuViewController:]): Deleted.
3058 (-[WKContentView dismissNumberPadViewController:]): Deleted.
3059 (-[WKContentView presentNumberPadViewController:]): Deleted.
3060 (-[WKContentView presentTextInputViewController:]): Deleted.
3061 (-[WKContentView dismissTextInputViewController:]): Deleted.
3063 2018-03-06 Brian Burg <bburg@apple.com>
3065 Web Automation: provide a way to ask clients for a new tab or window
3066 https://bugs.webkit.org/show_bug.cgi?id=183381
3067 <rdar://problem/38167301>
3069 Reviewed by Timothy Hatcher.
3071 Add support for specifying browsing context options when requesting
3072 a new browsing context from the automation session client/delegate.
3073 This is currently just used for specifying tab vs window, but could
3074 also be used for things like toggling certain browser chrome or features.
3076 There is no guarantee that the client has a notion of tabs vs windows,
3077 so this option is purely advisory and should not cause the command to
3078 fail if it cannot be honored.
3080 This behavior caused by specifying this option is client-specific, so no
3081 new tests are included in WebKit for this change.
3083 * UIProcess/API/APIAutomationSessionClient.h:
3084 (API::AutomationSessionClient::didRequestNewPageWithOptions):
3085 (API::AutomationSessionClient::didRequestNewWindow): Deleted.
3086 Add options parameter.
3088 * UIProcess/API/glib/WebKitAutomationSession.cpp:
3089 Adjust to new signature. More work is needed to plumb this information
3090 to the public API for GTK/WPE and support it in WebKitGTK driver.
3092 * UIProcess/Automation/Automation.json: Add new optional parameter.
3094 * UIProcess/Automation/WebAutomationSession.h:
3095 * UIProcess/Automation/WebAutomationSession.cpp:
3096 (WebKit::WebAutomationSession::createBrowsingContext):
3097 Convert the protocol option to an API option.
3099 * UIProcess/Cocoa/AutomationSessionClient.h:
3100 * UIProcess/Cocoa/AutomationSessionClient.mm:
3101 (WebKit::AutomationSessionClient::AutomationSessionClient):
3103 (WebKit::AutomationSessionClient::didRequestNewPageWithOptions):
3104 (WebKit::AutomationSessionClient::didRequestNewWindow): Deleted.
3105 Convert the internal option to a Cocoa SPI option and pass it along.
3107 * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
3108 Adjust delegate methods to include options. Clients need to adopt the new signature(s).
3110 2018-03-26 Wenson Hsieh <wenson_hsieh@apple.com>
3112 [Extra zoom mode] Add plumbing for next and previous focusable element rects
3113 https://bugs.webkit.org/show_bug.cgi?id=184016
3114 Work towards <rdar://problem/38758727>
3116 Reviewed by Tim Horton.
3118 When building up AssistedNodeInformation, we currently compute the element rect of the current focused element,
3119 as well as flags indicating whether or not there are next or previous focusable elements. For
3120 <rdar://problem/38758727>, we additionally send the rects of the next or previous focusable elements as well.
3122 * Shared/AssistedNodeInformation.cpp:
3123 (WebKit::AssistedNodeInformation::encode const):
3124 (WebKit::AssistedNodeInformation::decode):
3126 IPC support for nextNodeRect and previousNodeRect.
3128 * Shared/AssistedNodeInformation.h:
3129 * WebProcess/WebPage/ios/WebPageIOS.mm:
3130 (WebKit::elementRectInRootViewCoordinates):
3132 Add a helper to compute an element's rect in root view coordinates. We use this to compute the rects of the
3133 current focused element as well as those of the next and previous elements, if any.
3135 (WebKit::WebPage::getAssistedNodeInformation):
3136 (WebKit::hasAssistableElement): Deleted.
3138 Since we need the next or previous focusable element to get its rect, we don't need this helper anymore.
3140 2018-03-26 Chris Dumez <cdumez@apple.com>
3142 Use SecurityOriginData more consistently in Service Worker code
3143 https://bugs.webkit.org/show_bug.cgi?id=183969
3145 Reviewed by Darin Adler.
3147 Use SecurityOriginData more consistently in Service Worker code to avoid constructing
3148 SecurityOrigin objects unnecessarily.
3150 * NetworkProcess/NetworkResourceLoadParameters.cpp:
3151 (WebKit::NetworkResourceLoadParameters::encode const):
3152 * Shared/API/c/WKSecurityOriginRef.cpp:
3153 (WKSecurityOriginCopyDatabaseIdentifier):
3154 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
3155 (WebKit::WebSWOriginStore::addToStore):
3156 (WebKit::WebSWOriginStore::removeFromStore):
3157 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
3158 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3159 (WebKit::WebSWServerConnection::scheduleJobInServer):
3160 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
3161 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3162 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
3163 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3164 * StorageProcess/StorageProcess.cpp:
3165 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
3166 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
3167 (WebKit::StorageProcess::createStorageToWebProcessConnection):
3168 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
3169 (WebKit::StorageProcess::serverToContextConnectionForOrigin):
3170 (WebKit::StorageProcess::createServerToContextConnection):
3171 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
3172 * StorageProcess/StorageProcess.h:
3173 * UIProcess/API/APIFrameInfo.cpp:
3174 (API::FrameInfo::create):
3175 * UIProcess/API/C/WKApplicationCacheManager.cpp:
3176 (WKApplicationCacheManagerDeleteEntriesForOrigin):
3177 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3178 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
3179 * UIProcess/API/C/WKResourceCacheManager.cpp:
3180 (WKResourceCacheManagerClearCacheForOrigin):
3181 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3182 (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
3183 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
3184 * UIProcess/ServiceWorkerProcessProxy.cpp:
3185 (WebKit::ServiceWorkerProcessProxy::create):
3186 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
3187 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
3188 * UIProcess/ServiceWorkerProcessProxy.h:
3189 * UIProcess/Storage/StorageProcessProxy.cpp:
3190 (WebKit::StorageProcessProxy::getStorageProcessConnection):
3191 * UIProcess/WebProcessPool.cpp:
3192 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
3193 (WebKit::WebProcessPool::disconnectProcess):
3194 (WebKit::WebProcessPool::updateProcessAssertions):
3195 * UIProcess/WebProcessPool.h:
3196 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3197 (WebKit::WebsiteDataStore::fetchDataAndApply):
3198 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
3199 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
3200 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3201 (WKBundlePageCopyOriginsWithApplicationCache):
3202 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3203 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
3204 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
3205 * WebProcess/Storage/WebSWClientConnection.cpp:
3206 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
3207 (WebKit::WebSWClientConnection::matchRegistration):
3208 (WebKit::WebSWClientConnection::whenRegistrationReady):
3209 (WebKit::WebSWClientConnection::getRegistrations):
3210 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3211 (WebKit::WebChromeClient::exceededDatabaseQuota):
3212 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
3213 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3214 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3215 * WebProcess/WebProcess.cpp:
3216 (WebKit::WebProcess::fetchWebsiteData):
3217 * WebProcess/WebStorage/StorageAreaImpl.cpp:
3218 (WebKit::StorageAreaImpl::securityOrigin const):
3219 * WebProcess/WebStorage/StorageAreaImpl.h:
3220 * WebProcess/WebStorage/StorageAreaMap.cpp:
3221 (WebKit::StorageAreaMap::StorageAreaMap):
3222 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3223 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3224 * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
3225 (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
3227 2018-03-26 Brent Fulgham <bfulgham@apple.com>
3229 Warn against cookie access in the WebContent process using ProcessPrivilege assertions
3230 https://bugs.webkit.org/show_bug.cgi?id=183911
3231 <rdar://problem/38762306>
3233 Reviewed by Youenn Fablet.
3235 Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
3236 should never call Cookie API directly. That should only happen in the Networking or
3239 * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
3240 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3241 (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3242 * NetworkProcess/NetworkProcess.cpp:
3243 (WebKit::NetworkProcess::initializeNetworkProcess):
3244 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3245 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
3246 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3247 (WebKit::NetworkProcess::setSharedHTTPCookieStorage):
3248 (WebKit::NetworkProcess::syncAllCookies):
3249 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3250 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3251 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3252 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
3253 * PluginProcess/PluginProcess.cpp:
3254 (WebKit::PluginProcess::initializeProcess):
3255 * Shared/cf/CookieStorageUtilsCF.mm:
3256 (WebKit::cookieStorageFromIdentifyingData):
3257 (WebKit::identifyingDataFromCookieStorage):
3258 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3259 (WebKit::WebProcessPool::platformInitializeWebProcess):
3260 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3261 (WebKit::privateBrowsingSession):
3262 * UIProcess/WebProcessPool.cpp:
3263 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3264 (WebKit::WebsiteDataStore::parameters):
3265 * UIProcess/mac/WebCookieManagerProxyMac.mm:
3266 (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
3267 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3268 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3269 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3270 (WebKit::WebFrameLoaderClient::createNetworkingContext):
3271 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3272 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
3273 (WebKit::WebFrameNetworkingContext::storageSession const):
3274 * WebProcess/WebProcess.cpp:
3275 (WebKit::WebProcess::initializeProcess):
3277 2018-03-26 Alex Christensen <achristensen@webkit.org>
3279 Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
3280 https://bugs.webkit.org/show_bug.cgi?id=183965
3282 Reviewed by Chris Dumez.
3284 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3285 (WebKit::WebFrameLoaderClient::willCacheResponse const):
3286 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3288 2018-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
3290 [GTK][WPE] Add API to convert between DOM and JSCValue
3291 https://bugs.webkit.org/show_bug.cgi?id=183448
3293 Reviewed by Michael Catanzaro.
3295 Add methods to get a JSCValue for a WebKitDOMObject and to create a WebKitDOMNode from a JSCValue. Deprecate
3296 most of the GTK+ DOM bindings API and move the non-deprecated parts to glib dir to be exposed by WPE too.
3298 * PlatformGTK.cmake:
3299 * PlatformWPE.cmake:
3302 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3303 * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.cpp.
3304 * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
3305 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocument.cpp: Added.
3308 (WebKit::wrapDocument):
3309 (webkit_dom_document_class_init):
3310 (webkit_dom_document_init):
3311 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocumentPrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
3312 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp: Added.
3315 (WebKit::wrapElement):
3316 (webkit_dom_element_class_init):
3317 (webkit_dom_element_init):
3318 (webkit_dom_element_html_input_element_is_user_edited):
3319 (webkit_dom_element_html_input_element_get_auto_filled):
3320 (webkit_dom_element_html_input_element_set_auto_filled):
3321 (webkit_dom_element_html_input_element_set_editing_value):
3322 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElementPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h.
3323 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNode.cpp: Added.
3324 (_WebKitDOMNodePrivate::~_WebKitDOMNodePrivate):
3328 (webkitDOMNodeConstructor):
3329 (webkitDOMNodeFinalize):
3330 (webkit_dom_node_init):
3331 (webkit_dom_node_class_init):
3332 (webkitDOMNodeSetCoreObject):
3333 (webkitDOMNodeGetCoreObject):
3334 (webkit_dom_node_for_js_value):
3335 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNodePrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
3336 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMObject.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp.
3337 (webkitDOMObjectSetProperty):
3338 (webkit_dom_object_class_init):
3339 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.cpp: Added.
3341 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
3342 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
3343 (webkit_frame_get_js_value_for_dom_object):
3344 (webkit_frame_get_js_value_for_dom_object_in_script_world):
3345 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
3346 (webkit_web_page_class_init):
3347 (webkitWebPageCreate):
3348 (webkit_web_page_get_dom_document):
3349 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp:
3350 (WebKit::GObjectEventListener::handleEvent):
3351 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp:
3352 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectXPathNSResolver.cpp:
3353 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
3354 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
3355 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
3356 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
3357 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
3358 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
3359 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
3360 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
3361 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
3362 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
3363 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
3364 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
3365 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
3366 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
3367 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
3368 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
3369 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
3370 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
3371 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
3372 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h:
3373 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
3374 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h:
3375 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
3376 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
3377 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
3378 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
3379 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
3380 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
3381 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
3382 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
3383 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
3384 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
3385 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
3386 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
3387 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
3388 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
3389 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp.
3390 (webkitDOMDocumentDOMEventTargetInit):
3391 (webkitDOMDocumentInstallProperties):
3392 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
3393 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
3394 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
3395 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp.
3396 (webkitDOMElementDOMEventTargetInit):
3397 (webkitDOMElementInstallProperties):
3398 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
3399 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
3400 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.cpp:
3401 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h:
3402 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
3403 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
3404 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
3405 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
3406 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
3407 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
3408 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
3409 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
3410 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
3411 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
3412 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
3413 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
3414 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
3415 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
3416 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
3417 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
3418 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
3419 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
3420 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
3421 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
3422 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
3423 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
3424 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
3425 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
3426 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
3427 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
3428 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
3429 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
3430 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
3431 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
3432 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
3433 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
3434 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
3435 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
3436 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
3437 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
3438 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
3439 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
3440 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
3441 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
3442 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
3443 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
3444 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
3445 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
3446 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
3447 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
3448 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
3449 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
3450 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
3451 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
3452 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
3453 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
3454 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
3455 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
3456 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
3457 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
3458 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3459 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
3460 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
3461 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
3462 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
3463 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
3464 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
3465 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
3466 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
3467 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
3468 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
3469 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
3470 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
3471 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
3472 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
3473 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
3474 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
3475 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
3476 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
3477 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
3478 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
3479 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
3480 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
3481 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
3482 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
3483 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
3484 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
3485 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
3486 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
3487 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
3488 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
3489 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
3490 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
3491 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
3492 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
3493 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
3494 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
3495 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
3496 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
3497 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
3498 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
3499 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
3500 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
3501 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
3502 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
3503 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
3504 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
3505 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
3506 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
3507 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
3508 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
3509 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
3510 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
3511 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
3512 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
3513 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
3514 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
3515 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
3516 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
3517 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
3518 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
3519 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
3520 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
3521 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
3522 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
3523 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
3524 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
3525 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
3526 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
3527 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
3528 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
3529 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
3530 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
3531 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h:
3532 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp.
3533 (webkitDOMNodeDOMEventTargetInit):
3534 (webkitDOMNodeInstallProperties):
3535 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
3536 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
3537 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
3538 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
3539 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h:
3540 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp.
3541 (WebKit::wrapNodeGtk):
3542 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h.
3543 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
3544 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
3545 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
3546 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
3547 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
3548 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
3549 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
3550 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
3551 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
3552 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
3553 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
3554 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
3555 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
3556 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
3557 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
3558 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
3559 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
3560 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
3561 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
3562 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h:
3563 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
3564 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
3565 * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
3566 * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
3567 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDefines.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
3568 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDocument.h: Added.
3569 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMElement.h: Added.
3570 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMNode.h: Added.
3571 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMObject.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h.
3572 * WebProcess/InjectedBundle/API/wpe/DOM/webkitdom.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
3573 * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
3574 * WebProcess/InjectedBundle/API/wpe/WebKitWebHitTestResult.h: Added.
3575 * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h:
3576 * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template: Added.
3577 * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
3578 * WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h:
3580 2018-03-26 Zan Dobersek <zdobersek@igalia.com>
3582 [CoordGraphics] Clean up CoordinatedGraphicsScene construct-time initializations
3583 https://bugs.webkit.org/show_bug.cgi?id=184002
3585 Reviewed by Carlos Garcia Campos.
3587 Move the CoordinatedGraphicsScene constant-expression initializations
3588 from constructor to the point of declaration.
3590 Default the CoordinatedGraphicsScene destructor.
3592 The m_scrollPosition member variable is unused in this class, while the
3593 similarly-named m_renderedContentsScrollPosition tracks scroll position
3594 of the scene. Remove the latter and use m_scrollPosition in its place.
3596 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3597 (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
3598 (WebKit::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
3599 (WebKit::CoordinatedGraphicsScene::commitSceneState):
3600 (WebKit::CoordinatedGraphicsScene::~CoordinatedGraphicsScene): Deleted.
3601 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3603 2018-03-25 Michael Catanzaro <mcatanzaro@igalia.com>
3605 [GTK] WebKitWebProcessEnumTypes.h missing from webkit-web-extension.h
3606 https://bugs.webkit.org/show_bug.cgi?id=183998
3608 Reviewed by Carlos Garcia Campos.
3610 * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3612 2018-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
3614 [GTK] Unresolved type warnings when generating gir
3615 https://bugs.webkit.org/show_bug.cgi?id=183926
3617 Reviewed by Michael Catanzaro.
3619 Skip deprecated functions using JSC C API from introspection.
3621 * UIProcess/API/glib/WebKitJavascriptResult.cpp:
3622 * UIProcess/API/glib/WebKitWebView.cpp:
3623 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
3625 2018-03-25 Commit Queue <commit-queue@webkit.org>
3627 Unreviewed, rolling out r229954.
3628 https://bugs.webkit.org/show_bug.cgi?id=184000
3630 Caused many layout tests to crash on Apple High Sierra,
3631 Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
3632 by dydz on #webkit).
3636 "Use SecurityOriginData more consistently in Service Worker
3638 https://bugs.webkit.org/show_bug.cgi?id=183969
3639 https://trac.webkit.org/changeset/229954
3641 2018-03-23 Brian Burg <bburg@apple.com>
3643 Web Automation: remove unnecessary member variable WebAutomationSession
3644 https://bugs.webkit.org/show_bug.cgi?id=183971
3646 Reviewed by Timothy Hatcher.
3648 The concept of the "active" browsing context is something in the WebDriver
3649 specification, but we were a bit too literal when first implementing this.
3650 There's no actual need for this on the browser side since most commands
3651 require implicitly switching to the target window passed in with the
3652 Automation command. The driver, however, still needs to track the current
3653 browsing context and current top-level browsing context.
3655 For returning whether a browsing context is active, we can just look at
3656 the page's activity state to know whether the page is active or not. For
3657 a normal browser, only one page is going to be visible and focused at a time.
3659 * UIProcess/Automation/WebAutomationSession.h:
3660 * UIProcess/Automation/WebAutomationSession.cpp:
3661 (WebKit::WebAutomationSession::buildBrowsingContextForPage):
3662 Consult the page's activity state to determine whether it's active.
3664 (WebKit::WebAutomationSession::createBrowsingContext):
3665 (WebKit::WebAutomationSession::closeBrowsingContext):
3666 (WebKit::WebAutomationSession::switchToBrowsingContext):
3667 (WebKit::WebAutomationSession::handleRunOpenPanel):
3668 Stop reading and writing the current browsing context handle.
3670 * UIProcess/WebPageProxy.h:
3671 (WebKit::WebPageProxy::isViewFocused const):
3672 (WebKit::WebPageProxy::isViewWindowActive const):
3675 2018-03-25 Tim Horton <timothy_horton@apple.com>
3677 Add and adopt ENABLE(AIRPLAY_PICKER)
3678 https://bugs.webkit.org/show_bug.cgi?id=183992
3680 Reviewed by Daniel Bates.
3682 * UIProcess/ios/WKContentViewInteraction.h:
3683 * UIProcess/ios/WKContentViewInteraction.mm:
3684 (-[WKContentView _showPlaybackTargetPicker:fromRect:]):
3685 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
3686 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3688 2018-03-25 Tim Horton <timothy_horton@apple.com>
3690 Move WKAnimationDelegate to its own header
3691 https://bugs.webkit.org/show_bug.cgi?id=183976
3692 <rdar://problem/38822299>
3694 Reviewed by Dan Bernstein.
3696 * Shared/RemoteLayerTree/WKAnimationDelegate.h: Added.
3697 * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
3698 * WebKit.xcodeproj/project.pbxproj:
3699 * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
3700 RemoteLayerTreeHost uses a forward declaration of WKAnimationDelegate,
3701 so we're just getting lucky that an -invalidate method exists on
3702 some other object. Instead, move WKAnimationDelegate to its own
3703 header, and include it in the places we use it.
3705 2018-03-24 Tim Horton <timothy_horton@apple.com>
3707 Adopt WK_PLATFORM_NAME in WebKit
3708 https://bugs.webkit.org/show_bug.cgi?id=183978
3710 Reviewed by Dan Bernstein.
3712 * Configurations/WebKit.xcconfig:
3713 * WebKit.xcodeproj/project.pbxproj:
3714 * mac/MigrateHeadersFromWebKitLegacy.make:
3715 * mac/postprocess-framework-headers.sh:
3717 2018-03-24 Tim Horton <timothy_horton@apple.com>
3719 Ignore sandbox_init_with_parameters deprecation warnings
3720 https://bugs.webkit.org/show_bug.cgi?id=183979
3722 Reviewed by Dan Bernstein.
3724 * Shared/ios/ChildProcessIOS.mm:
3725 (WebKit::ChildProcess::initializeSandbox):
3727 2018-03-24 Chris Dumez <cdumez@apple.com>
3729 Use SecurityOriginData more consistently in Service Worker code
3730 https://bugs.webkit.org/show_bug.cgi?id=183969
3732 Reviewed by Darin Adler.
3734 Use SecurityOriginData more consistently in Service Worker code to avoid constructing
3735 SecurityOrigin objects unnecessarily.
3737 * NetworkProcess/NetworkResourceLoadParameters.cpp:
3738 (WebKit::NetworkResourceLoadParameters::encode const):
3739 * Shared/API/c/WKSecurityOriginRef.cpp:
3740 (WKSecurityOriginCopyDatabaseIdentifier):
3741 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
3742 (WebKit::WebSWOriginStore::addToStore):
3743 (WebKit::WebSWOriginStore::removeFromStore):
3744 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
3745 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3746 (WebKit::WebSWServerConnection::scheduleJobInServer):
3747 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
3748 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3749 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
3750 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3751 * StorageProcess/StorageProcess.cpp:
3752 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
3753 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
3754 (WebKit::StorageProcess::createStorageToWebProcessConnection):
3755 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
3756 (WebKit::StorageProcess::serverToContextConnectionForOrigin):
3757 (WebKit::StorageProcess::createServerToContextConnection):
3758 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
3759 * StorageProcess/StorageProcess.h:
3760 * UIProcess/API/APIFrameInfo.cpp:
3761 (API::FrameInfo::create):
3762 * UIProcess/API/C/WKApplicationCacheManager.cpp:
3763 (WKApplicationCacheManagerDeleteEntriesForOrigin):
3764 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3765 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
3766 * UIProcess/API/C/WKResourceCacheManager.cpp:
3767 (WKResourceCacheManagerClearCacheForOrigin):
3768 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3769 (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
3770 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
3771 * UIProcess/ServiceWorkerProcessProxy.cpp:
3772 (WebKit::ServiceWorkerProcessProxy::create):
3773 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
3774 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
3775 * UIProcess/ServiceWorkerProcessProxy.h:
3776 * UIProcess/Storage/StorageProcessProxy.cpp:
3777 (WebKit::StorageProcessProxy::getStorageProcessConnection):
3778 * UIProcess/WebProcessPool.cpp:
3779 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
3780 (WebKit::WebProcessPool::disconnectProcess):
3781 (WebKit::WebProcessPool::updateProcessAssertions):
3782 * UIProcess/WebProcessPool.h:
3783 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3784 (WebKit::WebsiteDataStore::fetchDataAndApply):
3785 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
3786 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
3787 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3788 (WKBundlePageCopyOriginsWithApplicationCache):
3789 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3790 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
3791 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
3792 * WebProcess/Storage/WebSWClientConnection.cpp:
3793 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
3794 (WebKit::WebSWClientConnection::matchRegistration):
3795 (WebKit::WebSWClientConnection::whenRegistrationReady):
3796 (WebKit::WebSWClientConnection::getRegistrations):
3797 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3798 (WebKit::WebChromeClient::exceededDatabaseQuota):
3799 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
3800 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3801 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3802 * WebProcess/WebProcess.cpp:
3803 (WebKit::WebProcess::fetchWebsiteData):
3804 * WebProcess/WebStorage/StorageAreaImpl.cpp:
3805 (WebKit::StorageAreaImpl::securityOrigin const):
3806 * WebProcess/WebStorage/StorageAreaImpl.h:
3807 * WebProcess/WebStorage/StorageAreaMap.cpp:
3808 (WebKit::StorageAreaMap::StorageAreaMap):
3809 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3810 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3811 * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
3812 (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
3814 2018-03-24 Tim Horton <timothy_horton@apple.com>
3816 Fix the !ENABLE(MEDIA_STREAM) build
3817 https://bugs.webkit.org/show_bug.cgi?id=183977
3819 Reviewed by Wenson Hsieh.
3821 * UIProcess/Cocoa/UIDelegate.mm:
3822 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
3823 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
3824 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3825 * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
3827 2018-03-24 Tim Horton <timothy_horton@apple.com>
3829 WKFileUploadPanel shouldn't depend on WebKitLegacy
3830 https://bugs.webkit.org/show_bug.cgi?id=183981
3832 Reviewed by Wenson Hsieh.
3834 * UIProcess/ios/forms/WKFileUploadPanel.mm:
3835 (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
3836 Just use the underlying WebCore function instead of the
3837 unnecessary NSFileManager category method.
3839 2018-03-23 Tim Horton <timothy_horton@apple.com>
3841 Fix the build with no pasteboard
3842 https://bugs.webkit.org/show_bug.cgi?id=183973
3844 Reviewed by Dan Bernstein.
3846 * Configurations/FeatureDefines.xcconfig:
3848 2018-03-23 Megan Gardner <megan_gardner@apple.com>
3850 Enable unified text selection in select cases for gradual testing
3851 https://bugs.webkit.org/show_bug.cgi?id=183967
3852 <rdar://problem/38815328>
3854 Reviewed by Tim Horton.
3856 Enable in select places for a more gradual switch, as this is a big change and we want to make sure
3857 it works before switching completely.
3859 * UIProcess/ios/WKContentViewInteraction.mm:
3860 (-[WKContentView useSelectionAssistantWithGranularity:]):
3862 2018-03-23 John Wilander <wilander@apple.com>
3864 Resource Load Statistics: Pick up ITP debug mode flag from defaults
3865 https://bugs.webkit.org/show_bug.cgi?id=183956
3866 <rdar://problem/38559574>
3868 Reviewed by Brent Fulgham.
3870 * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
3871 (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
3873 2018-03-23 Wenson Hsieh <wenson_hsieh@apple.com>
3875 [Extra zoom mode] Adopt list view controller UI for select menus
3876 https://bugs.webkit.org/show_bug.cgi?id=183944
3877 <rdar://problem/38799062>
3879 Reviewed by Tim Horton.
3881 Move UIProcess/WKSelectMenuListViewController.* to UIProcess/ios/forms, where it was intended to go.
3883 * UIProcess/ios/forms/WKSelectMenuListViewController.h: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.h.
3884 * UIProcess/ios/forms/WKSelectMenuListViewController.mm: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.mm.
3885 * WebKit.xcodeproj/project.pbxproj:
3887 2018-03-23 Chris Dumez <cdumez@apple.com>
3889 Promptly terminate service worker processes when they are no longer needed
3890 https://bugs.webkit.org/show_bug.cgi?id=183873
3891 <rdar://problem/38676995>
3893 Reviewed by Youenn Fablet.
3895 The StorageProcess now keeps track of service worker clients for each security
3896 origin. When there is no longer any clients for a given security origin, the
3897 StorageProcess asks the service worker process for the given origin to terminate
3898 and severs its connection to it.
3900 * Shared/Storage/StorageProcessCreationParameters.h:
3901 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3902 (WebKit::WebSWServerToContextConnection::connectionMayNoLongerBeNeeded):
3903 (WebKit::WebSWServerToContextConnection::terminate):
3904 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3905 * StorageProcess/StorageProcess.cpp:
3906 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
3907 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
3908 (WebKit::StorageProcess::initializeWebsiteDataStore):
3909 (WebKit::StorageProcess::swServerForSession):
3910 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
3911 (WebKit::StorageProcess::disableServiceWorkerProcessTerminationDelay):
3912 * StorageProcess/StorageProcess.h:
3913 * StorageProcess/StorageProcess.messages.in:
3914 * UIProcess/API/Cocoa/WKProcessPool.mm:
3915 (-[WKProcessPool _disableServiceWorkerProcessTerminationDelay]):
3916 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3917 * UIProcess/WebProcessPool.cpp:
3918 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
3919 (WebKit::WebProcessPool::disableServiceWorkerProcessTerminationDelay):
3920 * UIProcess/WebProcessPool.h:
3921 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3922 (WebKit::WebSWContextManagerConnection::terminateProcess):
3923 * WebProcess/Storage/WebSWContextManagerConnection.h:
3924 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3926 2018-03-23 Brady Eidson <beidson@apple.com>
3928 Go to back/forward list items after a process-swapped navigation.
3929 <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
3931 Reviewed by Andy Estes.
3933 This takes the initial work of "process swap a normal navigation" and extends it to
3934 process swapping for back/forward item navigations.
3936 * Scripts/webkit/messages.py:
3938 Make sure state objects are serialized to the UI Process back/forward list items, as otherwise
3939 they will be lost in process-swap scenarios:
3940 * Shared/SessionState.cpp:
3941 (WebKit::PageState::encode const):
3942 (WebKit::PageState::decode):
3943 * Shared/SessionState.h:
3945 Make a new variant of APINavigation specifically for back/forward list items.
3946 * UIProcess/API/APINavigation.cpp:
3947 (API::Navigation::Navigation):
3948 (API::Navigation::loggingURL const):
3949 * UIProcess/API/APINavigation.h:
3950 (API::Navigation::create):
3951 (API::Navigation::backForwardListItem):
3952 (API::Navigation::backForwardFrameLoadType const):
3954 * UIProcess/API/C/WKPage.cpp:
3955 (WKPageGoToBackForwardListItem):
3957 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3958 (-[WKBrowsingContextController goToBackForwardListItem:]):
3960 * UIProcess/API/Cocoa/WKWebView.mm:
3961 (-[WKWebView goToBackForwardListItem:]):
3963 * UIProcess/WebNavigationState.cpp:
3964 (WebKit::WebNavigationState::createLoadRequestNavigation):
3965 (WebKit::WebNavigationState::createBackForwardNavigation):
3966 * UIProcess/WebNavigationState.h:
3968 * UIProcess/WebPageProxy.cpp:
3969 (WebKit::WebPageProxy::reattachToWebProcessForReload):
3970 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3971 (WebKit::WebPageProxy::goForward):
3972 (WebKit::WebPageProxy::goBack):
3973 (WebKit::WebPageProxy::goToBackForwardItem):
3974 (WebKit::WebPageProxy::receivedPolicyDecision):
3975 (WebKit::WebPageProxy::continueNavigationInNewProcess): Handle back/forward navigations differently than others.
3976 (WebKit::WebPageProxy::restoreFromSessionState):
3977 * UIProcess/WebPageProxy.h:
3979 * UIProcess/WebProcessProxy.cpp:
3980 (WebKit::WebProcessProxy::addOrUpdateBackForwardItem): Renamed from "addBackForwardItem" for clarity
3981 (WebKit::WebProcessProxy::addBackForwardItem): Deleted.
3982 * UIProcess/WebProcessProxy.h:
3983 * UIProcess/WebProcessProxy.messages.in:
3985 * UIProcess/ios/ViewGestureControllerIOS.mm:
3986 (WebKit::ViewGestureController::endSwipeGesture):
3988 * UIProcess/mac/ViewGestureControllerMac.mm:
3989 (WebKit::ViewGestureController::endSwipeGesture):
3991 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
3992 (WebKit::toPageState):