WebKit-https.git
11 months agoFix an internal build failure after r239014
achristensen@apple.com [Tue, 11 Dec 2018 18:45:27 +0000 (18:45 +0000)]
Fix an internal build failure after r239014
https://bugs.webkit.org/show_bug.cgi?id=192205

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontOfSize):
There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoSimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from compl...
bburg@apple.com [Tue, 11 Dec 2018 17:39:16 +0000 (17:39 +0000)]
SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
https://bugs.webkit.org/show_bug.cgi?id=191155
<rdar://problem/45745569>

Reviewed by Joseph Pecoraro.

* UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
webkitdriver needs to be updated to not produce such states in this scenario, but this will
avoid a runtime crash caused by trying to call a moved-out completion handler a second time.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, WPE build fix after r239028
philn@webkit.org [Tue, 11 Dec 2018 15:14:51 +0000 (15:14 +0000)]
Unreviewed, WPE build fix after r239028

The FLATPAK_USER_DIR env var is not set early enough, leading to:

Traceback (most recent call last):
File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
  sys.exit(WebkitFlatpak.load_from_args().run())
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
  if not self.clean_args():
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
  _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
  raise KeyError(key)
KeyError: 'FLATPAK_USER_DIR'

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r239071.
commit-queue@webkit.org [Tue, 11 Dec 2018 14:33:36 +0000 (14:33 +0000)]
Unreviewed, rolling out r239071.
https://bugs.webkit.org/show_bug.cgi?id=192588

Broke WPE build due to undefined references to toAPI() and
toImpl() inside the C API (Requested by magomez on #webkit).

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239071

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for...
cfleizach@apple.com [Tue, 11 Dec 2018 06:55:31 +0000 (06:55 +0000)]
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* Platform/spi/ios/AccessibilitySupportSPI.h:
* PlatformMac.cmake:
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginProcess.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
(WKErrorCopyCFError):
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
(WKImageCreateFromCGImage):
* Shared/ChildProcess.cpp:
* Shared/ContextMenuContextData.cpp:
* Shared/EditorState.cpp:
* Shared/Plugins/NPIdentifierData.cpp:
* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
* Shared/SessionState.cpp:
* Shared/SessionTracker.cpp:
* Shared/ShareableBitmap.cpp:
* Shared/ShareableResource.cpp:
* Shared/VisibleContentRectUpdateInfo.cpp:
* Shared/WebBackForwardListItem.cpp:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebHitTestResultData.cpp:
* Shared/WebImage.cpp:
* Shared/WebMediaSessionMetadata.cpp:
* Shared/WebMemorySampler.cpp:
* Shared/WebMouseEvent.cpp:
* Shared/WebRenderObject.cpp:
* Shared/WebSQLiteDatabaseTracker.cpp:
* Shared/WebWheelEvent.cpp:
* Shared/cf/ArgumentCodersCF.cpp:
* Shared/ios/WebPlatformTouchPointIOS.cpp:
* SourcesCocoa.txt:
* UIProcess/API/APIContentRuleListStore.cpp:
* UIProcess/API/APIHitTestResult.cpp:
* UIProcess/API/APINavigation.cpp:
* UIProcess/API/APIOpenPanelParameters.cpp:
* UIProcess/API/APIPageConfiguration.cpp:
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
* UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
* UIProcess/WebStorage/LocalStorageDatabase.cpp:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoSVGViewSpec objects should mark relevant SVG elements
bfulgham@apple.com [Tue, 11 Dec 2018 06:50:33 +0000 (06:50 +0000)]
SVGViewSpec objects should mark relevant SVG elements
https://bugs.webkit.org/show_bug.cgi?id=192567
<rdar://problem/46491325>

Reviewed by Ryosuke Niwa.

Source/WebCore:

SVGViewSpec elements reflect the state of an underlying SVGElement. Teach the mark algorithm to
recognize the relevant SVGElement as active as long as the SVGViewSpec is active.

Update SVGElement so that it can vend WeakPtrs. I also noticed that SVGAttributeOwner used a bare
pointer to the SVGElement, so switched to a WeakPtr.

Test: svg/animations/view-dependency-crash.html

* Sources.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSSVGViewSpecCustom.cpp: Added.
(WebCore::JSSVGViewSpec::visitAdditionalChildren):
* svg/SVGElement.h:
* svg/SVGPathElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::SVGViewSpec): Hold a weak pointer (rather than a bare pointer) to the underlying element.
* svg/SVGViewSpec.h:
* svg/SVGViewSpec.idl:
* svg/properties/SVGAttributeOwnerProxy.cpp: Added.
(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Hold a weak pointer (rather than a bare pointer) to
the underling SVGElement.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.
* svg/properties/SVGAttributeOwnerProxy.h:
(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Move implementation to cpp file.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.
* svg/properties/SVGAttributeOwnerProxyImpl.h: Update for WeakPtr use.

LayoutTests:

* svg/animations/view-dependency-crash-expected.txt: Added.
* svg/animations/view-dependency-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago<rdar://problem/45296285> Content blocker rule "raw" blocks media elements from loading
benjamin@webkit.org [Tue, 11 Dec 2018 05:37:24 +0000 (05:37 +0000)]
<rdar://problem/45296285> Content blocker rule "raw" blocks media elements from loading
https://bugs.webkit.org/show_bug.cgi?id=192439

Reviewed by Dean Jackson.

Source/WebCore:

This broken when WebKit switched to NSURLSession.
In CachedResourceLoader::requestResource(), toResourceType() was turning media load into RAW.

Test: http/tests/contentextensions/video-element-resource-type.html

* loader/ResourceLoadInfo.cpp:
(WebCore::toResourceType):

LayoutTests:

* http/tests/contentextensions/video-element-resource-type-expected.txt: Added.
* http/tests/contentextensions/video-element-resource-type.html: Added.
* http/tests/contentextensions/video-element-resource-type.html.json: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMove ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
don.olmstead@sony.com [Tue, 11 Dec 2018 04:04:45 +0000 (04:04 +0000)]
Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=192573

Reviewed by Simon Fraser.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Remove ENABLE_RESOURCE_LOAD_STATISTICS from Platform.h and instead rely
on it being set in FeatureDefines.xcconfig.

* wtf/Platform.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoCS Painting API should support multiple worklets.
justin_michaud@apple.com [Tue, 11 Dec 2018 03:55:49 +0000 (03:55 +0000)]
CS Painting API should support multiple worklets.
https://bugs.webkit.org/show_bug.cgi?id=192335

Reviewed by Dean Jackson.

Source/WebCore:

Adds a new map to support separate paint worklet global scopes (one for each worklet). Also
adds some tests and a fix for a repaint bug that this oncovered, where changing a custom property required
for paint would not trigger a repaint if there had not been a valid value set before.

Test: fast/css-custom-paint/multiple-worklets.html

* css/CSSPaintImageValue.cpp:
(WebCore::CSSPaintImageValue::image):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::paintWorkletGlobalScope):
(WebCore::Document::setPaintWorkletGlobalScope):
* dom/Document.h:
(WebCore::Document::paintWorkletGlobalScope): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::changedCustomPaintWatchedProperty):
* worklets/Worklet.cpp:
(WebCore::Worklet::addModule):
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::prepareForDestruction):

LayoutTests:

* fast/css-custom-paint/animate-repaint-expected.txt:
* fast/css-custom-paint/animate-repaint.html:
* fast/css-custom-paint/delay-expected.html: Added.
* fast/css-custom-paint/delay-repaint-expected.txt: Copied from LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt.
* fast/css-custom-paint/delay-repaint.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
* fast/css-custom-paint/delay.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
* fast/css-custom-paint/multiple-worklets-expected.html: Added.
* fast/css-custom-paint/multiple-worklets.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoWeb Inspector: REGRESSION (r238599): unable to select specific timeline
mattbaker@apple.com [Tue, 11 Dec 2018 03:50:25 +0000 (03:50 +0000)]
Web Inspector: REGRESSION (r238599): unable to select specific timeline
https://bugs.webkit.org/show_bug.cgi?id=192443
<rdar://problem/46608087>

Reviewed by Joseph Pecoraro.

When determining the trailing horizontal edge for TreeElement mouse
events, TreeOutline should not assume that its containing DOM element
is only as wide as its <ol> element.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.treeElementFromEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoRemove derived classes of RealtimeMediaSourceCenter
youenn@apple.com [Tue, 11 Dec 2018 03:46:19 +0000 (03:46 +0000)]
Remove derived classes of RealtimeMediaSourceCenter
https://bugs.webkit.org/show_bug.cgi?id=192546

Reviewed by Eric Carlson.

Source/WebCore:

Remove virtual methods of RealtimeMediaSourceCenter and remove derived classes of it.
Instead port specific implementation directly implement the needed default factory methods.

Renamed some methods for improved consistency.
Moved some static variables as RealtimeMediaSourceCenter members.

No change of behavior.

* WebCore.xcodeproj/project.pbxproj:
* page/DeprecatedGlobalSettings.cpp:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::createMediaStream):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::setVideoCapturePageState):
(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::videoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::displayCaptureFactory):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/RealtimeVideoSource.cpp:
(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::prepareToProduceData):
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h: Removed.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
* platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
(WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::startProducingData):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: Removed.
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureFactory):
* platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit:

pdate code according WebCore changes.

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
(WebKit::UserMediaCaptureManager::initialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239065 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoDataChannels created asynchronously never open and are unusable
youenn@apple.com [Tue, 11 Dec 2018 03:43:38 +0000 (03:43 +0000)]
DataChannels created asynchronously never open and are unusable
https://bugs.webkit.org/show_bug.cgi?id=192566

Reviewed by Eric Carlson.

Source/WebCore:

For every new data channel (remote or local), we should check the underlying backend state.
This allows firing events if needed.
We were not always doing that which was prohibiting sending some open
events for data channels created after the SCTP connection is set up.

Covered by updated test.

* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
(WebCore::LibWebRTCDataChannelHandler::channelEvent):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::checkState):
* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:

LayoutTests:

* webrtc/datachannel/basic-expected.txt:
* webrtc/datachannel/basic.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUse WeakPtr to refer to VTTCue in VTTCueBox
rniwa@webkit.org [Tue, 11 Dec 2018 03:05:28 +0000 (03:05 +0000)]
Use WeakPtr to refer to VTTCue in VTTCueBox
https://bugs.webkit.org/show_bug.cgi?id=192575

Reviewed by Eric Carlson.

Address the FIXME in VTTCue::~VTTCue by clearing VTTCueBox::m_cue when VTTCue goes away.
This is implemented by simply using WeakPtr.

No new tests since there shoul be no behaivoral change.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::VTTCueBox):
(WebCore::VTTCueBox::getCue const):
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):
* html/track/VTTCue.h:
(WebCore::VTTCueBox::fontSizeFromCaptionUserPrefs const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoPropertyAttribute needs a CustomValue bit.
mark.lam@apple.com [Tue, 11 Dec 2018 02:42:27 +0000 (02:42 +0000)]
PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

* stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

1. Added a PropertyAttribute::CustomValue bit.
2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is
   CustomAccessor | CustomValue.

3. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(),
   we added a check in JSObject::putDirectCustomAccessor() to see if the attributes
   bits include PropertyAttribute::CustomAccessor.  If not, then the property
   must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit
   to the attributes bits.

   This ensures that the property attributes is sufficient to tell us if the
   property contains a CustomGetterSetter.

4. Updated all checks for PropertyAttribute::CustomAccessor to check for
   PropertyAttribute::CustomAccessorOrValue instead if their intent is to check
   for the presence of a CustomGetterSetter as opposed to checking specifically
   for one that is used as a CustomAccessor.

   This includes all the Structure transition code that needs to capture the
   attributes change when a CustomValue has been added.

5. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor.
   The fact that we're using a CustomGetterSetter as a CustomValue should remain
   invisible to the descriptor.  This is because the descriptor should describe
   a CustomValue no differently from a plain value.

6. Added some asserts to ensure that property attributes are as expected, and to
   document some invariants.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByIdStatus::computeFor):
* bytecode/InByIdStatus.cpp:
(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
* bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* runtime/JSFunction.cpp:
(JSC::getCalculatedDisplayName):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
* runtime/JSObject.h:
(JSC::JSObject::putDirectIndex):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::putDirect):
* runtime/JSObjectInlines.h:
(JSC::JSObject::putDirectInternal):
* runtime/PropertyDescriptor.cpp:
(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):
* runtime/PropertySlot.h:
(JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute.  This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable].  The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
don.olmstead@sony.com [Tue, 11 Dec 2018 01:17:17 +0000 (01:17 +0000)]
[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
https://bugs.webkit.org/show_bug.cgi?id=192574

Reviewed by Michael Catanzaro.

.:

* Source/cmake/WebKitFeatures.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239061 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAdd test262-results directory to .gitignore.
ross.kirsling@sony.com [Tue, 11 Dec 2018 00:35:51 +0000 (00:35 +0000)]
Add test262-results directory to .gitignore.
https://bugs.webkit.org/show_bug.cgi?id=192547

Reviewed by Dean Jackson.

* .gitignore:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239060 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAnimated scrolling on Google Maps scrolls the page in addition to moving the map
timothy_horton@apple.com [Tue, 11 Dec 2018 00:32:38 +0000 (00:32 +0000)]
Animated scrolling on Google Maps scrolls the page in addition to moving the map
https://bugs.webkit.org/show_bug.cgi?id=192521
<rdar://problem/46382007>

Reviewed by Sam Weinig.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
Only do keyboard-based rubber-banding in directions that we can actually
scroll, not directions we can only finger-rubber-band in. This effectively
means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoSync FeatureList.pm
don.olmstead@sony.com [Tue, 11 Dec 2018 00:08:09 +0000 (00:08 +0000)]
Sync FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=192565

Reviewed by Michael Catanzaro.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoRename "forced style recalc" to "full style rebuild"
antti@apple.com [Mon, 10 Dec 2018 23:56:31 +0000 (23:56 +0000)]
Rename "forced style recalc" to "full style rebuild"
https://bugs.webkit.org/show_bug.cgi?id=192572

Reviewed by Zalan Bujtas.

Source/WebCore:

The old name is confusing.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::hasValidStyleForProperty):
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRebuild):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
(WebCore::Document::hasPendingStyleRebuild const):
(WebCore::Document::resolveStyle):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::setDesignMode):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setAnimatingFullScreen):
(WebCore::Document::setFullscreenControlsHidden):
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::hasPendingForcedStyleRecalc const): Deleted.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::needsStyleInvalidation const):
* page/Page.cpp:
(WebCore::Page::updateStyleAfterChangeInEnvironment):
* style/StyleScope.cpp:
(WebCore::Style::Scope::updateActiveStyleSheets):

Source/WebKitLegacy/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView setNeedsToApplyStyles:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r239023.
commit-queue@webkit.org [Mon, 10 Dec 2018 23:36:36 +0000 (23:36 +0000)]
Unreviewed, rolling out r239023.
https://bugs.webkit.org/show_bug.cgi?id=192571

Speculative rollout due to broken perf test (Requested by
deanj on #webkit).

Reverted changeset:

"Enable HTTP and HTTPS proxies on iOS and make it a property
of the NSURLSession"
https://bugs.webkit.org/show_bug.cgi?id=192374
https://trac.webkit.org/changeset/239023

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoLinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
mark.lam@apple.com [Mon, 10 Dec 2018 23:14:31 +0000 (23:14 +0000)]
LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>

Reviewed by Saam Barati.

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoInclude CoreGraphics.h from WebCorePrefix.h
ap@apple.com [Mon, 10 Dec 2018 23:05:57 +0000 (23:05 +0000)]
Include CoreGraphics.h from WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=192557

Reviewed by Tim Horton.

The theory is that this will improve build time. Let's try and see what bots say.

* WebCorePrefix.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
wenson_hsieh@apple.com [Mon, 10 Dec 2018 22:18:10 +0000 (22:18 +0000)]
[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
https://bugs.webkit.org/show_bug.cgi?id=192555
<rdar://problem/35204990>

Reviewed by Tim Horton.

Source/WebCore:

Add support for uploading content that conforms to "public.item" via drag and drop. Currently, iOS WebKit only
supports data that conforms to "public.content", but there exist several types of files that conform to
"public.item" but not "public.content". See below for more detail.

Test: DragAndDropTests.ExternalSourcePKCS12ToSingleFileInput

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Update this to include "public.item", and remove "public.folder", which is now redundant because "public.folder"
conforms to "public.item".

* platform/ios/WebItemProviderPasteboard.mm:
(-[NSItemProvider web_containsFileURLAndFileUploadContent]):

Pull out the "contains content that is supported for file uploads" part of this helper method into a separate
method, and use it within `-web_containsFileURLAndFileUploadContent`. Note that this prevents "public.url"-
conformant data from being uploaded as files (i.e., we never want to upload a URL string *itself* as a file).
Drawing this distinction ensures that we don't confuse item providers that contain just a URL as files when
dropping into a file upload area or file input (see API test: ExternalSourceZIPArchiveAndURLToSingleFileInput
for an example of this corner case).

(-[NSItemProvider web_containsFileUploadContent]):
(-[WebItemProviderPasteboard numberOfFiles]):

Refactor this to use `-web_containsFileUploadContent`.

Tools:

Add a test to verify that `.p12` files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
only support uploading "public.content", so files such as these would not be accepted when dropping into file
inputs, or be exposed as files on DataTransfer.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, fix the iOS build after r239039.
wenson_hsieh@apple.com [Mon, 10 Dec 2018 22:10:48 +0000 (22:10 +0000)]
Unreviewed, fix the iOS build after r239039.
https://bugs.webkit.org/show_bug.cgi?id=192568

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dropInteraction:sessionDidUpdate:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoWeb Inspector: Move TreeOutlineGroup coordination out of TreeElement
mattbaker@apple.com [Mon, 10 Dec 2018 22:03:13 +0000 (22:03 +0000)]
Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
https://bugs.webkit.org/show_bug.cgi?id=192487
<rdar://problem/46543431>

Reviewed by Devin Rousso.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.deselect):

* UserInterface/Views/TreeOutlineGroup.js:
(WI.TreeOutlineGroup):
(WI.TreeOutlineGroup.prototype.itemAdded):
(WI.TreeOutlineGroup.prototype.itemRemoved):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
(WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
(WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
(WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
make the group responsible for listening to selection changes from the
TreeOutlines it manages, and synchronizing the selection between them.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoInjected bundle for WebKitTestRunner leaks WKTypeRef objects
ddkilzer@apple.com [Mon, 10 Dec 2018 21:55:56 +0000 (21:55 +0000)]
Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Follow-up to address Darin's feedback.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::keyExistsInKeychain):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239050 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoFix WatchOS build.
achristensen@apple.com [Mon, 10 Dec 2018 21:50:11 +0000 (21:50 +0000)]
Fix WatchOS build.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionNameForFocusedFormControlView:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agowebkitpy: Ref tests don't respect platform specific expectations
jbedard@apple.com [Mon, 10 Dec 2018 21:48:13 +0000 (21:48 +0000)]
webkitpy: Ref tests don't respect platform specific expectations
https://bugs.webkit.org/show_bug.cgi?id=192515
<rdar://problem/46564839>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/port/base.py:
(Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
(Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
(Port.expected_filename): Remove irrelevant FIXME, code clean-up.
(Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
search all platform expectations as well.
* Scripts/webkitpy/port/base_unittest.py:
(test_ref_tests_platform_directory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r239029.
jlewis3@apple.com [Mon, 10 Dec 2018 21:30:42 +0000 (21:30 +0000)]
Unreviewed, rolling out r239029.

This patch caused internal build failures.

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239029

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAdd SPI to allow the client to set the user-agent at main frame level, from the UIProcess
cdumez@apple.com [Mon, 10 Dec 2018 21:26:39 +0000 (21:26 +0000)]
Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>

Reviewed by Alex Christensen.

Source/WebCore:

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setCustomUserAgent):
(WebCore::DocumentLoader::customUserAgent const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::userAgent const):

Source/WebKit:

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.

The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.

* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* Shared/WebsitePoliciesData.h:
* UIProcess/API/APIWebsitePolicies.cpp:
(API::WebsitePolicies::data):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setCustomUserAgent:]):
(-[_WKWebsitePolicies customUserAgent]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
(-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
(-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
(-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomUserAgentDelegate webView:didFinishNavigation:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[BigInt] Add ValueMul into DFG
ticaiolima@gmail.com [Mon, 10 Dec 2018 21:11:43 +0000 (21:11 +0000)]
[BigInt] Add ValueMul into DFG
https://bugs.webkit.org/show_bug.cgi?id=186175

Reviewed by Yusuke Suzuki.

JSTests:

* stress/big-int-mul-jit-osr.js: Added.
* stress/big-int-mul-jit-untyped.js: Added.
* stress/value-mul-fixup-int32-big-int.js: Added.

PerformanceTests:

* BigIntBench/big-int-simple-mul.js: Added.
* BigIntBench/value-mul-type-propagation.js: Added.

Source/JavaScriptCore:

This patch is adding a new DFG node called ValueMul. This node is
responsible to handle multiplication operations that can result into
non-number values. We emit such node during DFGByteCodeParser when the
operands are not numbers. During FixupPhase, we change this
operation to ArithMul if we can speculate Number/Boolean operands.

The BigInt specialization shows a small progression:

                        noSpec                changes

big-int-simple-mul  18.8090+-1.0435  ^  17.4305+-0.2673  ^ definitely 1.0791x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupMultiplication):
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::arithNodeFlags):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileArithMul):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoSafe browsing warning should layout buttons vertically in narrow WKWebViews
achristensen@apple.com [Mon, 10 Dec 2018 20:56:52 +0000 (20:56 +0000)]
Safe browsing warning should layout buttons vertically in narrow WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=192535
<rdar://problem/46308364>

Reviewed by Tim Horton.

They're usually next to each other, but in narrow WKWebViews they currently get clipped.
In order to make it more likely that both buttons are completely visible, put one above
the other if the WKWebView is too narrow to completely show both.  This also helps with
languages where the translations of "Go Back" or "Show Details" are rendered wider than English.

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(buttonWidth):
(-[WKSafeBrowsingWarning addContent]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[GLib] FileSystem::moveFile() should fall back to copying
aperez@igalia.com [Mon, 10 Dec 2018 20:46:29 +0000 (20:46 +0000)]
[GLib] FileSystem::moveFile() should fall back to copying
https://bugs.webkit.org/show_bug.cgi?id=192562

Reviewed by Michael Catanzaro.

No new tests needed.

* platform/glib/FileSystemGlib.cpp:
(WebCore::FileSystem::moveFile): Use g_file_move() instead of a plain g_rename(), which
provides a fall-back which does copy+delete when a direct move or rename cannot be done.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239043 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAllow control over child order when adding nodes to the scrolling tree
simon.fraser@apple.com [Mon, 10 Dec 2018 20:43:40 +0000 (20:43 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Re-land r239010 after over-zealous rollout.

Source/WebCore:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoDocument should throttle style recalc even when m_pendingStyleRecalcShouldForce is...
antti@apple.com [Mon, 10 Dec 2018 20:42:53 +0000 (20:42 +0000)]
Document should throttle style recalc even when m_pendingStyleRecalcShouldForce is true.
https://bugs.webkit.org/show_bug.cgi?id=191695

Reviewed by Zalan Bujtas.

* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):

Don't test for m_pendingStyleRecalcShouldForce.

(WebCore::Document::hasPendingStyleRecalc const):
(WebCore::Document::hasPendingForcedStyleRecalc const):

Don't base the pending status of these function on whether the timer is running.
Instead check if the style is invalid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoXMLHttpRequest removes spaces from content-types before processing
commit-queue@webkit.org [Mon, 10 Dec 2018 20:31:18 +0000 (20:31 +0000)]
XMLHttpRequest removes spaces from content-types before processing
https://bugs.webkit.org/show_bug.cgi?id=8644

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-10
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update improved test expectations.

* web-platform-tests/mimesniff/mime-types/parsing.any-expected.txt:
* web-platform-tests/mimesniff/mime-types/parsing.any.worker-expected.txt:

Source/WebCore:

Stop trimming white space characters from the middle of
type/subtype value. Also make sure whitespace being parsed
adheres to OWS definition from RFC 7230 Section 3.2.3
(referenced by RFC 7231), i.e. space or HT.

Based on http://crrev.com/416586.

Behavior matches Firefox and Chrome.

Tests: http/tests/xmlhttprequest/supported-xml-content-types.html
       web-platform-tests/mimesniff/mime-types/parsing.any.html
       web-platform-tests/mimesniff/mime-types/parsing.any.worker.html

* platform/network/HTTPParsers.cpp:
(WebCore::extractMIMETypeFromMediaType):

LayoutTests:

Update improved test expectation and remove comment.

* http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
* http/tests/xmlhttprequest/supported-xml-content-types.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] Caret is obscured by finger when dragging over an editable element
wenson_hsieh@apple.com [Mon, 10 Dec 2018 20:27:59 +0000 (20:27 +0000)]
[iOS] Caret is obscured by finger when dragging over an editable element
https://bugs.webkit.org/show_bug.cgi?id=192499
<rdar://problem/46570101>

Reviewed by Tim Horton.

Source/WebCore:

* page/DragActions.h:

Move DragHandlingMethod to DragActions.h, and drive-by fix some minor issues (i.e. make a couple of enum classes
use 8 bits, fix the indentation levels, and update the copyright year). Also add `EnumTraits` for
DragHandlingMethod so that it may be encoded over IPC.

* page/DragController.cpp:
(WebCore::dragIsHandledByDocument):

Simplify this helper function.

(WebCore::DragController::tryDocumentDrag):
* page/DragController.h:

Expose the current DragHandlingMethod via a const getter method.

(WebCore::DragController::dragHandlingMethod const):

Source/WebKit:

Add support for setting the `precise` property of `UIDropProposal` to YES when dragging over an editable area.
When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
are covered by adding to existing API tests.

* Scripts/webkit/messages.py:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Add a new version of `-_webView:willUpdateDataInteractionOperationToOperation:forSession:` that receives and
returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
be easily removed once Safari adopts this new version.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformDragControllerAction):

Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.

(WebKit::WebPageProxy::resetCurrentDragInformation):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::currentDragHandlingMethod const):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dropInteraction:sessionDidUpdate:]):

Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
`precise` bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
"editing plain text".

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/WebPage.h:

Tools:

Augment some existing API tests to check that the `precise` flag is either on or off on `UIDropProposal`.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator lastKnownDropProposal]):

Rename `currentDropProposal` to `lastKnownDropProposal`, and expose it as a readonly property.

(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
(-[DragAndDropSimulator showCustomActionSheetBlock]):
(-[DragAndDropSimulator setConvertItemProvidersBlock:]):
(-[DragAndDropSimulator convertItemProvidersBlock]):
(-[DragAndDropSimulator setOverridePerformDropBlock:]):
(-[DragAndDropSimulator overridePerformDropBlock]):
(-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
(-[DragAndDropSimulator overrideDragUpdateBlock]):
(-[DragAndDropSimulator setDropCompletionBlock:]):
(-[DragAndDropSimulator dropCompletionBlock]):

Refactor these properties to return and take normal Objective-C blocks, rather than `BlockPtr`s. However, use
`BlockPtr` instance variables to manage the lifetimes of these blocks.

(-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
(-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.

Update this to use the new WebKit delegate hook for overriding the drop proposal.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMake mock capture happen in the process used for real capture
youenn@apple.com [Mon, 10 Dec 2018 19:53:43 +0000 (19:53 +0000)]
Make mock capture happen in the process used for real capture
https://bugs.webkit.org/show_bug.cgi?id=192544

Reviewed by Eric Carlson.

Source/WebCore:

MockRealtimeMediaSourceCenter previously was setting its factories whenever mock capture is on.
Add booleans to choose which source (audio, video, display) will actually be toggled on.

Covered by existing tests.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
* platform/mock/MockRealtimeMediaSourceCenter.h:
(WebCore::MockRealtimeMediaSourceCenter::setMockAudioCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockVideoCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockDisplayCaptureEnabled):

Source/WebKit:

Make mock capture happen in the right process by only overriding
factories by mock factories for source types that UserMediaCaptureManager will not override.
That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::initialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUse text/javascript as recommended by the HTML specification
dino@apple.com [Mon, 10 Dec 2018 19:45:45 +0000 (19:45 +0000)]
Use text/javascript as recommended by the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=192525
<rdar://problem/46569636>

Reviewed by Jon Lee.

The HTML specification says we should use text/javascript for
JavaScript files:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type

Source/WebCore:

* loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.
(WebCore::CachedScript::CachedScript):
* platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):
* platform/network/mac/WebCoreURLResponse.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):

Source/WebInspectorUI:

* UserInterface/Base/MIMETypeUtilities.js:
(WI.mimeTypeForFileExtension):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype._attemptToDetermineMIMEType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] Make WebGPU work with remote layer hosting
dino@apple.com [Mon, 10 Dec 2018 19:37:49 +0000 (19:37 +0000)]
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

* SourcesCocoa.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

* platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
from CAMetalLayer.
* platform/graphics/cocoa/WebGPULayer.mm: Added.
(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

* platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
than CALayer.

* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMove ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
ap@apple.com [Mon, 10 Dec 2018 18:06:37 +0000 (18:06 +0000)]
Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192428

Reviewed by Tim Horton.

Source/WebKit:

* config.h:

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMove more macros out of WebKit's config.h
ap@apple.com [Mon, 10 Dec 2018 17:55:34 +0000 (17:55 +0000)]
Move more macros out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192430

Reviewed by Tim Horton.

Source/WebKit:

* config.h:

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
cdumez@apple.com [Mon, 10 Dec 2018 17:51:08 +0000 (17:51 +0000)]
[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
https://bugs.webkit.org/show_bug.cgi?id=192533
rdar://problem/45732710

Patch by Darin Adler <darin@apple.com> on 2018-12-10
Reviewed by Anders Carlsson.

Source/WebCore/PAL:

* pal/spi/mac/HIServicesSPI.h: Added kMSHDoNotCreateSendRightOption.

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Pass kMSHDoNotCreateSendRightOption.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[macOS] Use mach_port_mod_refs instead of mach_port_destroy
cdumez@apple.com [Mon, 10 Dec 2018 17:50:38 +0000 (17:50 +0000)]
[macOS] Use mach_port_mod_refs instead of mach_port_destroy
https://bugs.webkit.org/show_bug.cgi?id=192532
rdar://problem/45731047

Patch by Darin Adler <darin@apple.com> on 2018-12-10
Reviewed by Chris Dumez.

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::hostForPlugin): Use mach_port_mod_refs.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r238965.
tsavell@apple.com [Mon, 10 Dec 2018 17:17:26 +0000 (17:17 +0000)]
Unreviewed, rolling out r238965.

Caused internal iOS build failures

Reverted changeset:

"[iOS] Make WebGPU work with remote layer hosting"
https://bugs.webkit.org/show_bug.cgi?id=192508
https://trac.webkit.org/changeset/238965

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMockLibWebRTCPeerConnectionFactory should isolate copy its test case
youenn@apple.com [Mon, 10 Dec 2018 16:30:53 +0000 (16:30 +0000)]
MockLibWebRTCPeerConnectionFactory should isolate copy its test case
https://bugs.webkit.org/show_bug.cgi?id=192545

Reviewed by Eric Carlson.

Isolate copy the test case member so that it can be destroyed on another thread.
Covered by existing test that should no longer crash.

* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
* testing/MockLibWebRTCPeerConnection.h:
(WebCore::MockLibWebRTCPeerConnectionFactory::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for...
cfleizach@apple.com [Mon, 10 Dec 2018 16:07:28 +0000 (16:07 +0000)]
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* Platform/spi/ios/AccessibilitySupportSPI.h:
* PlatformMac.cmake:
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginProcess.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
(WKErrorCopyCFError):
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
(WKImageCreateFromCGImage):
* Shared/ChildProcess.cpp:
* Shared/ContextMenuContextData.cpp:
* Shared/EditorState.cpp:
* Shared/Plugins/NPIdentifierData.cpp:
* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
* Shared/SessionState.cpp:
* Shared/SessionTracker.cpp:
* Shared/ShareableBitmap.cpp:
* Shared/ShareableResource.cpp:
* Shared/VisibleContentRectUpdateInfo.cpp:
* Shared/WebBackForwardListItem.cpp:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebHitTestResultData.cpp:
* Shared/WebImage.cpp:
* Shared/WebMediaSessionMetadata.cpp:
* Shared/WebMemorySampler.cpp:
* Shared/WebMouseEvent.cpp:
* Shared/WebRenderObject.cpp:
* Shared/WebSQLiteDatabaseTracker.cpp:
* Shared/WebWheelEvent.cpp:
* Shared/cf/ArgumentCodersCF.cpp:
* Shared/ios/WebPlatformTouchPointIOS.cpp:
* SourcesCocoa.txt:
* UIProcess/API/APIContentRuleListStore.cpp:
* UIProcess/API/APIHitTestResult.cpp:
* UIProcess/API/APINavigation.cpp:
* UIProcess/API/APIOpenPanelParameters.cpp:
* UIProcess/API/APIPageConfiguration.cpp:
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
* UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
* UIProcess/WebStorage/LocalStorageDatabase.cpp:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
mcatanzaro@igalia.com [Mon, 10 Dec 2018 14:58:31 +0000 (14:58 +0000)]
[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
https://bugs.webkit.org/show_bug.cgi?id=190241

Reviewed by Carlos Garcia Campos.

run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
Currently this actually creates the directories needed for the flatpak environment. Fix it.

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[GTK] Don't use the slice allocator
mcatanzaro@igalia.com [Mon, 10 Dec 2018 14:56:16 +0000 (14:56 +0000)]
[GTK] Don't use the slice allocator
https://bugs.webkit.org/show_bug.cgi?id=192360

Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/main.c:
(aboutDataRequestFree):
(aboutDataRequestNew):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoWKWebView should support custom tintColor
timothy_horton@apple.com [Mon, 10 Dec 2018 09:05:01 +0000 (09:05 +0000)]
WKWebView should support custom tintColor
https://bugs.webkit.org/show_bug.cgi?id=192518
<rdar://problem/37243261>

Reviewed by Wenson Hsieh.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertionPointColor]):
(-[WKContentView selectionBarColor]):
(-[WKContentView selectionHighlightColor]):
Grab insertion point and selection colors from UITextInputTraits.

(-[WKContentView _updateInteractionTintColor]):
Determine our effective tint color:
    - transparent if interaction is disabled
    - a CSS-derived color if caret-color style is applied
    - the _inheritedInteractionTintColor, which climbs up to the tintColor API
Apply it to our UITextInputTraits.

(-[WKContentView tintColorDidChange]):
(-[WKContentView textInputTraits]):
Call _updateInteractionTintColor whenever we create a new UITextInputTraits
or when the tint color changes.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
(TestWebKitAPI::TEST):
Add a test that tintColor affects UITextInputTraits' interaction colors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
wenson_hsieh@apple.com [Mon, 10 Dec 2018 07:54:16 +0000 (07:54 +0000)]
[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
https://bugs.webkit.org/show_bug.cgi?id=192524

Reviewed by Ryosuke Niwa.

This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
(see <rdar://problem/28300343>). This API test simulates two drops from external sources, both from the point
(300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
wide selection rect and increases the width of the document; revealing this selection causes the web view to
scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
these window coordinates no longer correspond to the drop destination element in the document.

To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
scroll horizontally after the first drop.

* TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMove capture manager from RealtimeMediaSourceCenter to capture factory
youenn@apple.com [Mon, 10 Dec 2018 05:30:23 +0000 (05:30 +0000)]
Move capture manager from RealtimeMediaSourceCenter to capture factory
https://bugs.webkit.org/show_bug.cgi?id=192542

Reviewed by Eric Carlson.

Source/WebCore:

We should be able to run mock captures in wither UIProcess or WebProcess.
Currently, mock capture is only done in WebProcess.
This patch is a first step towards that goal.

It also simplifies RealtimeMediaSourceCenter implementation by starting to remove virtual methods.
Further refactoring will remove the need to subclass RealtimeMediaSourceCenter.
Instead, remaining virtual methods will become non virtual and their
implementation will become port specific.

Removed a JS internal method that is not longer used to further simplify RealtimeMediaSourceCenter.

No visible change of behavior.
Covered by existing tests.

* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getDisplayMediaDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/RealtimeMediaSourceFactory.h:
* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoFactory):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory):
* platform/mock/MockRealtimeMediaSourceCenter.h:
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureDeviceManager):
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Make sure to unregister for video capture as done for other capture types.
Implement manager which should be doing nothing as the manager is used for enumeration of devices
which should only happen in UIProcess.

Given that mock capture is interfering with UserMediaCaptureManager,
switching on/off mock capture will require creating a new process.
This shortcoming should be fixed once mock capture will be fully happening in
the same process as regular capture.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
* WebProcess/cocoa/UserMediaCaptureManager.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoEnable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
sbarati@apple.com [Mon, 10 Dec 2018 01:56:16 +0000 (01:56 +0000)]
Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374
<rdar://problem/46506286>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
Remove the now-unused SPI declaration.

Source/WebKit:

This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
To enable on iOS, you can do something like:
$ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
$ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"

This patch also changes the Proxy to be enabled on a per NSURLSession
basis instead of a per process basis.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::proxyDictionary):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::overrideSystemProxies): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration httpProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
(-[_WKWebsiteDataStoreConfiguration httpsProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
(WebKit::WebsiteDataStoreConfiguration::httpProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
(WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoBuild failure due to missing include of APIWebsiteDataStore.h
aperez@igalia.com [Sun, 9 Dec 2018 20:17:18 +0000 (20:17 +0000)]
Build failure due to missing include of APIWebsiteDataStore.h
https://bugs.webkit.org/show_bug.cgi?id=192541

Reviewed by Youenn Fablet.

* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
include of APIWebsiteDataStore.h

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, fix build failure on GCC 8.2, part 2
yusukesuzuki@slowstart.org [Sun, 9 Dec 2018 16:43:02 +0000 (16:43 +0000)]
Unreviewed, fix build failure on GCC 8.2, part 2

Add RefCountedArray::assign, and use it instead of operator= internally.
We should have operator=(const RefCountedArray&) since it will be automatically generated
if we do not have correct implementation here.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::assign):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, fix build failure on GCC 8.2
yusukesuzuki@slowstart.org [Sun, 9 Dec 2018 16:09:07 +0000 (16:09 +0000)]
Unreviewed, fix build failure on GCC 8.2

We remove operator=<PtrTraits> call since it is not necessary.
This is a workaround. It seems that GCC 8.2 fails to parse this specialization.

* wtf/RefCountedArray.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable...
wenson_hsieh@apple.com [Sun, 9 Dec 2018 09:05:45 +0000 (09:05 +0000)]
[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
https://bugs.webkit.org/show_bug.cgi?id=192538

Reviewed by Tim Horton.

Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
`RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
iOS simulator; instead, I manually verified using MobileAttachments.app.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView renderedDrawing]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r239010.
commit-queue@webkit.org [Sun, 9 Dec 2018 08:00:32 +0000 (08:00 +0000)]
Unreviewed, rolling out r239010.
https://bugs.webkit.org/show_bug.cgi?id=192537

Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
scrolling-layers-state.html again (Requested by ap on
#webkit).

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/239010

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoFix stray-semicolon warning seen with a new version of clang in Xcode
darin@apple.com [Sun, 9 Dec 2018 07:09:09 +0000 (07:09 +0000)]
Fix stray-semicolon warning seen with a new version of clang in Xcode
https://bugs.webkit.org/show_bug.cgi?id=192534

Reviewed by Alexey Proskuryakov.

* wtf/Lock.h: Removed an unneeded semicolon.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239017 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[MediaStream] Scaled video frames should be resized in letterbox mode
eric.carlson@apple.com [Sun, 9 Dec 2018 05:36:43 +0000 (05:36 +0000)]
[MediaStream] Scaled video frames should be resized in letterbox mode
https://bugs.webkit.org/show_bug.cgi?id=192528
<rdar://problem/46576638>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/mediastream/resize-letterbox.html

* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::ImageTransferSessionVT): Use letterbox resize mode, not trim.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::captureSize const): "Capture" at the preset size, not
necessarily at the requested size to be more like a physical camera.
(WebCore::MockRealtimeVideoSource::settingsDidChange):
(WebCore::MockRealtimeVideoSource::drawAnimation):
(WebCore::MockRealtimeVideoSource::drawBoxes):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):
(WebCore::MockRealtimeVideoSource::imageBuffer const):
* platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

* fast/mediastream/resize-letterbox-expected.txt: Added.
* fast/mediastream/resize-letterbox.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoDon't programmatically capitalize safe browsing warning buttons
achristensen@apple.com [Sun, 9 Dec 2018 04:11:48 +0000 (04:11 +0000)]
Don't programmatically capitalize safe browsing warning buttons
https://bugs.webkit.org/show_bug.cgi?id=192531
<rdar://problem/46417791>

Reviewed by Darin Adler.

Source/WebCore:

This doesn't work so well in other languages.
Capitalize the source strings in English instead.

* en.lproj/Localizable.strings:

Source/WebKit:

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(makeButton):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoSafe browsing warning should respect text size from settings
achristensen@apple.com [Sun, 9 Dec 2018 01:55:52 +0000 (01:55 +0000)]
Safe browsing warning should respect text size from settings
https://bugs.webkit.org/show_bug.cgi?id=192205

Reviewed by Tim Horton.

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontWithSize):
(makeButton):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoReduce size of PropertySlot and PutPropertySlot.
mark.lam@apple.com [Sat, 8 Dec 2018 23:53:29 +0000 (23:53 +0000)]
Reduce size of PropertySlot and PutPropertySlot.
https://bugs.webkit.org/show_bug.cgi?id=192526

Reviewed by Keith Miller.

With some minor adjustments, we can reduce the size of PropertySlot from 80 bytes
(19 padding bytes) to 64 bytes (3 padding bytes), and PutPropertySlot from 40
bytes (4 padding bytes) to 32 bytes (0 padding bytes but with 6 unused bits).
These measurements are for a 64-bit build.

* runtime/PropertySlot.h:
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239013 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[WTF] Debug build fails due conflicting abort() method
aperez@igalia.com [Sat, 8 Dec 2018 22:10:37 +0000 (22:10 +0000)]
[WTF] Debug build fails due conflicting abort() method
https://bugs.webkit.org/show_bug.cgi?id=192491

Reviewed by Michael Catanzaro.

* wtf/Assertions.h: Use namespaced std::abort() insted of plain abort() to avoid clashes
inside classes which have an ::abort() method, but only when __cplusplus is defined to
allow inclusion of the header in plain C sources.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoFix lldb_webkit.py following r238771
dbates@webkit.org [Sat, 8 Dec 2018 21:53:28 +0000 (21:53 +0000)]
Fix lldb_webkit.py following r238771
(https://bugs.webkit.org/show_bug.cgi?id=190234)

Substitute WTFURLProvider for WebCoreURLProvider in one call site that was inadvertently
missed in r238771.

* lldb/lldb_webkit.py:
(WebCoreDocumentProvider.url):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAllow control over child order when adding nodes to the scrolling tree
simon.fraser@apple.com [Sat, 8 Dec 2018 21:08:17 +0000 (21:08 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

One test marked as flakey, since scrolling tree order is currently dependent on HashSet
traversal order.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

Reviewed by Simon Fraser.

* platform/mac-wk2/TestExpectations: Mark fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html
as flakey, which it will be until we attach in z-order.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoRecord right offset with aligned wide instructions
dinfuehr@igalia.com [Sat, 8 Dec 2018 14:57:51 +0000 (14:57 +0000)]
Record right offset with aligned wide instructions
https://bugs.webkit.org/show_bug.cgi?id=192006

Reviewed by Yusuke Suzuki.

Aligning bytecode instructions inserts nops into the instruction stream.
Emitting an instruction did not record the actual start of the instruction with
aligned instructions, but the nop just before the actual instruction. This was
problematic with the StaticPropertyAnalyzer that used the wrong instruction offset.

* bytecode/InstructionStream.h:
(JSC::InstructionStream::MutableRef::clone):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::alignWideOpcode):
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitNewObject):
* generator/Opcode.rb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[ews-build] check-patch-relevance failure should not mark the overall build as failure
aakash_jain@apple.com [Sat, 8 Dec 2018 13:02:47 +0000 (13:02 +0000)]
[ews-build] check-patch-relevance failure should not mark the overall build as failure
https://bugs.webkit.org/show_bug.cgi?id=192510

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance.start):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoRemove unused API in NetworkProcess
commit-queue@webkit.org [Sat, 8 Dec 2018 07:35:47 +0000 (07:35 +0000)]
Remove unused API in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=192415

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Alex Christensen.

This patch removed some unused API and headers in NetworkProcess.

* NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* NetworkProcess/NetworkCORSPreflightChecker.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkContentRuleListManager.h:
* NetworkProcess/NetworkDataTask.cpp:
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadChecker.cpp:
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.cpp:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/NetworkSocketStream.cpp:
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* NetworkProcess/PingLoad.h:
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::frameID const): Deleted.
(WebKit::PreconnectTask::pageID const): Deleted.
* NetworkProcess/PreconnectTask.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[MediaStream] 'devicechange' event should not fire in frames that can't access captur...
eric.carlson@apple.com [Sat, 8 Dec 2018 03:11:36 +0000 (03:11 +0000)]
[MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
https://bugs.webkit.org/show_bug.cgi?id=192511
<rdar://problem/46562063>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/media/media-stream/device-change-event-in-iframe.html

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::addEventListener): Don't fire the event unless the document can
access a camera or microphone.

Source/WebKit:

* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.
* UIProcess/UserMediaPermissionCheckProxy.h:
(WebKit::UserMediaPermissionCheckProxy::create):
(WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::generateRequestID): New.
(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
the page does not have a granted request and does not have persistent access.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

* fast/mediastream/device-change-event.html: Fix bogus title.
* http/tests/media/media-stream/device-change-event-in-iframe-expected.txt: Added.
* http/tests/media/media-stream/device-change-event-in-iframe.html: Added.
* http/tests/media/media-stream/resources/device-change-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[MediaStream] Address post-review comments after r238904
eric.carlson@apple.com [Sat, 8 Dec 2018 03:10:39 +0000 (03:10 +0000)]
[MediaStream] Address post-review comments after r238904
https://bugs.webkit.org/show_bug.cgi?id=192514
<rdar://problem/46564302>

Reviewed by Youenn Fablet.

No new tests, no functional change.

* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::setSize):
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAlign the metadata table on all platforms
tzagallo@apple.com [Sat, 8 Dec 2018 01:12:57 +0000 (01:12 +0000)]
Align the metadata table on all platforms
https://bugs.webkit.org/show_bug.cgi?id=192050
<rdar://problem/46312674>

Reviewed by Mark Lam.

Although certain platforms don't require the metadata to be aligned,
values were being concurrently read and written to ValueProfiles,
which caused crashes since these operations are not atomic on unaligned
addresses.

* bytecode/Opcode.cpp:
(JSC::metadataAlignment):
* bytecode/Opcode.h:
* bytecode/UnlinkedMetadataTableInlines.h:
(JSC::UnlinkedMetadataTable::finalize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUpdate libwebrtc up to 2fb890f08c
youenn@apple.com [Sat, 8 Dec 2018 00:45:03 +0000 (00:45 +0000)]
Update libwebrtc up to 2fb890f08c
https://bugs.webkit.org/show_bug.cgi?id=192517

Reviewed by Eric Carlson.

Merge changes to track libwebrtc M72.

* Source/webrtc/DEPS:
* Source/webrtc/api/audio/echo_canceller3_config.h:
* Source/webrtc/api/rtp_headers.h:
* Source/webrtc/api/video/encoded_frame.h:
* Source/webrtc/api/video/encoded_image.h:
* Source/webrtc/call/rtp_transport_controller_send_interface.h:
* Source/webrtc/call/video_receive_stream.h:
* Source/webrtc/call/video_send_stream.h:
* Source/webrtc/common_types.h:
(webrtc::RtcpStatistics::RtcpStatistics):
(webrtc::RtcpStatisticsCallback::~RtcpStatisticsCallback):
* Source/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc:
* Source/webrtc/media/engine/webrtcvideoengine.cc:
* Source/webrtc/modules/audio_coding/BUILD.gn:
* Source/webrtc/modules/audio_coding/neteq/neteq_unittest.cc:
* Source/webrtc/modules/audio_processing/aec3/BUILD.gn:
* Source/webrtc/modules/audio_processing/aec3/aec_state.cc:
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.cc: Removed.
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.h: Removed.
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc: Removed.
* Source/webrtc/modules/audio_processing/aec3/echo_canceller3.cc:
* Source/webrtc/modules/audio_processing/aec3/echo_canceller3.h:
* Source/webrtc/modules/audio_processing/aec3/filter_analyzer.cc:
* Source/webrtc/modules/audio_processing/aec3/filter_analyzer.h:
* Source/webrtc/modules/audio_processing/aec3/suppression_gain.cc:
* Source/webrtc/modules/rtp_rtcp/BUILD.gn:
* Source/webrtc/modules/rtp_rtcp/include/receive_statistics.h:
* Source/webrtc/modules/rtp_rtcp/include/rtcp_statistics.h: Removed.
* Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h:
* Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h:
* Source/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h:
(webrtc::HdrMetadataExtension::ValueSize):
* Source/webrtc/modules/rtp_rtcp/source/rtp_packet_received.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_utility.cc:
* Source/webrtc/modules/video_coding/codecs/test/videocodec_test_libvpx.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h:
* Source/webrtc/modules/video_coding/encoded_frame.h:
(webrtc::VCMEncodedFrame::video_timing_mutable):
(webrtc::VCMEncodedFrame::SetCodecSpecific):
* Source/webrtc/modules/video_coding/frame_buffer2.cc:
* Source/webrtc/modules/video_coding/frame_buffer2.h:
* Source/webrtc/modules/video_coding/frame_buffer2_unittest.cc:
* Source/webrtc/modules/video_coding/frame_object.cc:
* Source/webrtc/modules/video_coding/rtp_frame_reference_finder.cc:
* Source/webrtc/p2p/base/p2ptransportchannel.cc:
* Source/webrtc/p2p/base/p2ptransportchannel_unittest.cc:
* Source/webrtc/p2p/base/port.cc:
* Source/webrtc/p2p/base/port.h:
* Source/webrtc/p2p/client/basicportallocator.cc:
* Source/webrtc/p2p/client/basicportallocator.h:
* Source/webrtc/p2p/client/basicportallocator_unittest.cc:
* Source/webrtc/pc/peerconnection.cc:
* Source/webrtc/pc/rtcstats_integrationtest.cc:
* Source/webrtc/pc/test/peerconnectiontestwrapper.cc:
* Source/webrtc/pc/test/peerconnectiontestwrapper.h:
* Source/webrtc/rtc_base/stringize_macros.h:
* Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter_unittest.cc: Removed.
* Source/webrtc/test/fuzzers/rtp_packet_fuzzer.cc:
* Source/webrtc/tools_webrtc/ios/internal.client.webrtc/iOS64_Perf.json:
* Source/webrtc/tools_webrtc/ios/internal.tryserver.webrtc/ios_arm64_perf.json:
* Source/webrtc/tools_webrtc/whitespace.txt:
* Source/webrtc/video/report_block_stats.h:
* Source/webrtc/video/rtp_video_stream_receiver.cc:
* Source/webrtc/video/video_receive_stream.cc:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[LFC] Rename LayoutFormattingState files to LayoutState
antti@apple.com [Sat, 8 Dec 2018 00:26:34 +0000 (00:26 +0000)]
[LFC] Rename LayoutFormattingState files to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=192520

Reviewed by Zalan Bujtas.

Match the class name.

* layout/FormattingContext.cpp:
* layout/FormattingContextQuirks.cpp:
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp: Removed.
* layout/LayoutFormattingState.h: Removed.
* layout/LayoutState.cpp: Copied from Source/WebCore/layout/LayoutFormattingState.cpp.
* layout/LayoutState.h: Copied from Source/WebCore/layout/LayoutFormattingState.h.
* layout/Verification.cpp:
* layout/blockformatting/BlockFormattingContext.cpp:
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
* layout/blockformatting/BlockInvalidation.cpp:
* layout/floats/FloatAvoider.cpp:
* layout/floats/FloatingContext.cpp:
* layout/floats/FloatingState.cpp:
* layout/inlineformatting/InlineFormattingContext.cpp:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
* layout/inlineformatting/InlineInvalidation.cpp:
* layout/layouttree/LayoutTreeBuilder.cpp:
* page/FrameViewLayoutContext.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
cdumez@apple.com [Fri, 7 Dec 2018 23:56:07 +0000 (23:56 +0000)]
ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
https://bugs.webkit.org/show_bug.cgi?id=192362
<rdar://problem/46460360>

Reviewed by Ryosuke Niwa.

Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
*after* we know for sure we have a network process to communicate the policy to.
This should address the failures on iOS.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 23:38:38 +0000 (23:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316
<rdar://problem/46563726>

Unreviewed.

* Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.
Unneeded file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAdd keychain access entitlement to WebKitTestRunnerApp
jiewen_tan@apple.com [Fri, 7 Dec 2018 23:14:43 +0000 (23:14 +0000)]
Add keychain access entitlement to WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=192489
<rdar://problem/45057952>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoWKWebProcessPlugInLoadDelegate should have API for saying which rendering events...
sbarati@apple.com [Fri, 7 Dec 2018 22:35:05 +0000 (22:35 +0000)]
WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
https://bugs.webkit.org/show_bug.cgi?id=192473

Reviewed by Andy Estes.

Source/WebKit:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(PageLoaderClient::layoutMilestones const):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: Added.
(-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.
(-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238969 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoCSS Painting API code cleanup
justin_michaud@apple.com [Fri, 7 Dec 2018 21:57:49 +0000 (21:57 +0000)]
CSS Painting API code cleanup
https://bugs.webkit.org/show_bug.cgi?id=192480

Reviewed by Dean Jackson.

No new tests, since the existing tests should cover it.

* bindings/js/JSDOMWrapper.cpp:
(WebCore::outputConstraintSubspaceFor):
(WebCore::globalObjectOutputConstraintSubspaceFor):
* bindings/js/JSWorkletGlobalScopeBase.cpp:
(WebCore::toJS):
* css/CSSPaintCallback.h:
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::doCustomPaint):
* platform/graphics/CustomPaintImage.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::changedCustomPaintWatchedProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):
* worklets/PaintWorkletGlobalScope.cpp:
(WebCore::PaintWorkletGlobalScope::registerPaint):
* worklets/PaintWorkletGlobalScope.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238968 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 21:38:23 +0000 (21:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Updating to latest libwebrtc will allows cherry-picking important bug fixes.

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/abseil-cpp: refreshed.
* Source/webrtc: refreshed.
* WebKit/0001-libwebrtc-changes.patch: Removed.
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Update include according new libwebrtc.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

Source/WebKit:

Update code base according new libwebrtc backend
In particular, use directly int64_t for packet time.

* Configurations/WebKit.xcconfig:
* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::signalReadPacket):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h:
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
* NetworkProcess/webrtc/NetworkRTCSocket.h:
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::signalReadPacket):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoREGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
jbedard@apple.com [Fri, 7 Dec 2018 21:15:17 +0000 (21:15 +0000)]
REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Unreviewed infrastructure fix.

* Scripts/webkitpy/port/device_port.py:
(DevicePort.setup_test_run): Check that the number of initialized devices matches the
number of child processes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] Make WebGPU work with remote layer hosting
dino@apple.com [Fri, 7 Dec 2018 21:10:13 +0000 (21:10 +0000)]
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

* SourcesCocoa.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

* platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
from CAMetalLayer.
* platform/graphics/cocoa/WebGPULayer.mm: Added.
(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

* platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
than CALayer.

* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params...
tsavell@apple.com [Fri, 7 Dec 2018 20:41:23 +0000 (20:41 +0000)]
[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=190892

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoRename LayoutState to RenderLayoutState
antti@apple.com [Fri, 7 Dec 2018 20:10:14 +0000 (20:10 +0000)]
Rename LayoutState to RenderLayoutState
https://bugs.webkit.org/show_bug.cgi?id=192504

Reviewed by Zalan Bujtas.

The name is better used in LFC.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
* page/FrameViewLayoutContext.h:
* rendering/LayoutState.cpp: Removed.
* rendering/LayoutState.h: Removed.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderGrid.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayoutState.cpp: Copied from Source/WebCore/rendering/LayoutState.cpp.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::RenderLayoutState::computeOffsets):
(WebCore::RenderLayoutState::computeClipRect):
(WebCore::RenderLayoutState::computePaginationInformation):
(WebCore::RenderLayoutState::pageLogicalOffset const):
(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
(WebCore::RenderLayoutState::propagateLineGridInfo):
(WebCore::RenderLayoutState::establishLineGrid):
(WebCore::RenderLayoutState::addLayoutDelta):
(WebCore::RenderLayoutState::layoutDeltaMatches const):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::computeOffsets): Deleted.
(WebCore::LayoutState::computeClipRect): Deleted.
(WebCore::LayoutState::computePaginationInformation): Deleted.
(WebCore::LayoutState::pageLogicalOffset const): Deleted.
(WebCore::LayoutState::computeLineGridPaginationOrigin): Deleted.
(WebCore::LayoutState::propagateLineGridInfo): Deleted.
(WebCore::LayoutState::establishLineGrid): Deleted.
(WebCore::LayoutState::addLayoutDelta): Deleted.
(WebCore::LayoutState::layoutDeltaMatches const): Deleted.
* rendering/RenderLayoutState.h: Copied from Source/WebCore/rendering/LayoutState.h.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::isPaginated const): Deleted.
(WebCore::LayoutState::pageLogicalHeight const): Deleted.
(WebCore::LayoutState::pageLogicalHeightChanged const): Deleted.
(WebCore::LayoutState::lineGrid const): Deleted.
(WebCore::LayoutState::lineGridOffset const): Deleted.
(WebCore::LayoutState::lineGridPaginationOrigin const): Deleted.
(WebCore::LayoutState::paintOffset const): Deleted.
(WebCore::LayoutState::layoutOffset const): Deleted.
(WebCore::LayoutState::pageOffset const): Deleted.
(WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout const): Deleted.
(WebCore::LayoutState::renderer const): Deleted.
(WebCore::LayoutState::clipRect const): Deleted.
(WebCore::LayoutState::isClipped const): Deleted.
(WebCore::LayoutState::layoutDelta const): Deleted.
* rendering/RenderListBox.cpp:
* rendering/RenderMediaControlElements.cpp:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderVTTCue.cpp:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/RootInlineBox.cpp:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoLayout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
tsavell@apple.com [Fri, 7 Dec 2018 19:32:23 +0000 (19:32 +0000)]
Layout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=183389

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[LFC] Rename formattingContext() to createFormattingContext()
antti@apple.com [Fri, 7 Dec 2018 19:25:44 +0000 (19:25 +0000)]
[LFC] Rename formattingContext() to createFormattingContext()
https://bugs.webkit.org/show_bug.cgi?id=192500

Reviewed by Zalan Bujtas.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp:
(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
* layout/blockformatting/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::createFormattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext): Deleted.
* layout/blockformatting/BlockFormattingState.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
* layout/inlineformatting/InlineFormattingState.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[ews-app] Send bug id as a build property
aakash_jain@apple.com [Fri, 7 Dec 2018 18:53:34 +0000 (18:53 +0000)]
[ews-app] Send bug id as a build property
https://bugs.webkit.org/show_bug.cgi?id=192494

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/fetcher.py:
(BugzillaPatchFetcher.fetch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[ews-build] Builds should have a link to patch and bug
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:39 +0000 (18:51 +0000)]
[ews-build] Builds should have a link to patch and bug
https://bugs.webkit.org/show_bug.cgi?id=192492

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(ConfigureBuild.add_patch_id_url): Method to add Patch URL.
(ConfigureBuild.add_bug_id_url): Method to add Bug URL.
(ConfigureBuild.getPatchURL): Method to get Patch URL.
(ConfigureBuild.getBugURL): Method to get Bug URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoUnreviewed, rolling out r238947.
tsavell@apple.com [Fri, 7 Dec 2018 18:51:36 +0000 (18:51 +0000)]
Unreviewed, rolling out r238947.

Revision caused fast/visual-viewport/tiled-drawing/zoomed-
fixed-scrolling-layers-state.html to constantly fail

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/238947

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[ews-app] Configure logfile for ews-app logs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:06 +0000 (18:51 +0000)]
[ews-app] Configure logfile for ews-app logs
https://bugs.webkit.org/show_bug.cgi?id=192493

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/__init__.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoStyle queue exception on some security bugs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:48:55 +0000 (18:48 +0000)]
Style queue exception on some security bugs
https://bugs.webkit.org/show_bug.cgi?id=190793

Reviewed by Lucas Forschler.

* Scripts/webkitpy/tool/steps/applywatchlist.py:
(ApplyWatchList.run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
aestes@apple.com [Fri, 7 Dec 2018 18:40:31 +0000 (18:40 +0000)]
[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
https://bugs.webkit.org/show_bug.cgi?id=192498

Reviewed by Tim Horton.

Added SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL and SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT,
which behave like their non-optional variants but do not require their classes to exist.

* wtf/cocoa/SoftLinking.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[Attachment Support] Cloned attachment elements lose their unique identifiers
wenson_hsieh@apple.com [Fri, 7 Dec 2018 18:37:58 +0000 (18:37 +0000)]
[Attachment Support] Cloned attachment elements lose their unique identifiers
https://bugs.webkit.org/show_bug.cgi?id=192483

Reviewed by Tim Horton.

Source/WebCore:

This patch adds logic to ensure that the unique identifier of a cloned attachment element is the same as the
unique identifier of the original attachment element. If the cloned attachment is inserted into the same
document as the original attachment, then we will exercise the same codepath for copied-and-pasted attachments,
and assign a new unique identifier to the attachment element, while creating a new `_WKAttachment` in the client
that's backed by the same `NSFileWrapper`.

Test: WKAttachmentTests.AttachmentIdentifierOfClonedAttachment

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::copyNonAttributePropertiesFromElement):
* html/HTMLAttachmentElement.h:

Tools:

Introduce a new API test.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMerge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
commit-queue@webkit.org [Fri, 7 Dec 2018 18:33:43 +0000 (18:33 +0000)]
Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Frédéric Wang.

Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
as they do the same thing. Also remove std::optional from parseAccessControlAllowList
since the function can't fail.

* WebCore.order:
* loader/CrossOriginAccessControl.cpp:
(WebCore::validatePreflightResponse):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::parse):
* loader/CrossOriginPreflightResultCache.h:
* platform/network/HTTPParsers.cpp:
(WebCore::parseAccessControlExposeHeadersAllowList): Deleted.
* platform/network/HTTPParsers.h:
(WebCore::parseAccessControlAllowList):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[iOS] Don't update AVPlayerViewController currentTime while scrubbing
eric.carlson@apple.com [Fri, 7 Dec 2018 18:08:24 +0000 (18:08 +0000)]
[iOS] Don't update AVPlayerViewController currentTime while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=192438
<rdar://problem/42977046>

Reviewed by Jer Noble.

No new tests, tested manually.

* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.

* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
(-[WebAVPlayerController endScrubbing:]): Ditto.
(-[WebAVPlayerController isScrubbing]): Return _isScrubbing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months ago[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream...
commit-queue@webkit.org [Fri, 7 Dec 2018 10:48:56 +0000 (10:48 +0000)]
[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
https://bugs.webkit.org/show_bug.cgi?id=186933

Source/WebCore:

Reusing the AudioSourceProviderGStreamer itself as it was doing almost everything we needed,
just added a constructor to be able to create it from a MediaStreamTrackPrivate and made it a
WebAudioSourceProvider which only means it is now a ThreadSafeRefCounted.

Sensibily refactored GStreamerMediaStreamSource so that we could reuse it to track a single
MediaStreamTrack.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::setClient):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::audioSourceProvider):
* platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
* platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcSetupSrc):
(WebCore::webkitMediaStreamSrcSetupAppSrc):
(WebCore::webkitMediaStreamSrcAddTrack):
(WebCore::webkitMediaStreamSrcSetStream):
(WebCore::webkitMediaStreamSrcNew):
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:
* platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
(WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
(WebCore::WrappedMockRealtimeAudioSource::start):
(WebCore::WrappedMockRealtimeAudioSource::addHum):
(WebCore::WrappedMockRealtimeAudioSource::render):
(WebCore::WrappedMockRealtimeAudioSource::settingsDidChange):
(WebCore::MockGStreamerAudioCaptureSource::startProducingData):
* platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Handle the case where input buffers
  are "big" and process all the data we can for each runs of the method.

LayoutTests:

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/gtk/TestExpectations:
* webrtc/clone-audio-track.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoConsecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since...
jbedard@apple.com [Fri, 7 Dec 2018 06:18:33 +0000 (06:18 +0000)]
Consecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since r238903
https://bugs.webkit.org/show_bug.cgi?id=192486

Unreviewed infrastructure fix.

WinCairo bots define WEBKIT_TEST_CHILD_PROCESSES to run less processes due to RAM restrictions.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238950 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoMove USE_NEW_THEME out of WebCore's config.h
ap@apple.com [Fri, 7 Dec 2018 05:51:30 +0000 (05:51 +0000)]
Move USE_NEW_THEME out of WebCore's config.h
https://bugs.webkit.org/show_bug.cgi?id=192426

Reviewed by Tim Horton.

Source/WebCore:

* config.h:

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoInjected bundle for WebKitTestRunner leaks WKTypeRef objects
ddkilzer@apple.com [Fri, 7 Dec 2018 05:34:21 +0000 (05:34 +0000)]
Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Reviewed by Simon Fraser.

Source/WebKit:

Change function parameter name from `returnData[Ref]` to
`returnRetainedData[Ref]` to document that the value returned is
a +1 retained WKTypeRef object.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostSynchronousMessage):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostSynchronousMessageForTesting):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

This patch:
- Fixes leaks in various injected bundle methods that return +1
  retained WKTypeRef objects via pointer.
- Asserts the returned object is the expected WKTypeRef.
- Replaces 0 with nullptr in many places.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didCreatePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::statisticsProcessStatisticsAndDataRecords):
(WTR::TestRunner::statisticsUpdateCookieBlocking):
(WTR::TestRunner::statisticsSubmitTelemetry):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::domCacheSize):
(WTR::TestRunner::injectUserScript):
(WTR::TestRunner::keyExistsInKeychain):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 months agoAllow control over child order when adding nodes to the scrolling tree
commit-queue@webkit.org [Fri, 7 Dec 2018 01:47:04 +0000 (01:47 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-06
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Source/WebCore:

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

No new tests, behavior unchanged and already covered by existing tests.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
the new node at the end of child list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238947 268f45cc-cd09-0410-ab3c-d52691b4dbfc