Changeset 250549 in webkit


Ignore:
Timestamp:
Sep 30, 2019, 11:17:53 PM (6 years ago)
Author:
achristensen@apple.com
Message:

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:]):

Location:
trunk/Source
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/PAL/ChangeLog

    r250522 r250549  
     12019-09-30  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unify more WebKitLegacy sources
     4        https://bugs.webkit.org/show_bug.cgi?id=202390
     5
     6        Reviewed by Tim Horton.
     7
     8        * pal/spi/mac/QuickLookMacSPI.h:
     9
    1102019-09-27  Keith Rollin  <krollin@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h

    r240211 r250549  
    2626#import <Quartz/Quartz.h>
    2727
     28#if USE(APPLE_INTERNAL_SDK)
     29
     30#import <Quartz/QuartzPrivate.h>
     31
     32#else
     33
    2834@protocol QLPreviewMenuItemDelegate <NSObject>
    2935@optional
     
    5258@property QLPreviewStyle previewStyle;
    5359@end
     60
     61#endif // USE(APPLE_INTERNAL_SDK)
  • trunk/Source/WebKitLegacy/ChangeLog

    r249750 r250549  
     12019-09-30  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unify more WebKitLegacy sources
     4        https://bugs.webkit.org/show_bug.cgi?id=202390
     5
     6        Reviewed by Tim Horton.
     7
     8        These files were causing problems with the CMake build, but only if not unified.
     9        So I unified them and sped up the build too, without changing any behavior.
     10
     11        * SourcesCocoa.txt:
     12        * UnifiedSources-output.xcfilelist:
     13        * WebKitLegacy.xcodeproj/project.pbxproj:
     14        * scripts/generate-unified-sources.sh:
     15
    1162019-09-10  Fujii Hironori  <Hironori.Fujii@sony.com>
    217
  • trunk/Source/WebKitLegacy/SourcesCocoa.txt

    r247570 r250549  
    156156mac/DOM/WebDOMOperations.mm
    157157
     158mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
     159
     160mac/Misc/WebSharingServicePickerController.mm
     161
     162mac/Plugins/WebBasePluginPackage.mm
     163mac/Plugins/WebPluginContainerCheck.mm
     164mac/Plugins/WebPluginController.mm
     165mac/Plugins/WebPluginDatabase.mm
     166
     167mac/History/WebBackForwardList.mm
     168
    158169mac/WebCoreSupport/WebApplicationCache.mm
    159170mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
     171mac/WebCoreSupport/WebFrameLoaderClient.mm
     172
     173mac/WebInspector/WebInspector.mm
     174
     175mac/WebView/WebClipView.mm
     176mac/WebView/WebDataSource.mm
     177mac/WebView/WebFrame.mm
     178mac/WebView/WebFrameView.mm
     179mac/WebView/WebFullScreenController.mm
     180mac/WebView/WebHTMLView.mm
     181mac/WebView/WebImmediateActionController.mm
     182mac/WebView/WebPDFRepresentation.mm
     183mac/WebView/WebPDFView.mm
     184mac/WebView/WebScriptDebugger.mm
     185mac/WebView/WebScriptDebugDelegate.mm
     186mac/WebView/WebScriptWorld.mm
     187mac/WebView/WebView.mm
  • trunk/Source/WebKitLegacy/UnifiedSources-output.xcfilelist

    r248051 r250549  
    1111$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource17-mm.mm
    1212$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource18-mm.mm
     13$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource19-mm.mm
    1314$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource2-mm.mm
    1415$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource2.cpp
     16$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource20-mm.mm
    1517$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource3-mm.mm
    1618$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource3.cpp
  • trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj

    r248498 r250549  
    115115                29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; };
    116116                2D25396618CE85C200270222 /* WebSharingServicePickerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D25396418CE85C200270222 /* WebSharingServicePickerController.h */; };
    117                 2D25396718CE85C200270222 /* WebSharingServicePickerController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D25396518CE85C200270222 /* WebSharingServicePickerController.mm */; };
    118117                2DD632C219E5D1F0002E9C7B /* WebSelectionServiceController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DD632C019E5D1F0002E9C7B /* WebSelectionServiceController.h */; };
    119118                2DD632C319E5D1F0002E9C7B /* WebSelectionServiceController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DD632C119E5D1F0002E9C7B /* WebSelectionServiceController.mm */; };
     
    190189                5C7E787522D95FE20006A230 /* UnifiedSource12-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7E786822D95FE20006A230 /* UnifiedSource12-mm.mm */; };
    191190                5C7E787622D95FE20006A230 /* UnifiedSource11-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7E786922D95FE20006A230 /* UnifiedSource11-mm.mm */; };
     191                5C97EF632342C534006020D4 /* UnifiedSource19-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */; };
     192                5C97EF642342C534006020D4 /* UnifiedSource20-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */; };
    192193                5C9A4E5322DE4627007DB353 /* DOMUIKitExtensions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93D436371D57ABEE00AB85EA /* DOMUIKitExtensions.mm */; };
    193194                5C9D925A22D7E8AD008E9266 /* Sources.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5C9D925822D7E8AD008E9266 /* Sources.txt */; };
     
    206207                5CE44F4A206D70EA003EFD01 /* PingHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE44F49206D70E9003EFD01 /* PingHandle.h */; };
    207208                5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BF8120C2A1D90008CE06D /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
    208                 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; };
    209209                5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.xib */; };
    210210                65488DA1084FBCCB00831AD0 /* WebNSDictionaryExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */; };
     
    225225                7C1FB3C21846E8E1001A03D8 /* WebAllowDenyPolicyListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1FB3C11846E8E1001A03D8 /* WebAllowDenyPolicyListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
    226226                7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    227                 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */; };
    228227                931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */; };
    229                 931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */; };
    230228                9321D5921A391DC3008052BE /* WebImmediateActionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 9321D5911A391DB8008052BE /* WebImmediateActionController.h */; };
    231                 9321D5941A391DF9008052BE /* WebImmediateActionController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9321D5931A391DF9008052BE /* WebImmediateActionController.mm */; };
    232229                934C11670D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 934C11660D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h */; };
    233230                934C4A910F01406C009372C0 /* WebNSObjectExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 934C4A900F01406C009372C0 /* WebNSObjectExtras.mm */; };
     
    327324                939810B50824BF01008DF038 /* WebAuthenticationPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9345D17B0365BF35008635CE /* WebAuthenticationPanel.xib */; };
    328325                939810B70824BF01008DF038 /* url_icon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5B67130023EDF8901C1A525 /* url_icon.tiff */; };
    329                 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3944607E020F50ED0ECA1767 /* WebBackForwardList.mm */; };
    330326                939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446080020F50ED0ECA1767 /* WebHistoryItem.mm */; };
    331327                939810BE0824BF01008DF038 /* WebURLsWithTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E0A76F02B8FEE401C1A525 /* WebURLsWithTitles.m */; };
     
    344340                939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93154EF203A41270008635CE /* WebPanelAuthenticationHandler.m */; };
    345341                939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */; };
    346                 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF47036652150000E506 /* WebBasePluginPackage.mm */; };
    347342                939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7171F0288493C018635CA /* WebNetscapePluginPackage.mm */; };
    348                 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8467275D0367158500CA2ACA /* WebPluginController.mm */; };
    349                 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F717210288493C018635CA /* WebPluginDatabase.mm */; };
    350343                939810DC0824BF01008DF038 /* WebPluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF4C036659440000E506 /* WebPluginPackage.mm */; };
    351344                939810DD0824BF01008DF038 /* npapi.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F717230288493C018635CA /* npapi.mm */; };
    352345                939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */; };
    353                 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.mm */; };
    354                 939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446071020F50ED0ECA1767 /* WebDataSource.mm */; };
    355                 939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.mm */; };
    356346                939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */; };
    357347                939810F10824BF01008DF038 /* WebDynamicScrollBarsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3944606C020F50ED0ECA1767 /* WebDynamicScrollBarsView.mm */; };
    358                 939810F20824BF01008DF038 /* WebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5143A370221DCCE01A80181 /* WebFrame.mm */; };
    359348                939810F30824BF01008DF038 /* WebHTMLRepresentation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */; };
    360                 939810F40824BF01008DF038 /* WebHTMLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9502B6D4D80ACA2ACA /* WebHTMLView.mm */; };
    361349                939810F80824BF01008DF038 /* WebPreferences.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5AEBB3D024A527601C1A526 /* WebPreferences.mm */; };
    362350                939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D81DAB303EB0B2D00A80166 /* WebFormDelegate.m */; };
    363351                939811030824BF01008DF038 /* WebKitErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = 83730F9803FB1E660004736E /* WebKitErrors.m */; };
    364                 939811060824BF01008DF038 /* WebFrameView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */; };
    365                 939811070824BF01008DF038 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B57A042834F700CA2D3A /* WebView.mm */; };
    366352                939811080824BF01008DF038 /* WebPolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */; };
    367353                9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */; };
     
    374360                9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE95BEE505FD0805006E1513 /* WebDefaultEditingDelegate.m */; };
    375361                9398111D0824BF01008DF038 /* WebArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8373435B0624EE0D00F3B289 /* WebArchive.mm */; };
    376                 9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E94C3506C0321200A9B09E /* WebPDFView.mm */; };
    377                 9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E94C6906C0347500A9B09E /* WebPDFRepresentation.mm */; };
    378                 939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65E1150407EFFEBF009B8BF7 /* WebPluginContainerCheck.mm */; };
    379362                93D4364D1D57ABEE00AB85EA /* DOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D434FB1D57ABEE00AB85EA /* DOM.h */; settings = {ATTRIBUTES = (Private, ); }; };
    380363                93D4364F1D57ABEE00AB85EA /* DOMAbstractView.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D434FD1D57ABEE00AB85EA /* DOMAbstractView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    675658                BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */; };
    676659                C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0167BF60D7F5DD00028696E /* WebScriptDebugger.h */; };
    677                 C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0167BF70D7F5DD00028696E /* WebScriptDebugger.mm */; };
    678660                C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B1F7E510AC8E3100C925D9 /* WebScriptWorld.h */; settings = {ATTRIBUTES = (Private, ); }; };
    679                 C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */; };
    680661                C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */; };
    681662                C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    690671                CD8BFCE815531224005AFB25 /* WebKitFullScreenListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8BFCE615531224005AFB25 /* WebKitFullScreenListener.h */; };
    691672                CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */; };
    692                 CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */; };
    693673                CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */; };
    694674                CEDA12DC152CBE6800D9E08D /* WebAlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */; };
     
    716696                        filePatterns = "*.h";
    717697                        fileType = pattern.proxy;
     698                        inputFiles = (
     699                        );
    718700                        isEditable = 1;
    719701                        outputFiles = (
     
    954936                5C7E786822D95FE20006A230 /* UnifiedSource12-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource12-mm.mm"; sourceTree = "<group>"; };
    955937                5C7E786922D95FE20006A230 /* UnifiedSource11-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource11-mm.mm"; sourceTree = "<group>"; };
     938                5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UnifiedSource19-mm.mm"; path = "UnifiedSource19-mm.mm"; sourceTree = "<group>"; };
     939                5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UnifiedSource20-mm.mm"; path = "UnifiedSource20-mm.mm"; sourceTree = "<group>"; };
    956940                5C9D925822D7E8AD008E9266 /* Sources.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Sources.txt; sourceTree = "<group>"; };
    957941                5C9D925922D7E8AD008E9266 /* SourcesCocoa.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourcesCocoa.txt; sourceTree = "<group>"; };
     
    19361920                                5C7E786422D95FE20006A230 /* UnifiedSource17-mm.mm */,
    19371921                                5C7E785E22D95FE10006A230 /* UnifiedSource18-mm.mm */,
     1922                                5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */,
     1923                                5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */,
    19381924                        );
    19391925                        path = "unified-sources";
     
    34593445                                5C7E787122D95FE20006A230 /* UnifiedSource17-mm.mm in Sources */,
    34603446                                5C7E786B22D95FE20006A230 /* UnifiedSource18-mm.mm in Sources */,
     3447                                5C97EF632342C534006020D4 /* UnifiedSource19-mm.mm in Sources */,
     3448                                5C97EF642342C534006020D4 /* UnifiedSource20-mm.mm in Sources */,
    34613449                                CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */,
    34623450                                9398111D0824BF01008DF038 /* WebArchive.mm in Sources */,
    34633451                                939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */,
    3464                                 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */,
    34653452                                1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */,
    3466                                 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */,
    34673453                                5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */,
    34683454                                14D825300AF955090004F057 /* WebChromeClient.mm in Sources */,
    34693455                                A10C1D651820300E0036883A /* WebChromeClientIOS.mm in Sources */,
    3470                                 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */,
    34713456                                065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */,
    34723457                                939810BF0824BF01008DF038 /* WebCoreStatistics.mm in Sources */,
     
    34773462                                512BDB531C471591006494DF /* WebDatabaseProvider.mm in Sources */,
    34783463                                A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */,
    3479                                 939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */,
    3480                                 939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */,
    34813464                                9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */,
    34823465                                A10C1D1918202F9C0036883A /* WebDefaultFormDelegate.m in Sources */,
     
    34983481                                A10C1D691820300E0036883A /* WebFixedPositionContent.mm in Sources */,
    34993482                                939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */,
    3500                                 939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
    35013483                                A10C1D6C1820300E0036883A /* WebFrameIOS.mm in Sources */,
    3502                                 931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
    35033484                                9391F276121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */,
    3504                                 939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
    35053485                                A10C1D7F1820303D0036883A /* WebFrameViewWAKCompatibility.m in Sources */,
    3506                                 CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */,
    35073486                                A10C1D6E1820300E0036883A /* WebGeolocation.mm in Sources */,
    35083487                                BC7F884C10C8775A00D6133D /* WebGeolocationClient.mm in Sources */,
     
    35143493                                1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */,
    35153494                                939810F30824BF01008DF038 /* WebHTMLRepresentation.mm in Sources */,
    3516                                 939810F40824BF01008DF038 /* WebHTMLView.mm in Sources */,
    35173495                                939810C10824BF01008DF038 /* WebIconDatabase.mm in Sources */,
    3518                                 9321D5941A391DF9008052BE /* WebImmediateActionController.mm in Sources */,
    35193496                                A560946714D8AD2600799A8A /* WebIndicateLayer.mm in Sources */,
    3520                                 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */,
    35213497                                06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */,
    35223498                                1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */,
     
    35683544                                1AB1F76F1D1B260B007C9BD1 /* WebPaymentCoordinatorClient.mm in Sources */,
    35693545                                37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */,
    3570                                 9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */,
    3571                                 9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */,
    35723546                                A10C1D8B1820305E0036883A /* WebPDFViewIOS.mm in Sources */,
    35733547                                A10C1D8E1820305E0036883A /* WebPDFViewPlaceholder.mm in Sources */,
    35743548                                A10C1D821820303D0036883A /* WebPlainWhiteView.mm in Sources */,
    35753549                                1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */,
    3576                                 939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */,
    3577                                 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */,
    3578                                 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */,
    35793550                                1A08FEE01D59376E008BA8CB /* WebPluginInfoProvider.mm in Sources */,
    35803551                                939810DC0824BF01008DF038 /* WebPluginPackage.mm in Sources */,
     
    35843555                                1A6A208D1886154600E50F5F /* WebProgressTrackerClient.mm in Sources */,
    35853556                                9398111A0824BF01008DF038 /* WebResource.mm in Sources */,
    3586                                 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,
    3587                                 C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */,
    3588                                 C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */,
    35893557                                A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */,
    35903558                                A10C1D751820300E0036883A /* WebSelectionRect.m in Sources */,
    35913559                                2DD632C319E5D1F0002E9C7B /* WebSelectionServiceController.mm in Sources */,
    3592                                 2D25396718CE85C200270222 /* WebSharingServicePickerController.mm in Sources */,
    35933560                                3AB02AF612C1319B00FBB694 /* WebStorageManager.mm in Sources */,
    35943561                                1A591D451A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp in Sources */,
     
    36053572                                C1D81128202CD80000EE74F9 /* WebVideoFullscreenController.mm in Sources */,
    36063573                                C1D8112B202CDCC400EE74F9 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
    3607                                 939811070824BF01008DF038 /* WebView.mm in Sources */,
    36083574                                BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */,
    36093575                                1430C12C1B2C5DF700DEA01D /* WebViewGroup.cpp in Sources */,
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r250365 r250549  
     12019-09-30  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unify more WebKitLegacy sources
     4        https://bugs.webkit.org/show_bug.cgi?id=202390
     5
     6        Reviewed by Tim Horton.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.mm:
     9        (dataSource):
     10        (WebFrameLoaderClient::pageID const):
     11        (WebFrameLoaderClient::frameID const):
     12        (WebFrameLoaderClient::makeRepresentation):
     13        (WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
     14        (WebFrameLoaderClient::convertMainResourceLoadToDownload):
     15        (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
     16        (WebFrameLoaderClient::assignIdentifierToInitialRequest):
     17        (WebFrameLoaderClient::dispatchWillSendRequest):
     18        (WebFrameLoaderClient::shouldUseCredentialStorage):
     19        (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
     20        (WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
     21        (WebFrameLoaderClient::connectionProperties):
     22        (WebFrameLoaderClient::dispatchDidReceiveResponse):
     23        (WebFrameLoaderClient::willCacheResponse const):
     24        (WebFrameLoaderClient::dispatchDidReceiveContentLength):
     25        (WebFrameLoaderClient::dispatchDidFinishLoading):
     26        (WebFrameLoaderClient::dispatchDidFailLoading):
     27        (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
     28        (WebFrameLoaderClient::dispatchDidReceiveTitle):
     29        (WebFrameLoaderClient::dispatchDidCommitLoad):
     30        (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
     31        (WebFrameLoaderClient::dispatchDidFailLoad):
     32        (WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
     33        (WebFrameLoaderClient::dispatchCreatePage):
     34        (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
     35        (shouldTryAppLink):
     36        (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
     37        (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
     38        (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
     39        (makeFormFieldValuesDictionary):
     40        (WebFrameLoaderClient::dispatchWillSubmitForm):
     41        (WebFrameLoaderClient::revertToProvisionalState):
     42        (WebFrameLoaderClient::setMainDocumentError):
     43        (WebFrameLoaderClient::startDownload):
     44        (WebFrameLoaderClient::willChangeTitle):
     45        (WebFrameLoaderClient::didChangeTitle):
     46        (WebFrameLoaderClient::didReplaceMultipartContent):
     47        (WebFrameLoaderClient::committedLoad):
     48        (WebFrameLoaderClient::finishedLoading):
     49        (WebFrameLoaderClient::updateGlobalHistory):
     50        (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
     51        (WebFrameLoaderClient::shouldGoToHistoryItem const):
     52        (WebFrameLoaderClient::didDisplayInsecureContent):
     53        (WebFrameLoaderClient::didRunInsecureContent):
     54        (WebFrameLoaderClient::cancelledError):
     55        (WebFrameLoaderClient::blockedError):
     56        (WebFrameLoaderClient::blockedByContentBlockerError):
     57        (WebFrameLoaderClient::cannotShowURLError):
     58        (WebFrameLoaderClient::interruptedForPolicyChangeError):
     59        (WebFrameLoaderClient::blockedByContentFilterError):
     60        (WebFrameLoaderClient::cannotShowMIMETypeError):
     61        (WebFrameLoaderClient::fileDoesNotExistError):
     62        (WebFrameLoaderClient::pluginWillHandleLoadError):
     63        (WebFrameLoaderClient::shouldFallBack):
     64        (WebFrameLoaderClient::canHandleRequest const):
     65        (WebFrameLoaderClient::saveViewStateToItem):
     66        (WebFrameLoaderClient::restoreViewState):
     67        (WebFrameLoaderClient::createDocumentLoader):
     68        (WebFrameLoaderClient::setTitle):
     69        (WebFrameLoaderClient::savePlatformDataToCachedFrame):
     70        (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
     71        (WebFrameLoaderClient::transitionToCommittedForNewPage):
     72        (WebFrameLoaderClient::setUpPolicyListener):
     73        (WebFrameLoaderClient::actionDictionary const):
     74        (WebFrameLoaderClient::canCachePage const):
     75        (WebFrameLoaderClient::createFrame):
     76        (WebFrameLoaderClient::objectContentType):
     77        (PluginWidget::PluginWidget):
     78        (PluginWidget::invalidateRect):
     79        (NetscapePluginWidget::handleEvent):
     80        (NetscapePluginWidget::notifyWidget):
     81        (shouldBlockPlugin):
     82        (WebFrameLoaderClient::createPlugin):
     83        (WebFrameLoaderClient::redirectDataToPlugin):
     84        (WebFrameLoaderClient::createJavaAppletWidget):
     85        (shouldBlockWebGL):
     86        (WebFrameLoaderClient::webGLPolicyForURL const):
     87        (WebFrameLoaderClient::resolveWebGLPolicyForURL const):
     88        (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
     89        (WebFrameLoaderClient::createNetworkingContext):
     90        (WebFrameLoaderClient::createPreviewLoaderClient):
     91        (WebFrameLoaderClient::getLoadDecisionForIcons):
     92        (webGetNSImage):
     93        (WebFrameLoaderClient::finishedLoadingIcon):
     94        (-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:]):
     95        (-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:appLinkURL:]):
     96        (-[WebFramePolicyListener invalidate]):
     97        (-[WebFramePolicyListener receivedPolicyDecision:]):
     98        (-[WebFramePolicyListener ignore]):
     99        (-[WebFramePolicyListener download]):
     100        (-[WebFramePolicyListener use]):
     101        (-[WebFramePolicyListener continue]):
     102        * WebInspector/WebInspector.mm:
     103        (-[WebInspector showWindow]):
     104        (-[WebInspector evaluateInFrontend:script:]):
     105        * WebView/WebClipView.mm:
     106        (-[WebClipView visibleRect]):
     107        (-[WebClipView _immediateScrollToPoint:]):
     108        * WebView/WebDataSource.mm:
     109        (-[WebDataSource _documentFragmentWithArchive:]):
     110        (-[WebDataSource _documentLoader]):
     111        (-[WebDataSource initWithRequest:]):
     112        (-[WebDataSource dealloc]):
     113        (-[WebDataSource data]):
     114        (-[WebDataSource webFrame]):
     115        (-[WebDataSource initialRequest]):
     116        (-[WebDataSource request]):
     117        (-[WebDataSource webArchive]):
     118        * WebView/WebFrame.mm:
     119        (core):
     120        (kit):
     121        (getWebView):
     122        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
     123        (+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
     124        (+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]):
     125        (+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]):
     126        (-[WebFrame _attachScriptDebugger]):
     127        (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
     128        (-[WebFrame _unmarkAllBadGrammar]):
     129        (-[WebFrame _unmarkAllMisspellings]):
     130        (-[WebFrame _hasSelection]):
     131        (-[WebFrame _atMostOneFrameHasSelection]):
     132        (-[WebFrame _findFrameWithSelection]):
     133        (-[WebFrame _nodesFromList:]):
     134        (-[WebFrame _stringForRange:]):
     135        (-[WebFrame _paintBehaviorForDestinationContext:]):
     136        (-[WebFrame _drawRect:contentsOnly:]):
     137        (-[WebFrame _getVisibleRect:]):
     138        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
     139        (-[WebFrame _caretRectAtPosition:affinity:]):
     140        (-[WebFrame _scrollDOMRangeToVisible:]):
     141        (-[WebFrame _scrollDOMRangeToVisible:withInset:]):
     142        (-[WebFrame _rangeByAlteringCurrentSelection:direction:granularity:]):
     143        (-[WebFrame _selectionGranularity]):
     144        (-[WebFrame _convertToNSRange:]):
     145        (-[WebFrame _convertToDOMRange:]):
     146        (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]):
     147        (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
     148        (-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
     149        (-[WebFrame _visiblePositionForPoint:]):
     150        (-[WebFrame _characterRangeAtPoint:]):
     151        (-[WebFrame _typingStyle]):
     152        (-[WebFrame _setTypingStyle:withUndoAction:]):
     153        (-[WebFrame _dragSourceEndedAt:operation:]):
     154        (-[WebFrame _canProvideDocumentSource]):
     155        (-[WebFrame _commitData:]):
     156        (-[WebFrame _isDescendantOfFrame:]):
     157        (-[WebFrame _bodyBackgroundColor]):
     158        (-[WebFrame _isFrameSet]):
     159        (-[WebFrame _isVisuallyNonEmpty]):
     160        (toWebFrameLoadType):
     161        (-[WebFrame _rectsForRange:]):
     162        (-[WebFrame _selectionRangeForFirstPoint:secondPoint:]):
     163        (-[WebFrame _selectionRangeForPoint:]):
     164        (-[WebFrame _selectNSRange:]):
     165        (-[WebFrame _isDisplayingStandaloneImage]):
     166        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
     167        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
     168        (-[WebFrame setTimeoutsPaused:]):
     169        (-[WebFrame prepareForPause]):
     170        (-[WebFrame resumeFromPause]):
     171        (-[WebFrame selectWithoutClosingTypingNSRange:]):
     172        (-[WebFrame _saveViewState]):
     173        (-[WebFrame deviceOrientationChanged]):
     174        (-[WebFrame renderedSizeOfNode:constrainedToWidth:]):
     175        (-[WebFrame deepestNodeAtViewportLocation:]):
     176        (-[WebFrame scrollableNodeAtViewportLocation:]):
     177        (-[WebFrame approximateNodeAtViewportLocation:]):
     178        (-[WebFrame revealSelectionAtExtent:]):
     179        (-[WebFrame setCaretColor:]):
     180        (-[WebFrame isTelephoneNumberParsingAllowed]):
     181        (-[WebFrame isTelephoneNumberParsingEnabled]):
     182        (-[WebFrame setSelectedDOMRange:affinity:closeTyping:]):
     183        (-[WebFrame selectNSRange:onElement:]):
     184        (-[WebFrame setMarkedText:selectedRange:]):
     185        (-[WebFrame setMarkedText:forCandidates:]):
     186        (-[WebFrame getDictationResultRanges:andMetadatas:]):
     187        (-[WebFrame dictationResultMetadataForRange:]):
     188        (+[WebFrame stringWithData:textEncodingName:]):
     189        (-[WebFrame fontForSelection:]):
     190        (-[WebFrame _userScrolled]):
     191        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:matchStyle:]):
     192        (-[WebFrame resetTextAutosizingBeforeLayout]):
     193        (-[WebFrame _setTextAutosizingWidth:]):
     194        (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
     195        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
     196        (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]):
     197        (-[WebFrame _cacheabilityDictionary]):
     198        (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
     199        (-[WebFrame _globalContextForScriptWorld:]):
     200        (-[WebFrame setAccessibleName:]):
     201        (-[WebFrame enhancedAccessibilityEnabled]):
     202        (-[WebFrame setEnhancedAccessibility:]):
     203        (-[WebFrame _layerTreeAsText]):
     204        (-[WebFrame accessibilityRoot]):
     205        (-[WebFrame _clearOpener]):
     206        (-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]):
     207        (-[WebFrame focusedNodeHasContent]):
     208        (-[WebFrame _dispatchDidReceiveTitle:]):
     209        (-[WebFrame jsWrapperForNode:inScriptWorld:]):
     210        (-[WebFrame elementAtPoint:]):
     211        (-[WebFrame name]):
     212        (needsMicrosoftMessengerDOMDocumentWorkaround):
     213        (-[WebFrame DOMDocument]):
     214        (-[WebFrame frameElement]):
     215        (-[WebFrame provisionalDataSource]):
     216        (-[WebFrame dataSource]):
     217        (-[WebFrame loadRequest:]):
     218        (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
     219        (-[WebFrame findFrameNamed:]):
     220        (-[WebFrame parentFrame]):
     221        (-[WebFrame childFrames]):
     222        (-[WebFrame windowObject]):
     223        (-[WebFrame globalContext]):
     224        (-[WebFrame javaScriptContext]):
     225        (dataSource): Deleted.
     226        * WebView/WebFrameView.mm:
     227        (-[WebFrameView _web_frame]):
     228        (-[WebFrameView _setDocumentView:]):
     229        (-[WebFrameView _verticalPageScrollDistance]):
     230        (-[WebFrameView _install]):
     231        (-[WebFrameView _frameSizeChanged]):
     232        (-[WebFrameView initWithFrame:]):
     233        (-[WebFrameView drawRect:]):
     234        (-[WebFrameView _scrollOverflowInDirection:granularity:]):
     235        (-[WebFrameView _isVerticalDocument]):
     236        (-[WebFrameView _isFlippedDocument]):
     237        (-[WebFrameView _scrollToBeginningOfDocument]):
     238        (-[WebFrameView _scrollToEndOfDocument]):
     239        (-[WebFrameView _horizontalPageScrollDistance]):
     240        (-[WebFrameView _pageVertically:]):
     241        (-[WebFrameView _pageHorizontally:]):
     242        (-[WebFrameView _scrollLineVertically:]):
     243        (-[WebFrameView _scrollLineHorizontally:]):
     244        (-[WebFrameView keyDown:keyDown:]):
     245        (addTypesFromClass): Deleted.
     246        * WebView/WebFullScreenController.mm:
     247        (screenRectOfContents):
     248        (-[WebFullScreenController element]):
     249        (-[WebFullScreenController setElement:]):
     250        (-[WebFullScreenController _document]):
     251        (-[WebFullScreenController _manager]):
     252        * WebView/WebHTMLView.mm:
     253        (toAction):
     254        (toTag):
     255        (-[NSView _web_setNeedsDisplayInRect:]):
     256        (promisedDataClient):
     257        (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
     258        (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
     259        (-[WebHTMLView _plainTextFromPasteboard:]):
     260        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
     261        (-[WebHTMLView readSelectionFromPasteboard:]):
     262        (-[WebHTMLView _selectedRange]):
     263        (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
     264        (-[WebHTMLView _frameOrBoundsChanged]):
     265        (-[WebHTMLView _updateMouseoverWithEvent:]):
     266        (+[WebHTMLView _insertablePasteboardTypes]):
     267        (+[WebHTMLView _selectionPasteboardTypes]):
     268        (-[WebHTMLView pasteboard:provideDataForType:]):
     269        (-[WebHTMLView setScale:]):
     270        (-[WebHTMLView _canEdit]):
     271        (-[WebHTMLView _canEditRichly]):
     272        (-[WebHTMLView _hasSelection]):
     273        (-[WebHTMLView _hasSelectionOrInsertionPoint]):
     274        (-[WebHTMLView _hasInsertionPoint]):
     275        (-[WebHTMLView _isEditable]):
     276        (-[WebHTMLView _selectionDraggingImage]):
     277        (-[WebHTMLView _insertOrderedList]):
     278        (-[WebHTMLView _insertUnorderedList]):
     279        (-[WebHTMLView _canIncreaseSelectionListLevel]):
     280        (-[WebHTMLView _canDecreaseSelectionListLevel]):
     281        (-[WebHTMLView _increaseSelectionListLevel]):
     282        (-[WebHTMLView _increaseSelectionListLevelOrdered]):
     283        (-[WebHTMLView _increaseSelectionListLevelUnordered]):
     284        (-[WebHTMLView _decreaseSelectionListLevel]):
     285        (-[WebHTMLView _writeSelectionToPasteboard:]):
     286        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
     287        (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]):
     288        (-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]):
     289        (-[WebHTMLView _beginScreenPaginationModeWithPageSize:shrinkToFit:]):
     290        (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
     291        (-[WebHTMLView coreCommandBySelector:]):
     292        (-[WebHTMLView coreCommandByName:]):
     293        (-[WebHTMLView validRequestorForSendType:returnType:]):
     294        (-[WebHTMLView jumpToSelection:]):
     295        (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
     296        (-[WebHTMLView maintainsInactiveSelection]):
     297        (-[WebHTMLView reapplyStyles]):
     298        (-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
     299        (-[WebHTMLView rightMouseUp:]):
     300        (fixMenusReceivedFromOldClients):
     301        (createShareMenuItem):
     302        (createMenuItem):
     303        (createMenuItems):
     304        (customMenuFromDefaultItems):
     305        (-[WebHTMLView menuForEvent:]):
     306        (-[WebHTMLView clearFocus]):
     307        (-[WebHTMLView setLayer:]):
     308        (-[WebHTMLView setNeedsLayout:]):
     309        (-[WebHTMLView setNeedsToApplyStyles:]):
     310        (-[WebHTMLView _invalidateGStatesForTree]):
     311        (-[WebHTMLView scrollWheel:]):
     312        (-[WebHTMLView acceptsFirstMouse:]):
     313        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
     314        (-[WebHTMLView mouseDown:]):
     315        (-[WebHTMLView touch:]):
     316        (-[WebHTMLView mouseDragged:]):
     317        (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
     318        (-[WebHTMLView draggedImage:endedAt:operation:]):
     319        (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
     320        (-[WebHTMLView draggingSession:sourceOperationMaskForDraggingContext:]):
     321        (-[WebHTMLView draggingSession:endedAtPoint:operation:]):
     322        (-[WebHTMLView mouseUp:]):
     323        (-[WebHTMLView pressureChangeWithEvent:]):
     324        (isTextInput):
     325        (isInPasswordField):
     326        (currentKeyboardEvent):
     327        (-[WebHTMLView becomeFirstResponder]):
     328        (-[WebHTMLView resignFirstResponder]):
     329        (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
     330        (-[WebHTMLView _scaleFactorForPrintOperation:]):
     331        (-[WebHTMLView keyDown:]):
     332        (-[WebHTMLView keyUp:]):
     333        (-[WebHTMLView flagsChanged:]):
     334        (-[WebHTMLView centerSelectionInVisibleArea:]):
     335        (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
     336        (-[WebHTMLView _fontAttributesFromFontPasteboard]):
     337        (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
     338        (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):
     339        (-[WebHTMLView performKeyEquivalent:]):
     340        (-[WebHTMLView copyFont:]):
     341        (-[WebHTMLView pasteFont:]):
     342        (-[WebHTMLView changeFont:]):
     343        (-[WebHTMLView changeAttributes:]):
     344        (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
     345        (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
     346        (-[WebHTMLView changeColor:]):
     347        (-[WebHTMLView checkSpelling:]):
     348        (-[WebHTMLView showGuessPanel:]):
     349        (-[WebHTMLView toggleBaseWritingDirection:]):
     350        (-[WebHTMLView changeBaseWritingDirection:]):
     351        (-[WebHTMLView _changeBaseWritingDirectionTo:]):
     352        (-[WebHTMLView _updateControlTints]):
     353        (-[WebHTMLView _selectionChanged]):
     354        (-[WebHTMLView _updateFontPanel]):
     355        (-[WebHTMLView _canSmartCopyOrDelete]):
     356        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
     357        (-[WebHTMLView quickLookWithEvent:]):
     358        (-[WebHTMLView _executeSavedKeypressCommands]):
     359        (-[WebHTMLView _interpretKeyEvent:savingCommands:]):
     360        (-[WebHTMLView _handleEditingKeyEvent:]):
     361        (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
     362        (-[WebHTMLView ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
     363        (-[WebHTMLView attributedSubstringFromRange:]):
     364        (-[WebHTMLView hasMarkedText]):
     365        (extractUnderlines):
     366        (-[WebHTMLView setMarkedText:selectedRange:]):
     367        (-[WebHTMLView doCommandBySelector:]):
     368        (-[WebHTMLView insertText:]):
     369        (-[WebHTMLView _updateSecureInputState]):
     370        (-[WebHTMLView _updateSelectionForInputManager]):
     371        (-[WebHTMLView selectionTextRects]):
     372        (imageFromRect):
     373        (selectionImage):
     374        (-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):
     375        (-[WebHTMLView selectAll]):
     376        (-[WebHTMLView deselectAll]):
     377        (-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):
     378        (-[WebHTMLView attributedString]):
     379        (-[WebHTMLView selectedAttributedString]):
     380        (-[WebHTMLView elementAtPoint:allowShadowContent:]):
     381        (-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]):
     382        (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
     383        (-[WebHTMLView markedTextMatchesAreHighlighted]):
     384        (-[WebHTMLView unmarkAllTextMatches]):
     385        (-[WebHTMLView rectsForTextMatches]):
     386        (-[WebHTMLView _findString:options:]):
     387        * WebView/WebImmediateActionController.mm:
     388        (-[WebImmediateActionController webView:didHandleScrollWheel:]):
     389        (-[WebImmediateActionController _cancelImmediateAction]):
     390        (-[WebImmediateActionController performHitTestAtPoint:]):
     391        (-[WebImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
     392        (-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
     393        (-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
     394        (-[WebImmediateActionController _defaultAnimationController]):
     395        (-[WebImmediateActionController _updateImmediateActionItem]):
     396        (-[WebImmediateActionController menuItemDidClose:]):
     397        (elementBoundingBoxInWindowCoordinatesFromNode):
     398        (-[WebImmediateActionController menuItem:itemFrameForPoint:]):
     399        (-[WebImmediateActionController menuItem:maxSizeForPoint:]):
     400        (-[WebImmediateActionController _animationControllerForDataDetectedText]):
     401        (-[WebImmediateActionController _animationControllerForDataDetectedLink]):
     402        (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
     403        (-[WebImmediateActionController _animationControllerForText]):
     404        * WebView/WebPDFView.mm:
     405        (isFrameInRange):
     406        (-[WebPDFView pasteboardTypesForSelection]):
     407        (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
     408        (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
     409        * WebView/WebScriptDebugDelegate.mm:
     410        (-[WebScriptCallFrame _convertValueToObjcValue:]):
     411        * WebView/WebScriptDebugger.mm:
     412        (toNSString):
     413        (toWebFrame):
     414        (WebScriptDebugger::WebScriptDebugger):
     415        (WebScriptDebugger::sourceParsed):
     416        (WebScriptDebugger::handlePause):
     417        * WebView/WebScriptWorld.mm:
     418        (-[WebScriptWorld initWithWorld:]):
     419        (-[WebScriptWorld init]):
     420        (+[WebScriptWorld standardWorld]):
     421        (+[WebScriptWorld scriptWorldForGlobalContext:]):
     422        (core):
     423        (+[WebScriptWorld findOrCreateWorld:]):
     424        * WebView/WebView.mm:
     425        (coreOptions):
     426        (coreLayoutMilestones):
     427        (kitLayoutMilestones):
     428        (kit):
     429        (WebKit::DeferredPageDestructor::createDeferredPageDestructor):
     430        (WebKit::DeferredPageDestructor::DeferredPageDestructor):
     431        (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
     432        (+[WebView _standardUserAgentWithApplicationName:]):
     433        (+[WebView _reportException:inContext:]):
     434        (shouldEnableLoadDeferring):
     435        (shouldRestrictWindowFocus):
     436        (needsOutlookQuirksScript):
     437        (-[WebView _injectOutlookQuirksScript]):
     438        (shouldUseLegacyBackgroundSizeShorthandBehavior):
     439        (shouldAllowWindowOpenWithoutUserGesture):
     440        (WebKitInitializeGamepadProviderIfNecessary):
     441        (-[WebView _commonInitializationWithFrameName:groupName:]):
     442        (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
     443        (-[WebView _replaceCurrentHistoryItem:]):
     444        (-[WebView updateLayoutIgnorePendingStyleSheets]):
     445        (-[WebView _requestStartDataInteraction:globalPosition:]):
     446        (-[WebView _startDrag:]):
     447        (-[WebView dragDataForSession:client:global:operation:]):
     448        (-[WebView _didConcludeEditDrag]):
     449        (+[WebView _setAlwaysUsesComplexTextCodePath:]):
     450        (+[WebView canCloseAllWebViews]):
     451        (+[WebView closeAllWebViews]):
     452        (-[WebView _dispatchUnloadEvent]):
     453        (-[WebView styleAtSelectionStart]):
     454        (-[WebView _didFinishScrollingOrZooming]):
     455        (-[WebView _close]):
     456        (-[WebView _isProcessingUserGesture]):
     457        (+[WebView _enableRemoteInspector]):
     458        (+[WebView _disableRemoteInspector]):
     459        (+[WebView _disableAutoStartRemoteInspector]):
     460        (+[WebView _isRemoteInspectorEnabled]):
     461        (+[WebView _hasRemoteInspectorSession]):
     462        (-[WebView _setHostApplicationProcessIdentifier:auditToken:]):
     463        (-[WebView _loadBackForwardListFromOtherView:]):
     464        (-[WebView _needsKeyboardEventDisambiguationQuirks]):
     465        (needsSelfRetainWhileLoadingQuirk):
     466        (-[WebView _needsPreHTML5ParserQuirks]):
     467        (-[WebView _preferencesChanged:]):
     468        (-[WebView _cacheFrameLoadDelegateImplementations]):
     469        (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
     470        (+[WebView _registerViewClass:representationClass:forURLScheme:]):
     471        (+[WebView _decodeData:]):
     472        (-[WebView _didStartProvisionalLoadForFrame:]):
     473        (-[WebView _checkDidPerformFirstNavigation]):
     474        (-[WebView _cachedResponseForURL:]):
     475        (+[WebView _setShouldUseFontSmoothing:]):
     476        (+[WebView _shouldUseFontSmoothing]):
     477        (+[WebView _setUsesTestModeFocusRingColor:]):
     478        (+[WebView _usesTestModeFocusRingColor]):
     479        (-[WebView setAlwaysShowVerticalScroller:]):
     480        (-[WebView alwaysShowVerticalScroller]):
     481        (-[WebView setAlwaysShowHorizontalScroller:]):
     482        (-[WebView setProhibitsMainFrameScrolling:]):
     483        (-[WebView alwaysShowHorizontalScroller]):
     484        (-[WebView _setMediaLayer:forPluginView:]):
     485        (-[WebView _attachScriptDebuggerToAllFrames]):
     486        (-[WebView _detachScriptDebuggerFromAllFrames]):
     487        (+[WebView _productivityDocumentMIMETypes]):
     488        (-[WebView _setFixedLayoutSize:]):
     489        (-[WebView _synchronizeCustomFixedPositionLayoutRect]):
     490        (-[WebView _viewGeometryDidChange]):
     491        (-[WebView _overflowScrollPositionChangedTo:forNode:isUserScroll:]):
     492        (+[WebView _doNotStartObservingNetworkReachability]):
     493        (-[WebView _touchEventRegions]):
     494        (-[WebView textIteratorForRect:]):
     495        (-[WebView _executeCoreCommandByName:value:]):
     496        (-[WebView _isUsingAcceleratedCompositing]):
     497        (-[WebView _isSoftwareRenderable]):
     498        (-[WebView setTracksRepaints:]):
     499        (-[WebView isTrackingRepaints]):
     500        (-[WebView resetTrackedRepaints]):
     501        (-[WebView trackedRepaintRects]):
     502        (+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
     503        (+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
     504        (+[WebView _resetOriginAccessWhitelists]):
     505        (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
     506        (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
     507        (-[WebView allowsNewCSSAnimationsWhileSuspended]):
     508        (-[WebView setAllowsNewCSSAnimationsWhileSuspended:]):
     509        (-[WebView cssAnimationsSuspended]):
     510        (-[WebView setCSSAnimationsSuspended:]):
     511        (+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
     512        (+[WebView _registerURLSchemeAsSecure:]):
     513        (+[WebView _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]):
     514        (-[WebView _scaleWebView:atOrigin:]):
     515        (-[WebView _setUseFixedLayout:]):
     516        (-[WebView _useFixedLayout]):
     517        (-[WebView _fixedLayoutSize]):
     518        (-[WebView _setPaginationMode:]):
     519        (-[WebView _paginationMode]):
     520        (-[WebView _listenForLayoutMilestones:]):
     521        (-[WebView _layoutMilestones]):
     522        (-[WebView _setPaginationBehavesLikeColumns:]):
     523        (-[WebView _paginationBehavesLikeColumns]):
     524        (-[WebView _setPageLength:]):
     525        (-[WebView _pageLength]):
     526        (-[WebView _setGapBetweenPages:]):
     527        (-[WebView _gapBetweenPages]):
     528        (-[WebView _setPaginationLineGridEnabled:]):
     529        (-[WebView _paginationLineGridEnabled]):
     530        (-[WebView _pageCount]):
     531        (+[WebView _HTTPPipeliningEnabled]):
     532        (+[WebView _setHTTPPipeliningEnabled:]):
     533        (-[WebView shouldRequestCandidates]):
     534        (-[WebView removePluginInstanceViewsFor:]):
     535        (+[WebView registerURLSchemeAsLocal:]):
     536        (-[WebView doWindowDidChangeScreen]):
     537        (-[WebView _updateScreenScaleFromWindow]):
     538        (-[WebView goToBackForwardItem:]):
     539        (-[WebView _setZoomMultiplier:isTextOnly:]):
     540        (-[WebView setCustomTextEncodingName:]):
     541        (-[WebView windowScriptObject]):
     542        (-[WebView setHostWindow:]):
     543        (-[WebView applicationFlags:]):
     544        (-[WebView actionMaskForDraggingInfo:]):
     545        (-[WebView draggingEntered:]):
     546        (-[WebView draggingUpdated:]):
     547        (-[WebView draggingExited:]):
     548        (-[WebView performDragOperation:]):
     549        (incrementFrame):
     550        (+[WebView registerViewClass:representationClass:forMIMEType:]):
     551        (-[WebView moveDragCaretToPoint:]):
     552        (-[WebView removeDragCaret]):
     553        (-[WebView mainFrameIconURL]):
     554        (coreTextCheckingType):
     555        (textCheckingResultFromNSTextCheckingResult):
     556        (-[WebView candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
     557        (-[WebView candidateListTouchBarItem:changedCandidateListVisibility:]):
     558        (-[WebView shouldClose]):
     559        (aeDescFromJSValue):
     560        (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
     561        (-[WebView editableDOMRangeForPoint:]):
     562        (-[WebView setSelectedDOMRange:affinity:]):
     563        (-[WebView selectedDOMRange]):
     564        (-[WebView selectionAffinity]):
     565        (-[WebView setEditable:]):
     566        (-[WebView setTypingStyle:]):
     567        (-[WebView deleteSelection]):
     568        (-[WebView applyStyle:]):
     569        (-[WebView insertDictationPhrases:metadata:]):
     570        (-[WebView _selectionIsCaret]):
     571        (-[WebView _selectionIsAll]):
     572        (-[WebView _simplifyMarkup:endNode:]):
     573        (+[WebView _setCacheModel:]):
     574        (-[WebView _searchWithGoogleFromMenu:]):
     575        (-[WebView _retrieveKeyboardUIModeFromPreferences:]):
     576        (-[WebView _keyboardUIMode]):
     577        (-[WebView _mainCoreFrame]):
     578        (-[WebView _clearCredentials]):
     579        (-[WebView _flushCompositingChanges]):
     580        (-[WebView _scheduleLayerFlushForPendingTileCacheRepaint]):
     581        (-[WebView _hasActiveVideoForControlsInterface]):
     582        (-[WebView _setUpPlaybackControlsManagerForMediaElement:]):
     583        (-[WebView handleAcceptedAlternativeText:]):
     584        (-[WebView _getWebCoreDictationAlternatives:fromTextAlternatives:]):
     585        (-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
     586        (-[WebView _setTextIndicator:]):
     587        (-[WebView _setTextIndicator:withLifetime:]):
     588        (-[WebView _clearTextIndicatorWithAnimation:]):
     589        (-[WebView _showDictionaryLookupPopup:]):
     590        (-[WebView _dictionaryLookupPopoverWillClose:]):
     591        (-[WebView showFormValidationMessage:withAnchorRect:]):
     592        (-[WebView textTouchBar]):
     593        (nsTextAlignmentFromRenderStyle):
     594        (-[WebView updateTextTouchBar]):
     595        (-[WebView updateTouchBar]):
     596        (-[WebView candidateList]):
     597        (-[WebView _geolocationDidFailWithMessage:]):
     598        (-[WebView _resetAllGeolocationPermission]):
     599        (-[WebView _notificationIDForTesting:]):
     600
    16012019-09-25  Megan Gardner  <megan_gardner@apple.com>
    2602
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r250196 r250549  
    167167#endif
    168168
    169 using namespace WebCore;
    170 using namespace HTMLNames;
    171 
    172169#if PLATFORM(IOS_FAMILY)
    173170@interface WebHTMLView (Init)
     
    182179
    183180@interface WebFramePolicyListener : NSObject <WebPolicyDecisionListener, WebFormSubmissionListener> {
    184     RefPtr<Frame> _frame;
    185     PolicyCheckIdentifier _identifier;
    186     FramePolicyFunction _policyFunction;
     181    RefPtr<WebCore::Frame> _frame;
     182    WebCore::PolicyCheckIdentifier _identifier;
     183    WebCore::FramePolicyFunction _policyFunction;
    187184#if HAVE(APP_LINKS)
    188185    RetainPtr<NSURL> _appLinkURL;
    189186#endif
    190     PolicyAction _defaultPolicy;
    191 }
    192 
    193 - (id)initWithFrame:(Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy;
     187    WebCore::PolicyAction _defaultPolicy;
     188}
     189
     190- (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy;
    194191#if HAVE(APP_LINKS)
    195 - (id)initWithFrame:(Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy appLinkURL:(NSURL *)url;
     192- (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy appLinkURL:(NSURL *)url;
    196193#endif
    197194
     
    200197@end
    201198
    202 static inline WebDataSource *dataSource(DocumentLoader* loader)
     199static inline WebDataSource *dataSource(WebCore::DocumentLoader* loader)
    203200{
    204201    return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil;
     
    210207}
    211208
    212 Optional<PageIdentifier> WebFrameLoaderClient::pageID() const
     209Optional<WebCore::PageIdentifier> WebFrameLoaderClient::pageID() const
    213210{
    214211    return WTF::nullopt;
    215212}
    216213
    217 Optional<FrameIdentifier> WebFrameLoaderClient::frameID() const
     214Optional<WebCore::FrameIdentifier> WebFrameLoaderClient::frameID() const
    218215{
    219216    return WTF::nullopt;
     
    231228}
    232229
    233 void WebFrameLoaderClient::makeRepresentation(DocumentLoader* loader)
     230void WebFrameLoaderClient::makeRepresentation(WebCore::DocumentLoader* loader)
    234231{
    235232    [dataSource(loader) _makeRepresentation];
     
    251248    WebView* webView = getWebView(m_webFrame.get());
    252249    bool isMainFrame = [webView mainFrame] == m_webFrame.get();
    253     Frame* coreFrame = core(m_webFrame.get());
     250    auto* coreFrame = core(m_webFrame.get());
    254251    if (isMainFrame && coreFrame->view()) {
    255         IntSize newSize([webView _fixedLayoutSize]);
     252        WebCore::IntSize newSize([webView _fixedLayoutSize]);
    256253        coreFrame->view()->setFixedLayoutSize(newSize);
    257254        coreFrame->view()->setUseFixedLayout(!newSize.isEmpty());
     
    303300}
    304301
    305 void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader* documentLoader, const ResourceRequest& request, const ResourceResponse& response)
    306 {
    307     WebView *webView = getWebView(m_webFrame.get());
    308     SubresourceLoader* mainResourceLoader = documentLoader->mainResourceLoader();
     302void WebFrameLoaderClient::convertMainResourceLoadToDownload(WebCore::DocumentLoader* documentLoader, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response)
     303{
     304    WebView *webView = getWebView(m_webFrame.get());
     305    auto* mainResourceLoader = documentLoader->mainResourceLoader();
    309306
    310307    if (!mainResourceLoader) {
    311308        // The resource has already been cached, or the conversion is being attmpted when not calling SubresourceLoader::didReceiveResponse().
    312309        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    313         WebDownload *webDownload = [[WebDownload alloc] initWithRequest:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody) delegate:[webView downloadDelegate]];
     310        WebDownload *webDownload = [[WebDownload alloc] initWithRequest:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) delegate:[webView downloadDelegate]];
    314311        ALLOW_DEPRECATED_DECLARATIONS_END
    315312        [webDownload autorelease];
     
    317314    }
    318315
    319     ResourceHandle* handle = mainResourceLoader->handle();
     316    auto* handle = mainResourceLoader->handle();
    320317
    321318ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    322     [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
     319    [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
    323320ALLOW_DEPRECATED_DECLARATIONS_END
    324321}
    325322
    326 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length)
     323bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, int length)
    327324{
    328325    WebView *webView = getWebView(m_webFrame.get());
     
    330327#if PLATFORM(IOS_FAMILY)
    331328    if (implementations->webThreadDidLoadResourceFromMemoryCacheFunc) {
    332         CallResourceLoadDelegateInWebThread(implementations->webThreadDidLoadResourceFromMemoryCacheFunc, webView, @selector(webThreadWebView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));
     329        CallResourceLoadDelegateInWebThread(implementations->webThreadDidLoadResourceFromMemoryCacheFunc, webView, @selector(webThreadWebView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));
    333330        return true;
    334331    }
     
    337334        return false;
    338335
    339     CallResourceLoadDelegate(implementations->didLoadResourceFromMemoryCacheFunc, webView, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));
     336    CallResourceLoadDelegate(implementations->didLoadResourceFromMemoryCacheFunc, webView, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));
    340337    return true;
    341338}
    342339
    343 void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request)
     340void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request)
    344341{
    345342    WebView *webView = getWebView(m_webFrame.get());
     
    350347#if PLATFORM(IOS_FAMILY)
    351348    if (implementations->webThreadIdentifierForRequestFunc) {
    352         object = CallResourceLoadDelegateInWebThread(implementations->webThreadIdentifierForRequestFunc, webView, @selector(webThreadWebView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));
     349        object = CallResourceLoadDelegateInWebThread(implementations->webThreadIdentifierForRequestFunc, webView, @selector(webThreadWebView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));
    353350    } else
    354351#endif
    355352    if (implementations->identifierForRequestFunc)
    356         object = CallResourceLoadDelegate(implementations->identifierForRequestFunc, webView, @selector(webView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));
     353        object = CallResourceLoadDelegate(implementations->identifierForRequestFunc, webView, @selector(webView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));
    357354    else
    358355        object = adoptNS([[NSObject alloc] init]);
     
    361358}
    362359
    363 void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
     360void WebFrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, unsigned long identifier, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
    364361{
    365362    WebView *webView = getWebView(m_webFrame.get());
     
    369366        static_cast<WebDocumentLoaderMac*>(loader)->increaseLoadCount(identifier);
    370367
    371     NSURLRequest *currentURLRequest = request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody);
     368    NSURLRequest *currentURLRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
    372369
    373370#if PLATFORM(MAC)
    374     if (MacApplication::isAppleMail() && loader->substituteData().isValid()) {
     371    if (WebCore::MacApplication::isAppleMail() && loader->substituteData().isValid()) {
    375372        // Mail.app checks for this property to detect data / archive loads.
    376373        [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)currentURLRequest];
     
    388385
    389386    if (newURLRequest != currentURLRequest)
    390         request.updateFromDelegatePreservingOldProperties(ResourceRequest(newURLRequest));
    391 }
    392 
    393 bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader* loader, unsigned long identifier)
     387        request.updateFromDelegatePreservingOldProperties(WebCore::ResourceRequest(newURLRequest));
     388}
     389
     390bool WebFrameLoaderClient::shouldUseCredentialStorage(WebCore::DocumentLoader* loader, unsigned long identifier)
    394391{
    395392    WebView *webView = getWebView(m_webFrame.get());
     
    404401}
    405402
    406 void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge)
     403void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::AuthenticationChallenge& challenge)
    407404{
    408405    WebView *webView = getWebView(m_webFrame.get());
     
    425422
    426423#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
    427 bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader* loader, unsigned long identifier, const ProtectionSpace& protectionSpace)
     424bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ProtectionSpace& protectionSpace)
    428425{
    429426    WebView *webView = getWebView(m_webFrame.get());
     
    441438    // challenges for pre-iOS-3.0, pre-10.6 protection spaces.  This is the same as the default implementation
    442439    // in CFNetwork.
    443     return (protectionSpace.authenticationScheme() < ProtectionSpaceAuthenticationSchemeClientCertificateRequested);
    444 }
    445 #endif
    446 
    447 #if PLATFORM(IOS_FAMILY)
    448 RetainPtr<CFDictionaryRef> WebFrameLoaderClient::connectionProperties(DocumentLoader* loader, unsigned long identifier)
     440    return (protectionSpace.authenticationScheme() < WebCore::ProtectionSpaceAuthenticationSchemeClientCertificateRequested);
     441}
     442#endif
     443
     444#if PLATFORM(IOS_FAMILY)
     445RetainPtr<CFDictionaryRef> WebFrameLoaderClient::connectionProperties(WebCore::DocumentLoader* loader, unsigned long identifier)
    449446{
    450447    WebView *webView = getWebView(m_webFrame.get());
     
    473470}
    474471
    475 void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response)
     472void WebFrameLoaderClient::dispatchDidReceiveResponse(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceResponse& response)
    476473{
    477474    WebView *webView = getWebView(m_webFrame.get());
     
    491488}
    492489
    493 void WebFrameLoaderClient::willCacheResponse(DocumentLoader* loader, unsigned long identifier, NSCachedURLResponse* response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) const
     490void WebFrameLoaderClient::willCacheResponse(WebCore::DocumentLoader* loader, unsigned long identifier, NSCachedURLResponse* response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) const
    494491{
    495492    WebView *webView = getWebView(m_webFrame.get());
     
    511508}
    512509
    513 void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int dataLength)
     510void WebFrameLoaderClient::dispatchDidReceiveContentLength(WebCore::DocumentLoader* loader, unsigned long identifier, int dataLength)
    514511{
    515512    WebView *webView = getWebView(m_webFrame.get());
     
    533530#endif
    534531
    535 void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier)
     532void WebFrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader* loader, unsigned long identifier)
    536533{
    537534    WebView *webView = getWebView(m_webFrame.get());
     
    555552}
    556553
    557 void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& error)
     554void WebFrameLoaderClient::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error)
    558555{
    559556    WebView *webView = getWebView(m_webFrame.get());
     
    602599}
    603600
    604 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, WallTime fireDate, LockBackForwardList)
     601void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, WallTime fireDate, WebCore::LockBackForwardList)
    605602{
    606603    WebView *webView = getWebView(m_webFrame.get());
     
    687684static constexpr unsigned maxTitleLength = 1000; // Closest power of 10 above the W3C recommendation for Title length.
    688685
    689 void WebFrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title)
     686void WebFrameLoaderClient::dispatchDidReceiveTitle(const WebCore::StringWithDirection& title)
    690687{
    691688    auto truncatedTitle = truncateFromEnd(title, maxTitleLength);
     
    699696}
    700697
    701 void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent>)
     698void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>)
    702699{
    703700    // Tell the client we've committed this URL.
     
    719716}
    720717
    721 void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& error, WillContinueLoading)
     718void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error, WebCore::WillContinueLoading)
    722719{
    723720    m_webFrame->_private->provisionalURL = nullptr;
     
    735732}
    736733
    737 void WebFrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
     734void WebFrameLoaderClient::dispatchDidFailLoad(const WebCore::ResourceError& error)
    738735{
    739736    ASSERT(!m_webFrame->_private->provisionalURL);
     
    806803#endif
    807804
    808     if (milestones & DidFirstLayout) {
     805    if (milestones & WebCore::DidFirstLayout) {
    809806        // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the
    810807        // new didLayout API.
     
    826823    }
    827824
    828     if (milestones & DidFirstVisuallyNonEmptyLayout) {
     825    if (milestones & WebCore::DidFirstVisuallyNonEmptyLayout) {
    829826        // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing
    830827        // double duty with the new didLayout API.
     
    838835}
    839836
    840 Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction&)
     837WebCore::Frame* WebFrameLoaderClient::dispatchCreatePage(const WebCore::NavigationAction&)
    841838{
    842839    WebView *currentWebView = getWebView(m_webFrame.get());
     
    861858}
    862859
    863 void WebFrameLoaderClient::dispatchDecidePolicyForResponse(const ResourceResponse& response, const ResourceRequest& request, WebCore::PolicyCheckIdentifier identifier, const String&, FramePolicyFunction&& function)
     860void WebFrameLoaderClient::dispatchDecidePolicyForResponse(const WebCore::ResourceResponse& response, const WebCore::ResourceRequest& request, WebCore::PolicyCheckIdentifier identifier, const String&, WebCore::FramePolicyFunction&& function)
    864861{
    865862    WebView *webView = getWebView(m_webFrame.get());
    866863
    867864    [[webView _policyDelegateForwarder] webView:webView
    868                         decidePolicyForMIMEType:response.mimeType()
    869                                         request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)
    870                                           frame:m_webFrame.get()
    871                                decisionListener:setUpPolicyListener(identifier, WTFMove(function), PolicyAction::Use).get()];
    872 }
    873 
    874 
    875 static BOOL shouldTryAppLink(WebView *webView, const NavigationAction& action, Frame* targetFrame)
     865        decidePolicyForMIMEType:response.mimeType()
     866        request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody)
     867        frame:m_webFrame.get()
     868        decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Use).get()];
     869}
     870
     871
     872static BOOL shouldTryAppLink(WebView *webView, const WebCore::NavigationAction& action, WebCore::Frame* targetFrame)
    876873{
    877874#if HAVE(APP_LINKS)
     
    892889}
    893890
    894 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction& action, const ResourceRequest& request, FormState* formState, const String& frameName, WebCore::PolicyCheckIdentifier identifier, FramePolicyFunction&& function)
     891void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, WebCore::FormState* formState, const String& frameName, WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function)
    895892{
    896893    WebView *webView = getWebView(m_webFrame.get());
     
    898895
    899896    [[webView _policyDelegateForwarder] webView:webView
    900             decidePolicyForNewWindowAction:actionDictionary(action, formState)
    901                                    request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)
    902                               newFrameName:frameName
    903                           decisionListener:setUpPolicyListener(identifier, WTFMove(function), PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];
    904 }
    905 
    906 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const NavigationAction& action, const ResourceRequest& request, const ResourceResponse&, FormState* formState, PolicyDecisionMode, WebCore::PolicyCheckIdentifier identifier, FramePolicyFunction&& function)
     897        decidePolicyForNewWindowAction:actionDictionary(action, formState)
     898        request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody)
     899        newFrameName:frameName
     900        decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];
     901}
     902
     903void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse&, WebCore::FormState* formState, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function)
    907904{
    908905    WebView *webView = getWebView(m_webFrame.get());
     
    910907
    911908    [[webView _policyDelegateForwarder] webView:webView
    912                 decidePolicyForNavigationAction:actionDictionary(action, formState)
    913                                         request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)
    914                                           frame:m_webFrame.get()
    915                                decisionListener:setUpPolicyListener(identifier, WTFMove(function), PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];
     909        decidePolicyForNavigationAction:actionDictionary(action, formState)
     910        request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody)
     911        frame:m_webFrame.get()
     912        decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];
    916913}
    917914
     
    925922}
    926923
    927 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError& error)
     924void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const WebCore::ResourceError& error)
    928925{
    929926    WebView *webView = getWebView(m_webFrame.get());
     
    931928}
    932929
    933 static NSDictionary *makeFormFieldValuesDictionary(FormState& formState)
     930static NSDictionary *makeFormFieldValuesDictionary(WebCore::FormState& formState)
    934931{
    935932    auto& textFieldValues = formState.textFieldValues();
     
    952949}
    953950
    954 void WebFrameLoaderClient::dispatchWillSubmitForm(FormState& formState, CompletionHandler<void()>&& completionHandler)
     951void WebFrameLoaderClient::dispatchWillSubmitForm(WebCore::FormState& formState, CompletionHandler<void()>&& completionHandler)
    955952{
    956953    id <WebFormDelegate> formDelegate = [getWebView(m_webFrame.get()) _formDelegate];
     
    961958
    962959    NSDictionary *values = makeFormFieldValuesDictionary(formState);
    963     CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState.sourceDocument().frame()), kit(&formState.form()), values, setUpPolicyListener(PolicyCheckIdentifier { },
    964         [completionHandler = WTFMove(completionHandler)](PolicyAction, PolicyCheckIdentifier) mutable { completionHandler(); },
    965         PolicyAction::Ignore).get());
    966 }
    967 
    968 void WebFrameLoaderClient::revertToProvisionalState(DocumentLoader* loader)
     960    CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState.sourceDocument().frame()), kit(&formState.form()), values, setUpPolicyListener(WebCore::PolicyCheckIdentifier { },
     961        [completionHandler = WTFMove(completionHandler)](WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) mutable { completionHandler(); },
     962        WebCore::PolicyAction::Ignore).get());
     963}
     964
     965void WebFrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader* loader)
    969966{
    970967    [dataSource(loader) _revertToProvisionalState];
    971968}
    972969
    973 void WebFrameLoaderClient::setMainDocumentError(DocumentLoader* loader, const ResourceError& error)
     970void WebFrameLoaderClient::setMainDocumentError(WebCore::DocumentLoader* loader, const WebCore::ResourceError& error)
    974971{
    975972    [dataSource(loader) _setMainDocumentError:error];
     
    981978}
    982979
    983 void WebFrameLoaderClient::startDownload(const ResourceRequest& request, const String& /* suggestedName */)
     980void WebFrameLoaderClient::startDownload(const WebCore::ResourceRequest& request, const String& /* suggestedName */)
    984981{
    985982    // FIXME: Should download full request.
     
    987984}
    988985
    989 void WebFrameLoaderClient::willChangeTitle(DocumentLoader* loader)
     986void WebFrameLoaderClient::willChangeTitle(WebCore::DocumentLoader* loader)
    990987{
    991988#if !PLATFORM(IOS_FAMILY)
     
    995992}
    996993
    997 void WebFrameLoaderClient::didChangeTitle(DocumentLoader* loader)
     994void WebFrameLoaderClient::didChangeTitle(WebCore::DocumentLoader* loader)
    998995{
    999996#if !PLATFORM(IOS_FAMILY)
     
    10061003{
    10071004#if PLATFORM(IOS_FAMILY)
    1008     if (FrameView *view = core(m_webFrame.get())->view())
     1005    if (WebCore::FrameView *view = core(m_webFrame.get())->view())
    10091006        view->didReplaceMultipartContent();
    10101007#endif
    10111008}
    10121009
    1013 void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* data, int length)
     1010void WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length)
    10141011{
    10151012    NSData *nsData = [[NSData alloc] initWithBytesNoCopy:(void*)data length:length freeWhenDone:NO];
     
    10181015}
    10191016
    1020 void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
     1017void WebFrameLoaderClient::finishedLoading(WebCore::DocumentLoader* loader)
    10211018{
    10221019    [dataSource(loader) _finishedLoading];
     
    10331030{
    10341031    WebView* view = getWebView(m_webFrame.get());
    1035     DocumentLoader* loader = core(m_webFrame.get())->loader().documentLoader();
     1032    auto* loader = core(m_webFrame.get())->loader().documentLoader();
    10361033#if PLATFORM(IOS_FAMILY)
    10371034    if (loader->urlForHistory() == WTF::blankURL())
     
    10431040        if (implementations->navigatedFunc) {
    10441041            WebNavigationData *data = [[WebNavigationData alloc] initWithURLString:loader->url()
    1045                                                                              title:nilOrNSString(loader->title().string)
    1046                                                                    originalRequest:loader->originalRequestCopy().nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)
    1047                                                                           response:loader->response().nsURLResponse()
    1048                                                                  hasSubstituteData:loader->substituteData().isValid()
    1049                                                               clientRedirectSource:loader->clientRedirectSourceForHistory()];
     1042                title:nilOrNSString(loader->title().string)
     1043                originalRequest:loader->originalRequestCopy().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody)
     1044                response:loader->response().nsURLResponse()
     1045                hasSubstituteData:loader->substituteData().isValid()
     1046                clientRedirectSource:loader->clientRedirectSourceForHistory()];
    10501047
    10511048            CallHistoryDelegate(implementations->navigatedFunc, view, @selector(webView:didNavigateWithNavigationData:inFrame:), data, m_webFrame.get());
     
    10751072    WebHistoryDelegateImplementationCache* implementations = [view historyDelegate] ? WebViewGetHistoryDelegateImplementations(view) : 0;
    10761073   
    1077     DocumentLoader* loader = core(m_webFrame.get())->loader().documentLoader();
     1074    auto* loader = core(m_webFrame.get())->loader().documentLoader();
    10781075    ASSERT(loader->unreachableURL().isEmpty());
    10791076
     
    10991096}
    11001097
    1101 bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem& item) const
     1098bool WebFrameLoaderClient::shouldGoToHistoryItem(WebCore::HistoryItem& item) const
    11021099{
    11031100    WebView* view = getWebView(m_webFrame.get());
     
    11071104void WebFrameLoaderClient::didDisplayInsecureContent()
    11081105{
    1109     WebView *webView = getWebView(m_webFrame.get());   
     1106    WebView *webView = getWebView(m_webFrame.get());
    11101107    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
    11111108    if (implementations->didDisplayInsecureContentFunc)
     
    11131110}
    11141111
    1115 void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin& origin, const URL& insecureURL)
     1112void WebFrameLoaderClient::didRunInsecureContent(WebCore::SecurityOrigin& origin, const URL& insecureURL)
    11161113{
    11171114    WebView *webView = getWebView(m_webFrame.get());   
     
    11341131}
    11351132
    1136 ResourceError WebFrameLoaderClient::cancelledError(const ResourceRequest& request)
     1133WebCore::ResourceError WebFrameLoaderClient::cancelledError(const WebCore::ResourceRequest& request)
    11371134{
    11381135    return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled URL:request.url()];
    11391136}
    11401137   
    1141 ResourceError WebFrameLoaderClient::blockedError(const ResourceRequest& request)
     1138WebCore::ResourceError WebFrameLoaderClient::blockedError(const WebCore::ResourceRequest& request)
    11421139{
    11431140    return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorCannotUseRestrictedPort URL:request.url()];
    11441141}
    11451142
    1146 ResourceError WebFrameLoaderClient::blockedByContentBlockerError(const ResourceRequest& request)
     1143WebCore::ResourceError WebFrameLoaderClient::blockedByContentBlockerError(const WebCore::ResourceRequest& request)
    11471144{
    11481145    RELEASE_ASSERT_NOT_REACHED(); // Content blockers are not enabled in WebKit1.
    11491146}
    11501147
    1151 ResourceError WebFrameLoaderClient::cannotShowURLError(const ResourceRequest& request)
     1148WebCore::ResourceError WebFrameLoaderClient::cannotShowURLError(const WebCore::ResourceRequest& request)
    11521149{
    11531150    return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorCannotShowURL URL:request.url()];
    11541151}
    11551152
    1156 ResourceError WebFrameLoaderClient::interruptedForPolicyChangeError(const ResourceRequest& request)
     1153WebCore::ResourceError WebFrameLoaderClient::interruptedForPolicyChangeError(const WebCore::ResourceRequest& request)
    11571154{
    11581155    return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorFrameLoadInterruptedByPolicyChange URL:request.url()];
     
    11601157
    11611158#if ENABLE(CONTENT_FILTERING)
    1162 ResourceError WebFrameLoaderClient::blockedByContentFilterError(const ResourceRequest& request)
     1159WebCore::ResourceError WebFrameLoaderClient::blockedByContentFilterError(const WebCore::ResourceRequest& request)
    11631160{
    11641161    return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorFrameLoadBlockedByContentFilter URL:request.url()];
     
    11661163#endif
    11671164
    1168 ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const ResourceResponse& response)
     1165WebCore::ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const WebCore::ResourceResponse& response)
    11691166{
    11701167    return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:WebKitErrorCannotShowMIMEType URL:response.url()];
    11711168}
    11721169
    1173 ResourceError WebFrameLoaderClient::fileDoesNotExistError(const ResourceResponse& response)
     1170WebCore::ResourceError WebFrameLoaderClient::fileDoesNotExistError(const WebCore::ResourceResponse& response)
    11741171{
    11751172    return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist URL:response.url()];   
    11761173}
    11771174
    1178 ResourceError WebFrameLoaderClient::pluginWillHandleLoadError(const ResourceResponse& response)
     1175WebCore::ResourceError WebFrameLoaderClient::pluginWillHandleLoadError(const WebCore::ResourceResponse& response)
    11791176{
    11801177    NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInWillHandleLoad
     
    11861183}
    11871184
    1188 bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error)
     1185bool WebFrameLoaderClient::shouldFallBack(const WebCore::ResourceError& error)
    11891186{
    11901187    // FIXME: Needs to check domain.
     
    11941191}
    11951192
    1196 bool WebFrameLoaderClient::canHandleRequest(const ResourceRequest& request) const
    1197 {
    1198     return [WebView _canHandleRequest:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody) forMainFrame:core(m_webFrame.get())->isMainFrame()];
     1193bool WebFrameLoaderClient::canHandleRequest(const WebCore::ResourceRequest& request) const
     1194{
     1195    return [WebView _canHandleRequest:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) forMainFrame:core(m_webFrame.get())->isMainFrame()];
    11991196}
    12001197
     
    12281225}
    12291226
    1230 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem& item)
     1227void WebFrameLoaderClient::saveViewStateToItem(WebCore::HistoryItem& item)
    12311228{
    12321229#if PLATFORM(IOS_FAMILY)
     
    12501247void WebFrameLoaderClient::restoreViewState()
    12511248{
    1252     HistoryItem* currentItem = core(m_webFrame.get())->loader().history().currentItem();
     1249    WebCore::HistoryItem* currentItem = core(m_webFrame.get())->loader().history().currentItem();
    12531250    ASSERT(currentItem);
    12541251
     
    13341331}
    13351332
    1336 Ref<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
     1333Ref<WebCore::DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& substituteData)
    13371334{
    13381335    auto loader = WebDocumentLoaderMac::create(request, substituteData);
     
    13451342}
    13461343
    1347 void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
     1344void WebFrameLoaderClient::setTitle(const WebCore::StringWithDirection& title, const URL& url)
    13481345{
    13491346    WebView* view = getWebView(m_webFrame.get());
     
    13731370}
    13741371
    1375 void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame* cachedFrame)
     1372void WebFrameLoaderClient::savePlatformDataToCachedFrame(WebCore::CachedFrame* cachedFrame)
    13761373{
    13771374    cachedFrame->setCachedFramePlatformData(makeUnique<WebCachedFramePlatformData>(m_webFrame->_private->webFrameView.documentView));
     
    13841381}
    13851382
    1386 void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(CachedFrame* cachedFrame)
     1383void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(WebCore::CachedFrame* cachedFrame)
    13871384{
    13881385    WebCachedFramePlatformData* platformData = static_cast<WebCachedFramePlatformData*>(cachedFrame->cachedFramePlatformData());
     
    14601457
    14611458    // If we own the view, delete the old one - otherwise the render m_frame will take care of deleting the view.
    1462     Frame* coreFrame = core(m_webFrame.get());
    1463     Page* page = coreFrame->page();
     1459    auto* coreFrame = core(m_webFrame.get());
     1460    auto* page = coreFrame->page();
    14641461    bool isMainFrame = coreFrame->isMainFrame();
    14651462    if (isMainFrame && coreFrame->view())
    14661463        coreFrame->view()->setParentVisible(false);
    14671464    coreFrame->setView(nullptr);
    1468     auto coreView = FrameView::create(*coreFrame);
     1465    auto coreView = WebCore::FrameView::create(*coreFrame);
    14691466    coreFrame->setView(coreView.copyRef());
    14701467
     
    14871484    // will get the proper title.
    14881485    if (auto* documentLoader = [dataSource _documentLoader])
    1489         documentLoader->setTitle({ [dataSource pageTitle], TextDirection::LTR });
     1486        documentLoader->setTitle({ [dataSource pageTitle], WebCore::TextDirection::LTR });
    14901487
    14911488    if (auto* ownerElement = coreFrame->ownerElement())
    1492         coreFrame->view()->setCanHaveScrollbars(ownerElement->scrollingMode() != ScrollbarAlwaysOff);
     1489        coreFrame->view()->setCanHaveScrollbars(ownerElement->scrollingMode() != WebCore::ScrollbarAlwaysOff);
    14931490
    14941491    // If the document view implicitly became first responder, make sure to set the focused frame properly.
     
    15161513}
    15171514
    1518 RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(PolicyCheckIdentifier identifier, FramePolicyFunction&& function, PolicyAction defaultPolicy, NSURL *appLinkURL)
     1515RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function, WebCore::PolicyAction defaultPolicy, NSURL *appLinkURL)
    15191516{
    15201517    // FIXME: <rdar://5634381> We need to support multiple active policy listeners.
     
    15491546}
    15501547
    1551 NSDictionary *WebFrameLoaderClient::actionDictionary(const NavigationAction& action, FormState* formState) const
     1548NSDictionary *WebFrameLoaderClient::actionDictionary(const WebCore::NavigationAction& action, WebCore::FormState* formState) const
    15521549{
    15531550    unsigned modifierFlags = 0;
     
    15791576    if (auto mouseEventData = action.mouseEventData()) {
    15801577        WebElementDictionary *element = [[WebElementDictionary alloc]
    1581             initWithHitTestResult:core(m_webFrame.get())->eventHandler().hitTestResultAtPoint(mouseEventData->absoluteLocation, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowUserAgentShadowContent | HitTestRequest::AllowChildFrameContent)];
     1578            initWithHitTestResult:core(m_webFrame.get())->eventHandler().hitTestResultAtPoint(mouseEventData->absoluteLocation, WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent)];
    15821579        [result setObject:element forKey:WebActionElementKey];
    15831580        [element release];
     
    16021599   
    16031600    // We only cache pages if the back forward list is enabled and has a non-zero capacity.
    1604     Page* page = core(m_webFrame.get())->page();
     1601    auto* page = core(m_webFrame.get())->page();
    16051602    if (!page)
    16061603        return false;
    16071604   
    1608     BackForwardList& backForwardList = static_cast<BackForwardList&>(page->backForward().client());
     1605    auto& backForwardList = static_cast<BackForwardList&>(page->backForward().client());
    16091606    if (!backForwardList.enabled())
    16101607        return false;
     
    16161613}
    16171614
    1618 RefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement& ownerElement,
     1615RefPtr<WebCore::Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, WebCore::HTMLFrameOwnerElement& ownerElement,
    16191616    const String& referrer)
    16201617{
     
    16251622    WebFrameView *childView = [[WebFrameView alloc] init];
    16261623   
    1627     RefPtr<Frame> result = [WebFrame _createSubframeWithOwnerElement:&ownerElement frameName:name frameView:childView];
     1624    RefPtr<WebCore::Frame> result = [WebFrame _createSubframeWithOwnerElement:&ownerElement frameName:name frameView:childView];
    16281625    [childView release];
    16291626
     
    16501647}
    16511648
    1652 ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType)
     1649WebCore::ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType)
    16531650{
    16541651    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    16651662                // If no MIME type is specified, use a plug-in if we have one that can handle the extension.
    16661663                if ([getWebView(m_webFrame.get()) _pluginForExtension:extension])
    1667                     return ObjectContentType::PlugIn;
     1664                    return WebCore::ObjectContentType::PlugIn;
    16681665            }
    16691666        }
     
    16711668
    16721669    if (type.isEmpty())
    1673         return ObjectContentType::Frame; // Go ahead and hope that we can display the content.
    1674 
    1675     ObjectContentType plugInType = ObjectContentType::None;
     1670        return WebCore::ObjectContentType::Frame; // Go ahead and hope that we can display the content.
     1671
     1672    WebCore::ObjectContentType plugInType = WebCore::ObjectContentType::None;
    16761673    if ([getWebView(m_webFrame.get()) _pluginForMIMEType:type])
    1677         plugInType = ObjectContentType::PlugIn;
    1678 
    1679     if (MIMETypeRegistry::isSupportedImageMIMEType(type))
    1680         return ObjectContentType::Image;
    1681 
    1682     if (plugInType != ObjectContentType::None)
     1674        plugInType = WebCore::ObjectContentType::PlugIn;
     1675
     1676    if (WebCore::MIMETypeRegistry::isSupportedImageMIMEType(type))
     1677        return WebCore::ObjectContentType::Image;
     1678
     1679    if (plugInType != WebCore::ObjectContentType::None)
    16831680        return plugInType;
    16841681
    16851682    if ([m_webFrame->_private->webFrameView _viewClassForMIMEType:type])
    1686         return ObjectContentType::Frame;
    1687    
    1688     return ObjectContentType::None;
     1683        return WebCore::ObjectContentType::Frame;
     1684   
     1685    return WebCore::ObjectContentType::None;
    16891686
    16901687    END_BLOCK_OBJC_EXCEPTIONS;
    16911688
    1692     return ObjectContentType::None;
     1689    return WebCore::ObjectContentType::None;
    16931690}
    16941691
     
    17591756}
    17601757
    1761 class PluginWidget : public PluginViewBase {
     1758class PluginWidget : public WebCore::PluginViewBase {
    17621759public:
    1763     PluginWidget(NSView *view = 0)
    1764         : PluginViewBase(view)
     1760    PluginWidget(NSView *view = nil)
     1761        : WebCore::PluginViewBase(view)
    17651762    {
    17661763    }
    17671764   
    17681765private:
    1769     virtual void invalidateRect(const IntRect& rect)
     1766    virtual void invalidateRect(const WebCore::IntRect& rect)
    17701767    {
    17711768        [platformWidget() setNeedsDisplayInRect:rect];
     
    18431840    }
    18441841
    1845     virtual void handleEvent(Event& event)
     1842    virtual void handleEvent(WebCore::Event& event)
    18461843    {
    1847         Frame* frame = Frame::frameForWidget(*this);
     1844        auto* frame = WebCore::Frame::frameForWidget(*this);
    18481845        if (!frame)
    18491846            return;
    18501847       
    18511848        NSEvent* currentNSEvent = frame->eventHandler().currentNSEvent();
    1852         if (event.type() == eventNames().mousemoveEvent)
     1849        if (event.type() == WebCore::eventNames().mousemoveEvent)
    18531850            [(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent];
    1854         else if (event.type() == eventNames().mouseoverEvent)
     1851        else if (event.type() == WebCore::eventNames().mouseoverEvent)
    18551852            [(WebBaseNetscapePluginView *)platformWidget() handleMouseEntered:currentNSEvent];
    1856         else if (event.type() == eventNames().mouseoutEvent)
     1853        else if (event.type() == WebCore::eventNames().mouseoutEvent)
    18571854            [(WebBaseNetscapePluginView *)platformWidget() handleMouseExited:currentNSEvent];
    1858         else if (event.type() == eventNames().contextmenuEvent)
     1855        else if (event.type() == WebCore::eventNames().contextmenuEvent)
    18591856            event.setDefaultHandled(); // We don't know if the plug-in has handled mousedown event by displaying a context menu, so we never want WebKit to show a default one.
    18601857    }
     
    18671864
    18681865private:
    1869     virtual void notifyWidget(WidgetNotification notification)
     1866    virtual void notifyWidget(WebCore::WidgetNotification notification)
    18701867    {
    18711868        switch (notification) {
    1872         case WillPaintFlattened: {
     1869        case WebCore::WillPaintFlattened: {
    18731870            BEGIN_BLOCK_OBJC_EXCEPTIONS;
    18741871            [(WebBaseNetscapePluginView *)platformWidget() cacheSnapshot];
     
    18761873            break;
    18771874        }
    1878         case DidPaintFlattened: {
     1875        case WebCore::DidPaintFlattened: {
    18791876            BEGIN_BLOCK_OBJC_EXCEPTIONS;
    18801877            [(WebBaseNetscapePluginView *)platformWidget() clearCachedSnapshot];
     
    18971894{
    18981895#if PLATFORM(MAC)
    1899     auto loadPolicy = PluginBlacklist::loadPolicyForPluginVersion(pluginPackage.bundleIdentifier, pluginPackage.bundleVersion);
    1900     return loadPolicy == PluginBlacklist::LoadPolicy::BlockedForSecurity || loadPolicy == PluginBlacklist::LoadPolicy::BlockedForCompatibility;
     1896    auto loadPolicy = WebCore::PluginBlacklist::loadPolicyForPluginVersion(pluginPackage.bundleIdentifier, pluginPackage.bundleVersion);
     1897    return loadPolicy == WebCore::PluginBlacklist::LoadPolicy::BlockedForSecurity || loadPolicy == WebCore::PluginBlacklist::LoadPolicy::BlockedForCompatibility;
    19011898#else
    19021899    UNUSED_PARAM(pluginPackage);
     
    19051902}
    19061903
    1907 RefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement& element, const URL& url,
     1904RefPtr<WebCore::Widget> WebFrameLoaderClient::createPlugin(const WebCore::IntSize& size, WebCore::HTMLPlugInElement& element, const URL& url,
    19081905    const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
    19091906{
     
    19151912
    19161913    WebView *webView = getWebView(m_webFrame.get());
    1917     Document* document = core(m_webFrame.get())->document();
     1914    auto* document = core(m_webFrame.get())->document();
    19181915    NSURL *baseURL = document->baseURL();
    19191916    NSURL *pluginURL = url;
     
    19741971        if (shouldBlockPlugin(pluginPackage)) {
    19751972            errorCode = WebKitErrorBlockedPlugInVersion;
    1976             if (is<RenderEmbeddedObject>(element.renderer()))
    1977                 downcast<RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
     1973            if (is<WebCore::RenderEmbeddedObject>(element.renderer()))
     1974                downcast<WebCore::RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(WebCore::RenderEmbeddedObject::InsecurePluginVersion);
    19781975        } else {
    19791976            if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
     
    20052002        WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
    20062003        if (implementations->plugInFailedWithErrorFunc) {
    2007             URL pluginPageURL = document->completeURL(stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
     2004            URL pluginPageURL = document->completeURL(WebCore::stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
    20082005            if (!pluginPageURL.protocolIsInHTTPFamily())
    20092006                pluginPageURL = URL();
     
    20322029}
    20332030
    2034 void WebFrameLoaderClient::redirectDataToPlugin(Widget& pluginWidget)
     2031void WebFrameLoaderClient::redirectDataToPlugin(WebCore::Widget& pluginWidget)
    20352032{
    20362033    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    20542051}
    20552052   
    2056 RefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement& element, const URL& baseURL,
     2053RefPtr<WebCore::Widget> WebFrameLoaderClient::createJavaAppletWidget(const WebCore::IntSize& size, WebCore::HTMLAppletElement& element, const URL& baseURL,
    20572054    const Vector<String>& paramNames, const Vector<String>& paramValues)
    20582055{
     
    20722069        if (shouldBlockPlugin(pluginPackage)) {
    20732070            errorCode = WebKitErrorBlockedPlugInVersion;
    2074             if (is<RenderEmbeddedObject>(element.renderer()))
    2075                 downcast<RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
     2071            if (is<WebCore::RenderEmbeddedObject>(element.renderer()))
     2072                downcast<WebCore::RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(WebCore::RenderEmbeddedObject::InsecurePluginVersion);
    20762073        } else {
    20772074#if ENABLE(NETSCAPE_PLUGIN_API)
     
    21212118{
    21222119#if PLATFORM(MAC)
    2123     return WebGLBlacklist::shouldBlockWebGL();
     2120    return WebCore::WebGLBlacklist::shouldBlockWebGL();
    21242121#else
    21252122    return false;
     
    21292126WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const URL&) const
    21302127{
    2131     return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
     2128    return shouldBlockWebGL() ? WebCore::WebGLBlockCreation : WebCore::WebGLAllowCreation;
    21322129}
    21332130
    21342131WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const URL&) const
    21352132{
    2136     return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
     2133    return shouldBlockWebGL() ? WebCore::WebGLBlockCreation : WebCore::WebGLAllowCreation;
    21372134}
    21382135#endif // ENABLE(WEBGL)
    21392136
    2140 void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
     2137void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld& world)
    21412138{
    21422139    WebView *webView = getWebView(m_webFrame.get());
     
    21492146    }
    21502147
    2151     if (&world != &mainThreadNormalWorld())
     2148    if (&world != &WebCore::mainThreadNormalWorld())
    21522149        return;
    21532150
    2154     Frame *frame = core(m_webFrame.get());
    2155     ScriptController& script = frame->script();
     2151    auto* frame = core(m_webFrame.get());
     2152    auto& script = frame->script();
    21562153
    21572154#if JSC_OBJC_API_ENABLED
     
    21752172}
    21762173
    2177 Ref<FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
     2174Ref< WebCore::FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
    21782175{
    21792176    return WebFrameNetworkingContext::create(core(m_webFrame.get()));
     
    21942191
    21952192#if USE(QUICK_LOOK)
    2196 RefPtr<PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
     2193RefPtr<WebCore::PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
    21972194{
    21982195    class QuickLookDocumentWriter : public WebCore::PreviewLoaderClient {
     
    22342231        return nullptr;
    22352232
    2236     NSString *filePath = createTemporaryFileForQuickLook(fileName);
     2233    NSString *filePath = WebCore::createTemporaryFileForQuickLook(fileName);
    22372234    if (!filePath)
    22382235        return nullptr;
     
    22612258{
    22622259    auto* frame = core(m_webFrame.get());
    2263     DocumentLoader* documentLoader = frame->loader().documentLoader();
     2260    auto* documentLoader = frame->loader().documentLoader();
    22642261    ASSERT(documentLoader);
    22652262
     
    22902287    // To preserve that behavior we walk the list backwards.
    22912288    for (auto icon = icons.rbegin(); icon != icons.rend(); ++icon) {
    2292         if (icon->first.type != LinkIconType::Favicon || m_activeIconLoadCallbackID) {
     2289        if (icon->first.type != WebCore::LinkIconType::Favicon || m_activeIconLoadCallbackID) {
    22932290            documentLoader->didGetLoadDecisionForIcon(false, icon->second, 0);
    22942291            continue;
     
    23062303
    23072304#if !PLATFORM(IOS_FAMILY)
    2308 static NSImage *webGetNSImage(Image* image, NSSize size)
     2305static NSImage *webGetNSImage(WebCore::Image* image, NSSize size)
    23092306{
    23102307    ASSERT(size.width);
     
    23292326#endif // !PLATFORM(IOS_FAMILY)
    23302327
    2331 void WebFrameLoaderClient::finishedLoadingIcon(uint64_t callbackID, SharedBuffer* iconData)
     2328void WebFrameLoaderClient::finishedLoadingIcon(uint64_t callbackID, WebCore::SharedBuffer* iconData)
    23322329{
    23332330#if !PLATFORM(IOS_FAMILY)
     
    23402337        return;
    23412338
    2342     auto image = BitmapImage::create();
    2343     if (image->setData(iconData, true) < EncodedDataStatus::SizeAvailable)
     2339    auto image = WebCore::BitmapImage::create();
     2340    if (image->setData(iconData, true) < WebCore::EncodedDataStatus::SizeAvailable)
    23442341        return;
    23452342
     
    23642361}
    23652362
    2366 - (id)initWithFrame:(Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy
     2363- (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy
    23672364{
    23682365    self = [self init];
     
    23792376
    23802377#if HAVE(APP_LINKS)
    2381 - (id)initWithFrame:(Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy appLinkURL:(NSURL *)appLinkURL
     2378- (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy appLinkURL:(NSURL *)appLinkURL
    23822379{
    23832380    self = [self initWithFrame:frame identifier:identifier policyFunction:WTFMove(policyFunction) defaultPolicy:defaultPolicy];
     
    23952392    _frame = nullptr;
    23962393    if (auto policyFunction = std::exchange(_policyFunction, nullptr))
    2397         policyFunction(PolicyAction::Ignore, _identifier);
     2394        policyFunction(WebCore::PolicyAction::Ignore, _identifier);
    23982395}
    23992396
     
    24142411}
    24152412
    2416 - (void)receivedPolicyDecision:(PolicyAction)action
     2413- (void)receivedPolicyDecision:(WebCore::PolicyAction)action
    24172414{
    24182415    auto frame = WTFMove(_frame);
     
    24262423- (void)ignore
    24272424{
    2428     [self receivedPolicyDecision:PolicyAction::Ignore];
     2425    [self receivedPolicyDecision:WebCore::PolicyAction::Ignore];
    24292426}
    24302427
    24312428- (void)download
    24322429{
    2433     [self receivedPolicyDecision:PolicyAction::Download];
     2430    [self receivedPolicyDecision:WebCore::PolicyAction::Download];
    24342431}
    24352432
     
    24412438            WebThreadRun(^{
    24422439                if (success)
    2443                     [self receivedPolicyDecision:PolicyAction::Ignore];
     2440                    [self receivedPolicyDecision:WebCore::PolicyAction::Ignore];
    24442441                else
    2445                     [self receivedPolicyDecision:PolicyAction::Use];
     2442                    [self receivedPolicyDecision:WebCore::PolicyAction::Use];
    24462443            });
    24472444        }];
     
    24502447#endif
    24512448
    2452     [self receivedPolicyDecision:PolicyAction::Use];
     2449    [self receivedPolicyDecision:WebCore::PolicyAction::Use];
    24532450}
    24542451
    24552452- (void)continue
    24562453{
    2457     [self receivedPolicyDecision:PolicyAction::Use];
     2454    [self receivedPolicyDecision:WebCore::PolicyAction::Use];
    24582455}
    24592456
  • trunk/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm

    r189970 r250549  
    3838#include <WebCore/Page.h>
    3939
    40 using namespace WebCore;
    41 
    4240NSString *WebInspectorDidStartSearchingForNode = @"WebInspectorDidStartSearchingForNode";
    4341NSString *WebInspectorDidStopSearchingForNode = @"WebInspectorDidStopSearchingForNode";
     
    6765- (void)showWindow
    6866{
    69     if (Page* inspectedPage = core(_inspectedWebView))
     67    if (auto* inspectedPage = core(_inspectedWebView))
    7068        inspectedPage->inspectorController().show();
    7169}
     
    174172- (void)evaluateInFrontend:(id)sender script:(NSString *)script
    175173{
    176     if (Page* inspectedPage = core(_inspectedWebView))
     174    if (auto* inspectedPage = core(_inspectedWebView))
    177175        inspectedPage->inspectorController().evaluateForTestInFrontend(script);
    178176}
  • trunk/Source/WebKitLegacy/mac/WebView/WebClipView.mm

    r246285 r250549  
    2929#import "WebClipView.h"
    3030
     31#if !PLATFORM(IOS_FAMILY)
     32
    3133#import "WebFrameInternal.h"
    3234#import "WebFrameView.h"
     
    4244
    4345// FIXME: Change terminology from "additional clip" to "focus ring clip".
    44 
    45 using namespace WebCore;
    4646
    4747@interface NSView (WebViewMethod)
     
    9292        return [super visibleRect];
    9393
    94     if (Frame* coreFrame = core([webFrameView webFrame])) {
    95         if (FrameView* frameView = coreFrame->view()) {
     94    if (auto* coreFrame = core([webFrameView webFrame])) {
     95        if (auto* frameView = coreFrame->view()) {
    9696            if (frameView->isEnclosedInCompositingLayer())
    9797                return [self bounds];
     
    115115    // We may hit this immediate scrolling code during a layout operation trigged by an AppKit call. When
    116116    // this happens, WebCore will not paint. So, we need to mark this region dirty so that it paints properly.
    117     WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview];
     117    auto *webFrameView = (WebFrameView *)[[self superview] superview];
    118118    if ([webFrameView isKindOfClass:[WebFrameView class]]) {
    119         if (Frame* coreFrame = core([webFrameView webFrame])) {
    120             if (FrameView* frameView = coreFrame->view()) {
     119        if (auto* coreFrame = core([webFrameView webFrame])) {
     120            if (auto* frameView = coreFrame->view()) {
    121121                if (!frameView->layoutContext().inPaintableState())
    122122                    [self setNeedsDisplay:YES];
     
    172172
    173173@end
     174
     175#endif
  • trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm

    r243471 r250549  
    7676#endif
    7777
    78 using namespace WebCore;
    79 
    8078class WebDataSourcePrivate
    8179{
     
    321319            [markupString release];
    322320            return fragment;
    323         } else if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) {
     321        } else if (WebCore::MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) {
    324322            return [self _documentFragmentWithImageResource:mainResource];
    325323           
     
    398396}
    399397
    400 - (DocumentLoader*)_documentLoader
     398- (WebCore::DocumentLoader*)_documentLoader
    401399{
    402400    return toPrivate(_private)->loader.ptr();
     
    442440- (instancetype)initWithRequest:(NSURLRequest *)request
    443441{
    444     return [self _initWithDocumentLoader:WebDocumentLoaderMac::create(request, SubstituteData())];
     442    return [self _initWithDocumentLoader:WebDocumentLoaderMac::create(request, WebCore::SubstituteData())];
    445443}
    446444
     
    456454    // Added in -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:].
    457455    if (NSURL *url = [[self response] URL])
    458         removeQLPreviewConverterForURL(url);
     456        WebCore::removeQLPreviewConverterForURL(url);
    459457#endif
    460458
     
    466464- (NSData *)data
    467465{
    468     RefPtr<SharedBuffer> mainResourceData = toPrivate(_private)->loader->mainResourceData();
     466    RefPtr<WebCore::SharedBuffer> mainResourceData = toPrivate(_private)->loader->mainResourceData();
    469467    if (!mainResourceData)
    470468        return nil;
     
    479477- (WebFrame *)webFrame
    480478{
    481     if (Frame* frame = toPrivate(_private)->loader->frame())
     479    if (auto* frame = toPrivate(_private)->loader->frame())
    482480        return kit(frame);
    483481
     
    487485- (NSURLRequest *)initialRequest
    488486{
    489     return toPrivate(_private)->loader->originalRequest().nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody);
     487    return toPrivate(_private)->loader->originalRequest().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
    490488}
    491489
    492490- (NSMutableURLRequest *)request
    493491{
    494     FrameLoader* frameLoader = toPrivate(_private)->loader->frameLoader();
     492    auto* frameLoader = toPrivate(_private)->loader->frameLoader();
    495493    if (!frameLoader || !frameLoader->frameHasLoaded())
    496494        return nil;
    497495
    498496    // FIXME: this cast is dubious
    499     return (NSMutableURLRequest *)toPrivate(_private)->loader->request().nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody);
     497    return (NSMutableURLRequest *)toPrivate(_private)->loader->request().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
    500498}
    501499
     
    538536        return nil;
    539537       
    540     return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(*core([self webFrame]))] autorelease];
     538    return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:WebCore::LegacyWebArchive::create(*core([self webFrame]))] autorelease];
    541539}
    542540
  • trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm

    r249175 r250549  
    129129#endif
    130130
    131 using namespace WebCore;
    132 using namespace HTMLNames;
    133 
    134131using JSC::JSGlobalObject;
    135132using JSC::JSLock;
     
    200197@end
    201198
    202 EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
    203 {
     199WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
     200{
     201    using namespace WebCore;
    204202    switch (editableLinkBehavior) {
    205203        case WebKitEditableLinkDefaultBehavior:
     
    218216}
    219217
    220 TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior behavior)
    221 {
     218WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior behavior)
     219{
     220    using namespace WebCore;
    222221    switch (behavior) {
    223222        case WebTextDirectionSubmenuNeverIncluded:
     
    256255@implementation WebFrame (WebInternal)
    257256
    258 Frame* core(WebFrame *frame)
     257WebCore::Frame* core(WebFrame *frame)
    259258{
    260259    return frame ? frame->_private->coreFrame : 0;
    261260}
    262261
    263 WebFrame *kit(Frame* frame)
     262WebFrame *kit(WebCore::Frame* frame)
    264263{
    265264    if (!frame)
    266265        return nil;
    267266
    268     FrameLoaderClient& frameLoaderClient = frame->loader().client();
     267    WebCore::FrameLoaderClient& frameLoaderClient = frame->loader().client();
    269268    if (frameLoaderClient.isEmptyFrameLoaderClient())
    270269        return nil;
     
    273272}
    274273
    275 Page* core(WebView *webView)
     274WebCore::Page* core(WebView *webView)
    276275{
    277276    return [webView page];
    278277}
    279278
    280 WebView *kit(Page* page)
     279WebView *kit(WebCore::Page* page)
    281280{
    282281    if (!page)
     
    291290WebView *getWebView(WebFrame *webFrame)
    292291{
    293     Frame* coreFrame = core(webFrame);
     292    auto* coreFrame = core(webFrame);
    294293    if (!coreFrame)
    295294        return nil;
     
    297296}
    298297
    299 + (Ref<WebCore::Frame>)_createFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement
     298+ (Ref<WebCore::Frame>)_createFrameWithPage:(WebCore::Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement
    300299{
    301300    WebView *webView = kit(page);
    302301
    303302    WebFrame *frame = [[self alloc] _initWithWebFrameView:frameView webView:webView];
    304     auto coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
     303    auto coreFrame = WebCore::Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
    305304    [frame release];
    306305    frame->_private->coreFrame = coreFrame.ptr();
     
    319318}
    320319
    321 + (void)_createMainFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView
     320+ (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView
    322321{
    323322    WebView *webView = kit(page);
     
    334333}
    335334
    336 + (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:(HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView
     335+ (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView
    337336{
    338337    return [self _createFrameWithPage:ownerElement->document().frame()->page() frameName:name frameView:frameView ownerElement:ownerElement];
     
    347346static NSURL *createUniqueWebDataURL();
    348347
    349 + (void)_createMainFrameWithSimpleHTMLDocumentWithPage:(Page*)page frameView:(WebFrameView *)frameView style:(NSString *)style
     348+ (void)_createMainFrameWithSimpleHTMLDocumentWithPage:(WebCore::Page*)page frameView:(WebFrameView *)frameView style:(NSString *)style
    350349{
    351350    WebView *webView = kit(page);
     
    367366    // if the script debugger is attached before a document is created.  These calls use the debuggerWorld(), we will need to pass a world
    368367    // to be able to debug isolated worlds.
    369     if (!windowProxy.existingJSWindowProxy(debuggerWorld()))
    370         return;
    371 
    372     auto* globalObject = windowProxy.globalObject(debuggerWorld());
     368    if (!windowProxy.existingJSWindowProxy(WebCore::debuggerWorld()))
     369        return;
     370
     371    auto* globalObject = windowProxy.globalObject(WebCore::debuggerWorld());
    373372    if (!globalObject)
    374373        return;
     
    431430#endif
    432431
    433     Frame* coreFrame = _private->coreFrame;
    434     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     432    auto* coreFrame = _private->coreFrame;
     433    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    435434        // Don't call setDrawsBackground:YES here because it may be NO because of a load
    436435        // in progress; WebFrameLoaderClient keeps it set to NO during the load process.
     
    442441#endif
    443442
    444         if (FrameView* view = frame->view()) {
     443        if (auto* view = frame->view()) {
    445444            view->setTransparent(!drawsBackground);
    446445#if !PLATFORM(IOS_FAMILY)
    447446            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    448             Color color = colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
     447            WebCore::Color color = WebCore::colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
    449448            ALLOW_DEPRECATED_DECLARATIONS_END
    450449#else
    451             Color color = Color(backgroundColor);
     450            WebCore::Color color = WebCore::Color(backgroundColor);
    452451#endif
    453452            view->setBaseBackgroundColor(color);
     
    469468- (void)_unmarkAllBadGrammar
    470469{
    471     Frame* coreFrame = _private->coreFrame;
    472     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    473         if (Document* document = frame->document())
    474             document->markers().removeMarkers(DocumentMarker::Grammar);
     470    auto* coreFrame = _private->coreFrame;
     471    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     472        if (auto* document = frame->document())
     473            document->markers().removeMarkers(WebCore::DocumentMarker::Grammar);
    475474    }
    476475}
     
    479478{
    480479#if !PLATFORM(IOS_FAMILY)
    481     Frame* coreFrame = _private->coreFrame;
    482     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    483         if (Document* document = frame->document())
    484             document->markers().removeMarkers(DocumentMarker::Spelling);
     480    auto* coreFrame = _private->coreFrame;
     481    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     482        if (auto* document = frame->document())
     483            document->markers().removeMarkers(WebCore::DocumentMarker::Spelling);
    485484    }
    486485#endif
     
    493492    // optimization for common case to avoid creating potentially large selection string
    494493    if ([documentView isKindOfClass:[WebHTMLView class]])
    495         if (Frame* coreFrame = _private->coreFrame)
     494        if (auto* coreFrame = _private->coreFrame)
    496495            return coreFrame->selection().isRange();
    497496
     
    514513    // FIXME: 4186050 is one known case that makes this debug check fail.
    515514    BOOL found = NO;
    516     Frame* coreFrame = _private->coreFrame;
    517     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))
     515    auto* coreFrame = _private->coreFrame;
     516    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    518517        if ([kit(frame) _hasSelection]) {
    519518            if (found)
     
    521520            found = YES;
    522521        }
     522    }
    523523    return YES;
    524524}
     
    527527- (WebFrame *)_findFrameWithSelection
    528528{
    529     Frame* coreFrame = _private->coreFrame;
    530     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     529    auto* coreFrame = _private->coreFrame;
     530    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    531531        WebFrame *webFrame = kit(frame);
    532532        if ([webFrame _hasSelection])
     
    549549}
    550550
    551 static inline WebDataSource *dataSource(DocumentLoader* loader)
    552 {
    553     return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil;
    554 }
    555 
    556551- (WebDataSource *)_dataSource
    557552{
     
    573568#endif
    574569
    575 - (NSArray *)_nodesFromList:(Vector<Node*> *)nodesVector
     570- (NSArray *)_nodesFromList:(Vector<WebCore::Node*> *)nodesVector
    576571{
    577572    size_t size = nodesVector->size();
     
    589584- (NSString *)_stringForRange:(DOMRange *)range
    590585{
    591     return plainText(core(range), TextIteratorDefaultBehavior, true);
    592 }
    593 
    594 - (OptionSet<PaintBehavior>)_paintBehaviorForDestinationContext:(CGContextRef)context
     586    return plainText(core(range), WebCore::TextIteratorDefaultBehavior, true);
     587}
     588
     589- (OptionSet<WebCore::PaintBehavior>)_paintBehaviorForDestinationContext:(CGContextRef)context
    595590{
    596591#if PLATFORM(MAC)
     
    598593    BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen];
    599594    if (isPrinting)
    600         return OptionSet<PaintBehavior>(PaintBehavior::FlattenCompositingLayers) | PaintBehavior::Snapshotting;
     595        return OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::FlattenCompositingLayers) | WebCore::PaintBehavior::Snapshotting;
    601596#endif
    602597
    603598    if (CGContextGetType(context) != kCGContextTypeBitmap)
    604         return PaintBehavior::Normal;
     599        return WebCore::PaintBehavior::Normal;
    605600
    606601    // If we're drawing into a bitmap, we could be snapshotting or drawing into a layer-backed view.
    607602    if (WebHTMLView *documentView = [self _webHTMLDocumentView]) {
    608603#if PLATFORM(IOS_FAMILY)
    609         return [[documentView window] isInSnapshottingPaint] ? PaintBehavior::Snapshotting : PaintBehavior::Normal;
     604        return [[documentView window] isInSnapshottingPaint] ? WebCore::PaintBehavior::Snapshotting : WebCore::PaintBehavior::Normal;
    610605#endif
    611606#if PLATFORM(MAC)
    612607        if ([documentView _web_isDrawingIntoLayer])
    613             return PaintBehavior::Normal;
    614 #endif
    615     }
    616    
    617     return OptionSet<PaintBehavior>(PaintBehavior::FlattenCompositingLayers) | PaintBehavior::Snapshotting;
     608            return WebCore::PaintBehavior::Normal;
     609#endif
     610    }
     611   
     612    return OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::FlattenCompositingLayers) | WebCore::PaintBehavior::Snapshotting;
    618613}
    619614
     
    629624    CGContextRef ctx = WKGetCurrentGraphicsContext();
    630625#endif
    631     GraphicsContext context(ctx);
     626    WebCore::GraphicsContext context(ctx);
    632627
    633628#if PLATFORM(IOS_FAMILY)
     
    640635#endif
    641636
    642     FrameView* view = _private->coreFrame->view();
    643    
    644     OptionSet<PaintBehavior> oldBehavior = view->paintBehavior();
    645     OptionSet<PaintBehavior> paintBehavior = oldBehavior;
    646    
    647     if (Frame* parentFrame = _private->coreFrame->tree().parent()) {
     637    auto* view = _private->coreFrame->view();
     638   
     639    OptionSet<WebCore::PaintBehavior> oldBehavior = view->paintBehavior();
     640    OptionSet<WebCore::PaintBehavior> paintBehavior = oldBehavior;
     641   
     642    if (auto* parentFrame = _private->coreFrame->tree().parent()) {
    648643        // For subframes, we need to inherit the paint behavior from our parent
    649         if (FrameView* parentView = parentFrame ? parentFrame->view() : nullptr) {
    650             if (parentView->paintBehavior().contains(PaintBehavior::FlattenCompositingLayers))
    651                 paintBehavior.add(PaintBehavior::FlattenCompositingLayers);
     644        if (auto* parentView = parentFrame ? parentFrame->view() : nullptr) {
     645            if (parentView->paintBehavior().contains(WebCore::PaintBehavior::FlattenCompositingLayers))
     646                paintBehavior.add(WebCore::PaintBehavior::FlattenCompositingLayers);
    652647           
    653             if (parentView->paintBehavior().contains(PaintBehavior::Snapshotting))
    654                 paintBehavior.add(PaintBehavior::Snapshotting);
     648            if (parentView->paintBehavior().contains(WebCore::PaintBehavior::Snapshotting))
     649                paintBehavior.add(WebCore::PaintBehavior::Snapshotting);
    655650           
    656             if (parentView->paintBehavior().contains(PaintBehavior::TileFirstPaint))
    657                 paintBehavior.add(PaintBehavior::TileFirstPaint);
     651            if (parentView->paintBehavior().contains(WebCore::PaintBehavior::TileFirstPaint))
     652                paintBehavior.add(WebCore::PaintBehavior::TileFirstPaint);
    658653        }
    659654    } else
     
    663658
    664659    if (contentsOnly)
    665         view->paintContents(context, enclosingIntRect(rect));
     660        view->paintContents(context, WebCore::enclosingIntRect(rect));
    666661    else
    667         view->paint(context, enclosingIntRect(rect));
     662        view->paint(context, WebCore::enclosingIntRect(rect));
    668663
    669664    view->setPaintBehavior(oldBehavior);
     
    673668{
    674669    ASSERT_ARG(rect, rect);
    675     if (RenderWidget* ownerRenderer = _private->coreFrame->ownerRenderer()) {
     670    if (auto* ownerRenderer = _private->coreFrame->ownerRenderer()) {
    676671        if (ownerRenderer->needsLayout())
    677672            return NO;
     
    700695#if PLATFORM(IOS_FAMILY)
    701696    ASSERT(WebThreadIsLockedOrDisabled());
    702     JSC::ExecState* exec = _private->coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec();
     697    JSC::ExecState* exec = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec();
    703698    JSC::JSLockHolder jscLock(exec);
    704699#endif
     
    716711
    717712#if !PLATFORM(IOS_FAMILY)
    718     JSC::ExecState* exec = _private->coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec();
     713    JSC::ExecState* exec = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec();
    719714    JSC::JSLockHolder lock(exec);
    720715#endif
     
    722717}
    723718
    724 - (NSRect)_caretRectAtPosition:(const Position&)pos affinity:(NSSelectionAffinity)affinity
    725 {
    726     VisiblePosition visiblePosition(pos, static_cast<EAffinity>(affinity));
     719- (NSRect)_caretRectAtPosition:(const WebCore::Position&)pos affinity:(NSSelectionAffinity)affinity
     720{
     721    WebCore::VisiblePosition visiblePosition(pos, static_cast<WebCore::EAffinity>(affinity));
    727722    return visiblePosition.absoluteCaretBounds();
    728723}
     
    737732    bool insideFixed = false; // FIXME: get via firstRectForRange().
    738733    NSRect rangeRect = [self _firstRectForDOMRange:range];   
    739     Node *startNode = core([range startContainer]);
     734    auto* startNode = core([range startContainer]);
    740735       
    741736    if (startNode && startNode->renderer()) {
    742737#if !PLATFORM(IOS_FAMILY)
    743         startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded, ShouldAllowCrossOriginScrolling::Yes });
     738        startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes });
    744739#else
    745         RenderLayer* layer = startNode->renderer()->enclosingLayer();
     740        auto* layer = startNode->renderer()->enclosingLayer();
    746741        if (layer) {
    747742            layer->setAdjustForIOSCaretWhenScrolling(true);
    748             startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded, ShouldAllowCrossOriginScrolling::Yes });
     743            startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes });
    749744            layer->setAdjustForIOSCaretWhenScrolling(false);
    750745            _private->coreFrame->selection().setCaretRectNeedsUpdate();
     
    760755    bool insideFixed = false; // FIXME: get via firstRectForRange().
    761756    NSRect rangeRect = NSInsetRect([self _firstRectForDOMRange:range], inset, inset);
    762     Node *startNode = core([range startContainer]);
     757    auto* startNode = core([range startContainer]);
    763758
    764759    if (startNode && startNode->renderer()) {
    765         RenderLayer* layer = startNode->renderer()->enclosingLayer();
     760        auto* layer = startNode->renderer()->enclosingLayer();
    766761        if (layer) {
    767762            layer->setAdjustForIOSCaretWhenScrolling(true);
    768             startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded, ShouldAllowCrossOriginScrolling::Yes});
     763            startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes});
    769764            layer->setAdjustForIOSCaretWhenScrolling(false);
    770765
    771             Frame *coreFrame = core(self);
     766            auto* coreFrame = core(self);
    772767            if (coreFrame) {
    773                 FrameSelection& frameSelection = coreFrame->selection();
     768                auto& frameSelection = coreFrame->selection();
    774769                frameSelection.setCaretRectNeedsUpdate();
    775770                frameSelection.updateAppearance();
     
    786781
    787782#if !PLATFORM(IOS_FAMILY)
    788 - (DOMRange *)_rangeByAlteringCurrentSelection:(FrameSelection::EAlteration)alteration direction:(SelectionDirection)direction granularity:(TextGranularity)granularity
     783- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::FrameSelection::EAlteration)alteration direction:(WebCore::SelectionDirection)direction granularity:(WebCore::TextGranularity)granularity
    789784{
    790785    if (_private->coreFrame->selection().isNone())
    791786        return nil;
    792787
    793     FrameSelection selection;
     788    WebCore::FrameSelection selection;
    794789    selection.setSelection(_private->coreFrame->selection().selection());
    795790    selection.modify(alteration, direction, granularity);
     
    798793#endif
    799794
    800 - (TextGranularity)_selectionGranularity
     795- (WebCore::TextGranularity)_selectionGranularity
    801796{
    802797    return _private->coreFrame->selection().granularity();
    803798}
    804799
    805 - (NSRange)_convertToNSRange:(Range *)range
     800- (NSRange)_convertToNSRange:(WebCore::Range *)range
    806801{
    807802    if (!range)
     
    810805    size_t location;
    811806    size_t length;
    812     if (!TextIterator::getLocationAndLengthFromRange(_private->coreFrame->selection().rootEditableElementOrDocumentElement(), range, location, length))
     807    if (!WebCore::TextIterator::getLocationAndLengthFromRange(_private->coreFrame->selection().rootEditableElementOrDocumentElement(), range, location, length))
    813808        return NSMakeRange(NSNotFound, 0);
    814809
     
    816811}
    817812
    818 - (RefPtr<Range>)_convertToDOMRange:(NSRange)nsrange
     813- (RefPtr<WebCore::Range>)_convertToDOMRange:(NSRange)nsrange
    819814{
    820815    return [self _convertToDOMRange:nsrange rangeIsRelativeTo:WebRangeIsRelativeTo::EditableRoot];
    821816}
    822817
    823 - (RefPtr<Range>)_convertToDOMRange:(NSRange)nsrange rangeIsRelativeTo:(WebRangeIsRelativeTo)rangeIsRelativeTo
     818- (RefPtr<WebCore::Range>)_convertToDOMRange:(NSRange)nsrange rangeIsRelativeTo:(WebRangeIsRelativeTo)rangeIsRelativeTo
    824819{
    825820    if (nsrange.location > INT_MAX)
     
    835830        // to use the root editable element of the selection start as the positional base.
    836831        // That fits with AppKit's idea of an input context.
    837         Element* element = _private->coreFrame->selection().rootEditableElementOrDocumentElement();
     832        auto* element = _private->coreFrame->selection().rootEditableElementOrDocumentElement();
    838833        if (!element)
    839834            return nil;
    840         return TextIterator::rangeFromLocationAndLength(element, nsrange.location, nsrange.length);
     835        return WebCore::TextIterator::rangeFromLocationAndLength(element, nsrange.location, nsrange.length);
    841836    }
    842837
    843838    ASSERT(rangeIsRelativeTo == WebRangeIsRelativeTo::Paragraph);
    844839
    845     const VisibleSelection& selection = _private->coreFrame->selection().selection();
    846     RefPtr<Range> selectedRange = selection.toNormalizedRange();
     840    const auto& selection = _private->coreFrame->selection().selection();
     841    RefPtr<WebCore::Range> selectedRange = selection.toNormalizedRange();
    847842    if (!selectedRange)
    848843        return nullptr;
    849844
    850     RefPtr<Range> paragraphRange = makeRange(startOfParagraph(selection.visibleStart()), selection.visibleEnd());
     845    RefPtr<WebCore::Range> paragraphRange = makeRange(startOfParagraph(selection.visibleStart()), selection.visibleEnd());
    851846    if (!paragraphRange)
    852847        return nullptr;
    853848
    854     ContainerNode& rootNode = paragraphRange.get()->startContainer().treeScope().rootNode();
    855     int paragraphStartIndex = TextIterator::rangeLength(Range::create(rootNode.document(), &rootNode, 0, &paragraphRange->startContainer(), paragraphRange->startOffset()).ptr());
    856     return TextIterator::rangeFromLocationAndLength(&rootNode, paragraphStartIndex + static_cast<int>(nsrange.location), nsrange.length);
     849    auto& rootNode = paragraphRange.get()->startContainer().treeScope().rootNode();
     850    int paragraphStartIndex = WebCore::TextIterator::rangeLength(WebCore::Range::create(rootNode.document(), &rootNode, 0, &paragraphRange->startContainer(), paragraphRange->startOffset()).ptr());
     851    return WebCore::TextIterator::rangeFromLocationAndLength(&rootNode, paragraphStartIndex + static_cast<int>(nsrange.location), nsrange.length);
    857852}
    858853
     
    874869- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString
    875870{
    876     Frame* frame = _private->coreFrame;
     871    auto* frame = _private->coreFrame;
    877872    if (!frame)
    878873        return nil;
    879874
    880     Document* document = frame->document();
     875    auto* document = frame->document();
    881876    if (!document)
    882877        return nil;
    883878
    884     return kit(createFragmentFromMarkup(*document, markupString, baseURLString, DisallowScriptingContent).ptr());
     879    return kit(createFragmentFromMarkup(*document, markupString, baseURLString, WebCore::DisallowScriptingContent).ptr());
    885880}
    886881
    887882- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes
    888883{
    889     Frame* frame = _private->coreFrame;
     884    auto* frame = _private->coreFrame;
    890885    if (!frame)
    891886        return nil;
    892887
    893     Document* document = frame->document();
     888    auto* document = frame->document();
    894889    if (!document)
    895890        return nil;
    896891
    897892    NSEnumerator *nodeEnum = [nodes objectEnumerator];
    898     Vector<Node*> nodesVector;
     893    Vector<WebCore::Node*> nodesVector;
    899894    DOMNode *node;
    900895    while ((node = [nodeEnum nextObject]))
     
    927922}
    928923
    929 - (VisiblePosition)_visiblePositionForPoint:(NSPoint)point
     924- (WebCore::VisiblePosition)_visiblePositionForPoint:(NSPoint)point
    930925{
    931926    // FIXME: Someone with access to Apple's sources could remove this needless wrapper call.
    932     return _private->coreFrame->visiblePositionForPoint(IntPoint(point));
     927    return _private->coreFrame->visiblePositionForPoint(WebCore::IntPoint(point));
    933928}
    934929
    935930- (DOMRange *)_characterRangeAtPoint:(NSPoint)point
    936931{
    937     return kit(_private->coreFrame->rangeForPoint(IntPoint(point)).get());
     932    return kit(_private->coreFrame->rangeForPoint(WebCore::IntPoint(point)).get());
    938933}
    939934
     
    942937    if (!_private->coreFrame)
    943938        return nil;
    944     RefPtr<MutableStyleProperties> typingStyle = _private->coreFrame->selection().copyTypingStyle();
     939    RefPtr<WebCore::MutableStyleProperties> typingStyle = _private->coreFrame->selection().copyTypingStyle();
    945940    if (!typingStyle)
    946941        return nil;
     
    948943}
    949944
    950 - (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
     945- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction
    951946{
    952947    if (!_private->coreFrame || !style)
    953948        return;
    954949    // FIXME: We shouldn't have to create a copy here.
    955     Ref<MutableStyleProperties> properties(core(style)->copyProperties());
     950    Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties());
    956951    _private->coreFrame->editor().computeAndSetTypingStyle(properties.get(), undoAction);
    957952}
     
    962957    if (!_private->coreFrame)
    963958        return;
    964     FrameView* view = _private->coreFrame->view();
     959    auto* view = _private->coreFrame->view();
    965960    if (!view)
    966961        return;
    967962    // FIXME: These are fake modifier keys here, but they should be real ones instead.
    968     PlatformMouseEvent event(IntPoint(windowLoc), IntPoint(globalPoint(windowLoc, [view->platformWidget() window])),
    969                              LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, WallTime::now(), WebCore::ForceAtClick, WebCore::NoTap);
    970     _private->coreFrame->eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
     963    WebCore::PlatformMouseEvent event(WebCore::IntPoint(windowLoc), WebCore::IntPoint(WebCore::globalPoint(windowLoc, [view->platformWidget() window])),
     964        WebCore::LeftButton, WebCore::PlatformEvent::MouseMoved, 0, false, false, false, false, WallTime::now(), WebCore::ForceAtClick, WebCore::NoTap);
     965    _private->coreFrame->eventHandler().dragSourceEndedAt(event, (WebCore::DragOperation)operation);
    971966}
    972967#endif // ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)
     
    974969- (BOOL)_canProvideDocumentSource
    975970{
    976     Frame* frame = _private->coreFrame;
     971    auto* frame = _private->coreFrame;
    977972    String mimeType = frame->document()->loader()->writer().mimeType();
    978     PluginData* pluginData = frame->page() ? &frame->page()->pluginData() : 0;
     973    auto* pluginData = frame->page() ? &frame->page()->pluginData() : 0;
    979974
    980975    if (WebCore::MIMETypeRegistry::isTextMIMEType(mimeType)
    981         || Image::supportsType(mimeType)
    982         || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, PluginData::AllPlugins) && frame->loader().subframeLoader().allowPlugins())
    983         || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, PluginData::OnlyApplicationPlugins)))
     976        || WebCore::Image::supportsType(mimeType)
     977        || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::AllPlugins) && frame->loader().subframeLoader().allowPlugins())
     978        || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::OnlyApplicationPlugins)))
    984979        return NO;
    985980
     
    997992{
    998993    // FIXME: This really should be a setting.
    999     Document* document = _private->coreFrame->document();
     994    auto* document = _private->coreFrame->document();
    1000995    document->setShouldCreateRenderers(_private->shouldCreateRenderers);
    1001996
     
    10101005- (BOOL)_isDescendantOfFrame:(WebFrame *)ancestor
    10111006{
    1012     Frame* coreFrame = _private->coreFrame;
     1007    auto* coreFrame = _private->coreFrame;
    10131008    return coreFrame && coreFrame->tree().isDescendantOf(core(ancestor));
    10141009}
     
    10251020#endif
    10261021{
    1027     Document* document = _private->coreFrame->document();
     1022    auto* document = _private->coreFrame->document();
    10281023    if (!document)
    10291024        return nil;
     
    10311026    if (!body)
    10321027        return nil;
    1033     RenderObject* bodyRenderer = body->renderer();
     1028    auto* bodyRenderer = body->renderer();
    10341029    if (!bodyRenderer)
    10351030        return nil;
    1036     Color color = bodyRenderer->style().visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor);
     1031    WebCore::Color color = bodyRenderer->style().visitedDependentColorWithColorFilter(WebCore::CSSPropertyBackgroundColor);
    10371032    if (!color.isValid())
    10381033        return nil;
     
    10461041- (BOOL)_isFrameSet
    10471042{
    1048     Document* document = _private->coreFrame->document();
     1043    auto* document = _private->coreFrame->document();
    10491044    return document && document->isFrameSet();
    10501045}
     
    10571052- (BOOL)_isVisuallyNonEmpty
    10581053{
    1059     if (FrameView* view = _private->coreFrame->view())
     1054    if (auto* view = _private->coreFrame->view())
    10601055        return view->isVisuallyNonEmpty();
    10611056    return NO;
    10621057}
    10631058
    1064 static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType)
    1065 {
     1059static WebFrameLoadType toWebFrameLoadType(WebCore::FrameLoadType frameLoadType)
     1060{
     1061    using namespace WebCore;
    10661062    switch (frameLoadType) {
    10671063    case FrameLoadType::Standard:
     
    11151111- (NSArray *)_rectsForRange:(DOMRange *)domRange
    11161112{
    1117     Range *range = core(domRange);
    1118    
    1119    
    1120     Vector<IntRect> intRects;
     1113    auto* range = core(domRange);
     1114   
     1115    Vector<WebCore::IntRect> intRects;
    11211116    range->absoluteTextRects(intRects, NO);
    11221117    unsigned size = intRects.size();
     
    11321127- (DOMRange *)_selectionRangeForFirstPoint:(CGPoint)first secondPoint:(CGPoint)second
    11331128{
    1134     VisiblePosition firstPos = [self _visiblePositionForPoint:first];
    1135     VisiblePosition secondPos = [self _visiblePositionForPoint:second];
    1136     VisibleSelection selection(firstPos, secondPos);
     1129    WebCore::VisiblePosition firstPos = [self _visiblePositionForPoint:first];
     1130    WebCore::VisiblePosition secondPos = [self _visiblePositionForPoint:second];
     1131    WebCore::VisibleSelection selection(firstPos, secondPos);
    11371132    DOMRange *range = kit(selection.toNormalizedRange().get());
    11381133    return range;   
     
    11411136- (DOMRange *)_selectionRangeForPoint:(CGPoint)point
    11421137{
    1143     VisiblePosition pos = [self _visiblePositionForPoint:point];   
    1144     VisibleSelection selection(pos);
     1138    WebCore::VisiblePosition pos = [self _visiblePositionForPoint:point];
     1139    WebCore::VisibleSelection selection(pos);
    11451140    DOMRange *range = kit(selection.toNormalizedRange().get());
    11461141    return range;
     
    11561151- (void)_selectNSRange:(NSRange)range
    11571152{
    1158     RefPtr<Range> domRange = [self _convertToDOMRange:range];
     1153    RefPtr<WebCore::Range> domRange = [self _convertToDOMRange:range];
    11591154    if (domRange)
    1160         _private->coreFrame->selection().setSelection(VisibleSelection(*domRange, SEL_DEFAULT_AFFINITY));
     1155        _private->coreFrame->selection().setSelection(WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY));
    11611156}
    11621157
    11631158- (BOOL)_isDisplayingStandaloneImage
    11641159{
    1165     Document* document = _private->coreFrame->document();
     1160    auto* document = _private->coreFrame->document();
    11661161    return document && document->isImageDocument();
    11671162}
     
    11751170- (void)_recursive_resumeNullEventsForAllNetscapePlugins
    11761171{
    1177     Frame* coreFrame = core(self);
    1178     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     1172    auto* coreFrame = core(self);
     1173    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    11791174        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
    11801175        if ([documentView isKindOfClass:[WebHTMLView class]])
     
    11851180- (void)_recursive_pauseNullEventsForAllNetscapePlugins
    11861181{
    1187     Frame* coreFrame = core(self);
    1188     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     1182    auto* coreFrame = core(self);
     1183    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    11891184        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
    11901185        if ([documentView isKindOfClass:[WebHTMLView class]])
     
    12041199{
    12051200    if ([self _webHTMLDocumentView]) {
    1206         if (Frame* coreFrame = _private->coreFrame)
     1201        if (auto* coreFrame = _private->coreFrame)
    12071202            coreFrame->setTimersPaused(flag);
    12081203    }
     
    12241219{
    12251220    if ([self _webHTMLDocumentView]) {
    1226         if (Frame* coreFrame = _private->coreFrame)
     1221        if (auto* coreFrame = _private->coreFrame)
    12271222            coreFrame->dispatchPageHideEventBeforePause();
    12281223    }
     
    12321227{
    12331228    if ([self _webHTMLDocumentView]) {
    1234         if (Frame* coreFrame = _private->coreFrame)
     1229        if (auto* coreFrame = _private->coreFrame)
    12351230            coreFrame->dispatchPageShowEventBeforeResume();
    12361231    }
     
    12441239- (void)selectWithoutClosingTypingNSRange:(NSRange)range
    12451240{
    1246     RefPtr<Range> domRange = [self _convertToDOMRange:range];
     1241    RefPtr<WebCore::Range> domRange = [self _convertToDOMRange:range];
    12471242    if (domRange) {
    1248         const VisibleSelection& newSelection = VisibleSelection(*domRange, SEL_DEFAULT_AFFINITY);
     1243        const auto& newSelection = WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY);
    12491244        _private->coreFrame->selection().setSelection(newSelection, { });
    12501245       
     
    12891284{
    12901285    ASSERT(!WebThreadIsEnabled() || WebThreadIsLocked());
    1291     FrameLoader& frameLoader = _private->coreFrame->loader();
     1286    auto& frameLoader = _private->coreFrame->loader();
    12921287    auto* item = frameLoader.history().currentItem();
    12931288    if (item)
     
    13021297        [webView _setDeviceOrientation:[[webView _UIKitDelegateForwarder] deviceOrientation]];
    13031298#endif
    1304         if (WebCore::Frame* frame = core(self))
     1299        if (auto* frame = core(self))
    13051300            frame->orientationChanged();
    13061301    });
     
    13161311- (CGSize)renderedSizeOfNode:(DOMNode *)node constrainedToWidth:(float)width
    13171312{
    1318     Node* n = core(node);
    1319     RenderObject* renderer = n ? n->renderer() : nullptr;
     1313    WebCore::Node* n = core(node);
     1314    auto* renderer = n ? n->renderer() : nullptr;
    13201315    float w = std::min((float)renderer->maxPreferredLogicalWidth(), width);
    1321     return is<RenderBox>(renderer) ? CGSizeMake(w, downcast<RenderBox>(*renderer).height()) : CGSizeMake(0, 0);
     1316    return is<WebCore::RenderBox>(renderer) ? CGSizeMake(w, downcast<WebCore::RenderBox>(*renderer).height()) : CGSizeMake(0, 0);
    13221317}
    13231318
     
    13251320{
    13261321    WebCore::Frame *frame = core(self);
    1327     return kit(frame->deepestNodeAtLocation(FloatPoint(aViewportLocation)));
     1322    return kit(frame->deepestNodeAtLocation(WebCore::FloatPoint(aViewportLocation)));
    13281323}
    13291324
     
    13311326{
    13321327    WebCore::Frame *frame = core(self);
    1333     WebCore::Node *node = frame->nodeRespondingToScrollWheelEvents(FloatPoint(aViewportLocation));
     1328    WebCore::Node *node = frame->nodeRespondingToScrollWheelEvents(WebCore::FloatPoint(aViewportLocation));
    13341329    return kit(node);
    13351330}
     
    13381333{
    13391334    WebCore::Frame *frame = core(self);
    1340     FloatPoint viewportLocation(*aViewportLocation);
    1341     FloatPoint adjustedLocation;
     1335    WebCore::FloatPoint viewportLocation(*aViewportLocation);
     1336    WebCore::FloatPoint adjustedLocation;
    13421337    WebCore::Node *node = frame->approximateNodeAtViewportLocationLegacy(viewportLocation, adjustedLocation);
    13431338    *aViewportLocation = adjustedLocation;
     
    13631358{
    13641359    WebCore::Frame *frame = core(self);
    1365     RevealExtentOption revealExtentOption = revealExtent ? RevealExtent : DoNotRevealExtent;
    1366     frame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption);
     1360    WebCore::RevealExtentOption revealExtentOption = revealExtent ? WebCore::RevealExtent : WebCore::DoNotRevealExtent;
     1361    frame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption);
    13671362}
    13681363
     
    14291424- (void)setCaretColor:(CGColorRef)color
    14301425{
    1431     Color qColor = color ? Color(color) : Color::black;
     1426    WebCore::Color qColor = color ? WebCore::Color(color) : WebCore::Color::black;
    14321427    WebCore::Frame *frame = core(self);
    14331428    frame->selection().setCaretColor(qColor);
     
    14501445- (BOOL)isTelephoneNumberParsingAllowed
    14511446{
    1452     Document *document = core(self)->document();
     1447    auto* document = core(self)->document();
    14531448    return document->isTelephoneNumberParsingAllowed();
    14541449}
     
    14561451- (BOOL)isTelephoneNumberParsingEnabled
    14571452{
    1458     Document *document = core(self)->document();
     1453    auto* document = core(self)->document();
    14591454    return document->isTelephoneNumberParsingEnabled();
    14601455}
     
    14741469    // This does not happen automatically on iOS because we don't forward
    14751470    // all the click events to WebKit.
    1476     if (FrameView* frameView = frame->view()) {
     1471    if (auto* frameView = frame->view()) {
    14771472        if (NSView *documentView = frameView->documentView()) {
    1478             Page* page = frame->page();
     1473            auto* page = frame->page();
    14791474            if (!page)
    14801475                return;
     
    14831478    }
    14841479
    1485     frame->selection().setSelectedRange(core(range), (EAffinity)affinity, closeTyping ? FrameSelection::ShouldCloseTyping::Yes : FrameSelection::ShouldCloseTyping::No);
     1480    frame->selection().setSelectedRange(core(range), (WebCore::EAffinity)affinity, closeTyping ? WebCore::FrameSelection::ShouldCloseTyping::Yes : WebCore::FrameSelection::ShouldCloseTyping::No);
    14861481    if (!closeTyping)
    14871482        frame->editor().ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping();
     
    16171612    WebCore::Frame *frame = core(self);
    16181613
    1619     Document *doc = frame->document();
     1614    WebCore::Document* doc = frame->document();
    16201615    if (!doc)
    16211616        return;
    16221617
    1623     Node* node = core(element);
     1618    auto* node = core(element);
    16241619    if (!node->isConnected())
    16251620        return;
     
    16431638        return;
    16441639   
    1645     Vector<CompositionUnderline> underlines;
     1640    Vector<WebCore::CompositionUnderline> underlines;
    16461641    frame->page()->chrome().client().suppressFormNotifications();
    16471642    frame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange));
     
    16551650        return;
    16561651       
    1657     Vector<CompositionUnderline> underlines;
     1652    Vector<WebCore::CompositionUnderline> underlines;
    16581653    frame->editor().setComposition(text, underlines, 0, [text length]);
    16591654}
     
    17241719    NSMutableArray *metadatas = [NSMutableArray array];
    17251720   
    1726     Frame* frame = core(self);
    1727     Document* document = frame->document();
    1728 
    1729     const VisibleSelection& selection = frame->selection().selection();
    1730     Element* root = selection.selectionType() == VisibleSelection::NoSelection ? frame->document()->bodyOrFrameset() : selection.rootEditableElement();
     1721    auto* frame = core(self);
     1722    auto* document = frame->document();
     1723
     1724    const auto& selection = frame->selection().selection();
     1725    WebCore::Element* root = selection.selectionType() == WebCore::VisibleSelection::NoSelection ? frame->document()->bodyOrFrameset() : selection.rootEditableElement();
    17311726   
    17321727    DOMRange *previousDOMRange = nil;
    17331728    id previousMetadata = nil;
    17341729   
    1735     for (Node* node = root; node; node = NodeTraversal::next(*node)) {
     1730    for (WebCore::Node* node = root; node; node = WebCore::NodeTraversal::next(*node)) {
    17361731        auto markers = document->markers().markersFor(*node);
    17371732        for (auto* marker : markers) {
    17381733
    1739             if (marker->type() != DocumentMarker::DictationResult)
     1734            if (marker->type() != WebCore::DocumentMarker::DictationResult)
    17401735                continue;
    17411736           
     
    17471742                continue;
    17481743           
    1749             auto range = Range::create(*document, node, marker->startOffset(), node, marker->endOffset());
     1744            auto range = WebCore::Range::create(*document, node, marker->startOffset(), node, marker->endOffset());
    17501745            DOMRange *domRange = kit(range.ptr());
    17511746           
     
    17811776        return nil;
    17821777   
    1783     auto markers = core(self)->document()->markers().markersInRange(*core(range), DocumentMarker::DictationResult);
     1778    auto markers = core(self)->document()->markers().markersInRange(*core(range), WebCore::DocumentMarker::DictationResult);
    17841779   
    17851780    // UIKit should only ever give us a DOMRange for a phrase with alternatives, which should not be part of more than one result.
     
    18051800    WebCore::TextEncoding encoding(textEncodingName);
    18061801    if (!encoding.isValid())
    1807         encoding = WindowsLatin1Encoding();
     1802        encoding = WebCore::WindowsLatin1Encoding();
    18081803    return encoding.decode(reinterpret_cast<const char*>([data bytes]), [data length]);
    18091804}
     
    18391834    CTFontRef font = nil;
    18401835    if (_private->coreFrame) {
    1841         const Font
    1842         * fd = _private->coreFrame->editor().fontForSelection(multipleFonts);
     1836        const WebCore::Font* fd = _private->coreFrame->editor().fontForSelection(multipleFonts);
    18431837        if (fd)
    18441838            font = fd->getCTFont();
     
    18591853{
    18601854    ASSERT(WebThreadIsLockedOrDisabled());
    1861     if (FrameView* view = _private->coreFrame->view())
     1855    if (auto* view = _private->coreFrame->view())
    18621856        view->setWasScrolledByUser(true);
    18631857}
     
    18861880- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
    18871881{
    1888     RefPtr<Range> range = _private->coreFrame->selection().toNormalizedRange();
     1882    RefPtr<WebCore::Range> range = _private->coreFrame->selection().toNormalizedRange();
    18891883
    18901884    DOMDocumentFragment* fragment = range ? kit(createFragmentFromText(*range, text).ptr()) : nil;
     
    19121906        return;
    19131907   
    1914     Frame* coreFrame = core(self);
    1915     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    1916         Document *doc = frame->document();
     1908    auto* coreFrame = core(self);
     1909    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     1910        WebCore::Document* doc = frame->document();
    19171911        if (!doc || !doc->renderView())
    19181912            continue;
     
    19281922- (void)_setTextAutosizingWidth:(CGFloat)width
    19291923{
    1930     WebCore::Frame* frame = core(self);
    1931     Page* page = frame->page();
     1924    auto* frame = core(self);
     1925    auto* page = frame->page();
    19321926    if (!page)
    19331927        return;
     
    19531947    if (_private->coreFrame->selection().isNone() || !fragment)
    19541948        return;
    1955     _private->coreFrame->editor().replaceSelectionWithFragment(*core(fragment), selectReplacement ? Editor::SelectReplacement::Yes : Editor::SelectReplacement::No, smartReplace ? Editor::SmartReplace::Yes : Editor::SmartReplace::No, matchStyle ? Editor::MatchStyle::Yes : Editor::MatchStyle::No);
     1949    _private->coreFrame->editor().replaceSelectionWithFragment(*core(fragment), selectReplacement ? WebCore::Editor::SelectReplacement::Yes : WebCore::Editor::SelectReplacement::No, smartReplace ? WebCore::Editor::SmartReplace::Yes : WebCore::Editor::SmartReplace::No, matchStyle ? WebCore::Editor::MatchStyle::Yes : WebCore::Editor::MatchStyle::No);
    19561950}
    19571951
     
    19701964- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
    19711965{
    1972     RefPtr<Range> range = _private->coreFrame->selection().toNormalizedRange();
     1966    RefPtr<WebCore::Range> range = _private->coreFrame->selection().toNormalizedRange();
    19731967   
    19741968    DOMDocumentFragment* fragment = range ? kit(createFragmentFromText(*range, text).ptr()) : nil;
     
    19961990       
    19971991    // inspect destination
    1998     Node *startContainer = core([rangeToReplace startContainer]);
    1999     Node *endContainer = core([rangeToReplace endContainer]);
    2000 
    2001     Position startPos(startContainer, [rangeToReplace startOffset], Position::PositionIsOffsetInAnchor);
    2002     Position endPos(endContainer, [rangeToReplace endOffset], Position::PositionIsOffsetInAnchor);
    2003 
    2004     VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
    2005     VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
     1992    WebCore::Node *startContainer = core([rangeToReplace startContainer]);
     1993    WebCore::Node *endContainer = core([rangeToReplace endContainer]);
     1994
     1995    WebCore::Position startPos(startContainer, [rangeToReplace startOffset], WebCore::Position::PositionIsOffsetInAnchor);
     1996    WebCore::Position endPos(endContainer, [rangeToReplace endOffset], WebCore::Position::PositionIsOffsetInAnchor);
     1997
     1998    WebCore::VisiblePosition startVisiblePos = WebCore::VisiblePosition(startPos, WebCore::VP_DEFAULT_AFFINITY);
     1999    WebCore::VisiblePosition endVisiblePos = WebCore::VisiblePosition(endPos, WebCore::VP_DEFAULT_AFFINITY);
    20062000   
    20072001    // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
     
    20092003        return;
    20102004
    2011     bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
     2005    bool addLeadingSpace = startPos.leadingWhitespacePosition(WebCore::VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
    20122006    if (addLeadingSpace)
    20132007        if (UChar previousChar = startVisiblePos.previous().characterAfter())
    2014             addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
    2015    
    2016     bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
     2008            addLeadingSpace = !WebCore::isCharacterSmartReplaceExempt(previousChar, true);
     2009   
     2010    bool addTrailingSpace = endPos.trailingWhitespacePosition(WebCore::VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
    20172011    if (addTrailingSpace)
    20182012        if (UChar thisChar = endVisiblePos.characterAfter())
    2019             addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
     2013            addTrailingSpace = !WebCore::isCharacterSmartReplaceExempt(thisChar, false);
    20202014   
    20212015    // inspect source
     
    20462040    NSMutableDictionary *result = [NSMutableDictionary dictionary];
    20472041   
    2048     FrameLoader& frameLoader = _private->coreFrame->loader();
    2049     DocumentLoader* documentLoader = frameLoader.documentLoader();
     2042    auto& frameLoader = _private->coreFrame->loader();
     2043    auto* documentLoader = frameLoader.documentLoader();
    20502044    if (documentLoader && !documentLoader->mainDocumentError().isNull())
    20512045        [result setObject:(NSError *)documentLoader->mainDocumentError() forKey:WebFrameMainDocumentError];
     
    20542048        [result setObject:@YES forKey:WebFrameHasPlugins];
    20552049   
    2056     if (DOMWindow* domWindow = _private->coreFrame->document()->domWindow()) {
    2057         if (domWindow->hasEventListeners(eventNames().unloadEvent))
     2050    if (WebCore::DOMWindow* domWindow = _private->coreFrame->document()->domWindow()) {
     2051        if (domWindow->hasEventListeners(WebCore::eventNames().unloadEvent))
    20582052            [result setObject:@YES forKey:WebFrameHasUnloadListener];
    20592053        if (domWindow->optionalApplicationCache())
     
    20612055    }
    20622056   
    2063     if (Document* document = _private->coreFrame->document()) {
    2064         if (DatabaseManager::singleton().hasOpenDatabases(*document))
     2057    if (auto* document = _private->coreFrame->document()) {
     2058        if (WebCore::DatabaseManager::singleton().hasOpenDatabases(*document))
    20652059            [result setObject:@YES forKey:WebFrameUsesDatabases];
    20662060        if (!document->canSuspendActiveDOMObjectsForDocumentSuspension())
     
    20872081
    20882082    // Start off with some guess at a frame and a global object, we'll try to do better...!
    2089     JSDOMWindow* anyWorldGlobalObject = _private->coreFrame->script().globalObject(mainThreadNormalWorld());
     2083    auto* anyWorldGlobalObject = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld());
    20902084
    20912085    // The global object is probably a proxy object? - if so, we know how to use this!
     
    20932087    JSC::VM& vm = globalObjectObj->vm();
    20942088    if (!strcmp(globalObjectObj->classInfo(vm)->className, "JSWindowProxy"))
    2095         anyWorldGlobalObject = JSC::jsDynamicCast<JSDOMWindow*>(vm, static_cast<JSWindowProxy*>(globalObjectObj)->window());
     2089        anyWorldGlobalObject = JSC::jsDynamicCast<WebCore::JSDOMWindow*>(vm, static_cast<WebCore::JSWindowProxy*>(globalObjectObj)->window());
    20962090
    20972091    if (!anyWorldGlobalObject)
     
    20992093
    21002094    // Get the frame frome the global object we've settled on.
    2101     Frame* frame = anyWorldGlobalObject->wrapped().frame();
     2095    auto* frame = anyWorldGlobalObject->wrapped().frame();
    21022096    ASSERT(frame->document());
    21032097    RetainPtr<WebFrame> webFrame(kit(frame)); // Running arbitrary JavaScript can destroy the frame.
     
    21212115- (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world
    21222116{
    2123     Frame* coreFrame = _private->coreFrame;
     2117    auto* coreFrame = _private->coreFrame;
    21242118    if (!coreFrame)
    21252119        return 0;
    2126     DOMWrapperWorld* coreWorld = core(world);
     2120    auto* coreWorld = core(world);
    21272121    if (!coreWorld)
    21282122        return 0;
     
    21622156{
    21632157#if ENABLE(ACCESSIBILITY)
    2164     if (!AXObjectCache::accessibilityEnabled())
     2158    if (!WebCore::AXObjectCache::accessibilityEnabled())
    21652159        return;
    21662160   
     
    21682162        return;
    21692163   
    2170     AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject();
     2164    auto* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject();
    21712165    if (rootObject) {
    21722166        String strName(name);
     
    21792173{
    21802174#if ENABLE(ACCESSIBILITY)
    2181     return AXObjectCache::accessibilityEnhancedUserInterfaceEnabled();
     2175    return WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled();
    21822176#else
    21832177    return NO;
     
    21882182{
    21892183#if ENABLE(ACCESSIBILITY)
    2190     AXObjectCache::setEnhancedUserInterfaceAccessibility(enable);
     2184    WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility(enable);
    21912185#endif
    21922186}
     
    21942188- (NSString*)_layerTreeAsText
    21952189{
    2196     Frame* coreFrame = _private->coreFrame;
     2190    auto* coreFrame = _private->coreFrame;
    21972191    if (!coreFrame)
    21982192        return @"";
     
    22042198{
    22052199#if ENABLE(ACCESSIBILITY)
    2206     if (!AXObjectCache::accessibilityEnabled()) {
    2207         AXObjectCache::enableAccessibility();
     2200    if (!WebCore::AXObjectCache::accessibilityEnabled()) {
     2201        WebCore::AXObjectCache::enableAccessibility();
    22082202#if !PLATFORM(IOS_FAMILY)
    22092203        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    2210         AXObjectCache::setEnhancedUserInterfaceAccessibility([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue]);
     2204        WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue]);
    22112205        ALLOW_DEPRECATED_DECLARATIONS_END
    22122206#endif
     
    22162210        return nil;
    22172211   
    2218     Document* document = _private->coreFrame->document();
     2212    auto* document = _private->coreFrame->document();
    22192213    if (!document || !document->axObjectCache())
    22202214        return nil;
    22212215   
    2222     AccessibilityObject* rootObject = document->axObjectCache()->rootObjectForFrame(_private->coreFrame);
     2216    auto* rootObject = document->axObjectCache()->rootObjectForFrame(_private->coreFrame);
    22232217    if (!rootObject)
    22242218        return nil;
     
    22372231- (void)_clearOpener
    22382232{
    2239     Frame* coreFrame = _private->coreFrame;
     2233    auto* coreFrame = _private->coreFrame;
    22402234    if (coreFrame)
    22412235        coreFrame->loader().setOpener(0);
     
    22662260        return [NSArray array];
    22672261
    2268     RenderView* root = _private->coreFrame->document()->renderView();
     2262    auto* root = _private->coreFrame->document()->renderView();
    22692263    if (!root)
    22702264        return [NSArray array];
    22712265
    2272     const LayoutRect& documentRect = root->documentRect();
     2266    const auto& documentRect = root->documentRect();
    22732267    float printWidth = root->style().isHorizontalWritingMode() ? static_cast<float>(documentRect.width()) / printScaleFactor : pageSize.width;
    22742268    float printHeight = root->style().isHorizontalWritingMode() ? pageSize.height : static_cast<float>(documentRect.height()) / printScaleFactor;
    22752269
    2276     PrintContext printContext(_private->coreFrame);
    2277     printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true);
    2278     const Vector<IntRect>& pageRects = printContext.pageRects();
     2270    WebCore::PrintContext printContext(_private->coreFrame);
     2271    printContext.computePageRectsWithPageSize(WebCore::FloatSize(printWidth, printHeight), true);
     2272    const Vector<WebCore::IntRect>& pageRects = printContext.pageRects();
    22792273
    22802274    size_t size = pageRects.size();
     
    23112305- (BOOL)focusedNodeHasContent
    23122306{
    2313     Frame* coreFrame = _private->coreFrame;
     2307    auto* coreFrame = _private->coreFrame;
    23142308   
    2315     Element* root;
    2316     const VisibleSelection& selection = coreFrame->selection().selection();
     2309    WebCore::Element* root;
     2310    const auto& selection = coreFrame->selection().selection();
    23172311    if (selection.isNone() || !selection.isContentEditable())
    23182312        root = coreFrame->document()->bodyOrFrameset();
     
    23262320        return NO;
    23272321
    2328     VisiblePosition first(createLegacyEditingPosition(root, 0));
    2329     VisiblePosition last(createLegacyEditingPosition(root, root->countChildNodes()));
     2322    WebCore::VisiblePosition first(createLegacyEditingPosition(root, 0));
     2323    WebCore::VisiblePosition last(createLegacyEditingPosition(root, root->countChildNodes()));
    23302324    return first != last;
    23312325}
     
    23332327- (void)_dispatchDidReceiveTitle:(NSString *)title
    23342328{
    2335     Frame* coreFrame = _private->coreFrame;
     2329    auto* coreFrame = _private->coreFrame;
    23362330    if (!coreFrame)
    23372331        return;
    2338     coreFrame->loader().client().dispatchDidReceiveTitle({ title, TextDirection::LTR });
     2332    coreFrame->loader().client().dispatchDidReceiveTitle({ title, WebCore::TextDirection::LTR });
    23392333}
    23402334
     
    23432337- (JSValueRef)jsWrapperForNode:(DOMNode *)node inScriptWorld:(WebScriptWorld *)world
    23442338{
    2345     Frame* coreFrame = _private->coreFrame;
     2339    auto* coreFrame = _private->coreFrame;
    23462340    if (!coreFrame)
    23472341        return 0;
     
    23502344        return 0;
    23512345
    2352     JSDOMWindow* globalObject = coreFrame->script().globalObject(*core(world));
     2346    WebCore::JSDOMWindow* globalObject = coreFrame->script().globalObject(*core(world));
    23532347    JSC::ExecState* exec = globalObject->globalExec();
    23542348
     
    23592353- (NSDictionary *)elementAtPoint:(NSPoint)point
    23602354{
    2361     Frame* coreFrame = _private->coreFrame;
     2355    auto* coreFrame = _private->coreFrame;
    23622356    if (!coreFrame)
    23632357        return nil;
    2364     return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(IntPoint(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::DisallowUserAgentShadowContent | HitTestRequest::AllowChildFrameContent)] autorelease];
     2358    return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(point), WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::IgnoreClipping | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent)] autorelease];
    23652359}
    23662360
     
    23972391- (NSString *)name
    23982392{
    2399     Frame* coreFrame = _private->coreFrame;
     2393    auto* coreFrame = _private->coreFrame;
    24002394    if (!coreFrame)
    24012395        return nil;
     
    24182412    return false;
    24192413#else
    2420     static bool needsWorkaround = MacApplication::isMicrosoftMessenger() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] compare:@"7.1" options:NSNumericSearch] == NSOrderedAscending;
     2414    static bool needsWorkaround = WebCore::MacApplication::isMicrosoftMessenger() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] compare:@"7.1" options:NSNumericSearch] == NSOrderedAscending;
    24212415    return needsWorkaround;
    24222416#endif
     
    24282422        return nil;
    24292423
    2430     Frame* coreFrame = _private->coreFrame;
     2424    auto* coreFrame = _private->coreFrame;
    24312425    if (!coreFrame)
    24322426        return nil;
     
    24382432        return nil;
    24392433
    2440     Document* document = coreFrame->document();
     2434    auto* document = coreFrame->document();
    24412435   
    24422436    // According to the documentation, we should return nil if the frame doesn't have a document.
     
    24512445- (DOMHTMLElement *)frameElement
    24522446{
    2453     Frame* coreFrame = _private->coreFrame;
     2447    auto* coreFrame = _private->coreFrame;
    24542448    if (!coreFrame)
    24552449        return nil;
     
    24592453- (WebDataSource *)provisionalDataSource
    24602454{
    2461     Frame* coreFrame = _private->coreFrame;
     2455    auto* coreFrame = _private->coreFrame;
    24622456    return coreFrame ? dataSource(coreFrame->loader().provisionalDocumentLoader()) : nil;
    24632457}
     
    24652459- (WebDataSource *)dataSource
    24662460{
    2467     Frame* coreFrame = _private->coreFrame;
     2461    auto* coreFrame = _private->coreFrame;
    24682462    return coreFrame && coreFrame->loader().frameHasLoaded() ? [self _dataSource] : nil;
    24692463}
     
    24712465- (void)loadRequest:(NSURLRequest *)request
    24722466{
    2473     Frame* coreFrame = _private->coreFrame;
     2467    auto* coreFrame = _private->coreFrame;
    24742468    if (!coreFrame)
    24752469        return;
    24762470
    2477     ResourceRequest resourceRequest(request);
     2471    WebCore::ResourceRequest resourceRequest(request);
    24782472   
    24792473    // Some users of WebKit API incorrectly use "file path as URL" style requests which are invalid.
     
    24852479        resourceRequest.setURL([NSURL URLWithString:[@"file:" stringByAppendingString:[[request URL] absoluteString]]]);
    24862480
    2487     coreFrame->loader().load(FrameLoadRequest(*coreFrame, resourceRequest, ShouldOpenExternalURLsPolicy::ShouldNotAllow));
     2481    coreFrame->loader().load(WebCore::FrameLoadRequest(*coreFrame, resourceRequest, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow));
    24882482}
    24892483
     
    25142508   
    25152509#if USE(QUICK_LOOK)
    2516     if (shouldUseQuickLookForMIMEType(MIMEType)) {
     2510    if (WebCore::shouldUseQuickLookForMIMEType(MIMEType)) {
    25172511        NSURL *quickLookURL = responseURL ? responseURL : baseURL;
    2518         if (auto request = registerQLPreviewConverterIfNeeded(quickLookURL, MIMEType, data)) {
    2519             _private->coreFrame->loader().load(FrameLoadRequest(*_private->coreFrame, request.get(), ShouldOpenExternalURLsPolicy::ShouldNotAllow));
     2512        if (auto request = WebCore::registerQLPreviewConverterIfNeeded(quickLookURL, MIMEType, data)) {
     2513            _private->coreFrame->loader().load(WebCore::FrameLoadRequest(*_private->coreFrame, request.get(), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow));
    25202514            return;
    25212515        }
     
    25232517#endif
    25242518
    2525     ResourceRequest request(baseURL);
    2526 
    2527     ResourceResponse response(responseURL, MIMEType, [data length], encodingName);
    2528     SubstituteData substituteData(WebCore::SharedBuffer::create(data), [unreachableURL absoluteURL], response, SubstituteData::SessionHistoryVisibility::Hidden);
    2529 
    2530     _private->coreFrame->loader().load(FrameLoadRequest(*_private->coreFrame, request, ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));
     2519    WebCore::ResourceRequest request(baseURL);
     2520
     2521    WebCore::ResourceResponse response(responseURL, MIMEType, [data length], encodingName);
     2522    WebCore::SubstituteData substituteData(WebCore::SharedBuffer::create(data), [unreachableURL absoluteURL], response, WebCore::SubstituteData::SessionHistoryVisibility::Hidden);
     2523
     2524    _private->coreFrame->loader().load(WebCore::FrameLoadRequest(*_private->coreFrame, request, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));
    25312525}
    25322526
     
    25852579- (WebFrame *)findFrameNamed:(NSString *)name
    25862580{
    2587     Frame* coreFrame = _private->coreFrame;
     2581    auto* coreFrame = _private->coreFrame;
    25882582    if (!coreFrame)
    25892583        return nil;
     
    25932587- (WebFrame *)parentFrame
    25942588{
    2595     Frame* coreFrame = _private->coreFrame;
     2589    auto* coreFrame = _private->coreFrame;
    25962590    if (!coreFrame)
    25972591        return nil;
     
    26012595- (NSArray *)childFrames
    26022596{
    2603     Frame* coreFrame = _private->coreFrame;
     2597    auto* coreFrame = _private->coreFrame;
    26042598    if (!coreFrame)
    26052599        return [NSArray array];
    26062600    NSMutableArray *children = [NSMutableArray arrayWithCapacity:coreFrame->tree().childCount()];
    2607     for (Frame* child = coreFrame->tree().firstChild(); child; child = child->tree().nextSibling())
     2601    for (WebCore::Frame* child = coreFrame->tree().firstChild(); child; child = child->tree().nextSibling())
    26082602        [children addObject:kit(child)];
    26092603    return children;
     
    26122606- (WebScriptObject *)windowObject
    26132607{
    2614     Frame* coreFrame = _private->coreFrame;
     2608    auto* coreFrame = _private->coreFrame;
    26152609    if (!coreFrame)
    26162610        return 0;
     
    26202614- (JSGlobalContextRef)globalContext
    26212615{
    2622     Frame* coreFrame = _private->coreFrame;
     2616    auto* coreFrame = _private->coreFrame;
    26232617    if (!coreFrame)
    26242618        return 0;
    2625     return toGlobalRef(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec());
     2619    return toGlobalRef(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec());
    26262620}
    26272621
     
    26292623- (JSContext *)javaScriptContext
    26302624{
    2631     Frame* coreFrame = _private->coreFrame;
     2625    auto* coreFrame = _private->coreFrame;
    26322626    if (!coreFrame)
    26332627        return 0;
  • trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm

    r239088 r250549  
    8383#endif
    8484
    85 using namespace WebCore;
    86 
    8785#if !PLATFORM(IOS_FAMILY)
    8886@interface NSWindow (WindowPrivate)
     
    136134}
    137135
    138 - (Frame*)_web_frame
     136- (WebCore::Frame*)_web_frame
    139137{
    140138    return core(_private->webFrame);
     
    182180    ASSERT(_private->webFrame);
    183181
    184     Frame* frame = core(_private->webFrame);
     182    auto* frame = core(_private->webFrame);
    185183
    186184    ASSERT(frame);
     
    246244{
    247245    float height = [[self _contentView] bounds].size.height;
    248     return std::max<float>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages());
    249 }
    250 
    251 static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes)
    252 {
    253     NSEnumerator *enumerator = [supportTypes objectEnumerator];
    254     ASSERT(enumerator != nil);
    255     NSString *mime = nil;
    256     while ((mime = [enumerator nextObject]) != nil) {
    257         // Don't clobber previously-registered classes.
    258         if ([allTypes objectForKey:mime] == nil)
    259             [allTypes setObject:objCClass forKey:mime];
    260     }
     246    return std::max<float>(height * WebCore::Scrollbar::minFractionToStepWhenPaging(), height - WebCore::Scrollbar::maxOverlapBetweenPages());
    261247}
    262248
     
    319305    ASSERT(_private->frameScrollView);
    320306
    321     Frame* frame = core(_private->webFrame);
     307    auto* frame = core(_private->webFrame);
    322308
    323309    ASSERT(frame);
     
    328314    ASSERT(frame->isMainFrame() || frame->ownerElement());
    329315
    330     FrameView* view = frame->view();
     316    auto* view = frame->view();
    331317
    332318    view->setPlatformWidget(_private->frameScrollView);
    333319
    334320    // FIXME: Frame tries to do this too. Is this code needed?
    335     if (RenderWidget* owner = frame->ownerRenderer()) {
     321    if (WebCore::RenderWidget* owner = frame->ownerRenderer()) {
    336322        owner->setWidget(view);
    337323        // Now the RenderWidget owns the view, so we don't any more.
     
    346332    if ([[[self webFrame] webView] drawsBackground])
    347333        [[self _scrollView] setDrawsBackground:YES];
    348     if (Frame* coreFrame = [self _web_frame]) {
    349         if (FrameView* coreFrameView = coreFrame->view())
    350             coreFrameView->availableContentSizeChanged(ScrollableArea::AvailableSizeChangeReason::AreaSizeChanged);
     334    if (auto* coreFrame = [self _web_frame]) {
     335        if (auto* coreFrameView = coreFrame->view())
     336            coreFrameView->availableContentSizeChanged(WebCore::ScrollableArea::AvailableSizeChangeReason::AreaSizeChanged);
    351337    }
    352338}
     
    372358#if !PLATFORM(IOS_FAMILY)
    373359        if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS))
    374             setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundOne);
     360            setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundOne);
    375361
    376362        bool throwExceptionsForRoundTwo = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_TWO_MAIN_THREAD_EXCEPTIONS);
    377363        if (!throwExceptionsForRoundTwo)
    378             setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundTwo);
     364            setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundTwo);
    379365
    380366        bool throwExceptionsForRoundThree = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_THREE_MAIN_THREAD_EXCEPTIONS);
    381367        if (!throwExceptionsForRoundThree)
    382             setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundThree);
     368            setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundThree);
    383369#endif
    384370    }
     
    397383    [scrollView setHasHorizontalScroller:NO];
    398384    [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
    399     [scrollView setLineScroll:Scrollbar::pixelsPerLineStep()];
     385    [scrollView setLineScroll:WebCore::Scrollbar::pixelsPerLineStep()];
    400386    [self addSubview:scrollView];
    401387
     
    518504#else
    519505            CGContextRef cgContext = WKGetCurrentGraphicsContext();
    520             CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::white));
     506            CGContextSetFillColorWithColor(cgContext, WebCore::cachedCGColor(WebCore::Color::white));
    521507            WKRectFill(cgContext, rect);
    522508#endif
     
    530516#else
    531517            CGContextRef cgContext = WKGetCurrentGraphicsContext();
    532             CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::cyan));
     518            CGContextSetFillColorWithColor(cgContext, WebCore::cachedCGColor(WebCore::Color::cyan));
    533519            WKRectFill(cgContext, rect);
    534520#endif
     
    614600}
    615601
    616 - (BOOL)_scrollOverflowInDirection:(ScrollDirection)direction granularity:(ScrollGranularity)granularity
     602- (BOOL)_scrollOverflowInDirection:(WebCore::ScrollDirection)direction granularity:(WebCore::ScrollGranularity)granularity
    617603{
    618604    // scrolling overflows is only applicable if we're dealing with an WebHTMLView
    619605    if (![[self documentView] isKindOfClass:[WebHTMLView class]])
    620606        return NO;
    621     Frame* frame = core([self webFrame]);
     607    auto* frame = core([self webFrame]);
    622608    if (!frame)
    623609        return NO;
     
    628614- (BOOL)_isVerticalDocument
    629615{
    630     Frame* coreFrame = [self _web_frame];
     616    auto* coreFrame = [self _web_frame];
    631617    if (!coreFrame)
    632618        return YES;
    633     Document* document = coreFrame->document();
     619    auto* document = coreFrame->document();
    634620    if (!document)
    635621        return YES;
    636     RenderView* renderView = document->renderView();
     622    auto* renderView = document->renderView();
    637623    if (!renderView)
    638624        return YES;
     
    642628- (BOOL)_isFlippedDocument
    643629{
    644     Frame* coreFrame = [self _web_frame];
     630    auto* coreFrame = [self _web_frame];
    645631    if (!coreFrame)
    646632        return NO;
    647     Document* document = coreFrame->document();
     633    auto* document = coreFrame->document();
    648634    if (!document)
    649635        return NO;
    650     RenderView* renderView = document->renderView();
     636    auto* renderView = document->renderView();
    651637    if (!renderView)
    652638        return NO;
     
    656642- (BOOL)_scrollToBeginningOfDocument
    657643{
    658     if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument])
     644    if ([self _scrollOverflowInDirection:WebCore::ScrollUp granularity:WebCore::ScrollByDocument])
    659645        return YES;
    660646    if (![self _isScrollable])
     
    668654- (BOOL)_scrollToEndOfDocument
    669655{
    670     if ([self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument])
     656    if ([self _scrollOverflowInDirection:WebCore::ScrollDown granularity:WebCore::ScrollByDocument])
    671657        return YES;
    672658    if (![self _isScrollable])
     
    760746{
    761747    float width = [[self _contentView] bounds].size.width;
    762     return std::max<float>(width * Scrollbar::minFractionToStepWhenPaging(), width - Scrollbar::maxOverlapBetweenPages());
     748    return std::max<float>(width * WebCore::Scrollbar::minFractionToStepWhenPaging(), width - WebCore::Scrollbar::maxOverlapBetweenPages());
    763749}
    764750
    765751- (BOOL)_pageVertically:(BOOL)up
    766752{
    767     if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByPage])
     753    if ([self _scrollOverflowInDirection:up ? WebCore::ScrollUp : WebCore::ScrollDown granularity:WebCore::ScrollByPage])
    768754        return YES;
    769755   
     
    777763- (BOOL)_pageHorizontally:(BOOL)left
    778764{
    779     if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByPage])
     765    if ([self _scrollOverflowInDirection:left ? WebCore::ScrollLeft : WebCore::ScrollRight granularity:WebCore::ScrollByPage])
    780766        return YES;
    781767
     
    799785- (BOOL)_scrollLineVertically:(BOOL)up
    800786{
    801     if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine])
     787    if ([self _scrollOverflowInDirection:up ? WebCore::ScrollUp : WebCore::ScrollDown granularity:WebCore::ScrollByLine])
    802788        return YES;
    803789
     
    811797- (BOOL)_scrollLineHorizontally:(BOOL)left
    812798{
    813     if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByLine])
     799    if ([self _scrollOverflowInDirection:left ? WebCore::ScrollLeft : WebCore::ScrollRight granularity:WebCore::ScrollByLine])
    814800        return YES;
    815801
     
    910896    int index, count;
    911897    BOOL callSuper = YES;
    912     Frame* coreFrame = [self _web_frame];
     898    auto* coreFrame = [self _web_frame];
    913899    BOOL maintainsBackForwardList = coreFrame && static_cast<BackForwardList&>(coreFrame->page()->backForward().client()).enabled() ? YES : NO;
    914900
  • trunk/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm

    r244440 r250549  
    4848#import <wtf/SoftLinking.h>
    4949
    50 using namespace WebCore;
    51 
    5250static const CFTimeInterval defaultAnimationDuration = 0.5;
    5351
    54 static IntRect screenRectOfContents(Element* element)
     52static WebCore::IntRect screenRectOfContents(WebCore::Element* element)
    5553{
    5654    ASSERT(element);
    5755    if (element->renderer() && element->renderer()->hasLayer() && element->renderer()->enclosingLayer()->isComposited()) {
    58         FloatQuad contentsBox = static_cast<FloatRect>(element->renderer()->enclosingLayer()->backing()->contentsBox());
     56        WebCore::FloatQuad contentsBox = static_cast<WebCore::FloatRect>(element->renderer()->enclosingLayer()->backing()->contentsBox());
    5957        contentsBox = element->renderer()->localToAbsoluteQuad(contentsBox);
    6058        return element->renderer()->view().frameView().contentsToScreen(contentsBox.enclosingBoundingBox());
     
    6664- (void)_updateMenuAndDockForFullScreen;
    6765- (void)_swapView:(NSView*)view with:(NSView*)otherView;
    68 - (Document*)_document;
    69 - (FullscreenManager*)_manager;
     66- (WebCore::Document*)_document;
     67- (WebCore::FullscreenManager*)_manager;
    7068- (void)_startEnterFullScreenAnimationWithDuration:(NSTimeInterval)duration;
    7169- (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration;
     
    135133}
    136134
    137 - (Element*)element
     135- (WebCore::Element*)element
    138136{
    139137    return _element.get();
    140138}
    141139
    142 - (void)setElement:(RefPtr<Element>&&)element
     140- (void)setElement:(RefPtr<WebCore::Element>&&)element
    143141{
    144142    _element = WTFMove(element);
     
    453451#pragma mark Utility Functions
    454452
    455 - (Document*)_document
     453- (WebCore::Document*)_document
    456454{
    457455    return &_element->document();
    458456}
    459457
    460 - (FullscreenManager*)_manager
     458- (WebCore::FullscreenManager*)_manager
    461459{
    462460    return &_element->document().fullscreenManager();
  • trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm

    r250142 r250549  
    171171#endif
    172172
    173 using namespace WebCore;
    174 using namespace HTMLNames;
    175 using namespace WTF;
    176 
    177173#if PLATFORM(IOS_FAMILY)
    178174
     
    249245@end
    250246
    251 static Optional<ContextMenuAction> toAction(NSInteger tag)
    252 {
     247static Optional<WebCore::ContextMenuAction> toAction(NSInteger tag)
     248{
     249    using namespace WebCore;
    253250    if (tag >= ContextMenuItemBaseCustomTag && tag <= ContextMenuItemLastCustomTag) {
    254251        // Just pass these through.
     
    427424}
    428425
    429 static Optional<NSInteger> toTag(ContextMenuAction action)
    430 {
     426static Optional<NSInteger> toTag(WebCore::ContextMenuAction action)
     427{
     428    using namespace WebCore;
    431429    switch (action) {
    432430    case ContextMenuItemTagNoAction:
     
    769767    }
    770768
    771     Frame* coreFrame = core([enclosingWebFrameView webFrame]);
    772     FrameView* frameView = coreFrame ? coreFrame->view() : 0;
     769    auto* coreFrame = core([enclosingWebFrameView webFrame]);
     770    auto* frameView = coreFrame ? coreFrame->view() : 0;
    773771    if (!frameView || !frameView->isEnclosedInCompositingLayer()) {
    774772        [self _web_setNeedsDisplayInRect:invalidRect];
     
    777775
    778776    NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self];
    779     IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);
     777    WebCore::IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);
    780778    if (![enclosingWebFrameView isFlipped])
    781779        invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.maxY());
     
    788786#endif // PLATFORM(MAC)
    789787
    790 const float _WebHTMLViewPrintingMinimumShrinkFactor = PrintContext::minimumShrinkFactor();
    791 const float _WebHTMLViewPrintingMaximumShrinkFactor = PrintContext::maximumShrinkFactor();
     788const float _WebHTMLViewPrintingMinimumShrinkFactor = WebCore::PrintContext::minimumShrinkFactor();
     789const float _WebHTMLViewPrintingMaximumShrinkFactor = WebCore::PrintContext::maximumShrinkFactor();
    792790
    793791// Any non-zero value will do, but using something recognizable might help us debug some day.
     
    812810
    813811// We need this to be able to safely reference the CachedImage for the promised drag data
    814 static CachedImageClient& promisedDataClient()
    815 {
    816     static NeverDestroyed<CachedImageClient> staticCachedResourceClient;
     812static WebCore::CachedImageClient& promisedDataClient()
     813{
     814    static NeverDestroyed<WebCore::CachedImageClient> staticCachedResourceClient;
    817815    return staticCachedResourceClient.get();
    818816}
     
    917915
    918916struct WebHTMLViewInterpretKeyEventsParameters {
    919     KeyboardEvent* event;
     917    WebCore::KeyboardEvent* event;
    920918    bool eventInterpretationHadSideEffects;
    921919    bool shouldSaveCommands;
     
    11561154
    11571155#if ENABLE(ATTACHMENT_ELEMENT)
    1158     if (!RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled())
     1156    if (!WebCore::RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled())
    11591157        [elements addObject:@"object"];
    11601158#endif
     
    11651163- (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard inContext:(DOMRange *)context allowPlainText:(BOOL)allowPlainText
    11661164{
     1165    using namespace WebCore;
    11671166    NSArray *types = [pasteboard types];
    11681167    DOMDocumentFragment *fragment = nil;
     
    11711170        return fragment;
    11721171
    1173     if ([types containsObject:legacyFilenamesPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyFilenamesPasteboardType() inContext:context subresources:0]))
     1172    if ([types containsObject:WebCore::legacyFilenamesPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyFilenamesPasteboardType() inContext:context subresources:0]))
    11741173        return fragment;
    11751174   
    1176     if ([types containsObject:legacyHTMLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyHTMLPasteboardType() inContext:context subresources:0]))
     1175    if ([types containsObject:WebCore::legacyHTMLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyHTMLPasteboardType() inContext:context subresources:0]))
    11771176        return fragment;
    11781177   
    1179     if ([types containsObject:legacyRTFDPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyRTFDPasteboardType() inContext:context subresources:0]))
     1178    if ([types containsObject:WebCore::legacyRTFDPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyRTFDPasteboardType() inContext:context subresources:0]))
    11801179        return fragment;
    11811180   
    1182     if ([types containsObject:legacyRTFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyRTFPasteboardType() inContext:context subresources:0]))
     1181    if ([types containsObject:WebCore::legacyRTFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyRTFPasteboardType() inContext:context subresources:0]))
    11831182        return fragment;
    11841183
    1185     if ([types containsObject:legacyTIFFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyTIFFPasteboardType() inContext:context subresources:0]))
     1184    if ([types containsObject:WebCore::legacyTIFFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyTIFFPasteboardType() inContext:context subresources:0]))
    11861185        return fragment;
    11871186
    1188     if ([types containsObject:legacyPDFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyPDFPasteboardType() inContext:context subresources:0]))
     1187    if ([types containsObject:WebCore::legacyPDFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyPDFPasteboardType() inContext:context subresources:0]))
    11891188        return fragment;
    11901189
     
    11921191        return fragment;
    11931192
    1194     if ([types containsObject:legacyURLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyURLPasteboardType() inContext:context subresources:0]))
     1193    if ([types containsObject:WebCore::legacyURLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyURLPasteboardType() inContext:context subresources:0]))
    11951194        return fragment;
    11961195
    1197     if (allowPlainText && [types containsObject:legacyStringPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyStringPasteboardType() inContext:context subresources:0]))
     1196    if (allowPlainText && [types containsObject:WebCore::legacyStringPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyStringPasteboardType() inContext:context subresources:0]))
    11981197        return fragment;
    11991198   
     
    12051204    NSArray *types = [pasteboard types];
    12061205   
    1207     if ([types containsObject:legacyStringPasteboardType()])
    1208         return [[pasteboard stringForType:legacyStringPasteboardType()] precomposedStringWithCanonicalMapping];
     1206    if ([types containsObject:WebCore::legacyStringPasteboardType()])
     1207        return [[pasteboard stringForType:WebCore::legacyStringPasteboardType()] precomposedStringWithCanonicalMapping];
    12091208
    12101209    RetainPtr<NSAttributedString> attributedString;
    1211     if ([types containsObject:legacyRTFDPasteboardType()])
    1212         attributedString = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:legacyRTFDPasteboardType()] documentAttributes:NULL]);
    1213     if (attributedString == nil && [types containsObject:legacyRTFPasteboardType()])
    1214         attributedString = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:legacyRTFPasteboardType()] documentAttributes:NULL]);
     1210    if ([types containsObject:WebCore::legacyRTFDPasteboardType()])
     1211        attributedString = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:WebCore::legacyRTFDPasteboardType()] documentAttributes:NULL]);
     1212    if (attributedString == nil && [types containsObject:WebCore::legacyRTFPasteboardType()])
     1213        attributedString = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:WebCore::legacyRTFPasteboardType()] documentAttributes:NULL]);
    12151214    if (attributedString)
    12161215        return [[[attributedString string] copy] autorelease];
    12171216
    1218     if ([types containsObject:legacyFilenamesPasteboardType()]) {
    1219         if (NSString *string = [[pasteboard propertyListForType:legacyFilenamesPasteboardType()] componentsJoinedByString:@"\n"])
     1217    if ([types containsObject:WebCore::legacyFilenamesPasteboardType()]) {
     1218        if (NSString *string = [[pasteboard propertyListForType:WebCore::legacyFilenamesPasteboardType()] componentsJoinedByString:@"\n"])
    12201219            return string;
    12211220    }
     
    12361235
    12371236    DOMRange *range = [self _selectedRange];
    1238     Frame* coreFrame = core([self _frame]);
     1237    auto* coreFrame = core([self _frame]);
    12391238
    12401239    DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
     
    12681267- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard
    12691268{
    1270     Frame* coreFrame = core([self _frame]);
     1269    auto* coreFrame = core([self _frame]);
    12711270    if (!coreFrame)
    12721271        return NO;
     
    13351334- (DOMRange *)_selectedRange
    13361335{
    1337     Frame* coreFrame = core([self _frame]);
     1336    auto* coreFrame = core([self _frame]);
    13381337    return coreFrame ? kit(coreFrame->selection().toNormalizedRange().get()) : nil;
    13391338}
     
    13451344    // Put HTML on the pasteboard.
    13461345    if ([types containsObject:WebArchivePboardType]) {
    1347         if (auto coreArchive = LegacyWebArchive::createFromSelection(core([self _frame]))) {
     1346        if (auto coreArchive = WebCore::LegacyWebArchive::createFromSelection(core([self _frame]))) {
    13481347            if (RetainPtr<CFDataRef> data = coreArchive ? coreArchive->rawDataRepresentation() : 0)
    13491348                [pasteboard setData:(__bridge NSData *)data.get() forType:WebArchivePboardType];
     
    13521351
    13531352    // Put the attributed string on the pasteboard (RTF/RTFD format).
    1354     if ([types containsObject:legacyRTFDPasteboardType()]) {
     1353    if ([types containsObject:WebCore::legacyRTFDPasteboardType()]) {
    13551354        if (attributedString == nil) {
    13561355            attributedString = [self selectedAttributedString];
    13571356        }       
    13581357        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
    1359         [pasteboard setData:RTFDData forType:legacyRTFDPasteboardType()];
     1358        [pasteboard setData:RTFDData forType:WebCore::legacyRTFDPasteboardType()];
    13601359    }       
    1361     if ([types containsObject:legacyRTFPasteboardType()]) {
     1360    if ([types containsObject:WebCore::legacyRTFPasteboardType()]) {
    13621361        if (!attributedString)
    13631362            attributedString = [self selectedAttributedString];
    13641363        if ([attributedString containsAttachments])
    1365             attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);
     1364            attributedString = WebCore::attributedStringByStrippingAttachmentCharacters(attributedString);
    13661365        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
    1367         [pasteboard setData:RTFData forType:legacyRTFPasteboardType()];
     1366        [pasteboard setData:RTFData forType:WebCore::legacyRTFPasteboardType()];
    13681367    }
    13691368
    13701369    // Put plain string on the pasteboard.
    1371     if ([types containsObject:legacyStringPasteboardType()]) {
     1370    if ([types containsObject:WebCore::legacyStringPasteboardType()]) {
    13721371        // Map &nbsp; to a plain old space because this is better for source code, other browsers do it, and
    13731372        // because HTML forces content creators and editors to use this character any time they want two spaces in a row.
    1374         [pasteboard setString:[[self selectedString] stringByReplacingOccurrencesOfString:@"\u00A0" withString:@" "] forType:legacyStringPasteboardType()];
     1373        [pasteboard setString:[[self selectedString] stringByReplacingOccurrencesOfString:@"\u00A0" withString:@" "] forType:WebCore::legacyStringPasteboardType()];
    13751374    }
    13761375
     
    15271526    NSPoint origin = [[self superview] bounds].origin;
    15281527    if (!NSEqualPoints(_private->lastScrollPosition, origin) && ![scrollView inProgrammaticScroll]) {
    1529         if (Frame* coreFrame = core([self _frame])) {
    1530             if (FrameView* coreView = coreFrame->view()) {
     1528        if (auto* coreFrame = core([self _frame])) {
     1529            if (auto* coreView = coreFrame->view()) {
    15311530                _private->inScrollPositionChanged = YES;
    1532                 coreView->scrollOffsetChangedViaPlatformWidget(IntPoint(_private->lastScrollPosition), IntPoint(origin));
     1531                coreView->scrollOffsetChangedViaPlatformWidget(WebCore::IntPoint(_private->lastScrollPosition), WebCore::IntPoint(origin));
    15331532                _private->inScrollPositionChanged = NO;
    15341533            }
     
    19491948            eventNumber:0 clickCount:0 pressure:0];
    19501949
    1951         if (Frame* lastHitCoreFrame = core([lastHitView _frame]))
     1950        if (auto* lastHitCoreFrame = core([lastHitView _frame]))
    19521951            lastHitCoreFrame->eventHandler().mouseMoved(event, [[self _webView] _pressureEvent]);
    19531952    }
     
    19561955
    19571956    if (view) {
    1958         if (Frame* coreFrame = core([view _frame])) {
     1957        if (auto* coreFrame = core([view _frame])) {
    19591958            // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
    19601959            // button is currently pressed. It is possible that neither of those things will be true on Lion and
     
    19841983    static NSArray *types = nil;
    19851984    if (!types) {
    1986         types = [[NSArray alloc] initWithObjects:WebArchivePboardType, legacyHTMLPasteboardType(), legacyFilenamesPasteboardType(), legacyTIFFPasteboardType(), legacyPDFPasteboardType(),
    1987             legacyURLPasteboardType(), legacyRTFDPasteboardType(), legacyRTFPasteboardType(), legacyStringPasteboardType(), legacyColorPasteboardType(), kUTTypePNG, nil];
     1985        types = [[NSArray alloc] initWithObjects:WebArchivePboardType, WebCore::legacyHTMLPasteboardType(), WebCore::legacyFilenamesPasteboardType(), WebCore::legacyTIFFPasteboardType(), WebCore::legacyPDFPasteboardType(),
     1986            WebCore::legacyURLPasteboardType(), WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), WebCore::legacyColorPasteboardType(), kUTTypePNG, nil];
    19881987        CFRetain(types);
    19891988    }
     
    19941993{
    19951994    // FIXME: We should put data for NSHTMLPboardType on the pasteboard but Microsoft Excel doesn't like our format of HTML (3640423).
    1996     return [NSArray arrayWithObjects:WebArchivePboardType, legacyRTFDPasteboardType(), legacyRTFPasteboardType(), legacyStringPasteboardType(), nil];
     1995    return [NSArray arrayWithObjects:WebArchivePboardType, WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), nil];
    19971996}
    19981997
     
    20042003- (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)type
    20052004{
    2006     if ([type isEqualToString:legacyRTFDPasteboardType()] && [[pasteboard types] containsObject:WebArchivePboardType]) {
     2005    if ([type isEqualToString:WebCore::legacyRTFDPasteboardType()] && [[pasteboard types] containsObject:WebArchivePboardType]) {
    20072006        auto archive = adoptNS([[WebArchive alloc] initWithData:[pasteboard dataForType:WebArchivePboardType]]);
    2008         [pasteboard _web_writePromisedRTFDFromArchive:archive.get() containsImage:[[pasteboard types] containsObject:legacyTIFFPasteboardType()]];
    2009     } else if ([type isEqualToString:legacyTIFFPasteboardType()] && _private->promisedDragTIFFDataSource) {
     2007        [pasteboard _web_writePromisedRTFDFromArchive:archive.get() containsImage:[[pasteboard types] containsObject:WebCore::legacyTIFFPasteboardType()]];
     2008    } else if ([type isEqualToString:WebCore::legacyTIFFPasteboardType()] && _private->promisedDragTIFFDataSource) {
    20102009        if (auto* image = _private->promisedDragTIFFDataSource->image())
    2011             [pasteboard setData:(__bridge NSData *)image->tiffRepresentation() forType:legacyTIFFPasteboardType()];
     2010            [pasteboard setData:(__bridge NSData *)image->tiffRepresentation() forType:WebCore::legacyTIFFPasteboardType()];
    20122011        [self setPromisedDragTIFFDataSource:nullptr];
    20132012    }
     
    20342033{
    20352034    [super setScale:scale];
    2036     Frame* coreFrame = core([self _frame]);
     2035    auto* coreFrame = core([self _frame]);
    20372036    if (!coreFrame)
    20382037        return;
    20392038
    2040     if (Page* page = coreFrame->page())
    2041         page->setPageScaleFactor(scale, IntPoint());
     2039    if (auto* page = coreFrame->page())
     2040        page->setPageScaleFactor(scale, WebCore::IntPoint());
    20422041
    20432042    [[self _webView] _documentScaleChanged];
     
    21152114- (BOOL)_canEdit
    21162115{
    2117     Frame* coreFrame = core([self _frame]);
     2116    auto* coreFrame = core([self _frame]);
    21182117    return coreFrame && coreFrame->editor().canEdit();
    21192118}
     
    21212120- (BOOL)_canEditRichly
    21222121{
    2123     Frame* coreFrame = core([self _frame]);
     2122    auto* coreFrame = core([self _frame]);
    21242123    return coreFrame && coreFrame->editor().canEditRichly();
    21252124}
     
    21322131- (BOOL)_hasSelection
    21332132{
    2134     Frame* coreFrame = core([self _frame]);
     2133    auto* coreFrame = core([self _frame]);
    21352134    return coreFrame && coreFrame->selection().selection().isRange();
    21362135}
     
    21382137- (BOOL)_hasSelectionOrInsertionPoint
    21392138{
    2140     Frame* coreFrame = core([self _frame]);
     2139    auto* coreFrame = core([self _frame]);
    21412140    return coreFrame && coreFrame->selection().selection().isCaretOrRange();
    21422141}
     
    21442143- (BOOL)_hasInsertionPoint
    21452144{
    2146     Frame* coreFrame = core([self _frame]);
     2145    auto* coreFrame = core([self _frame]);
    21472146    return coreFrame && coreFrame->selection().selection().isCaret();
    21482147}
     
    21502149- (BOOL)_isEditable
    21512150{
    2152     Frame* coreFrame = core([self _frame]);
     2151    auto* coreFrame = core([self _frame]);
    21532152    return coreFrame && coreFrame->selection().selection().isContentEditable();
    21542153}
     
    21712170        return nil;
    21722171
    2173     Frame* coreFrame = core([self _frame]);
     2172    auto* coreFrame = core([self _frame]);
    21742173    if (!coreFrame)
    21752174        return nil;
    21762175
    2177     Ref<Frame> protectedCoreFrame(*coreFrame);
    2178 
    2179     TextIndicatorData textIndicator;
     2176    Ref<WebCore::Frame> protectedCoreFrame(*coreFrame);
     2177
     2178    WebCore::TextIndicatorData textIndicator;
    21802179    auto dragImage = createDragImageForSelection(*coreFrame, textIndicator);
    21812180    [dragImage _web_dissolveToFraction:WebDragImageAlpha];
     
    21942193- (DOMNode *)_insertOrderedList
    21952194{
    2196     Frame* coreFrame = core([self _frame]);
     2195    auto* coreFrame = core([self _frame]);
    21972196    return coreFrame ? kit(coreFrame->editor().insertOrderedList().get()) : nil;
    21982197}
     
    22002199- (DOMNode *)_insertUnorderedList
    22012200{
    2202     Frame* coreFrame = core([self _frame]);
     2201    auto* coreFrame = core([self _frame]);
    22032202    return coreFrame ? kit(coreFrame->editor().insertUnorderedList().get()) : nil;
    22042203}
     
    22062205- (BOOL)_canIncreaseSelectionListLevel
    22072206{
    2208     Frame* coreFrame = core([self _frame]);
     2207    auto* coreFrame = core([self _frame]);
    22092208    return coreFrame && coreFrame->editor().canIncreaseSelectionListLevel();
    22102209}
     
    22122211- (BOOL)_canDecreaseSelectionListLevel
    22132212{
    2214     Frame* coreFrame = core([self _frame]);
     2213    auto* coreFrame = core([self _frame]);
    22152214    return coreFrame && coreFrame->editor().canDecreaseSelectionListLevel();
    22162215}
     
    22182217- (DOMNode *)_increaseSelectionListLevel
    22192218{
    2220     Frame* coreFrame = core([self _frame]);
     2219    auto* coreFrame = core([self _frame]);
    22212220    return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevel().get()) : nil;
    22222221}
     
    22242223- (DOMNode *)_increaseSelectionListLevelOrdered
    22252224{
    2226     Frame* coreFrame = core([self _frame]);
     2225    auto* coreFrame = core([self _frame]);
    22272226    return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevelOrdered().get()) : nil;
    22282227}
     
    22302229- (DOMNode *)_increaseSelectionListLevelUnordered
    22312230{
    2232     Frame* coreFrame = core([self _frame]);
     2231    auto* coreFrame = core([self _frame]);
    22332232    return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevelUnordered().get()) : nil;
    22342233}
     
    22362235- (void)_decreaseSelectionListLevel
    22372236{
    2238     Frame* coreFrame = core([self _frame]);
     2237    auto* coreFrame = core([self _frame]);
    22392238    if (coreFrame)
    22402239        coreFrame->editor().decreaseSelectionListLevel();
     
    22532252    if (![attributedString containsAttachments]) {
    22542253        mutableTypes = adoptNS([types mutableCopy]);
    2255         [mutableTypes removeObject:legacyRTFDPasteboardType()];
     2254        [mutableTypes removeObject:WebCore::legacyRTFDPasteboardType()];
    22562255        types = mutableTypes.get();
    22572256    }
     
    23182317    }
    23192318
    2320     if ([pboardType isEqualToString:legacyFilenamesPasteboardType()])
    2321         return [self _documentFragmentWithPaths:[pasteboard propertyListForType:legacyFilenamesPasteboardType()]];
    2322 
    2323     if ([pboardType isEqualToString:legacyHTMLPasteboardType()]) {
    2324         NSString *HTMLString = [pasteboard stringForType:legacyHTMLPasteboardType()];
     2319    if ([pboardType isEqualToString:WebCore::legacyFilenamesPasteboardType()])
     2320        return [self _documentFragmentWithPaths:[pasteboard propertyListForType:WebCore::legacyFilenamesPasteboardType()]];
     2321
     2322    if ([pboardType isEqualToString:WebCore::legacyHTMLPasteboardType()]) {
     2323        NSString *HTMLString = [pasteboard stringForType:WebCore::legacyHTMLPasteboardType()];
    23252324        // This is a hack to make Microsoft's HTML pasteboard data work. See 3778785.
    23262325        if ([HTMLString hasPrefix:@"Version:"]) {
     
    23342333    }
    23352334
    2336     if ([pboardType isEqualToString:legacyRTFPasteboardType()] || [pboardType isEqualToString:legacyRTFDPasteboardType()]) {
     2335    if ([pboardType isEqualToString:WebCore::legacyRTFPasteboardType()] || [pboardType isEqualToString:WebCore::legacyRTFDPasteboardType()]) {
    23372336        RetainPtr<NSAttributedString> string;
    2338         if ([pboardType isEqualToString:legacyRTFDPasteboardType()])
    2339             string = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:legacyRTFDPasteboardType()] documentAttributes:NULL]);
     2337        if ([pboardType isEqualToString:WebCore::legacyRTFDPasteboardType()])
     2338            string = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:WebCore::legacyRTFDPasteboardType()] documentAttributes:NULL]);
    23402339        if (!string)
    2341             string = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:legacyRTFPasteboardType()] documentAttributes:NULL]);
     2340            string = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:WebCore::legacyRTFPasteboardType()] documentAttributes:NULL]);
    23422341        if (!string)
    23432342            return nil;
     
    23672366    }
    23682367
    2369     if ([pboardType isEqualToString:legacyTIFFPasteboardType()])
    2370         return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:legacyTIFFPasteboardType() imageMIMEType:@"image/tiff"];
    2371     if ([pboardType isEqualToString:legacyPDFPasteboardType()])
    2372         return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:legacyPDFPasteboardType() imageMIMEType:@"application/pdf"];
     2368    if ([pboardType isEqualToString:WebCore::legacyTIFFPasteboardType()])
     2369        return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:WebCore::legacyTIFFPasteboardType() imageMIMEType:@"image/tiff"];
     2370    if ([pboardType isEqualToString:WebCore::legacyPDFPasteboardType()])
     2371        return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:WebCore::legacyPDFPasteboardType() imageMIMEType:@"application/pdf"];
    23732372    if ([pboardType isEqualToString:(NSString *)kUTTypePNG])
    23742373        return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:(NSString *)kUTTypePNG imageMIMEType:@"image/png"];
    23752374
    2376     if ([pboardType isEqualToString:legacyURLPasteboardType()]) {
     2375    if ([pboardType isEqualToString:WebCore::legacyURLPasteboardType()]) {
    23772376        NSURL *URL = [NSURL URLFromPasteboard:pasteboard];
    23782377        DOMDocument* document = [[self _frame] DOMDocument];
     
    23932392    }
    23942393
    2395     if ([pboardType isEqualToString:legacyStringPasteboardType()]) {
     2394    if ([pboardType isEqualToString:WebCore::legacyStringPasteboardType()]) {
    23962395        if (!context)
    23972396            return nil;
    2398         return kit(createFragmentFromText(*core(context), [[pasteboard stringForType:legacyStringPasteboardType()] precomposedStringWithCanonicalMapping]).ptr());
     2397        return kit(createFragmentFromText(*core(context), [[pasteboard stringForType:WebCore::legacyStringPasteboardType()] precomposedStringWithCanonicalMapping]).ptr());
    23992398    }
    24002399
     
    24352434- (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth
    24362435{
    2437     Frame* frame = core([self _frame]);
     2436    auto* frame = core([self _frame]);
    24382437    if (!frame)
    24392438        return NO;
     
    24542453- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit
    24552454{
    2456     Frame* frame = core([self _frame]);
     2455    auto* frame = core([self _frame]);
    24572456    if (!frame)
    24582457        return NO;
    24592458
    2460     Document* document = frame->document();
     2459    auto* document = frame->document();
    24612460    bool isHorizontal = !document || !document->renderView() || document->renderView()->style().isHorizontalWritingMode();
    24622461
    24632462    float pageLogicalWidth = isHorizontal ? pageWidth : pageHeight;
    24642463    float pageLogicalHeight = isHorizontal ? pageHeight : pageWidth;
    2465     FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
     2464    WebCore::FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
    24662465    float maximumShrinkRatio = 1;
    24672466
     
    24692468    // according to the page width.
    24702469    if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) {
    2471         minLayoutSize = frame->resizePageRectsKeepingRatio(FloatSize(pageLogicalWidth, pageLogicalHeight), FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
     2470        minLayoutSize = frame->resizePageRectsKeepingRatio(WebCore::FloatSize(pageLogicalWidth, pageLogicalHeight), WebCore::FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
    24722471        maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor;
    24732472    }
     
    24902489- (BOOL)_beginScreenPaginationModeWithPageSize:(CGSize)pageSize shrinkToFit:(BOOL)shrinkToFit
    24912490{
    2492     Frame* frame = core([self _frame]);
     2491    auto* frame = core([self _frame]);
    24932492    if (!frame)
    24942493        return NO;
    24952494
    2496     Document* document = frame->document();
     2495    auto* document = frame->document();
    24972496    bool isHorizontal = !document || !document->renderView() || document->renderView()->style().isHorizontalWritingMode();
    24982497
    24992498    float pageLogicalWidth = isHorizontal ? pageSize.width : pageSize.height;
    25002499    float pageLogicalHeight = isHorizontal ? pageSize.height : pageSize.width;
    2501     FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
     2500    WebCore::FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
    25022501    float maximumShrinkRatio = 1;
    25032502
     
    25052504    // according to the page width.
    25062505    if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) {
    2507         minLayoutSize = frame->resizePageRectsKeepingRatio(FloatSize(pageLogicalWidth, pageLogicalHeight), FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
     2506        minLayoutSize = frame->resizePageRectsKeepingRatio(WebCore::FloatSize(pageLogicalWidth, pageLogicalHeight), WebCore::FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
    25082507        maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor;
    25092508    }
     
    25212520- (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit
    25222521{
    2523     Frame* frame = core([self _frame]);
     2522    auto* frame = core([self _frame]);
    25242523    if (!frame)
    25252524        return bottom;
    25262525
    2527     FrameView* view = frame->view();
     2526    auto* view = frame->view();
    25282527    if (!view)
    25292528        return bottom;
     
    26912690}
    26922691
    2693 - (Editor::Command)coreCommandBySelector:(SEL)selector
    2694 {
    2695     Frame* coreFrame = core([self _frame]);
     2692- (WebCore::Editor::Command)coreCommandBySelector:(SEL)selector
     2693{
     2694    auto* coreFrame = core([self _frame]);
    26962695    if (!coreFrame)
    2697         return Editor::Command();
     2696        return WebCore::Editor::Command();
    26982697    return coreFrame->editor().command(commandNameForSelector(selector));
    26992698}
    27002699
    2701 - (Editor::Command)coreCommandByName:(const char*)name
    2702 {
    2703     Frame* coreFrame = core([self _frame]);
     2700- (WebCore::Editor::Command)coreCommandByName:(const char*)name
     2701{
     2702    auto* coreFrame = core([self _frame]);
    27042703    if (!coreFrame)
    2705         return Editor::Command();
     2704        return WebCore::Editor::Command();
    27062705    return coreFrame->editor().command(name);
    27072706}
     
    28652864    else if ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]) {
    28662865        // We can insert strings in any editable context.  We can insert other types, like images, only in rich edit contexts.
    2867         isReturnTypeOK = [returnType isEqualToString:legacyStringPasteboardType()] || [self _canEditRichly];
     2866        isReturnTypeOK = [returnType isEqualToString:WebCore::legacyStringPasteboardType()] || [self _canEditRichly];
    28682867    }
    28692868    if (isSendTypeOK && isReturnTypeOK)
     
    28832882    COMMAND_PROLOGUE
    28842883
    2885     if (Frame* coreFrame = core([self _frame]))
    2886         coreFrame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways);
     2884    if (auto* coreFrame = core([self _frame]))
     2885        coreFrame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignCenterAlways);
    28872886}
    28882887
     
    28922891{
    28932892    SEL action = [item action];
    2894     RefPtr<Frame> frame = core([self _frame]);
     2893    RefPtr<WebCore::Frame> frame = core([self _frame]);
    28952894
    28962895    if (!frame)
    28972896        return NO;
    28982897
    2899     if (Document* doc = frame->document()) {
     2898    if (WebCore::Document* doc = frame->document()) {
    29002899        if (doc->isPluginDocument())
    29012900            return NO;
     
    29432942        if ([menuItem isKindOfClass:[NSMenuItem class]]) {
    29442943            String direction = writingDirection == NSWritingDirectionLeftToRight ? "ltr" : "rtl";
    2945             [menuItem setState:frame->editor().selectionHasStyle(CSSPropertyDirection, direction)];
     2944            [menuItem setState:frame->editor().selectionHasStyle(WebCore::CSSPropertyDirection, direction)];
    29462945        }
    29472946        return [self _canEdit];
     
    29602959            // Take control of the title of the menu item instead of just checking/unchecking it because
    29612960            // a check would be ambiguous.
    2962             [menuItem setTitle:frame->editor().selectionHasStyle(CSSPropertyDirection, "rtl")
     2961            [menuItem setTitle:frame->editor().selectionHasStyle(WebCore::CSSPropertyDirection, "rtl")
    29632962                ? UI_STRING_INTERNAL("Left to Right", "Left to Right context menu item")
    29642963                : UI_STRING_INTERNAL("Right to Left", "Right to Left context menu item")];
     
    31253124        return YES;
    31263125   
    3127     Frame* coreFrame = core([self _frame]);
     3126    auto* coreFrame = core([self _frame]);
    31283127    return coreFrame && coreFrame->selection().selection().isContentEditable();
    31293128#else
     
    31563155        return YES;
    31573156
    3158     Frame* coreFrame = core([self _frame]);
     3157    auto* coreFrame = core([self _frame]);
    31593158    bool selectionIsEditable = coreFrame && coreFrame->selection().selection().isContentEditable();
    31603159    bool nextResponderIsInWebView = [nextResponder isKindOfClass:[NSView class]]
     
    33273326#endif
    33283327
    3329     if (Frame* coreFrame = core([self _frame])) {
     3328    if (auto* coreFrame = core([self _frame])) {
    33303329        coreFrame->document()->styleScope().didChangeStyleSheetEnvironment();
    33313330        coreFrame->document()->updateStyleIfNeeded();
     
    33423341- (void)layoutToMinimumPageWidth:(float)minPageLogicalWidth height:(float)minPageLogicalHeight originalPageWidth:(float)originalPageWidth originalPageHeight:(float)originalPageHeight maximumShrinkRatio:(float)maximumShrinkRatio adjustingViewSize:(BOOL)adjustViewSize
    33433342{
    3344     Frame* coreFrame = core([self _frame]);
     3343    auto* coreFrame = core([self _frame]);
    33453344    if (!coreFrame)
    33463345        return;
    33473346    if (coreFrame->document()) {
    3348         if (coreFrame->document()->pageCacheState() != Document::NotInPageCache)
     3347        if (coreFrame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
    33493348            return;
    33503349        coreFrame->document()->updateStyleIfNeeded();
     
    33603359    LOG(View, "%@ doing layout", self);
    33613360
    3362     if (FrameView* coreView = coreFrame->view()) {
     3361    if (auto* coreView = coreFrame->view()) {
    33633362        if (minPageLogicalWidth > 0.0) {
    3364             FloatSize pageSize(minPageLogicalWidth, minPageLogicalHeight);
    3365             FloatSize originalPageSize(originalPageWidth, originalPageHeight);
     3363            WebCore::FloatSize pageSize(minPageLogicalWidth, minPageLogicalHeight);
     3364            WebCore::FloatSize originalPageSize(originalPageWidth, originalPageHeight);
    33663365            if (coreFrame->document() && coreFrame->document()->renderView() && !coreFrame->document()->renderView()->style().isHorizontalWritingMode()) {
    3367                 pageSize = FloatSize(minPageLogicalHeight, minPageLogicalWidth);
    3368                 originalPageSize = FloatSize(originalPageHeight, originalPageWidth);
     3366                pageSize = WebCore::FloatSize(minPageLogicalHeight, minPageLogicalWidth);
     3367                originalPageSize = WebCore::FloatSize(originalPageHeight, originalPageWidth);
    33693368            }
    3370             coreView->forceLayoutForPagination(pageSize, originalPageSize, maximumShrinkRatio, adjustViewSize ? AdjustViewSize : DoNotAdjustViewSize);
     3369            coreView->forceLayoutForPagination(pageSize, originalPageSize, maximumShrinkRatio, adjustViewSize ? WebCore::AdjustViewSize : WebCore::DoNotAdjustViewSize);
    33713370        } else {
    33723371            coreView->forceLayout(!adjustViewSize);
     
    33993398    [super rightMouseUp:event];
    34003399
    3401     if (Frame* coreframe = core([self _frame]))
    3402         coreframe->eventHandler().mouseUp(event, [[self _webView] _pressureEvent]);
     3400    if (auto* coreFrame = core([self _frame]))
     3401        coreFrame->eventHandler().mouseUp(event, [[self _webView] _pressureEvent]);
    34033402}
    34043403
     
    34863485static RetainPtr<NSArray> fixMenusReceivedFromOldClients(NSArray *delegateSuppliedItems, NSArray *savedItems)
    34873486{
     3487    using namespace WebCore;
    34883488    auto newMenuItems = adoptNS([delegateSuppliedItems mutableCopy]);
    34893489
     
    36053605}
    36063606
    3607 static RetainPtr<NSMenuItem> createShareMenuItem(const HitTestResult& hitTestResult)
     3607static RetainPtr<NSMenuItem> createShareMenuItem(const WebCore::HitTestResult& hitTestResult)
    36083608{
    36093609    auto items = adoptNS([[NSMutableArray alloc] init]);
     
    36193619    }
    36203620
    3621     if (Image* image = hitTestResult.image()) {
    3622         if (RefPtr<SharedBuffer> buffer = image->data())
     3621    if (auto* image = hitTestResult.image()) {
     3622        if (RefPtr<WebCore::SharedBuffer> buffer = image->data())
    36233623            [items addObject:adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:buffer->data() length:buffer->size()]]).get()];
    36243624    }
     
    36353635}
    36363636
    3637 static RetainPtr<NSMutableArray> createMenuItems(const HitTestResult&, const Vector<ContextMenuItem>&);
    3638 
    3639 static RetainPtr<NSMenuItem> createMenuItem(const HitTestResult& hitTestResult, const ContextMenuItem& item)
    3640 {
    3641     if (item.action() == ContextMenuItemTagShareMenu)
     3637static RetainPtr<NSMutableArray> createMenuItems(const WebCore::HitTestResult&, const Vector<WebCore::ContextMenuItem>&);
     3638
     3639static RetainPtr<NSMenuItem> createMenuItem(const WebCore::HitTestResult& hitTestResult, const WebCore::ContextMenuItem& item)
     3640{
     3641    if (item.action() == WebCore::ContextMenuItemTagShareMenu)
    36423642        return createShareMenuItem(hitTestResult);
    36433643
     
    36563656    }
    36573657
    3658     case SeparatorType:
     3658    case WebCore::SeparatorType:
    36593659        return [NSMenuItem separatorItem];
    36603660
    3661     case SubmenuType: {
     3661    case WebCore::SubmenuType: {
    36623662        auto menu = adoptNS([[NSMenu alloc] init]);
    36633663
     
    36783678}
    36793679
    3680 static RetainPtr<NSMutableArray> createMenuItems(const HitTestResult& hitTestResult, const Vector<ContextMenuItem>& items)
     3680static RetainPtr<NSMutableArray> createMenuItems(const WebCore::HitTestResult& hitTestResult, const Vector<WebCore::ContextMenuItem>& items)
    36813681{
    36823682    auto menuItems = adoptNS([[NSMutableArray alloc] init]);
     
    36903690}
    36913691
    3692 static RetainPtr<NSArray> customMenuFromDefaultItems(WebView *webView, const ContextMenu& defaultMenu)
     3692static RetainPtr<NSArray> customMenuFromDefaultItems(WebView *webView, const WebCore::ContextMenu& defaultMenu)
    36933693{
    36943694    const auto& hitTestResult = webView.page->contextMenuController().hitTestResult();
     
    37323732    [_private->completionController endRevertingChange:NO moveLeft:NO];
    37333733
    3734     RefPtr<Frame> coreFrame = core([self _frame]);
     3734    RefPtr<WebCore::Frame> coreFrame = core([self _frame]);
    37353735    if (!coreFrame)
    37363736        return nil;
    37373737
    3738     Page* page = coreFrame->page();
     3738    auto* page = coreFrame->page();
    37393739    if (!page)
    37403740        return nil;
     
    37443744    page->contextMenuController().clearContextMenu();
    37453745    coreFrame->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]);
    3746     BOOL handledEvent = coreFrame->eventHandler().sendContextMenuEvent(PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
     3746    BOOL handledEvent = coreFrame->eventHandler().sendContextMenuEvent(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
    37473747    _private->handlingMouseDownEvent = NO;
    37483748
     
    37553755        return nil;
    37563756
    3757     ContextMenu* contextMenu = page->contextMenuController().contextMenu();
     3757    auto* contextMenu = page->contextMenuController().contextMenu();
    37583758    if (!contextMenu)
    37593759        return nil;
     
    37683768        [menu addItem:item];
    37693769
    3770         if (item.tag == ContextMenuItemTagShareMenu) {
     3770        if (item.tag == WebCore::ContextMenuItemTagShareMenu) {
    37713771            ASSERT([item.representedObject isKindOfClass:[NSSharingServicePicker class]]);
    37723772#if ENABLE(SERVICE_CONTROLS)
     
    37903790- (void)clearFocus
    37913791{
    3792     Frame* coreFrame = core([self _frame]);
     3792    auto* coreFrame = core([self _frame]);
    37933793    if (!coreFrame)
    37943794        return;
    3795     Document* document = coreFrame->document();
     3795    auto* document = coreFrame->document();
    37963796    if (!document)
    37973797        return;
     
    38093809- (void)setLayer:(CALayer *)layer
    38103810{
    3811     if (Frame* frame = core([self _frame])) {
    3812         if (FrameView* view = frame->view())
     3811    if (auto* frame = core([self _frame])) {
     3812        if (auto* view = frame->view())
    38133813            view->setPaintsEntireContents(layer);
    38143814    }
     
    38563856    if (!flag)
    38573857        return; // There's no way to say you don't need a layout.
    3858     if (Frame* frame = core([self _frame])) {
    3859         if (frame->document() && frame->document()->pageCacheState() != Document::NotInPageCache)
     3858    if (auto* frame = core([self _frame])) {
     3859        if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
    38603860            return;
    3861         if (FrameView* view = frame->view())
     3861        if (auto* view = frame->view())
    38623862            view->setNeedsLayoutAfterViewConfigurationChange();
    38633863    }
     
    38693869    if (!flag)
    38703870        return; // There's no way to say you don't need a style recalc.
    3871     if (Frame* frame = core([self _frame])) {
    3872         if (frame->document() && frame->document()->pageCacheState() != Document::NotInPageCache)
     3871    if (auto* frame = core([self _frame])) {
     3872        if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
    38733873            return;
    38743874        frame->document()->scheduleFullStyleRebuild();
     
    40324032    // WebCore via JavaScript, which could normally mutate the NSView tree while it is being traversed.
    40334033    // Defer those mutations while descendants are being traveresed.
    4034     WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
     4034    WebCore::WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
    40354035    [super _invalidateGStatesForTree];
    40364036}
     
    40924092#endif
    40934093
    4094     Frame* frame = core([self _frame]);
     4094    auto* frame = core([self _frame]);
    40954095    if (!frame || !frame->eventHandler().wheelEvent(event)) {
    40964096#if PLATFORM(MAC)
     
    41364136    if (hitHTMLView) {
    41374137        bool result = false;
    4138         if (Frame* coreFrame = core([hitHTMLView _frame])) {
     4138        if (auto* coreFrame = core([hitHTMLView _frame])) {
    41394139            coreFrame->eventHandler().setActivationEventNumber([event eventNumber]);
    41404140            [hitHTMLView _setMouseDownEvent:event];
    41414141            if ([hitHTMLView _isSelectionEvent:event]) {
    41424142#if ENABLE(DRAG_SUPPORT)
    4143                 if (Page* page = coreFrame->page())
    4144                     result = coreFrame->eventHandler().eventMayStartDrag(PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
     4143                if (auto* page = coreFrame->page())
     4144                    result = coreFrame->eventHandler().eventMayStartDrag(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
    41454145#endif
    41464146            } else if ([hitHTMLView _isScrollBarEvent:event])
     
    41674167            [hitHTMLView _setMouseDownEvent:event];
    41684168#if ENABLE(DRAG_SUPPORT)
    4169             if (Frame* coreFrame = core([hitHTMLView _frame])) {
    4170                 if (Page* page = coreFrame->page())
    4171                     result = coreFrame->eventHandler().eventMayStartDrag(PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
     4169            if (auto* coreFrame = core([hitHTMLView _frame])) {
     4170                if (auto* page = coreFrame->page())
     4171                    result = coreFrame->eventHandler().eventMayStartDrag(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));
    41724172            }
    41734173#endif
     
    42144214    // Let WebCore get a chance to deal with the event. This will call back to us
    42154215    // to start the autoscroll timer if appropriate.
    4216     if (Frame* coreframe = core([self _frame]))
    4217         coreframe->eventHandler().mouseDown(event);
     4216    if (auto* coreFrame = core([self _frame]))
     4217        coreFrame->eventHandler().mouseDown(event);
    42184218#else
    42194219    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     
    42314231            // Let WebCore get a chance to deal with the event. This will call back to us
    42324232            // to start the autoscroll timer if appropriate.
    4233             if (Frame* coreframe = core([self _frame]))
    4234                 coreframe->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]);
     4233            if (auto* coreFrame = core([self _frame]))
     4234                coreFrame->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]);
    42354235        }
    42364236    }
     
    42484248    // Let WebCore get a chance to deal with the event. This will call back to us
    42494249    // to start the autoscroll timer if appropriate.
    4250     if (Frame* coreframe = core([self _frame]))
    4251         coreframe->eventHandler().touchEvent(event);
     4250    if (auto* coreFrame = core([self _frame]))
     4251        coreFrame->eventHandler().touchEvent(event);
    42524252}
    42534253
     
    42874287
    42884288    if (!_private->ignoringMouseDraggedEvents) {
    4289         if (Frame* frame = core([self _frame])) {
    4290             if (Page* page = frame->page())
     4289        if (auto* frame = core([self _frame])) {
     4290            if (auto* page = frame->page())
    42914291                page->mainFrame().eventHandler().mouseDragged(event, [[self _webView] _pressureEvent]);
    42924292        }
     
    43024302    ASSERT(![self _webView] || [self _isTopHTMLView]);
    43034303   
    4304     Page* page = core([self _webView]);
     4304    auto* page = core([self _webView]);
    43054305    if (!page)
    43064306        return NSDragOperationNone;
     
    43184318    NSPoint windowMouseLoc = windowImageLoc;
    43194319   
    4320     if (Page* page = core([self _webView])) {
     4320    if (auto* page = core([self _webView])) {
    43214321        windowMouseLoc = NSMakePoint(windowImageLoc.x + page->dragController().dragOffset().x(), windowImageLoc.y + page->dragController().dragOffset().y());
    43224322        page->dragController().dragEnded();
     
    43704370    if (!wrapper) {
    43714371        ASSERT(![self _webView] || [self _isTopHTMLView]);
    4372         Page* page = core([self _webView]);
     4372        auto* page = core([self _webView]);
    43734373       
    43744374        //If a load occurs midway through a drag, the view may be detached, which gives
     
    44084408    ASSERT(![self _webView] || [self _isTopHTMLView]);
    44094409
    4410     Page* page = core([self _webView]);
     4410    auto* page = core([self _webView]);
    44114411    if (!page)
    44124412        return NSDragOperationNone;
     
    44214421    NSPoint windowLocation = [self.window convertRectFromScreen:{ screenPoint, NSZeroSize }].origin;
    44224422
    4423     if (Page* page = core([self _webView]))
     4423    if (auto* page = core([self _webView]))
    44244424        page->dragController().dragEnded();
    44254425
     
    44634463
    44644464    [self _stopAutoscrollTimer];
    4465     if (Frame* frame = core([self _frame])) {
    4466         if (Page* page = frame->page()) {
     4465    if (auto* frame = core([self _frame])) {
     4466        if (auto* page = frame->page()) {
    44674467#if PLATFORM(IOS_FAMILY)
    44684468            page->mainFrame().eventHandler().mouseUp(event);
     
    44964496        return;
    44974497
    4498     RefPtr<Frame> coreFrame = core([self _frame]);
     4498    RefPtr<WebCore::Frame> coreFrame = core([self _frame]);
    44994499    if (!coreFrame)
    45004500        return;
     
    45184518// Utility function to make sure we don't return anything through the NSTextInput
    45194519// API when an editable region is not currently focused.
    4520 static BOOL isTextInput(Frame* coreFrame)
     4520static BOOL isTextInput(WebCore::Frame* coreFrame)
    45214521{
    45224522    if (!coreFrame)
    45234523        return NO;
    4524     const VisibleSelection& selection = coreFrame->selection().selection();
     4524    const auto& selection = coreFrame->selection().selection();
    45254525    return !selection.isNone() && selection.isContentEditable();
    45264526}
     
    45284528#if PLATFORM(MAC)
    45294529
    4530 static BOOL isInPasswordField(Frame* coreFrame)
     4530static BOOL isInPasswordField(WebCore::Frame* coreFrame)
    45314531{
    45324532    return coreFrame && coreFrame->selection().selection().isInPasswordField();
     
    45354535#endif
    45364536
    4537 static RefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)
     4537static RefPtr<WebCore::KeyboardEvent> currentKeyboardEvent(WebCore::Frame* coreFrame)
    45384538{
    45394539#if PLATFORM(MAC)
     
    45444544    switch ([event type]) {
    45454545    case NSEventTypeKeyDown: {
    4546         PlatformKeyboardEvent platformEvent = PlatformEventFactory::createPlatformKeyboardEvent(event);
    4547         platformEvent.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown);
    4548         return KeyboardEvent::create(platformEvent, &coreFrame->windowProxy());
     4546        WebCore::PlatformKeyboardEvent platformEvent = WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event);
     4547        platformEvent.disambiguateKeyDownEvent(WebCore::PlatformEvent::RawKeyDown);
     4548        return WebCore::KeyboardEvent::create(platformEvent, &coreFrame->windowProxy());
    45494549    }
    45504550    case NSEventTypeKeyUp:
    4551         return KeyboardEvent::create(PlatformEventFactory::createPlatformKeyboardEvent(event), &coreFrame->windowProxy());
     4551        return WebCore::KeyboardEvent::create(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event), &coreFrame->windowProxy());
    45524552    default:
    45534553        return nullptr;
     
    45594559    WebEventType type = event.type;
    45604560    if (type == WebEventKeyDown || type == WebEventKeyUp) {
    4561         Document* document = coreFrame->document();
    4562         return KeyboardEvent::create(PlatformEventFactory::createPlatformKeyboardEvent(event), document ? document->windowProxy() : 0);
     4561        auto* document = coreFrame->document();
     4562        return WebCore::KeyboardEvent::create(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event), document ? document->windowProxy() : 0);
    45634563    }
    45644564    return nullptr;
     
    45764576#endif
    45774577   
    4578     Frame* frame = core([self _frame]);
     4578    auto* frame = core([self _frame]);
    45794579    if (!frame)
    45804580        return YES;
     
    45954595    frame->editor().setStartNewKillRingSequence(true);
    45964596
    4597     Page* page = frame->page();
     4597    auto* page = frame->page();
    45984598    if (!page)
    45994599        return YES;
     
    46074607        return YES;
    46084608
    4609     if (Document* document = frame->document())
     4609    if (auto* document = frame->document())
    46104610        document->setFocusedElement(0);
    4611     page->focusController().setInitialFocus(direction == NSSelectingNext ? FocusDirectionForward : FocusDirectionBackward,
     4611    page->focusController().setInitialFocus(direction == NSSelectingNext ? WebCore::FocusDirectionForward : WebCore::FocusDirectionBackward,
    46124612                                             currentKeyboardEvent(frame).get());
    46134613    return YES;
     
    46254625        [_private->completionController endRevertingChange:NO moveLeft:NO];
    46264626#endif
    4627         Frame* coreFrame = core([self _frame]);
     4627        auto* coreFrame = core([self _frame]);
    46284628        if (!coreFrame)
    46294629            return resign;
    46304630
    46314631#if PLATFORM(IOS_FAMILY)
    4632         if (Document* document = coreFrame->document()) {
    4633             document->markers().removeMarkers(DocumentMarker::DictationPhraseWithAlternatives);
    4634             document->markers().removeMarkers(DocumentMarker::DictationResult);
     4632        if (auto* document = coreFrame->document()) {
     4633            document->markers().removeMarkers(WebCore::DocumentMarker::DictationPhraseWithAlternatives);
     4634            document->markers().removeMarkers(WebCore::DocumentMarker::DictationResult);
    46354635        }
    46364636#endif
    46374637
    4638         Page* page = coreFrame->page();
     4638        auto* page = coreFrame->page();
    46394639        if (!page)
    46404640            return resign;
     
    47124712    _private->paginateScreenContent = paginateScreenContent;
    47134713   
    4714     Frame* coreFrame = core([self _frame]);
     4714    auto* coreFrame = core([self _frame]);
    47154715    if (coreFrame) {
    4716         if (FrameView* coreView = coreFrame->view())
     4716        if (auto* coreView = coreFrame->view())
    47174717            coreView->setMediaType(_private->printing ? "print" : "screen");
    4718         if (Document* document = coreFrame->document()) {
     4718        if (auto* document = coreFrame->document()) {
    47194719            // In setting printing, we should not validate resources already cached for the document.
    47204720            // See https://bugs.webkit.org/show_bug.cgi?id=43704
    4721             ResourceCacheValidationSuppressor validationSuppressor(document->cachedResourceLoader());
     4721            WebCore::ResourceCacheValidationSuppressor validationSuppressor(document->cachedResourceLoader());
    47224722
    47234723            document->setPaginatedForScreen(_private->paginateScreenContent);
     
    47684768{
    47694769    bool useViewWidth = true;
    4770     Frame* coreFrame = core([self _frame]);
     4770    auto* coreFrame = core([self _frame]);
    47714771    if (coreFrame) {
    4772         Document* document = coreFrame->document();
     4772        auto* document = coreFrame->document();
    47734773        if (document && document->renderView())
    47744774            useViewWidth = document->renderView()->style().isHorizontalWritingMode();
     
    49404940#if PLATFORM(MAC)
    49414941    BOOL completionPopupWasOpen = _private->completionController && [_private->completionController popupWindowIsOpen];
    4942     Frame* coreFrame = core([self _frame]);
     4942    auto* coreFrame = core([self _frame]);
    49434943    if (!eventWasSentToWebCore && coreFrame && coreFrame->eventHandler().keyEvent(event)) {
    49444944        // WebCore processed a key event, bail on any preexisting complete: UI
     
    49514951    }
    49524952#else
    4953     Frame *coreFrame = core([self _frame]);
     4953    auto* coreFrame = core([self _frame]);
    49544954    if (!eventWasSentToWebCore && coreFrame)
    49554955        coreFrame->eventHandler().keyEvent(event);
     
    49774977
    49784978    RetainPtr<WebHTMLView> selfProtector = self;
    4979     Frame* coreFrame = core([self _frame]);
     4979    auto* coreFrame = core([self _frame]);
    49804980    if (coreFrame && !eventWasSentToWebCore)
    49814981        coreFrame->eventHandler().keyEvent(event);
     
    49954995    RetainPtr<WebHTMLView> selfProtector = self;
    49964996
    4997     Frame* coreFrame = core([self _frame]);
     4997    auto* coreFrame = core([self _frame]);
    49984998    unsigned short keyCode = [event keyCode];
    49994999
    50005000    // Don't make an event from the num lock and function keys.
    50015001    if (coreFrame && keyCode != 0 && keyCode != 10 && keyCode != 63) {
    5002         coreFrame->eventHandler().keyEvent(PlatformEventFactory::createPlatformKeyboardEvent(event));
     5002        coreFrame->eventHandler().keyEvent(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event));
    50035003        return;
    50045004    }
     
    50615061    COMMAND_PROLOGUE
    50625062
    5063     if (Frame* coreFrame = core([self _frame]))
    5064         coreFrame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways);
     5063    if (auto* coreFrame = core([self _frame]))
     5064        coreFrame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignCenterAlways);
    50655065}
    50665066
     
    50695069- (NSData *)_selectionStartFontAttributesAsRTF
    50705070{
    5071     Frame* coreFrame = core([self _frame]);
     5071    auto* coreFrame = core([self _frame]);
    50725072    auto string = adoptNS([[NSAttributedString alloc] initWithString:@"x"
    50735073        attributes:coreFrame ? coreFrame->editor().fontAttributesAtSelectionStart().createDictionary().get() : nil]);
     
    50825082    if (fontPasteboard == nil)
    50835083        return nil;
    5084     NSData *data = [fontPasteboard dataForType:legacyFontPasteboardType()];
     5084    NSData *data = [fontPasteboard dataForType:WebCore::legacyFontPasteboardType()];
    50855085    if (data == nil || [data length] == 0)
    50865086        return nil;
     
    52035203#endif // PLATFORM(MAC)
    52045204
    5205 - (void)_applyStyleToSelection:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
    5206 {
    5207     [self _applyEditingStyleToSelection:EditingStyle::create(core(style)) withUndoAction:undoAction];
    5208 }
    5209 
    5210 - (void)_applyEditingStyleToSelection:(Ref<EditingStyle>&&)editingStyle withUndoAction:(EditAction)undoAction
    5211 {
    5212     if (Frame* coreFrame = core([self _frame]))
    5213         coreFrame->editor().applyStyleToSelection(WTFMove(editingStyle), undoAction, Editor::ColorFilterMode::InvertColor);
     5205- (void)_applyStyleToSelection:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction
     5206{
     5207    [self _applyEditingStyleToSelection:WebCore::EditingStyle::create(core(style)) withUndoAction:undoAction];
     5208}
     5209
     5210- (void)_applyEditingStyleToSelection:(Ref<WebCore::EditingStyle>&&)editingStyle withUndoAction:(WebCore::EditAction)undoAction
     5211{
     5212    if (auto* coreFrame = core([self _frame]))
     5213        coreFrame->editor().applyStyleToSelection(WTFMove(editingStyle), undoAction, WebCore::Editor::ColorFilterMode::InvertColor);
    52145214}
    52155215
     
    52635263    // Pressing Esc results in a fake event being sent - don't pass it to WebCore.
    52645264    if (!eventWasSentToWebCore && event == [NSApp currentEvent] && self == [[self window] firstResponder])
    5265         if (Frame* frame = core([self _frame]))
     5265        if (auto* frame = core([self _frame]))
    52665266            ret = frame->eventHandler().keyEvent(event);
    52675267
     
    52875287    NSPasteboard *fontPasteboard = [NSPasteboard pasteboardWithName:NSFontPboard];
    52885288    ALLOW_DEPRECATED_DECLARATIONS_END
    5289     [fontPasteboard declareTypes:[NSArray arrayWithObject:legacyFontPasteboardType()] owner:nil];
    5290     [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType:legacyFontPasteboardType()];
     5289    [fontPasteboard declareTypes:[NSArray arrayWithObject:WebCore::legacyFontPasteboardType()] owner:nil];
     5290    [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType:WebCore::legacyFontPasteboardType()];
    52915291}
    52925292
     
    52975297    // Read RTF with font attributes from the pasteboard.
    52985298    // Maybe later we should add a pasteboard type that contains CSS text for "native" copy and paste font.
    5299     [self _applyStyleToSelection:[self _styleFromFontAttributes:[self _fontAttributesFromFontPasteboard]] withUndoAction:EditAction::PasteFont];
     5299    [self _applyStyleToSelection:[self _styleFromFontAttributes:[self _fontAttributesFromFontPasteboard]] withUndoAction:WebCore::EditAction::PasteFont];
    53005300}
    53015301
     
    53135313    COMMAND_PROLOGUE
    53145314
    5315     [self _applyEditingStyleToSelection:computedFontChanges(NSFontManager.sharedFontManager).createEditingStyle() withUndoAction:EditAction::SetFont];
     5315    [self _applyEditingStyleToSelection:WebCore::computedFontChanges(NSFontManager.sharedFontManager).createEditingStyle() withUndoAction:WebCore::EditAction::SetFont];
    53165316}
    53175317
     
    53205320    COMMAND_PROLOGUE
    53215321
    5322     [self _applyEditingStyleToSelection:computedFontAttributeChanges(NSFontManager.sharedFontManager, sender).createEditingStyle() withUndoAction:EditAction::ChangeAttributes];
     5322    [self _applyEditingStyleToSelection:WebCore::computedFontAttributeChanges(NSFontManager.sharedFontManager, sender).createEditingStyle() withUndoAction:WebCore::EditAction::ChangeAttributes];
    53235323}
    53245324
     
    53335333}
    53345334
    5335 - (EditAction)_undoActionFromColorPanelWithSelector:(SEL)selector
     5335- (WebCore::EditAction)_undoActionFromColorPanelWithSelector:(SEL)selector
    53365336{
    53375337    if (selector == @selector(setBackgroundColor:))
    5338         return EditAction::SetBackgroundColor;
    5339     return EditAction::SetColor;
     5338        return WebCore::EditAction::SetBackgroundColor;
     5339    return WebCore::EditAction::SetColor;
    53405340}
    53415341
     
    53455345    WebView *webView = [self _webView];
    53465346    if ([[webView _editingDelegateForwarder] webView:webView shouldApplyStyle:style toElementsInDOMRange:range]) {
    5347         if (Frame* coreFrame = core([self _frame])) {
     5347        if (auto* coreFrame = core([self _frame])) {
    53485348            // FIXME: We shouldn't have to make a copy here.
    5349             Ref<MutableStyleProperties> properties(core(style)->copyProperties());
     5349            Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties());
    53505350            coreFrame->editor().applyStyle(properties.ptr(), [self _undoActionFromColorPanelWithSelector:selector]);
    53515351        }
     
    53815381    // NSTextView. However, this might not be required for Tiger, since the background-color
    53825382    // changing box in the font panel doesn't work in Mail (3674481), though it does in TextEdit.
    5383     [self _applyStyleToSelection:[self _styleFromColorPanelWithSelector:@selector(setColor:)] withUndoAction:EditAction::SetColor];
     5383    [self _applyStyleToSelection:[self _styleFromColorPanelWithSelector:@selector(setColor:)] withUndoAction:WebCore::EditAction::SetColor];
    53845384}
    53855385
     
    54375437    COMMAND_PROLOGUE
    54385438
    5439     if (Frame* coreFrame = core([self _frame]))
     5439    if (auto* coreFrame = core([self _frame]))
    54405440        coreFrame->editor().advanceToNextMisspelling();
    54415441}
     
    54575457    }
    54585458   
    5459     if (Frame* coreFrame = core([self _frame]))
     5459    if (auto* coreFrame = core([self _frame]))
    54605460        coreFrame->editor().advanceToNextMisspelling(true);
    54615461    [spellingPanel orderFront:sender];
     
    55035503        return;
    55045504   
    5505     Frame* coreFrame = core([self _frame]);
     5505    auto* coreFrame = core([self _frame]);
    55065506    if (!coreFrame)
    55075507        return;
    55085508
    5509     auto direction = WritingDirection::RightToLeft;
     5509    auto direction = WebCore::WritingDirection::RightToLeft;
    55105510    switch (coreFrame->editor().baseWritingDirectionForSelectionStart()) {
    5511     case WritingDirection::LeftToRight:
     5511    case WebCore::WritingDirection::LeftToRight:
    55125512        break;
    5513     case WritingDirection::RightToLeft:
    5514         direction = WritingDirection::LeftToRight;
     5513    case WebCore::WritingDirection::RightToLeft:
     5514        direction = WebCore::WritingDirection::LeftToRight;
    55155515        break;
    55165516    // The writingDirectionForSelectionStart method will never return "natural". It
    55175517    // will always return a concrete direction. So, keep the compiler happy, and assert not reached.
    5518     case WritingDirection::Natural:
     5518    case WebCore::WritingDirection::Natural:
    55195519        ASSERT_NOT_REACHED();
    55205520        break;
    55215521    }
    55225522
    5523     if (Frame* coreFrame = core([self _frame]))
     5523    if (auto* coreFrame = core([self _frame]))
    55245524        coreFrame->editor().setBaseWritingDirection(direction);
    55255525}
     
    55385538    ASSERT(writingDirection != NSWritingDirectionNatural);
    55395539
    5540     if (Frame* coreFrame = core([self _frame]))
    5541         coreFrame->editor().setBaseWritingDirection(writingDirection == NSWritingDirectionLeftToRight ? WritingDirection::LeftToRight : WritingDirection::RightToLeft);
     5540    if (auto* coreFrame = core([self _frame]))
     5541        coreFrame->editor().setBaseWritingDirection(writingDirection == NSWritingDirectionLeftToRight ? WebCore::WritingDirection::LeftToRight : WebCore::WritingDirection::RightToLeft);
    55425542}
    55435543
     
    55595559    }
    55605560
    5561     if (Frame* coreFrame = core([self _frame]))
    5562         coreFrame->editor().setBaseWritingDirection(direction == NSWritingDirectionLeftToRight ? WritingDirection::LeftToRight : WritingDirection::RightToLeft);
     5561    if (auto* coreFrame = core([self _frame]))
     5562        coreFrame->editor().setBaseWritingDirection(direction == NSWritingDirectionLeftToRight ? WebCore::WritingDirection::LeftToRight : WebCore::WritingDirection::RightToLeft);
    55635563}
    55645564
     
    56325632- (void)_updateControlTints
    56335633{
    5634     Frame* frame = core([self _frame]);
     5634    auto* frame = core([self _frame]);
    56355635    if (!frame)
    56365636        return;
    5637     FrameView* view = frame->view();
     5637    auto* view = frame->view();
    56385638    if (!view)
    56395639        return;
     
    57015701    [self _updateSelectionForInputManager];
    57025702    [self _updateFontPanel];
    5703     if (Frame* coreFrame = core([self _frame])) {
     5703    if (auto* coreFrame = core([self _frame])) {
    57045704        if (!coreFrame->editor().isHandlingAcceptedCandidate())
    57055705            _private->softSpaceRange = NSMakeRange(NSNotFound, 0);
     
    57265726    NSFont *font = nil;
    57275727    RetainPtr<NSDictionary> attributes;
    5728     if (Frame* coreFrame = core([self _frame])) {
    5729         if (const Font* fd = coreFrame->editor().fontForSelection(multipleFonts))
     5728    if (auto* coreFrame = core([self _frame])) {
     5729        if (const WebCore::Font* fd = coreFrame->editor().fontForSelection(multipleFonts))
    57305730            font = (NSFont *)fd->platformData().registeredFont();
    57315731        attributes = coreFrame->editor().fontAttributesAtSelectionStart().createDictionary();
     
    57545754    if (![[self _webView] smartInsertDeleteEnabled])
    57555755        return NO;
    5756     Frame* coreFrame = core([self _frame]);
    5757     return coreFrame && coreFrame->selection().granularity() == WordGranularity;
     5756    auto* coreFrame = core([self _frame]);
     5757    return coreFrame && coreFrame->selection().granularity() == WebCore::WordGranularity;
    57585758}
    57595759
     
    59205920- (void)_lookUpInDictionaryFromMenu:(id)sender
    59215921{
    5922     Frame* coreFrame = core([self _frame]);
     5922    auto* coreFrame = core([self _frame]);
    59235923    if (!coreFrame)
    59245924        return;
    59255925
    5926     RefPtr<Range> selectionRange = coreFrame->selection().selection().firstRange();
     5926    RefPtr<WebCore::Range> selectionRange = coreFrame->selection().selection().firstRange();
    59275927    if (!selectionRange)
    59285928        return;
    59295929
    5930     [[self _webView] _showDictionaryLookupPopup:[WebImmediateActionController _dictionaryPopupInfoForRange:*selectionRange inFrame:coreFrame withLookupOptions:nil indicatorOptions:TextIndicatorOptionIncludeSnapshotWithSelectionHighlight transition:TextIndicatorPresentationTransition::BounceAndCrossfade]];
     5930    [[self _webView] _showDictionaryLookupPopup:[WebImmediateActionController _dictionaryPopupInfoForRange:*selectionRange inFrame:coreFrame withLookupOptions:nil indicatorOptions:WebCore::TextIndicatorOptionIncludeSnapshotWithSelectionHighlight transition:WebCore::TextIndicatorPresentationTransition::BounceAndCrossfade]];
    59315931}
    59325932
    59335933- (void)quickLookWithEvent:(NSEvent *)event
    59345934{
    5935     [[self _webView] _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     5935    [[self _webView] _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    59365936    [super quickLookWithEvent:event];
    59375937}
     
    59575957    parameters->executingSavedKeypressCommands = true;
    59585958   
    5959     const Vector<KeypressCommand>& commands = parameters->event->keypressCommands();
     5959    const Vector<WebCore::KeypressCommand>& commands = parameters->event->keypressCommands();
    59605960
    59615961    for (size_t i = 0; i < commands.size(); ++i) {
     
    59765976#if PLATFORM(MAC)
    59775977
    5978 - (BOOL)_interpretKeyEvent:(KeyboardEvent*)event savingCommands:(BOOL)savingCommands
    5979 {
    5980     ASSERT(core([self _frame]) == downcast<Node>(event->target())->document().frame());
     5978- (BOOL)_interpretKeyEvent:(WebCore::KeyboardEvent*)event savingCommands:(BOOL)savingCommands
     5979{
     5980    ASSERT(core([self _frame]) == downcast<WebCore::Node>(event->target())->document().frame());
    59815981    ASSERT(!savingCommands || event->keypressCommands().isEmpty()); // Save commands once for each event.
    59825982
     
    60036003    parameters.event = event;
    60046004    _private->interpretKeyEventsParameters = &parameters;
    6005     const Vector<KeypressCommand>& commands = event->keypressCommands();
     6005    const Vector<WebCore::KeypressCommand>& commands = event->keypressCommands();
    60066006
    60076007    if (savingCommands) {
     
    60276027        // If there are no text insertion commands, default keydown handler is the right time to execute the commands.
    60286028        // Keypress (Char event) handler is the latest opportunity to execute.
    6029         if (!haveTextInsertionCommands || platformEvent->type() == PlatformEvent::Char)
     6029        if (!haveTextInsertionCommands || platformEvent->type() == WebCore::PlatformEvent::Char)
    60306030            [self _executeSavedKeypressCommands];
    60316031    }
     
    60516051#if PLATFORM(IOS_FAMILY)
    60526052   
    6053 - (BOOL)_handleEditingKeyEvent:(KeyboardEvent *)wcEvent
     6053- (BOOL)_handleEditingKeyEvent:(WebCore::KeyboardEvent *)wcEvent
    60546054{
    60556055    // Use the isEditable state to determine whether or not to process tab key events.
     
    60696069            return NO;
    60706070
    6071         bool isCharEvent = platformEvent->type() == PlatformKeyboardEvent::Char;
     6071        bool isCharEvent = platformEvent->type() == WebCore::PlatformKeyboardEvent::Char;
    60726072
    60736073        if (!isCharEvent && [webView._UIKitDelegateForwarder handleKeyTextCommandForCurrentEvent])
     
    61306130{
    61316131    WebFrame *webFrame = [self _frame];
    6132     Frame* coreFrame = core(webFrame);
     6132    auto* coreFrame = core(webFrame);
    61336133    if (coreFrame && coreFrame->view())
    61346134        coreFrame->view()->updateLayoutAndStyleIfNeededRecursive();
     
    63936393
    63946394    WebFrame *webFrame = [self _frame];
    6395     Frame* coreFrame = core(webFrame);
     6395    auto* coreFrame = core(webFrame);
    63966396    if (!coreFrame)
    63976397        return NSMakeRange(0, 0);
     
    64116411
    64126412    WebFrame *frame = [self _frame];
    6413     Frame* coreFrame = core(frame);
     6413    auto* coreFrame = core(frame);
    64146414    if (!isTextInput(coreFrame) || isInPasswordField(coreFrame)) {
    64156415        LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length);
    64166416        return nil;
    64176417    }
    6418     RefPtr<Range> range = [frame _convertToDOMRange:nsRange];
     6418    RefPtr<WebCore::Range> range = [frame _convertToDOMRange:nsRange];
    64196419    if (!range) {
    64206420        LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length);
     
    64476447- (BOOL)hasMarkedText
    64486448{
    6449     Frame* coreFrame = core([self _frame]);
     6449    auto* coreFrame = core([self _frame]);
    64506450    BOOL result = coreFrame && coreFrame->editor().hasComposition();
    64516451
     
    64766476    }
    64776477   
    6478     if (Frame* coreFrame = core([self _frame]))
     6478    if (auto* coreFrame = core([self _frame]))
    64796479        coreFrame->editor().confirmComposition();
    64806480}
     
    64826482#if PLATFORM(MAC)
    64836483
    6484 static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnderline>& result)
     6484static void extractUnderlines(NSAttributedString *string, Vector<WebCore::CompositionUnderline>& result)
    64856485{
    64866486    int length = [[string string] length];
     
    64926492
    64936493        if (NSNumber *style = [attrs objectForKey:NSUnderlineStyleAttributeName]) {
    6494             Color color = Color::black;
    6495             CompositionUnderlineColor compositionUnderlineColor = CompositionUnderlineColor::TextColor;
     6494            WebCore::Color color = WebCore::Color::black;
     6495            auto compositionUnderlineColor = WebCore::CompositionUnderlineColor::TextColor;
    64966496            if (NSColor *colorAttr = [attrs objectForKey:NSUnderlineColorAttributeName]) {
    6497                 color = colorFromNSColor(colorAttr);
    6498                 compositionUnderlineColor = CompositionUnderlineColor::GivenColor;
     6497                color = WebCore::colorFromNSColor(colorAttr);
     6498                compositionUnderlineColor = WebCore::CompositionUnderlineColor::GivenColor;
    64996499            }
    6500             result.append(CompositionUnderline(range.location, NSMaxRange(range), compositionUnderlineColor, color, [style intValue] > 1));
     6500            result.append(WebCore::CompositionUnderline(range.location, NSMaxRange(range), compositionUnderlineColor, color, [style intValue] > 1));
    65016501        }
    65026502
     
    65286528    }
    65296529   
    6530     Frame* coreFrame = core([self _frame]);
     6530    auto* coreFrame = core([self _frame]);
    65316531    if (!coreFrame)
    65326532        return;
     
    65356535        return;
    65366536
    6537     Vector<CompositionUnderline> underlines;
     6537    Vector<WebCore::CompositionUnderline> underlines;
    65386538    NSString *text;
    65396539    NSRange replacementRange = { NSNotFound, 0 };
     
    65536553    } else {
    65546554        text = string;
    6555         underlines.append(CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor, Color::black, false));
     6555        underlines.append(WebCore::CompositionUnderline(0, [text length], WebCore::CompositionUnderlineColor::TextColor, WebCore::Color::black, false));
    65566556    }
    65576557#else
     
    65776577        parameters->consumedByIM = false;
    65786578
    6579     KeyboardEvent* event = parameters ? parameters->event : 0;
     6579    auto* event = parameters ? parameters->event : 0;
    65806580    bool shouldSaveCommand = parameters && parameters->shouldSaveCommands;
    65816581
    65826582    // As in insertText:, we assume that the call comes from an input method if there is marked text.
    6583     RefPtr<Frame> coreFrame = core([self _frame]);
     6583    RefPtr<WebCore::Frame> coreFrame = core([self _frame]);
    65846584    bool isFromInputMethod = coreFrame && coreFrame->editor().hasComposition();
    65856585
    65866586    if (event && shouldSaveCommand && !isFromInputMethod)
    6587         event->keypressCommands().append(KeypressCommand(NSStringFromSelector(selector)));
     6587        event->keypressCommands().append(WebCore::KeypressCommand(NSStringFromSelector(selector)));
    65886588    else {
    65896589        // Make sure that only direct calls to doCommandBySelector: see the parameters by setting to 0.
     
    65966596            eventWasHandled = true;
    65976597        else {
    6598             Editor::Command command = [self coreCommandBySelector:selector];
     6598            WebCore::Editor::Command command = [self coreCommandBySelector:selector];
    65996599            if (command.isSupported())
    66006600                eventWasHandled = command.execute(event);
     
    66406640        parameters->consumedByIM = false;
    66416641
    6642     RefPtr<Frame> coreFrame = core([self _frame]);
     6642    RefPtr<WebCore::Frame> coreFrame = core([self _frame]);
    66436643    NSString *text;
    66446644    NSRange replacementRange = { NSNotFound, 0 };
     
    66486648#endif
    66496649
    6650     Vector<DictationAlternative> dictationAlternativeLocations;
     6650    Vector<WebCore::DictationAlternative> dictationAlternativeLocations;
    66516651#if PLATFORM(MAC)
    66526652    if (isAttributedString) {
     
    66586658#endif
    66596659#if USE(INSERTION_UNDO_GROUPING)
    6660         registerUndoGroup = shouldRegisterInsertionUndoGroup(string);
     6660        registerUndoGroup = WebCore::shouldRegisterInsertionUndoGroup(string);
    66616661#endif
    66626662        // FIXME: We ignore most attributes from the string, so for example inserting from Character Palette loses font and glyph variation data.
     
    66736673        text = string;
    66746674
    6675     KeyboardEvent* event = parameters ? parameters->event : 0;
     6675    auto* event = parameters ? parameters->event : 0;
    66766676
    66776677    // insertText can be called for several reasons:
     
    66836683    bool shouldSaveCommand = parameters && parameters->shouldSaveCommands;
    66846684    if (event && shouldSaveCommand && !isFromInputMethod) {
    6685         event->keypressCommands().append(KeypressCommand("insertText:", text));
     6685        event->keypressCommands().append(WebCore::KeypressCommand("insertText:", text));
    66866686        return;
    66876687    }
     
    67036703        WebRangeIsRelativeTo rangeIsRelativeTo = needToRemoveSoftSpace ? WebRangeIsRelativeTo::Paragraph : WebRangeIsRelativeTo::EditableRoot;
    67046704        if (auto domRange = [[self _frame] _convertToDOMRange:replacementRange rangeIsRelativeTo:rangeIsRelativeTo]) {
    6705             coreFrame->selection().setSelection(VisibleSelection(*domRange, SEL_DEFAULT_AFFINITY));
     6705            coreFrame->selection().setSelection(WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY));
    67066706            replacesText = replacementRange.length;
    67076707        }
     
    67186718            eventHandled = coreFrame->editor().insertDictatedText(eventText, dictationAlternativeLocations, event);
    67196719        else
    6720             eventHandled = coreFrame->editor().insertText(eventText, event, replacesText ? TextEventInputAutocompletion : TextEventInputKeyboard);
     6720            eventHandled = coreFrame->editor().insertText(eventText, event, replacesText ? WebCore::TextEventInputAutocompletion : WebCore::TextEventInputKeyboard);
    67216721       
    67226722#if USE(INSERTION_UNDO_GROUPING)
    67236723        if (registerUndoGroup)
    6724             registerInsertionUndoGroupingWithUndoManager([[self _webView] undoManager]);
     6724            WebCore::registerInsertionUndoGroupingWithUndoManager([[self _webView] undoManager]);
    67256725#endif
    67266726    } else {
     
    67456745    }
    67466746
    6747     Frame* coreFrame = core([self _frame]);
     6747    auto* coreFrame = core([self _frame]);
    67486748    if (!coreFrame)
    67496749        return;
     
    67686768- (void)_updateSelectionForInputManager
    67696769{
    6770     Frame* coreFrame = core([self _frame]);
     6770    auto* coreFrame = core([self _frame]);
    67716771    if (!coreFrame)
    67726772        return;
     
    68256825        return nil;
    68266826
    6827     Vector<FloatRect> list;
    6828     if (Frame* coreFrame = core([self _frame]))
     6827    Vector<WebCore::FloatRect> list;
     6828    if (auto* coreFrame = core([self _frame]))
    68296829        coreFrame->selection().getClippedVisibleTextRectangles(list);
    68306830
     
    68466846#if PLATFORM(IOS_FAMILY)
    68476847
    6848 static CGImageRef imageFromRect(Frame* frame, CGRect rect)
    6849 {
    6850     Page* page = frame->page();
     6848static CGImageRef imageFromRect(WebCore::Frame* frame, CGRect rect)
     6849{
     6850    auto* page = frame->page();
    68516851    if (!page)
    68526852        return nil;
     
    68596859    WebHTMLView *view = (WebHTMLView *)documentView;
    68606860   
    6861     OptionSet<PaintBehavior> oldPaintBehavior = frame->view()->paintBehavior();
    6862     frame->view()->setPaintBehavior(oldPaintBehavior | PaintBehavior::FlattenCompositingLayers | PaintBehavior::Snapshotting);
     6861    OptionSet<WebCore::PaintBehavior> oldPaintBehavior = frame->view()->paintBehavior();
     6862    frame->view()->setPaintBehavior(oldPaintBehavior | WebCore::PaintBehavior::FlattenCompositingLayers | WebCore::PaintBehavior::Snapshotting);
    68636863
    68646864    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    68816881    size_t bitsPerPixel = 4 * bitsPerComponent;
    68826882    size_t bytesPerRow = ((bitsPerPixel + 7) / 8) * width;
    6883     RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, sRGBColorSpaceRef(), kCGImageAlphaPremultipliedLast));
     6883    RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, WebCore::sRGBColorSpaceRef(), kCGImageAlphaPremultipliedLast));
    68846884    if (!context)
    68856885        return nil;
     
    69126912}
    69136913
    6914 static CGImageRef selectionImage(Frame* frame, bool forceBlackText)
     6914static CGImageRef selectionImage(WebCore::Frame* frame, bool forceBlackText)
    69156915{
    69166916    ASSERT(!WebThreadIsEnabled() || WebThreadIsLocked());
    6917     frame->view()->setPaintBehavior(PaintBehavior::SelectionOnly | (forceBlackText ? OptionSet<PaintBehavior>(PaintBehavior::ForceBlackText) : OptionSet<PaintBehavior>()));
     6917    frame->view()->setPaintBehavior(WebCore::PaintBehavior::SelectionOnly | (forceBlackText ? OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::ForceBlackText) : OptionSet<WebCore::PaintBehavior>()));
    69186918    frame->document()->updateLayout();
    69196919    CGImageRef result = imageFromRect(frame, frame->selection().selectionBounds());
    6920     frame->view()->setPaintBehavior(PaintBehavior::Normal);
     6920    frame->view()->setPaintBehavior(WebCore::PaintBehavior::Normal);
    69216921    return result;
    69226922}
     
    69336933        return nil;
    69346934
    6935     Frame* coreFrame = core([self _frame]);
     6935    auto* coreFrame = core([self _frame]);
    69366936    if (!coreFrame)
    69376937        return nil;
    69386938
    6939     Ref<Frame> protectedCoreFrame(*coreFrame);
     6939    Ref<WebCore::Frame> protectedCoreFrame(*coreFrame);
    69406940
    69416941#if PLATFORM(IOS_FAMILY)
    69426942    return selectionImage(coreFrame, forceBlackText);
    69436943#else
    6944     TextIndicatorData textIndicator;
     6944    WebCore::TextIndicatorData textIndicator;
    69456945    return createDragImageForSelection(*coreFrame, textIndicator, forceBlackText).autorelease();
    69466946#endif
     
    69756975- (void)selectAll
    69766976{
    6977     Frame* coreFrame = core([self _frame]);
     6977    auto* coreFrame = core([self _frame]);
    69786978    if (coreFrame)
    69796979        coreFrame->selection().selectAll();
     
    69826982- (void)deselectAll
    69836983{
    6984     Frame* coreFrame = core([self _frame]);
     6984    auto* coreFrame = core([self _frame]);
    69856985    if (!coreFrame)
    69866986        return;
     
    70147014{
    70157015    return attributedStringBetweenStartAndEnd(
    7016         Position { core(startContainer), startOffset, Position::PositionIsOffsetInAnchor },
    7017         Position { core(endContainer), endOffset, Position::PositionIsOffsetInAnchor });
     7016        WebCore::Position { core(startContainer), startOffset, WebCore::Position::PositionIsOffsetInAnchor },
     7017        WebCore::Position { core(endContainer), endOffset, WebCore::Position::PositionIsOffsetInAnchor });
    70187018}
    70197019
     
    70237023    NSAttributedString *attributedString = [self _attributedStringFromDOMRange:[document _documentRange]];
    70247024    if (!attributedString) {
    7025         Document* coreDocument = core(document);
    7026         attributedString = editingAttributedStringFromRange(Range::create(*coreDocument, coreDocument, 0, coreDocument, coreDocument->countChildNodes()));
     7025        auto* coreDocument = core(document);
     7026        attributedString = editingAttributedStringFromRange(WebCore::Range::create(*coreDocument, coreDocument, 0, coreDocument, coreDocument->countChildNodes()));
    70277027    }
    70287028    return attributedString;
     
    70337033    NSAttributedString *attributedString = [self _attributedStringFromDOMRange:[self _selectedRange]];
    70347034    if (!attributedString) {
    7035         Frame* coreFrame = core([self _frame]);
     7035        auto* coreFrame = core([self _frame]);
    70367036        if (coreFrame) {
    7037             RefPtr<Range> range = coreFrame->selection().selection().toNormalizedRange();
     7037            RefPtr<WebCore::Range> range = coreFrame->selection().selection().toNormalizedRange();
    70387038            if (range)
    70397039                attributedString = editingAttributedStringFromRange(*range);
     
    70737073- (NSDictionary *)elementAtPoint:(NSPoint)point allowShadowContent:(BOOL)allow
    70747074{
    7075     Frame* coreFrame = core([self _frame]);
     7075    auto* coreFrame = core([self _frame]);
    70767076    if (!coreFrame)
    70777077        return nil;
    7078     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowChildFrameContent
    7079         | (allow ? 0 : HitTestRequest::DisallowUserAgentShadowContent);
    7080     return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(IntPoint(point), hitType)] autorelease];
     7078    WebCore::HitTestRequest::HitTestRequestType hitType = WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::AllowChildFrameContent
     7079        | (allow ? 0 : WebCore::HitTestRequest::DisallowUserAgentShadowContent);
     7080    return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(point), hitType)] autorelease];
    70817081}
    70827082
    70837083- (NSUInteger)countMatchesForText:(NSString *)string inDOMRange:(DOMRange *)range options:(WebFindOptions)options limit:(NSUInteger)limit markMatches:(BOOL)markMatches
    70847084{
    7085     Frame* coreFrame = core([self _frame]);
     7085    auto* coreFrame = core([self _frame]);
    70867086    if (!coreFrame)
    70877087        return 0;
     
    70927092- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
    70937093{
    7094     Frame* coreFrame = core([self _frame]);
     7094    auto* coreFrame = core([self _frame]);
    70957095    if (!coreFrame)
    70967096        return;
     
    71007100- (BOOL)markedTextMatchesAreHighlighted
    71017101{
    7102     Frame* coreFrame = core([self _frame]);
     7102    auto* coreFrame = core([self _frame]);
    71037103    return coreFrame && coreFrame->editor().markedTextMatchesAreHighlighted();
    71047104}
     
    71067106- (void)unmarkAllTextMatches
    71077107{
    7108     Frame* coreFrame = core([self _frame]);
     7108    auto* coreFrame = core([self _frame]);
    71097109    if (!coreFrame)
    71107110        return;
    7111     Document* document = coreFrame->document();
     7111    auto* document = coreFrame->document();
    71127112    if (!document)
    71137113        return;
    7114     document->markers().removeMarkers(DocumentMarker::TextMatch);
     7114    document->markers().removeMarkers(WebCore::DocumentMarker::TextMatch);
    71157115}
    71167116
    71177117- (NSArray *)rectsForTextMatches
    71187118{
    7119     Frame* coreFrame = core([self _frame]);
     7119    auto* coreFrame = core([self _frame]);
    71207120    if (!coreFrame)
    71217121        return [NSArray array];
    7122     Document* document = coreFrame->document();
     7122    auto* document = coreFrame->document();
    71237123    if (!document)
    71247124        return [NSArray array];
    71257125
    7126     Vector<FloatRect> rects = document->markers().renderedRectsForMarkers(DocumentMarker::TextMatch);
     7126    Vector<WebCore::FloatRect> rects = document->markers().renderedRectsForMarkers(WebCore::DocumentMarker::TextMatch);
    71277127    unsigned count = rects.size();
    71287128    NSMutableArray *result = [NSMutableArray arrayWithCapacity:count];
     
    71367136    if (![string length])
    71377137        return NO;
    7138     Frame* coreFrame = core([self _frame]);
     7138    auto* coreFrame = core([self _frame]);
    71397139    return coreFrame && coreFrame->editor().findString(string, coreOptions(options));
    71407140}
  • trunk/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm

    r247416 r250549  
    7373@end
    7474
    75 using namespace WebCore;
    76 
    7775@implementation WebImmediateActionController
    7876
     
    107105    [_currentQLPreviewMenuItem close];
    108106    [self _clearImmediateActionState];
    109     [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::None];
     107    [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::None];
    110108}
    111109
     
    122120
    123121    [self _clearImmediateActionState];
    124     [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     122    [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    125123}
    126124
     
    146144- (void)performHitTestAtPoint:(NSPoint)viewPoint
    147145{
    148     Frame* coreFrame = core([_webView _selectedOrMainFrame]);
     146    WebCore::Frame* coreFrame = core([_webView _selectedOrMainFrame]);
    149147    if (!coreFrame)
    150148        return;
    151149
    152     _hitTestResult = coreFrame->eventHandler().hitTestResultAtPoint(IntPoint(viewPoint), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowUserAgentShadowContent | HitTestRequest::AllowChildFrameContent);
    153     coreFrame->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::PerformedHitTest);
    154 
    155     if (Element* element = _hitTestResult.targetElement())
     150    _hitTestResult = coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(viewPoint), WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent);
     151    coreFrame->mainFrame().eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::PerformedHitTest);
     152
     153    if (auto* element = _hitTestResult.targetElement())
    156154        _contentPreventsDefault = element->dispatchMouseForceWillBegin();
    157155}
     
    207205        return;
    208206
    209     if (Frame* coreFrame = [_webView _mainCoreFrame])
    210         coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionUpdated);
     207    if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame])
     208        coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionUpdated);
    211209
    212210    if (_contentPreventsDefault)
     
    221219        return;
    222220
    223     if (Frame* coreFrame = [_webView _mainCoreFrame]) {
    224         ImmediateActionStage lastStage = coreFrame->eventHandler().immediateActionStage();
    225         if (lastStage == ImmediateActionStage::ActionUpdated)
    226             coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledAfterUpdate);
     221    if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame]) {
     222        WebCore::ImmediateActionStage lastStage = coreFrame->eventHandler().immediateActionStage();
     223        if (lastStage == WebCore::ImmediateActionStage::ActionUpdated)
     224            coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCancelledAfterUpdate);
    227225        else
    228             coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledWithoutUpdate);
     226            coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCancelledWithoutUpdate);
    229227    }
    230228
    231229    [_webView _setTextIndicatorAnimationProgress:0];
    232230    [self _clearImmediateActionState];
    233     [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::None];
     231    [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::None];
    234232    [_webView _setMaintainsInactiveSelection:NO];
    235233}
     
    240238        return;
    241239
    242     if (Frame* coreFrame = [_webView _mainCoreFrame])
    243         coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCompleted);
     240    if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame])
     241        coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCompleted);
    244242
    245243    [_webView _setTextIndicatorAnimationProgress:1];
     
    270268            _type = WebImmediateActionLinkPreview;
    271269
    272             RefPtr<Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());
    273             auto indicator = TextIndicator::createWithRange(*linkRange, TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges, TextIndicatorPresentationTransition::FadeIn);
     270            RefPtr<WebCore::Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());
     271            auto indicator = WebCore::TextIndicator::createWithRange(*linkRange, WebCore::TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges, WebCore::TextIndicatorPresentationTransition::FadeIn);
    274272            if (indicator)
    275                 [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorWindowLifetime::Permanent];
     273                [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
    276274
    277275            QLPreviewMenuItem *item = [NSMenuItem standardQuickLookMenuItem];
     
    283281    }
    284282
    285     Node* node = _hitTestResult.innerNode();
     283    WebCore::Node* node = _hitTestResult.innerNode();
    286284    if ((node && node->isTextNode()) || _hitTestResult.isOverTextInsideFormControlElement()) {
    287285        if (auto animationController = [self _animationControllerForDataDetectedText]) {
     
    324322#if PLATFORM(MAC)
    325323    // FIXME: We should not permanently disable this for iTunes. rdar://problem/19461358
    326     if (MacApplication::isITunes()) {
     324    if (WebCore::MacApplication::isITunes()) {
    327325        [self _cancelImmediateAction];
    328326        return;
     
    359357{
    360358    [self _clearImmediateActionState];
    361     [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
    362 }
    363 
    364 static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
     359    [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
     360}
     361
     362static WebCore::IntRect elementBoundingBoxInWindowCoordinatesFromNode(WebCore::Node* node)
    365363{
    366364    if (!node)
    367         return IntRect();
    368 
    369     Frame* frame = node->document().frame();
     365        return { };
     366
     367    WebCore::Frame* frame = node->document().frame();
    370368    if (!frame)
    371         return IntRect();
    372 
    373     FrameView* view = frame->view();
     369        return { };
     370
     371    WebCore::FrameView* view = frame->view();
    374372    if (!view)
    375         return IntRect();
    376 
    377     RenderObject* renderer = node->renderer();
     373        return { };
     374
     375    WebCore::RenderObject* renderer = node->renderer();
    378376    if (!renderer)
    379         return IntRect();
     377        return { };
    380378
    381379    return view->contentsToWindow(renderer->absoluteBoundingBoxRect());
     
    387385        return NSZeroRect;
    388386
    389     Node* node = _hitTestResult.innerNode();
     387    WebCore::Node* node = _hitTestResult.innerNode();
    390388    if (!node)
    391389        return NSZeroRect;
     
    400398
    401399    NSSize screenSize = _webView.window.screen.frame.size;
    402     FloatRect largestRect = largestRectWithAspectRatioInsideRect(screenSize.width / screenSize.height, _webView.bounds);
     400    WebCore::FloatRect largestRect = WebCore::largestRectWithAspectRatioInsideRect(screenSize.width / screenSize.height, _webView.bounds);
    403401    return NSMakeSize(largestRect.width() * 0.75, largestRect.height() * 0.75);
    404402}
     
    411409        return nil;
    412410
    413     RefPtr<Range> detectedDataRange;
    414     FloatRect detectedDataBoundingBox;
     411    RefPtr<WebCore::Range> detectedDataRange;
     412    WebCore::FloatRect detectedDataBoundingBox;
    415413    RetainPtr<DDActionContext> actionContext;
    416414
     
    427425    // If the client didn't give us an action context, try to scan around the hit point.
    428426    if (!actionContext || !detectedDataRange)
    429         actionContext = DataDetection::detectItemAroundHitTestResult(_hitTestResult, detectedDataBoundingBox, detectedDataRange);
     427        actionContext = WebCore::DataDetection::detectItemAroundHitTestResult(_hitTestResult, detectedDataBoundingBox, detectedDataRange);
    430428
    431429    if (!actionContext || !detectedDataRange)
     
    437435        return nil;
    438436
    439     auto indicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorOptionDefault, TextIndicatorPresentationTransition::FadeIn);
     437    auto indicator = WebCore::TextIndicator::createWithRange(*detectedDataRange, WebCore::TextIndicatorOptionDefault, WebCore::TextIndicatorPresentationTransition::FadeIn);
    440438
    441439    _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
    442440    } interactionChangedHandler:^() {
    443441        if (indicator)
    444             [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorWindowLifetime::Permanent];
     442            [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
    445443    } interactionStoppedHandler:^() {
    446         [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     444        [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    447445    }];
    448446
     
    469467    [actionContext setImmediate:YES];
    470468
    471     RefPtr<Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());
     469    RefPtr<WebCore::Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());
    472470    if (!linkRange)
    473471        return nullptr;
    474     auto indicator = TextIndicator::createWithRange(*linkRange, TextIndicatorOptionDefault, TextIndicatorPresentationTransition::FadeIn);
     472    auto indicator = WebCore::TextIndicator::createWithRange(*linkRange, WebCore::TextIndicatorOptionDefault, WebCore::TextIndicatorPresentationTransition::FadeIn);
    475473
    476474    _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
    477475    } interactionChangedHandler:^() {
    478476        if (indicator)
    479             [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorWindowLifetime::Permanent];
     477            [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
    480478    } interactionStoppedHandler:^() {
    481         [_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     479        [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    482480    }];
    483481
     
    493491#pragma mark Text action
    494492
    495 + (DictionaryPopupInfo)_dictionaryPopupInfoForRange:(Range&)range inFrame:(Frame*)frame withLookupOptions:(NSDictionary *)lookupOptions indicatorOptions:(TextIndicatorOptions)indicatorOptions transition:(TextIndicatorPresentationTransition)presentationTransition
    496 {
    497     Editor& editor = frame->editor();
     493+ (WebCore::DictionaryPopupInfo)_dictionaryPopupInfoForRange:(WebCore::Range&)range inFrame:(WebCore::Frame*)frame withLookupOptions:(NSDictionary *)lookupOptions indicatorOptions:(WebCore::TextIndicatorOptions)indicatorOptions transition:(WebCore::TextIndicatorPresentationTransition)presentationTransition
     494{
     495    WebCore::Editor& editor = frame->editor();
    498496    editor.setIsGettingDictionaryPopupInfo(true);
    499497
    500498    // Dictionary API will accept a whitespace-only string and display UI as if it were real text,
    501499    // so bail out early to avoid that.
    502     DictionaryPopupInfo popupInfo;
     500    WebCore::DictionaryPopupInfo popupInfo;
    503501    if (range.text().stripWhiteSpace().isEmpty()) {
    504502        editor.setIsGettingDictionaryPopupInfo(false);
     
    506504    }
    507505
    508     const RenderStyle* style = range.startContainer().renderStyle();
     506    const WebCore::RenderStyle* style = range.startContainer().renderStyle();
    509507    float scaledDescent = style ? style->fontMetrics().descent() * frame->page()->pageScaleFactor() : 0;
    510508
    511     Vector<FloatQuad> quads;
     509    Vector<WebCore::FloatQuad> quads;
    512510    range.absoluteTextQuads(quads);
    513511    if (quads.isEmpty()) {
     
    516514    }
    517515
    518     IntRect rangeRect = frame->view()->contentsToWindow(quads[0].enclosingBoundingBox());
     516    WebCore::IntRect rangeRect = frame->view()->contentsToWindow(quads[0].enclosingBoundingBox());
    519517
    520518    popupInfo.origin = NSMakePoint(rangeRect.x(), rangeRect.y() + scaledDescent);
    521519    popupInfo.options = lookupOptions;
    522520
    523     NSAttributedString *nsAttributedString = editingAttributedStringFromRange(range, IncludeImagesInAttributedString::No);
     521    NSAttributedString *nsAttributedString = editingAttributedStringFromRange(range, WebCore::IncludeImagesInAttributedString::No);
    524522    RetainPtr<NSMutableAttributedString> scaledNSAttributedString = adoptNS([[NSMutableAttributedString alloc] initWithString:[nsAttributedString string]]);
    525523    NSFontManager *fontManager = [NSFontManager sharedFontManager];
     
    539537    popupInfo.attributedString = scaledNSAttributedString.get();
    540538
    541     if (auto textIndicator = TextIndicator::createWithRange(range, indicatorOptions, presentationTransition))
     539    if (auto textIndicator = WebCore::TextIndicator::createWithRange(range, indicatorOptions, presentationTransition))
    542540        popupInfo.textIndicator = textIndicator->data();
    543541
     
    551549        return nil;
    552550
    553     Node* node = _hitTestResult.innerNode();
     551    WebCore::Node* node = _hitTestResult.innerNode();
    554552    if (!node)
    555553        return nil;
    556554
    557     Frame* frame = node->document().frame();
     555    WebCore::Frame* frame = node->document().frame();
    558556    if (!frame)
    559557        return nil;
    560558
    561     auto [dictionaryRange, options] = DictionaryLookup::rangeAtHitTestResult(_hitTestResult);
     559    auto [dictionaryRange, options] = WebCore::DictionaryLookup::rangeAtHitTestResult(_hitTestResult);
    562560    if (!dictionaryRange)
    563561        return nil;
    564562
    565     auto dictionaryPopupInfo = [WebImmediateActionController _dictionaryPopupInfoForRange:*dictionaryRange inFrame:frame withLookupOptions:options indicatorOptions:TextIndicatorOptionDefault transition: TextIndicatorPresentationTransition::FadeIn];
     563    auto dictionaryPopupInfo = [WebImmediateActionController _dictionaryPopupInfoForRange:*dictionaryRange inFrame:frame withLookupOptions:options indicatorOptions:WebCore::TextIndicatorOptionDefault transition: WebCore::TextIndicatorPresentationTransition::FadeIn];
    566564    if (!dictionaryPopupInfo.attributedString)
    567565        return nil;
  • trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm

    r246103 r250549  
    7272}
    7373
    74 using namespace WebCore;
    75 
    7674// Redeclarations of PDFKit notifications. We can't use the API since we use a weak link to the framework.
    7775#define _webkit_PDFViewDisplayModeChangedNotification @"PDFViewDisplayModeChanged"
     
    650648{
    651649    BOOL inRange = NO;
    652     for (HTMLFrameOwnerElement* ownerElement = core(frame)->ownerElement(); ownerElement; ownerElement = ownerElement->document().frame()->ownerElement()) {
     650    for (auto* ownerElement = core(frame)->ownerElement(); ownerElement; ownerElement = ownerElement->document().frame()->ownerElement()) {
    653651        if (&ownerElement->document() == &core(range)->ownerDocument()) {
    654652            inRange = [range intersectsNode:kit(ownerElement)];
     
    928926- (NSArray *)pasteboardTypesForSelection
    929927{
    930     return [NSArray arrayWithObjects:legacyRTFDPasteboardType(), legacyRTFPasteboardType(), legacyStringPasteboardType(), nil];
     928    return [NSArray arrayWithObjects:WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), nil];
    931929}
    932930
     
    935933    NSAttributedString *attributedString = [self selectedAttributedString];
    936934   
    937     if ([types containsObject:legacyRTFDPasteboardType()]) {
     935    if ([types containsObject:WebCore::legacyRTFDPasteboardType()]) {
    938936        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
    939         [pasteboard setData:RTFDData forType:legacyRTFDPasteboardType()];
     937        [pasteboard setData:RTFDData forType:WebCore::legacyRTFDPasteboardType()];
    940938    }       
    941939   
    942     if ([types containsObject:legacyRTFPasteboardType()]) {
     940    if ([types containsObject:WebCore::legacyRTFPasteboardType()]) {
    943941        if ([attributedString containsAttachments])
    944             attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);
     942            attributedString = WebCore::attributedStringByStrippingAttachmentCharacters(attributedString);
    945943
    946944        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
    947         [pasteboard setData:RTFData forType:legacyRTFPasteboardType()];
    948     }
    949    
    950     if ([types containsObject:legacyStringPasteboardType()])
    951         [pasteboard setString:[self selectedString] forType:legacyStringPasteboardType()];
     945        [pasteboard setData:RTFData forType:WebCore::legacyRTFPasteboardType()];
     946    }
     947   
     948    if ([types containsObject:WebCore::legacyStringPasteboardType()])
     949        [pasteboard setString:[self selectedString] forType:WebCore::legacyStringPasteboardType()];
    952950}
    953951
     
    963961    const int noButton = -2;
    964962    int button = noButton;
    965     RefPtr<Event> event;
     963    RefPtr<WebCore::Event> event;
    966964    switch ([nsEvent type]) {
    967965    case NSEventTypeLeftMouseUp:
     
    975973        break;
    976974    case NSEventTypeKeyDown: {
    977         PlatformKeyboardEvent pe = PlatformEventFactory::createPlatformKeyboardEvent(nsEvent);
    978         pe.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown);
    979         event = KeyboardEvent::create(pe, nullptr);
     975        auto pe = WebCore::PlatformEventFactory::createPlatformKeyboardEvent(nsEvent);
     976        pe.disambiguateKeyDownEvent(WebCore::PlatformEvent::RawKeyDown);
     977        event = WebCore::KeyboardEvent::create(pe, nullptr);
    980978        break;
    981979    }
     
    985983    if (button != noButton) {
    986984        // FIXME: Use createPlatformMouseEvent instead.
    987         event = MouseEvent::create(eventNames().clickEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, Event::IsComposed::Yes,
    988             MonotonicTime::now(), nullptr, [nsEvent clickCount], { }, { }, { }, modifiersForEvent(nsEvent),
    989             button, [NSEvent pressedMouseButtons], nullptr, WebCore::ForceAtClick, 0, nullptr, MouseEvent::IsSimulated::Yes);
     985        event = WebCore::MouseEvent::create(WebCore::eventNames().clickEvent, WebCore::Event::CanBubble::Yes, WebCore::Event::IsCancelable::Yes, WebCore::Event::IsComposed::Yes,
     986            MonotonicTime::now(), nullptr, [nsEvent clickCount], { }, { }, { }, WebCore::modifiersForEvent(nsEvent),
     987            button, [NSEvent pressedMouseButtons], nullptr, WebCore::ForceAtClick, 0, nullptr, WebCore::MouseEvent::IsSimulated::Yes);
    990988    }
    991989
    992990    // Call to the frame loader because this is where our security checks are made.
    993     Frame* frame = core([dataSource webFrame]);
    994     FrameLoadRequest frameLoadRequest { *frame->document(), frame->document()->securityOrigin(), { URL }, { }, LockHistory::No, LockBackForwardList::No, NeverSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown };
     991    auto* frame = core([dataSource webFrame]);
     992    WebCore::FrameLoadRequest frameLoadRequest { *frame->document(), frame->document()->securityOrigin(), { URL }, { }, WebCore::LockHistory::No, WebCore::LockBackForwardList::No, WebCore::NeverSendReferrer, WebCore::AllowNavigationToInvalidURL::Yes, WebCore::NewFrameOpenerPolicy::Allow, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, WebCore::InitiatedByMainFrame::Unknown };
    995993    frame->loader().loadFrameRequest(WTFMove(frameLoadRequest), event.get(), nullptr);
    996994}
  • trunk/Source/WebKitLegacy/mac/WebView/WebScriptDebugDelegate.mm

    r228218 r250549  
    4444#import <WebCore/runtime_root.h>
    4545
    46 using namespace JSC;
    47 using namespace WebCore;
    48 
    4946// FIXME: these error strings should be public for future use by WebScriptObject and in WebScriptObject.h
    5047NSString * const WebScriptErrorDomain = @"WebScriptErrorDomain";
     
    5249NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
    5350
    54 @interface WebScriptCallFrame (WebScriptDebugDelegateInternal)
     51@interface WebScriptCallFrame (WebScriptDebugDelegateInternalForDelegate)
    5552
    5653- (id)_convertValueToObjcValue:(JSC::JSValue)value;
     
    104101        return globalObject;
    105102
    106     Bindings::RootObject* root1 = [globalObject _originRootObject];
     103    JSC::Bindings::RootObject* root1 = [globalObject _originRootObject];
    107104    if (!root1)
    108105        return nil;
    109106
    110     Bindings::RootObject* root2 = [globalObject _rootObject];
     107    JSC::Bindings::RootObject* root2 = [globalObject _rootObject];
    111108    if (!root2)
    112109        return nil;
  • trunk/Source/WebKitLegacy/mac/WebView/WebScriptDebugger.mm

    r238771 r250549  
    4343#import <wtf/URL.h>
    4444
    45 using namespace JSC;
    46 using namespace WebCore;
    47 
    48 @interface WebScriptCallFrame (WebScriptDebugDelegateInternal)
     45@interface WebScriptCallFrame (WebScriptDebugDelegateInternalForDebugger)
    4946- (WebScriptCallFrame *)_initWithGlobalObject:(WebScriptObject *)globalObj functionName:(String)functionName exceptionValue:(JSC::JSValue)exceptionValue;
    5047@end
    5148
    52 static NSString *toNSString(SourceProvider* sourceProvider)
     49static NSString *toNSString(JSC::SourceProvider* sourceProvider)
    5350{
    5451    const String& sourceString = sourceProvider->source().toString();
     
    6663}
    6764
    68 static WebFrame *toWebFrame(JSGlobalObject* globalObject)
     65static WebFrame *toWebFrame(JSC::JSGlobalObject* globalObject)
    6966{
    70     JSDOMWindow* window = static_cast<JSDOMWindow*>(globalObject);
     67    WebCore::JSDOMWindow* window = static_cast<WebCore::JSDOMWindow*>(globalObject);
    7168    return kit(window->wrapped().frame());
    7269}
    7370
    74 WebScriptDebugger::WebScriptDebugger(JSGlobalObject* globalObject)
     71WebScriptDebugger::WebScriptDebugger(JSC::JSGlobalObject* globalObject)
    7572    : Debugger(globalObject->vm())
    7673    , m_callingDelegate(false)
     
    8380
    8481// callbacks - relay to delegate
    85 void WebScriptDebugger::sourceParsed(ExecState* exec, SourceProvider* sourceProvider, int errorLine, const String& errorMsg)
     82void WebScriptDebugger::sourceParsed(JSC::ExecState* exec, JSC::SourceProvider* sourceProvider, int errorLine, const String& errorMsg)
    8683{
    8784    if (m_callingDelegate)
     
    9491    int firstLine = sourceProvider->startPosition().m_line.oneBasedInt();
    9592
    96     VM& vm = exec->vm();
     93    JSC::VM& vm = exec->vm();
    9794    WebFrame *webFrame = toWebFrame(vm.vmEntryGlobalObject(exec));
    9895    WebView *webView = [webFrame webView];
     
    121118}
    122119
    123 void WebScriptDebugger::handlePause(JSGlobalObject* globalObject, Debugger::ReasonForPause reason)
     120void WebScriptDebugger::handlePause(JSC::JSGlobalObject* globalObject, Debugger::ReasonForPause reason)
    124121{
    125122    if (m_callingDelegate)
     
    133130    WebFrame *webFrame = toWebFrame(globalObject);
    134131    WebView *webView = [webFrame webView];
    135     DebuggerCallFrame& debuggerCallFrame = currentDebuggerCallFrame();
    136     JSValue exceptionValue = currentException();
     132    JSC::DebuggerCallFrame& debuggerCallFrame = currentDebuggerCallFrame();
     133    JSC::JSValue exceptionValue = currentException();
    137134    String functionName = debuggerCallFrame.functionName();
    138135    RetainPtr<WebScriptCallFrame> webCallFrame = adoptNS([[WebScriptCallFrame alloc] _initWithGlobalObject:core(webFrame)->script().windowScriptObject() functionName:functionName exceptionValue:exceptionValue]);
  • trunk/Source/WebKitLegacy/mac/WebView/WebScriptWorld.mm

    r228260 r250549  
    3030#import <JavaScriptCore/APICast.h>
    3131#import <JavaScriptCore/JSContextInternal.h>
    32 
    3332#import <wtf/RefPtr.h>
    34 
    35 using namespace WebCore;
    3633
    3734@interface WebScriptWorldPrivate : NSObject {
    3835@public
    39     RefPtr<DOMWrapperWorld> world;
     36    RefPtr<WebCore::DOMWrapperWorld> world;
    4037}
    4138@end
     
    4441@end
    4542
    46 typedef HashMap<DOMWrapperWorld*, WebScriptWorld*> WorldMap;
     43typedef HashMap<WebCore::DOMWrapperWorld*, WebScriptWorld*> WorldMap;
    4744static WorldMap& allWorlds()
    4845{
     
    5350@implementation WebScriptWorld
    5451
    55 - (id)initWithWorld:(Ref<DOMWrapperWorld>&&)world
     52- (id)initWithWorld:(Ref<WebCore::DOMWrapperWorld>&&)world
    5653{
    5754    self = [super init];
     
    7067- (id)init
    7168{
    72     return [self initWithWorld:ScriptController::createWorld()];
     69    return [self initWithWorld:WebCore::ScriptController::createWorld()];
    7370}
    7471
     
    9087+ (WebScriptWorld *)standardWorld
    9188{
    92     static WebScriptWorld *world = [[WebScriptWorld alloc] initWithWorld:mainThreadNormalWorld()];
     89    static WebScriptWorld *world = [[WebScriptWorld alloc] initWithWorld:WebCore::mainThreadNormalWorld()];
    9390    return world;
    9491}
     
    10198+ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)context
    10299{
    103     return [self findOrCreateWorld:currentWorld(*toJS(context))];
     100    return [self findOrCreateWorld:WebCore::currentWorld(*toJS(context))];
    104101}
    105102
     
    115112@implementation WebScriptWorld (WebInternal)
    116113
    117 DOMWrapperWorld* core(WebScriptWorld *world)
     114WebCore::DOMWrapperWorld* core(WebScriptWorld *world)
    118115{
    119116    return world ? world->_private->world.get() : 0;
    120117}
    121118
    122 + (WebScriptWorld *)findOrCreateWorld:(DOMWrapperWorld&)world
     119+ (WebScriptWorld *)findOrCreateWorld:(WebCore::DOMWrapperWorld&)world
    123120{
    124     if (&world == &mainThreadNormalWorld())
     121    if (&world == &WebCore::mainThreadNormalWorld())
    125122        return [self standardWorld];
    126123
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r250333 r250549  
    371371#endif
    372372
    373 using namespace JSC;
    374 using namespace Inspector;
    375 using namespace WebCore;
    376 
    377373#define FOR_EACH_RESPONDER_SELECTOR(macro) \
    378374macro(alignCenter) \
     
    569565@end
    570566
    571 FindOptions coreOptions(WebFindOptions options)
    572 {
    573     FindOptions findOptions;
     567WebCore::FindOptions coreOptions(WebFindOptions options)
     568{
     569    WebCore::FindOptions findOptions;
    574570    if (options & WebFindOptionsCaseInsensitive)
    575         findOptions.add(CaseInsensitive);
     571        findOptions.add(WebCore::CaseInsensitive);
    576572    if (options & WebFindOptionsAtWordStarts)
    577         findOptions.add(AtWordStarts);
     573        findOptions.add(WebCore::AtWordStarts);
    578574    if (options & WebFindOptionsTreatMedialCapitalAsWordStart)
    579         findOptions.add(TreatMedialCapitalAsWordStart);
     575        findOptions.add(WebCore::TreatMedialCapitalAsWordStart);
    580576    if (options & WebFindOptionsBackwards)
    581         findOptions.add(Backwards);
     577        findOptions.add(WebCore::Backwards);
    582578    if (options & WebFindOptionsWrapAround)
    583         findOptions.add(WrapAround);
     579        findOptions.add(WebCore::WrapAround);
    584580    if (options & WebFindOptionsStartInSelection)
    585         findOptions.add(StartInSelection);
     581        findOptions.add(WebCore::StartInSelection);
    586582    return findOptions;
    587583}
     
    591587    OptionSet<WebCore::LayoutMilestone> layoutMilestone;
    592588    if (milestones & WebDidFirstLayout)
    593         layoutMilestone.add(DidFirstLayout);
     589        layoutMilestone.add(WebCore::DidFirstLayout);
    594590    if (milestones & WebDidFirstVisuallyNonEmptyLayout)
    595         layoutMilestone.add(DidFirstVisuallyNonEmptyLayout);
     591        layoutMilestone.add(WebCore::DidFirstVisuallyNonEmptyLayout);
    596592    if (milestones & WebDidHitRelevantRepaintedObjectsAreaThreshold)
    597         layoutMilestone.add(DidHitRelevantRepaintedObjectsAreaThreshold);
     593        layoutMilestone.add(WebCore::DidHitRelevantRepaintedObjectsAreaThreshold);
    598594    return layoutMilestone;
    599595}
     
    601597WebLayoutMilestones kitLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones)
    602598{
    603     return (milestones & DidFirstLayout ? WebDidFirstLayout : 0)
    604         | (milestones & DidFirstVisuallyNonEmptyLayout ? WebDidFirstVisuallyNonEmptyLayout : 0)
    605         | (milestones & DidHitRelevantRepaintedObjectsAreaThreshold ? WebDidHitRelevantRepaintedObjectsAreaThreshold : 0);
    606 }
    607 
    608 static WebPageVisibilityState kit(VisibilityState visibilityState)
     599    return (milestones & WebCore::DidFirstLayout ? WebDidFirstLayout : 0)
     600        | (milestones & WebCore::DidFirstVisuallyNonEmptyLayout ? WebDidFirstVisuallyNonEmptyLayout : 0)
     601        | (milestones & WebCore::DidHitRelevantRepaintedObjectsAreaThreshold ? WebDidHitRelevantRepaintedObjectsAreaThreshold : 0);
     602}
     603
     604static WebPageVisibilityState kit(WebCore::VisibilityState visibilityState)
    609605{
    610606    switch (visibilityState) {
    611     case VisibilityState::Visible:
     607    case WebCore::VisibilityState::Visible:
    612608        return WebPageVisibilityStateVisible;
    613     case VisibilityState::Hidden:
     609    case WebCore::VisibilityState::Hidden:
    614610        return WebPageVisibilityStateHidden;
    615     case VisibilityState::Prerender:
     611    case WebCore::VisibilityState::Prerender:
    616612        return WebPageVisibilityStatePrerender;
    617613    }
     
    625621class DeferredPageDestructor {
    626622public:
    627     static void createDeferredPageDestructor(std::unique_ptr<Page> page)
     623    static void createDeferredPageDestructor(std::unique_ptr<WebCore::Page> page)
    628624    {
    629625        new DeferredPageDestructor(WTFMove(page));
     
    631627
    632628private:
    633     DeferredPageDestructor(std::unique_ptr<Page> page)
     629    DeferredPageDestructor(std::unique_ptr<WebCore::Page> page)
    634630        : m_page(WTFMove(page))
    635631    {
     
    648644    }
    649645
    650     std::unique_ptr<Page> m_page;
     646    std::unique_ptr<WebCore::Page> m_page;
    651647};
    652648
     
    683679@implementation WebUITextIndicatorData (WebUITextIndicatorInternal)
    684680
    685 - (WebUITextIndicatorData *)initWithImage:(CGImageRef)image textIndicatorData:(const TextIndicatorData&)indicatorData scale:(CGFloat)scale
     681- (WebUITextIndicatorData *)initWithImage:(CGImageRef)image textIndicatorData:(const WebCore::TextIndicatorData&)indicatorData scale:(CGFloat)scale
    686682{
    687683    if (!(self = [super init]))
     
    710706    }
    711707
    712     if (indicatorData.options & TextIndicatorOptionComputeEstimatedBackgroundColor)
     708    if (indicatorData.options & WebCore::TextIndicatorOptionComputeEstimatedBackgroundColor)
    713709        _estimatedBackgroundColor = [PAL::allocUIColorInstance() initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
    714710
     
    11401136+ (NSString *)_standardUserAgentWithApplicationName:(NSString *)applicationName
    11411137{
    1142     return standardUserAgentWithApplicationName(applicationName);
     1138    return WebCore::standardUserAgentWithApplicationName(applicationName);
    11431139}
    11441140
     
    11641160
    11651161    JSC::ExecState* execState = toJS(context);
    1166     JSLockHolder lock(execState);
     1162    JSC::JSLockHolder lock(execState);
    11671163
    11681164    // Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a WebView.
    11691165    JSC::JSGlobalObject* globalObject = execState->lexicalGlobalObject();
    1170     if (!toJSDOMWindow(globalObject->vm(), globalObject))
    1171         return;
    1172 
    1173     reportException(execState, toJS(execState, exception));
     1166    if (!WebCore::toJSDOMWindow(globalObject->vm(), globalObject))
     1167        return;
     1168
     1169    WebCore::reportException(execState, toJS(execState, exception));
    11741170}
    11751171
     
    11791175    return true;
    11801176#else
    1181     return !MacApplication::isAdobeInstaller();
     1177    return !WebCore::MacApplication::isAdobeInstaller();
    11821178#endif
    11831179}
     
    11881184    return true;
    11891185#else
    1190     return !MacApplication::isHRBlock();
     1186    return !WebCore::MacApplication::isHRBlock();
    11911187#endif
    11921188}
     
    12131209{
    12141210    static bool isOutlookNeedingQuirksScript = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER)
    1215         && MacApplication::isMicrosoftOutlook();
     1211        && WebCore::MacApplication::isMicrosoftOutlook();
    12161212    return isOutlookNeedingQuirksScript;
    12171213}
     
    12271223{
    12281224    static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents();
    1229     _private->group->userContentController().addUserScript(*core([WebScriptWorld world]), makeUnique<UserScript>(outlookQuirksScriptContents, URL(), Vector<String>(), Vector<String>(), InjectAtDocumentEnd, InjectInAllFrames));
     1225    _private->group->userContentController().addUserScript(*core([WebScriptWorld world]), makeUnique<WebCore::UserScript>(outlookQuirksScriptContents, URL(), Vector<String>(), Vector<String>(), WebCore::InjectAtDocumentEnd, WebCore::InjectInAllFrames));
    12301226
    12311227}
     
    12581254    static bool shouldUseLegacyBackgroundSizeShorthandBehavior = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR);
    12591255#else
    1260     static bool shouldUseLegacyBackgroundSizeShorthandBehavior = MacApplication::isVersions()
     1256    static bool shouldUseLegacyBackgroundSizeShorthandBehavior = WebCore::MacApplication::isVersions()
    12611257        && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR);
    12621258#endif
     
    12931289{
    12941290#if PLATFORM(IOS_FAMILY)
    1295     static bool shouldAllowWindowOpenWithoutUserGesture = IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0;
     1291    static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0;
    12961292    return shouldAllowWindowOpenWithoutUserGesture;
    12971293#else
     
    13311327
    13321328#if PLATFORM(MAC)
    1333     GamepadProvider::singleton().setSharedProvider(HIDGamepadProvider::singleton());
     1329    WebCore::GamepadProvider::singleton().setSharedProvider(WebCore::HIDGamepadProvider::singleton());
    13341330#else
    1335     GamepadProvider::singleton().setSharedProvider(GameControllerGamepadProvider::singleton());
     1331    WebCore::GamepadProvider::singleton().setSharedProvider(WebCore::GameControllerGamepadProvider::singleton());
    13361332#endif
    13371333
     
    13571353    _private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain];
    13581354#else
    1359     _private->backgroundColor = CGColorRetain(cachedCGColor(Color::white));
     1355    _private->backgroundColor = CGColorRetain(WebCore::cachedCGColor(WebCore::Color::white));
    13601356#endif
    13611357
     
    13981394#if PLATFORM(IOS_FAMILY)
    13991395        // Set the WebSQLiteDatabaseTrackerClient.
    1400         SQLiteDatabaseTracker::setClient(&WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
     1396        WebCore::SQLiteDatabaseTracker::setClient(&WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
    14011397
    14021398        if ([standardPreferences databasesEnabled])
     
    14151411        WebCore::SwitchingGPUClient::setSingleton(WebKit::WebSwitchingGPUClient::singleton());
    14161412#endif
    1417         DeprecatedGlobalSettings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters());
    1418 
    1419 #if PLATFORM(IOS_FAMILY)
    1420         if (IOSApplication::isMobileSafari())
    1421             DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true);
     1413        WebCore::DeprecatedGlobalSettings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters());
     1414
     1415#if PLATFORM(IOS_FAMILY)
     1416        if (WebCore::IOSApplication::isMobileSafari())
     1417            WebCore::DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true);
    14221418#endif
    14231419       
    14241420        if ([[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitEnableLegacyTLS"])
    1425             SocketStreamHandleImpl::setLegacyTLSEnabled(true);
     1421            WebCore::SocketStreamHandleImpl::setLegacyTLSEnabled(true);
    14261422
    14271423        didOneTimeInitialization = true;
     
    14321428
    14331429    auto storageProvider = PageStorageSessionProvider::create();
    1434     PageConfiguration pageConfiguration(
     1430    WebCore::PageConfiguration pageConfiguration(
    14351431        [[self preferences] privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID(),
    14361432        makeUniqueRef<WebEditorClient>(self),
    1437         SocketProvider::create(),
    1438         LibWebRTCProvider::create(),
     1433        WebCore::SocketProvider::create(),
     1434        WebCore::LibWebRTCProvider::create(),
    14391435        WebCore::CacheStorageProvider::create(),
    14401436        BackForwardList::create(self),
    1441         CookieJar::create(storageProvider.copyRef())
     1437        WebCore::CookieJar::create(storageProvider.copyRef())
    14421438    );
    14431439#if !PLATFORM(IOS_FAMILY)
     
    14691465    pageConfiguration.userContentProvider = &_private->group->userContentController();
    14701466    pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
    1471     _private->page = new Page(WTFMove(pageConfiguration));
     1467    _private->page = new WebCore::Page(WTFMove(pageConfiguration));
    14721468    storageProvider->setPage(*_private->page);
    14731469
     
    15721568    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
    15731569        // Originally, we allowed all local loads.
    1574         SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForAll);
     1570        WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForAll);
    15751571    } else if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_MORE_STRICT_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
    15761572        // Later, we allowed local loads for local URLs and documents loaded
    15771573        // with substitute data.
    1578         SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
     1574        WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
    15791575    }
    15801576#endif
     
    15821578#if PLATFORM(MAC)
    15831579    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
    1584         ResourceHandle::forceContentSniffing();
     1580        WebCore::ResourceHandle::forceContentSniffing();
    15851581
    15861582    _private->page->setDeviceScaleFactor([self _deviceScaleFactor]);
     
    16891685    _private->mainFrameDocumentReady = NO;
    16901686    _private->drawsBackground = YES;
    1691     _private->backgroundColor = CGColorRetain(cachedCGColor(Color::white));
     1687    _private->backgroundColor = CGColorRetain(WebCore::cachedCGColor(WebCore::Color::white));
    16921688
    16931689    WebFrameView *frameView = nil;
     
    17011697
    17021698    auto storageProvider = PageStorageSessionProvider::create();
    1703     PageConfiguration pageConfiguration(
     1699    WebCore::PageConfiguration pageConfiguration(
    17041700        [[self preferences] privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID(),
    17051701        makeUniqueRef<WebEditorClient>(self),
    1706         SocketProvider::create(),
    1707         LibWebRTCProvider::create(),
     1702        WebCore::SocketProvider::create(),
     1703        WebCore::LibWebRTCProvider::create(),
    17081704        WebCore::CacheStorageProvider::create(),
    17091705        BackForwardList::create(self),
    1710         CookieJar::create(storageProvider.copyRef())
     1706        WebCore::CookieJar::create(storageProvider.copyRef())
    17111707    );
    17121708    pageConfiguration.chromeClient = new WebChromeClientIOS(self);
     
    17291725    pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
    17301726
    1731     _private->page = new Page(WTFMove(pageConfiguration));
     1727    _private->page = new WebCore::Page(WTFMove(pageConfiguration));
    17321728    storageProvider->setPage(*_private->page);
    17331729   
     
    17751771    ++WebViewCount;
    17761772   
    1777     SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
     1773    WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
    17781774   
    1779     RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled);
     1775    WebCore::RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled);
    17801776
    17811777    return self;
     
    17911787- (void)_replaceCurrentHistoryItem:(WebHistoryItem *)item
    17921788{
    1793     Frame* frame = [self _mainCoreFrame];
     1789    auto* frame = [self _mainCoreFrame];
    17941790    if (frame)
    17951791        frame->loader().history().replaceCurrentItem(core(item));
     
    18121808{
    18131809    WebThreadRun(^{
    1814         for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) {
    1815             Document *document = frame->document();
     1810        for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) {
     1811            auto *document = frame->document();
    18161812            if (document)
    18171813                document->updateLayoutIgnorePendingStylesheets();
     
    18281824{
    18291825    WebThreadLock();
    1830     return _private->page->mainFrame().eventHandler().tryToBeginDragAtPoint(IntPoint(clientPosition), IntPoint(globalPosition));
    1831 }
    1832 
    1833 - (void)_startDrag:(const DragItem&)dragItem
     1826    return _private->page->mainFrame().eventHandler().tryToBeginDragAtPoint(WebCore::IntPoint(clientPosition), WebCore::IntPoint(globalPosition));
     1827}
     1828
     1829- (void)_startDrag:(const WebCore::DragItem&)dragItem
    18341830{
    18351831    auto& dragImage = dragItem.image;
     
    18911887}
    18921888
    1893 - (DragData)dragDataForSession:(id <UIDropSession>)session client:(CGPoint)clientPosition global:(CGPoint)globalPosition operation:(uint64_t)operation
    1894 {
    1895     auto dragOperationMask = static_cast<DragOperation>(operation);
    1896     auto dragDestinationMask = static_cast<DragDestinationAction>([self dragDestinationActionMaskForSession:session]);
    1897     return { session, roundedIntPoint(clientPosition), roundedIntPoint(globalPosition), dragOperationMask, DragApplicationNone, dragDestinationMask };
     1889- (WebCore::DragData)dragDataForSession:(id <UIDropSession>)session client:(CGPoint)clientPosition global:(CGPoint)globalPosition operation:(uint64_t)operation
     1890{
     1891    auto dragOperationMask = static_cast<WebCore::DragOperation>(operation);
     1892    auto dragDestinationMask = static_cast<WebCore::DragDestinationAction>([self dragDestinationActionMaskForSession:session]);
     1893    return { session, WebCore::roundedIntPoint(clientPosition), WebCore::roundedIntPoint(globalPosition), dragOperationMask, WebCore::DragApplicationNone, dragDestinationMask };
    18981894}
    18991895
     
    19471943        return;
    19481944
    1949     static auto defaultEditDragTextIndicatorOptions = TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | TextIndicatorOptionExpandClipBeyondVisibleRect | TextIndicatorOptionPaintAllContent | TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | TextIndicatorOptionPaintBackgrounds | TextIndicatorOptionUseSelectionRectForSizing | TextIndicatorOptionIncludeSnapshotWithSelectionHighlight | TextIndicatorOptionRespectTextColor;
     1945    static auto defaultEditDragTextIndicatorOptions = WebCore::TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | WebCore::TextIndicatorOptionExpandClipBeyondVisibleRect | WebCore::TextIndicatorOptionPaintAllContent | WebCore::TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | WebCore::TextIndicatorOptionPaintBackgrounds | WebCore::TextIndicatorOptionUseSelectionRectForSizing | WebCore::TextIndicatorOptionIncludeSnapshotWithSelectionHighlight | WebCore::TextIndicatorOptionRespectTextColor;
    19501946    auto& frame = page->focusController().focusedOrMainFrame();
    19511947    if (auto range = frame.selection().selection().toNormalizedRange()) {
    1952         if (auto textIndicator = TextIndicator::createWithRange(*range, defaultEditDragTextIndicatorOptions, TextIndicatorPresentationTransition::None, FloatSize()))
     1948        if (auto textIndicator = WebCore::TextIndicator::createWithRange(*range, defaultEditDragTextIndicatorOptions, WebCore::TextIndicatorPresentationTransition::None, WebCore::FloatSize()))
    19531949            _private->dataOperationTextIndicator = adoptNS([[WebUITextIndicatorData alloc] initWithImage:nil textIndicatorData:textIndicator->data() scale:page->deviceScaleFactor()]);
    19541950    }
     
    21182114+ (void)_setAlwaysUsesComplexTextCodePath:(BOOL)f
    21192115{
    2120     FontCascade::setCodePath(f ? FontCascade::Complex : FontCascade::Auto);
     2116    WebCore::FontCascade::setCodePath(f ? WebCore::FontCascade::Complex : WebCore::FontCascade::Auto);
    21212117}
    21222118
    21232119+ (BOOL)canCloseAllWebViews
    21242120{
    2125     return DOMWindow::dispatchAllPendingBeforeUnloadEvents();
     2121    return WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents();
    21262122}
    21272123
    21282124+ (void)closeAllWebViews
    21292125{
    2130     DOMWindow::dispatchAllPendingUnloadEvents();
     2126    WebCore::DOMWindow::dispatchAllPendingUnloadEvents();
    21312127
    21322128    // This will close the WebViews in a random order. Change this if close order is important.
     
    21582154    WebThreadRun(^{
    21592155        WebFrame *mainFrame = [self mainFrame];
    2160         Frame *coreMainFrame = core(mainFrame);
     2156        auto* coreMainFrame = core(mainFrame);
    21612157        if (coreMainFrame) {
    2162             Document *document = coreMainFrame->document();
     2158            auto* document = coreMainFrame->document();
    21632159            if (document)
    2164                 document->dispatchWindowEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No));
     2160                document->dispatchWindowEvent(WebCore::Event::create(WebCore::eventNames().unloadEvent, WebCore::Event::CanBubble::No, WebCore::Event::IsCancelable::No));
    21652161        }
    21662162    });
     
    21722168    if (!mainFrame)
    21732169        return nil;
    2174     RefPtr<EditingStyle> editingStyle = EditingStyle::styleAtSelectionStart(mainFrame->selection().selection());
     2170    RefPtr<WebCore::EditingStyle> editingStyle = WebCore::EditingStyle::styleAtSelectionStart(mainFrame->selection().selection());
    21752171    if (!editingStyle)
    21762172        return nil;
     
    22302226    [self setDefersCallbacks:NO];
    22312227    [[self mainFrame] setTimeoutsPaused:NO];
    2232     if (FrameView* view = [self _mainCoreFrame]->view())
     2228    if (auto* view = [self _mainCoreFrame]->view())
    22332229        view->resumeVisibleImageAnimationsIncludingSubframes();
    22342230}
     
    23442340#endif
    23452341
    2346     if (Frame* mainFrame = [self _mainCoreFrame])
     2342    if (auto* mainFrame = [self _mainCoreFrame])
    23472343        mainFrame->loader().detachFromParent();
    23482344
     
    23742370    // all the plug-ins in the page cache to break any retain cycles.
    23752371    // See comment in HistoryItem::releaseAllPendingPageCaches() for more information.
    2376     Page* page = _private->page;
     2372    auto* page = _private->page;
    23772373    _private->page = nullptr;
    2378     WebKit::DeferredPageDestructor::createDeferredPageDestructor(std::unique_ptr<Page>(page));
     2374    WebKit::DeferredPageDestructor::createDeferredPageDestructor(std::unique_ptr<WebCore::Page>(page));
    23792375
    23802376#if !PLATFORM(IOS_FAMILY)
     
    24292425- (BOOL)_isProcessingUserGesture
    24302426{
    2431     return UserGestureIndicator::processingUserGesture();
     2427    return WebCore::UserGestureIndicator::processingUserGesture();
    24322428}
    24332429
     
    25502546+ (void)_enableRemoteInspector
    25512547{
    2552     RemoteInspector::singleton().start();
     2548    Inspector::RemoteInspector::singleton().start();
    25532549}
    25542550
    25552551+ (void)_disableRemoteInspector
    25562552{
    2557     RemoteInspector::singleton().stop();
     2553    Inspector::RemoteInspector::singleton().stop();
    25582554}
    25592555
    25602556+ (void)_disableAutoStartRemoteInspector
    25612557{
    2562     RemoteInspector::startDisabled();
     2558    Inspector::RemoteInspector::startDisabled();
    25632559}
    25642560
    25652561+ (BOOL)_isRemoteInspectorEnabled
    25662562{
    2567     return RemoteInspector::singleton().enabled();
     2563    return Inspector::RemoteInspector::singleton().enabled();
    25682564}
    25692565
    25702566+ (BOOL)_hasRemoteInspectorSession
    25712567{
    2572     return RemoteInspector::singleton().hasActiveDebugSession();
     2568    return Inspector::RemoteInspector::singleton().hasActiveDebugSession();
    25732569}
    25742570
     
    26082604{
    26092605    RetainPtr<CFDataRef> auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken)));
    2610     RemoteInspector::singleton().setParentProcessInformation(pid, auditData);
     2606    Inspector::RemoteInspector::singleton().setParentProcessInformation(pid, auditData);
    26112607}
    26122608#endif // PLATFORM(IOS_FAMILY)
     
    26672663    // in the back forward list, and go to the current one.
    26682664
    2669     BackForwardController& backForward = _private->page->backForward();
     2665    auto& backForward = _private->page->backForward();
    26702666    ASSERT(!backForward.currentItem()); // destination list should be empty
    26712667
    2672     BackForwardController& otherBackForward = otherView->_private->page->backForward();
     2668    auto& otherBackForward = otherView->_private->page->backForward();
    26732669    if (!otherBackForward.currentItem())
    26742670        return; // empty back forward list, bail
    26752671   
    2676     HistoryItem* newItemToGoTo = nullptr;
     2672    WebCore::HistoryItem* newItemToGoTo = nullptr;
    26772673
    26782674    int lastItemIndex = otherBackForward.forwardCount();
     
    26842680            otherView->_private->page->mainFrame().loader().history().saveDocumentAndScrollState();
    26852681        }
    2686         Ref<HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy();
     2682        Ref<WebCore::HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy();
    26872683        if (i == 0)
    26882684            newItemToGoTo = newItem.ptr();
     
    26912687
    26922688    ASSERT(newItemToGoTo);
    2693     _private->page->goToItem(*newItemToGoTo, FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No);
     2689    _private->page->goToItem(*newItemToGoTo, WebCore::FrameLoadType::IndexedBackForward, WebCore::ShouldTreatAsContinuingLoad::No);
    26942690}
    26952691
     
    27732769- (BOOL)_needsKeyboardEventDisambiguationQuirks
    27742770{
    2775     static BOOL needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH) && !MacApplication::isSafari();
     2771    static BOOL needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH) && !WebCore::MacApplication::isSafari();
    27762772    return needsQuirks;
    27772773}
     
    27852781static bool needsSelfRetainWhileLoadingQuirk()
    27862782{
    2787     static bool needsQuirk = MacApplication::isAperture();
     2783    static bool needsQuirk = WebCore::MacApplication::isAperture();
    27882784    return needsQuirk;
    27892785}
     
    28002796    // <https://bugs.webkit.org/show_bug.cgi?id=46334>.
    28012797    static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER)
    2802         && (MacApplication::isAOLInstantMessenger() || MacApplication::isMicrosoftMyDay());
     2798        && (WebCore::MacApplication::isAOLInstantMessenger() || WebCore::MacApplication::isMicrosoftMyDay());
    28032799   
    28042800    // Mail.app must continue to display HTML email that contains quirky markup.
    2805     static bool isAppleMail = MacApplication::isAppleMail();
     2801    static bool isAppleMail = WebCore::MacApplication::isAppleMail();
    28062802
    28072803    return isApplicationNeedingParserQuirks || isAppleMail || [[self preferences] usePreHTML5ParserQuirks];
     
    28402836
    28412837- (void)_preferencesChanged:(WebPreferences *)preferences
    2842 {   
     2838{
     2839    using namespace WebCore;
    28432840    ASSERT(preferences == [self preferences]);
    28442841    if (!_private->userAgentOverridden)
     
    28692866#endif
    28702867
    2871     Settings& settings = _private->page->settings();
     2868    auto& settings = _private->page->settings();
    28722869
    28732870    settings.setCursiveFontFamily([preferences cursiveFontFamily]);
     
    29722969    settings.setBackspaceKeyNavigationEnabled([preferences backspaceKeyNavigationEnabled]);
    29732970    settings.setWantsBalancedSetDefersLoadingBehavior([preferences wantsBalancedSetDefersLoadingBehavior]);
    2974     DeprecatedGlobalSettings::setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]);
     2971    WebCore::DeprecatedGlobalSettings::setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]);
    29752972
    29762973    settings.setShouldRespectImageOrientation([preferences shouldRespectImageOrientation]);
     
    29782975    settings.setRequestAnimationFrameEnabled([preferences requestAnimationFrameEnabled]);
    29792976    settings.setDiagnosticLoggingEnabled([preferences diagnosticLoggingEnabled]);
    2980     DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled([preferences lowPowerVideoAudioBufferSizeEnabled]);
     2977    WebCore::DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled([preferences lowPowerVideoAudioBufferSizeEnabled]);
    29812978
    29822979    settings.setUseLegacyTextAlignPositionedElementBehavior([preferences useLegacyTextAlignPositionedElementBehavior]);
     
    29972994    switch ([preferences storageBlockingPolicy]) {
    29982995    case WebAllowAllStorage:
    2999         settings.setStorageBlockingPolicy(SecurityOrigin::AllowAllStorage);
     2996        settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::AllowAllStorage);
    30002997        break;
    30012998    case WebBlockThirdPartyStorage:
    3002         settings.setStorageBlockingPolicy(SecurityOrigin::BlockThirdPartyStorage);
     2999        settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::BlockThirdPartyStorage);
    30033000        break;
    30043001    case WebBlockAllStorage:
    3005         settings.setStorageBlockingPolicy(SecurityOrigin::BlockAllStorage);
     3002        settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::BlockAllStorage);
    30063003        break;
    30073004    }
     
    30343031    settings.setAlwaysUseAcceleratedOverflowScroll([preferences _alwaysUseAcceleratedOverflowScroll]);
    30353032    settings.setContentChangeObserverEnabled([preferences contentChangeObserverEnabled]);
    3036     DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
    3037     DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);
    3038     DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]);
     3033    WebCore::DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
     3034    WebCore::DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);
     3035    WebCore::DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]);
    30393036#if HAVE(AVKIT)
    3040     DeprecatedGlobalSettings::setAVKitEnabled([preferences avKitEnabled]);
     3037    WebCore::DeprecatedGlobalSettings::setAVKitEnabled([preferences avKitEnabled]);
    30413038#endif
    30423039
     
    30923089
    30933090#if USE(AVFOUNDATION)
    3094     DeprecatedGlobalSettings::setAVFoundationEnabled([preferences isAVFoundationEnabled]);
    3095     DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled([preferences isAVFoundationNSURLSessionEnabled]);
     3091    WebCore::DeprecatedGlobalSettings::setAVFoundationEnabled([preferences isAVFoundationEnabled]);
     3092    WebCore::DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled([preferences isAVFoundationNSURLSessionEnabled]);
    30963093#endif
    30973094
     
    31243121    settings.setHiddenPageCSSAnimationSuspensionEnabled([preferences hiddenPageCSSAnimationSuspensionEnabled]);
    31253122
    3126     DeprecatedGlobalSettings::setResourceLoadStatisticsEnabled([preferences resourceLoadStatisticsEnabled]);
     3123    WebCore::DeprecatedGlobalSettings::setResourceLoadStatisticsEnabled([preferences resourceLoadStatisticsEnabled]);
    31273124
    31283125    settings.setViewportFitEnabled([preferences viewportFitEnabled]);
     
    33543351    // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
    33553352    // for backwards compatibility.
    3356     Page* page = core(self);
     3353    auto* page = core(self);
    33573354    if (page) {
    3358         OptionSet<WebCore::LayoutMilestone> milestones { DidFirstLayout };
    3359 #if PLATFORM(IOS_FAMILY)
    3360         milestones.add(DidFirstVisuallyNonEmptyLayout);
     3355        OptionSet<WebCore::LayoutMilestone> milestones { WebCore::DidFirstLayout };
     3356#if PLATFORM(IOS_FAMILY)
     3357        milestones.add(WebCore::DidFirstVisuallyNonEmptyLayout);
    33613358#else
    33623359        if (cache->didFirstVisuallyNonEmptyLayoutInFrameFunc)
    3363             milestones.add(DidFirstVisuallyNonEmptyLayout);
     3360            milestones.add(WebCore::DidFirstVisuallyNonEmptyLayout);
    33643361#endif
    33653362        page->addLayoutMilestones(milestones);
     
    34773474    // in the WebCore MIMEType registry.  For now we're doing this in a safe, limited manner
    34783475    // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness
    3479     MIMETypeRegistry::supportedNonImageMIMETypes().remove(MIMEType);
     3476    WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().remove(MIMEType);
    34803477}
    34813478
     
    34893486    // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness
    34903487    if ([viewClass class] == [WebHTMLView class])
    3491         MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);
     3488        WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);
    34923489   
    34933490    // This is used to make _representationExistsForURLScheme faster.
     
    35403537+ (NSString *)_decodeData:(NSData *)data
    35413538{
    3542     HTMLNames::init(); // this method is used for importing bookmarks at startup, so HTMLNames are likely to be uninitialized yet
    3543     return TextResourceDecoder::create("text/html")->decodeAndFlush(static_cast<const char*>([data bytes]), [data length]); // bookmark files are HTML
     3539    WebCore::HTMLNames::init(); // this method is used for importing bookmarks at startup, so HTMLNames are likely to be uninitialized yet
     3540    return WebCore::TextResourceDecoder::create("text/html")->decodeAndFlush(static_cast<const char*>([data bytes]), [data length]); // bookmark files are HTML
    35443541}
    35453542
     
    36223619
    36233620#if ENABLE(FULLSCREEN_API)
    3624     Document* document = core([frame DOMDocument]);
    3625     if (Element* element = document ? document->fullscreenManager().currentFullscreenElement() : 0) {
     3621    auto* document = core([frame DOMDocument]);
     3622    if (auto* element = document ? document->fullscreenManager().currentFullscreenElement() : 0) {
    36263623        SEL selector = @selector(webView:closeFullScreenWithListener:);
    36273624        if ([_private->UIDelegate respondsToSelector:selector]) {
     
    36413638        return;
    36423639
    3643     Page* page = _private->page;
     3640    auto* page = _private->page;
    36443641    if (!page)
    36453642        return;
     
    37203717
    37213718    if (auto storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession()->platformSession())
    3722         cachedResponse = cachedResponseForRequest(storageSession, request.get());
     3719        cachedResponse = WebCore::cachedResponseForRequest(storageSession, request.get());
    37233720    else
    37243721        cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()];
     
    37923789+ (void)_setShouldUseFontSmoothing:(BOOL)f
    37933790{
    3794     FontCascade::setShouldUseSmoothing(f);
     3791    WebCore::FontCascade::setShouldUseSmoothing(f);
    37953792}
    37963793
    37973794+ (BOOL)_shouldUseFontSmoothing
    37983795{
    3799     return FontCascade::shouldUseSmoothing();
     3796    return WebCore::FontCascade::shouldUseSmoothing();
    38003797}
    38013798
     
    38033800+ (void)_setUsesTestModeFocusRingColor:(BOOL)f
    38043801{
    3805     setUsesTestModeFocusRingColor(f);
     3802    WebCore::setUsesTestModeFocusRingColor(f);
    38063803}
    38073804
    38083805+ (BOOL)_usesTestModeFocusRingColor
    38093806{
    3810     return usesTestModeFocusRingColor();
     3807    return WebCore::usesTestModeFocusRingColor();
    38113808}
    38123809#endif
     
    39193916    WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView];
    39203917    if (flag) {
    3921         [scrollview setVerticalScrollingMode:ScrollbarAlwaysOn andLock:YES];
     3918        [scrollview setVerticalScrollingMode:WebCore::ScrollbarAlwaysOn andLock:YES];
    39223919    } else {
    39233920        [scrollview setVerticalScrollingModeLocked:NO];
    3924         [scrollview setVerticalScrollingMode:ScrollbarAuto andLock:NO];
     3921        [scrollview setVerticalScrollingMode:WebCore::ScrollbarAuto andLock:NO];
    39253922    }
    39263923}
     
    39293926{
    39303927    WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView];
    3931     return [scrollview verticalScrollingModeLocked] && [scrollview verticalScrollingMode] == ScrollbarAlwaysOn;
     3928    return [scrollview verticalScrollingModeLocked] && [scrollview verticalScrollingMode] == WebCore::ScrollbarAlwaysOn;
    39323929}
    39333930
     
    39363933    WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView];
    39373934    if (flag) {
    3938         [scrollview setHorizontalScrollingMode:ScrollbarAlwaysOn andLock:YES];
     3935        [scrollview setHorizontalScrollingMode:WebCore::ScrollbarAlwaysOn andLock:YES];
    39393936    } else {
    39403937        [scrollview setHorizontalScrollingModeLocked:NO];
    3941         [scrollview setHorizontalScrollingMode:ScrollbarAuto andLock:NO];
     3938        [scrollview setHorizontalScrollingMode:WebCore::ScrollbarAuto andLock:NO];
    39423939    }
    39433940}
     
    39453942- (void)setProhibitsMainFrameScrolling:(BOOL)prohibits
    39463943{
    3947     if (Frame* mainFrame = [self _mainCoreFrame])
     3944    if (auto* mainFrame = [self _mainCoreFrame])
    39483945        mainFrame->view()->setProhibitsScrolling(prohibits);
    39493946}
     
    39523949{
    39533950    WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView];
    3954     return [scrollview horizontalScrollingModeLocked] && [scrollview horizontalScrollingMode] == ScrollbarAlwaysOn;
     3951    return [scrollview horizontalScrollingModeLocked] && [scrollview horizontalScrollingMode] == WebCore::ScrollbarAlwaysOn;
    39553952}
    39563953#endif // !PLATFORM(IOS_FAMILY)
     
    40734070    WebThreadLock();
    40744071
    4075     Frame* mainCoreFrame = [self _mainCoreFrame];
    4076     for (Frame* frame = mainCoreFrame; frame; frame = frame->tree().traverseNext()) {
    4077         FrameView* coreView = frame ? frame->view() : 0;
     4072    auto* mainCoreFrame = [self _mainCoreFrame];
     4073    for (auto* frame = mainCoreFrame; frame; frame = frame->tree().traverseNext()) {
     4074        auto* coreView = frame ? frame->view() : 0;
    40784075        if (!coreView)
    40794076            continue;
    40804077
    40814078        // Get the GraphicsLayer for this widget.
    4082         GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(pluginView);
     4079        WebCore::GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(pluginView);
    40834080        if (!layerForWidget)
    40844081            continue;
    40854082       
    40864083        if (layerForWidget->contentsLayerForMedia() != layer) {
    4087             layerForWidget->setContentsToPlatformLayer(layer, GraphicsLayer::ContentsLayerPurpose::Media);
     4084            layerForWidget->setContentsToPlatformLayer(layer, WebCore::GraphicsLayer::ContentsLayerPurpose::Media);
    40884085            // We need to make sure the layer hierarchy change is applied immediately.
    40894086            if (mainCoreFrame->view())
     
    41054102- (void)_attachScriptDebuggerToAllFrames
    41064103{
    4107     for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())
     4104    for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())
    41084105        [kit(frame) _attachScriptDebugger];
    41094106}
     
    41114108- (void)_detachScriptDebuggerFromAllFrames
    41124109{
    4113     for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())
     4110    for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())
    41144111        [kit(frame) _detachScriptDebugger];
    41154112}
     
    41974194{
    41984195#if USE(QUICK_LOOK)
    4199     return [QLPreviewGetSupportedMIMETypesSet() allObjects];
     4196    return [WebCore::QLPreviewGetSupportedMIMETypesSet() allObjects];
    42004197#else
    42014198    return nil;
     
    42174214    ASSERT(WebThreadIsLocked());
    42184215    _private->fixedLayoutSize = size;
    4219     if (Frame* mainFrame = core([self mainFrame])) {
    4220         IntSize newSize(size);
     4216    if (auto* mainFrame = core([self mainFrame])) {
     4217        WebCore::IntSize newSize(size);
    42214218        mainFrame->view()->setFixedLayoutSize(newSize);
    42224219        mainFrame->view()->setUseFixedLayout(!newSize.isEmpty());
     
    42344231    ASSERT(WebThreadIsLocked());
    42354232
    4236     IntRect newRect;
     4233    WebCore::IntRect newRect;
    42374234    {
    42384235        LockHolder locker(_private->pendingFixedPositionLayoutRectMutex);
    42394236        if (CGRectIsNull(_private->pendingFixedPositionLayoutRect))
    42404237            return;
    4241         newRect = enclosingIntRect(_private->pendingFixedPositionLayoutRect);
     4238        newRect = WebCore::enclosingIntRect(_private->pendingFixedPositionLayoutRect);
    42424239        _private->pendingFixedPositionLayoutRect = CGRectNull;
    42434240    }
    42444241
    4245     if (Frame* mainFrame = core([self mainFrame]))
     4242    if (auto* mainFrame = core([self mainFrame]))
    42464243        mainFrame->view()->setCustomFixedPositionLayoutRect(newRect);
    42474244}
     
    42854282    ASSERT(WebThreadIsLocked());
    42864283   
    4287     if (Frame* coreFrame = [self _mainCoreFrame])
    4288         coreFrame->viewportOffsetChanged(Frame::IncrementalScrollOffset);
     4284    if (auto* coreFrame = [self _mainCoreFrame])
     4285        coreFrame->viewportOffsetChanged(WebCore::Frame::IncrementalScrollOffset);
    42894286}
    42904287
     
    42924289{
    42934290    // Find the frame
    4294     Node* node = core(domNode);
    4295     Frame* frame = node->document().frame();
     4291    auto* node = core(domNode);
     4292    auto* frame = node->document().frame();
    42964293    if (!frame)
    42974294        return;
    42984295
    4299     frame->overflowScrollPositionChangedForNode(roundedIntPoint(offset), node, userScroll);
     4296    frame->overflowScrollPositionChangedForNode(WebCore::roundedIntPoint(offset), node, userScroll);
    43004297}
    43014298
    43024299+ (void)_doNotStartObservingNetworkReachability
    43034300{
    4304     DeprecatedGlobalSettings::setShouldOptOutOfNetworkStateObservation(true);
     4301    WebCore::DeprecatedGlobalSettings::setShouldOptOutOfNetworkStateObservation(true);
    43054302}
    43064303#endif // PLATFORM(IOS_FAMILY)
     
    43094306- (NSArray *)_touchEventRegions
    43104307{
    4311     Frame* frame = [self _mainCoreFrame];
     4308    auto* frame = [self _mainCoreFrame];
    43124309    if (!frame)
    43134310        return nil;
    43144311   
    4315     Document* document = frame->document();
     4312    auto* document = frame->document();
    43164313    if (!document)
    43174314        return nil;
    43184315
    4319     Vector<IntRect> rects;
     4316    Vector<WebCore::IntRect> rects;
    43204317    document->getTouchRects(rects);
    43214318
     
    43264323
    43274324    NSView <WebDocumentView> *documentView = [[[self mainFrame] frameView] documentView];
    4328     Vector<IntRect>::const_iterator end = rects.end();
    4329     for (Vector<IntRect>::const_iterator it = rects.begin(); it != end; ++it) {
    4330         const IntRect& rect = *it;
     4325    Vector<WebCore::IntRect>::const_iterator end = rects.end();
     4326    for (Vector<WebCore::IntRect>::const_iterator it = rects.begin(); it != end; ++it) {
     4327        const WebCore::IntRect& rect = *it;
    43314328        if (rect.isEmpty())
    43324329            continue;
     
    43354332        // the same as the coordinate system of the WebView. UIWebView currently expects view coordinates, so we'll
    43364333        // convert them here now.
    4337         IntRect viewRect = IntRect([documentView convertRect:rect toView:self]);
     4334        WebCore::IntRect viewRect = WebCore::IntRect([documentView convertRect:rect toView:self]);
    43384335
    43394336        // The event region wants this points in this order:
     
    43424339        //  p1------p4
    43434340        //
    4344         WebEventRegion *eventRegion = [[WebEventRegion alloc] initWithPoints:FloatPoint(viewRect.x(), viewRect.maxY())
    4345                                                                             :FloatPoint(viewRect.x(), viewRect.y())
    4346                                                                             :FloatPoint(viewRect.maxX(), viewRect.y())
    4347                                                                             :FloatPoint(viewRect.maxX(), viewRect.maxY())];
     4341        WebEventRegion *eventRegion = [[WebEventRegion alloc] initWithPoints:WebCore::FloatPoint(viewRect.x(), viewRect.maxY())
     4342            : WebCore::FloatPoint(viewRect.x(), viewRect.y()) : WebCore::FloatPoint(viewRect.maxX(), viewRect.y()) : WebCore::FloatPoint(viewRect.maxX(), viewRect.maxY())];
    43484343        if (eventRegion) {
    43494344            [eventRegionArray addObject:eventRegion];
     
    43754370- (WebTextIterator *)textIteratorForRect:(NSRect)rect
    43764371{
    4377     IntPoint rectStart(rect.origin.x, rect.origin.y);
    4378     IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);
     4372    WebCore::IntPoint rectStart(rect.origin.x, rect.origin.y);
     4373    WebCore::IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);
    43794374   
    4380     Frame* coreFrame = [self _mainCoreFrame];
     4375    auto* coreFrame = [self _mainCoreFrame];
    43814376    if (!coreFrame)
    43824377        return nil;
    43834378   
    4384     VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd));
     4379    WebCore::VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd));
    43854380   
    43864381    return [[[WebTextIterator alloc] initWithRange:kit(selectionInsideRect.toNormalizedRange().get())] autorelease];
     
    43984393- (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value
    43994394{
    4400     Frame* coreFrame = [self _mainCoreFrame];
     4395    auto* coreFrame = [self _mainCoreFrame];
    44014396    if (!coreFrame)
    44024397        return;
     
    44434438- (BOOL)_isUsingAcceleratedCompositing
    44444439{
    4445     Frame* coreFrame = [self _mainCoreFrame];
    4446     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     4440    auto* coreFrame = [self _mainCoreFrame];
     4441    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    44474442        NSView *documentView = [[kit(frame) frameView] documentView];
    44484443        if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isUsingAcceleratedCompositing])
     
    44924487- (BOOL)_isSoftwareRenderable
    44934488{
    4494     Frame* coreFrame = [self _mainCoreFrame];
    4495     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
    4496         if (FrameView* view = frame->view()) {
     4489    auto* coreFrame = [self _mainCoreFrame];
     4490    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {
     4491        if (auto* view = frame->view()) {
    44974492            if (!view->isSoftwareRenderable())
    44984493                return NO;
     
    45054500- (void)setTracksRepaints:(BOOL)flag
    45064501{
    4507     Frame* coreFrame = [self _mainCoreFrame];
    4508     if (FrameView* view = coreFrame->view())
     4502    auto* coreFrame = [self _mainCoreFrame];
     4503    if (auto* view = coreFrame->view())
    45094504        view->setTracksRepaints(flag);
    45104505}
     
    45124507- (BOOL)isTrackingRepaints
    45134508{
    4514     Frame* coreFrame = [self _mainCoreFrame];
    4515     if (FrameView* view = coreFrame->view())
     4509    auto* coreFrame = [self _mainCoreFrame];
     4510    if (auto* view = coreFrame->view())
    45164511        return view->isTrackingRepaints();
    45174512   
     
    45214516- (void)resetTrackedRepaints
    45224517{
    4523     Frame* coreFrame = [self _mainCoreFrame];
    4524     if (FrameView* view = coreFrame->view())
     4518    auto* coreFrame = [self _mainCoreFrame];
     4519    if (auto* view = coreFrame->view())
    45254520        view->resetTrackedRepaints();
    45264521}
     
    45284523- (NSArray*)trackedRepaintRects
    45294524{
    4530     Frame* coreFrame = [self _mainCoreFrame];
    4531     FrameView* view = coreFrame->view();
     4525    auto* coreFrame = [self _mainCoreFrame];
     4526    auto* view = coreFrame->view();
    45324527    if (!view || !view->isTrackingRepaints())
    45334528        return nil;
    45344529
    4535     const Vector<FloatRect>& repaintRects = view->trackedRepaintRects();
     4530    const Vector<WebCore::FloatRect>& repaintRects = view->trackedRepaintRects();
    45364531    NSMutableArray* rectsArray = [[NSMutableArray alloc] initWithCapacity:repaintRects.size()];
    45374532   
    45384533    for (unsigned i = 0; i < repaintRects.size(); ++i)
    4539         [rectsArray addObject:[NSValue valueWithRect:snappedIntRect(LayoutRect(repaintRects[i]))]];
     4534        [rectsArray addObject:[NSValue valueWithRect:snappedIntRect(WebCore::LayoutRect(repaintRects[i]))]];
    45404535
    45414536    return [rectsArray autorelease];
     
    45514546+ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains
    45524547{
    4553     SecurityPolicy::addOriginAccessWhitelistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
     4548    WebCore::SecurityPolicy::addOriginAccessWhitelistEntry(WebCore::SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
    45544549}
    45554550
    45564551+ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains
    45574552{
    4558     SecurityPolicy::removeOriginAccessWhitelistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
     4553    WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry(WebCore::SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
    45594554}
    45604555
    45614556+ (void)_resetOriginAccessWhitelists
    45624557{
    4563     SecurityPolicy::resetOriginAccessWhitelists();
     4558    WebCore::SecurityPolicy::resetOriginAccessWhitelists();
    45644559}
    45654560
     
    46374632        return;
    46384633
    4639     auto userScript = makeUnique<UserScript>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd, injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly);
     4634    auto userScript = makeUnique<WebCore::UserScript>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectionTime == WebInjectAtDocumentStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd, injectedFrames == WebInjectInAllFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
    46404635    viewGroup->userContentController().addUserScript(*core(world), WTFMove(userScript));
    46414636}
     
    46604655        return;
    46614656
    4662     auto styleSheet = makeUnique<UserStyleSheet>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly, UserStyleUserLevel);
    4663     viewGroup->userContentController().addUserStyleSheet(*core(world), WTFMove(styleSheet), InjectInExistingDocuments);
     4657    auto styleSheet = makeUnique<WebCore::UserStyleSheet>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly, WebCore::UserStyleUserLevel);
     4658    viewGroup->userContentController().addUserStyleSheet(*core(world), WTFMove(styleSheet), WebCore::InjectInExistingDocuments);
    46644659}
    46654660
     
    47434738- (BOOL)allowsNewCSSAnimationsWhileSuspended
    47444739{
    4745     Frame* frame = core([self mainFrame]);
     4740    auto* frame = core([self mainFrame]);
    47464741    if (frame)
    47474742        return frame->animation().allowsNewAnimationsWhileSuspended();
     
    47524747- (void)setAllowsNewCSSAnimationsWhileSuspended:(BOOL)allowed
    47534748{
    4754     Frame* frame = core([self mainFrame]);
     4749    auto* frame = core([self mainFrame]);
    47554750    if (frame)
    47564751        frame->animation().setAllowsNewAnimationsWhileSuspended(allowed);
     
    47604755{
    47614756    // should ask the page!
    4762     Frame* frame = core([self mainFrame]);
     4757    auto* frame = core([self mainFrame]);
    47634758    if (frame)
    47644759        return frame->animation().isSuspended();
     
    47694764- (void)setCSSAnimationsSuspended:(BOOL)suspended
    47704765{
    4771     Frame* frame = core([self mainFrame]);
     4766    auto* frame = core([self mainFrame]);
    47724767    if (suspended == frame->animation().isSuspended())
    47734768        return;
     
    47814776+ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
    47824777{
    4783     SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
     4778    WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
    47844779}
    47854780
    47864781+ (void)_registerURLSchemeAsSecure:(NSString *)scheme
    47874782{
    4788     SchemeRegistry::registerURLSchemeAsSecure(scheme);
     4783    WebCore::SchemeRegistry::registerURLSchemeAsSecure(scheme);
    47894784}
    47904785
     
    47954790+ (void)_registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:(NSString *)scheme
    47964791{
    4797     SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(scheme);
     4792    WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(scheme);
    47984793}
    47994794
     
    48024797    [self hideFormValidationMessage];
    48034798
    4804     _private->page->setPageScaleFactor(scale, IntPoint(origin));
     4799    _private->page->setPageScaleFactor(scale, WebCore::IntPoint(origin));
    48054800}
    48064801
     
    48124807- (void)_setUseFixedLayout:(BOOL)fixed
    48134808{
    4814     Frame* coreFrame = [self _mainCoreFrame];
     4809    auto* coreFrame = [self _mainCoreFrame];
    48154810    if (!coreFrame)
    48164811        return;
    48174812
    4818     FrameView* view = coreFrame->view();
     4813    auto* view = coreFrame->view();
    48194814    if (!view)
    48204815        return;
     
    48224817    view->setUseFixedLayout(fixed);
    48234818    if (!fixed)
    4824         view->setFixedLayoutSize(IntSize());
     4819        view->setFixedLayoutSize(WebCore::IntSize());
    48254820}
    48264821
     
    48284823- (void)_setFixedLayoutSize:(NSSize)size
    48294824{
    4830     Frame* coreFrame = [self _mainCoreFrame];
     4825    auto* coreFrame = [self _mainCoreFrame];
    48314826    if (!coreFrame)
    48324827        return;
    48334828   
    4834     FrameView* view = coreFrame->view();
     4829    auto* view = coreFrame->view();
    48354830    if (!view)
    48364831        return;
    48374832   
    4838     view->setFixedLayoutSize(IntSize(size));
     4833    view->setFixedLayoutSize(WebCore::IntSize(size));
    48394834    view->forceLayout();
    48404835}
     
    48434838- (BOOL)_useFixedLayout
    48444839{
    4845     Frame* coreFrame = [self _mainCoreFrame];
     4840    auto* coreFrame = [self _mainCoreFrame];
    48464841    if (!coreFrame)
    48474842        return NO;
    48484843   
    4849     FrameView* view = coreFrame->view();
     4844    auto* view = coreFrame->view();
    48504845    if (!view)
    48514846        return NO;
     
    48574852- (NSSize)_fixedLayoutSize
    48584853{
    4859     Frame* coreFrame = [self _mainCoreFrame];
     4854    auto* coreFrame = [self _mainCoreFrame];
    48604855    if (!coreFrame)
    4861         return IntSize();
     4856        return WebCore::IntSize();
    48624857   
    4863     FrameView* view = coreFrame->view();
     4858    auto* view = coreFrame->view();
    48644859    if (!view)
    4865         return IntSize();
     4860        return WebCore::IntSize();
    48664861
    48674862    return view->fixedLayoutSize();
     
    48714866- (void)_setPaginationMode:(WebPaginationMode)paginationMode
    48724867{
    4873     Page* page = core(self);
     4868    auto* page = core(self);
    48744869    if (!page)
    48754870        return;
    48764871
    4877     Pagination pagination = page->pagination();
     4872    auto pagination = page->pagination();
    48784873    switch (paginationMode) {
    48794874    case WebPaginationModeUnpaginated:
    4880         pagination.mode = Pagination::Unpaginated;
     4875        pagination.mode = WebCore::Pagination::Unpaginated;
    48814876        break;
    48824877    case WebPaginationModeLeftToRight:
    4883         pagination.mode = Pagination::LeftToRightPaginated;
     4878        pagination.mode = WebCore::Pagination::LeftToRightPaginated;
    48844879        break;
    48854880    case WebPaginationModeRightToLeft:
    4886         pagination.mode = Pagination::RightToLeftPaginated;
     4881        pagination.mode = WebCore::Pagination::RightToLeftPaginated;
    48874882        break;
    48884883    case WebPaginationModeTopToBottom:
    4889         pagination.mode = Pagination::TopToBottomPaginated;
     4884        pagination.mode = WebCore::Pagination::TopToBottomPaginated;
    48904885        break;
    48914886    case WebPaginationModeBottomToTop:
    4892         pagination.mode = Pagination::BottomToTopPaginated;
     4887        pagination.mode = WebCore::Pagination::BottomToTopPaginated;
    48934888        break;
    48944889    default:
     
    49014896- (WebPaginationMode)_paginationMode
    49024897{
    4903     Page* page = core(self);
     4898    auto* page = core(self);
    49044899    if (!page)
    49054900        return WebPaginationModeUnpaginated;
    49064901
    49074902    switch (page->pagination().mode) {
    4908     case Pagination::Unpaginated:
     4903    case WebCore::Pagination::Unpaginated:
    49094904        return WebPaginationModeUnpaginated;
    4910     case Pagination::LeftToRightPaginated:
     4905    case WebCore::Pagination::LeftToRightPaginated:
    49114906        return WebPaginationModeLeftToRight;
    4912     case Pagination::RightToLeftPaginated:
     4907    case WebCore::Pagination::RightToLeftPaginated:
    49134908        return WebPaginationModeRightToLeft;
    4914     case Pagination::TopToBottomPaginated:
     4909    case WebCore::Pagination::TopToBottomPaginated:
    49154910        return WebPaginationModeTopToBottom;
    4916     case Pagination::BottomToTopPaginated:
     4911    case WebCore::Pagination::BottomToTopPaginated:
    49174912        return WebPaginationModeBottomToTop;
    49184913    }
     
    49244919- (void)_listenForLayoutMilestones:(WebLayoutMilestones)layoutMilestones
    49254920{
    4926     Page* page = core(self);
     4921    auto* page = core(self);
    49274922    if (!page)
    49284923        return;
     
    49334928- (WebLayoutMilestones)_layoutMilestones
    49344929{
    4935     Page* page = core(self);
     4930    auto* page = core(self);
    49364931    if (!page)
    49374932        return 0;
     
    49784973- (void)_setPaginationBehavesLikeColumns:(BOOL)behavesLikeColumns
    49794974{
    4980     Page* page = core(self);
     4975    auto* page = core(self);
    49814976    if (!page)
    49824977        return;
    49834978
    4984     Pagination pagination = page->pagination();
     4979    auto pagination = page->pagination();
    49854980    pagination.behavesLikeColumns = behavesLikeColumns;
    49864981
     
    49904985- (BOOL)_paginationBehavesLikeColumns
    49914986{
    4992     Page* page = core(self);
     4987    auto* page = core(self);
    49934988    if (!page)
    49944989        return NO;
     
    49994994- (void)_setPageLength:(CGFloat)pageLength
    50004995{
    5001     Page* page = core(self);
     4996    auto* page = core(self);
    50024997    if (!page)
    50034998        return;
    50044999
    5005     Pagination pagination = page->pagination();
     5000    auto pagination = page->pagination();
    50065001    pagination.pageLength = pageLength;
    50075002
     
    50115006- (CGFloat)_pageLength
    50125007{
    5013     Page* page = core(self);
     5008    auto* page = core(self);
    50145009    if (!page)
    50155010        return 1;
     
    50205015- (void)_setGapBetweenPages:(CGFloat)pageGap
    50215016{
    5022     Page* page = core(self);
     5017    auto* page = core(self);
    50235018    if (!page)
    50245019        return;
    50255020
    5026     Pagination pagination = page->pagination();
     5021    auto pagination = page->pagination();
    50275022    pagination.gap = pageGap;
    50285023    page->setPagination(pagination);
     
    50315026- (CGFloat)_gapBetweenPages
    50325027{
    5033     Page* page = core(self);
     5028    auto* page = core(self);
    50345029    if (!page)
    50355030        return 0;
     
    50405035- (void)_setPaginationLineGridEnabled:(BOOL)lineGridEnabled
    50415036{
    5042     Page* page = core(self);
     5037    auto* page = core(self);
    50435038    if (!page)
    50445039        return;
     
    50495044- (BOOL)_paginationLineGridEnabled
    50505045{
    5051     Page* page = core(self);
     5046    auto* page = core(self);
    50525047    if (!page)
    50535048        return NO;
     
    50585053- (NSUInteger)_pageCount
    50595054{
    5060     Page* page = core(self);
     5055    auto* page = core(self);
    50615056    if (!page)
    50625057        return 0;
     
    51065101+ (BOOL)_HTTPPipeliningEnabled
    51075102{
    5108     return ResourceRequest::httpPipeliningEnabled();
     5103    return WebCore::ResourceRequest::httpPipeliningEnabled();
    51095104}
    51105105
    51115106+ (void)_setHTTPPipeliningEnabled:(BOOL)enabled
    51125107{
    5113     ResourceRequest::setHTTPPipeliningEnabled(enabled);
     5108    WebCore::ResourceRequest::setHTTPPipeliningEnabled(enabled);
    51145109}
    51155110
     
    52575252- (BOOL)shouldRequestCandidates
    52585253{
    5259     Frame* coreFrame = core([self _selectedOrMainFrame]);
     5254    auto* coreFrame = core([self _selectedOrMainFrame]);
    52605255    if (!coreFrame)
    52615256        return NO;
     
    55925587}
    55935588
    5594 - (void)removePluginInstanceViewsFor:(WebFrame*)webFrame 
     5589- (void)removePluginInstanceViewsFor:(WebFrame*)webFrame
    55955590{
    55965591    if (_private->pluginDatabase)
     
    56745669+ (void)registerURLSchemeAsLocal:(NSString *)protocol
    56755670{
    5676     SchemeRegistry::registerURLSchemeAsLocal(protocol);
     5671    WebCore::SchemeRegistry::registerURLSchemeAsLocal(protocol);
    56775672}
    56785673
     
    60466041{
    60476042    if (_private && _private->page)
    6048         _private->page->chrome().windowScreenDidChange((PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
     6043        _private->page->chrome().windowScreenDidChange((WebCore::PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
    60496044}
    60506045
     
    61366131        scaleFactor = [window screenScale];
    61376132    else
    6138         scaleFactor = screenScaleFactor();
     6133        scaleFactor = WebCore::screenScaleFactor();
    61396134
    61406135    _private->page->setDeviceScaleFactor(scaleFactor);
     
    63766371
    63776372    ASSERT(item);
    6378     _private->page->goToItem(*core(item), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No);
     6373    _private->page->goToItem(*core(item), WebCore::FrameLoadType::IndexedBackForward, WebCore::ShouldTreatAsContinuingLoad::No);
    63796374    return YES;
    63806375}
     
    64006395    // FIXME: It might be nice to rework this code so that _private->zoomMultiplier doesn't exist
    64016396    // and instead the zoom factors stored in Frame are used.
    6402     Frame* coreFrame = [self _mainCoreFrame];
     6397    auto* coreFrame = [self _mainCoreFrame];
    64036398    if (coreFrame) {
    64046399        if (_private->zoomsTextOnly)
     
    65646559    if (encoding == oldEncoding || [encoding isEqualToString:oldEncoding])
    65656560        return;
    6566     if (Frame* mainFrame = [self _mainCoreFrame])
     6561    if (auto* mainFrame = [self _mainCoreFrame])
    65676562        mainFrame->loader().reloadWithOverrideEncoding(encoding);
    65686563}
     
    66116606    WebCoreThreadViolationCheckRoundThree();
    66126607
    6613     Frame* coreFrame = [self _mainCoreFrame];
     6608    auto* coreFrame = [self _mainCoreFrame];
    66146609    if (!coreFrame)
    66156610        return nil;
     
    66386633        return;
    66396634
    6640     Frame* coreFrame = [self _mainCoreFrame];
     6635    auto* coreFrame = [self _mainCoreFrame];
    66416636#if !PLATFORM(IOS_FAMILY)
    6642     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))
     6637    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))
    66436638        [[[kit(frame) frameView] documentView] viewWillMoveToHostWindow:hostWindow];
    66446639    if (_private->hostWindow && [self window] != _private->hostWindow)
     
    66496644    [_private->hostWindow release];
    66506645    _private->hostWindow = [hostWindow retain];
    6651     for (Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))
     6646    for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))
    66526647        [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow];
    66536648#if !PLATFORM(IOS_FAMILY)
     
    67066701}
    67076702
    6708 - (DragApplicationFlags)applicationFlags:(id <NSDraggingInfo>)draggingInfo
     6703- (WebCore::DragApplicationFlags)applicationFlags:(id <NSDraggingInfo>)draggingInfo
    67096704{
    67106705    uint32_t flags = 0;
    67116706    if ([NSApp modalWindow])
    6712         flags = DragApplicationIsModal;
     6707        flags = WebCore::DragApplicationIsModal;
    67136708    if ([[self window] attachedSheet])
    6714         flags |= DragApplicationHasAttachedSheet;
     6709        flags |= WebCore::DragApplicationHasAttachedSheet;
    67156710    if ([draggingInfo draggingSource] == self)
    6716         flags |= DragApplicationIsSource;
     6711        flags |= WebCore::DragApplicationIsSource;
    67176712    if ([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagOption)
    6718         flags |= DragApplicationIsCopyKeyDown;
    6719     return static_cast<DragApplicationFlags>(flags);
    6720 }
    6721 
    6722 - (DragDestinationAction)actionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
    6723 {
    6724     return (DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
     6713        flags |= WebCore::DragApplicationIsCopyKeyDown;
     6714    return static_cast<WebCore::DragApplicationFlags>(flags);
     6715}
     6716
     6717- (WebCore::DragDestinationAction)actionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
     6718{
     6719    return (WebCore::DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
    67256720}
    67266721
    67276722- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo
    67286723{
    6729     IntPoint client([draggingInfo draggingLocation]);
    6730     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    6731 
    6732     DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
     6724    WebCore::IntPoint client([draggingInfo draggingLocation]);
     6725    WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window]));
     6726
     6727    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
    67336728    return core(self)->dragController().dragEntered(dragData);
    67346729}
     
    67366731- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo
    67376732{
    6738     Page* page = core(self);
     6733    auto* page = core(self);
    67396734    if (!page)
    67406735        return NSDragOperationNone;
    67416736
    6742     IntPoint client([draggingInfo draggingLocation]);
    6743     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    6744 
    6745     DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
     6737    WebCore::IntPoint client([draggingInfo draggingLocation]);
     6738    WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window]));
     6739
     6740    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
    67466741    return page->dragController().dragUpdated(dragData);
    67476742}
     
    67496744- (void)draggingExited:(id <NSDraggingInfo>)draggingInfo
    67506745{
    6751     Page* page = core(self);
     6746    auto* page = core(self);
    67526747    if (!page)
    67536748        return;
    67546749
    6755     IntPoint client([draggingInfo draggingLocation]);
    6756     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    6757     DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
     6750    WebCore::IntPoint client([draggingInfo draggingLocation]);
     6751    WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window]));
     6752    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
    67586753    page->dragController().dragExited(dragData);
    67596754}
     
    67666761- (BOOL)performDragOperation:(id <NSDraggingInfo>)draggingInfo
    67676762{
    6768     IntPoint client([draggingInfo draggingLocation]);
    6769     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    6770     DragData *dragData = new DragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
     6763    WebCore::IntPoint client([draggingInfo draggingLocation]);
     6764    WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window]));
     6765    auto* dragData = new WebCore::DragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
    67716766
    67726767    NSArray* types = draggingInfo.draggingPasteboard.types;
    6773     if (![types containsObject:WebArchivePboardType] && [types containsObject:legacyFilesPromisePasteboardType()]) {
     6768    if (![types containsObject:WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) {
    67746769       
    67756770        // FIXME: legacyFilesPromisePasteboardType() contains UTIs, not path names. Also, it's not
    67766771        // guaranteed that the count of UTIs equals the count of files, since some clients only write
    67776772        // unique UTIs.
    6778         NSArray *files = [draggingInfo.draggingPasteboard propertyListForType:legacyFilesPromisePasteboardType()];
     6773        NSArray *files = [draggingInfo.draggingPasteboard propertyListForType:WebCore::legacyFilesPromisePasteboardType()];
    67796774        if (![files isKindOfClass:[NSArray class]]) {
    67806775            delete dragData;
     
    69066901static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
    69076902{
    6908     Frame* coreFrame = core(frame);
    6909     CanWrap canWrap = options & WebFindOptionsWrapAround ? CanWrap::Yes : CanWrap::No;
     6903    auto* coreFrame = core(frame);
     6904    WebCore::CanWrap canWrap = options & WebFindOptionsWrapAround ? WebCore::CanWrap::Yes : WebCore::CanWrap::No;
    69106905    return kit((options & WebFindOptionsBackwards)
    69116906        ? coreFrame->tree().traversePrevious(canWrap)
     
    69276922    // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness
    69286923    if ([viewClass class] == [WebHTMLView class])
    6929         MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);
     6924        WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);
    69306925}
    69316926
     
    70087003{
    70097004#if ENABLE(DRAG_SUPPORT)
    7010     if (Page* page = core(self))
    7011         page->dragController().placeDragCaret(IntPoint([self convertPoint:point toView:nil]));
     7005    if (auto* page = core(self))
     7006        page->dragController().placeDragCaret(WebCore::IntPoint([self convertPoint:point toView:nil]));
    70127007#endif
    70137008}
     
    70167011{
    70177012#if ENABLE(DRAG_SUPPORT)
    7018     if (Page* page = core(self))
     7013    if (auto* page = core(self))
    70197014        page->dragController().dragEnded();
    70207015#endif
     
    70907085{
    70917086    WebFrame *mainFrame = [self mainFrame];
    7092     Frame *coreMainFrame = core(mainFrame);
     7087    auto* coreMainFrame = core(mainFrame);
    70937088    if (!coreMainFrame)
    70947089        return nil;
     
    72117206}
    72127207
    7213 constexpr TextCheckingType coreTextCheckingType(NSTextCheckingType type)
     7208constexpr WebCore::TextCheckingType coreTextCheckingType(NSTextCheckingType type)
    72147209{
    72157210    switch (type) {
    72167211    case NSTextCheckingTypeCorrection:
    7217         return TextCheckingType::Correction;
     7212        return WebCore::TextCheckingType::Correction;
    72187213    case NSTextCheckingTypeReplacement:
    7219         return TextCheckingType::Replacement;
     7214        return WebCore::TextCheckingType::Replacement;
    72207215    case NSTextCheckingTypeSpelling:
    7221         return TextCheckingType::Spelling;
     7216        return WebCore::TextCheckingType::Spelling;
    72227217    default:
    7223         return TextCheckingType::None;
    7224     }
    7225 }
    7226 
    7227 static TextCheckingResult textCheckingResultFromNSTextCheckingResult(NSTextCheckingResult *nsResult)
     7218        return WebCore::TextCheckingType::None;
     7219    }
     7220}
     7221
     7222static WebCore::TextCheckingResult textCheckingResultFromNSTextCheckingResult(NSTextCheckingResult *nsResult)
    72287223{
    72297224    NSRange resultRange = nsResult.range;
    72307225
    7231     TextCheckingResult result;
     7226    WebCore::TextCheckingResult result;
    72327227    result.type = coreTextCheckingType(nsResult.resultType);
    72337228    result.location = resultRange.location;
     
    72527247    ASSERT([candidate isKindOfClass:[NSTextCheckingResult class]]);
    72537248
    7254     if (Frame* coreFrame = core(self._selectedOrMainFrame))
     7249    if (auto* coreFrame = core(self._selectedOrMainFrame))
    72557250        coreFrame->editor().client()->handleAcceptedCandidateWithSoftSpaces(textCheckingResultFromNSTextCheckingResult((NSTextCheckingResult *)candidate));
    72567251}
     
    72627257
    72637258    if (isVisible) {
    7264         if (Frame* coreFrame = core([self _selectedOrMainFrame]))
     7259        if (auto* coreFrame = core([self _selectedOrMainFrame]))
    72657260            coreFrame->editor().client()->requestCandidatesForSelection(coreFrame->selection().selection());
    72667261    }
     
    78227817- (BOOL)shouldClose
    78237818{
    7824     Frame* coreFrame = [self _mainCoreFrame];
     7819    auto* coreFrame = [self _mainCoreFrame];
    78257820    if (!coreFrame)
    78267821        return YES;
     
    78297824
    78307825#if !PLATFORM(IOS_FAMILY)
    7831 static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSC::JSValue jsValue)
    7832 {
     7826static NSAppleEventDescriptor* aeDescFromJSValue(JSC::ExecState* exec, JSC::JSValue jsValue)
     7827{
     7828    using namespace JSC;
    78337829    VM& vm = exec->vm();
    78347830    auto scope = DECLARE_CATCH_SCOPE(vm);
     
    78847880- (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)script
    78857881{
    7886     Frame* coreFrame = [self _mainCoreFrame];
     7882    auto* coreFrame = [self _mainCoreFrame];
    78877883    if (!coreFrame)
    78887884        return nil;
     
    78927888    if (!result) // FIXME: pass errors
    78937889        return 0;
    7894     JSLockHolder lock(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec());
    7895     return aeDescFromJSValue(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec(), result);
     7890    JSC::JSLockHolder lock(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec());
     7891    return aeDescFromJSValue(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec(), result);
    78967892}
    78977893#endif
     
    82468242- (DOMRange *)editableDOMRangeForPoint:(NSPoint)point
    82478243{
    8248     Page* page = core(self);
     8244    auto* page = core(self);
    82498245    if (!page)
    82508246        return nil;
    8251     return kit(page->mainFrame().editor().rangeForPoint(IntPoint([self convertPoint:point toView:nil])).get());
     8247    return kit(page->mainFrame().editor().rangeForPoint(WebCore::IntPoint([self convertPoint:point toView:nil])).get());
    82528248}
    82538249
     
    82748270- (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity
    82758271{
    8276     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8272    auto* coreFrame = core([self _selectedOrMainFrame]);
    82778273    if (!coreFrame)
    82788274        return;
     
    82948290- (DOMRange *)selectedDOMRange
    82958291{
    8296     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8292    auto* coreFrame = core([self _selectedOrMainFrame]);
    82978293    if (!coreFrame)
    82988294        return nil;
     
    83028298- (NSSelectionAffinity)selectionAffinity
    83038299{
    8304     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8300    auto* coreFrame = core([self _selectedOrMainFrame]);
    83058301    if (!coreFrame)
    83068302        return NSSelectionAffinityDownstream;
     
    83218317        }
    83228318#endif
    8323         Frame* mainFrame = [self _mainCoreFrame];
     8319        auto* mainFrame = [self _mainCoreFrame];
    83248320        if (mainFrame) {
    83258321            if (flag) {
     
    83428338    // We don't know enough at thls level to pass in a relevant WebUndoAction; we'd have to
    83438339    // change the API to allow this.
    8344     [[self _selectedOrMainFrame] _setTypingStyle:style withUndoAction:EditAction::Unspecified];
     8340    [[self _selectedOrMainFrame] _setTypingStyle:style withUndoAction:WebCore::EditAction::Unspecified];
    83458341}
    83468342
     
    86428638{
    86438639    WebFrame *webFrame = [self _selectedOrMainFrame];
    8644     Frame* coreFrame = core(webFrame);
     8640    auto* coreFrame = core(webFrame);
    86458641    if (coreFrame)
    86468642        coreFrame->editor().deleteSelectionWithSmartDelete([(WebHTMLView *)[[webFrame frameView] documentView] _canSmartCopyOrDelete]);
     
    86528648    // change the API to allow this.
    86538649    WebFrame *webFrame = [self _selectedOrMainFrame];
    8654     if (Frame* coreFrame = core(webFrame)) {
     8650    if (auto* coreFrame = core(webFrame)) {
    86558651        // FIXME: We shouldn't have to make a copy here.
    8656         Ref<MutableStyleProperties> properties(core(style)->copyProperties());
     8652        Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties());
    86578653        coreFrame->editor().applyStyle(properties.ptr());
    86588654    }
     
    87028698- (void)insertDictationPhrases:(NSArray *)dictationPhrases metadata:(id)metadata
    87038699{
    8704     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8700    auto* coreFrame = core([self _selectedOrMainFrame]);
    87058701    if (!coreFrame)
    87068702        return;
     
    87398735- (BOOL)_selectionIsCaret
    87408736{
    8741     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8737    auto* coreFrame = core([self _selectedOrMainFrame]);
    87428738    if (!coreFrame)
    87438739        return NO;
     
    87478743- (BOOL)_selectionIsAll
    87488744{
    8749     Frame* coreFrame = core([self _selectedOrMainFrame]);
     8745    auto* coreFrame = core([self _selectedOrMainFrame]);
    87508746    if (!coreFrame)
    87518747        return NO;
    8752     return coreFrame->selection().isAll(CanCrossEditingBoundary);
     8748    return coreFrame->selection().isAll(WebCore::CanCrossEditingBoundary);
    87538749}
    87548750
    87558751- (void)_simplifyMarkup:(DOMNode *)startNode endNode:(DOMNode *)endNode
    87568752{
    8757     Frame* coreFrame = core([self mainFrame]);
     8753    auto* coreFrame = core([self mainFrame]);
    87588754    if (!coreFrame || !startNode)
    87598755        return;
    8760     Node* coreStartNode= core(startNode);
     8756    auto* coreStartNode= core(startNode);
    87618757    if (&coreStartNode->document() != coreFrame->document())
    87628758        return;
     
    89618957    nsurlCacheDiskCapacity = std::max(nsurlCacheDiskCapacity, [nsurlCache diskCapacity]);
    89628958
    8963     auto& memoryCache = MemoryCache::singleton();
     8959    auto& memoryCache = WebCore::MemoryCache::singleton();
    89648960    memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
    89658961    memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
    89668962
    8967     auto& pageCache = PageCache::singleton();
     8963    auto& pageCache = WebCore::PageCache::singleton();
    89688964    pageCache.setMaxSize(pageCacheSize);
    89698965#if PLATFORM(IOS_FAMILY)
     
    90219017   
    90229018    NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName];
    9023     [pasteboard declareTypes:[NSArray arrayWithObject:legacyStringPasteboardType()] owner:nil];
     9019    [pasteboard declareTypes:[NSArray arrayWithObject:WebCore::legacyStringPasteboardType()] owner:nil];
    90249020    NSMutableString *s = [selectedString mutableCopy];
    90259021    const unichar nonBreakingSpaceCharacter = 0xA0;
    90269022    NSString *nonBreakingSpaceString = [NSString stringWithCharacters:&nonBreakingSpaceCharacter length:1];
    90279023    [s replaceOccurrencesOfString:nonBreakingSpaceString withString:@" " options:0 range:NSMakeRange(0, [s length])];
    9028     [pasteboard setString:s forType:legacyStringPasteboardType()];
     9024    [pasteboard setString:s forType:WebCore::legacyStringPasteboardType()];
    90299025    [s release];
    90309026   
     
    91019097    // Bit 0 is set if user can set the focus to menus, the dock, and various windows using the keyboard.
    91029098    // Bit 1 is set if controls other than text fields are included in the tab order (WebKit also always includes lists).
    9103     _private->_keyboardUIMode = (mode & 0x2) ? KeyboardAccessFull : KeyboardAccessDefault;
     9099    _private->_keyboardUIMode = (mode & 0x2) ? WebCore::KeyboardAccessFull : WebCore::KeyboardAccessDefault;
    91049100#if !PLATFORM(IOS_FAMILY)
    91059101    // check for tabbing to links
    91069102    if ([_private->preferences tabsToLinks])
    9107         _private->_keyboardUIMode = (KeyboardUIMode)(_private->_keyboardUIMode | KeyboardAccessTabsToLinks);
    9108 #endif
    9109 }
    9110 
    9111 - (KeyboardUIMode)_keyboardUIMode
     9103        _private->_keyboardUIMode = (WebCore::KeyboardUIMode)(_private->_keyboardUIMode | WebCore::KeyboardAccessTabsToLinks);
     9104#endif
     9105}
     9106
     9107- (WebCore::KeyboardUIMode)_keyboardUIMode
    91129108{
    91139109    if (!_private->_keyboardUIModeAccessed) {
     
    91369132#endif
    91379133
    9138 - (Frame*)_mainCoreFrame
     9134- (WebCore::Frame*)_mainCoreFrame
    91399135{
    91409136    return (_private && _private->page) ? &_private->page->mainFrame() : 0;
     
    91519147- (void)_clearCredentials
    91529148{
    9153     Frame* frame = [self _mainCoreFrame];
     9149    auto* frame = [self _mainCoreFrame];
    91549150    if (!frame)
    91559151        return;
    91569152
    9157     NetworkingContext* networkingContext = frame->loader().networkingContext();
     9153    auto* networkingContext = frame->loader().networkingContext();
    91589154    if (!networkingContext)
    91599155        return;
     
    92549250- (BOOL)_flushCompositingChanges
    92559251{
    9256     Frame* frame = [self _mainCoreFrame];
     9252    auto* frame = [self _mainCoreFrame];
    92579253    if (frame && frame->view())
    92589254        return frame->view()->flushCompositingStateIncludingSubframes();
     
    92649260- (void)_scheduleLayerFlushForPendingTileCacheRepaint
    92659261{
    9266     Frame* coreFrame = [self _mainCoreFrame];
    9267     if (FrameView* view = coreFrame->view())
     9262    auto* coreFrame = [self _mainCoreFrame];
     9263    if (auto* view = coreFrame->view())
    92689264        view->scheduleLayerFlushAllowingThrottling();
    92699265}
     
    93159311        return false;
    93169312
    9317     HTMLMediaElement* mediaElement = _private->playbackSessionModel->mediaElement();
     9313    auto* mediaElement = _private->playbackSessionModel->mediaElement();
    93189314    if (!mediaElement)
    93199315        return false;
     
    93289324
    93299325    if (!_private->playbackSessionModel)
    9330         _private->playbackSessionModel = PlaybackSessionModelMediaElement::create();
     9326        _private->playbackSessionModel = WebCore::PlaybackSessionModelMediaElement::create();
    93319327    _private->playbackSessionModel->setMediaElement(&mediaElement);
    93329328
    93339329    if (!_private->playbackSessionInterface)
    9334         _private->playbackSessionInterface = PlaybackSessionInterfaceMac::create(*_private->playbackSessionModel);
     9330        _private->playbackSessionInterface = WebCore::PlaybackSessionInterfaceMac::create(*_private->playbackSessionModel);
    93359331
    93369332    [self updateTouchBar];
     
    93839379{
    93849380    WebFrame *webFrame = [self _selectedOrMainFrame];
    9385     Frame* coreFrame = core(webFrame);
     9381    auto* coreFrame = core(webFrame);
    93869382    if (coreFrame)
    93879383        coreFrame->editor().handleAlternativeTextUIResult(text);
     
    93909386
    93919387#if USE(DICTATION_ALTERNATIVES)
    9392 - (void)_getWebCoreDictationAlternatives:(Vector<DictationAlternative>&)alternatives fromTextAlternatives:(const Vector<TextAlternativeWithRange>&)alternativesWithRange
     9388- (void)_getWebCoreDictationAlternatives:(Vector<WebCore::DictationAlternative>&)alternatives fromTextAlternatives:(const Vector<WebCore::TextAlternativeWithRange>&)alternativesWithRange
    93939389{
    93949390    for (size_t i = 0; i < alternativesWithRange.size(); ++i) {
    9395         const TextAlternativeWithRange& alternativeWithRange = alternativesWithRange[i];
     9391        const WebCore::TextAlternativeWithRange& alternativeWithRange = alternativesWithRange[i];
    93969392        uint64_t dictationContext = _private->m_alternativeTextUIController->addAlternatives(alternativeWithRange.alternatives);
    93979393        if (dictationContext)
    9398             alternatives.append(DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext));
     9394            alternatives.append(WebCore::DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext));
    93999395    }
    94009396}
     
    94479443}
    94489444
    9449 - (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo
     9445- (id)_animationControllerForDictionaryLookupPopupInfo:(const WebCore::DictionaryPopupInfo&)dictionaryPopupInfo
    94509446{
    94519447    if (!dictionaryPopupInfo.attributedString)
     
    94549450    [self _prepareForDictionaryLookup];
    94559451
    9456     return DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
    9457         [self _setTextIndicator:textIndicator withLifetime:TextIndicatorWindowLifetime::Permanent];
    9458     }, [self](FloatRect rectInRootViewCoordinates) {
     9452    return WebCore::DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](WebCore::TextIndicator& textIndicator) {
     9453        [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
     9454    }, [self](WebCore::FloatRect rectInRootViewCoordinates) {
    94599455        return [self _convertRectFromRootView:rectInRootViewCoordinates];
    94609456    }, [self]() {
    9461         [self _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     9457        [self _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    94629458    });
    94639459}
     
    94739469}
    94749470
    9475 - (void)_setTextIndicator:(TextIndicator&)textIndicator
    9476 {
    9477     [self _setTextIndicator:textIndicator withLifetime:TextIndicatorWindowLifetime::Permanent];
    9478 }
    9479 
    9480 - (void)_setTextIndicator:(TextIndicator&)textIndicator withLifetime:(TextIndicatorWindowLifetime)lifetime
     9471- (void)_setTextIndicator:(WebCore::TextIndicator&)textIndicator
     9472{
     9473    [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
     9474}
     9475
     9476- (void)_setTextIndicator:(WebCore::TextIndicator&)textIndicator withLifetime:(WebCore::TextIndicatorWindowLifetime)lifetime
    94819477{
    94829478    if (!_private->textIndicatorWindow)
    9483         _private->textIndicatorWindow = makeUnique<TextIndicatorWindow>(self);
     9479        _private->textIndicatorWindow = makeUnique<WebCore::TextIndicatorWindow>(self);
    94849480
    94859481    NSRect textBoundingRectInWindowCoordinates = [self convertRect:[self _convertRectFromRootView:textIndicator.textBoundingRectInRootViewCoordinates()] toView:nil];
     
    94889484}
    94899485
    9490 - (void)_clearTextIndicatorWithAnimation:(TextIndicatorWindowDismissalAnimation)animation
     9486- (void)_clearTextIndicatorWithAnimation:(WebCore::TextIndicatorWindowDismissalAnimation)animation
    94919487{
    94929488    if (_private->textIndicatorWindow)
    9493         _private->textIndicatorWindow->clearTextIndicator(TextIndicatorWindowDismissalAnimation::FadeOut);
     9489        _private->textIndicatorWindow->clearTextIndicator(WebCore::TextIndicatorWindowDismissalAnimation::FadeOut);
    94949490    _private->textIndicatorWindow = nullptr;
    94959491}
     
    95159511}
    95169512
    9517 - (void)_showDictionaryLookupPopup:(const DictionaryPopupInfo&)dictionaryPopupInfo
     9513- (void)_showDictionaryLookupPopup:(const WebCore::DictionaryPopupInfo&)dictionaryPopupInfo
    95189514{
    95199515    if (!dictionaryPopupInfo.attributedString)
     
    95229518    [self _prepareForDictionaryLookup];
    95239519
    9524     DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
    9525         [self _setTextIndicator:textIndicator withLifetime:TextIndicatorWindowLifetime::Permanent];
    9526     }, [self](FloatRect rectInRootViewCoordinates) {
     9520    WebCore::DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](WebCore::TextIndicator& textIndicator) {
     9521        [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent];
     9522    }, [self](WebCore::FloatRect rectInRootViewCoordinates) {
    95279523        return [self _convertRectFromRootView:rectInRootViewCoordinates];
    95289524    }, [weakSelf = WeakObjCPtr<WebView>(self)]() {
    9529         [weakSelf.get() _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     9525        [weakSelf.get() _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    95309526    });
    95319527}
     
    95349530- (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
    95359531{
    9536     [self _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::FadeOut];
     9532    [self _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut];
    95379533}
    95389534#endif // ENABLE(REVEAL)
     
    95459541#if PLATFORM(MAC)
    95469542    double minimumFontSize = _private->page ? _private->page->settings().minimumFontSize() : 0;
    9547     _private->formValidationBubble = ValidationBubble::create(self, message, { minimumFontSize });
    9548     _private->formValidationBubble->showRelativeTo(enclosingIntRect([self _convertRectFromRootView:anchorRect]));
     9543    _private->formValidationBubble = WebCore::ValidationBubble::create(self, message, { minimumFontSize });
     9544    _private->formValidationBubble->showRelativeTo(WebCore::enclosingIntRect([self _convertRectFromRootView:anchorRect]));
    95499545#else
    95509546    UNUSED_PARAM(message);
     
    97129708- (NSTouchBar *)textTouchBar
    97139709{
    9714     Frame* coreFrame = core([self _selectedOrMainFrame]);
     9710    auto* coreFrame = core([self _selectedOrMainFrame]);
    97159711    if (!coreFrame)
    97169712        return nil;
     
    97229718}
    97239719
    9724 static NSTextAlignment nsTextAlignmentFromRenderStyle(const RenderStyle* style)
     9720static NSTextAlignment nsTextAlignmentFromRenderStyle(const WebCore::RenderStyle* style)
    97259721{
    97269722    NSTextAlignment textAlignment;
    97279723    switch (style->textAlign()) {
    9728     case TextAlignMode::Right:
    9729     case TextAlignMode::WebKitRight:
     9724    case WebCore::TextAlignMode::Right:
     9725    case WebCore::TextAlignMode::WebKitRight:
    97309726        textAlignment = NSTextAlignmentRight;
    97319727        break;
    9732     case TextAlignMode::Left:
    9733     case TextAlignMode::WebKitLeft:
     9728    case WebCore::TextAlignMode::Left:
     9729    case WebCore::TextAlignMode::WebKitLeft:
    97349730        textAlignment = NSTextAlignmentLeft;
    97359731        break;
    9736     case TextAlignMode::Center:
    9737     case TextAlignMode::WebKitCenter:
     9732    case WebCore::TextAlignMode::Center:
     9733    case WebCore::TextAlignMode::WebKitCenter:
    97389734        textAlignment = NSTextAlignmentCenter;
    97399735        break;
    9740     case TextAlignMode::Justify:
     9736    case WebCore::TextAlignMode::Justify:
    97419737        textAlignment = NSTextAlignmentJustified;
    97429738        break;
    9743     case TextAlignMode::Start:
     9739    case WebCore::TextAlignMode::Start:
    97449740        textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentLeft : NSTextAlignmentRight;
    97459741        break;
    9746     case TextAlignMode::End:
     9742    case WebCore::TextAlignMode::End:
    97479743        textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentRight : NSTextAlignmentLeft;
    97489744        break;
     
    97569752- (void)updateTextTouchBar
    97579753{
     9754    using namespace WebCore;
    97589755    BOOL touchBarsRequireInitialization = !_private->_richTextTouchBar || !_private->_plainTextTouchBar;
    97599756    if (_private->_isDeferringTextTouchBarUpdates && !touchBarsRequireInitialization) {
     
    97709767        return;
    97719768
    9772     Frame* coreFrame = core([self _selectedOrMainFrame]);
     9769    auto* coreFrame = core([self _selectedOrMainFrame]);
    97739770    if (!coreFrame)
    97749771        return;
     
    98959892        return;
    98969893
    9897     Frame* coreFrame = core([self _selectedOrMainFrame]);
     9894    auto* coreFrame = core([self _selectedOrMainFrame]);
    98989895    if (!coreFrame)
    98999896        return;
     
    99479944- (NSCandidateListTouchBarItem *)candidateList
    99489945{
    9949     Frame* coreFrame = core([self _selectedOrMainFrame]);
     9946    auto* coreFrame = core([self _selectedOrMainFrame]);
    99509947    if (!coreFrame)
    99519948        return nil;
     
    1003310030#if ENABLE(GEOLOCATION)
    1003410031    if (_private && _private->page) {
    10035         auto geolocatioError = GeolocationError::create(GeolocationError::PositionUnavailable, errorMessage);
     10032        auto geolocatioError = WebCore::GeolocationError::create(WebCore::GeolocationError::PositionUnavailable, errorMessage);
    1003610033        WebCore::GeolocationController::from(_private->page)->errorOccurred(geolocatioError.get());
    1003710034    }
     
    1004310040{
    1004410041#if ENABLE(GEOLOCATION)
    10045     Frame* frame = [self _mainCoreFrame];
     10042    auto* frame = [self _mainCoreFrame];
    1004610043    if (frame)
    1004710044        frame->resetAllGeolocationPermission();
     
    1009010087        return 0;
    1009110088    JSContextRef context = [[self mainFrame] globalContext];
    10092     auto* notification = JSNotification::toWrapped(toJS(context)->vm(), toJS(toJS(context), jsNotification));
    10093     return static_cast<WebNotificationClient*>(NotificationController::clientFrom(*page))->notificationIDForTesting(notification);
     10089    auto* notification = WebCore::JSNotification::toWrapped(toJS(context)->vm(), toJS(toJS(context), jsNotification));
     10090    return static_cast<WebNotificationClient*>(WebCore::NotificationController::clientFrom(*page))->notificationIDForTesting(notification);
    1009410091#else
    1009510092    return 0;
  • trunk/Source/WebKitLegacy/scripts/generate-unified-sources.sh

    r247570 r250549  
    1616
    1717UnifiedSourceCppFileCount=5
    18 UnifiedSourceMmFileCount=18
     18UnifiedSourceMmFileCount=20
    1919
    2020if [ $# -eq 0 ]; then
Note: See TracChangeset for help on using the changeset viewer.