Timeline



Sep 30, 2019:

11:29 PM Changeset in webkit [250550] by achristensen@apple.com
  • 24 edits in trunk

Resurrect Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=202384

Rubber-stamped by Tim Horton.

.:

  • Source/cmake/OptionsMac.cmake:

Source/JavaScriptCore:

  • PlatformMac.cmake:

Source/WebCore:

  • PlatformMac.cmake:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • PlatformMac.cmake:
  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
  • WebKit2Prefix.h:

Source/WebKitLegacy:

  • PlatformMac.cmake:

Source/WebKitLegacy/mac:

  • DefaultDelegates/WebDefaultPolicyDelegate.m:

(-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):

Source/WTF:

  • wtf/PlatformMac.cmake:

Tools:

  • DumpRenderTree/PlatformMac.cmake:
  • TestWebKitAPI/PlatformMac.cmake:
11:17 PM Changeset in webkit [250549] by achristensen@apple.com
  • 22 edits in trunk/Source

Unify more WebKitLegacy sources
https://bugs.webkit.org/show_bug.cgi?id=202390

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/mac/QuickLookMacSPI.h:

Source/WebKitLegacy:

These files were causing problems with the CMake build, but only if not unified.
So I unified them and sped up the build too, without changing any behavior.

  • SourcesCocoa.txt:
  • UnifiedSources-output.xcfilelist:
  • WebKitLegacy.xcodeproj/project.pbxproj:
  • scripts/generate-unified-sources.sh:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(dataSource):
(WebFrameLoaderClient::pageID const):
(WebFrameLoaderClient::frameID const):
(WebFrameLoaderClient::makeRepresentation):
(WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebFrameLoaderClient::dispatchWillSendRequest):
(WebFrameLoaderClient::shouldUseCredentialStorage):
(WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebFrameLoaderClient::connectionProperties):
(WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebFrameLoaderClient::willCacheResponse const):
(WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebFrameLoaderClient::dispatchDidFinishLoading):
(WebFrameLoaderClient::dispatchDidFailLoading):
(WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebFrameLoaderClient::dispatchDidCommitLoad):
(WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebFrameLoaderClient::dispatchDidFailLoad):
(WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebFrameLoaderClient::dispatchCreatePage):
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(shouldTryAppLink):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(makeFormFieldValuesDictionary):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::revertToProvisionalState):
(WebFrameLoaderClient::setMainDocumentError):
(WebFrameLoaderClient::startDownload):
(WebFrameLoaderClient::willChangeTitle):
(WebFrameLoaderClient::didChangeTitle):
(WebFrameLoaderClient::didReplaceMultipartContent):
(WebFrameLoaderClient::committedLoad):
(WebFrameLoaderClient::finishedLoading):
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebFrameLoaderClient::shouldGoToHistoryItem const):
(WebFrameLoaderClient::didDisplayInsecureContent):
(WebFrameLoaderClient::didRunInsecureContent):
(WebFrameLoaderClient::cancelledError):
(WebFrameLoaderClient::blockedError):
(WebFrameLoaderClient::blockedByContentBlockerError):
(WebFrameLoaderClient::cannotShowURLError):
(WebFrameLoaderClient::interruptedForPolicyChangeError):
(WebFrameLoaderClient::blockedByContentFilterError):
(WebFrameLoaderClient::cannotShowMIMETypeError):
(WebFrameLoaderClient::fileDoesNotExistError):
(WebFrameLoaderClient::pluginWillHandleLoadError):
(WebFrameLoaderClient::shouldFallBack):
(WebFrameLoaderClient::canHandleRequest const):
(WebFrameLoaderClient::saveViewStateToItem):
(WebFrameLoaderClient::restoreViewState):
(WebFrameLoaderClient::createDocumentLoader):
(WebFrameLoaderClient::setTitle):
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
(WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
(WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebFrameLoaderClient::setUpPolicyListener):
(WebFrameLoaderClient::actionDictionary const):
(WebFrameLoaderClient::canCachePage const):
(WebFrameLoaderClient::createFrame):
(WebFrameLoaderClient::objectContentType):
(PluginWidget::PluginWidget):
(PluginWidget::invalidateRect):
(NetscapePluginWidget::handleEvent):
(NetscapePluginWidget::notifyWidget):
(shouldBlockPlugin):
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::redirectDataToPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):
(shouldBlockWebGL):
(WebFrameLoaderClient::webGLPolicyForURL const):
(WebFrameLoaderClient::resolveWebGLPolicyForURL const):
(WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebFrameLoaderClient::createNetworkingContext):
(WebFrameLoaderClient::createPreviewLoaderClient):
(WebFrameLoaderClient::getLoadDecisionForIcons):
(webGetNSImage):
(WebFrameLoaderClient::finishedLoadingIcon):
(-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:]):
(-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:appLinkURL:]):
(-[WebFramePolicyListener invalidate]):
(-[WebFramePolicyListener receivedPolicyDecision:]):
(-[WebFramePolicyListener ignore]):
(-[WebFramePolicyListener download]):
(-[WebFramePolicyListener use]):
(-[WebFramePolicyListener continue]):

  • WebInspector/WebInspector.mm:

(-showWindow):
(-evaluateInFrontend:script:):

  • WebView/WebClipView.mm:

(-[WebClipView visibleRect]):
(-[WebClipView _immediateScrollToPoint:]):

  • WebView/WebDataSource.mm:

(-[WebDataSource _documentFragmentWithArchive:]):
(-[WebDataSource _documentLoader]):
(-[WebDataSource initWithRequest:]):
(-[WebDataSource dealloc]):
(-[WebDataSource data]):
(-[WebDataSource webFrame]):
(-[WebDataSource initialRequest]):
(-[WebDataSource request]):
(-[WebDataSource webArchive]):

  • WebView/WebFrame.mm:

(core):
(kit):
(getWebView):
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
(+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]):
(+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]):
(-[WebFrame _attachScriptDebugger]):
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _unmarkAllBadGrammar]):
(-[WebFrame _unmarkAllMisspellings]):
(-[WebFrame _hasSelection]):
(-[WebFrame _atMostOneFrameHasSelection]):
(-[WebFrame _findFrameWithSelection]):
(-[WebFrame _nodesFromList:]):
(-[WebFrame _stringForRange:]):
(-[WebFrame _paintBehaviorForDestinationContext:]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame _getVisibleRect:]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
(-[WebFrame _caretRectAtPosition:affinity:]):
(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):
(-[WebFrame _rangeByAlteringCurrentSelection:direction:granularity:]):
(-[WebFrame _selectionGranularity]):
(-[WebFrame _convertToNSRange:]):
(-[WebFrame _convertToDOMRange:]):
(-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]):
(-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
(-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
(-[WebFrame _visiblePositionForPoint:]):
(-[WebFrame _characterRangeAtPoint:]):
(-[WebFrame _typingStyle]):
(-[WebFrame _setTypingStyle:withUndoAction:]):
(-[WebFrame _dragSourceEndedAt:operation:]):
(-[WebFrame _canProvideDocumentSource]):
(-[WebFrame _commitData:]):
(-[WebFrame _isDescendantOfFrame:]):
(-[WebFrame _bodyBackgroundColor]):
(-[WebFrame _isFrameSet]):
(-[WebFrame _isVisuallyNonEmpty]):
(toWebFrameLoadType):
(-[WebFrame _rectsForRange:]):
(-[WebFrame _selectionRangeForFirstPoint:secondPoint:]):
(-[WebFrame _selectionRangeForPoint:]):
(-[WebFrame _selectNSRange:]):
(-[WebFrame _isDisplayingStandaloneImage]):
(-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
(-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
(-[WebFrame setTimeoutsPaused:]):
(-[WebFrame prepareForPause]):
(-[WebFrame resumeFromPause]):
(-[WebFrame selectWithoutClosingTypingNSRange:]):
(-[WebFrame _saveViewState]):
(-[WebFrame deviceOrientationChanged]):
(-[WebFrame renderedSizeOfNode:constrainedToWidth:]):
(-[WebFrame deepestNodeAtViewportLocation:]):
(-[WebFrame scrollableNodeAtViewportLocation:]):
(-[WebFrame approximateNodeAtViewportLocation:]):
(-[WebFrame revealSelectionAtExtent:]):
(-[WebFrame setCaretColor:]):
(-[WebFrame isTelephoneNumberParsingAllowed]):
(-[WebFrame isTelephoneNumberParsingEnabled]):
(-[WebFrame setSelectedDOMRange:affinity:closeTyping:]):
(-[WebFrame selectNSRange:onElement:]):
(-[WebFrame setMarkedText:selectedRange:]):
(-[WebFrame setMarkedText:forCandidates:]):
(-[WebFrame getDictationResultRanges:andMetadatas:]):
(-[WebFrame dictationResultMetadataForRange:]):
(+[WebFrame stringWithData:textEncodingName:]):
(-[WebFrame fontForSelection:]):
(-[WebFrame _userScrolled]):
(-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:matchStyle:]):
(-[WebFrame resetTextAutosizingBeforeLayout]):
(-[WebFrame _setTextAutosizingWidth:]):
(-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
(-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
(-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]):
(-[WebFrame _cacheabilityDictionary]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
(-[WebFrame _globalContextForScriptWorld:]):
(-[WebFrame setAccessibleName:]):
(-[WebFrame enhancedAccessibilityEnabled]):
(-[WebFrame setEnhancedAccessibility:]):
(-[WebFrame _layerTreeAsText]):
(-[WebFrame accessibilityRoot]):
(-[WebFrame _clearOpener]):
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]):
(-[WebFrame focusedNodeHasContent]):
(-[WebFrame _dispatchDidReceiveTitle:]):
(-[WebFrame jsWrapperForNode:inScriptWorld:]):
(-[WebFrame elementAtPoint:]):
(-[WebFrame name]):
(needsMicrosoftMessengerDOMDocumentWorkaround):
(-[WebFrame DOMDocument]):
(-[WebFrame frameElement]):
(-[WebFrame provisionalDataSource]):
(-[WebFrame dataSource]):
(-[WebFrame loadRequest:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
(-[WebFrame findFrameNamed:]):
(-[WebFrame parentFrame]):
(-[WebFrame childFrames]):
(-[WebFrame windowObject]):
(-[WebFrame globalContext]):
(-[WebFrame javaScriptContext]):
(dataSource): Deleted.

  • WebView/WebFrameView.mm:

(-[WebFrameView _web_frame]):
(-[WebFrameView _setDocumentView:]):
(-[WebFrameView _verticalPageScrollDistance]):
(-[WebFrameView _install]):
(-[WebFrameView _frameSizeChanged]):
(-[WebFrameView initWithFrame:]):
(-[WebFrameView drawRect:]):
(-[WebFrameView _scrollOverflowInDirection:granularity:]):
(-[WebFrameView _isVerticalDocument]):
(-[WebFrameView _isFlippedDocument]):
(-[WebFrameView _scrollToBeginningOfDocument]):
(-[WebFrameView _scrollToEndOfDocument]):
(-[WebFrameView _horizontalPageScrollDistance]):
(-[WebFrameView _pageVertically:]):
(-[WebFrameView _pageHorizontally:]):
(-[WebFrameView _scrollLineVertically:]):
(-[WebFrameView _scrollLineHorizontally:]):
(-[WebFrameView keyDown:keyDown:]):
(addTypesFromClass): Deleted.

  • WebView/WebFullScreenController.mm:

(screenRectOfContents):
(-[WebFullScreenController element]):
(-[WebFullScreenController setElement:]):
(-[WebFullScreenController _document]):
(-[WebFullScreenController _manager]):

  • WebView/WebHTMLView.mm:

(toAction):
(toTag):
(-[NSView _web_setNeedsDisplayInRect:]):
(promisedDataClient):
(+[WebHTMLView _excludedElementsForAttributedStringConversion]):
(-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
(-[WebHTMLView _plainTextFromPasteboard:]):
(-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
(-[WebHTMLView readSelectionFromPasteboard:]):
(-[WebHTMLView _selectedRange]):
(-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
(-[WebHTMLView _frameOrBoundsChanged]):
(-[WebHTMLView _updateMouseoverWithEvent:]):
(+[WebHTMLView _insertablePasteboardTypes]):
(+[WebHTMLView _selectionPasteboardTypes]):
(-[WebHTMLView pasteboard:provideDataForType:]):
(-[WebHTMLView setScale:]):
(-[WebHTMLView _canEdit]):
(-[WebHTMLView _canEditRichly]):
(-[WebHTMLView _hasSelection]):
(-[WebHTMLView _hasSelectionOrInsertionPoint]):
(-[WebHTMLView _hasInsertionPoint]):
(-[WebHTMLView _isEditable]):
(-[WebHTMLView _selectionDraggingImage]):
(-[WebHTMLView _insertOrderedList]):
(-[WebHTMLView _insertUnorderedList]):
(-[WebHTMLView _canIncreaseSelectionListLevel]):
(-[WebHTMLView _canDecreaseSelectionListLevel]):
(-[WebHTMLView _increaseSelectionListLevel]):
(-[WebHTMLView _increaseSelectionListLevelOrdered]):
(-[WebHTMLView _increaseSelectionListLevelUnordered]):
(-[WebHTMLView _decreaseSelectionListLevel]):
(-[WebHTMLView _writeSelectionToPasteboard:]):
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
(-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]):
(-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]):
(-[WebHTMLView _beginScreenPaginationModeWithPageSize:shrinkToFit:]):
(-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
(-[WebHTMLView coreCommandBySelector:]):
(-[WebHTMLView coreCommandByName:]):
(-[WebHTMLView validRequestorForSendType:returnType:]):
(-[WebHTMLView jumpToSelection:]):
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
(-[WebHTMLView maintainsInactiveSelection]):
(-[WebHTMLView reapplyStyles]):
(-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
(-[WebHTMLView rightMouseUp:]):
(fixMenusReceivedFromOldClients):
(createShareMenuItem):
(createMenuItem):
(createMenuItems):
(customMenuFromDefaultItems):
(-[WebHTMLView menuForEvent:]):
(-[WebHTMLView clearFocus]):
(-[WebHTMLView setLayer:]):
(-[WebHTMLView setNeedsLayout:]):
(-[WebHTMLView setNeedsToApplyStyles:]):
(-[WebHTMLView _invalidateGStatesForTree]):
(-[WebHTMLView scrollWheel:]):
(-[WebHTMLView acceptsFirstMouse:]):
(-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
(-[WebHTMLView mouseDown:]):
(-[WebHTMLView touch:]):
(-[WebHTMLView mouseDragged:]):
(-[WebHTMLView draggingSourceOperationMaskForLocal:]):
(-[WebHTMLView draggedImage:endedAt:operation:]):
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
(-[WebHTMLView draggingSession:sourceOperationMaskForDraggingContext:]):
(-[WebHTMLView draggingSession:endedAtPoint:operation:]):
(-[WebHTMLView mouseUp:]):
(-[WebHTMLView pressureChangeWithEvent:]):
(isTextInput):
(isInPasswordField):
(currentKeyboardEvent):
(-[WebHTMLView becomeFirstResponder]):
(-[WebHTMLView resignFirstResponder]):
(-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
(-[WebHTMLView _scaleFactorForPrintOperation:]):
(-[WebHTMLView keyDown:]):
(-[WebHTMLView keyUp:]):
(-[WebHTMLView flagsChanged:]):
(-[WebHTMLView centerSelectionInVisibleArea:]):
(-[WebHTMLView _selectionStartFontAttributesAsRTF]):
(-[WebHTMLView _fontAttributesFromFontPasteboard]):
(-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
(-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):
(-[WebHTMLView performKeyEquivalent:]):
(-[WebHTMLView copyFont:]):
(-[WebHTMLView pasteFont:]):
(-[WebHTMLView changeFont:]):
(-[WebHTMLView changeAttributes:]):
(-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
(-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
(-[WebHTMLView changeColor:]):
(-[WebHTMLView checkSpelling:]):
(-[WebHTMLView showGuessPanel:]):
(-[WebHTMLView toggleBaseWritingDirection:]):
(-[WebHTMLView changeBaseWritingDirection:]):
(-[WebHTMLView _changeBaseWritingDirectionTo:]):
(-[WebHTMLView _updateControlTints]):
(-[WebHTMLView _selectionChanged]):
(-[WebHTMLView _updateFontPanel]):
(-[WebHTMLView _canSmartCopyOrDelete]):
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
(-[WebHTMLView quickLookWithEvent:]):
(-[WebHTMLView _executeSavedKeypressCommands]):
(-[WebHTMLView _interpretKeyEvent:savingCommands:]):
(-[WebHTMLView _handleEditingKeyEvent:]):
(-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
(-[WebHTMLView ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebHTMLView attributedSubstringFromRange:]):
(-[WebHTMLView hasMarkedText]):
(extractUnderlines):
(-[WebHTMLView setMarkedText:selectedRange:]):
(-[WebHTMLView doCommandBySelector:]):
(-[WebHTMLView insertText:]):
(-[WebHTMLView _updateSecureInputState]):
(-[WebHTMLView _updateSelectionForInputManager]):
(-[WebHTMLView selectionTextRects]):
(imageFromRect):
(selectionImage):
(-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):
(-[WebHTMLView selectAll]):
(-[WebHTMLView deselectAll]):
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):
(-[WebHTMLView attributedString]):
(-[WebHTMLView selectedAttributedString]):
(-[WebHTMLView elementAtPoint:allowShadowContent:]):
(-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]):
(-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
(-[WebHTMLView markedTextMatchesAreHighlighted]):
(-[WebHTMLView unmarkAllTextMatches]):
(-[WebHTMLView rectsForTextMatches]):
(-[WebHTMLView _findString:options:]):

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController webView:didHandleScrollWheel:]):
(-[WebImmediateActionController _cancelImmediateAction]):
(-[WebImmediateActionController performHitTestAtPoint:]):
(-[WebImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
(-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _updateImmediateActionItem]):
(-[WebImmediateActionController menuItemDidClose:]):
(elementBoundingBoxInWindowCoordinatesFromNode):
(-[WebImmediateActionController menuItem:itemFrameForPoint:]):
(-[WebImmediateActionController menuItem:maxSizeForPoint:]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
(-[WebImmediateActionController _animationControllerForText]):

  • WebView/WebPDFView.mm:

(isFrameInRange):
(-[WebPDFView pasteboardTypesForSelection]):
(-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

  • WebView/WebScriptDebugDelegate.mm:

(-[WebScriptCallFrame _convertValueToObjcValue:]):

  • WebView/WebScriptDebugger.mm:

(toNSString):
(toWebFrame):
(WebScriptDebugger::WebScriptDebugger):
(WebScriptDebugger::sourceParsed):
(WebScriptDebugger::handlePause):

  • WebView/WebScriptWorld.mm:

(-[WebScriptWorld initWithWorld:]):
(-[WebScriptWorld init]):
(+[WebScriptWorld standardWorld]):
(+[WebScriptWorld scriptWorldForGlobalContext:]):
(core):
(+[WebScriptWorld findOrCreateWorld:]):

  • WebView/WebView.mm:

(coreOptions):
(coreLayoutMilestones):
(kitLayoutMilestones):
(kit):
(WebKit::DeferredPageDestructor::createDeferredPageDestructor):
(WebKit::DeferredPageDestructor::DeferredPageDestructor):
(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
(+[WebView _standardUserAgentWithApplicationName:]):
(+[WebView _reportException:inContext:]):
(shouldEnableLoadDeferring):
(shouldRestrictWindowFocus):
(needsOutlookQuirksScript):
(-[WebView _injectOutlookQuirksScript]):
(shouldUseLegacyBackgroundSizeShorthandBehavior):
(shouldAllowWindowOpenWithoutUserGesture):
(WebKitInitializeGamepadProviderIfNecessary):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _replaceCurrentHistoryItem:]):
(-[WebView updateLayoutIgnorePendingStyleSheets]):
(-[WebView _requestStartDataInteraction:globalPosition:]):
(-[WebView _startDrag:]):
(-[WebView dragDataForSession:client:global:operation:]):
(-[WebView _didConcludeEditDrag]):
(+[WebView _setAlwaysUsesComplexTextCodePath:]):
(+[WebView canCloseAllWebViews]):
(+[WebView closeAllWebViews]):
(-[WebView _dispatchUnloadEvent]):
(-[WebView styleAtSelectionStart]):
(-[WebView _didFinishScrollingOrZooming]):
(-[WebView _close]):
(-[WebView _isProcessingUserGesture]):
(+[WebView _enableRemoteInspector]):
(+[WebView _disableRemoteInspector]):
(+[WebView _disableAutoStartRemoteInspector]):
(+[WebView _isRemoteInspectorEnabled]):
(+[WebView _hasRemoteInspectorSession]):
(-[WebView _setHostApplicationProcessIdentifier:auditToken:]):
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView _needsKeyboardEventDisambiguationQuirks]):
(needsSelfRetainWhileLoadingQuirk):
(-[WebView _needsPreHTML5ParserQuirks]):
(-[WebView _preferencesChanged:]):
(-[WebView _cacheFrameLoadDelegateImplementations]):
(+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
(+[WebView _registerViewClass:representationClass:forURLScheme:]):
(+[WebView _decodeData:]):
(-[WebView _didStartProvisionalLoadForFrame:]):
(-[WebView _checkDidPerformFirstNavigation]):
(-[WebView _cachedResponseForURL:]):
(+[WebView _setShouldUseFontSmoothing:]):
(+[WebView _shouldUseFontSmoothing]):
(+[WebView _setUsesTestModeFocusRingColor:]):
(+[WebView _usesTestModeFocusRingColor]):
(-[WebView setAlwaysShowVerticalScroller:]):
(-[WebView alwaysShowVerticalScroller]):
(-[WebView setAlwaysShowHorizontalScroller:]):
(-[WebView setProhibitsMainFrameScrolling:]):
(-[WebView alwaysShowHorizontalScroller]):
(-[WebView _setMediaLayer:forPluginView:]):
(-[WebView _attachScriptDebuggerToAllFrames]):
(-[WebView _detachScriptDebuggerFromAllFrames]):
(+[WebView _productivityDocumentMIMETypes]):
(-[WebView _setFixedLayoutSize:]):
(-[WebView _synchronizeCustomFixedPositionLayoutRect]):
(-[WebView _viewGeometryDidChange]):
(-[WebView _overflowScrollPositionChangedTo:forNode:isUserScroll:]):
(+[WebView _doNotStartObservingNetworkReachability]):
(-[WebView _touchEventRegions]):
(-[WebView textIteratorForRect:]):
(-[WebView _executeCoreCommandByName:value:]):
(-[WebView _isUsingAcceleratedCompositing]):
(-[WebView _isSoftwareRenderable]):
(-[WebView setTracksRepaints:]):
(-[WebView isTrackingRepaints]):
(-[WebView resetTrackedRepaints]):
(-[WebView trackedRepaintRects]):
(+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
(+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
(+[WebView _resetOriginAccessWhitelists]):
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
(-[WebView allowsNewCSSAnimationsWhileSuspended]):
(-[WebView setAllowsNewCSSAnimationsWhileSuspended:]):
(-[WebView cssAnimationsSuspended]):
(-[WebView setCSSAnimationsSuspended:]):
(+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
(+[WebView _registerURLSchemeAsSecure:]):
(+[WebView _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]):
(-[WebView _scaleWebView:atOrigin:]):
(-[WebView _setUseFixedLayout:]):
(-[WebView _useFixedLayout]):
(-[WebView _fixedLayoutSize]):
(-[WebView _setPaginationMode:]):
(-[WebView _paginationMode]):
(-[WebView _listenForLayoutMilestones:]):
(-[WebView _layoutMilestones]):
(-[WebView _setPaginationBehavesLikeColumns:]):
(-[WebView _paginationBehavesLikeColumns]):
(-[WebView _setPageLength:]):
(-[WebView _pageLength]):
(-[WebView _setGapBetweenPages:]):
(-[WebView _gapBetweenPages]):
(-[WebView _setPaginationLineGridEnabled:]):
(-[WebView _paginationLineGridEnabled]):
(-[WebView _pageCount]):
(+[WebView _HTTPPipeliningEnabled]):
(+[WebView _setHTTPPipeliningEnabled:]):
(-[WebView shouldRequestCandidates]):
(-[WebView removePluginInstanceViewsFor:]):
(+[WebView registerURLSchemeAsLocal:]):
(-[WebView doWindowDidChangeScreen]):
(-[WebView _updateScreenScaleFromWindow]):
(-[WebView goToBackForwardItem:]):
(-[WebView _setZoomMultiplier:isTextOnly:]):
(-[WebView setCustomTextEncodingName:]):
(-[WebView windowScriptObject]):
(-[WebView setHostWindow:]):
(-[WebView applicationFlags:]):
(-[WebView actionMaskForDraggingInfo:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
(incrementFrame):
(+[WebView registerViewClass:representationClass:forMIMEType:]):
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
(-[WebView mainFrameIconURL]):
(coreTextCheckingType):
(textCheckingResultFromNSTextCheckingResult):
(-[WebView candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
(-[WebView candidateListTouchBarItem:changedCandidateListVisibility:]):
(-[WebView shouldClose]):
(aeDescFromJSValue):
(-[WebView aeDescByEvaluatingJavaScriptFromString:]):
(-[WebView editableDOMRangeForPoint:]):
(-[WebView setSelectedDOMRange:affinity:]):
(-[WebView selectedDOMRange]):
(-[WebView selectionAffinity]):
(-[WebView setEditable:]):
(-[WebView setTypingStyle:]):
(-[WebView deleteSelection]):
(-[WebView applyStyle:]):
(-[WebView insertDictationPhrases:metadata:]):
(-[WebView _selectionIsCaret]):
(-[WebView _selectionIsAll]):
(-[WebView _simplifyMarkup:endNode:]):
(+[WebView _setCacheModel:]):
(-[WebView _searchWithGoogleFromMenu:]):
(-[WebView _retrieveKeyboardUIModeFromPreferences:]):
(-[WebView _keyboardUIMode]):
(-[WebView _mainCoreFrame]):
(-[WebView _clearCredentials]):
(-[WebView _flushCompositingChanges]):
(-[WebView _scheduleLayerFlushForPendingTileCacheRepaint]):
(-[WebView _hasActiveVideoForControlsInterface]):
(-[WebView _setUpPlaybackControlsManagerForMediaElement:]):
(-[WebView handleAcceptedAlternativeText:]):
(-[WebView _getWebCoreDictationAlternatives:fromTextAlternatives:]):
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
(-[WebView _setTextIndicator:]):
(-[WebView _setTextIndicator:withLifetime:]):
(-[WebView _clearTextIndicatorWithAnimation:]):
(-[WebView _showDictionaryLookupPopup:]):
(-[WebView _dictionaryLookupPopoverWillClose:]):
(-[WebView showFormValidationMessage:withAnchorRect:]):
(-[WebView textTouchBar]):
(nsTextAlignmentFromRenderStyle):
(-[WebView updateTextTouchBar]):
(-[WebView updateTouchBar]):
(-[WebView candidateList]):
(-[WebView _geolocationDidFailWithMessage:]):
(-[WebView _resetAllGeolocationPermission]):
(-[WebView _notificationIDForTesting:]):

11:14 PM Changeset in webkit [250548] by achristensen@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Rename JSTokenType::EXPORT to EXPORT_ to avoid naming conflict with internal header
https://bugs.webkit.org/show_bug.cgi?id=202385

  • parser/Keywords.table:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseModuleSourceElements):
(JSC::Parser<LexerType>::parseExportDeclaration):

  • parser/ParserTokens.h:
10:34 PM Changeset in webkit [250547] by Alan Coon
  • 1 edit
    1 copy in branches/safari-608-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa

Disabling tests until dino@apple.com can fix. rdar://problem/55825353

10:34 PM Changeset in webkit [250546] by Alan Coon
  • 1 edit in branches/safari-608-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm

Unreviewed build fix from thorton@apple.com. rdar://problem/55825353

10:34 PM Changeset in webkit [250545] by Alan Coon
  • 1 edit in branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

Unreviewed build fix. rdar://problem/55825353

9:57 PM Changeset in webkit [250544] by Devin Rousso
  • 5 edits in trunk

Web Inspector: JS Formatter: unexpected newlines added inside template string expression
https://bugs.webkit.org/show_bug.cgi?id=202374

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Wrap every "add newline" with a check to see if the current node is inside a template
literal node. If so (and we aren't forcibly adding a newline), prevent the newline from
being added.

  • UserInterface/Workers/Formatter/JSFormatter.js:

(JSFormatter.prototype._appendNewline): Added.
(JSFormatter.prototype._insertNewlinesBeforeToken):
(JSFormatter.prototype._insertComment):
(JSFormatter.prototype._insertSameLineTrailingComments):
(JSFormatter.prototype._insertCommentsAndNewlines):
(JSFormatter.prototype._before):
(JSFormatter.prototype._after):
(JSFormatter.prototype._handleTokenAtNode):
(JSFormatter.prototype._exitNode):
(JSFormatter.prototype._afterProgram):

LayoutTests:

  • inspector/formatting/resources/javascript-tests/template-strings.js:
  • inspector/formatting/resources/javascript-tests/template-strings-expected.js:
9:06 PM Changeset in webkit [250543] by Tadeu Zagallo
  • 4 edits
    1 add in trunk

Make assertion in JSObject::putOwnDataProperty more precise
https://bugs.webkit.org/show_bug.cgi?id=202379
<rdar://problem/49515980>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/object-assign-target-proto-setter.js: Added.

(get Object):

Source/JavaScriptCore:

Currently, we assert that the structure has no accessors/custom accessors, but that assertion is
too conservative. All we need to prove is that the property being inserted either does not exist
in the target object or is neither an accessor nor read-only.

  • runtime/JSObject.h:

(JSC::JSObject::putOwnDataProperty): Deleted.
(JSC::JSObject::putOwnDataPropertyMayBeIndex): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::validatePutOwnDataProperty):
(JSC::JSObject::putOwnDataProperty):
(JSC::JSObject::putOwnDataPropertyMayBeIndex):

8:36 PM Changeset in webkit [250542] by Chris Dumez
  • 27 edits in trunk/Source/WebCore

Make GenericEventQueue an ActiveDOMObject
https://bugs.webkit.org/show_bug.cgi?id=202373

Reviewed by Eric Carlson.

Make GenericEventQueue an ActiveDOMObject so that it is guaranteed to never fire any events while
suspended without requiring the client to explicitly suspend/resume the event queue.

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::enqueueMessage):
(WebCore::MediaKeySession::updateKeyStatuses):

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::addKeyTimerFired):
(WebCore::WebKitMediaKeySession::sendMessage):
(WebCore::WebKitMediaKeySession::sendError):
(WebCore::WebKitMediaKeySession::hasPendingActivity const):
(WebCore::WebKitMediaKeySession::stop):

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::hasPendingActivity const):
(WebCore::MediaSource::stop):
(WebCore::MediaSource::canSuspendForDocumentSuspension const):
(WebCore::MediaSource::scheduleEvent):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::hasPendingActivity const):
(WebCore::SourceBuffer::stop):
(WebCore::SourceBuffer::scheduleEvent):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):
(WebCore::SourceBufferList::scheduleEvent):
(WebCore::SourceBufferList::canSuspendForDocumentSuspension const):

  • Modules/mediasource/SourceBufferList.h:
  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::stop):

  • Modules/webaudio/AudioContext.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::DeclarativeAnimation):
(WebCore::DeclarativeAnimation::tick):
(WebCore::DeclarativeAnimation::needsTick const):
(WebCore::DeclarativeAnimation::remove):
(WebCore::DeclarativeAnimation::enqueueDOMEvent):
(WebCore::DeclarativeAnimation::stop):
(WebCore::DeclarativeAnimation::suspend):
(WebCore::DeclarativeAnimation::resume):

  • animation/DeclarativeAnimation.h:
  • dom/GenericEventQueue.cpp:

(WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
(WebCore::GenericEventQueueBase<T>::setPaused):
(WebCore::GenericEventQueueBase<T>::canSuspendForDocumentSuspension const):
(WebCore::GenericEventQueueBase<T>::suspend):
(WebCore::GenericEventQueueBase<T>::resume):
(WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
(WebCore::GenericEventQueueBase<T>::stop):
(WebCore::GenericEventQueueBase<T>::activeDOMObjectName const):
(WebCore::GenericEventQueue::create):
(WebCore::MainThreadGenericEventQueue::create):

  • dom/GenericEventQueue.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::close):
(WebCore::MessagePort::dispatchMessages):

  • dom/MessagePort.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleEvent):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::hasPendingActivity const):
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):

  • html/HTMLMediaElement.h:
  • html/track/TrackListBase.cpp:

(WebCore::TrackListBase::TrackListBase):
(WebCore::TrackListBase::scheduleTrackEvent):
(WebCore::TrackListBase::scheduleChangeEvent):
(WebCore::TrackListBase::isChangeEventScheduled const):
(WebCore::TrackListBase::canSuspendForDocumentSuspension const):

  • html/track/TrackListBase.h:
  • workers/Worker.cpp:

(WebCore::Worker::Worker):
(WebCore::Worker::terminate):
(WebCore::Worker::stop):
(WebCore::Worker::hasPendingActivity const):
(WebCore::Worker::enqueueEvent):
(WebCore::Worker::dispatchEvent):

  • workers/Worker.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::startMessages):
(WebCore::ServiceWorkerContainer::postMessage):
(WebCore::ServiceWorkerContainer::stop):

  • workers/service/ServiceWorkerContainer.h:
8:23 PM Changeset in webkit [250541] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] HeapSnapshotBuilder m_rootData should be protected with a lock too
https://bugs.webkit.org/show_bug.cgi?id=202389
<rdar://problem/50717564>

Reviewed by Mark Lam.

JSTests:

  • stress/heap-analyzer-taking-lock.js: Added.

Source/JavaScriptCore:

While we are protecting HeapSnapshotBuilder::m_edges with a lock, we are not protecting m_rootData, which is also concurrently modified.
This patch protects it.

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::setOpaqueRootReachabilityReasonForCell):

5:50 PM Changeset in webkit [250540] by sbarati@apple.com
  • 25 edits
    13 adds in trunk

Inline caching is wrong for custom accessors and custom values
https://bugs.webkit.org/show_bug.cgi?id=201994
<rdar://problem/50850326>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/custom-accessor-materialized.js: Added.

(assert):
(test4.get const):

  • microbenchmarks/custom-accessor-thin-air.js: Added.

(assert):
(test5.get const):
(test5.get proto):

  • microbenchmarks/custom-accessor.js: Added.

(assert):
(test3.get const):

  • microbenchmarks/custom-value-2.js: Added.

(assert):
(test1.getMultiline):
(test1):

  • microbenchmarks/custom-value.js: Added.

(assert):
(test1.getMultiline):
(test1):

  • stress/custom-accessor-delete-1.js: Added.

(assert):
(test3.get const):

  • stress/custom-accessor-delete-2.js: Added.

(assert):
(test4.get const):

  • stress/custom-accessor-delete-3.js: Added.

(assert):
(test5.get const):
(test5.get proto):

  • stress/custom-value-delete-property-1.js: Added.

(assert):
(test1.getMultiline):
(test1):

  • stress/custom-value-delete-property-2.js: Added.

(test2.foo):
(test2):

  • stress/custom-value-delete-property-3.js: Added.

(test6.foo):
(test6):

Source/JavaScriptCore:

There was an oversight in our inline caching code for custom accessors and
custom values. We used to assume that if an object O had a custom function for
property P, then O will forever respond to the same custom function for
property P.

This assumption was very wrong. These custom accessors/values might be
properties in JS which are configurable, so they can be rewritten to be
other properties. Our inline caching code would be wrong in the scenarios
where these property descriptors got redefined.

This patch makes it so that we now properly watchpoint for custom functions
being changed. If the custom accessor has been materialized, we place an
Equivalence watchpoint on the custom accessor. This patch also teaches
StructureStubInfo how to watchpoint on property value equivalence. Before,
we just watchpointed on structure transitions.

This patch also adds a new property condition kind for when the custom function
exists inside the static property table. This case is really easy to test for
because we just need to see if the structure still has static properties and
the static property table has the entry for a particular property. This
property condition kind just needs to watch for structure transitions because
an entry in the static property table can't be mutated.

This patch is neutral on the microbenchmarks I've added.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::couldStillSucceed const):
(JSC::AccessCase::generateImpl):

  • bytecode/AdaptiveInferredPropertyValueWatchpointBase.h:
  • bytecode/ObjectPropertyCondition.cpp:

(JSC::ObjectPropertyCondition::structureEnsuresValidityAssumingImpurePropertyWatchpoint const):

  • bytecode/ObjectPropertyCondition.h:

(JSC::ObjectPropertyCondition::customFunctionEquivalence):

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::ObjectPropertyConditionSet::hasOneSlotBaseCondition const):
(JSC::ObjectPropertyConditionSet::slotBaseCondition const):
(JSC::generateConditionsForPrototypePropertyHitCustom):

  • bytecode/ObjectPropertyConditionSet.h:
  • bytecode/PolyProtoAccessChain.cpp:

(JSC::PolyProtoAccessChain::create):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::installWatchpoint):
(JSC::PolymorphicAccess::commit):
(JSC::AccessGenerationState::addWatchpoint): Deleted.

  • bytecode/PolymorphicAccess.h:
  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::dumpInContext const):
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
(JSC::PropertyCondition::validityRequiresImpurePropertyWatchpoint const):
(JSC::PropertyCondition::isStillValid const):
(JSC::PropertyCondition::isWatchableWhenValid const):
(WTF::printInternal):

  • bytecode/PropertyCondition.h:

(JSC::PropertyCondition::customFunctionEquivalence):
(JSC::PropertyCondition::hash const):
(JSC::PropertyCondition::operator== const):

  • bytecode/StructureStubClearingWatchpoint.cpp:

(JSC::StructureTransitionStructureStubClearingWatchpoint::fireInternal):
(JSC::WatchpointsOnStructureStubInfo::addWatchpoint):
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndInstallWatchpoint):
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint):
(JSC::AdaptiveValueStructureStubClearingWatchpoint::handleFire):
(JSC::StructureStubClearingWatchpoint::fireInternal): Deleted.

  • bytecode/StructureStubClearingWatchpoint.h:
  • bytecode/Watchpoint.h:
  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):

  • runtime/ClassInfo.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::findPropertyHashEntry const):

  • runtime/JSObject.h:
  • runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:
  • runtime/Structure.cpp:

(JSC::Structure::findPropertyHashEntry const):

  • runtime/Structure.h:
  • tools/JSDollarVM.cpp:

(JSC::testStaticAccessorGetter):
(JSC::testStaticAccessorPutter):
(JSC::StaticCustomAccessor::StaticCustomAccessor):
(JSC::StaticCustomAccessor::createStructure):
(JSC::StaticCustomAccessor::create):
(JSC::StaticCustomAccessor::getOwnPropertySlot):
(JSC::functionCreateStaticCustomAccessor):
(JSC::JSDollarVM::finishCreation):

LayoutTests:

  • js/dom/custom-accessor-redefine-expected.txt: Added.
  • js/dom/custom-accessor-redefine.html: Added.
5:47 PM Changeset in webkit [250539] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

5:23 PM Changeset in webkit [250538] by Alan Coon
  • 1 copy in tags/Safari-608.3.6

Tag Safari-608.3.6.

5:10 PM Changeset in webkit [250537] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

5:00 PM Changeset in webkit [250536] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] AI folds CompareEq wrongly when it sees proven Boolean and Number
https://bugs.webkit.org/show_bug.cgi?id=202382
<rdar://problem/52669112>

Reviewed by Saam Barati.

JSTests:

  • stress/compare-eq-bool-number-folding.js: Added.

(test):

Source/JavaScriptCore:

If CompareEq(Untyped, Untyped) finds that it gets proven Boolean and Number types on its arguments,
we fold it to constant False. But this is wrong since false == 0 is true in JS.
This patch adds leastUpperBoundOfEquivalentSpeculations, which merges Number, BigInt, and Boolean types
if one of them are seen.

  • bytecode/SpeculatedType.cpp:

(JSC::leastUpperBoundOfEquivalentSpeculations):
(JSC::valuesCouldBeEqual):

4:56 PM Changeset in webkit [250535] by Alan Coon
  • 1 copy in tags/Safari-608.3.5

Tag Safari-608.3.5.

4:47 PM Changeset in webkit [250534] by chris.reid@sony.com
  • 3 edits in trunk/Source/WebKit

[WinCairo] Move Remote Inspector Server initialization out of WebView
https://bugs.webkit.org/show_bug.cgi?id=202369

Reviewed by Ross Kirsling.

Move Remote Inspector Server initialization to Windows WebProcessPool initialization.

  • UIProcess/win/WebProcessPoolWin.cpp:
  • UIProcess/win/WebView.cpp:
4:32 PM Changeset in webkit [250533] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas: shader type header is white in dark mode
https://bugs.webkit.org/show_bug.cgi?id=202253

Reviewed by Matt Baker.

  • UserInterface/Views/ShaderProgramContentView.css:

(.content-view.shader-program > .shader > header > .shader-type):
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header > .shader-type): Added.
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header): Deleted.
(.content-view.shader-program > .shader > header > *): Deleted.

3:52 PM Changeset in webkit [250532] by Alan Coon
  • 1 edit in branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

Unreviewed build fix. rdar://problem/55825353

3:33 PM Changeset in webkit [250531] by Chris Dumez
  • 6 edits
    2 adds in trunk

IDBTransaction / IDBObjectStore should not prevent a page from entering the back / forward cache
https://bugs.webkit.org/show_bug.cgi?id=202291
<rdar://problem/55760106>

Reviewed by Geoffrey Garen.

Source/WebCore:

IDBObjectStore does not fire any events and should therefore not cause any problem while in PageCache.
IDBTransaction can only fire abort/complete/error events, all of which are being enqueued to the
DocumentEventQueue. The DocumentEventQueue subclasses SuspendableTimer which will correctly suspend
while the document is in page cache. IDBTransaction will therefore not cause events to fire (and JS
to run) while in page cache.

Test: storage/indexeddb/IDBTransaction-page-cache.html

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::canSuspendForDocumentSuspension const):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::canSuspendForDocumentSuspension const):

LayoutTests:

Add layout test coverage.

  • storage/indexeddb/IDBTransaction-page-cache.html: Added.
2:09 PM Changeset in webkit [250530] by Alan Coon
  • 9 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r250428. rdar://problem/55825357

[iOS] Lock screen controls can fail to play web content
https://bugs.webkit.org/show_bug.cgi?id=202279

Reviewed by Chris Dumez.

When playback is paused from the lock screen via Now Playing controls, the WebProcess,
UIProcess, and Network Process will all be suspended. MediaRemote will take an assertion
and wake up the WebProcess when a remote control command to "play" is sent via the Now
Playing controls. However, if a synchronous message to the (suspended) Network or UIProcess
is issued before the notification that the process was unexpectedly unsuspended can be
issued (which will subsequently unsuspend the UIProcess and Network process), we can get
into a deadlocked state where the main thread is blocked on the sync message to a suspended
process.

To work around this problem, move all the processing from ProcessTaskStateObserver to a
WorkQueue / background thread. This requires making the ProcessTaskStateObserver thread-safe,
though its only current client is a Singleton (the WebProcess class), and so the risk of
thread safety issues is currently minimal. Regardless, access to the Client pointer must be
guarded by a Lock, and the Client itself must become ref-counted, so that the
ProcessTaskStateObserver can ref its Client (the WebProcess) during callback processing.

Unfortunately, sendWithAsyncReply() is not thread safe, nor is ProcessAssertion, so instead
just use send() and set a 5-second timeout before expiring the assertion, and just use
BKSProcessStateAssertion directly.

  • Shared/Cocoa/ProcessTaskStateObserver.h: (WebKit::ProcessTaskStateObserver::Client::ref): (WebKit::ProcessTaskStateObserver::Client::deref): (WebKit::ProcessTaskStateObserver::setClient): Deleted. (WebKit::ProcessTaskStateObserver::client): Deleted.
  • Shared/Cocoa/ProcessTaskStateObserver.mm: (-[WKProcessTaskStateObserverDelegate process:taskStateDidChange:]): (WebKit::ProcessTaskStateObserver::create): (WebKit::ProcessTaskStateObserver::ProcessTaskStateObserver): (WebKit::ProcessTaskStateObserver::~ProcessTaskStateObserver): (WebKit::ProcessTaskStateObserver::invalidate): (WebKit::ProcessTaskStateObserver::client): (WebKit::ProcessTaskStateObserver::setTaskState):
  • WebProcess/WebProcess.cpp: (WebKit::m_taskStateObserver):
  • WebProcess/WebProcess.h:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::processTaskStateDidChange):

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

2:08 PM Changeset in webkit [250529] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r250483. rdar://problem/55825351

[Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
https://bugs.webkit.org/show_bug.cgi?id=202335
<rdar://problem/55790994>

Reviewed by Maciej Stachowiak.

  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource):
  • platform/network/HTTPHeaderNames.in:

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

2:01 PM Changeset in webkit [250528] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Refine restrictions for X-Temp-Tablet HTTP header experiment
https://bugs.webkit.org/show_bug.cgi?id=202367
<rdar://problem/55849139>

Reviewed by Geoffrey Garen.

Refine restrictions for X-Temp-Tablet HTTP header experiment:

  1. Only send the header if the embedding application is MobileSafari.
  2. Only send the header if the first party is google.com
  3. Only send the header if the current date is before 2/1/2020
  4. Send the header even if using an ephemeral session
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::isXTempTabletHeaderExperimentOver):
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::isGoogleSearch):
(WebCore::CachedResourceLoader::shouldSendXTempTabletHeader const):
(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceLoader.h:
2:00 PM Changeset in webkit [250527] by Chris Dumez
  • 19 edits
    2 adds in trunk

Pages with Web Workers cannot enter the back / forward cache
https://bugs.webkit.org/show_bug.cgi?id=202296
<rdar://problem/55764073>

Reviewed by Jer Noble.

Source/WebCore:

Allow pages that use Web Workers to enter the back / forward cache.
This involves adding an EventQueue for all event firing on Woker
objects and suspending this EventQueue while in the page cache.

This was preventing some of the pages on weather.com to enter the
back / forward cache.

Test: fast/workers/worker-page-cache.html

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.h:
  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::AudioContext):

  • Modules/webaudio/AudioContext.h:
  • animation/DeclarativeAnimation.h:
  • dom/GenericEventQueue.cpp:

(WebCore::TaskQueueConstructor::construct):
(WebCore::TaskQueueConstructor<Timer>::construct):
(WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
(WebCore::GenericEventQueueBase<T>::enqueueEvent):
(WebCore::GenericEventQueueBase<T>::dispatchOneEvent):
(WebCore::GenericEventQueueBase<T>::close):
(WebCore::GenericEventQueueBase<T>::cancelAllEvents):
(WebCore::GenericEventQueueBase<T>::hasPendingEvents const):
(WebCore::GenericEventQueueBase<T>::hasPendingEventsOfType const):
(WebCore::GenericEventQueueBase<T>::suspend):
(WebCore::GenericEventQueueBase<T>::resume):

  • dom/GenericEventQueue.h:

(WebCore::GenericEventQueueBase::isSuspended const):
(WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
(WebCore::GenericEventQueue::GenericEventQueue):
Rename GenericEventQueue to MainThreadGenericEventQueue since its implementation relies
on a global shared Timer to fire events. Introduce a new GenericEventQueue which can
actually be used from any thread. This is useful for MessagePort, which is used both
on the main thread and on worker threads.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::close):
(WebCore::MessagePort::suspend):
(WebCore::MessagePort::resume):
(WebCore::MessagePort::dispatchMessages):

  • dom/MessagePort.h:

Use an GenericEventQueue in MessagePort for consistency with Worker.
MessagePort is an ActiveDOMobject which returns true in canSuspend(),
we therefore need to make sure it suspends event firing while
suspended.

  • html/HTMLMediaElement.h:
  • html/track/TrackListBase.h:
  • workers/Worker.cpp:

(WebCore::Worker::Worker):
(WebCore::Worker::terminate):
(WebCore::Worker::canSuspendForDocumentSuspension const):
(WebCore::Worker::suspend):
(WebCore::Worker::resume):
(WebCore::Worker::stop):
(WebCore::Worker::hasPendingActivity const):
(WebCore::Worker::notifyFinished):
(WebCore::Worker::enqueueEvent):
(WebCore::Worker::dispatchEvent):

  • workers/Worker.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):

LayoutTests:

Add layout test coverage.

  • fast/workers/worker-page-cache-expected.txt: Added.
  • fast/workers/worker-page-cache.html: Added.
1:27 PM Changeset in webkit [250526] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r250405. rdar://problem/55825353

Add some logging to help diagnose blank or stuck WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=202297
<rdar://problem/55763610>

Reviewed by Wenson Hsieh.

Our current logging is insufficient to rule out some of the potential
causes of stuck/blank WKWebViews in <rdar://problem/53399054>. Add
some new logging, and improve some existing logging, to aid in diagnosis.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _willInvokeUIScrollViewDelegateCallback]): (-[WKWebView _didInvokeUIScrollViewDelegateCallback]): Rename _delayUpdateVisibleContentRects to be more specific that it was due to us being underneath a UIScrollView delegate callback.

(-[WKWebView _processWillSwapOrDidExit]):
(-[WKWebView _didCommitLayerTree:]):
Add a log when we receive an incoming commit while visible content rect
updates are being deferred. Also, include the current transaction ID
and the transaction ID that _needsResetViewState... is waiting for, to
help rule out a class of potential problems.

Add a log when we receive an incoming commit more than 5 seconds after
a visible content rect update.

(-[WKWebView _updateVisibleContentRects]):
Keep track of when we defer visual content rect updates for any reason,
and log the first time we do an update after deferring them. This will make
it MUCH easier at-a-glance to tell if one of the "bailing" messages
represents a long-term state (a problem), or is expected.

Keep track of how long it's been since we sent a visible content rect update
and didn't get a commit back from the Web Content process; if it's been
more than 5 seconds, start logging.

(-[WKWebView _cancelAnimatedResize]):
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _resizeWhileHidingContentWithUpdates:]):
Turn animated resize logging into release logging. It is a common culprit
for many kinds of bugs, while also not being high volume, so this is well worth it.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::freezeLayerTree): (WebKit::WebPage::unfreezeLayerTree): Show the current value of m_layerTreeFreezeReasons in addition to the old value and delta, so you don't have to manually compute the current value when reading logs.

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

1:16 PM Changeset in webkit [250525] by Alan Coon
  • 22 edits
    2 adds in branches/safari-608-branch

Cherry-pick r250488. rdar://problem/55826334

Crash when removing the target element while animating its attributes
https://bugs.webkit.org/show_bug.cgi?id=202247

Reviewed by Darin Adler.

Source/WebCore:

If SMIL is animating a CSS attribute, there is a chance the animation is
ended while it is being started or progressed. For that reason, the member
SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
be protected in resetAnimatedType() and calculateAnimatedValue().

While SMILTimeContainer::updateAnimations() is calling progress() for the
scheduled animation elements, SMILTimeContainer::unschedule() might get
called if processing an animation causes events to be dispatched. For that
reason we need to copy the scheduled animations Vector before processing
them so we avoid changing the Vector while looping through its items.

Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
which was added in r129670 for debugging purposes. In some situations,
the scheduled animations map could be modified out from under some of the
functions of SMILTimeContainer.

Test: svg/animations/animate-and-remove-target-element.html

  • svg/SVGAnimateElementBase.cpp: (WebCore::SVGAnimateElementBase::resetAnimatedType): (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
  • svg/SVGAnimateElementBase.h:
  • svg/SVGElement.cpp: (WebCore::SVGElement::createAnimator):
  • svg/SVGElement.h:
  • svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): (WebCore::SMILTimeContainer::unschedule): (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::sortByPriority): (WebCore::SMILTimeContainer::processAnimations): (WebCore::SMILTimeContainer::processScheduledAnimations): (WebCore::SMILTimeContainer::updateAnimations): (WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.
  • svg/animation/SMILTimeContainer.h:
  • svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateNextProgressTime const):
  • svg/properties/SVGAnimatedPropertyAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
  • svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyPairAnimator.h:
  • svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
  • svg/properties/SVGAttributeAnimator.h:
  • svg/properties/SVGMemberAccessor.h: (WebCore::SVGMemberAccessor::createAnimator const):
  • svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create):
  • svg/properties/SVGPropertyAnimatorFactory.h: (WebCore::SVGPropertyAnimatorFactory::createAnimator):
  • svg/properties/SVGPropertyOwnerRegistry.h:
  • svg/properties/SVGPropertyRegistry.h:
  • svg/properties/SVGValuePropertyAnimatorImpl.h:
  • svg/properties/SVGValuePropertyListAnimatorImpl.h:

LayoutTests:

  • svg/animations/animate-and-remove-target-element-expected.txt: Added.
  • svg/animations/animate-and-remove-target-element.html: Added.

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

1:15 PM Changeset in webkit [250524] by Alan Coon
  • 61 edits
    1 delete in branches/safari-608-branch/Source/WebCore

Cherry-pick r249822. rdar://problem/55826334

SVGLengthValue should use two enums for 'type' and 'mode' instead of one unsigned for 'units'
https://bugs.webkit.org/show_bug.cgi?id=201663

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-12
Reviewed by Simon Fraser, Nikolas Zimmermann.

SVGLengthValue had one unsigned to store SVGLengthMode and SVGLengthType.
It used to allocate the least significant 4 bits of this unsigned to the
SVGLengthMode while it leaves the rest for SVGLengthType.

This will not be needed if SVGLengthMode and SVGLengthType are made of
size uint_8.

Also in this patch:

-- SVGLengthNegativeValuesMode is made enum class.

-- SVGLengthValue::blend() is moved to SVGLengthValue.cpp so we do not

need to include SVGLengthContext.h in SVGLengthValue.h.

-- SVGLengthType and SVGLengthMode are moved to SVGLengthValue.h. Instead

of having SVGLengthValue.h includes SVGLengthConttext.h, the opposite
will happen.

-- SVGAnimatedPropertyDescription.h is deleted. It should have been deleted

with the SVG tear off objects removal.

-- SVGPropertyTraits<SVGAngleValue> and SVGPropertyTraits<SVGLengthValue>

are deleted. They should have been deleted with SVGAnimatedType removal.

-- SVGLengthValue::lengthModeForAnimatedLengthAttribute() is deleted. It

was only called from SVGPropertyTraits<SVGLengthValue>.

  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleResolver.h:
  • page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc):
  • rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::initialBaselineShiftValue): (WebCore::SVGRenderStyle::initialKerning):
  • rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
  • rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement):
  • rendering/svg/SVGPathData.cpp: (WebCore::pathFromCircleElement): (WebCore::pathFromEllipseElement): (WebCore::pathFromRectElement):
  • rendering/svg/SVGTextLayoutEngineBaseline.cpp: (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
  • rendering/svg/SVGTextLayoutEngineSpacing.cpp: (WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing):
  • svg/LinearGradientAttributes.h: (WebCore::LinearGradientAttributes::LinearGradientAttributes):
  • svg/RadialGradientAttributes.h: (WebCore::RadialGradientAttributes::RadialGradientAttributes):
  • svg/SVGAngleValue.h: (WebCore::SVGPropertyTraits<SVGAngleValue>::initialValue): Deleted. (WebCore::SVGPropertyTraits<SVGAngleValue>::toString): Deleted.
  • svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::parseAttribute):
  • svg/SVGCircleElement.h:
  • svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::parseAttribute):
  • svg/SVGCursorElement.h:
  • svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::parseAttribute):
  • svg/SVGEllipseElement.h:
  • svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::parseAttribute):
  • svg/SVGFilterElement.h:
  • svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
  • svg/SVGFilterPrimitiveStandardAttributes.h:
  • svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseAttribute):
  • svg/SVGForeignObjectElement.h:
  • svg/SVGImageElement.cpp: (WebCore::SVGImageElement::parseAttribute):
  • svg/SVGImageElement.h:
  • svg/SVGLength.h: (WebCore::SVGLength::unitType const): (WebCore::SVGLength::setValueForBindings): (WebCore::SVGLength::newValueSpecifiedUnits): (WebCore::SVGLength::convertToSpecifiedUnits): (WebCore::SVGLength::unitType): Deleted.
  • svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::valueForLength): (WebCore::SVGLengthContext::convertValueToUserUnits const): (WebCore::SVGLengthContext::convertValueFromUserUnits const): (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const): (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
  • svg/SVGLengthContext.h: (): Deleted.
  • svg/SVGLengthList.h: (WebCore::SVGLengthList::create):
  • svg/SVGLengthValue.cpp: (WebCore::lengthTypeToString): (WebCore::parseLengthType): (WebCore::primitiveTypeToLengthType): (WebCore::lengthTypeToPrimitiveType): (WebCore::SVGLengthValue::SVGLengthValue): (WebCore::SVGLengthValue::construct): (WebCore::SVGLengthValue::blend): (WebCore::SVGLengthValue::fromCSSPrimitiveValue): (WebCore::SVGLengthValue::toCSSPrimitiveValue): (WebCore::SVGLengthValue::setValueAsString): (WebCore::SVGLengthValue::valueAsString const): (WebCore::SVGLengthValue::valueForBindings const): (WebCore::SVGLengthValue::setValue): (WebCore::SVGLengthValue::convertToSpecifiedUnits): (WebCore::storeUnit): Deleted. (WebCore::extractMode): Deleted. (WebCore::extractType): Deleted. (WebCore::SVGLengthValue::operator== const): Deleted. (WebCore::SVGLengthValue::operator!= const): Deleted. (WebCore::SVGLengthValue::unitType const): Deleted. (WebCore::SVGLengthValue::unitMode const): Deleted. (WebCore::SVGLengthValue::valueAsPercentage const): Deleted. (WebCore::SVGLengthValue::newValueSpecifiedUnits): Deleted. (WebCore::SVGLengthValue::lengthModeForAnimatedLengthAttribute): Deleted.
  • svg/SVGLengthValue.h: (WebCore::SVGLengthValue::lengthType const): (WebCore::SVGLengthValue::lengthMode const): (WebCore::SVGLengthValue::isZero const): (WebCore::SVGLengthValue::isRelative const): (WebCore::SVGLengthValue::valueAsPercentage const): (WebCore::SVGLengthValue::valueInSpecifiedUnits const): (WebCore::operator==): (WebCore::operator!=): (WebCore::SVGLengthValue::blend const): Deleted. (WebCore::SVGPropertyTraits<SVGLengthValue>::initialValue): Deleted. (WebCore::SVGPropertyTraits<SVGLengthValue>::parse): Deleted. (WebCore::SVGPropertyTraits<SVGLengthValue>::toString): Deleted.
  • svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseAttribute):
  • svg/SVGLineElement.h:
  • svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::parseAttribute):
  • svg/SVGLinearGradientElement.h:
  • svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::parseAttribute):
  • svg/SVGMarkerElement.h:
  • svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::parseAttribute):
  • svg/SVGMaskElement.h:
  • svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseAttribute):
  • svg/SVGPatternElement.h:
  • svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::parseAttribute):
  • svg/SVGRadialGradientElement.h:
  • svg/SVGRectElement.cpp: (WebCore::SVGRectElement::parseAttribute):
  • svg/SVGRectElement.h:
  • svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseAttribute): (WebCore::SVGSVGElement::hasIntrinsicWidth const): (WebCore::SVGSVGElement::hasIntrinsicHeight const): (WebCore::SVGSVGElement::intrinsicWidth const): (WebCore::SVGSVGElement::intrinsicHeight const):
  • svg/SVGSVGElement.h:
  • svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::parseAttribute): (WebCore::SVGTextContentElement::textLengthAnimated):
  • svg/SVGTextContentElement.h:
  • svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseAttribute):
  • svg/SVGTextPathElement.h:
  • svg/SVGTextPositioningElement.h:
  • svg/SVGUseElement.cpp: (WebCore::SVGUseElement::parseAttribute):
  • svg/SVGUseElement.h:
  • svg/properties/SVGAnimatedPropertyAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyDescription.h: Removed.
  • svg/properties/SVGAnimationAdditiveListFunctionImpl.h: (WebCore::SVGAnimationLengthListFunction::animate):
  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: (WebCore::SVGAnimationLengthFunction::animate):
  • svg/properties/SVGValuePropertyAnimatorImpl.h:
  • svg/properties/SVGValuePropertyListAnimatorImpl.h:

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

12:36 PM Changeset in webkit [250523] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

[results.webkit.org Timeline] New axis style
https://bugs.webkit.org/show_bug.cgi?id=202292

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
12:10 PM Changeset in webkit [250522] by Keith Rollin
  • 6 edits in trunk/Source/WebCore
Coalesce or remove PLATFORM(MAC)
PLATFORM(IOS_FAMILY)

https://bugs.webkit.org/show_bug.cgi?id=202119
<rdar://problem/55638792>

Unreviewed, address post landing review comments for r248533 from
Darin Adler.

Source/WebCore:

No new tests -- no new or changed functionality.

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::convert):
(WebCore::subLocality): Deleted.
(WebCore::setSubLocality): Deleted.
(WebCore::subAdministrativeArea): Deleted.
(WebCore::setSubAdministrativeArea): Deleted.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:
  • pal/spi/cocoa/NEFilterSourceSPI.h:
  • pal/spi/mac/AVFoundationSPI.h:
11:49 AM Changeset in webkit [250521] by achristensen@apple.com
  • 30 edits in trunk

Move DownloadMonitor test speed multiplier from WebProcessPool to WebsiteDataStoreConfiguration
https://bugs.webkit.org/show_bug.cgi?id=202339

Reviewed by Youenn Fablet.

Source/WebKit:

This was only used for some unit tests, which still are accelerated so they pass in the same amount of time as before.
I need this value to not be process-global in the NetworkProcess.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download):

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::Download):
(WebKit::Download::testSpeedMultiplier const):

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::resumeDownload):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::applicationDidEnterBackground):
(WebKit::DownloadMonitor::testSpeedMultiplier const):
(WebKit::DownloadMonitor::timerFired):
(WebKit::DownloadMonitor::speedMultiplier const): Deleted.

  • NetworkProcess/Downloads/DownloadMonitor.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::download):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::testSpeedMultiplier const):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration downloadMonitorSpeedMultiplierForTesting]): Deleted.
(-[_WKProcessPoolConfiguration setDownloadMonitorSpeedMultiplierForTesting:]): Deleted.

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration testSpeedMultiplier]):
(-[_WKWebsiteDataStoreConfiguration setTestSpeedMultiplier:]):

  • 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::testSpeedMultiplier const):
(WebKit::WebsiteDataStoreConfiguration::setTestSpeedMultiplier):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(TestWebKitAPI::webViewWithDownloadMonitorSpeedMultiplier):

11:15 AM Changeset in webkit [250520] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

Add some assertions to convertUTF8ToUTF16().
https://bugs.webkit.org/show_bug.cgi?id=202356
<rdar://problem/52846813>

Reviewed by Filip Pizlo.

  • wtf/unicode/UTF8Conversion.cpp:

(WTF::Unicode::convertUTF8ToUTF16):

8:55 AM Changeset in webkit [250519] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

RenderLineBreak should use LineLayoutTraversal
https://bugs.webkit.org/show_bug.cgi?id=202316

Reviewed by Zalan Bujtas.

Replace more path specific code with LineLayoutTraversal.

  • Headers.cmake:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::linesBoundingBox const):
(WebCore::RenderLineBreak::absoluteRects const):
(WebCore::RenderLineBreak::absoluteQuads const):
(WebCore::simpleLineLayout): Deleted.

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeTextBox):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::computeBoundingBox): Deleted.
(WebCore::SimpleLineLayout::collectAbsoluteRects): Deleted.
(WebCore::SimpleLineLayout::rendererForPosition): Deleted.

  • rendering/SimpleLineLayoutFunctions.h:
  • rendering/line/LineLayoutTraversal.cpp:

(WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
(WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
(WebCore::LineLayoutTraversal::elementBoxFor):
(WebCore::LineLayoutTraversal::TextBox::rect const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::logicalRect const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::hasHyphen const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::dirOverride const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::text const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::isLineBreak const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::localStartOffset const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::localEndOffset const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::length const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::isLastOnLine const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::isLast const): Deleted.
(WebCore::LineLayoutTraversal::TextBox::iterator const): Deleted.

Move to header as templates.

  • rendering/line/LineLayoutTraversal.h:

(WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
(WebCore::LineLayoutTraversal::ElementBoxIterator::operator bool const):
(WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
(WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):

Add a new iterator type for element boxes.
It doesn't currently really iterate, is just allows testing for end.

(WebCore::LineLayoutTraversal::Box<Iterator>::rect const):
(WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const):
(WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const):
(WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const):
(WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const):
(WebCore::LineLayoutTraversal::Box<Iterator>::iterator const):

Split properties that all inline boxes have out from TextBox.
Make it a template class.

(WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::text const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::length const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const):
(WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const):

Make a template class.

(WebCore::LineLayoutTraversal::hasTextBoxes): Deleted.

5:38 AM Changeset in webkit [250518] by Carlos Garcia Campos
  • 12 edits in trunk

[GTK] IconDatabase is not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=201303

Reviewed by Žan Doberšek.

Source/WebKit:

Rewrite the IconDatabase implementation. Now that we are the only users of this code, we can simply it a lot and
design it specifically for our API, which implementation has been simplified a lot too. There's no change in
the database schema nor in behavior from the API point of view.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconDatabase):
(WebKit::IconDatabase::~IconDatabase):
(WebKit::IconDatabase::createTablesIfNeeded):
(WebKit::IconDatabase::populatePageURLToIconURLMap):
(WebKit::IconDatabase::clearStatements):
(WebKit::IconDatabase::pruneTimerFired):
(WebKit::IconDatabase::startPruneTimer):
(WebKit::IconDatabase::clearLoadedIconsTimerFired):
(WebKit::IconDatabase::startClearLoadedIconsTimer):
(WebKit::IconDatabase::iconIDForIconURL):
(WebKit::IconDatabase::setIconIDForPageURL):
(WebKit::IconDatabase::iconData):
(WebKit::IconDatabase::addIcon):
(WebKit::IconDatabase::updateIconTimestamp):
(WebKit::IconDatabase::deleteIcon):
(WebKit::IconDatabase::checkIconURLAndSetPageURLIfNeeded):
(WebKit::IconDatabase::loadIconForPageURL):
(WebKit::IconDatabase::iconURLForPageURL):
(WebKit::IconDatabase::setIconForPageURL):
(WebKit::IconDatabase::clear):

  • UIProcess/API/glib/IconDatabase.h:

(WebKit::IconDatabase::create):

  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:

(webkitFaviconDatabaseCreate):
(webkitFaviconDatabaseIsOpen):
(webkitFaviconDatabaseOpen):
(webkitFaviconDatabaseClose):
(webkitFaviconDatabaseGetLoadDecisionForIcon):
(webkitFaviconDatabaseSetIconForPageURL):
(webkitFaviconDatabaseGetFaviconInternal):
(webkit_favicon_database_get_favicon):
(webkit_favicon_database_get_favicon_finish):
(webkit_favicon_database_get_favicon_uri):
(webkit_favicon_database_clear):

  • UIProcess/API/glib/WebKitFaviconDatabasePrivate.h:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextDispose):
(webkit_web_context_set_favicon_database_directory):
(webkitWebContextCreatePageForWebView):
(webkitWebContextWebViewDestroyed):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewRequestFavicon):
(webkitWebViewGetLoadDecisionForIcon):
(webkitWebViewSetIcon):

Tools:

Rewrite the WebKitFaviconDatabase tests, splitting tests cases again and making them independent to each other.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:

(testFaviconDatabaseInitialization):
(testFaviconDatabaseGetFavicon):
(ephemeralViewFaviconChanged):
(testFaviconDatabaseEphemeral):
(testFaviconDatabaseClear):
(beforeAll):
(afterAll):

  • TestWebKitAPI/glib/TestExpectations.json: TestWebKitFaviconDatabase shouls always pass now.
5:06 AM Changeset in webkit [250517] by Carlos Garcia Campos
  • 11 edits
    3 adds in trunk

[GTK][WPE] Add about:gpu
https://bugs.webkit.org/show_bug.cgi?id=202305

Reviewed by Žan Doberšek.

.:

Add SVN_REVISION definition to the build.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebKit:

A builtin protocol handler to show information about hardware acceleration. This is useful information we need
from people reporting issues in accelerated compositing mode.

  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitProtocolHandler.cpp: Added.

(WebKit::WebKitProtocolHandler::WebKitProtocolHandler):
(WebKit::WebKitProtocolHandler::handleRequest):
(WebKit::webkitPortName):
(WebKit::hardwareAccelerationPolicy):
(WebKit::webGLEnabled):
(WebKit::openGLAPI):
(WebKit::nativeInterface):
(WebKit::WebKitProtocolHandler::handleGPU):

  • UIProcess/API/glib/WebKitProtocolHandler.h: Added.
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):

Tools:

Allow to use about:gpu in MiniBrowser. Add a script to get the current svn revision.

  • MiniBrowser/gtk/BrowserTab.c:

(getInternalURI):

  • MiniBrowser/gtk/main.c:

(argumentToURL):

  • MiniBrowser/wpe/main.cpp:

(main):

  • glib/svn-revision: Added.
4:18 AM Changeset in webkit [250516] by guijemont@igalia.com
  • 2 edits in trunk/Source/WTF

Don't try to use backtrace() on MIPS
https://bugs.webkit.org/show_bug.cgi?id=202196

Reviewed by Carlos Garcia Campos.

backtrace() on mips seems to always return 1 on mips/glibc (I tried
with buildroot, debian stable and debian testing, with and without
libunwind), which renders it useless and breaks a RELEASE_ASSERT in
StackTrace::captureStackTrace().

  • wtf/Platform.h:
3:40 AM Changeset in webkit [250515] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

No-Cors check should take into account same-origin
https://bugs.webkit.org/show_bug.cgi?id=202353

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-30
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt: Removed.
  • web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:

Source/WebCore:

No-Cors check should take into account same-origin, in that case the
check should bail out, since same-origin is already handled in
the first step of [1].

Test: imported/web-platform-tests/fetch/api/redirect/redirect-mode.any.html

[1] https://fetch.spec.whatwg.org/#main-fetch Step 5

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::canRequest):

2:06 AM Changeset in webkit [250514] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[Nicosia] Complete ScrollingTreeNicosia::createScrollingTreeNode()
https://bugs.webkit.org/show_bug.cgi?id=202358

Reviewed by Carlos Garcia Campos.

  • page/scrolling/nicosia/ScrollingTreeNicosia.cpp:

(WebCore::ScrollingTreeNicosia::createScrollingTreeNode):
Return appropriate objects for the remaining node types.

1:50 AM Changeset in webkit [250513] by zandobersek@gmail.com
  • 7 edits in trunk/Source/WebCore

[Nicosia] Add missing conversion casts for LayerRepresentation objects
https://bugs.webkit.org/show_bug.cgi?id=202357

Reviewed by Carlos Garcia Campos.

After r250491, we have to request explicit conversion of
LayerRepresentation objects to Nicosia::PlatformLayer pointers.

  • page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:

(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:

(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):

  • page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:

(WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:

(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):

1:50 AM Changeset in webkit [250512] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, rolling out r250291.
https://bugs.webkit.org/show_bug.cgi?id=202359

it is failing
TestWebKitAPI.ProcessSwap.GetUserMediaCaptureState (Requested
by youenn on #webkit).

Reverted changeset:

"Delay capture sandbox extension revocation to after the page
close message is sent"
https://bugs.webkit.org/show_bug.cgi?id=202133
https://trac.webkit.org/changeset/250291

1:30 AM Changeset in webkit [250511] by bshafiei@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r250394. rdar://problem/55826250

Crash under WebPage::beginPrinting when m_printContext becomes null due to synchronous layout
https://bugs.webkit.org/show_bug.cgi?id=202171
<rdar://problem/49731211>

Reviewed by Tim Horton.

Speculatively fix a null pointer dereference crash in WebPage::beginPrinting.

WebPage::beginPrinting creates a PrintContext, stores it in m_printContext, then calls
PrintContext::begin which forces a synchronous, paginated layout. If a post-layout task
executes script, that might result in the WebPage being closed and m_printContext being set
to nullptr.

Guard against this in WebPage::beginPrinting by adding a null check before calling
PrintContext::computePageRects.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::beginPrinting):

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

1:30 AM Changeset in webkit [250510] by bshafiei@apple.com
  • 3 edits
    1 add in branches/safari-608-branch

Cherry-pick r250058. rdar://problem/55826329

Phantom insertion phase may disagree with arguments forwarding about live ranges
https://bugs.webkit.org/show_bug.cgi?id=200715
<rdar://problem/54301717>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/phantom-insertion-live-range-should-agree-with-arguments-forwarding.js: Added. (main.v23): (main.try.v43): (main.): (main):

Source/JavaScriptCore:

The issue is that Phantom insertion phase was disagreeing about live ranges
from the arguments forwarding phase. The effect is that Phantom insertion
would insert a Phantom creating a longer live range than what arguments
forwarding was analyzing. Arguments forwarding will look for the last DFG
use or the last bytecode use of a variable it wants to eliminate. It then
does an interference analysis to ensure that nothing clobbers other variables
it needs to recover the sunken allocation during OSR exit.

Phantom insertion works by ordering the program into OSR exit epochs. If a value was used
in the current epoch, there is no need to insert a phantom for it. We
determine where we might need a Phantom by looking at bytecode kills. In this
analysis, we have a mapping from bytecode local to DFG node. However, we
sometimes forgot to remove the entry when a local is killed. So, if the first
kill of a variable is in the same OSR exit epoch, we won't insert a Phantom by design.
However, if the variable gets killed again, we might errantly insert a Phantom
for the prior variable which should've already been killed. The solution is to
clear the entry in our mapping when a variable is killed.

The program in question was like this:

1: DirectArguments
...
2: MovHint(@1, loc1) arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery
...

Arguments elimination would transform the program since between @1 and
@2, nothing clobbers values needed for exit and nothing escapes @1. The
program becomes:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...

Phantom insertion would then transform the program into:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...
3: Phantom(@1)
...

This is wrong because Phantom insertion and arguments forwarding must agree on live
ranges, otherwise the interference analysis performed by arguments forwarding will
not correctly analyze up until where the value might be recovered.

  • dfg/DFGPhantomInsertionPhase.cpp:

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

1:30 AM Changeset in webkit [250509] by bshafiei@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r249930. rdar://problem/55826316

AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
https://bugs.webkit.org/show_bug.cgi?id=201840

Patch by Eric Liang <ericliang@apple.com> on 2019-09-16
Reviewed by Chris Fleizach.

menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
Tested that existing tests passed with WK1 and WK2

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):

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

1:30 AM Changeset in webkit [250508] by bshafiei@apple.com
  • 5 edits
    1 add in branches/safari-608-branch

Cherry-pick r249926. rdar://problem/55826870

[JSC] Perform check again when we found non-BMP characters
https://bugs.webkit.org/show_bug.cgi?id=201647

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/regexp-unicode-surrogate-pair-increment-should-involve-length-check.js: Added.
  • stress/regexp-unicode-within-string.js: Updated test to eliminate the bogus print(). (testRegExpInbounds):

Source/JavaScriptCore:

We need to check for end of input for non-BMP characters when matching a character class that contains
both BMP and non-BMP characters. In advanceIndexAfterCharacterClassTermMatch() we were checking for
end of input for both BMP and non-BMP characters. For BMP characters, this check is redundant.
After moving the check to after the "is BMP check", we need to decrement index after reaching the failure
label to back out the index++ for the first surrogate of the non-BMP character.

Added the same kind of check in generateCharacterClassOnce(). In that case, we have pre-checked the
first character (surrogate) for a non-BMP codepoint, so we just need to check for end of input before
we increment for the second surrogate.

While writing tests, I found an off by one error in backtrackCharacterClassGreedy() and changed the
loop to check the count at loop top instead of loop bottom.

  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::advanceIndexAfterCharacterClassTermMatch): (JSC::Yarr::YarrGenerator::generateCharacterClassOnce): (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

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

1:30 AM Changeset in webkit [250507] by bshafiei@apple.com
  • 3 edits
    1 add in branches/safari-608-branch

Cherry-pick r249777. rdar://problem/55826876

JSC crashes due to stack overflow while building RegExp
https://bugs.webkit.org/show_bug.cgi?id=201649

Reviewed by Yusuke Suzuki.

JSTests:

New regression test.

  • stress/regexp-bol-optimize-out-of-stack.js: Added. (test): (catch):

Source/JavaScriptCore:

Check for running out of stack when we are optimizing RegExp containing BOL terms or
other deep copying of disjunctions.

  • yarr/YarrPattern.cpp: (JSC::Yarr::YarrPatternConstructor::copyDisjunction): (JSC::Yarr::YarrPatternConstructor::copyTerm): (JSC::Yarr::YarrPatternConstructor::error): (JSC::Yarr::YarrPattern::compile):

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

1:30 AM Changeset in webkit [250506] by bshafiei@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r249077. rdar://problem/55826882

Crash under TimerBase::setNextFireTime() in the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=201097
<rdar://problem/54658339>

Reviewed by Ryosuke Niwa.

NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess.
On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the
underlying framework on a non-main thread and we therefore want to go back to the main thread before calling
NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule
a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While
this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there
is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one.
This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now
use callOnMainThread().

  • platform/network/ios/NetworkStateNotifierIOS.mm: (WebCore::NetworkStateNotifier::startObserving):

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

1:30 AM Changeset in webkit [250505] by bshafiei@apple.com
  • 5 edits
    1 add in branches/safari-608-branch

Cherry-pick r248951. rdar://problem/55826863

[JSC] incorrent JIT lead to StackOverflow
https://bugs.webkit.org/show_bug.cgi?id=197823

Reviewed by Tadeu Zagallo.

JSTests:

New test.

  • stress/bound-function-stack-overflow.js: Added. (foo): (catch):

Source/JavaScriptCore:

Added stack overflow check to the bound function thunk generator. Added a new C++ operation
throwStackOverflowErrorFromThunk() to throw the error.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/ThunkGenerators.cpp: (JSC::boundThisNoArgsFunctionCallGenerator):

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

1:30 AM Changeset in webkit [250504] by bshafiei@apple.com
  • 4 edits
    1 add in branches/safari-608-branch

Cherry-pick r248796. rdar://problem/55826874

[Re-land] ProxyObject should not be allow to access its target's private properties.
https://bugs.webkit.org/show_bug.cgi?id=200739
<rdar://problem/53972768>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js: Copied from JSTests/stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js.
  • stress/proxy-with-private-symbols.js:

Source/JavaScriptCore:

Re-landing this after r200829 which resolves the test262 failure uncovered by this patch.

  • runtime/ProxyObject.cpp: (JSC::performProxyGet): (JSC::ProxyObject::performInternalMethodGetOwnProperty): (JSC::ProxyObject::performHasProperty): (JSC::ProxyObject::performPut): (JSC::ProxyObject::performDelete): (JSC::ProxyObject::performDefineOwnProperty):

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

1:30 AM Changeset in webkit [250503] by bshafiei@apple.com
  • 7 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248591. rdar://problem/55826878

FrameLoader::open can execute scritps via style recalc in Frame::setDocument
https://bugs.webkit.org/show_bug.cgi?id=200377

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed the bug that FrameLoader::open can execute arbitrary author scripts via post style update callbacks
by adding PostResolutionCallbackDisabler, WidgetHierarchyUpdatesSuspensionScope, and NavigationDisabler
to CachedFrameBase::restore and FrameLoader::open.

This ensures all frames are restored from the page cache before any of them would start running scripts.

Test: fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html

  • history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::open):
  • page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::layout): Fixed the debug assertion. The layout of a document may be updated while we're preparing to put a page into the page cache.
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): Ditto.

LayoutTests:

Added a regression test.

  • fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt: Added.
  • fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html: Added.
  • platform/win/TestExpectations: Skip the newly added test.

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

1:30 AM Changeset in webkit [250502] by bshafiei@apple.com
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248173. rdar://problem/55826879

Harden NodeRareData::m_connectedFrameCount
https://bugs.webkit.org/show_bug.cgi?id=200300

Reviewed by Geoffrey Garen.

Use unsinged integer type in NodeRareData::m_connectedFrameCount since it's padded anyway.

  • dom/Node.cpp: (WebCore::Node::decrementConnectedSubframeCount): Check that hasRareNode() is true in release builds.
  • dom/NodeRareData.h:

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

1:30 AM Changeset in webkit [250501] by bshafiei@apple.com
  • 5 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248172. rdar://problem/55826873

Document::resume should delay resetting of form control elements.
https://bugs.webkit.org/show_bug.cgi?id=200376

Reviewed by Geoffrey Garen.

Source/WebCore:

Delay the execution of form control element resets until the next task
to avoid synchronously mutating DOM during page cache restoration.

Test: fast/frames/restoring-page-cache-should-not-run-scripts.html

  • html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::resumeFromDocumentSuspension):
  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::resumeFromDocumentSuspension):

LayoutTests:

Added a regression test.

  • fast/frames/restoring-page-cache-should-not-run-scripts-expected.txt: Added.
  • fast/frames/restoring-page-cache-should-not-run-scripts.html: Added.
  • platform/win/TestExpectations: Skip this test on Windows since navigating to blob fails on Windows.

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

1:30 AM Changeset in webkit [250500] by bshafiei@apple.com
  • 4 edits in branches/safari-608-branch/Source/JavaScriptCore

Cherry-pick r247799. rdar://problem/55826880

performJITMemcpy should be PACed with a non-zero diversifier when passed and called via a pointer.
https://bugs.webkit.org/show_bug.cgi?id=200100
<rdar://problem/53474939>

Reviewed by Yusuke Suzuki.

  • assembler/ARM64Assembler.h: (JSC::ARM64Assembler::CopyFunction::CopyFunction): (JSC::ARM64Assembler::CopyFunction::operator()):
  • I choose to use ptrauth_auth_function() here instead of retagCodePtr() because retagCodePtr() would auth, assert, and re-pac the pointer. This is needed in general because retagCodePtr() doesn't know that you will consume the pointer immediately (and therefore crash imminently if a failed auth is encountered). Since we know here that we will call with the auth'ed pointer immediately, we can skip the assert.

This also has the benefit of letting Clang do a peephole optimization to emit
a blrab instruction with the intended diversifier, instead of emitting multiple
instructions to auth the pointer into a C function, and then using a blraaz to
do a C function call.

(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):

  • assembler/LinkBuffer.cpp: (JSC::LinkBuffer::copyCompactAndLinkCode):
  • runtime/JSCPtrTag.h:

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

12:55 AM Changeset in webkit [250499] by bshafiei@apple.com
  • 3 edits in branches/safari-608-branch/Source/WebCore

Revert r250483. rdar://problem/55825351

Sep 29, 2019:

10:15 PM Changeset in webkit [250498] by zandobersek@gmail.com
  • 7 edits in trunk/Source

ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
https://bugs.webkit.org/show_bug.cgi?id=202256
<rdar://problem/55772092>

Reviewed by Simon Fraser.

Source/WebCore:

Make the scroll container and scrolled contents layer holders
platform-independent by using the LayerRepresentation as the underlying
type for the two member variables in ScrollingTreeScrollingNode.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

Source/WebKit:

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations):
Use static casts to retrieve the CALayer pointers from the
LayerRepresentation objects due to the explicit operators.

9:52 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
7:21 PM Changeset in webkit [250497] by Keith Rollin
  • 2 edits in trunk/Source/WTF

Address static analysis warning in ParkingLot.cpp: Access to field 'size' results in a dereference of a null pointer
https://bugs.webkit.org/show_bug.cgi?id=202154
<rdar://problem/55672103>

Reviewed by Brent Fulgham.

Static analysis reports the following:

.../OpenSource/Source/WTF/wtf/ParkingLot.cpp:376:30: warning: Access to field 'size' results in a dereference of a null pointer (loaded from variable 'oldHashtable')

RELEASE_ASSERT(newSize > oldHashtable->size);

~

This warning arises because earlier code checks to see if oldHashtable
is NULL, leading the static analyzer to think that it *could* be NULL.
However, even earlier code actually ensures that oldHashtable will not
be NULL. Address this by removing the NULL check, and back it up with
an ASSERT to ensure that it's not NULL.

  • wtf/ParkingLot.cpp:
6:56 PM Changeset in webkit [250496] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r250483. rdar://problem/55825351

[Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
https://bugs.webkit.org/show_bug.cgi?id=202335
<rdar://problem/55790994>

Reviewed by Maciej Stachowiak.

  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource):
  • platform/network/HTTPHeaderNames.in:

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

6:56 PM Changeset in webkit [250495] by Alan Coon
  • 19 edits in branches/safari-608-branch

Cherry-pick r250345. rdar://problem/55825352

[iPadOS] [DataActivation] Focus moves away after focusing input fields on www.att.com
https://bugs.webkit.org/show_bug.cgi?id=202167
<rdar://problem/55185021>

Reviewed by Tim Horton.

Source/WebCore:

Adds a new site-specific quirk. See WebKit ChangeLog for more details.

  • page/Quirks.cpp: (WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation const):
  • page/Quirks.h:
  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isDataActivation):

Source/WebKit:

When using the data activation page on www.att.com, one of the sections on the page contains several select
elements; in the case where the user agent:

  1. contains the string "iPad", and
  2. does not contain the string "Safari"

...www.att.com's data activation page will opt into a mode where it adds blur event listeners to the select
elements; in this blur event listener, www.att.com proceeds to programmatically focus a non-editable div element
after a 1 second timeout. The reasons for this behavior remain unclear to me, though it's worth noting that the
blur event handler name is "screenReaderFocus", which suggests that this is in place to ensure compatibility
with screen readers.

In iOS 12, dismissing the popover would blur the focused select menu with an animation. Since the animation
would take a slightly less than 1 second, www.att.com's logic would have the effect of moving focus to the div
element shortly after dismissing the select menu. However, after r243808, we no longer attempt to blur the
focused select element when dismissing the popover. This means that the select element is only blurred the next
time the user activates another focused element, such as one of the input fields on the page, or a different
select element. Consequently, the logic to move focus into a div element now occurs only after a different
element has already been focused; this results in focus moving away from newly focused elements after 1 second
in the case where a select element has previously focused.

To mitigate this, restore iOS 12 behavior behind a site- and app-specific quirk. See comments below for more
details.

  • Shared/FocusedElementInformation.cpp: (WebKit::FocusedElementInformation::encode const): (WebKit::FocusedElementInformation::decode):
  • Shared/FocusedElementInformation.h:

Add a new behavioral quirk flag to FocusedElementInformation to determine whether we should use "legacy" select
popover dismissal behavior (i.e. blurring the focused select element when dismissing the select popover, as well
as dismissing the popover with animation).

  • Shared/WebPreferences.yaml:

Enable site-specific quirks by default in WKWebView. With regards to this bug, this change allows for
site-specific hacks (namely, legacy select popover dismissal) in DataActivation. However, this also fixes
various known bugs that are otherwise addressed in Safari only, via site-specific quirks.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]):

For apps linked on or before iOS 13 and macOS 10.15, revert the default of value of NeedsSiteSpecificQuirks to
false. This is done here instead of in a default value function in WebPreferencesDefaultValues to prevent the
default values of NeedsSiteSpecificQuirks in the web process and UI process from going out of sync, since the
web process is not necessarily linked against the same SDK as the application.

  • UIProcess/Cocoa/VersionChecks.h:

Add a new DYLD version check for the first version of iOS and macOS where site-specific quirks are enabled by
default.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): (-[WKContentView _elementDidBlur]): (-[WKContentView _shouldUseLegacySelectPopoverDismissalBehavior]):

We only use "legacy" select popover dismissal behavior in the case where the site-specific quirk flag is on, a
select popover is used (i.e. the device is an iPad and a select element is focused), and the application bundle
is "com.apple.DataActivation".

  • UIProcess/ios/forms/WKFormSelectPopover.mm: (-[WKSelectTableViewController shouldDismissWithAnimation]):

Keyed off of _shouldUseLegacySelectPopoverDismissalBehavior.

(-[WKSelectPopover controlEndEditing]):

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation):

Source/WTF:

Declare DYLD_IOS_VERSION_13_2.

  • wtf/spi/darwin/dyldSPI.h:

Tools:

Rebaseline an API test.

  • TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST):

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

6:56 PM Changeset in webkit [250494] by Alan Coon
  • 18 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249893. rdar://problem/55825342

Expose misspelling ranges for editable content to accessibility clients.
https://bugs.webkit.org/show_bug.cgi?id=201752
<rdar://problem/49556828>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-09-16
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/misspelling-range.html

Added [WebAccessibilityObjectWrapper misspellingTextMarkerRange] and
underlying AccessibilityObject implementation to expose misspellings to
accessibility clients that provide an alternative user interface to
spell checking.

  • accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::getMisspellingRange const):
  • accessibility/AccessibilityObject.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:direction:]):
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (accessibilityMisspellingSearchCriteriaForParameterizedAttribute): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

Tools:

Test code needed for LayoutTests/accessibility/misspelling-range.html.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::misspellingTextMarkerRange): (WTR::AccessibilityUIElement::indexForTextMarker):
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::misspellingSearchParameterizedAttributeForCriteria): (WTR::AccessibilityUIElement::misspellingTextMarkerRange):

LayoutTests:

  • accessibility/misspelling-range-expected.txt: Added.
  • accessibility/misspelling-range.html: Added.
  • platform/ios-simulator/TestExpectations:

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

4:50 PM Changeset in webkit [250493] by bshafiei@apple.com
  • 46 edits
    1 copy
    3 moves
    1 delete in branches/safari-608-branch

Apply patch. rdar://problem/55801087

12:33 PM Changeset in webkit [250492] by Brent Fulgham
  • 11 edits in trunk/Source/WebCore

[FTW] Correct compositing, shadow, and radial gradient implementations
https://bugs.webkit.org/show_bug.cgi?id=202177

Reviewed by Fujii Hironori.

This patch corrects a number of implementation errors in basic Canvas
drawing operations.

Tested by canvas/philip/tests

  • platform/graphics/win/Direct2DOperations.cpp:

(WebCore::Direct2D::State::setCompositeOperation): Initialize blend and
composite modes to correct defaults.
(WebCore::Direct2D::drawWithShadowHelper): Correct value used for blur
standard deviation to more closely match other browser output.

  • platform/graphics/win/Direct2DUtilities.cpp:

(WebCore::Direct2D::createBitmapCopyFromContext): Added helper function.

  • platform/graphics/win/Direct2DUtilities.h:
  • platform/graphics/win/GradientDirect2D.cpp:

(WebCore::Gradient::generateGradient): Properly handle the case of a non-zero
initial gradient radius. Properly compute the final radius.

  • platform/graphics/win/ImageBufferDataDirect2D.cpp:

(WebCore::ImageBufferData::readDataFromBitmapIfNeeded const): Update to use ID2D1DeviceContext
from platformContext, rather than searching for it each time.
(WebCore::ImageBufferData::compatibleBitmap): Ditto.

  • platform/graphics/win/PlatformContextDirect2D.cpp:

(WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Grab the ID2D1DeviceContext for
the RenderTarget at construction time.
(WebCore::PlatformContextDirect2D::setRenderTarget): Ditto.
(WebCore::PlatformContextDirect2D::endDraw): Perform compositing operations when needed.
(WebCore::PlatformContextDirect2D::compositeIfNeeded): Added.
(WebCore::PlatformContextDirect2D::setBlendAndCompositeMode): Update to properly set the
blend and compositing mode (depending on global value set for the canvas.)

  • platform/graphics/win/PlatformContextDirect2D.h:

(WebCore::PlatformContextDirect2D::deviceContext):
(WebCore::PlatformContextDirect2D::setRenderTarget): Deleted.
(WebCore::PlatformContextDirect2D::setBlendMode): Deleted.
(WebCore::PlatformContextDirect2D::setCompositeMode): Deleted.

10:25 AM Changeset in webkit [250491] by zandobersek@gmail.com
  • 15 edits in trunk/Source

Tighten up LayerRepresentation operators
https://bugs.webkit.org/show_bug.cgi?id=202344

Reviewed by Simon Fraser.

Source/WebCore:

Make the operators on the LayerRepresentation class explicit.
Additionally, the bool operator is added to the class, allowing objects
of this class to be safely used in boolean contexts like null checks.
Before, use in such contexts fell back to using the
GraphicsLayer::PlatformLayerID operator which caused asserts when the
internal representation was of different type.

While the explicit operators prevent misuse, they do require additional
conversion casts to retrieve the internal LayerRepresentation value.

  • page/scrolling/ScrollingStateNode.h:

(WebCore::LayerRepresentation::operator GraphicsLayer* const):
(WebCore::LayerRepresentation::operator PlatformLayer* const):
(WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID const):
(WebCore::LayerRepresentation::operator bool const):
(WebCore::LayerRepresentation::toRepresentation const):
Add a missing ASSERT_NOT_REACHED() invocation.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):

  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):

  • page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:

(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):

  • page/scrolling/cocoa/ScrollingTreePositionedNode.mm:

(WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):

Source/WebKit:

With LayerRepresentation operators now being explicit, we require
to manually specify conversion to CALayer pointers or
GraphicsLayer::PlatformLayerID values.

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::commitStateBeforeChildren):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:

(WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::commitStateBeforeChildren):

8:08 AM Changeset in webkit [250490] by Alan Bujtas
  • 6 edits
    2 adds
    1 delete in trunk/Source/WebCore

[LFC][IFC] Remove InlineLayout abstraction layer
https://bugs.webkit.org/show_bug.cgi?id=202352
<rdar://problem/55811532>

Reviewed by Antti Koivisto.

Move InlineLayout functions to InlineFormattingContext. Now inline layout has

  1. InlineFormattingContext -high level layout and preferred width computation, collecting inline content, constructing display boxes
  2. LineLayout -responsible for placing inline content on the current line (partial inline content handling, line breaking etc)
  3. Line -represents an actual line, turns inline content into runs.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
(WebCore::Layout::InlineFormattingContext::initialConstraintsForLine):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineFormattingContext.h:

(WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const): Deleted.
(WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const): Deleted.
(WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const): Deleted.
(WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState): Deleted.
(WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const): Deleted.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp: Removed.
  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::inlineItems const):

  • layout/inlineformatting/InlineLineLayout.cpp: Added.

(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::LineLayout::LineInput::LineInput):
(WebCore::Layout::LineLayout::UncommittedContent::add):
(WebCore::Layout::LineLayout::UncommittedContent::reset):
(WebCore::Layout::LineLayout::LineLayout):
(WebCore::Layout::LineLayout::commitPendingContent):
(WebCore::Layout::LineLayout::close):
(WebCore::Layout::LineLayout::placeInlineItem):
(WebCore::Layout::LineLayout::layout):

  • layout/inlineformatting/InlineLineLayout.h: Added.

(WebCore::Layout::LineLayout::formattingContext const):
(WebCore::Layout::LineLayout::UncommittedContent::runs):
(WebCore::Layout::LineLayout::UncommittedContent::isEmpty const):
(WebCore::Layout::LineLayout::UncommittedContent::size const):
(WebCore::Layout::LineLayout::UncommittedContent::width const):

1:56 AM Changeset in webkit [250489] by zandobersek@gmail.com
  • 2 edits
    4 adds in trunk/Source/WebCore

[Nicosia] Add overflow, overflow proxy node implementations
https://bugs.webkit.org/show_bug.cgi?id=202306

Reviewed by Carlos Garcia Campos.

Add the ScrollingTreeOverflowScrollProxyNode and
ScrollingTreeOverflowScrollingNodeNicosia classes, implementing the
missing overlfow node types. Both implementations are based on the
corresponsing classes for Cocoa/Mac platforms and should ideally
share most of the platform-agnostic logic.

  • SourcesWPE.txt:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp: Added.

(WebCore::ScrollingTreeOverflowScrollProxyNode::create):
(WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
(WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h: Added.
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: Added.

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::create):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNicosia):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::adjustedScrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h: Added.

Sep 28, 2019:

10:16 PM Changeset in webkit [250488] by Said Abou-Hallawa
  • 22 edits
    2 adds in trunk

Crash when removing the target element while animating its attributes
https://bugs.webkit.org/show_bug.cgi?id=202247

Reviewed by Darin Adler.

Source/WebCore:

If SMIL is animating a CSS attribute, there is a chance the animation is
ended while it is being started or progressed. For that reason, the member
SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
be protected in resetAnimatedType() and calculateAnimatedValue().

While SMILTimeContainer::updateAnimations() is calling progress() for the
scheduled animation elements, SMILTimeContainer::unschedule() might get
called if processing an animation causes events to be dispatched. For that
reason we need to copy the scheduled animations Vector before processing
them so we avoid changing the Vector while looping through its items.

Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
which was added in r129670 for debugging purposes. In some situations,
the scheduled animations map could be modified out from under some of the
functions of SMILTimeContainer.

Test: svg/animations/animate-and-remove-target-element.html

  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::resetAnimatedType):
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):

  • svg/SVGAnimateElementBase.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::createAnimator):

  • svg/SVGElement.h:
  • svg/animation/SMILTimeContainer.cpp:

(WebCore::SMILTimeContainer::schedule):
(WebCore::SMILTimeContainer::unschedule):
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::sortByPriority):
(WebCore::SMILTimeContainer::processAnimations):
(WebCore::SMILTimeContainer::processScheduledAnimations):
(WebCore::SMILTimeContainer::updateAnimations):
(WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.

  • svg/animation/SMILTimeContainer.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::calculateNextProgressTime const):

  • svg/properties/SVGAnimatedPropertyAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
  • svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyPairAnimator.h:
  • svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
  • svg/properties/SVGAttributeAnimator.h:
  • svg/properties/SVGMemberAccessor.h:

(WebCore::SVGMemberAccessor::createAnimator const):

  • svg/properties/SVGPrimitivePropertyAnimator.h:

(WebCore::SVGPrimitivePropertyAnimator::create):

  • svg/properties/SVGPropertyAnimatorFactory.h:

(WebCore::SVGPropertyAnimatorFactory::createAnimator):

  • svg/properties/SVGPropertyOwnerRegistry.h:
  • svg/properties/SVGPropertyRegistry.h:
  • svg/properties/SVGValuePropertyAnimatorImpl.h:
  • svg/properties/SVGValuePropertyListAnimatorImpl.h:

LayoutTests:

  • svg/animations/animate-and-remove-target-element-expected.txt: Added.
  • svg/animations/animate-and-remove-target-element.html: Added.
6:59 PM Changeset in webkit [250487] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Move horizontal alignment to Line
https://bugs.webkit.org/show_bug.cgi?id=202351
<rdar://problem/55810139>

Reviewed by Antti Koivisto.

Line should be able to finalize the run placement including horizontal alignment.

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::LineInput::LineInput):
(WebCore::Layout::LineLayout::LineLayout):
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
(WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::verticalAlignContent):
(WebCore::Layout::Line::horizontalAlignContent):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::inlineItemContentHeight const):

  • layout/inlineformatting/InlineLine.h:
5:48 PM Changeset in webkit [250486] by Adrian Perez de Castro
  • 2 edits in trunk/Source/JavaScriptCore

[GTK][WPE] Fix non-unified build issue caused by r250440
https://bugs.webkit.org/show_bug.cgi?id=202349

Reviewed by Mark Lam.

  • dfg/DFGOSRExit.cpp: Add missing inclusion of the BytecodeUseDef.h header.
5:26 PM Changeset in webkit [250485] by Wenson Hsieh
  • 5 edits in trunk/Source/WebCore

[IDL] Support record<DOMString, *Callback> in bindings
https://bugs.webkit.org/show_bug.cgi?id=202326

Reviewed by Sam Weinig.

Currently, IDLRecord's converter assumes that the value type (template argument V) can be converted by passing
in only an ExecState and the JSValue, since it calls auto typedValue = Converter<V>::convert(state, subValue).
However, IDLCallbackFunctions additionally require the JSDOMGlobalObject (see JSDOMConverterCallbacks.h). This
results in a compilation error in generated code, when attempting to convert the record.

To fix this, teach Converter<IDLRecord<K, V>> to accept three arguments (the ExecState, value, and global
object) in the case where V requires the global object. Additionally, let the bindings generator know that
JSValue to native object conversion requires the global object, by returning whether or not the value type of
the IDL record requires the global object, in the case where the given type is a record.

  • bindings/js/JSDOMConvertRecord.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(JSValueToNativeDOMConvertNeedsGlobalObject):

  • bindings/scripts/test/JS/JSTestObj.cpp:

Test this scenario by augmenting TestObj.idl with record<DOMString, VoidCallback>.

(WebCore::jsTestObjStringVoidCallbackRecordAttrGetter):
(WebCore::jsTestObjStringVoidCallbackRecordAttr):
(WebCore::setJSTestObjStringVoidCallbackRecordAttrSetter):
(WebCore::setJSTestObjStringVoidCallbackRecordAttr):

  • bindings/scripts/test/TestObj.idl:
4:58 PM Changeset in webkit [250484] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Line::InitialConstraints's heightAndBaseline should be optional
https://bugs.webkit.org/show_bug.cgi?id=202348

Reviewed by Antti Koivisto.

Vertical properties are undefined while computing the preferred width.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::LineInput::LineInput):
(WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):

  • layout/inlineformatting/InlineLine.h:
2:38 PM Changeset in webkit [250483] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

[Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
https://bugs.webkit.org/show_bug.cgi?id=202335
<rdar://problem/55790994>

Reviewed by Maciej Stachowiak.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • platform/network/HTTPHeaderNames.in:
7:30 AM Changeset in webkit [250482] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Line::Box should have a const public interface
https://bugs.webkit.org/show_bug.cgi?id=202336
<rdar://problem/55798628>

Reviewed by Antti Koivisto.

Clean up Line::Box interface.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::displayRun const):
(WebCore::Layout::Line::Run::isVisuallyEmpty const):
(WebCore::Layout::Line::Run::expand):
(WebCore::Layout::Line::Run::displayRun): Deleted.

12:32 AM Changeset in webkit [250481] by mitz@apple.com
  • 1 delete in releases/Apple/iOS 13.1.1

Removed the iOS 13.1.1 release tag.

12:30 AM Changeset in webkit [250480] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/iOS 13.1.1

Added a tag for iOS 13.1.1.

Sep 27, 2019:

8:40 PM Changeset in webkit [250479] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] Keep JSString::value(ExecState*)'s result as String instead of const String&
https://bugs.webkit.org/show_bug.cgi?id=202330

Reviewed by Saam Barati.

JSTests:

  • stress/to-lower-case-gc-stress.js: Added.

Source/JavaScriptCore:

In toLocaleLowerCase and toLocaleUpperCase, we get const String& from JSString* and use it.
But if this string is newly created one in toLocaleLowerCase and toLocaleUpperCase (like, passing a number, and number.toString() is called
in C++), after getting const String&, our C++ code potentially does not have any reference to the owner of this const String&. So, this
JSString* can be collected by GC, while const String& is used. This makes const String& destroyed, and causes crash.

In this patch, we receive it as String instead of const String& to ref it. This ensures that this string is live even if the owner is collected.
I grepped the source code and make this changes conservatively to places which looks dangerous. And I added error checks more after calling value(exec).

In this patch, I didn't introduce the change like that: JSString::value(ExecState*) returns String instead of const String&. Some of places are
really performance sensitive and we want to use the current behavior when we can ensure the owners are alive. We could figure out these points, and we
can change the default behavior of JSString::value function to returning String. But for now, I plan it as a future work.

  • dfg/DFGOperations.cpp:
  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule):

  • runtime/DateConstructor.cpp:

(JSC::constructDate):

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::equalSlowCaseInline):

  • runtime/RegExpMatchesArray.h:

(JSC::createRegExpMatchesArray):

  • runtime/StringPrototype.cpp:

(JSC::toLocaleCase):
(JSC::stringProtoFuncToLocaleLowerCase):
(JSC::stringProtoFuncToLocaleUpperCase):

  • tools/JSDollarVM.cpp:

(JSC::functionCreateBuiltin):

6:21 PM Changeset in webkit [250478] by Alan Coon
  • 4 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r250441. rdar://problem/55801089

[iOS] Vimeo fails to AirPlay in desktop mode
https://bugs.webkit.org/show_bug.cgi?id=202322

Reviewed by Eric Carlson.

Add a Quirk which opts Vimeo out of the preload=auto restriction, and allows their
second video element containing a HLS stream to correctly start AirPlaying when the
system route changes.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishInitialization):
  • page/Quirks.cpp: (WebCore::Quirks::needsPreloadAutoQuirk const):
  • page/Quirks.h:

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

6:20 PM Changeset in webkit [250477] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/JavaScriptCore

Cherry-pick r250440. rdar://problem/55800893

OSR exit shouldn't bother updating get_by_id array profiles that have changed modes
https://bugs.webkit.org/show_bug.cgi?id=202324
<rdar://problem/52669110>

Reviewed by Yusuke Suzuki.

This is an optimization that avoids polluting the array profile.

  • dfg/DFGOSRExit.cpp: (JSC::DFG::OSRExit::executeOSRExit): (JSC::DFG::OSRExit::compileExit):

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

6:20 PM Changeset in webkit [250476] by Alan Coon
  • 3 edits
    2 adds in branches/safari-608-branch

Cherry-pick r250432. rdar://problem/55801091

[iOS]: When inserting a photo and then inserting auto-corrected text, the photo is removed
https://bugs.webkit.org/show_bug.cgi?id=202294

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-27
Reviewed by Wenson Hsieh.

Source/WebKit:

WebPage::applyAutocorrectionInternal() calls wordRangeFromPosition() to
calculate the range of the word to be replaced with the auto-corrected
word. But if the text of the range does not match the original text,
applyAutocorrectionInternal() tries to correct the range by moving it
forward such that the length of the text range matches the length of the
original text.

Another case, which should correct the range also, is: the range does not
have a text but it is not collapsed. In this case, we should set the range
back to the selection range so non-text nodes is removed.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::applyAutocorrectionInternal):

LayoutTests:

  • fast/events/ios/autocorrect-after-image-expected.txt: Added.
  • fast/events/ios/autocorrect-after-image.html: Added.

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

6:00 PM Changeset in webkit [250475] by Alan Coon
  • 1 copy in tags/Safari-608.2.40.1.1

Tag Safari-608.2.40.1.1.

5:59 PM Changeset in webkit [250474] by Alan Coon
  • 1 delete in tags/Safari-608.2.40.1.1

Delete tag.

5:55 PM Changeset in webkit [250473] by Alan Coon
  • 1 copy in tags/Safari-608.2.30.1.1

Tag Safari-608.2.30.1.1.

5:49 PM Changeset in webkit [250472] by Alan Coon
  • 9 edits in branches/safari-608.2.40.1-branch/Source/WebKit

Perform changes to match Safari-608.2.11.1.9 content.

This reverts commit r250166.

5:36 PM Changeset in webkit [250471] by Alan Coon
  • 2 edits in branches/safari-608.2.30.1-branch/Source/WebCore

Cherry-pick r250459. rdar://problem/55797569

[Win] Crash under FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=202325
<rdar://problem/47856730>

Reviewed by Brent Fulgham.

As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font
on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.

No new tests. I have not been able to reproduce this issue.

  • platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::lastResortFallbackFont):

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

5:34 PM Changeset in webkit [250470] by Alan Coon
  • 9 edits in branches/safari-608.2.30.1-branch/Source/WebKit

Perform changes to match Safari-608.2.11.1.9 content.

This commit reverts r250166.

5:22 PM Changeset in webkit [250469] by Alan Coon
  • 1 copy in tags/Safari-608.2.40.1.1

Tag Safari-608.2.40.1.1.

4:51 PM Changeset in webkit [250468] by Alan Coon
  • 7 edits in branches/safari-608.2.40.1-branch/Source

Versioning.

4:41 PM Changeset in webkit [250467] by Alan Coon
  • 1 copy in branches/safari-608.2.40.1-branch

New branch.

3:53 PM Changeset in webkit [250466] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r250459. rdar://problem/55797570

[Win] Crash under FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=202325
<rdar://problem/47856730>

Reviewed by Brent Fulgham.

As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font
on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.

No new tests. I have not been able to reproduce this issue.

  • platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::lastResortFallbackFont):

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

3:45 PM Changeset in webkit [250465] by Dewei Zhu
  • 15 edits
    1 add in trunk/Websites/perf.webkit.org

Provide build request status description information on dashboard.
https://bugs.webkit.org/show_bug.cgi?id=199810

Reviewed by Ryosuke Niwa.

Add build request status description to show detailed information for a build and show it in dashboard.
Update SQL for existing instance:

ALTER TABLE build_requests ADD COLUMN IF NOT EXISTS request_status_description varchar(1024) DEFAULT NULL;

  • ReadMe.md: Updated instructions for initializing a database to include running 'migrate-database.sql'.
  • init-database.sql: Added request_status_description column.
  • migrate-database.sql: A file stores migration SQL for existing instance.
  • public/api/build-requests.php: Added support for updating request_status_description.
  • public/include/build-requests-fetcher.php: Exposed statusDescription to API.
  • public/v3/components/test-group-revision-table.js: Added UI for showing build request status detail.

(TestGroupRevisionTable.prototype._renderTable):
(TestGroupRevisionTable.prototype._buildDescriptionCell):
(TestGroupRevisionTable.cssTemplate):

  • public/v3/components/warning-icon.js: Extended warning icon to be able to customize information on hover.

(WarningIcon):
(WarningIcon.prototype.render):

  • public/v3/components/button-base.js: Added a instance method to set button title.

(ButtonBase.prototype.setButtonTitle):

  • public/v3/models/build-request.js: Added 'statusDescription' field.

(BuildRequest):
(BuildRequest.prototype.updateSingleton):
(BuildRequest.prototype.statusDescription):

  • server-tests/api-build-requests-tests.js: Fixed unit tests.
  • server-tests/resources/mock-data.js:

(MockData.set mockTestSyncConfigWithSingleBuilder): Added 'status_description' in buildbot mock data.
(MockData.sampleBuildData):

  • server-tests/resources/test-server.js:

(TestServer.prototype.initDatabase): Added code to execute 'migrate-database.sql' on initialization.

  • server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.
  • tools/js/buildbot-syncer.js: Added 'statusDescription' field to 'BuildbotBuildEntry'.

(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.statusDescription):

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):

  • unit-tests/buildbot-syncer-tests.js: Added test code for BuildbotBuildEntry.statusDescription.
3:42 PM Changeset in webkit [250464] by Chris Dumez
  • 13 edits
    2 adds in trunk

Pages using WebGLRenderingContext fail to enter the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=202318
<rdar://problem/55783612>

Reviewed by Tim Horton.

Source/WebCore:

Allow pages with a WebGLRenderingContext to enter the back/forward cache by updating the
implementation to use SuspendableTimers to fire JS events. This guarantees that no events
will be fired (and thus no JS will run) while in the page cache.

This was preventing some of the pages on weather.com and facebook.com from entering the
back/forward cache.

Test: fast/canvas/webgl/canvas-webgl-page-cache.html

  • dom/DocumentEventQueue.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension const):
(WebCore::WebGLRenderingContextBase::suspend):
(WebCore::WebGLRenderingContextBase::resume):
(WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification):
(WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):

  • html/canvas/WebGLRenderingContextBase.h:
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer):

  • page/DOMTimer.h:
  • page/SuspendableTimer.cpp:

(WebCore::SuspendableTimerBase::SuspendableTimerBase):
(WebCore::SuspendableTimerBase::hasPendingActivity const):
(WebCore::SuspendableTimerBase::stop):
(WebCore::SuspendableTimerBase::suspend):
(WebCore::SuspendableTimerBase::resume):
(WebCore::SuspendableTimerBase::canSuspendForDocumentSuspension const):
(WebCore::SuspendableTimerBase::didStop):
(WebCore::SuspendableTimerBase::cancel):
(WebCore::SuspendableTimerBase::startRepeating):
(WebCore::SuspendableTimerBase::startOneShot):
(WebCore::SuspendableTimerBase::repeatInterval const):
(WebCore::SuspendableTimerBase::augmentFireInterval):
(WebCore::SuspendableTimerBase::augmentRepeatInterval):
(WebCore::SuspendableTimer::activeDOMObjectName const):

  • page/SuspendableTimer.h:

Source/WebKitLegacy/win:

  • WebView.cpp:

(WindowCloseTimer::WindowCloseTimer):
(WindowCloseTimer::contextDestroyed):

  • WebView.h:

LayoutTests:

Add layout test coverage.

  • fast/canvas/webgl/canvas-webgl-page-cache-expected.txt: Added.
  • fast/canvas/webgl/canvas-webgl-page-cache.html: Added.
3:15 PM Changeset in webkit [250463] by Adrian Perez de Castro
  • 8 edits in trunk/Source

[GTK][WPE] Fixes for non-unified builds after r249714
https://bugs.webkit.org/show_bug.cgi?id=202304

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests needed.

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp: Add missing inclusion of Frame.h

to make the compiler stop complaining about Frame being used without being defined.

  • inspector/InspectorShaderProgram.h: Add missing inclusion of wtf/Variant.h, where

WTF::Monostate is defined; and prefixed the usage with its namespace.

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.h: Add missing inclusion of the pal/SessionID.h header.
  • NetworkProcess/NetworkResourceLoadMap.cpp: Add missing inclusion of the

NetworkResourceLoader.h header.

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:

(WKWebsiteDataStoreConfigurationCreate): Add missing namespace to usage of the
WebKit::IsPersistent::Yes value.

  • UIProcess/WebPageProxy.cpp: Add missing inclusion of the LegacyGlobalSettings.h header.
3:15 PM Changeset in webkit [250462] by commit-queue@webkit.org
  • 8 edits
    2 adds in trunk

Support accessibility for <figure> element on iOS.
https://bugs.webkit.org/show_bug.cgi?id=202272
<rdar://problem/54789907>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-09-27
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/ios-simulator/figure-element.html

Added a role description for the <figure> element.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::roleDescription const):

Tools:

Implemented titleUIElement and roleDescription properties for <figure> elements on iOS.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::roleDescription):

LayoutTests:

  • accessibility/ios-simulator/figure-element-expected.txt: Added.
  • accessibility/ios-simulator/figure-element.html: Added.
2:56 PM Changeset in webkit [250461] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Adopt new UIWebGeolocationPolicyDecider SPI to pass a view instead of a window
https://bugs.webkit.org/show_bug.cgi?id=202329
<rdar://problem/25963823>

Reviewed by Wenson Hsieh.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):

  • UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:

(WebKit::decidePolicyForGeolocationRequestFromOrigin):
Switch to newer SPI that takes a UIView instead of a UIWindow, so that
UIWebGeolocationPolicyDecider can find the correct presenting view controller.

2:52 PM Changeset in webkit [250460] by Alan Bujtas
  • 5 edits in trunk/Source

[iPadOS] Can’t use RalphLauren.com on iPad because hover menus don’t stay up
https://bugs.webkit.org/show_bug.cgi?id=202331
<rdar://problem/55629493>

Reviewed by Tim Horton.

Source/WebCore:

Unfortunately the top level menu items now are ARIA labelled as 'buttons' and that triggers the fast path on content observation.
This patch introduces a quirk on ralphLauren.com to ignore the ARIA labels when checking whether the target node should always click through.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const):

  • page/Quirks.h:

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):
(WebKit::nodeTriggersFastPath): Deleted.

2:05 PM Changeset in webkit [250459] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Crash under FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=202325
<rdar://problem/47856730>

Reviewed by Brent Fulgham.

As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font
on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.

No new tests. I have not been able to reproduce this issue.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::lastResortFallbackFont):

1:57 PM Changeset in webkit [250458] by achristensen@apple.com
  • 20 edits in trunk

Move shouldUseTestingNetworkSession from NetworkProcessCreationParameters to NetworkSessionCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=202327

Reviewed by Tim Horton.

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensureSession):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:

(WKWebsiteDataStoreConfigurationSetPerOriginStorageQuota):
(WKWebsiteDataStoreConfigurationSetNetworkCacheSpeculativeValidationEnabled):
(WKWebsiteDataStoreConfigurationGetTestingSessionEnabled):
(WKWebsiteDataStoreConfigurationSetTestingSessionEnabled):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::testingSessionEnabled const):
(WebKit::WebsiteDataStoreConfiguration::setTestingSessionEnabled):

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::websiteDataStore):

1:55 PM Changeset in webkit [250457] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

Move legacy custom protocol registration from process pool to NetworkProcessProxy
https://bugs.webkit.org/show_bug.cgi?id=202315

Reviewed by Tim Horton.

Legacy custom protocol registration is a global thing, which is why it's legacy and we're trying to get rid of it.
In the meantime, we don't want it to be in the set of things the NetworkProcess depends on the WebProcessPool for, which should be an empty set.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers):
(WebKit::WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol): Deleted.
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Deleted.

  • UIProcess/WebProcessPool.h:
1:49 PM Changeset in webkit [250456] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Layout Test http/tests/cache-storage/cache-records-persistency.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=202323

Reviewed by Tim Horton.

This reverts most of r250351.
It turns out NetworkProcessProxy::addSession has some side effects in the UIProcess that are useful for NetworkProcess resumption after crashes. Let's keep that.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

1:38 PM Changeset in webkit [250455] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r250397.

caused failure on iOS 13

Reverted changeset:

"REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-
credential-create-success-u2f.https.html is failing"
https://bugs.webkit.org/show_bug.cgi?id=201620
https://trac.webkit.org/changeset/250397

1:25 PM Changeset in webkit [250454] by Alan Coon
  • 4 edits in branches/safari-608-branch

Cherry-pick r250401. rdar://problem/55770702

ContextMenu on a link in an email no longer shows web preview
https://bugs.webkit.org/show_bug.cgi?id=201120
<rdar://54353617>

Reviewed by Wenson Hsieh.

Source/WebKit:

Only go down the image path if we are not also a link.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView continueContextMenuInteraction:]):

Tools:

Test context menus on a link that is also an image.

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm: (contextMenuWebViewDriver): (-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuWillPresentForElement:]): (-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]): (-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuDidEndForElement:]): (TEST):

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

1:25 PM Changeset in webkit [250453] by Alan Coon
  • 4 edits
    4 adds in branches/safari-608-branch

Cherry-pick r250392. rdar://problem/55770703

[iOS 13] Tapping on a non-editable text selection should toggle callout bar visibility instead of clearing selection
https://bugs.webkit.org/show_bug.cgi?id=202254
<rdar://problem/54410263>

Reviewed by Megan Gardner.

Source/WebKit:

In iOS 13, tapping a text selection should toggle callout bar visibility (i.e. "selection commands" in UIKit).
This currently does not work for non-editable text, since the synthetic click gesture simultaneously fires
alongside the text interaction assistant's non-editable tap gesture, which dispatches a click to the page which
then clears the selection.

To remedy this and match platform behavior, we avoid recognizing clicks that occur over the text selection, but
only in the case where the bounding rect of the text selection doesn't cover a large portion of the visible
content rect of the web view. This ensures that the user doesn't get stuck in a state where it's impossible to
dismiss a very large text selection (e.g. after selecting all the content on the page).

Tests: editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html

editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _shouldToggleSelectionCommandsAfterTapAt:]):

Check the last known selection rects (on _lastSelectionDrawingInfo) to see if the tapped point lies within at
least one of the selection rects.

(-[WKContentView gestureRecognizerShouldBegin:]):

LayoutTests:

  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text-expected.txt: Added.
  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html: Added.

Add a new layout test to verify that when tapping in a text selection that encompasses the entire page, we allow
the tap to dismiss the selection instead of toggling callout bar visibility.

  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text-expected.txt: Added.
  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html: Added.

Add another layout test to verify that when tapping inside a text selection, the callout bar is toggled, and
when tapping outside the selected text, the selection is dismissed.

  • resources/ui-helper.js: (window.UIHelper.async.waitForSelectionToAppear): (window.UIHelper.async.waitForSelectionToDisappear):

New helper methods to wait for selection rects to appear or disappear.

(window.UIHelper):

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

1:25 PM Changeset in webkit [250452] by Alan Coon
  • 2 edits in branches/safari-608-branch/Tools

Cherry-pick r250391. rdar://problem/55770728

TestWebKitAPI.WebKit.ReloadWithDifferingInitialScale is failing consistently
https://bugs.webkit.org/show_bug.cgi?id=202273

Reviewed by Aakash Jain.

The content width scaling limits added in r250361 prevent this test from scaling down the content width (2000px
wide) to fit the viewport (375px). To avoid this issue, change the content width from 2000px to 1500px, which is
still a very wide content width for a web page.

  • TestWebKitAPI/Tests/WebKitCocoa/ReloadWithDifferingInitialScale.mm:

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

1:25 PM Changeset in webkit [250451] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebKitLegacy/win

Cherry-pick r250374. rdar://problem/55770710

Unreviewed build fix for Windows ports.
https://bugs.webkit.org/show_bug.cgi?id=202125
<rdar://problem/14944104>

  • WebCoreSupport/WebEditorClient.h: Added missing subFrameScrollPositionChanged.

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

1:25 PM Changeset in webkit [250450] by Truitt Savell
  • 2 edits in trunk/LayoutTests

fast/images/async-image-multiple-clients-repaint.html
https://bugs.webkit.org/show_bug.cgi?id=202328

Unreviewed test gardening

  • platform/ios/TestExpectations:
1:25 PM Changeset in webkit [250449] by Alan Coon
  • 13 edits
    2 adds in branches/safari-608-branch

Cherry-pick r250365. rdar://problem/55770710

Update selections after scrolling for iframes and hide selections while iframes and overflow scrolls are scrolling.
https://bugs.webkit.org/show_bug.cgi?id=202125

Reviewed by Tim Horton.

Source/WebCore:

Test: editing/selection/ios/update-selection-after-iframe-scroll.html

When we end scrolling, make sure that iframes get a final update to ensure that the
selection is in the correct position. Pipe that to WebKit/UIProcess via
frame specific plath.

  • loader/EmptyClients.cpp:
  • page/EditorClient.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

Source/WebKit:

Add additional calls into UIKit differentiate between main frame scrolling and overflow/iframe scrolling.
Add piping for iframe specific scrolling.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _willStartScrollingOrZooming]): (-[WKContentView _didEndScrollingOrZooming]):
  • WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::subFrameScrollPositionChanged):
  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm: (WebKit::WebEditorClient::subFrameScrollPositionChanged):

Source/WebKitLegacy/mac:

Filling out unused functions needed for new fix.

  • WebCoreSupport/WebEditorClient.h:

LayoutTests:

Test that an iframe selection is updated after a scroll is completed.

  • editing/selection/ios/update-selection-after-iframe-scroll-expected.txt: Added.
  • editing/selection/ios/update-selection-after-iframe-scroll.html: Added.

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

1:25 PM Changeset in webkit [250448] by Alan Coon
  • 5 edits
    2 adds in branches/safari-608-branch

Cherry-pick r250361. rdar://problem/55770728

Page temporarily jumps to an excessively small viewport scale while loading usatoday.com
https://bugs.webkit.org/show_bug.cgi?id=202224
<rdar://problem/52906640>

Reviewed by Tim Horton.

Source/WebCore:

On some pages (e.g. usatoday.com), the content width of the page temporarily becomes very large during page
load. This causes a couple of viewport scaling behaviors (notably, the existing shrink-to-fit heuristic in
ViewportConfiguration::initialScaleFromSize, as well as the new iPad-specific content-aware shrink-to-fit
heuristic in WebPage::immediatelyShrinkToFitContent) to cause the page to shrink down excessively in an attempt
to fit all the content to the viewport. This causes a very ugly flash as the page appears zoomed out initially
during page load, before zooming back in.

To fix this, we add some sanity checks to these viewport scaling heuristics. In ViewportConfiguration's
initialScaleFromSize method, in the codepath where an initial scale is not specified, we always scale to fit the
contents of the page; instead, detect the case where the content width is enormous (with a threshold arbitrarily
chosen to be 1920) and fall back to the scaling to fit the viewport's width, if such a width has been explicitly
set. This ensures that we avoid excessive shrinking in the case where content is extremely wide, but also that
we do scale the viewport down to fit all the content in the case where the content isn't extremely wide (e.g. on
daringfireball.com).

See WebKit ChangeLog for more detail.

Test: fast/viewport/ios/shrink-to-fit-large-content-width.html

  • page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::initialScaleFromSize const):

Source/WebKit:

Tweaks the content-aware shrink-to-fit algorithm to bail in the case where the content width is extremely large,
such that it bails instead of attempting to fit the entire content of the page. See WebCore ChangeLog for more
details.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::immediatelyShrinkToFitContent):

LayoutTests:

Adds a new layout test to verify that when the content width of the page is excessively large and an explicit
viewport width is specified, we don't attempt to zoom out to fit the larger content width, and instead zoom to
fit the explicit viewport width.

  • fast/viewport/ios/shrink-to-fit-large-content-width-expected.txt: Added.
  • fast/viewport/ios/shrink-to-fit-large-content-width.html: Added.

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

1:25 PM Changeset in webkit [250447] by Alan Coon
  • 8 edits
    9 adds in branches/safari-608-branch

Cherry-pick r250315. rdar://problem/55770706

[iPadOs] The second click event is missing on double tap when dblclick handler is not present
https://bugs.webkit.org/show_bug.cgi?id=202006
<rdar://problem/51706828>

Reviewed by Wenson Hsieh.

Source/WebKit:

While double tapping,

  1. the first tap triggers a click event through the normal _singleTapIdentified/_singleTapRecognized codepath.
  2. and the second tap should trigger either a second single click event or a second single click followed by a dblclick event when dblclick handler is present. However the second click is dropped on the floor when the node under the cursor does not have a dblclick handler (see handleDoubleTapForDoubleClickAtPoint()) -so we end up sending one click event.

This patch fixes this case by sending the second tap through the normal single tap flow when the dblclick handler is not present.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm: (WebKit::InteractionInformationAtPosition::encode const): (WebKit::InteractionInformationAtPosition::decode):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView gestureRecognizerShouldBegin:]): (WebKit::WebPage::positionInformation): (WebKit::WebPage::requestPositionInformation):

LayoutTests:

  • fast/events/touch/ios/double-tap-for-two-clicks1-expected.txt: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks1.html: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks2-expected.txt: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks2.html: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks3-expected.txt: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks3.html: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks4-expected.txt: Added.
  • fast/events/touch/ios/double-tap-for-two-clicks4.html: Added.
  • fast/events/touch/ios/doubleclick.html: Added.
  • fast/events/touch/resources/doubleClickContent.html: Added.

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

1:25 PM Changeset in webkit [250446] by Alan Coon
  • 7 edits
    11 adds in branches/safari-608-branch

Cherry-pick r250300. rdar://problem/55770718

Mixed content blocking is bypassed for WebSockets in Workers (159726)
https://bugs.webkit.org/show_bug.cgi?id=159726
<rdar://problem/27326438>

Patch by Kate Cheney <Kate Cheney> on 2019-09-24
Reviewed by Brady Eidson.

Source/WebCore:

Tests: http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http.html

http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https.html
http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html
http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https.html

  • Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::connect):
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
  • loader/MixedContentChecker.cpp: (WebCore::MixedContentChecker::checkForMixedContentInFrameTree):
  • loader/MixedContentChecker.h: Patch to block insecure WebSocket URL connection attempts by Workers on secure pages. If the URL is ws, and any embedding iframe has protocol https, and the context is a Worker, the connection should be blocked.

I was unable to write a test case to hit the case where a document
does not have a frame and tries to communicate via a worker to
connect to a WebSocket because after removing the subframe from its
parent, the subframe is unable to perform a postMessage to a worker
even in the same script execution to tell the worker to connect
to a WebSocket.

LayoutTests:

Added 4 test cases and 2 html resources utilized by the tests.
The cases test the following:

  1. an https page with a worker trying to connect via ws: url --> fails.
  2. an https page embedded in an http page trying to connect via ws :url (through a worker) --> fails.
  3. an http page embedded in an https page with an http top frame trying to connect via an insecure ws url fails.
  4. an https page embedded in an http page embedded in an https page trying to connect to a ws :url via a worker --> fails.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-expected.txt: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http-expected.txt: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http.html: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https.html: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https-expected.txt: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https-expected.txt: Added.
  • http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https.html: Added.
  • http/tests/websocket/tests/hybi/resources/non-document-mixed-content-blocked-embedded-http.https.html: Added.
  • http/tests/websocket/tests/hybi/resources/non-document-mixed-content-blocked-embedding-https.js: Added. (handleConnect.self.postMessage): (handleConnect): (runTests.ws.onopen): (runTests.ws.onerror): (runTests):
  • http/tests/websocket/tests/hybi/resources/non-document-mixed-content-blocked.html: Added.
  • http/tests/websocket/tests/hybi/resources/non-document-mixed-content-blocked.js: Added. (handleConnect.self.postMessage): (handleConnect): (runTests.ws.onopen): (runTests.ws.onerror): (runTests):
  • http/tests/workers/service/resources/serviceworker-websocket-worker.js: (async.doTest): Updated previous test which was hitting the fix to use a wss url

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

1:25 PM Changeset in webkit [250445] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r250290. rdar://problem/55770704

AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
https://bugs.webkit.org/show_bug.cgi?id=202097
<rdar://problem/51548144>

Reviewed by Eric Carlson.

Instead of manipulating the audio unit in play/pause methods, it is more convenient to do so in audioSamplesAvailable.
play/pause methods only update boolean values that audioSamplesAvailable will read.
In particular, m_autoPlay and m_isPlaying are no longer modified in the audio thread.

Behavior was racy so difficult to reproduce.

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal): (WebCore::AudioTrackPrivateMediaStreamCocoa::pause): (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:

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

1:25 PM Changeset in webkit [250444] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r250197. rdar://problem/55612001

Fix an assertion failure introduced in r250186.

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Corrected the assertion.

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

1:25 PM Changeset in webkit [250443] by Alan Coon
  • 4 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r250186. rdar://problem/55612001

Safari 13 may launch leftover 32-bit plug-in process from Safari 12’s WebKit, which crashes
https://bugs.webkit.org/show_bug.cgi?id=202077
<rdar://problem/55547063>

Reviewed by Sam Weinig.

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginArchitecture): Removed support for i386 plug-ins.
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Assert that the requested process type is not Plugin32.
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Assert that the plug-in architecture is x86_64.

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

12:56 PM Changeset in webkit [250442] by Alan Coon
  • 18 edits
    1 copy
    2 adds in branches/safari-608-branch

Apply patch. rdar://problem/55608016

12:48 PM Changeset in webkit [250441] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

[iOS] Vimeo fails to AirPlay in desktop mode
https://bugs.webkit.org/show_bug.cgi?id=202322

Reviewed by Eric Carlson.

Add a Quirk which opts Vimeo out of the preload=auto restriction, and allows their
second video element containing a HLS stream to correctly start AirPlaying when the
system route changes.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::finishInitialization):

  • page/Quirks.cpp:

(WebCore::Quirks::needsPreloadAutoQuirk const):

  • page/Quirks.h:
12:30 PM Changeset in webkit [250440] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

OSR exit shouldn't bother updating get_by_id array profiles that have changed modes
https://bugs.webkit.org/show_bug.cgi?id=202324
<rdar://problem/52669110>

Reviewed by Yusuke Suzuki.

This is an optimization that avoids polluting the array profile.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::OSRExit::compileExit):

12:25 PM Changeset in webkit [250439] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Line::close should merge the text runs.
https://bugs.webkit.org/show_bug.cgi?id=202319
<rdar://problem/55785949>

Reviewed by Antti Koivisto.

Now Line::close returns the final Display::Run list.

  • layout/displaytree/DisplayRect.h:

(WebCore::Display::Rect::expandHorizontally):
(WebCore::Display::Rect::expandVertically):
(WebCore::Display::Rect::expand):

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::expandVertically):
(WebCore::Display::Run::expandHorizontally):

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::displayRun):

12:12 PM Changeset in webkit [250438] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build-fix: wrap the AssertionServicesSPI.h in an IOS_FAMILY check.

  • WebProcess/cocoa/WebProcessCocoa.mm:
12:09 PM Changeset in webkit [250437] by Chris Dumez
  • 5 edits in trunk

Allow pages served over HTTPS with Cache-Control: no-store header to enter the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=202314
<rdar://problem/55783482>

Reviewed by Alex Christensen.

Source/WebCore:

Allow pages served over HTTPS with Cache-Control: no-store header to enter the back/forward cache.
This was preventing all pages on Facebook.com to enter the back/forward cache.

No new tests, updated existing test.

  • history/PageCache.cpp:

(WebCore::canCacheFrame):

LayoutTests:

Update existing test to reflect behavior change.

  • http/tests/navigation/https-in-page-cache-expected.txt:
  • http/tests/navigation/resources/https-in-page-cache-1.php:
11:32 AM Changeset in webkit [250436] by commit-queue@webkit.org
  • 13 edits in trunk

Non-standard Error properties should not be enumerable
https://bugs.webkit.org/show_bug.cgi?id=198975

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-09-27
Reviewed by Ross Kirsling.

JSTests:

  • ChakraCore/test/Error/NativeErrors_v4.baseline-jsc: Adjust expectations.
  • microbenchmarks/let-for-in.js: Adjust test.
  • test262/expectations.yaml: Mark 6 test cases as passing.

Source/JavaScriptCore:

Define non-standard Error properties "line", "column", and "sourceURL" as non-enumerable to match other engines.

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::materializeErrorInfoIfNeeded):

LayoutTests:

  • inspector/debugger/resources/exception.js: Introduce stringifyError helper.
  • inspector/debugger/setPauseOnExceptions-all.html:
  • inspector/debugger/setPauseOnExceptions-none.html:
  • inspector/debugger/setPauseOnExceptions-uncaught.html:
  • js/exception-properties-expected.txt:
  • js/script-tests/exception-properties.js:
11:28 AM Changeset in webkit [250435] by Alan Coon
  • 1 edit in branches/safari-608-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

Unreviewed build fix. rdar://problem/55644650

10:54 AM Changeset in webkit [250434] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

Flaky Test: inspector/canvas/updateShader.html
https://bugs.webkit.org/show_bug.cgi?id=202186
<rdar://problem/55716053>

Reviewed by Joseph Pecoraro.

If the WebGLProgram outlives it's WebGLRenderingContext, the ScriptExecutionContext*
that was provided in the constructor won't be invalidated leading to the bad access crash.

Rather than pass the ScriptExecutionContext* directly, have WebGLProgram inherit from
ContextDestructionObserver so that it can propertly invalidate (and notify Web Inspector)
when the related context is about to be destroyed.

Test: inspector/canvas/updateShader.html

  • html/canvas/WebGLProgram.h:

(WebCore::WebGLProgram::scriptExecutionContext const): Deleted.

  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::WebGLProgram):
(WebCore::WebGLProgram::contextDestroyed): Added.

10:45 AM Changeset in webkit [250433] by Alan Coon
  • 1 edit in branches/safari-608-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

Unreviewed build fix. rdar://problem/55644650

10:33 AM Changeset in webkit [250432] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[iOS]: When inserting a photo and then inserting auto-corrected text, the photo is removed
https://bugs.webkit.org/show_bug.cgi?id=202294

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-27
Reviewed by Wenson Hsieh.

Source/WebKit:

WebPage::applyAutocorrectionInternal() calls wordRangeFromPosition() to
calculate the range of the word to be replaced with the auto-corrected
word. But if the text of the range does not match the original text,
applyAutocorrectionInternal() tries to correct the range by moving it
forward such that the length of the text range matches the length of the
original text.

Another case, which should correct the range also, is: the range does not
have a text but it is not collapsed. In this case, we should set the range
back to the selection range so non-text nodes is removed.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrectionInternal):

LayoutTests:

  • fast/events/ios/autocorrect-after-image-expected.txt: Added.
  • fast/events/ios/autocorrect-after-image.html: Added.
10:14 AM Changeset in webkit [250431] by wilander@apple.com
  • 6 edits
    2 adds in trunk

Storage Access API: document.hasStorageAccess() should return false by default
https://bugs.webkit.org/show_bug.cgi?id=202281
<rdar://problem/55718526>

Reviewed by Alex Christensen.

document.hasStorageAccess() should return false by default so that it only
returns true if the context has asked for and been granted storage access.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess):

LayoutTests:

  • http/tests/storageAccess/has-storage-access-false-by-default-expected.txt: Added.
  • http/tests/storageAccess/has-storage-access-false-by-default.html: Added.
  • platform/ios/TestExpectations:

The new test is marked as [ Pass ].

  • platform/mac-wk2/TestExpectations:

The new test is marked as [ Pass ].

9:56 AM Changeset in webkit [250430] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

[JSC] DFG recursive-tail-call optimization should not emit jump to call-frame with varargs
https://bugs.webkit.org/show_bug.cgi?id=202299
<rdar://problem/52669116>

Reviewed by Saam Barati.

JSTests:

  • stress/recursive-tail-call-optimization-should-not-jump-into-call-frame-with-varargs-simple.js: Added.

(foo):
(test):

  • stress/recursive-tail-call-optimization-should-not-jump-into-call-frame-with-varargs.js: Added.

(foo):
(C1.prototype.baz):
(C1):
(bar):
(noInline.bar.goo):
(C2.prototype.baz):
(C2):
(test):

Source/JavaScriptCore:

When converting recursive-tail-call to jump to the upper call frame, we picked call-frame which is spread by LoadVarargs.
This is wrong since this call-frame does not know the exact number of arguments. We are using InlineCallFrame::argumentCountIncludingThis,
but this is maximal argumentCountIncludingThis when InlineCallFrame is Varargs call-frame. Let's see the simple example.

'use strict';
var count = 0;
function foo() {

count--;
if (count === 0)

return 30;

return foo(42, 42); HERE

}

function test() {

count = 100;
return foo(...[42, 42]); THERE

}
noInline(test);

In the above case, currently, we convert HERE's foo call to the jump to the prologue of the foo function inlined by "test". But since foo is called
in a varargs form, "test" emits LoadVarargs, and it also emits SetArgumentMaybe for 1st and 2nd arguments. Since HERE's foo call is actually passing
two arguments, we emit a Phi node which Upsilon is from SetArgumentMaybe and 42 Constant. This is wrong since SetArgumentMaybe should not be used. Later,
SSA conversion phase emits Upsilon with SetArgumentMaybe, and since SetArgumentMaybe is simply removed in SSA conversion phase, it ends up emitting
Upsilon without a child.

We are currently only performing recursive-tail-call optimization when argument count matches. Given this condition, we should not pick varargs CallFrame
as a jump target.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):

  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

9:49 AM Changeset in webkit [250429] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][IFC] Replace Line::Run's logicalRect/textContext with Display::Run
https://bugs.webkit.org/show_bug.cgi?id=202313
<rdar://problem/55782430>

Reviewed by Antti Koivisto.

Display::Run is a container for logical rect and text context. Let's replace Line::Run's logical rect/text context with Display::Run.

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::logicalRect const):

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
(WebCore::Layout::InlineFormattingContext::InlineLayout::alignRuns const):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::addInlineRun):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::displayRun const):
(WebCore::Layout::Line::Run::logicalRect const):
(WebCore::Layout::Line::Run::adjustLogicalTop):
(WebCore::Layout::Line::Run::moveVertically):
(WebCore::Layout::Line::Run::moveHorizontally):
(WebCore::Layout::Line::Run::textContext const): Deleted.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputInlineRuns):

9:27 AM Changeset in webkit [250428] by jer.noble@apple.com
  • 9 edits in trunk/Source/WebKit

[iOS] Lock screen controls can fail to play web content
https://bugs.webkit.org/show_bug.cgi?id=202279

Reviewed by Chris Dumez.

When playback is paused from the lock screen via Now Playing controls, the WebProcess,
UIProcess, and Network Process will all be suspended. MediaRemote will take an assertion
and wake up the WebProcess when a remote control command to "play" is sent via the Now
Playing controls. However, if a synchronous message to the (suspended) Network or UIProcess
is issued before the notification that the process was unexpectedly unsuspended can be
issued (which will subsequently unsuspend the UIProcess and Network process), we can get
into a deadlocked state where the main thread is blocked on the sync message to a suspended
process.

To work around this problem, move all the processing from ProcessTaskStateObserver to a
WorkQueue / background thread. This requires making the ProcessTaskStateObserver thread-safe,
though its only current client is a Singleton (the WebProcess class), and so the risk of
thread safety issues is currently minimal. Regardless, access to the Client pointer must be
guarded by a Lock, and the Client itself must become ref-counted, so that the
ProcessTaskStateObserver can ref its Client (the WebProcess) during callback processing.

Unfortunately, sendWithAsyncReply() is not thread safe, nor is ProcessAssertion, so instead
just use send() and set a 5-second timeout before expiring the assertion, and just use
BKSProcessStateAssertion directly.

  • Shared/Cocoa/ProcessTaskStateObserver.h:

(WebKit::ProcessTaskStateObserver::Client::ref):
(WebKit::ProcessTaskStateObserver::Client::deref):
(WebKit::ProcessTaskStateObserver::setClient): Deleted.
(WebKit::ProcessTaskStateObserver::client): Deleted.

  • Shared/Cocoa/ProcessTaskStateObserver.mm:

(-[WKProcessTaskStateObserverDelegate process:taskStateDidChange:]):
(WebKit::ProcessTaskStateObserver::create):
(WebKit::ProcessTaskStateObserver::ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::~ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::invalidate):
(WebKit::ProcessTaskStateObserver::client):
(WebKit::ProcessTaskStateObserver::setTaskState):

  • WebProcess/WebProcess.cpp:

(WebKit::m_taskStateObserver):

  • WebProcess/WebProcess.h:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::processTaskStateDidChange):

9:25 AM Changeset in webkit [250427] by Truitt Savell
  • 5 edits in trunk/Source/WebCore

Unreviewed, rolling out r250415.

Broke iOS debug testing with 50 crashes and 850 API failure

Reverted changeset:

"ScrollingTreeScrollingNode: use LayerRepresentation for
scroll container, scrolled contents layers"
https://bugs.webkit.org/show_bug.cgi?id=202256
https://trac.webkit.org/changeset/250415

9:07 AM Changeset in webkit [250426] by achristensen@apple.com
  • 20 edits in trunk

Move service worker process termination delay disabling from process pool to website data store
https://bugs.webkit.org/show_bug.cgi?id=202308

Reviewed by Chris Dumez.

Source/WebCore:

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::SWServer):
(WebCore::SWServer::unregisterServiceWorkerClient):

  • workers/service/server/SWServer.h:

(WebCore::SWServer::disableServiceWorkerProcessTerminationDelay): Deleted.

Source/WebKit:

It's only there for a test, which still works quickly.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::swServerForSession):
(WebKit::NetworkProcess::addServiceWorkerSession):
(WebKit::NetworkProcess::disableServiceWorkerProcessTerminationDelay): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _disableServiceWorkerProcessTerminationDelay]): Deleted.

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration serviceWorkerProcessTerminationDelayEnabled]):
(-[_WKWebsiteDataStoreConfiguration setServiceWorkerProcessTerminationDelayEnabled:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::disableServiceWorkerProcessTerminationDelay): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::serviceWorkerProcessTerminationDelayEnabled const):
(WebKit::WebsiteDataStoreConfiguration::setServiceWorkerProcessTerminationDelayEnabled):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
8:56 AM Changeset in webkit [250425] by Chris Dumez
  • 3 edits
    2 adds in trunk

IDBRequest should not prevent a page from entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=202270
<rdar://problem/55744717>

Reviewed by Youenn Fablet.

Source/WebCore:

Update IDBRequest::canSuspendForDocumentSuspension() to return true instead of
false. IDBRequest can only fire 2 events (error / success) and for both its
merely enqueues the Event to the DocumentEventQueue. The DocumentEventQueue
uses a SuspendableTimer (which will be suspended while the document is in the
page cache) so there is no risk of firing the events (and thus running script)
while in the page cache.

Test: storage/indexeddb/IDBRequest-page-cache.html

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::canSuspendForDocumentSuspension const):

LayoutTests:

Add layout test coverage.

  • storage/indexeddb/IDBRequest-page-cache-expected.txt: Added.
  • storage/indexeddb/IDBRequest-page-cache.html: Added.
8:55 AM Changeset in webkit [250424] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit

Enable and disable ResourceLoadStatistics only by session
https://bugs.webkit.org/show_bug.cgi?id=202298

Reviewed by Chris Dumez.

This is needed to keep per-session things per-session and per-process-pool things per-process-pool.
This was a strange case where we would take the current session's value and apply it globally.
This has no change in behavior because it is globally enabled and disabled by API clients anyways.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setResourceLoadStatisticsEnabled):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):

8:31 AM Changeset in webkit [250423] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant Line::TextContext member variables
https://bugs.webkit.org/show_bug.cgi?id=202300
<rdar://problem/55769916>

Reviewed by Antti Koivisto.

This is in preparation for using Display::Run in Line::Run instead of Display::Rect + TextContext.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Run::isWhitespace const):
(WebCore::Layout::Line::Run::canBeExtended const):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::trailingTrimmableWidth const):
(WebCore::Layout::Line::appendTextContent):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::isVisuallyEmpty const):
(WebCore::Layout::Line::Run::setVisuallyIsEmpty):
(WebCore::Layout::Line::Run::setTextIsCollapsed): Deleted.

7:34 AM Changeset in webkit [250422] by achristensen@apple.com
  • 21 edits
    2 deletes in trunk

Remove unused WebProcessPool::setCanHandleHTTPSServerTrustEvaluation
https://bugs.webkit.org/show_bug.cgi?id=202285

Reviewed by Youenn Fablet.

Source/WebKit:

The SPI to set this was deprecated in r250377 with a replacement that was adopted in rdar://problem/55731135
I removed a layout test using the old SPI and replaced it with a more precise API test verifying the behavior of the new SPI
before and after the introduction of NSURLSession's _strictTrustEvaluate:queue:completionHandler:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setCanHandleHTTPSServerTrustEvaluation): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::canHandleHTTPSServerTrustEvaluation const): Deleted.

  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(canNSURLSessionTrustEvaluate): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetCanHandleHTTPSServerTrustEvaluation):

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setCanHandleHTTPSServerTrustEvaluation:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation): Deleted.

  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(-[ServerTrustDelegate webView:didFinishNavigation:]):
(-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]):
(-[ServerTrustDelegate waitForDidFinishNavigation]):
(-[ServerTrustDelegate waitForDidFailProvisionalNavigationError]):
(-[ServerTrustDelegate authenticationChallengeCount]):
(-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setCanHandleHTTPSServerTrustEvaluation): Deleted.
(WTR::TestRunner::canDoServerTrustEvaluationInNetworkProcess): Deleted.
(WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.

  • WebKitTestRunner/TestController.h:

(WTR::TestController::serverTrustEvaluationCallbackCallsCount const): Deleted.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.

LayoutTests:

  • http/tests/ssl/certificate-validation-expected.txt: Removed.
  • http/tests/ssl/certificate-validation.html: Removed.
7:05 AM Changeset in webkit [250421] by achristensen@apple.com
  • 17 edits in trunk

Remove unused APIProcessPoolConfiguration::diskCacheSpeculativeValidationEnabled
https://bugs.webkit.org/show_bug.cgi?id=202290

Reviewed by Carlos Garcia Campos.

Source/WebKit:

The SPI to set this was deprecated in r250377 with a replacement that was adopted in rdar://problem/55731135

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextSetDiskCacheSpeculativeValidationEnabled):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:

(WKWebsiteDataStoreConfigurationGetNetworkCacheSpeculativeValidationEnabled):
(WKWebsiteDataStoreConfigurationSetNetworkCacheSpeculativeValidationEnabled):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration diskCacheSpeculativeValidationEnabled]):
(-[_WKProcessPoolConfiguration setDiskCacheSpeculativeValidationEnabled:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm:

(TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::websiteDataStore):
(WTR::TestController::generatePageConfiguration):

3:48 AM Changeset in webkit [250420] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[Nicosia] Implement frame scrolling functionality
https://bugs.webkit.org/show_bug.cgi?id=202201

Reviewed by Carlos Garcia Campos.

Implement logic in the ScrollingTreeFrameScrollingNodeNicosia class,
largely following the Mac port's implementation but skipping areas we
don't support or can keep simple, like CSS scroll snap, frame pinning
and more complex wheel event handling through the platform-specific
delegate behavior.

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::adjustedScrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
3:36 AM Changeset in webkit [250419] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[Nicosia] ScrollingCoordinatorNicosia should handle wheel events coming from the main thread
https://bugs.webkit.org/show_bug.cgi?id=202275

Reviewed by Carlos Garcia Campos.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::handleWheelEvent):
Handle wheel events that get rerouted through the main thread,
dispatching them back to the scrolling thread so that they end up
performing the desired scroll if possible.

3:34 AM Changeset in webkit [250418] by zandobersek@gmail.com
  • 8 edits in trunk/Source

[CoordinatedGraphics] support bounds origin
https://bugs.webkit.org/show_bug.cgi?id=198998

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Add bounds-origin support to the CoordinatedGraphics stack. Currently we
take the short-cut implementation of just combining the bounds origin
and the position value and incorporating them into the layer transform
we calculate in TextureMapperLayer.

Additional boilerplate code is added, as required, to relay the
WebCore::GraphicsLayer change of bounds origin to the rendering system.

  • platform/graphics/nicosia/NicosiaPlatformLayer.h:

(Nicosia::CompositionLayer::flushState):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::setBoundsOrigin):

  • platform/graphics/texmap/TextureMapperLayer.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setBoundsOrigin):
(WebCore::CoordinatedGraphicsLayer::computePositionRelativeToBase):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Source/WebKit:

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):
Apply bounds origin value to the TextureMapperLayer object.

2:04 AM Changeset in webkit [250417] by youenn@apple.com
  • 6 edits in trunk

Make IsNSURLSessionWebSocketEnabled an experimental flag
https://bugs.webkit.org/show_bug.cgi?id=202135
<rdar://problem/55694721>

Reviewed by Geoff Garen.

Source/WebKit:

Add C API to switch off this feature in WTR.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetIsNSURLSessionWebSocketEnabled):
(WKPreferencesGetIsNSURLSessionWebSocketEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
Set preference to false by default.

12:13 AM Changeset in webkit [250416] by jiewen_tan@apple.com
  • 9 edits in trunk

SubFrameSOAuthorizationSession should ensure messages are posted in the right order to the parent frame
https://bugs.webkit.org/show_bug.cgi?id=202061
<rdar://problem/55485666>

Reviewed by Youenn Fablet.

Source/WebKit:

This patch ensures messages that signal the process of SOAuthorization interception are posted in
the right order to the parent frame. Before this patch, there are chances that SOAuthorizationDidCancel
could be posted to the parent before SOAuthorizationDidStart. There are few causes that lead to
this race condition:
1) SubFrameSOAuthorizationSession::beforeStart posts SOAuthorizationDidStart in the next runloop. So
extension could have the chance to invoke SubFrameSOAuthorizationSession::fallBackToWebPathInternal
before SOAuthorizationDidStart is posted.
2) Even if the order is right in the UI process, it is not guaranteed that Web process will strictly
follow the order as the loading process is async.

To fix the issue:
1) SubFrameSOAuthorizationSession::beforeStart now posts SOAuthorizationDidStart in the same runloop.
2) Observer is introduced in FrameLoadState such that SubFrameSOAuthorizationSession could know if
the loading is finished. With this new capacity, SubFrameSOAuthorizationSession can ensure it only
posts next message when the previous message has been posted.

Implementation wise, a deque to queue requests is provided to maintain order.
1) When new request is added to the deque, SubFrameSOAuthorizationSession will only load the request
if it is the only element in the deque. Otherwise, it does nothing.
2) When SubFrameSOAuthorizationSession receives didFinishLoad, it pops the head of the queue and loads
the next request in the queue if any.
The above design should guarantee all requests are loaded in sequence.

  • UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h:
  • UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm:

(WebKit::SubFrameSOAuthorizationSession::SubFrameSOAuthorizationSession):
(WebKit::SubFrameSOAuthorizationSession::~SubFrameSOAuthorizationSession):
(WebKit::SubFrameSOAuthorizationSession::fallBackToWebPathInternal):
(WebKit::SubFrameSOAuthorizationSession::completeInternal):
(WebKit::SubFrameSOAuthorizationSession::beforeStart):
(WebKit::SubFrameSOAuthorizationSession::didFinishLoad):
(WebKit::SubFrameSOAuthorizationSession::appendRequestToLoad):
(WebKit::SubFrameSOAuthorizationSession::loadRequestToFrame):
(WebKit::SubFrameSOAuthorizationSession::loadDataToFrame): Deleted.
(WebKit::SubFrameSOAuthorizationSession::postDidCancelMessageToParent): Deleted.

  • UIProcess/FrameLoadState.cpp:

(WebKit::FrameLoadState::addObserver):
(WebKit::FrameLoadState::removeObserver):
(WebKit::FrameLoadState::didFinishLoad):

  • UIProcess/FrameLoadState.h:

Tools:

Adds tests that check the order of messages posted by SubFrameSOAuthorizationSession.

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(-[TestSOAuthorizationScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(resetState):
(TestWebKitAPI::TEST):

Sep 26, 2019:

11:19 PM Changeset in webkit [250415] by zandobersek@gmail.com
  • 5 edits in trunk/Source/WebCore

ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
https://bugs.webkit.org/show_bug.cgi?id=202256

Reviewed by Simon Fraser.

Make the scroll container and scrolled contents layer holders
platform-independent by using the LayerRepresentation as the underlying
type for the two member variables in ScrollingTreeScrollingNode.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

11:17 PM Changeset in webkit [250414] by Chris Dumez
  • 14 edits
    2 adds in trunk

Pages frequently fails to enter the back/forward cache due to pending loads
https://bugs.webkit.org/show_bug.cgi?id=202289
<rdar://problem/55758506>

Reviewed by Geoffrey Garen.

Source/WebCore:

Allow pages to enter the back / forward cache, even if they have pending loads.
Note that these pending loads get cancelled. Also note that we won't enter page
cache unless the 'load' event has been fired in the main frame, since a
HistoryItem would not get created otherwise. This was causing frequent transient
failures to enter the back / forward cache while browsing (e.g. on weather.com).

Test: http/tests/navigation/page-cache-pending-load.html

  • history/PageCache.cpp:

(WebCore::canCacheFrame):

  • loader/CrossOriginPreflightChecker.cpp:
  • loader/CrossOriginPreflightChecker.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::setMainDocumentError):
(WebCore::DocumentLoader::stopLoading):

  • loader/DocumentLoader.h:
  • loader/DocumentThreadableLoader.cpp:
  • loader/DocumentThreadableLoader.h:
  • loader/cache/CachedResource.cpp:
  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceClient.h:

(WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::mainFrameHasNotFinishedLoadingKey):

  • page/DiagnosticLoggingKeys.h:

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/page-cache-pending-load-expected.txt: Added.
  • http/tests/navigation/page-cache-pending-load.html: Added.
10:13 PM Changeset in webkit [250413] by commit-queue@webkit.org
  • 68 edits
    1 copy
    3 moves
    1 delete in trunk

Resource Load Statistics: Downgrade all third-party referrer headers
https://bugs.webkit.org/show_bug.cgi?id=201353
<rdar://problem/54895650>
Source/WebKit:

Majority of this patch was written by John Wilander <wilander@apple.com>.

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

When tracking protections are enabled, we should downgrade all third-party
referrers to their origins. Note that this downgrade will be specific to
Cocoa so other ports will have to adopt as they see fit.

Cocoa already does this downgrade in ephemeral sessions (shipping).

The majority of these changes are test infrastructure. The functional
change is in WebKit::NetworkDataTaskCocoa and WebKit::NetworkSession.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setShouldDowngradeReferrerForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::isResourceLoadStatisticsEnabled const):
(WebKit::NetworkSession::setShouldDowngradeReferrerForTesting):
(WebKit::NetworkSession::shouldDowngradeReferrer const):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::isThirdPartyRequest const):
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::isThirdPartyRequest): Deleted.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsShouldDowngradeReferrerForTesting):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldDowngradeReferrerForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Majority of this patch was written by John Wilander <wilander@apple.com>.

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

The changes to the TestRunner facilitates an opt-out for test cases
that either test the referrer mechanism explicitly or tests that
rely on the full referrer to be sent.

The new boolean variable and early return in
TestRunner::setStatisticsShouldDowngradeReferrer() prevent the same
event from trying to set multiple TestRunner callbacks.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsShouldDowngradeReferrer):
(WTR::TestRunner::statisticsCallDidSetShouldDowngradeReferrerCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsShouldDowngradeReferrer):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetShouldDowngradeReferrer):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

Majority of this patch was written by John Wilander <wilander@apple.com>

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

The changes in the two http/tests/resourceLoadStatistics/strip-referrer-to-origin*
tests and the http/tests/navigation/ping-attribute/* tests are for the functional
change. The other changes are to make use of the new
testRunner.setStatisticsShouldDowngradeReferrer() to maintain earlier functionality.

TestRunner::setStatisticsShouldDowngradeReferrer() function is not
supported for mac-wk1, win or wincairo.

  • http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
  • http/tests/navigation/ping-attribute/anchor-cross-origin.html:
  • http/tests/navigation/ping-attribute/area-cross-origin.html:
  • http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/no-referrer-when-downgrade/same-origin.html:
  • http/tests/referrer-policy-script/no-referrer/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/no-referrer/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/no-referrer/same-origin.html:
  • http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-script/origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/origin/same-origin.html:
  • http/tests/referrer-policy-script/same-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/same-origin/same-origin.html:
  • http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/strict-origin-when-cross-origin/same-origin.html:
  • http/tests/referrer-policy-script/strict-origin/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/strict-origin/same-origin.html:
  • http/tests/referrer-policy-script/unsafe-url/cross-origin-http-http.html:
  • http/tests/referrer-policy-script/unsafe-url/cross-origin-http.https.html:
  • http/tests/referrer-policy-script/unsafe-url/same-origin.html:
  • http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html:
  • http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html:
  • http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html:
  • http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html:
  • http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html: Removed.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-redirects-expected.txt: Renamed from LayoutTests/http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-expected.txt.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-redirects.html: Copied from LayoutTests/http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-requests-expected.txt: Renamed from LayoutTests/http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-expected.txt.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-requests.html: Renamed from LayoutTests/http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html.
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.php:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php:
  • http/tests/security/referrer-policy-header.html:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
  • platform/wk2/TestExpectations:
  • resources/testharnessreport.js:
  • resources/js-test.js:
8:43 PM Changeset in webkit [250412] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Line::Run should have a reference to the associated InlineItem
https://bugs.webkit.org/show_bug.cgi?id=202288
<rdar://problem/55758112>

Reviewed by Antti Koivisto.

It makes it clearer where the type and the layout box come from.

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Run::Run):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::layoutBox const):
(WebCore::Layout::Line::Run::textContext const):
(WebCore::Layout::Line::Run::isText const):
(WebCore::Layout::Line::Run::isBox const):
(WebCore::Layout::Line::Run::isLineBreak const):
(WebCore::Layout::Line::Run::isContainerStart const):
(WebCore::Layout::Line::Run::isContainerEnd const):
(WebCore::Layout::Line::Run::type const): Deleted.

8:23 PM Changeset in webkit [250411] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant Line::Content
https://bugs.webkit.org/show_bug.cgi?id=202284
<rdar://problem/55757187>

Reviewed by Antti Koivisto.

Line::Content is really just a list or runs at this point.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::Content::Run::Run): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::layoutBox const):
(WebCore::Layout::Line::Run::logicalRect const):
(WebCore::Layout::Line::Run::textContext const):
(WebCore::Layout::Line::Run::type const):
(WebCore::Layout::Line::Run::isText const):
(WebCore::Layout::Line::Run::isBox const):
(WebCore::Layout::Line::Run::isLineBreak const):
(WebCore::Layout::Line::Run::isContainerStart const):
(WebCore::Layout::Line::Run::isContainerEnd const):
(WebCore::Layout::Line::Run::adjustLogicalTop):
(WebCore::Layout::Line::Run::moveVertically):
(WebCore::Layout::Line::Run::moveHorizontally):
(WebCore::Layout::Line::Run::setTextIsCollapsed):
(WebCore::Layout::Line::Content::Run::layoutBox const): Deleted.
(WebCore::Layout::Line::Content::Run::logicalRect const): Deleted.
(WebCore::Layout::Line::Content::Run::textContext const): Deleted.
(WebCore::Layout::Line::Content::Run::type const): Deleted.
(WebCore::Layout::Line::Content::Run::isText const): Deleted.
(WebCore::Layout::Line::Content::Run::isBox const): Deleted.
(WebCore::Layout::Line::Content::Run::isLineBreak const): Deleted.
(WebCore::Layout::Line::Content::Run::isContainerStart const): Deleted.
(WebCore::Layout::Line::Content::Run::isContainerEnd const): Deleted.
(WebCore::Layout::Line::Content::Run::adjustLogicalTop): Deleted.
(WebCore::Layout::Line::Content::Run::moveVertically): Deleted.
(WebCore::Layout::Line::Content::Run::moveHorizontally): Deleted.
(WebCore::Layout::Line::Content::Run::setTextIsCollapsed): Deleted.
(WebCore::Layout::Line::Content::runs const): Deleted.
(WebCore::Layout::Line::Content::runs): Deleted.

8:00 PM Changeset in webkit [250410] by eric.carlson@apple.com
  • 3 edits
    2 adds in trunk

REGRESSION (iOS 13): Trying to record just audio using HTML Media Capture crashes Safari
https://bugs.webkit.org/show_bug.cgi?id=202039
<rdar://problem/55566628>

Reviewed by Jer Noble.

Source/WebKit:

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _mediaTypesForPickerSourceType:]): UIImagePickerController doesn't
support audio-only recording, so show the video recorder for "audio/*".

LayoutTests:

  • fast/forms/ios/file-upload-panel-capture-expected.txt: Added.
  • fast/forms/ios/file-upload-panel-capture.html: Added.
7:40 PM Changeset in webkit [250409] by Alan Coon
  • 7 edits in tags/Safari-609.1.5.1/Source

Versioning.

7:38 PM Changeset in webkit [250408] by Alan Coon
  • 1 copy in tags/Safari-609.1.5.1

New tag.

7:25 PM Changeset in webkit [250407] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Include LocalResourceOverrides in the Open Resource dialog
https://bugs.webkit.org/show_bug.cgi?id=202023

Reviewed by Devin Rousso.

  • UserInterface/Views/OpenResourceDialog.js:

(WI.OpenResourceDialog.prototype._addScriptsForTarget):
Also walk the extraScriptCollection. Some Worker resource loads never
fully become resources.

(WI.OpenResourceDialog.prototype.didPresentDialog):
(WI.OpenResourceDialog.prototype._addLocalResourceOverrides):
Include local resource override resources.

(WI.OpenResourceDialog.prototype._populateResourceTreeOutline):

  • Localizations/en.lproj/localizedStrings.js:

Include a subtitle for local resource overrides.

  • UserInterface/Views/OpenResourceDialog.css:

(.open-resource-dialog .tree-outline.large .item .titles .subtitle):
Improved subtitle styling.

6:54 PM Changeset in webkit [250406] by Alan Coon
  • 2 edits in tags/Safari-609.1.5/Source/JavaScriptCore

Cherry-pick r250383. rdar://problem/55673084

We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT.
https://bugs.webkit.org/show_bug.cgi?id=202257

Reviewed by Saam Barati.

Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks
that region is reserved, and as such, can cause Gigacage allocation to fail. We
work around this by initializing the Gigacage first.

Note: when called, setJITEnabled() is always called extra early in the process
bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we
will naturally initialize the Gigacage before we allocate the JIT region.
Hence, this workaround is merely ensuring the same behavior of allocation ordering.

This patch only applies to iOS.

  • jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::setJITEnabled):

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

5:59 PM Changeset in webkit [250405] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Add some logging to help diagnose blank or stuck WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=202297
<rdar://problem/55763610>

Reviewed by Wenson Hsieh.

Our current logging is insufficient to rule out some of the potential
causes of stuck/blank WKWebViews in <rdar://problem/53399054>. Add
some new logging, and improve some existing logging, to aid in diagnosis.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
Rename _delayUpdateVisibleContentRects to be more specific that it
was due to us being underneath a UIScrollView delegate callback.

(-[WKWebView _processWillSwapOrDidExit]):
(-[WKWebView _didCommitLayerTree:]):
Add a log when we receive an incoming commit while visible content rect
updates are being deferred. Also, include the current transaction ID
and the transaction ID that _needsResetViewState... is waiting for, to
help rule out a class of potential problems.

Add a log when we receive an incoming commit more than 5 seconds after
a visible content rect update.

(-[WKWebView _updateVisibleContentRects]):
Keep track of when we defer visual content rect updates for any reason,
and log the first time we do an update after deferring them. This will make
it MUCH easier at-a-glance to tell if one of the "bailing" messages
represents a long-term state (a problem), or is expected.

Keep track of how long it's been since we sent a visible content rect update
and didn't get a commit back from the Web Content process; if it's been
more than 5 seconds, start logging.

(-[WKWebView _cancelAnimatedResize]):
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _resizeWhileHidingContentWithUpdates:]):
Turn animated resize logging into release logging. It is a common culprit
for many kinds of bugs, while also not being high volume, so this is well worth it.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::freezeLayerTree):
(WebKit::WebPage::unfreezeLayerTree):
Show the current value of m_layerTreeFreezeReasons in addition to the old value and delta,
so you don't have to manually compute the current value when reading logs.

4:03 PM Changeset in webkit [250404] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Move Line::Content::m_lineBox to Line.
https://bugs.webkit.org/show_bug.cgi?id=202280
<rdar://problem/55755798>

Reviewed by Antti Koivisto.

This is in preparation for Line producing Display::Runs instead of Line::Runs.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::LineLayout::close):
(WebCore::Layout::LineLayout::placeInlineItem):
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
(WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Content::runs const):
(WebCore::Layout::Line::availableWidth const):
(WebCore::Layout::Line::lineBox const):
(WebCore::Layout::Line::logicalTop const):
(WebCore::Layout::Line::logicalBottom const):
(WebCore::Layout::Line::logicalLeft const):
(WebCore::Layout::Line::logicalHeight const):
(WebCore::Layout::Line::contentLogicalWidth const):
(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::baselineOffset const):
(WebCore::Layout::Line::Content::lineBox const): Deleted.
(WebCore::Layout::Line::Content::lineBox): Deleted.
(WebCore::Layout::Line::Content::setLineBox): Deleted.

3:41 PM Changeset in webkit [250403] by dino@apple.com
  • 2 edits in trunk/Tools

Build fix.

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): Deleted.
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuWillPresentForElement:]): Deleted.
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]): Deleted.
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuDidEndForElement:]): Deleted.

3:19 PM Changeset in webkit [250402] by russell_e@apple.com
  • 2 edits in trunk/LayoutTests

[ iOS ] Layout Test scrollingcoordinator/ios/fixed-scrolling-with-keyboard.html is a Flaky Failure
https://bugs.webkit.org/show_bug.cgi?id=202283

Unreviewed Test Gardening.

  • platform/ios/TestExpectations: Marked

scrollingcoordinator/ios/fixed-scrolling-with-keyboard.html as flaky

3:19 PM Changeset in webkit [250401] by dino@apple.com
  • 4 edits in trunk

ContextMenu on a link in an email no longer shows web preview
https://bugs.webkit.org/show_bug.cgi?id=201120
<rdar://54353617>

Reviewed by Wenson Hsieh.

Source/WebKit:

Only go down the image path if we are not also a link.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView continueContextMenuInteraction:]):

Tools:

Test context menus on a link that is also an image.

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(contextMenuWebViewDriver):
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuWillPresentForElement:]):
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]):
(-[TestContextMenuImageWithoutConfigurationUIDelegate webView:contextMenuDidEndForElement:]):
(TEST):

2:54 PM Changeset in webkit [250400] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

run-safari --ios-simulator is no longer working with Xcode 11
https://bugs.webkit.org/show_bug.cgi?id=199852

Path of MobileSafari.app has changed in Xcode 11. This patch updates
the run-safari script to use the new path. This removes support for
running Safari on iOS < 13, see discussions on bug 177595.

Patch by Frederic Wang <fwang@igalia.com> on 2019-09-26
Reviewed by Jonathan Bedard.

  • Scripts/webkitdirs.pm:

(iosSimulatorApplicationsPath):

2:51 PM Changeset in webkit [250399] by zhifei_fang@apple.com
  • 4 edits
    2 adds in trunk/Tools

[results.webkit.org] Timeline support Image inner label
https://bugs.webkit.org/show_bug.cgi?id=202180

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/js/expectations.js:
  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.lengend>.item .dot img): support img symbol for lengend and dot

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(Timeline.CanvasSeriesComponent): Support user pass a Image object or a image url as inner label

2:37 PM Changeset in webkit [250398] by Chris Dumez
  • 149 edits in trunk

Stop using testRunner.overridePreference() to turn on Page Cache
https://bugs.webkit.org/show_bug.cgi?id=202274

Reviewed by Alex Christensen.

Source/WebKit:

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Tools:

  • DumpRenderTree/TestRunner.cpp:

(overridePreferenceCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::overridePreference):

LayoutTests:

Stop using testRunner.overridePreference() to turn on Page Cache, as this does not work
for WebKit2 when navigating cross-origin due to process swapping. Instead, update tests
to rely on <!-- webkit-test-runner [ enablePageCache=true ] -->.

  • animations/resume-after-page-cache.html:
  • compositing/accelerated-layers-after-back.html:
  • compositing/iframes/page-cache-layer-tree.html:
  • compositing/page-cache-back-crash.html:
  • compositing/show-composited-iframe-on-back-button.html:
  • editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
  • fast/css/fontloader-page-cache.html:
  • fast/dom/DeviceMotion/no-page-cache.html:
  • fast/dom/DeviceOrientation/event-after-navigation.html:
  • fast/dom/DeviceOrientation/no-page-cache.html:
  • fast/dom/Window/timer-resume-on-navigation-back.html:
  • fast/events/onunload-back-to-page-cache.html:
  • fast/events/pagehide-timeout-expected.txt:
  • fast/events/pagehide-timeout.html:
  • fast/events/pagehide-xhr-open-expected.txt:
  • fast/events/pagehide-xhr-open.html:
  • fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
  • fast/events/pageshow-pagehide-on-back-cached.html:
  • fast/events/suspend-timers-expected.txt:
  • fast/events/suspend-timers.html:
  • fast/forms/autocomplete-off-with-default-value-does-not-clear.html:
  • fast/frames/frame-crash-with-page-cache.html:
  • fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html:
  • fast/frames/page-hide-document-open.html:
  • fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html:
  • fast/frames/restoring-page-cache-should-not-run-scripts.html:
  • fast/harness/page-cache-crash-on-data-urls.html:
  • fast/harness/use-page-cache-expected.txt:
  • fast/harness/use-page-cache.html:
  • fast/history/back-from-page-with-focused-iframe.html:
  • fast/history/go-back-to-iframe-with-plugin.html:
  • fast/history/go-back-to-object-subframe.html:
  • fast/history/history-back-while-pdf-in-pagecache.html:
  • fast/history/page-cache-MessagePort-pending-message.html:
  • fast/history/page-cache-after-window-open.html:
  • fast/history/page-cache-back-navigation-crash.html:
  • fast/history/page-cache-clearing-expected.txt:
  • fast/history/page-cache-clearing.html:
  • fast/history/page-cache-closed-audiocontext.html:
  • fast/history/page-cache-createObjectURL-using-open-panel.html:
  • fast/history/page-cache-createObjectURL.html:
  • fast/history/page-cache-destroy-document.html:
  • fast/history/page-cache-element-state-focused.html:
  • fast/history/page-cache-execute-script-during-restore.html:
  • fast/history/page-cache-geolocation-active-oneshot.html:
  • fast/history/page-cache-geolocation-active-watcher.html:
  • fast/history/page-cache-geolocation.html:
  • fast/history/page-cache-indexed-closed-db.html:
  • fast/history/page-cache-indexed-opened-db.html:
  • fast/history/page-cache-media-source-closed-2.html:
  • fast/history/page-cache-media-source-closed.html:
  • fast/history/page-cache-media-source-opened.html:
  • fast/history/page-cache-navigate-during-restore.html:
  • fast/history/page-cache-notification-non-suspendable.html:
  • fast/history/page-cache-notification-suspendable.html:
  • fast/history/page-cache-removed-source-buffer.html:
  • fast/history/page-cache-running-audiocontext.html:
  • fast/history/page-cache-suspended-audiocontext.html:
  • fast/history/page-cache-webdatabase-no-transaction-db-expected.txt:
  • fast/history/page-cache-webdatabase-no-transaction-db.html:
  • fast/history/page-cache-webdatabase-pending-transaction.html:
  • fast/history/page-cache-with-opener.html:
  • fast/history/pagehide-remove-iframe-crash.html:
  • fast/history/resources/page-cache-window-with-iframe.html:
  • fast/history/resources/page-cache-window-with-opener.html:
  • fast/history/timed-refresh-in-cached-frame.html:
  • fast/images/animated-gif-restored-from-bfcache.html:
  • fast/loader/frames-with-unload-handlers-in-page-cache.html:
  • fast/loader/image-in-page-cache.html:
  • fast/loader/input-element-page-cache-crash.html:
  • fast/loader/navigate-with-new-target-after-back-forward-navigation.html:
  • fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html:
  • fast/loader/scroll-position-restored-on-back.html:
  • fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
  • fast/loader/stateobjects/popstate-fires-with-page-cache.html:
  • fast/loader/unschedule-relayout-after-unload.html:
  • fast/loader/window-properties-restored-from-page-cache.html:
  • fast/overflow/horizontal-scroll-after-back.html:
  • fast/scrolling/iframe-scrollable-after-back.html:
  • fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html:
  • fast/scrolling/ios/scroll-events-back-forward.html:
  • fast/scrolling/ios/touch-scroll-back-forward.html:
  • fast/scrolling/overflow-scrollable-after-back.html:
  • fast/scrolling/page-cache-back-overflow-scroll-restore.html:
  • fast/text-autosizing/ios/text-autosizing-after-back.html:
  • fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html:
  • fast/viewport/viewport-128.html:
  • http/tests/cache/display-image-unset-allows-cached-image-load.html:
  • http/tests/loading/main-resource-delegates-on-back-navigation-expected.txt:
  • http/tests/loading/main-resource-delegates-on-back-navigation.html:
  • http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html:
  • http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html:
  • http/tests/media/reload-after-dialog.html:
  • http/tests/navigation/go-back-to-error-page.html:
  • http/tests/navigation/https-in-page-cache.html:
  • http/tests/navigation/https-no-store-subframe-in-page-cache.html:
  • http/tests/navigation/image-load-in-pagehide-handler.html:
  • http/tests/navigation/page-cache-fragment-referrer.html:
  • http/tests/navigation/page-cache-iframe-no-current-historyItem.html:
  • http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html:
  • http/tests/navigation/page-cache-iframe-provisional-load.html:
  • http/tests/navigation/page-cache-pending-image-load-cache-partition.html:
  • http/tests/navigation/page-cache-pending-image-load.html:
  • http/tests/navigation/page-cache-pending-ping-load-cross-origin.html:
  • http/tests/navigation/page-cache-pending-ping-load-same-origin.html:
  • http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt:
  • http/tests/navigation/page-cache-xhr-in-pagehide.html:
  • http/tests/navigation/page-cache-xhr.html:
  • http/tests/navigation/resources/https-in-page-cache-1.php:
  • http/tests/navigation/resources/https-in-page-cache-2.php:
  • http/tests/navigation/resources/https-in-page-cache-3.html:
  • http/tests/navigation/resources/https-no-store-subframe-in-page-cache.html:
  • http/tests/navigation/subframe-pagehide-handler-starts-load.html:
  • http/tests/navigation/subframe-pagehide-handler-starts-load2.html:
  • http/tests/security/cross-origin-window-open-insert-script.html:
  • http/tests/security/cross-origin-window-open-javascript-url.html:
  • http/tests/security/navigate-when-restoring-cached-page.html:
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html:
  • http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html:
  • http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html:
  • http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html:
  • http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html:
  • http/wpt/beacon/support/sendBeacon-onpagehide-window.html:
  • legacy-animation-engine/animations/resume-after-page-cache.html:
  • loader/go-back-cached-main-resource.html:
  • loader/go-back-to-different-window-size.html:
  • media/crash-closing-page-with-media-as-plugin-fallback.html:
  • media/restore-from-page-cache.html:
  • platform/ios/ios/fixed/fixed-back-forward.html:
  • plugins/crash-restoring-plugin-page-from-page-cache.html:
  • plugins/frameset-with-plugin-frame.html:
  • plugins/netscape-plugin-page-cache-works.html:
  • swipe/basic-cached-back-swipe.html:
  • swipe/main-frame-pinning-requirement.html:
  • swipe/pushState-cached-back-swipe.html:
  • swipe/pushState-programmatic-back-while-swiping-crash.html:
  • swipe/pushstate-with-manual-scrollrestoration.html:
  • tiled-drawing/scrolling/null-parent-back-crash.html:
  • tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
2:36 PM Changeset in webkit [250397] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=201620

Unreviewed, roll back part of r249737 to confirm the cause.

  • Modules/webauthn/fido/U2fResponseConverter.cpp:

(fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):

1:09 PM Changeset in webkit [250396] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Use cursor: pointer for clickable elements
https://bugs.webkit.org/show_bug.cgi?id=202268

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/drawer.js: Give collapse button a pointer for cursor.
  • resultsdbpy/resultsdbpy/view/templates/search.html: Make 'X' to close test timeline a link-button.
1:05 PM Changeset in webkit [250395] by Truitt Savell
  • 7 edits in trunk

Unreviewed, rolling out r250385.

Broke imported/w3c/web-platform-tests/svg/animations/syncbase-
remove-add-while-running.html on all platforms. Which was
caught by EWS

Reverted changeset:

"Non-callable "handleEvent" property is silently ignored"
https://bugs.webkit.org/show_bug.cgi?id=200066
https://trac.webkit.org/changeset/250385

12:20 PM Changeset in webkit [250394] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

Crash under WebPage::beginPrinting when m_printContext becomes null due to synchronous layout
https://bugs.webkit.org/show_bug.cgi?id=202171
<rdar://problem/49731211>

Reviewed by Tim Horton.

Speculatively fix a null pointer dereference crash in WebPage::beginPrinting.

WebPage::beginPrinting creates a PrintContext, stores it in m_printContext, then calls
PrintContext::begin which forces a synchronous, paginated layout. If a post-layout task
executes script, that might result in the WebPage being closed and m_printContext being set
to nullptr.

Guard against this in WebPage::beginPrinting by adding a null check before calling
PrintContext::computePageRects.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::beginPrinting):

12:16 PM Changeset in webkit [250393] by commit-queue@webkit.org
  • 29 edits
    128 adds in trunk

Source/WebCore:
Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
https://bugs.webkit.org/show_bug.cgi?id=195420
<rdar://problem/54213551>

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html

http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
http/tests/resourceLoadStatistics/cookie-deletion-database.html
http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
http/tests/resourceLoadStatistics/enable-debug-mode-database.html
http/tests/resourceLoadStatistics/grandfathering-database.html
http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
http/tests/resourceLoadStatistics/prune-statistics-database.html
http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html

  • platform/sql/SQLiteDatabase.h:

Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database
to clear out the database.

Source/WebKit:
Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
https://bugs.webkit.org/show_bug.cgi?id=195420
<rdar://problem/54213551>

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

Changed all RELEASE_LOG_ERROR() calls involving domain strings to
RELEASE_LOG_ERROR_IF_ALLOWED() to prevent leaking information about
the domain strings only if sessionID.isAlwaysOnLoggingAllowed().

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
Added autovacuuming to the constructor to avoid manually calling
runVacuumCommand(). Changed constructor to take in sessionID so it
can use RELEASE_LOG_ERROR_IF_ALLOWED which requires the sessionID.

(WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
Added 2 statements that were not being prepared.

(WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const):
Corrected incorrect capitalization. Added check for nullopt in case
domainID is for a domain not in the database yet.

(WebKit::ResourceLoadStatisticsDatabaseStore::domainID const):
Changed return value to Optional<unsigned>. Some tests were directly
checking for subframes under top frame domains on domains that had
not been inserted yet. Now, domainID() won't crash but will return
a nullopt value which can be checked to know that the tests failed.

(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationships):
Added a check to assure domainID exists and updated the domainID
interactions to work as Optionals.

(WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
Moved the prepareStatements() call after the vacuum command in the case
where the database is empty. Otherwise called it before returning.

(WebKit::ResourceLoadStatisticsDatabaseStore::recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain):
Added a space to the SQL commands to correct the syntax.

(WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources):
Corrected a bug in the SQL command for querying
subframeUnderTopFrameDomain. The old query was asking for subresource.

(WebKit::ResourceLoadStatisticsDatabaseStore::reclassifyResources):
Spelling fix.

(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
Changed string concatenation to binding.

(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
The grandfathering.html test was failing because domains were being
"set" to grandfathered in the database before being inserted. This fix
ensures all domains before setting the grandfathering flag.

(WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation):
Multiple tests were failing because the query to insert the relationship
for the source domain relies on the target domain being in the
ObservedDomains table. This patch ensures all domains are added before
performing the query.

(WebKit::ResourceLoadStatisticsDatabaseStore::setUserInteraction):
Added a != SQLITE_OK check to make sure an error is logged if the
statement fails to bind.

(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
Changed string concatenation to binding.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction):
The SQL statement was being bound to a value and not being reset. This
patch resets the statement after binding. Additionally, the step()
function was being compared to SQLITE_DONE instead of SQLITE_ROW,
causing an error if the query returned results. The
ASSERT_NOT_REACHED() was causing null searches to crash instead of
returning false (i.e. if a domain is not in the database it should
return that it has no user interaction instead of crashing).

(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
Updated domainID call to act as an Optional.

(WebKit::ResourceLoadStatisticsDatabaseStore::predicateValueForDomain const):
The SQL statement was being bound to a value and not being reset. This
patch resets the statement after binding. SQLITE_DONE changed to
SQLITE_ROW to return non-empty query results. ASSERT_NOT_REACHED()
removed for the same reasons as above.

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain):
Fixed the release log statement which was logging the wrong function
name.

(WebKit::ResourceLoadStatisticsDatabaseStore::clearDatabaseContents):
Clears the database and rebuilds the tables on a clear command to
match the functionality in the Memory Store.

(WebKit::ResourceLoadStatisticsDatabaseStore::clear):
Call the clearDatabaseContents function to match the functionality
in the Memory Store.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const):
Updated domainID call to act as an Optional.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUnexpiredRecentUserInteraction):
Tests were failing because shouldRemoveAllWebsiteDataFor() was not
checking for expired user interaction. Matched functionality in the
Memory Store.

(WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllWebsiteDataFor):
Tests were failing because shouldRemoveAllWebsiteDataFor() was not
checking for expired user interaction. Matched functionality in the
Memory Store.

(WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToRemoveWebsiteDataFor):
Spelling fix.

(WebKit::ResourceLoadStatisticsDatabaseStore::pruneStatisticsIfNeeded):
Last seen should be sorted in ascending order because you want to
prune the older statistics first, which will have a lower lastSeen
field (secondsSinceEpoch() will be lower for older values).

(WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllWebsiteDataFor const): Deleted.
Deleted const specifier because the function needs to clear the
database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

Declared new functions. Updated spelling error (registerable -->
registrable). Updated constructor to take sessionID.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
ITP database flag now is stored in the NetworkProcess.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
Set the ITP database flag which is now stored in the Network Process.

(WebKit::NetworkProcess::setUseITPDatabase):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::isITPDatabaseEnabled const):

  • NetworkProcess/NetworkProcess.messages.in:

Passed the setUseITPDatabase flag to the initialization function
of the statistics store to enable the database backend.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):
SandboxExtension::consumePermanently was not getting called on the
WebKitTestRunner resourceLoadStatistics path. This was preventing
the database file from opening.

(WebKit::NetworkSession::recreateResourceLoadStatisticStore):
Destroy old WebResourceLoadStatisticsStore and create a new one using
the ITP database.

  • NetworkProcess/NetworkSession.h:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetUseITPDatabase):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setUseITPDatabase):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setUseITPDatabase):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Passed the setUseITPDatabase flag to the initialization function
of the statistics store to enable the database backend.

Tools:
Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
https://bugs.webkit.org/show_bug.cgi?id=195420
<rdar://problem/54213551>

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

Added in logic to send a message from the UIProcess to the Network
Process which will initalize the ITP Database backend to allow for
layout testing.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setUseITPDatabase):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setUseITPDatabase):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:
Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
https://bugs.webkit.org/show_bug.cgi?id=195420
<rdar://problem/54213551>

Added a flag to all ITP tests to enable the ITP database backend to
allow for testing functionality against the memory store. Tests were
not created for telemetry-generation.html,
log-cross-site-load-with-link-decoration.html, or
website-data-removal-for-site-navigated-to-with-link-decoration.html,
because these rely on functions not yet implemented in the ITP database.
Additionally, added flags to some memory store tests to ensure they
are using the memory store before calling functions not implemented in
the database store yet.

Patch by Kate Cheney <Kate Cheney> on 2019-09-26
Reviewed by Brent Fulgham.

  • http/tests/resourceLoadStatistics/add-blocking-to-redirect-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html: Added.
  • http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html: Added.
  • http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html: Added.
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html: Added.
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html: Added.
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html: Added.
  • http/tests/resourceLoadStatistics/cookie-deletion-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/cookie-deletion-database.html: Added.
  • http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html: Added.
  • http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html: Added.
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html: Added.
  • http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html: Added.
  • http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/enable-debug-mode-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/enable-debug-mode-database.html: Added.
  • http/tests/resourceLoadStatistics/grandfathering-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/grandfathering-database.html: Added.
  • http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/prune-statistics-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/prune-statistics-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html: Added.
  • http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html: Added.
  • http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/telemetry-generation.html:
  • http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html: Added.
  • http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html: Added.
  • http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html:
  • platform/ios/TestExpectations:

Added test expectations to skip database tests which do not work in
ios because of reliance on EventSender.keydown() which is not
supported on iOS and also those which use UIHelper.activateAt() which
does not produce a user gesture captured by ITP in iOS.

12:03 PM Changeset in webkit [250392] by Wenson Hsieh
  • 4 edits
    4 adds in trunk

[iOS 13] Tapping on a non-editable text selection should toggle callout bar visibility instead of clearing selection
https://bugs.webkit.org/show_bug.cgi?id=202254
<rdar://problem/54410263>

Reviewed by Megan Gardner.

Source/WebKit:

In iOS 13, tapping a text selection should toggle callout bar visibility (i.e. "selection commands" in UIKit).
This currently does not work for non-editable text, since the synthetic click gesture simultaneously fires
alongside the text interaction assistant's non-editable tap gesture, which dispatches a click to the page which
then clears the selection.

To remedy this and match platform behavior, we avoid recognizing clicks that occur over the text selection, but
only in the case where the bounding rect of the text selection doesn't cover a large portion of the visible
content rect of the web view. This ensures that the user doesn't get stuck in a state where it's impossible to
dismiss a very large text selection (e.g. after selecting all the content on the page).

Tests: editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html

editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shouldToggleSelectionCommandsAfterTapAt:]):

Check the last known selection rects (on _lastSelectionDrawingInfo) to see if the tapped point lies within at
least one of the selection rects.

(-[WKContentView gestureRecognizerShouldBegin:]):

LayoutTests:

  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text-expected.txt: Added.
  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html: Added.

Add a new layout test to verify that when tapping in a text selection that encompasses the entire page, we allow
the tap to dismiss the selection instead of toggling callout bar visibility.

  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text-expected.txt: Added.
  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html: Added.

Add another layout test to verify that when tapping inside a text selection, the callout bar is toggled, and
when tapping outside the selected text, the selection is dismissed.

  • resources/ui-helper.js:

(window.UIHelper.async.waitForSelectionToAppear):
(window.UIHelper.async.waitForSelectionToDisappear):

New helper methods to wait for selection rects to appear or disappear.

(window.UIHelper):

11:52 AM Changeset in webkit [250391] by Wenson Hsieh
  • 2 edits in trunk/Tools

TestWebKitAPI.WebKit.ReloadWithDifferingInitialScale is failing consistently
https://bugs.webkit.org/show_bug.cgi?id=202273

Reviewed by Aakash Jain.

The content width scaling limits added in r250361 prevent this test from scaling down the content width (2000px
wide) to fit the viewport (375px). To avoid this issue, change the content width from 2000px to 1500px, which is
still a very wide content width for a web page.

  • TestWebKitAPI/Tests/WebKitCocoa/ReloadWithDifferingInitialScale.mm:
11:25 AM Changeset in webkit [250390] by Antti Koivisto
  • 12 edits in trunk/Source/WebCore

Use LineLayoutTraversal for RenderText functions
https://bugs.webkit.org/show_bug.cgi?id=202266

Reviewed by Zalan Bujtas.

Replace a bunch of functions that have separate simple and complex line layout versions with
shared functions that use LineLayoutTraversal.

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteRects const):
(WebCore::RenderText::firstRunLocation const):
(WebCore::RenderText::linesBoundingBox const):

This is substantially simpler than RenderTextLineBoxes::boundingBox because it uses physical rects for all computations
instead of using logical rects and flipping to physical at the end.

(WebCore::RenderText::caretMinOffset const):
(WebCore::RenderText::caretMaxOffset const):
(WebCore::RenderText::countRenderedCharacterOffsetsUntil const):
(WebCore::containsOffset):
(WebCore::RenderText::containsRenderedCharacterOffset const):
(WebCore::RenderText::containsCaretOffset const):
(WebCore::RenderText::hasRenderedText const):

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::boundingBox const): Deleted.
(WebCore::RenderTextLineBoxes::firstRunLocation const): Deleted.
(WebCore::RenderTextLineBoxes::hasRenderedText const): Deleted.
(WebCore::RenderTextLineBoxes::caretMinOffset const): Deleted.
(WebCore::RenderTextLineBoxes::caretMaxOffset const): Deleted.
(WebCore::RenderTextLineBoxes::containsOffset const): Deleted.
(WebCore::RenderTextLineBoxes::countCharacterOffsetsUntil const): Deleted.
(WebCore::RenderTextLineBoxes::absoluteRects const): Deleted.

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):

  • rendering/SimpleLineLayout.h:

(WebCore::SimpleLineLayout::Run::Run):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::computeFirstRunLocation): Deleted.

  • rendering/SimpleLineLayoutFunctions.h:

(WebCore::SimpleLineLayout::findCaretMinimumOffset): Deleted.
(WebCore::SimpleLineLayout::findCaretMaximumOffset): Deleted.
(WebCore::SimpleLineLayout::containsOffset): Deleted.
(WebCore::SimpleLineLayout::isTextRendered): Deleted.

  • rendering/SimpleLineLayoutResolver.h:

(WebCore::SimpleLineLayout::RunResolver::Run::isLineBreak const):

  • rendering/line/LineLayoutTraversal.cpp:

(WebCore::LineLayoutTraversal::TextBox::isLineBreak const):
(WebCore::LineLayoutTraversal::firstTextBoxFor):
(WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
(WebCore::LineLayoutTraversal::textBoxesFor):
(WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor): Deleted.
(WebCore::LineLayoutTraversal::textBoxRangeFor): Deleted.

  • rendering/line/LineLayoutTraversal.h:

(WebCore::LineLayoutTraversal::hasTextBoxes):

11:17 AM Changeset in webkit [250389] by commit-queue@webkit.org
  • 21 edits in trunk

toExponential, toFixed, and toPrecision should allow arguments up to 100
https://bugs.webkit.org/show_bug.cgi?id=199163

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-09-26
Reviewed by Ross Kirsling.

JSTests:

  • ChakraCore/test/Number/toString_3.baseline-jsc:
  • ChakraCore/test/es5/exceptions3.baseline-jsc:
  • test262/expectations.yaml: Mark 6 test cases as passing.

Source/JavaScriptCore:

Previously, the spec gave fixed range of [0,20] for Number.prototype.{toExponential,toFixed} argument and
range of [1,21] for Number.prototype.toPrecision argument, but allowed implementations to permit a larger range.
Historically, only SpiderMonkey accepted a larger range, and other implementations threw a RangeError outside the range.
Later the spec was changed (see https://github.com/tc39/ecma262/pull/857) to specify the SpiderMonkey behavior.

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToExponential): Accept arguments between 0 and 100.
(JSC::numberProtoFuncToFixed): Accept arguments between 0 and 100.
(JSC::numberProtoFuncToPrecision): Accept arguments between 1 and 100.
(JSC::getIntegerArgumentInRange): Inline to improve readability.

Source/WTF:

Increase size of NumberToStringBuffer: <21 digits> + decimal point + <100 digits> + null char = 123.
Increase kMaxFixedDigitsAfterPoint to make Number.prototype.toFixed work with arguments up to 100.
Also update other constants to their correct values.

  • wtf/dtoa.h:
  • wtf/dtoa/double-conversion.cc:
  • wtf/dtoa/double-conversion.h:

Tools:

Adjust StringNumberFixedWidth test due to lowering kMaxFixedDigitsBeforePoint.

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

LayoutTests:

  • js/dom/number-tofixed-expected.txt:
  • js/dom/number-toprecision-expected.txt:
  • js/dom/script-tests/number-tofixed.js:
  • js/dom/script-tests/number-toprecision.js:
  • js/kde/Number-expected.txt:
  • js/kde/script-tests/Number.js:
  • js/number-toExponential-expected.txt:
  • js/script-tests/number-toExponential.js:
11:04 AM Changeset in webkit [250388] by Patrick Griffis
  • 2 edits in trunk/Source/WebKit

[GTK] Fix logic of dark theme detection
https://bugs.webkit.org/show_bug.cgi?id=202276

  • If GTK_THEME is set it has a higher priority to GtkSettings.
  • GTK_THEME may be a -dark theme or :dark variant, handle both.

Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::effectiveAppearanceIsDark const):

10:59 AM Changeset in webkit [250387] by russell_e@apple.com
  • 2 edits
    1 delete in trunk/LayoutTests

Layout Test platform/ios/ios/fast/text/opticalFont.html is Failing on iOS13.
https://bugs.webkit.org/show_bug.cgi?id=202278

Unreviewed Test Gardening.

  • platform/ios/ios/fast/text/opticalFont-expected.txt: Removed.
  • platform/ios/platform/ios/ios/fast/text/opticalFont-expected.txt:

Rebaselined for iOS 13.

10:49 AM Changeset in webkit [250386] by Truitt Savell
  • 5 edits in trunk/Source/WebCore

Unreviewed, rolling out r250381.

broke multiple webgpu/ tests on Mojave WK2

Reverted changeset:

"Flaky Test: inspector/canvas/updateShader.html"
https://bugs.webkit.org/show_bug.cgi?id=202186
https://trac.webkit.org/changeset/250381

10:43 AM Changeset in webkit [250385] by commit-queue@webkit.org
  • 7 edits in trunk

Non-callable "handleEvent" property is silently ignored
https://bugs.webkit.org/show_bug.cgi?id=200066

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-09-26
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt:
  • web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt:
  • web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt:
  • web-platform-tests/dom/events/EventListener-handleEvent-expected.txt:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html

imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent): Report TypeError if "handleEvent" is not callable.

8:44 AM Changeset in webkit [250384] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Decouple Display::Run and Display::Box initializations.
https://bugs.webkit.org/show_bug.cgi?id=202255
<rdar://problem/55731445>

Reviewed by Antti Koivisto.

This is in preparation for moving Display::Run initialization to Line class.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

8:07 AM Changeset in webkit [250383] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT.
https://bugs.webkit.org/show_bug.cgi?id=202257

Reviewed by Saam Barati.

Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks
that region is reserved, and as such, can cause Gigacage allocation to fail. We
work around this by initializing the Gigacage first.

Note: when called, setJITEnabled() is always called extra early in the process
bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we
will naturally initialize the Gigacage before we allocate the JIT region.
Hence, this workaround is merely ensuring the same behavior of allocation ordering.

This patch only applies to iOS.

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::setJITEnabled):

2:48 AM Changeset in webkit [250382] by jiewen_tan@apple.com
  • 2 edits in trunk/Tools

TestWebKitAPI.SOAuthorizationSubFrame.AuthorizationOptions is failing consistently on iOS API tests EWS
https://bugs.webkit.org/show_bug.cgi?id=202249

Reviewed by Alex Christensen.

Swizzles +[AKAuthorizationController isURLFromAppleOwnedDomain:] following other tests.

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(TestWebKitAPI::TEST):

1:33 AM Changeset in webkit [250381] by Devin Rousso
  • 5 edits in trunk/Source/WebCore

Flaky Test: inspector/canvas/updateShader.html
https://bugs.webkit.org/show_bug.cgi?id=202186
<rdar://problem/55716053>

Reviewed by Joseph Pecoraro.

If the WebGPUPipeline/WebGLProgram outlives it's WebGPUDevice/WebGLRenderingContext,
the ScriptExecutionContext* that was provided in the constructor won't be invalidated
leading to the bad access crash.

Rather than pass the ScriptExecutionContext* directly, have WebGPUPipeline/WebGLProgram
extend from ContextDestructionObserver so that it can propertly invalidate (and notify Web
Inspector) when the related context is about to be destroyed.

Test: inspector/canvas/updateShader.html

  • Modules/webgpu/WebGPUPipeline.h:

(WebCore::WebGPUPipeline::scriptExecutionContext const): Deleted.

  • Modules/webgpu/WebGPUPipeline.cpp:

(WebCore::WebGPUPipeline::WebGPUPipeline):
(WebCore::WebGPUPipeline::contextDestroyed): Added.

  • html/canvas/WebGLProgram.h:

(WebCore::WebGLProgram::scriptExecutionContext const): Deleted.

  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::WebGLProgram):
(WebCore::WebGLProgram::contextDestroyed): Added.

Note: See TracTimeline for information about the timeline view.