WebKit-https.git
13 months agoUpdate availability annotations to match the macOS and iOS SDKs in the Xcode 10 GM...
mitz@apple.com [Thu, 13 Sep 2018 00:14:22 +0000 (00:14 +0000)]
Update availability annotations to match the macOS and iOS SDKs in the Xcode 10 GM seed
https://bugs.webkit.org/show_bug.cgi?id=189561

Reviewed by Tim Horton.

Changed WK_MAC_TBA and WK_IOS_TBA to 10.14 and 12.0, respectively, in all declarations that
appear in the GM seed SDKs.

* Shared/API/Cocoa/_WKRenderingProgressEvents.h:
* UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/API/Cocoa/_WKAttachment.h:
* UIProcess/API/Cocoa/_WKAutomationDelegate.h:
* UIProcess/API/Cocoa/_WKAutomationSession.h:
* UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
* UIProcess/API/Cocoa/_WKFormInputSession.h:
* UIProcess/API/Cocoa/_WKInputDelegate.h:
* UIProcess/API/Cocoa/_WKLinkIconParameters.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:

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

13 months agoHeader parsing for experimental and internal debug features
dino@apple.com [Wed, 12 Sep 2018 23:47:37 +0000 (23:47 +0000)]
Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Fix failing tests by explicitly turning off Web Animations for CSS animations.
Previously the test system was doing this, even though the feature was
supposed to be enabled.

* legacy-animation-engine/*.html:

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

13 months agoUnreviewed GTK test gardening.
aboya@igalia.com [Wed, 12 Sep 2018 23:34:56 +0000 (23:34 +0000)]
Unreviewed GTK test gardening.

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

13 months agoUnreviewed, rebaseline imported/w3c/web-platform-tests/url/failure.html after r235808.
cdumez@apple.com [Wed, 12 Sep 2018 23:19:49 +0000 (23:19 +0000)]
Unreviewed, rebaseline imported/w3c/web-platform-tests/url/failure.html after r235808.

New checks are passing.

* web-platform-tests/url/failure-expected.txt:

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

13 months agoFix an internal build after r235935
achristensen@apple.com [Wed, 12 Sep 2018 22:47:26 +0000 (22:47 +0000)]
Fix an internal build after r235935
https://bugs.webkit.org/show_bug.cgi?id=188996

* Carbon/HIWebView.mm:
(Draw):
r235935 fixed a mismatched macro with deprecated functions below it.  To quickly fix the build, I'm just going to restore the imbalance.

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

13 months agoimported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits...
rniwa@webkit.org [Wed, 12 Sep 2018 22:36:51 +0000 (22:36 +0000)]
imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion
https://bugs.webkit.org/show_bug.cgi?id=189493

Reviewed by Alex Christensen.

Source/WebCore:

The debug assertion was caused by RefPtr in FormAssociatedElement::formOwnerRemovedFromTree introduced
by r224390 and r223644 ref'ing ShadowRoot while calling removeDetachedChildren inside ~ShadowRoot.
When a form (or any other) element has more than one ref inside removeDetachedChildren,
addChildNodesToDeletionQueue calls notifyChildNodeRemoved in the tree oreder.

However, when a form associated element of this form element appears later in the tree order,
FormAssociatedElement::formOwnerRemovedFromTree can traverse up ancestors including the ShadowRoot.

Fixed the bug by using raw pointers instead. Luckily, there is no DOM mutations or other non-trivial
operations happening in this function so this should be safe.

Test: imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formOwnerRemovedFromTree): Fixed the bug.

LayoutTests:

Unskip the test now that it doesn't hit a debug assertion.

* TestExpectations:

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

13 months ago[Cocoa] Complete support for Paste as Quotation
mitz@apple.com [Wed, 12 Sep 2018 22:26:12 +0000 (22:26 +0000)]
[Cocoa] Complete support for Paste as Quotation
https://bugs.webkit.org/show_bug.cgi?id=189504

Reviewed by Wenson Hsieh.

Source/WebCore:

Tests: editing/pasteboard/4930986-1-paste-as-quotation.html
       editing/pasteboard/4930986-2-paste-as-quotation.html
       editing/pasteboard/4930986-3-paste-as-quotation.html

* editing/Editor.cpp:
  Added ClipboardEventKind::PasteAsQuotation.
(WebCore::eventNameForClipboardEvent): Map PasteAsQuotation to the "paste" DOM event name.
(WebCore::createDataTransferForClipboardEvent): Place the unquoted content in the event.
  This means that currently event handlers can’t emulate pasting as quotation, because they
  neither have the quoted content nor knowledge that quoting has been requested. We could
  change this in the future if needed.
(WebCore::Editor::paste): Updated for change in pasteWithPasteboard’s argument type.
(WebCore::Editor::pasteAsQuotation): Added. Similar to paste, but passes
  PasteOption::AsQuotation to pasteWithPasteboard.
(WebCore::Editor::quoteFragmentForPasting): Added. Quoting for pasting consists of enclosing
  the fragment in a blockquote element with the "type" attribute set to "cite" and the
  "class" attribute set to a well-known value, which is used to trigger special behavior in
  ReplaceSelectionCommand. The behavior includes removing the "class" attribute in the end,
  so eventually, we could stop using this form of in-band signaling.
* editing/Editor.h: Declared PasteOption enum class to encompass the existing allowPlainText
  and MailBlockquoteHandling arguments to pasteWithPasteboard as well as the new AsQuotation
  behavior.

* editing/EditorCommand.cpp:
(WebCore::executePasteAsQuotation): Added. Similar to executing Paste.
(WebCore::createCommandMap): Added an entry for PasteAsQuotation, based on the Paste entry.

* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::webContentFromPasteboard): Moved from EditorIOS.mm and EditorMac.mm to
  here.

* editing/gtk/EditorGtk.cpp:
(WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
  quote the fragment if needed.

* editing/ios/EditorIOS.mm:
(WebCore::Editor::pasteWithPasteboard): Ditto.
(WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.

* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
  quote the fragment if needed.
(WebCore::Editor::readSelectionFromPasteboard): Updated for new OptionSet argument to
  pasteWithPasteboard.
(WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.

* editing/win/EditorWin.cpp:
(WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
  quote the fragment if needed.

* editing/wpe/EditorWPE.cpp:
(WebCore::Editor::pasteWithPasteboard): Ditto.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView canPerformAction:withSender:]): Handle _pasteAsQuotation:. It’s not included
  in FOR_EACH_WKCONTENTVIEW_ACTION, because it’s declared and implemented in the WKPrivate
  category. If we add more actions in the category, it could make sense to fold them into
  a new FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION.
(-[WKWebView targetForAction:withSender:]): Handle _pasteAsQuotation:.
(-[WKWebView _pasteAsQuotation:]): Send to the WebViewImpl or the WKContentView.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared a new _pasteAsQuotation: action.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::selectorExceptionMap): Added a custom mapping from the new selector to the
  PasteAsQuotation command.

* UIProcess/ios/WKContentViewInteraction.h: Declare methods for the new action.
* UIProcess/ios/WKContentViewInteraction.mm:
  Forward _pasteAsQuotation: to the WKWebView so that clients get a chance to override its
  behavior.
(-[WKContentView _pasteAsQuotationForWebView:]): Send the command to the page.

Tools:

* MiniBrowser/mac/MainMenu.xib: Added a Paste as Quotation command in the Edit menu.

LayoutTests:

Took a few existing tests of the Paste as Quotation behavior and modified them to use the
new PasteAsQuotation command. The only difference in the results is that the blockquote has
the "type" attribute set to "cite".

* editing/pasteboard/4930986-1-paste-as-quotation-expected.txt: Added.
* editing/pasteboard/4930986-1-paste-as-quotation.html: Added.
* editing/pasteboard/4930986-2-paste-as-quotation-expected.txt: Added.
* editing/pasteboard/4930986-2-paste-as-quotation.html: Added.
* editing/pasteboard/4930986-3-paste-as-quotation-expected.txt: Added.
* editing/pasteboard/4930986-3-paste-as-quotation.html: Added.

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

13 months agoMove IndexedDB to Network Process
sihui_liu@apple.com [Wed, 12 Sep 2018 22:16:45 +0000 (22:16 +0000)]
Move IndexedDB to Network Process
https://bugs.webkit.org/show_bug.cgi?id=189415

Reviewed by Geoffrey Garen.

Source/WebKit:

We are going to eliminate storage process and move its functionality to network process.
The reasons why we want to do this:
1. Lower resource usage of having an additional process for storage operations, especially
memory. Single storage process takes about 5MB memory on macOS.
2. Reduce latency of Service Workers. After enabling Service Workers, we've seen
regression in app launch. The launch time of storage process is partly attributed to this:
Service Workers delay page loading until receiving response from storage process.
3. We choose network process because UI process may have broader access in file system
that we don't want the storage operations to have.

This patch is the first piece towards the goal. It mainly moves indexedDB from storage process
to corresponding components of network process. Moving of Service Worker and stopping to
launch storage process will be done in following patches.

We expect to see the higher cpu and memory usage of network process as it is taking more work,
but the overall gain in memory and latency after we completely remove storage process should be
positive.

* CMakeLists.txt:
* DerivedSources.make:

* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp.
(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::messageSenderConnection):
(WebKit::WebIDBConnectionToClient::connectionToClient):
(WebKit::WebIDBConnectionToClient::didDeleteDatabase):
(WebKit::WebIDBConnectionToClient::didOpenDatabase):
(WebKit::WebIDBConnectionToClient::didAbortTransaction):
(WebKit::WebIDBConnectionToClient::didCommitTransaction):
(WebKit::WebIDBConnectionToClient::didCreateObjectStore):
(WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
(WebKit::WebIDBConnectionToClient::didRenameObjectStore):
(WebKit::WebIDBConnectionToClient::didClearObjectStore):
(WebKit::WebIDBConnectionToClient::didCreateIndex):
(WebKit::WebIDBConnectionToClient::didDeleteIndex):
(WebKit::WebIDBConnectionToClient::didRenameIndex):
(WebKit::WebIDBConnectionToClient::didPutOrAdd):
(WebKit::WebIDBConnectionToClient::handleGetResult):
(WebKit::WebIDBConnectionToClient::didGetRecord):
(WebKit::WebIDBConnectionToClient::didGetAllRecords):
(WebKit::WebIDBConnectionToClient::didGetCount):
(WebKit::WebIDBConnectionToClient::didDeleteRecord):
(WebKit::WebIDBConnectionToClient::didOpenCursor):
(WebKit::WebIDBConnectionToClient::didIterateCursor):
(WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::didStartTransaction):
(WebKit::WebIDBConnectionToClient::didCloseFromServer):
(WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
(WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h.
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):

Code moved from StorageToWebProcessConnection::didReceiveMessage.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

Network process receives and stores sandbox extension of temporary files for later indexedDB
use.

(WebKit::generateIDBConnectionToServerIdentifier):
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
(WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::idbServer):
(WebKit::NetworkProcess::ensurePathExists):
(WebKit::NetworkProcess::postStorageTask):
(WebKit::NetworkProcess::performNextStorageTask):
(WebKit::NetworkProcess::prepareForAccessToTemporaryFile):
(WebKit::NetworkProcess::accessToTemporaryFileComplete):
(WebKit::NetworkProcess::indexedDatabaseOrigins):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):

Instead of asking UI process to grant sandbox extension to storage process, now network
process just asks for sandbox extension fot itself.

(WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions):
(WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
(WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted.
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::queue):
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* Shared/Storage/StorageProcessCreationParameters.cpp:
(WebKit::StorageProcessCreationParameters::encode const):
(WebKit::StorageProcessCreationParameters::decode):
* Shared/Storage/StorageProcessCreationParameters.h:
* Shared/WebsiteDataStoreParameters.cpp:
(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::privateSessionParameters):
* Shared/WebsiteDataStoreParameters.h:
* Sources.txt:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::idbServer): Deleted.
(WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted.
(WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted.
(WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted.
(WebKit::StorageProcess::indexedDatabaseOrigins): Deleted.
(WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted.
(WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted.
* StorageProcess/StorageProcess.h:
(WebKit::StorageProcess::queue): Deleted.
* StorageProcess/StorageProcess.messages.in:
* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::didReceiveMessage):
(WebKit::StorageToWebProcessConnection::didClose):
(WebKit::generateIDBConnectionToServerIdentifier): Deleted.
(WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted.
(WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted.
* StorageProcess/StorageToWebProcessConnection.h:
* StorageProcess/StorageToWebProcessConnection.messages.in:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted.
* UIProcess/Storage/StorageProcessProxy.h:
* UIProcess/Storage/StorageProcessProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataFetch):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::storageProcessParameters):
(WebKit::WebsiteDataStore::parameters):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::messageSenderConnection):
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::idbConnectionToServerForSession):
* WebProcess/Network/NetworkProcessConnection.h:
(WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier):
* WebProcess/Storage/WebToStorageProcessConnection.cpp:
(WebKit::WebToStorageProcessConnection::didReceiveMessage):

Code moved from WebToStorageProcessConnection::didReceiveMessage.

(WebKit::WebToStorageProcessConnection::didClose):
(WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted.
* WebProcess/Storage/WebToStorageProcessConnection.h:
(WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::webToStorageProcessConnectionClosed):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
(TEST):

LayoutTests:

* storage/indexeddb/modern/opendatabase-after-storage-crash.html:

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

13 months agoMake GraphicsLayers ref-counted, so their tree can persist when disconnected from...
simon.fraser@apple.com [Wed, 12 Sep 2018 21:27:07 +0000 (21:27 +0000)]
Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
https://bugs.webkit.org/show_bug.cgi?id=189521

Reviewed by Tim Horton.
Source/WebCore:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

All the other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

No behavior change.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):
(WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
(WebCore::PageOverlayController::didChangeViewSize):
(WebCore::PageOverlayController::didChangeDocumentSize):
(WebCore::PageOverlayController::didChangeSettings):
(WebCore::PageOverlayController::paintContents):
(WebCore::PageOverlayController::didChangeOverlayFrame):
(WebCore::PageOverlayController::didChangeOverlayBackgroundColor):
* page/PageOverlayController.h:
* page/mac/ServicesOverlayController.h:
(WebCore::ServicesOverlayController::Highlight::layer const):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::invalidate):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
(WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
(WebCore::ServicesOverlayController::determineActiveHighlight):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::setChildren):
(WebCore::GraphicsLayer::addChild):
(WebCore::GraphicsLayer::addChildAtIndex):
(WebCore::GraphicsLayer::addChildBelow):
(WebCore::GraphicsLayer::addChildAbove):
(WebCore::GraphicsLayer::replaceChild):
(WebCore::GraphicsLayer::removeAllChildren):
(WebCore::GraphicsLayer::removeFromParent):
(WebCore::GraphicsLayer::setMaskLayer):
(WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
(WebCore::GraphicsLayer::distributeOpacity):
(WebCore::GraphicsLayer::traverse):
(WebCore::dumpChildren):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::children const):
(WebCore::GraphicsLayer::children):
(WebCore::GraphicsLayer::maskLayer const):
(WebCore::GraphicsLayer::replicaLayer const):
(WebCore::GraphicsLayer::beingDestroyed const):
(WebCore::GraphicsLayer:: const): Deleted.
* platform/graphics/GraphicsLayerFactory.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::setChildren):
(WebCore::GraphicsLayerCA::addChild):
(WebCore::GraphicsLayerCA::addChildAtIndex):
(WebCore::GraphicsLayerCA::addChildBelow):
(WebCore::GraphicsLayerCA::addChildAbove):
(WebCore::GraphicsLayerCA::replaceChild):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::setChildren):
(WebCore::GraphicsLayerTextureMapper::addChild):
(WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
(WebCore::GraphicsLayerTextureMapper::addChildAbove):
(WebCore::GraphicsLayerTextureMapper::addChildBelow):
(WebCore::GraphicsLayerTextureMapper::replaceChild):
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::addChild):
(WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
(WebCore::CoordinatedGraphicsLayer::addChildAbove):
(WebCore::CoordinatedGraphicsLayer::addChildBelow):
(WebCore::CoordinatedGraphicsLayer::replaceChild):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/win/GraphicsLayerDirect2D.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::initialize): Deleted.
(WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateInternalHierarchy):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::setCompositingParent):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
* rendering/RenderLayerCompositor.h:

Source/WebKit:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

All the other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::showPaintRect):
(WebKit::WebInspectorClient::animationEndedForLayer):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

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

13 months agoPSON: No process swap on back navigation after URL bar navigation
cdumez@apple.com [Wed, 12 Sep 2018 21:23:40 +0000 (21:23 +0000)]
PSON: No process swap on back navigation after URL bar navigation
https://bugs.webkit.org/show_bug.cgi?id=189557
<rdar://problem/44353108>

Reviewed by Alex Christensen.

Source/WebKit:

Our logic in WebProcessPool::processForNavigationInternal() was wrongly using
WebBackForwardList::currentItem() as source item of the navigation, instead of
using Navigation::fromItem(). In case of back navigation, by the time
processForNavigation() is called, the WebBackForwardList's currentItem has already
been updated to be the target item, via a Sync IPC from the WebProcess. As a result,
the source and target items would be the same in the following check:
` if (currentItem->itemID().processIdentifier == backForwardListItem->itemID().processIdentifier)`

This would cause us to reuse the same process incorrectly. Our existing API test coverage
did not catch this because our target HistoryItem usually has a SuspendedPage and we decide
to use the SuspendedPage's process a few lines above in WebProcessPool::processForNavigationInternal().

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

13 months agoMake IPC::SharedBufferDataReference a type that decodes into but does not inherit...
commit-queue@webkit.org [Wed, 12 Sep 2018 21:22:16 +0000 (21:22 +0000)]
Make IPC::SharedBufferDataReference a type that decodes into but does not inherit from IPC::DataReference
https://bugs.webkit.org/show_bug.cgi?id=189519

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-12
Reviewed by Chris Dumez.

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBuffer):
* Platform/IPC/DataReference.cpp:
(IPC::SharedBufferDataReference::encode const): Deleted.
* Platform/IPC/DataReference.h:
(IPC::SharedBufferDataReference::SharedBufferDataReference): Deleted.
* Platform/IPC/HandleMessage.h:
* Platform/IPC/SharedBufferDataReference.h: Added.
(IPC::SharedBufferDataReference::SharedBufferDataReference):
(IPC::SharedBufferDataReference::encode const):
* Scripts/webkit/messages.py:
* Shared/API/APIData.h:
* StorageProcess/StorageProcess.messages.in:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::didReceiveData):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::storeDerivedDataToCache):
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerAttachmentIdentifier):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getContentsAsMHTMLData):
(WebKit::WebPage::getSelectionAsWebArchiveData):
(WebKit::WebPage::getMainResourceDataOfFrame):
(WebKit::WebPage::getResourceDataFromFrame):
(WebKit::WebPage::getWebArchiveOfFrame):
(WebKit::WebPage::drawPagesToPDF):
* WebProcess/WebPage/WebPage.messages.in:

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

13 months agoUpdated svn:ignore after r235381.
mitz@apple.com [Wed, 12 Sep 2018 21:21:27 +0000 (21:21 +0000)]
Updated svn:ignore after r235381.

* .: Added LocalOverrides.xcconfig to svn:ignore.

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

13 months agoExpose fewer of URL's internal members
commit-queue@webkit.org [Wed, 12 Sep 2018 21:01:05 +0000 (21:01 +0000)]
Expose fewer of URL's internal members
https://bugs.webkit.org/show_bug.cgi?id=189528

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-12
Reviewed by Chris Dumez.

* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::urlHostHash):
* platform/URL.cpp:
(WebCore::URL::hostStart const):
(WebCore::protocolHostAndPortAreEqual):
(WebCore::hostsAreEqual):
* platform/URL.h:
(WebCore::URL::hostStart const): Deleted.
(WebCore::URL::hostEnd const): Deleted.

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

13 months agoHeader parsing for experimental and internal debug features
dino@apple.com [Wed, 12 Sep 2018 20:59:33 +0000 (20:59 +0000)]
Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Reviewed by Tim Horton.

LayoutTests/imported/mozilla:

New webkit-test-runner headers.

* css-animations/test_animation-cancel.html:
* css-animations/test_animation-computed-timing.html:
* css-animations/test_animation-currenttime.html:
* css-animations/test_animation-finish.html:
* css-animations/test_animation-finished.html:
* css-animations/test_animation-id.html:
* css-animations/test_animation-pausing.html:
* css-animations/test_animation-playstate.html:
* css-animations/test_animation-ready.html:
* css-animations/test_animation-reverse.html:
* css-animations/test_animation-starttime.html:
* css-animations/test_animations-dynamic-changes.html:
* css-animations/test_cssanimation-animationname.html:
* css-animations/test_document-get-animations.html:
* css-animations/test_effect-target.html:
* css-animations/test_element-get-animations.html:
* css-animations/test_event-dispatch.html:
* css-animations/test_event-order.html:
* css-animations/test_keyframeeffect-getkeyframes.html:
* css-animations/test_pseudoElement-get-animations.html:
* css-animations/test_setting-effect.html:
* css-transitions/test_animation-cancel.html:
* css-transitions/test_animation-computed-timing.html:
* css-transitions/test_animation-currenttime.html:
* css-transitions/test_animation-finished.html:
* css-transitions/test_animation-pausing.html:
* css-transitions/test_animation-ready.html:
* css-transitions/test_animation-starttime.html:
* css-transitions/test_csstransition-transitionproperty.html:
* css-transitions/test_document-get-animations.html:
* css-transitions/test_effect-target.html:
* css-transitions/test_element-get-animations.html:
* css-transitions/test_event-dispatch.html:
* css-transitions/test_keyframeeffect-getkeyframes.html:
* css-transitions/test_pseudoElement-get-animations.html:
* css-transitions/test_setting-effect.html:

LayoutTests/imported/w3c:

New webkit-test-runner headers.

* web-platform-tests/css-timing-1/frames-timing-functions-output.html:
* web-platform-tests/media-source/mediasource-changetype-play.html:
* web-platform-tests/media-source/mediasource-changetype.html:
* web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context.html:
* web-platform-tests/web-animations/interfaces/Animatable/animate.html:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/current-time.html:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html:

Source/WebKit:

Provide key-based (string) access to experimental and internal features.

* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetExperimentalFeatureForKey):
(WKPreferencesResetAllInternalDebugFeatures):
(WKPreferencesSetInternalDebugFeatureForKey):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPreferences.h:

Tools:

Keep track of experimental and internal debug features in TestOptions, and
allow webkit-test-runner headers to toggle them by name.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

New webkit-test-runner headers.

* animations/3d/matrix-transform-type-animation.html:
* animations/3d/replace-filling-transform.html:
* animations/3d/transform-origin-vs-functions.html:
* animations/3d/transform-perspective.html:
* animations/additive-transform-animations.html:
* animations/animation-border-overflow.html:
* animations/animation-callback-timestamp.html:
* animations/animation-controller-drt-api.html:
* animations/animation-direction-alternate-reverse.html:
* animations/animation-direction-reverse-fill-mode-hardware.html:
* animations/animation-direction-reverse-hardware-opacity.html:
* animations/animation-direction-reverse-hardware.html:
* animations/animation-direction-reverse-non-hardware.html:
* animations/animation-direction-reverse-timing-functions-hardware.html:
* animations/animation-direction-reverse-timing-functions.html:
* animations/animation-direction.html:
* animations/animation-followed-by-transition.html:
* animations/animation-hit-test-transform.html:
* animations/animation-hit-test.html:
* animations/animation-internals-api-multiple-keyframes.html:
* animations/animation-internals-api.html:
* animations/animation-offscreen-to-onscreen.html:
* animations/animation-playstate-paused-style-resolution.html:
* animations/big-rotation.html:
* animations/change-completed-animation-transform.html:
* animations/change-keyframes.html:
* animations/combo-transform-rotate+scale.html:
* animations/cross-fade-background-image.html:
* animations/cross-fade-border-image-source.html:
* animations/cross-fade-list-style-image.html:
* animations/cross-fade-webkit-mask-box-image.html:
* animations/duplicate-keys-expected.html:
* animations/duplicate-keys.html:
* animations/duplicated-keyframes-name.html:
* animations/fill-forwards-end-state.html:
* animations/fill-mode-forwards-zero-duration.html:
* animations/fill-mode-removed.html:
* animations/font-variations/font-stretch.html:
* animations/font-variations/font-style.html:
* animations/font-variations/font-variation-settings-order.html:
* animations/font-variations/font-variation-settings-unlike.html:
* animations/font-variations/font-variation-settings.html:
* animations/font-variations/font-weight.html:
* animations/generic-from-to.html:
* animations/import.html:
* animations/keyframe-multiple-timing-functions-transform.html:
* animations/keyframe-timing-functions-transform.html:
* animations/keyframe-timing-functions.html:
* animations/keyframe-timing-functions2.html:
* animations/keyframes-comma-separated.html:
* animations/keyframes-dynamic.html:
* animations/keyframes-infinite-iterations.html:
* animations/keyframes-invalid-keys.html:
* animations/keyframes-out-of-order.html:
* animations/keyframes.html:
* animations/leak-document-with-css-animation.html:
* animations/lineheight-animation.html:
* animations/longhand-timing-function.html:
* animations/matrix-anim.html:
* animations/missing-from-to-transforms.html:
* animations/missing-from-to.html:
* animations/missing-keyframe-properties-repeating.html:
* animations/missing-keyframe-properties-timing-function.html:
* animations/missing-keyframe-properties.html:
* animations/missing-values-first-keyframe.html:
* animations/missing-values-last-keyframe.html:
* animations/multiple-animations-timing-function.html:
* animations/multiple-animations.html:
* animations/multiple-keyframes.html:
* animations/negative-delay.html:
* animations/pause-crash.html:
* animations/play-state-start-paused.html:
* animations/resources/animation-leak-iframe.html:
* animations/simultaneous-start-left.html:
* animations/simultaneous-start-transform.html:
* animations/spring-function.html:
* animations/stacking-context-unchanged-while-running.html:
* animations/timing-functions.html:
* animations/transition-and-animation-1.html:
* animations/transition-and-animation-2.html:
* animations/transition-and-animation-3.html:
* animations/trigger-container-scroll-boundaries.html:
* animations/trigger-container-scroll-empty.html:
* animations/trigger-container-scroll-simple.html:
* animations/unanimated-style.html:
* animations/unprefixed-keyframes.html:
* animations/width-using-ems.html:
* compositing/animation/animated-composited-inside-hidden.html:
* compositing/animation/computed-style-during-delay.html:
* compositing/animation/layer-for-filling-animation.html:
* compositing/backing/backface-visibility-flip.html:
* compositing/backing/transform-transition-from-outside-view.html:
* compositing/contents-scale/animating.html:
* compositing/layer-creation/animation-overlap-with-children.html:
* compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html:
* compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html:
* compositing/layer-creation/mismatched-transform-transition-overlap.html:
* compositing/layer-creation/multiple-keyframes-animation-overlap.html:
* compositing/layer-creation/overlap-animation-clipping.html:
* compositing/layer-creation/overlap-animation-container.html:
* compositing/layer-creation/overlap-animation.html:
* compositing/layer-creation/scale-rotation-animation-overlap.html:
* compositing/layer-creation/scale-rotation-transition-overlap.html:
* compositing/layer-creation/translate-animation-overlap.html:
* compositing/layer-creation/translate-scale-animation-overlap.html:
* compositing/layer-creation/translate-scale-transition-overlap.html:
* compositing/layer-creation/translate-transition-overlap.html:
* compositing/overflow/overflow-positioning.html:
* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* compositing/reflections/nested-reflection-transition.html:
* compositing/transitions/scale-transition-no-start.html:
* compositing/transitions/singular-scale-transition.html:
* compositing/visible-rect/animated-from-none.html:
* compositing/visible-rect/animated.html:
* css3/calc/transitions-dependent.html:
* css3/calc/transitions.html:
* css3/filters/backdrop/animation.html:
* css3/filters/composited-during-animation.html:
* css3/filters/filter-animation-from-none-hw.html:
* css3/filters/filter-animation-from-none-multi-hw.html:
* css3/filters/filter-animation-from-none-multi.html:
* css3/filters/filter-animation-from-none.html:
* css3/filters/filter-animation-hw.html:
* css3/filters/filter-animation-multi-hw.html:
* css3/filters/filter-animation-multi.html:
* css3/filters/filter-animation.html:
* css3/masking/clip-path-animation.html:
* fast/animation/css-animation-resuming-when-visible-with-style-change.html:
* fast/animation/css-animation-resuming-when-visible.html:
* fast/animation/css-animation-throttling-lowPowerMode.html:
* fast/animation/height-auto-transition-computed-value.html:
* fast/css-generated-content/pseudo-animation.html:
* fast/css-generated-content/pseudo-transition.html:
* fast/filter-image/filter-image-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html:
* http/wpt/css/css-animations/start-animation-001.html:
* imported/blink/transitions/transition-not-interpolable.html:
* imported/blink/transitions/unprefixed-transform.html:
* platform/mac/TestExpectations:
* transitions/background-position-transitions.html:
* transitions/background-transitions.html:
* transitions/blendmode-transitions.html:
* transitions/border-radius-transition.html:
* transitions/clip-path-path-transitions.html:
* transitions/clip-path-transitions.html:
* transitions/clip-transition.html:
* transitions/color-transition-all.html:
* transitions/color-transition-premultiplied.html:
* transitions/color-transition-rounding.html:
* transitions/cross-fade-background-image.html:
* transitions/cross-fade-border-image.html:
* transitions/cubic-bezier-overflow-color.html:
* transitions/cubic-bezier-overflow-length.html:
* transitions/cubic-bezier-overflow-shadow.html:
* transitions/cubic-bezier-overflow-svg-length.html:
* transitions/cubic-bezier-overflow-transform.html:
* transitions/default-timing-function.html:
* transitions/delay.html:
* transitions/extra-transition.html:
* transitions/flex-transitions.html:
* transitions/font-family-during-transition.html:
* transitions/frames-timing-function.html:
* transitions/interrupted-all-transition.html:
* transitions/longhand-vs-shorthand-initial.html:
* transitions/mask-transitions.html:
* transitions/min-max-width-height-transitions.html:
* transitions/mismatched-shadow-styles.html:
* transitions/mismatched-shadow-transitions.html:
* transitions/mixed-type.html:
* transitions/move-after-transition.html:
* transitions/multiple-background-size-transitions.html:
* transitions/multiple-background-transitions.html:
* transitions/multiple-mask-transitions.html:
* transitions/multiple-shadow-transitions.html:
* transitions/negative-delay.html:
* transitions/opacity-transition-zindex.html:
* transitions/remove-transition-style.html:
* transitions/shape-outside-transitions.html:
* transitions/shorthand-border-transitions.html:
* transitions/shorthand-transitions.html:
* transitions/steps-timing-function.html:
* transitions/svg-layout-transition.html:
* transitions/svg-text-shadow-transition.html:
* transitions/svg-transitions.html:
* transitions/text-indent-transition.html:
* transitions/transform-op-list-match.html:
* transitions/transform-op-list-no-match.html:
* transitions/transition-drt-api-delay.html:
* transitions/transition-drt-api.html:
* transitions/transition-end-event-rendering.html:
* transitions/transition-hit-test-transform.html:
* transitions/transition-hit-test.html:
* transitions/transition-in-delay-phase.html:
* transitions/transition-on-element-with-content.html:
* transitions/transition-shorthand-delay.html:
* transitions/transition-timing-function.html:
* transitions/transition-to-from-auto.html:
* transitions/transition-to-from-undefined.html:
* transitions/visited-link-color.html:
* transitions/zero-duration-in-list.html:
* transitions/zero-duration-with-non-zero-delay-end.html:
* transitions/zero-duration-with-non-zero-delay-start.html:
* webanimations/accelerated-transition-by-removing-property.html:
* webanimations/accessing-current-time-after-clearing-css-animation-effect.html:
* webanimations/accessing-current-time-after-finished-css-animation-target-removal.html:
* webanimations/css-animation-effect-target-change-and-animation-removal-crash.html:
* webanimations/css-animations.html:
* webanimations/empty-keyframes-crash.html:
* webanimations/partly-accelerated-transition-by-removing-property.html:
* webanimations/setting-css-animation-none-after-clearing-effect.html:
* webanimations/setting-css-animation-timing-property-via-style-after-clearing-effect.html:

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

13 months agoImport media recorder api WPT tests
commit-queue@webkit.org [Wed, 12 Sep 2018 20:55:29 +0000 (20:55 +0000)]
Import media recorder api WPT tests
https://bugs.webkit.org/show_bug.cgi?id=189526

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-09-12
Reviewed by Youenn Fablet.

* resources/import-expectations.json:
* web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt: Added.
* web-platform-tests/mediacapture-record/BlobEvent-constructor.html: Added.
* web-platform-tests/mediacapture-record/META.yml: Added.
* web-platform-tests/mediacapture-record/idlharness.window-expected.txt: Added.
* web-platform-tests/mediacapture-record/idlharness.window.html: Added.
* web-platform-tests/mediacapture-record/idlharness.window.js: Added.
(idl_array.catch):
* web-platform-tests/mediacapture-record/w3c-import.log: Added.

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

13 months ago[Curl] Implement correct total received bytes.
Basuke.Suzuki@sony.com [Wed, 12 Sep 2018 20:51:30 +0000 (20:51 +0000)]
[Curl] Implement correct total received bytes.
https://bugs.webkit.org/show_bug.cgi?id=189555

Reviewed by Alex Christensen.

Curl port only reported total network received bytes before decoding.

No new test. InspectorTest is only available for WebKitTestRunner.

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::updateNetworkLoadMetrics):
* platform/network/curl/CurlRequest.h:

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

13 months agoSplit RTCRtpParameters idl and header file
youenn@apple.com [Wed, 12 Sep 2018 19:23:49 +0000 (19:23 +0000)]
Split RTCRtpParameters idl and header file
https://bugs.webkit.org/show_bug.cgi?id=189524

Reviewed by Eric Carlson.

This will be easier to manage and will allow to more easily introduce sender/receiver parameters.
No change of behavior.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/RTCDegradationPreference.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCDegradationPreference.idl: Added.
* Modules/mediastream/RTCDtxStatus.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCDtxStatus.idl: Added.
* Modules/mediastream/RTCPriorityType.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCPriorityType.idl: Added.
* Modules/mediastream/RTCRtpCodecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCRtpCodecParameters.idl: Added.
* Modules/mediastream/RTCRtpEncodingParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCRtpEncodingParameters.idl: Added.
* Modules/mediastream/RTCRtpFecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCRtpFecParameters.idl: Added.
* Modules/mediastream/RTCRtpHeaderExtensionParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: Added.
* Modules/mediastream/RTCRtpParameters.h:
* Modules/mediastream/RTCRtpParameters.idl:
* Modules/mediastream/RTCRtpRtxParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
* Modules/mediastream/RTCRtpRtxParameters.idl: Added.
* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::toRTCEncodingParameters):
(WebCore::fromRTCEncodingParameters):
(WebCore::toRTCHeaderExtensionParameters):
(WebCore::fromRTCHeaderExtensionParameters):
(WebCore::toRTCCodecParameters):
(WebCore::toRTCRtpParameters):
(WebCore::fromRTCRtpParameters):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

13 months agoExpose a few WebPlaybackControlsManager-driven PIP APIs to clients
mrajca@apple.com [Wed, 12 Sep 2018 19:10:01 +0000 (19:10 +0000)]
Expose a few WebPlaybackControlsManager-driven PIP APIs to clients
https://bugs.webkit.org/show_bug.cgi?id=189478
<rdar://problem/44312650>

Reviewed by Eric Carlson.

This patch exposes APIs necessary to toggle PIP and query its status from clients of WKWebView.
The existing PIP test has been updated to use the new APIs instead of simulating mouse clicks.
I also increased the size of the video element in the test page so it gets picked up by the
main content heuristics.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateMediaPlaybackControlsManager]): Create a media playback controls manager if necessary.
(-[WKWebView _isPictureInPictureActive]): Return true if the "active" media element is in PIP.
(-[WKWebView _togglePictureInPicture]): Toggle PIP on the "active" media element.
(-[WKWebView _canTogglePictureInPicture]): Renamed from...
(-[WKWebView _canTogglePictureInPictureForTesting]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::isPictureInPictureActive): Return true if the "active" media element is in PIP.
(WebKit::WebViewImpl::togglePictureInPicture): Toggle PIP on the "active" media element.
(WebKit::WebViewImpl::updateMediaPlaybackControlsManager): Let clients create a playback
 controls manager even when there is no Touch Bar present.
(WebKit::WebViewImpl::updateMediaTouchBar): Extract some code into a helper method.
(WebKit::WebViewImpl::canTogglePictureInPicture): Renamed from...
(WebKit::WebViewImpl::canTogglePictureInPictureForTesting):

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

13 months ago[IntersectionObserver] Implement rootMargin expansion
ajuma@chromium.org [Wed, 12 Sep 2018 17:03:13 +0000 (17:03 +0000)]
[IntersectionObserver] Implement rootMargin expansion
https://bugs.webkit.org/show_bug.cgi?id=189525

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Rebasline expectation for test that now passes.

* web-platform-tests/intersection-observer/root-margin-expected.txt:

Source/WebCore:

Expand the root intersection rectangle by the observer's rootMargin when computing
intersections.

Test: imported/w3c/web-platform-tests/intersection-observer/root-margin.html

* dom/Document.cpp:
(WebCore::expandRootBoundsWithRootMargin):
(WebCore::computeIntersectionRects):
* page/IntersectionObserver.h:
(WebCore::IntersectionObserver::rootMarginBox const):
* platform/graphics/FloatRect.h:
(WebCore::FloatRect::expand):

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

13 months ago[Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to...
Hironori.Fujii@sony.com [Wed, 12 Sep 2018 16:47:19 +0000 (16:47 +0000)]
[Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
https://bugs.webkit.org/show_bug.cgi?id=189542

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No behavior change).

* platform/graphics/win/IntPointWin.cpp:
(WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.

Source/WebKit:

* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateFrontendPage): Narrowed initialWindowWidth and initialWindowHeight by using static_cast.

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

13 months ago[Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to Accessibi...
Hironori.Fujii@sony.com [Wed, 12 Sep 2018 16:37:55 +0000 (16:37 +0000)]
[Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=189492

Reviewed by Alex Christensen.

0 and nullptr can't be implicitly converted to
AccessibilityUIElement because only Windows port typedefs
PlatformUIElement as COMPtr<IAccessible> not a pointer.

Replaced "return 0" and "return nullptr" with "return { nullptr }".

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::horizontalScrollbar const):
(AccessibilityUIElement::verticalScrollbar const):
(AccessibilityUIElement::uiElementAttributeValue const):
(AccessibilityUIElement::accessibilityElementForTextMarker):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::elementAtPoint):
(AccessibilityController::accessibleElementById):
(AccessibilityController::focusedElement):
(AccessibilityController::rootElement):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::elementAtPoint):
(AccessibilityUIElement::linkedUIElementAtIndex):
(AccessibilityUIElement::getChildAtIndex):
(AccessibilityUIElement::titleUIElement):
(AccessibilityUIElement::parentElement):
(AccessibilityUIElement::uiElementForSearchPredicate):
(AccessibilityUIElement::cellForColumnAndRow):
(AccessibilityUIElement::disclosedRowAtIndex):
(AccessibilityUIElement::ariaOwnsElementAtIndex):
(AccessibilityUIElement::ariaFlowToElementAtIndex):
(AccessibilityUIElement::ariaControlsElementAtIndex):
(AccessibilityUIElement::selectedRowAtIndex):
(AccessibilityUIElement::rowAtIndex):
(AccessibilityUIElement::disclosedByRow):
(AccessibilityUIElement::selectedChildAtIndex const):

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

13 months agoClean up SuspendedPageProxy
cdumez@apple.com [Wed, 12 Sep 2018 16:36:55 +0000 (16:36 +0000)]
Clean up SuspendedPageProxy
https://bugs.webkit.org/show_bug.cgi?id=189517

Reviewed by Alex Christensen.

Clean up SuspendedPageProxy:
1. SuspendedPageProxy does not need to be RefCounted. It is even dangerous given that WebPageProxy
   owns the SuspendedPageProxy and SuspendedPageProxy has a WebPageProxy& data member. We definitely
   do not want it to outlive its WebPageProxy.
2. The SuspendedPageProxy destructor does not need to be virtual.
3. Have WebBackForwardListItem keep a WeakPtr<SuspendedPageProxy> instead of a SuspendedPageProxy*.
   This is safer and avoid having to explicitly clear the pointer.
4. m_finishedSuspending data member does not need a getter and is only needed if !LOG_DISABLED.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::setSuspendedPage):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::suspendedPage const):
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::webProcessDidClose):
(WebKit::SuspendedPageProxy::didFinishLoad):
* UIProcess/SuspendedPageProxy.h:
(WebKit::SuspendedPageProxy::process const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeCreateSuspendedPage):
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/WebPageProxy.h:

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

13 months agoWeb Inspector: fix test case failures in js-isLikelyStackTrace.html
commit-queue@webkit.org [Wed, 12 Sep 2018 16:34:09 +0000 (16:34 +0000)]
Web Inspector: fix test case failures in js-isLikelyStackTrace.html
https://bugs.webkit.org/show_bug.cgi?id=180664

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-09-12
Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Models/StackTrace.js:
(WI.StackTrace.isLikelyStackTrace):
In a quick benchmark 50% of the time was rebuilding the same complex regular
expression over and over again. Instead just build the regex once and reset
it before each use.

LayoutTests:

* inspector/console/js-isLikelyStackTrace-expected.txt:
* inspector/console/js-isLikelyStackTrace.html:
Avoid Inspector Internal InjectedScript code in backtraces by producing
the exception stacks in the page itself without going through inspector
test evaluation code. This produces exception stacks more like a page.
Also add some explicit tests for strings that we'd expect to be classified
as exception stacks.

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

13 months ago[Win][Clang][WebKitLegacy] error: 'static' is invalid in friend declarations
Hironori.Fujii@sony.com [Wed, 12 Sep 2018 16:20:36 +0000 (16:20 +0000)]
[Win][Clang][WebKitLegacy] error: 'static' is invalid in friend declarations
https://bugs.webkit.org/show_bug.cgi?id=189539

Reviewed by Alex Christensen.

* WebCoreSupport/WebInspectorClient.h: Removed 'static' of WebInspectorWndProc friend declaration.
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorWndProc): Ditto.
* WebNodeHighlight.cpp: Added OverlayWndProc declaration to be called before the definition.
* WebNodeHighlight.h: Removed 'static` of OverlayWndProc friend declaration.

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

13 months agoWeb Inspector: imported recordings are unable to be viewed after navigation
drousso@apple.com [Wed, 12 Sep 2018 16:10:59 +0000 (16:10 +0000)]
Web Inspector: imported recordings are unable to be viewed after navigation
https://bugs.webkit.org/show_bug.cgi?id=189208

Reviewed by Joseph Pecoraro.

Move the "Imported Recordings" folder to the top level (instead of under "Overview") so that
it is selectable when there are no canvases but there is an imported recording.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype._removeCanvas):
Null out the `source` of each `WI.Recording` for the removed `WI.Canvas`.

* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype._removeCanvas):
Add each `WI.Recording`for the removed `WI.Canvas` to the "Imported Recordings" folder.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.refresh):
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype._showError):
Drive-by: don't recreate the error preview element if it already exists.
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.updateRepresentedObjects): Added.
(WI.CanvasSidebarPanel.prototype.shown):
(WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange): Deleted.

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

13 months agoLayout Test fast/text/variations/ipc2.html is failing
pvollan@apple.com [Wed, 12 Sep 2018 15:57:11 +0000 (15:57 +0000)]
Layout Test fast/text/variations/ipc2.html is failing
https://bugs.webkit.org/show_bug.cgi?id=189550

Unreviewed test gardening.

* platform/win/TestExpectations:

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

13 months agoAdd IGNORE_WARNING_.* macros
guijemont@igalia.com [Wed, 12 Sep 2018 15:09:16 +0000 (15:09 +0000)]
Add IGNORE_WARNING_.* macros
https://bugs.webkit.org/show_bug.cgi?id=188996

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* API/tests/testapi.c:
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::finalizeCodeWithDisassembly):
* b3/B3LowerToAir.cpp:
* b3/B3Opcode.cpp:
* b3/B3Type.h:
* b3/B3TypeMap.h:
* b3/B3Width.h:
* b3/air/AirArg.cpp:
* b3/air/AirArg.h:
* b3/air/AirCode.h:
* bytecode/Opcode.h:
(JSC::padOpcodeName):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateNumber):
(JSC::DFG::SpeculativeJIT::speculateMisc):
* dfg/DFGSpeculativeJIT64.cpp:
* ftl/FTLOutput.h:
* jit/CCallHelpers.h:
(JSC::CCallHelpers::calculatePokeOffset):
* llint/LLIntData.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::slowPathLogF):
* runtime/ConfigFile.cpp:
(JSC::ConfigFile::canonicalizePaths):
* runtime/JSDataViewPrototype.cpp:
* runtime/JSGenericTypedArrayViewConstructor.h:
* runtime/JSGenericTypedArrayViewPrototype.h:
* runtime/Options.cpp:
(JSC::Options::setAliasedOption):
* tools/CodeProfiling.cpp:
* wasm/WasmSections.h:
* wasm/generateWasmValidateInlinesHeader.py:

Source/WebCore:

* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::overrideAttachmentParent):
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper role]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* bridge/objc/WebScriptObject.mm:
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::fieldNamed const):
* crypto/CommonCryptoUtilities.cpp:
(WebCore::getCommonCryptoDigestAlgorithm):
* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):
* crypto/mac/SerializedCryptoKeyWrapMac.mm:
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/makeSelectorPseudoElementsMap.py:
* editing/TextIterator.cpp:
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::takeFindStringFromSelection):
(WebCore::Editor::replaceNodeFromPasteboard):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::paintContents):
* platform/LocalizedStrings.cpp:
(WebCore::formatLocalizedString):
* platform/ScreenProperties.h:
(WebCore::ScreenData::decode):
* platform/gamepad/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::stopMonitoringInput):
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::sharedDisplay):
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::IGNORE_CLANG_WARNING_END):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
(-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::IGNORE_CLANG_WARNING_END):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayer::drawLayerContents):
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence const):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::createFrameImageAtIndex):
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/cocoa/WebGLLayer.h:
(IGNORE_CLANG_WARNING):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::Icon):
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::drawPDFPage):
* platform/graphics/mac/WebKitNSImageExtras.mm:
(-[NSImage _web_lockFocusWithDeviceScaleFactor:]):
* platform/ios/DragImageIOS.mm:
* platform/mac/DragImageMac.mm:
(WebCore::scaleDragImage):
(WebCore::createDragImageForLink):
* platform/mac/LegacyNSPasteboardTypes.h:
* platform/mac/LocalCurrentGraphicsContext.mm:
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::setDragImageImpl):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::globalPoint):
* platform/mac/SSLKeyGeneratorMac.mm:
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformContentsToScreen const):
(WebCore::ScrollView::platformScreenToContents const):
* platform/mac/ThemeMac.mm:
(WebCore::drawCellFocusRingWithFrameAtTime):
* platform/mac/WebPlaybackControlsManager.mm:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* platform/mediastream/RealtimeIncomingAudioSource.h:
* platform/mediastream/RealtimeIncomingVideoSource.h:
* platform/mediastream/RealtimeOutgoingAudioSource.h:
* platform/mediastream/RealtimeOutgoingVideoSource.h:
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
* platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::reportErrorToClient):
* platform/network/create-http-header-name-table:
* platform/text/TextEncoding.cpp:
* testing/MockLibWebRTCPeerConnection.h:
* xml/XPathGrammar.cpp:

Source/WebCore/PAL:

* pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp:
(PAL::CryptoDigest::create):
(PAL::CryptoDigest::addBytes):
(PAL::CryptoDigest::computeHash):
* pal/spi/cocoa/AVKitSPI.h:
* pal/spi/cocoa/NSKeyedArchiverSPI.h:
(insecurelyUnarchiveObjectFromData):
* pal/spi/ios/MediaPlayerSPI.h:
* pal/system/mac/PopupMenu.mm:
(PAL::popUpMenu):
* pal/system/mac/WebPanel.mm:
(-[WebPanel init]):

Source/WebKit:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSyncAllCookies):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::beginModal):
* PluginProcess/mac/PluginProcessShim.mm:
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
* Shared/mac/ChildProcessMac.mm:
(WebKit::compileAndApplySandboxSlowCase):
* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::decode):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _web_superAccessibilityAttributeValue:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewRunAsModal):
* UIProcess/API/mac/WKView.mm:
(-[WKView _web_superAccessibilityAttributeValue:]):
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
* UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:
(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKTextListTouchBarViewController initWithWebViewImpl:]):
(WebKit::WebViewImpl::updateWindowAndViewFrames):
(WebKit::WebViewImpl::sendDragEndToPage):
(WebKit::WebViewImpl::startDrag):
(WebKit::WebViewImpl::characterIndexForPoint):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
(WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
(WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
(WebKit::PluginProcessProxy::exitFullscreen):
* UIProcess/ios/SmartMagnificationController.mm:
* UIProcess/ios/WKGeolocationProviderIOS.mm:
* UIProcess/ios/WKLegacyPDFView.mm:
* UIProcess/ios/WKPDFPageNumberIndicator.mm:
(-[WKPDFPageNumberIndicator _makeRoundedCorners]):
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
* UIProcess/ios/forms/WKFormColorControl.mm:
(-[WKColorPopover initWithView:]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePopover initWithView:datePickerMode:]):
* UIProcess/ios/forms/WKFormPopover.h:
* UIProcess/ios/forms/WKFormPopover.mm:
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _setAutodisplay:]):
(-[WKPrintingView _drawPDFDocument:page:atPoint:]):
(-[WKPrintingView _drawPreview:]):
(-[WKPrintingView drawRect:]):
* UIProcess/mac/WKTextInputWindowController.mm:
(-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
(-[WKTextInputPanel _hasMarkedText]):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::initializeEventRecord):
(WebKit::NetscapePlugin::sendComplexTextInput):
(WebKit::makeCGLPresentLayerOpaque):
(WebKit::NetscapePlugin::nullEventTimerFired):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
(-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
(WebKit::PDFPlugin::handleEditingCommand):
(WebKit::PDFPlugin::setActiveAnnotation):
(WebKit:: const):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::createAnnotationElement):
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::drawPDFPage):

Source/WebKitLegacy/mac:

* Carbon/CarbonUtils.m:
(PoolCleaner):
* Carbon/CarbonWindowAdapter.mm:
(-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
(-[CarbonWindowAdapter setViewsNeedDisplay:]):
(-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
(-[CarbonWindowAdapter _termWindowIfOwner]):
(-[CarbonWindowAdapter _windowMovedToRect:]):
(-[CarbonWindowAdapter setContentView:]):
(-[CarbonWindowAdapter _handleRootBoundsChanged]):
(-[CarbonWindowAdapter _handleContentBoundsChanged]):
* Carbon/CarbonWindowFrame.m:
(-[CarbonWindowFrame title]):
* Carbon/HIViewAdapter.m:
(+[HIViewAdapter getHIViewForNSView:]):
* Carbon/HIWebView.mm:
(overrideCGContext):
(restoreCGContext):
(Draw):
* DOM/DOM.mm:
* History/WebHistory.mm:
(-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
* History/WebHistoryItem.mm:
(-[WebHistoryItem icon]):
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]):
* Misc/WebNSImageExtras.m:
(-[NSImage _web_scaleToMaxSize:]):
(-[NSImage _web_dissolveToFraction:]):
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel loadNib]):
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost):
(WebKit::NetscapePluginHostManager::didCreateWindow):
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::makeCurrentProcessFrontProcess):
(WebKit::NetscapePluginHostProxy::makePluginHostProcessFrontProcess const):
(WebKit::NetscapePluginHostProxy::isPluginHostProcessFrontProcess const):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::mouseEvent):
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView drawRect:]):
* Plugins/Hosted/WebTextInputWindowController.m:
(-[WebTextInputPanel _interpretKeyEvent:string:]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
* Plugins/WebNetscapePluginPackage.mm:
(-[WebNetscapePluginPackage _tryLoad]):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
(-[WebNetscapePluginView sendDrawRectEvent:]):
(-[WebNetscapePluginView drawRect:]):
* Plugins/WebPluginController.mm:
(WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_):
(WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_):
* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::populate):
* WebCoreSupport/WebAlternativeTextClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::startDrag):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
(webGetNSImage):
* WebInspector/WebNodeHighlight.mm:
* WebInspector/WebNodeHighlightView.mm:
(-[WebNodeHighlightView drawRect:]):
* WebView/WebClipView.mm:
(-[WebClipView initWithFrame:]):
* WebView/WebFrame.mm:
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame accessibilityRoot]):
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController enterFullScreen:]):
(-[WebFullScreenController finishedEnterFullScreenAnimation:]):
(-[WebFullScreenController exitFullScreen]):
(-[WebFullScreenController finishedExitFullScreenAnimation:]):
(-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
(-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
* WebView/WebHTMLView.mm:
(-[NSWindow _web_borderView]):
(-[WebHTMLView _updateMouseoverWithFakeEvent]):
(-[WebHTMLView _setAsideSubviews]):
(-[WebHTMLView _autoscroll]):
(-[WebHTMLView drawRect:]):
(-[WebHTMLView mouseDown:]):
(-[WebHTMLView mouseDragged:]):
(-[WebHTMLView mouseUp:]):
(-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]):
(-[WebHTMLView knowsPageRange:]):
(-[WebHTMLView accessibilityHitTest:]):
(-[WebHTMLView _fontAttributesFromFontPasteboard]):
(-[WebHTMLView _colorAsString:]):
(-[WebHTMLView copyFont:]):
(-[WebHTMLView _executeSavedKeypressCommands]):
(-[WebHTMLView attachRootLayer:]):
(-[WebHTMLView textStorage]):
(-[WebHTMLView _updateSelectionForInputManager]):
* WebView/WebPDFView.mm:
(_applicationInfoForMIMEType):
(-[WebPDFView centerSelectionInVisibleArea:]):
(-[WebPDFView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
(-[WebPDFView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
(-[WebPDFView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
(-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _buildUI]):
(-[WebTextCompletionController _placePopupWindow:]):
* WebView/WebVideoFullscreenController.mm:
* WebView/WebVideoFullscreenHUDWindowController.mm:
(createMediaUIBackgroundView):
* WebView/WebView.mm:
(-[WebTextListTouchBarViewController initWithWebView:]):
(-[WebView _dispatchTileDidDraw:]):
(-[WebView encodeWithCoder:]):
(-[WebView mainFrameIcon]):
(LayerFlushController::flushLayers):
* WebView/WebWindowAnimation.mm:
(setScaledFrameForWindow):

Source/WTF:

* wtf/Assertions.cpp:
* wtf/Assertions.h:
* wtf/Compiler.h:
* wtf/MD5.cpp:
(WTF::MD5::MD5):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/PrintStream.cpp:
(WTF::PrintStream::printfVariableFormat):
* wtf/SHA1.cpp:
(WTF::SHA1::SHA1):
(WTF::SHA1::addBytes):
(WTF::SHA1::computeHash):
* wtf/ThreadingPthreads.cpp:
* wtf/Vector.h:
(WTF::VectorBuffer::endOfBuffer):
* wtf/text/WTFString.cpp:
(WTF::createWithFormatAndArguments):

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

13 months agoRemoved a couple of empty directories left behind after r235892.
mitz@apple.com [Wed, 12 Sep 2018 14:57:01 +0000 (14:57 +0000)]
Removed a couple of empty directories left behind after r235892.

* WPEWebCore: Removed.
* downstream-WebCore: Removed.

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

13 months agoLinking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDE...
commit-queue@webkit.org [Wed, 12 Sep 2018 09:11:57 +0000 (09:11 +0000)]
Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF
https://bugs.webkit.org/show_bug.cgi?id=189540

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2018-09-12
Reviewed by Philippe Normand.

Related issues:

This issue is related with changes in https://bugs.webkit.org/show_bug.cgi?id=183080
This issue is introduced in https://bugs.webkit.org/show_bug.cgi?id=186547

No new tests, no changes in the functionality.

* platform/GStreamer.cmake:
* platform/SourcesGLib.txt:
* platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
(WebCore::LibWebRTCProvider::webRTCAvailable):

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

13 months agoUnreviewed WPE build fix.
zandobersek@gmail.com [Wed, 12 Sep 2018 06:08:50 +0000 (06:08 +0000)]
Unreviewed WPE build fix.

* platform/network/soup/SocketStreamHandleImplSoup.cpp:
Add extra header inclusions to get this code building after the unified
sources system shifted it into a different translation unit.

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

13 months agoFontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
wenson_hsieh@apple.com [Wed, 12 Sep 2018 06:08:29 +0000 (06:08 +0000)]
FontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
https://bugs.webkit.org/show_bug.cgi?id=189382

Reviewed by Ryosuke Niwa.

Fix the test by specifying colors in RGB colorspace.

* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
(TestWebKitAPI::TEST):

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

13 months ago[Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
Hironori.Fujii@sony.com [Wed, 12 Sep 2018 04:50:09 +0000 (04:50 +0000)]
[Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=189496

Reviewed by Alex Christensen.

* ImageDiff/cairo/PlatformImageCairo.cpp:
(ImageDiff::PlatformImage::createFromStdin): Removed unnecessary ReadContext struct.
(ImageDiff::PlatformImage::writeAsPNGToStdout): Use '%lu' format type specifier for unsigned long.

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

13 months ago[Curl] WebInspector doesn't display request headers added during processing.
Basuke.Suzuki@sony.com [Wed, 12 Sep 2018 02:42:35 +0000 (02:42 +0000)]
[Curl] WebInspector doesn't display request headers added during processing.
https://bugs.webkit.org/show_bug.cgi?id=189531

Reviewed by Alex Christensen.

While processing the request, Curl port network layer adds some headers to the request
such as cookies. Those headers should be displayed in the WebInspector.

Tested on MiniBrowser.

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::updateNetworkLoadMetrics):
* platform/network/curl/CurlRequest.h:

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

13 months agoImplement the Web Share API for mac
commit-queue@webkit.org [Wed, 12 Sep 2018 00:57:58 +0000 (00:57 +0000)]
Implement the Web Share API for mac
https://bugs.webkit.org/show_bug.cgi?id=189443

Patch by Olivia Barnett <obarnett@apple.com> on 2018-09-11
Reviewed by Tim Horton.

Source/WebKit:

* Shared/WebPreferencesDefaultValues.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView shareSheetDidDismiss:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView shareSheetDidDismiss:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showShareSheet):
(WebKit::WebViewImpl::shareSheetDidDismiss):
Implemented function for WKShareSheetDelegate.

* UIProcess/Cocoa/WKShareSheet.h:
* UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheet initWithView:initWithView:]):
(-[WKShareSheet presentWithParameters:completionHandler:]):
(-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
(-[WKShareSheet _cancel]):
(-[WKShareSheet dismiss]):
(-[WKShareSheet _dismissDisplayAnimated:]):
(-[WKShareSheet invokeShareSheetWithResolution:]):
(-[WKShareSheet initWithView:]): Deleted.
Added mac platform checks and share sheet functionality.

* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::showShareSheet):
Allows macos to invoke the system share sheet.

LayoutTests:

* platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/web-share/idlharness.https-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-empty.https-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-securecontext.http-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-url-invalid.https-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/web-share/share-without-user-gesture.https-expected.txt: Added.
Updated test expectations.

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

13 months agoUnreviewed test fix after r235910
mmaxfield@apple.com [Wed, 12 Sep 2018 00:51:23 +0000 (00:51 +0000)]
Unreviewed test fix after r235910
https://bugs.webkit.org/show_bug.cgi?id=188008

* platform/mac-wk1/TestExpectations:

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

13 months ago[IntersectionObserver] Update WPTs to the latest upstream version
ajuma@chromium.org [Wed, 12 Sep 2018 00:17:24 +0000 (00:17 +0000)]
[IntersectionObserver] Update WPTs to the latest upstream version
https://bugs.webkit.org/show_bug.cgi?id=189515

Reviewed by Youenn Fablet.

* web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt: Added.
* web-platform-tests/intersection-observer/initial-observation-with-threshold.html: Added.
* web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js:
(waitForNotification):
* web-platform-tests/intersection-observer/w3c-import.log:

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

13 months agoFollow up to:
commit-queue@webkit.org [Tue, 11 Sep 2018 23:41:49 +0000 (23:41 +0000)]
Follow up to:
Expose -apple-system-container-border color to internal web views.
https://bugs.webkit.org/show_bug.cgi?id=189178.

Patch by James Savage <james.savage@apple.com> on 2018-09-11
Reviewed by Timothy Hatcher.

Source/WebCore:

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const): Add a separate #if block for
Mojave. When I used CSSValueAppleSystemFindHighlightBackground as a template
for this change, I had to write out the condition in the first change, but
mistakenly thought I could reuse the block here. Turns out the versions were
different, and I could not.

LayoutTests:

* platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:
Reset test expectations to go along with fix.

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

13 months agoAdd and expose Internal features from WebKit
dino@apple.com [Tue, 11 Sep 2018 23:23:38 +0000 (23:23 +0000)]
Add and expose Internal features from WebKit
https://bugs.webkit.org/show_bug.cgi?id=189442
<rdar://problem/44243404>

Reviewed by Simon Fraser.

Source/WebKit:

Experimental features have become a mess. People are using them for
anything that they want to be easily toggled from a host app (e.g.
Safari), which means the user-facing menu has become large and
confusing.

Introduce the idea of Internal features, that will be exposed in a way
that end-users are not expected to ever see (unless they really want
to).

* CMakeLists.txt: Add new files.
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:

* DerivedSources.make: Add new generated files.
* Scripts/GeneratePreferences.rb: Generate the preferences stuff for Internal Debug features.
* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb: Added.

* Shared/API/APIObject.h: New API object for InternalDebugFeature.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):

* Shared/WebPreferences.yaml: Change some of the existing experimental features to "internal".

* UIProcess/API/APIInternalDebugFeature.cpp: New API type - just like APIExperimentalFeature.
(API::InternalDebugFeature::create):
(API::InternalDebugFeature::InternalDebugFeature):
(API::InternalDebugFeature::~InternalDebugFeature):
* UIProcess/API/APIInternalDebugFeature.h:
* UIProcess/API/C/WKAPICast.h:

* UIProcess/API/Cocoa/WKPreferences.mm: Change the naming of the experimental feature API so that it
won't clash with internal debug features. We can remove the old API once Safari has adopted.
(+[WKPreferences _internalDebugFeatures]):
(-[WKPreferences _isEnabledForInternalDebugFeature:]):
(-[WKPreferences _setEnabled:forInternalDebugFeature:]):
(-[WKPreferences _isEnabledForFeature:]):
(-[WKPreferences _setEnabled:forFeature:]):
(-[WKPreferences _isEnabledForExperimentalFeature:]):
(-[WKPreferences _setEnabled:forExperimentalFeature:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

* UIProcess/API/Cocoa/_WKInternalDebugFeature.h: New object - same as _WKExperimentalFeature.
* UIProcess/API/Cocoa/_WKInternalDebugFeature.mm:
(-[_WKInternalDebugFeature dealloc]):
(-[_WKInternalDebugFeature description]):
(-[_WKInternalDebugFeature name]):
(-[_WKInternalDebugFeature key]):
(-[_WKInternalDebugFeature details]):
(-[_WKInternalDebugFeature defaultValue]):
(-[_WKInternalDebugFeature isHidden]):
(-[_WKInternalDebugFeature _apiObject]):
* UIProcess/API/Cocoa/_WKInternalDebugFeatureInternal.h:

* UIProcess/WebPreferences.cpp: Add support for Internal Debug features.
(WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
(WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):
* UIProcess/WebPreferences.h:

* UIProcess/WebProcessPool.cpp: Change a comment now that it is an internal feature.
(WebKit::WebProcessPool::createWebPage):

Tools:

Update MiniBrowser to expose an Internal feature menu.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleExperimentalFeature:]):
(-[SettingsController toggleInternalDebugFeature:]):

LayoutTests:

Skip some tests that rely on an experimental feature that has
moved to internal. A follow-up patch will allow WKTR to enable
them on demand.

* platform/mac/TestExpectations:

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

13 months agoRemove MediaDevices NoInterfaceObject
youenn@apple.com [Tue, 11 Sep 2018 23:19:02 +0000 (23:19 +0000)]
Remove MediaDevices NoInterfaceObject
https://bugs.webkit.org/show_bug.cgi?id=189512

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt:
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt:

Source/WebCore:

Covered by rebased WPT tests.

* Modules/mediastream/MediaDevices.idl:

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

13 months ago[MediaCapabilities] Implement MediaEngineConfigurationFactory registration
jer.noble@apple.com [Tue, 11 Sep 2018 23:18:15 +0000 (23:18 +0000)]
[MediaCapabilities] Implement MediaEngineConfigurationFactory registration
https://bugs.webkit.org/show_bug.cgi?id=189438

Reviewed by Eric Carlson.

Source/WebCore:

Implement a mechanism to register platform-specific MediaEngineConfigurationFactory methods, and a mechanism to iterate
over those registered factories when createDecodingConfiguration() and createEncodingConfiguration() are called.

The Factory has been radically simplified; the concept of MediaEngineDecodingConfiguration
and MediaEngineEncodingConfiguration and its subclasess have been removed. Since the primary
objects representing video and audio configurations are IDLDictionaries, the native objects
are just structs full of POD types (and Strings). Since these have no dependencies on
higher-level HTML concepts, they can be moved into platform/ and accessed from there. This
patch also converts MediaCapabilitiesInfo to an Interface, so its implementation also can
become a struct and live in platform/. The MediaEngineDecodingConfigurationMock and
MediaEngineEncodingConfigurationMock have been consolidated in a single class which simply
parses MediaDecodingConfiguration and MediaEncodingConifguration objects (now that they live
in Platform) and return a MediaCapabilitiesInfo object (now that it does too).

* Modules/mediacapabilities/MediaCapabilities.cpp:
(WebCore::isValidVideoConfiguration):
(WebCore::MediaCapabilities::decodingInfo):
(WebCore::MediaCapabilities::encodingInfo):
* Modules/mediacapabilities/MediaCapabilitiesInfo.h: Removed.
* Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
* Modules/mediacapabilities/VideoConfiguration.idl:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/MediaCapabilitiesInfo.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
* platform/mediacapabilities/AudioConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/AudioConfiguration.h.
* platform/mediacapabilities/MediaConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaConfiguration.h.
* platform/mediacapabilities/MediaDecodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingConfiguration.h.
* platform/mediacapabilities/MediaDecodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
* platform/mediacapabilities/MediaEncodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingConfiguration.h.
* platform/mediacapabilities/MediaEncodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingType.h.
* platform/mediacapabilities/MediaEngineConfiguration.cpp: Removed.
* platform/mediacapabilities/MediaEngineConfiguration.h: Removed.
* platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
(WebCore::factories):
(WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
(WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
* platform/mediacapabilities/MediaEngineConfigurationFactory.h:
* platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Removed.
* platform/mediacapabilities/VideoConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/VideoConfiguration.h.
* platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
* platform/mock/MediaEngineConfigurationFactoryMock.cpp: Added.
(WebCore::canDecodeMedia):
(WebCore::canSmoothlyDecodeMedia):
(WebCore::canPowerEfficientlyDecodeMedia):
(WebCore::canEncodeMedia):
(WebCore::canSmoothlyEncodeMedia):
(WebCore::canPowerEfficientlyEncodeMedia):
(WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
(WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
* platform/mock/MediaEngineConfigurationFactoryMock.h: Renamed from Source/WebCore/platform/mediacapabilities/MediaEngineDecodingConfiguration.h.
* platform/mock/MediaEngineDecodingConfigurationMock.cpp: Removed.
* platform/mock/MediaEngineDecodingConfigurationMock.h: Removed.
* platform/mock/MediaEngineEncodingConfigurationMock.cpp: Removed.
* platform/mock/MediaEngineEncodingConfigurationMock.h: Removed.

LayoutTests:

* media/mediacapabilities/mediacapabilities-types-expected.txt:

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

13 months agoWebPage::close should clear UserMediaPermissionRequestManager
eric.carlson@apple.com [Tue, 11 Sep 2018 23:17:22 +0000 (23:17 +0000)]
WebPage::close should clear UserMediaPermissionRequestManager
https://bugs.webkit.org/show_bug.cgi?id=189369
<rdar://problem/44196724>

Reviewed by Youenn Fablet.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close): Clear m_userMediaPermissionRequestManager.

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

13 months ago:first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root...
rniwa@webkit.org [Tue, 11 Sep 2018 23:00:31 +0000 (23:00 +0000)]
:first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root's children
https://bugs.webkit.org/show_bug.cgi?id=166748
<rdar://problem/29649177>

Reviewed by Yusuke Suzuki.

Source/WebCore:

Added the support for matching positional pseudo classes. For now, we invalidate whenever a child node
of a non-UA ShadowRoot is mutated instead of a fine-grained style invalidation as done for regular elements.

Tests: fast/shadow-dom/nth-node-on-shadow-child-invalidation.html
       fast/shadow-dom/nth-node-on-shadow-child-no-jit.html
       fast/shadow-dom/nth-node-on-shadow-child.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElementOrShadowRoot):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childrenChanged): Invalidate the subtree whenever a child node is mutated.
* dom/ShadowRoot.h:
* domjit/DOMJITHelpers.h:
(WebCore::DOMJIT::branchTestIsShadowRootFlagOnNode): Added.
(WebCore::DOMJIT::branchTestIsElementOrShadowRootFlagOnNode): Added.

LayoutTests:

Added ref tests for matching positional pseudo classes on direct child of shadow roots
during style resolutions and DOM API matching with C++ selector checker and selector compilers.

Also added a test for invalidating these selectors.

* fast/shadow-dom/nth-node-on-shadow-child-expected.html: Added.
* fast/shadow-dom/nth-node-on-shadow-child-invalidation-expected.html: Added.
* fast/shadow-dom/nth-node-on-shadow-child-invalidation.html: Added.
* fast/shadow-dom/nth-node-on-shadow-child-no-jit-expected.html: Added.
* fast/shadow-dom/nth-node-on-shadow-child-no-jit.html: Added.
* fast/shadow-dom/nth-node-on-shadow-child.html: Added.

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

13 months agoAddressing post-review feedback on r235619.
pvollan@apple.com [Tue, 11 Sep 2018 22:38:27 +0000 (22:38 +0000)]
Addressing post-review feedback on r235619.
https://bugs.webkit.org/show_bug.cgi?id=187925

Unreviewed.

* testing/Internals.cpp:
(WebCore::Internals::primaryScreenDisplayID):
* testing/Internals.h:

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

13 months agoUpdated the test expectation as this test also causes a crash in release builds.
rniwa@webkit.org [Tue, 11 Sep 2018 22:09:39 +0000 (22:09 +0000)]
Updated the test expectation as this test also causes a crash in release builds.

* TestExpectations:

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

13 months ago[macOS] [WK2] Support changing foreground colors via color panel
wenson_hsieh@apple.com [Tue, 11 Sep 2018 21:56:17 +0000 (21:56 +0000)]
[macOS] [WK2] Support changing foreground colors via color panel
https://bugs.webkit.org/show_bug.cgi?id=189382
<rdar://problem/44227311>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below.
Tested by FontManagerTests.ChangeFontColorWithColorPanel.

* editing/EditingStyle.cpp:
(WebCore::StyleChange::extractTextStyles):

Support setting foreground text color with alpha by using a styled span element rather than a font element with
attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because
the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to
`rgba()` result in a garbage value for the computed color style.

* editing/FontAttributeChanges.cpp:
(WebCore::FontAttributeChanges::editAction const):

Add a helper to return the relevant EditAction describing this set of FontAttributeChanges.

* editing/FontAttributeChanges.h:
(WebCore::FontChanges::isEmpty const):

Source/WebKit:

Adds support for changing font color in a richly editable element in WebKit2 via NSColorPanel. See below for
more detail, as well as the WebCore ChangeLog.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView changeColor:]):

Implement this selector; AppKit calls into this when changing font color using NSColorPanel.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::changeFontColorFromSender):

Creates and populates new FontAttributeChanges, with only the foreground color determined by asking the sender
object for its -color.

* WebProcess/WebPage/mac/WebPageMac.mm:

Use the relevant EditAction for the incoming FontAttributeChanges, instead of always specifying
EditAction::ChangeAttributes.

(WebKit::WebPage::changeFontAttributes):

Tools:

Add an API test that uses NSColorPanel to change the color of selected text, and also apply typing styles when
the selection is collapsed. The test also exercises switching between opaque colors (alpha = 1) and transparent
colors, as well as making different parts of a word different colors.

* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
(-[TestWKWebView collapseToEnd]):
(webViewForFontManagerTesting):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:

LayoutTests:

Adjust an existing layout test that applies a text color with alpha. Currently, this results in a font element
being emitted with the `color` attribute, but this is incorrect, since the `color` attribute of a font element
does not support "rgba(…)" values.

Instead, split this into two cases: verify that setting the color to an opaque color (with alpha = 1) emits a
font element with the correct `color` attribute, and fall back to using an inline style when the color is
partially transparent.

* editing/style/inline-style-container-expected.txt:
* editing/style/inline-style-container.html:

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

13 months agoUpdate webkit-webgl-test-harness.js for more details on WebGL 2 conformance tests...
justin_fan@apple.com [Tue, 11 Sep 2018 21:35:23 +0000 (21:35 +0000)]
Update webkit-webgl-test-harness.js for more details on WebGL 2 conformance tests part 3
https://bugs.webkit.org/show_bug.cgi?id=189491

Reviewed by Dean Jackson.

Small update to the test-harness file used for the new 2.0.0 suite tests, as well as
expectation updates for the unskipped tests.

* webgl/2.0.0/conformance2/glsl3/array-as-return-value-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-assign-constructor-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-assign-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-complex-indexing-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-element-increment-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-equality-expected.txt:
* webgl/2.0.0/conformance2/glsl3/array-in-complex-expression-expected.txt:
* webgl/2.0.0/conformance2/glsl3/attrib-location-length-limits-expected.txt:
* webgl/2.0.0/conformance2/glsl3/bool-type-cast-bug-uint-ivec-uvec-expected.txt:
* webgl/2.0.0/conformance2/glsl3/compare-structs-containing-arrays-expected.txt:
* webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination-expected.txt:
* webgl/2.0.0/conformance2/glsl3/const-array-init-expected.txt:
* webgl/2.0.0/conformance2/glsl3/forbidden-operators-expected.txt:
* webgl/2.0.0/conformance2/glsl3/frag-depth-expected.txt:
* webgl/2.0.0/conformance2/glsl3/invalid-default-precision-expected.txt:
* webgl/2.0.0/conformance2/glsl3/invalid-invariant-expected.txt:
* webgl/2.0.0/conformance2/glsl3/loops-with-side-effects-expected.txt:
* webgl/2.0.0/conformance2/glsl3/misplaced-version-directive-expected.txt:
* webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader-expected.txt:
* webgl/2.0.0/conformance2/glsl3/sampler-no-precision-expected.txt:
* webgl/2.0.0/conformance2/glsl3/sequence-operator-returns-non-constant-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-linking-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-1024-character-define-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-1024-character-identifier.frag-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-define-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-identifier.frag-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-invalid-characters-expected.txt:
* webgl/2.0.0/conformance2/glsl3/shader-with-mis-matching-uniform-block-expected.txt:
* webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition-expected.txt:
* webgl/2.0.0/conformance2/glsl3/texture-offset-out-of-range-expected.txt:
* webgl/2.0.0/conformance2/glsl3/texture-offset-uniform-texture-coordinate-expected.txt:
* webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions-expected.txt:
* webgl/2.0.0/conformance2/glsl3/unary-minus-operator-in-dynamic-loop-expected.txt:
* webgl/2.0.0/conformance2/glsl3/uniform-block-layout-match-expected.txt:
* webgl/2.0.0/conformance2/glsl3/uniform-block-layouts-expected.txt:
* webgl/2.0.0/conformance2/glsl3/uniform-location-length-limits-expected.txt:
* webgl/2.0.0/conformance2/glsl3/valid-invariant-expected.txt:
* webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-expected.txt:
* webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-nv-driver-bug-expected.txt:
* webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt:
* webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object-expected.txt:
* webgl/2.0.0/resources/webkit-webgl-test-harness.js:
(list):
(window.webglTestHarness.reportResults):
(window.webglTestHarness.notifyFinished):

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

13 months agoWeb Inspector: Fix typo "vritualized"
commit-queue@webkit.org [Tue, 11 Sep 2018 19:51:19 +0000 (19:51 +0000)]
Web Inspector: Fix typo "vritualized"
https://bugs.webkit.org/show_bug.cgi?id=189511

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-09-11
Reviewed by Devin Rousso.

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

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

13 months agoShrink size of ResourseResponseBase
yusukesuzuki@slowstart.org [Tue, 11 Sep 2018 19:34:56 +0000 (19:34 +0000)]
Shrink size of ResourseResponseBase
https://bugs.webkit.org/show_bug.cgi?id=189501

Reviewed by Simon Fraser.

We reduce the size of ResourceResponseBase by the following two optimizations.

1. Use bitfields for bool flags and reorder them.

2. Use Markable<> in CacheControlDirectives, which is held by ResourceResponseBase.

This patch reduces the size of ResourceResponseBase from 416 to 392 bytes.

No behavior change.

* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::responseReceived):
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
* platform/network/CacheValidation.h:
(WebCore::CacheControlDirectives::CacheControlDirectives):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::contentRange const):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::decode):

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

13 months agoCrash under PlatformPopupMenuData::encode when interacting with a select menu that...
mmaxfield@apple.com [Tue, 11 Sep 2018 19:30:46 +0000 (19:30 +0000)]
Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
https://bugs.webkit.org/show_bug.cgi?id=188008

Reviewed by Alex Christensen.

Source/WebKit:

This patch is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=180307.
Variable fonts have CFDictionaries with non-string keys. We need to support that in our IPC code.

* Shared/cf/ArgumentCodersCF.cpp:
(IPC::encode):
(IPC::decode):

LayoutTests:

* fast/text/variations/ipc2-expected.txt: Added.
* fast/text/variations/ipc2.html: Added.

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

13 months ago[WPE][GTK] API documentation is unclear about how to modify requests before sending...
aperez@igalia.com [Tue, 11 Sep 2018 19:26:47 +0000 (19:26 +0000)]
[WPE][GTK] API documentation is unclear about how to modify requests before sending them
https://bugs.webkit.org/show_bug.cgi?id=189505

Reviewed by Michael Catanzaro.

Add notes to the API documentation to make explicit where modification
of WebKitURIRequest instances affects the request data sent over the
network.

* UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
modifications to the associated WebKitURIRequest do not affect the
actual request. Point to WebKitPage::send-request instead.
* UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_class_init): Ditto for the description of the
WebKitWebView::decide-policy signal. Also fix the syntax of example.
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
(webkit_web_page_class_init): Indicate that modifications to the
WebKitURIRequest will change the actual network request data.

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

13 months agoUnreviewed, attempt to fix Apple builds after r235903
mcatanzaro@igalia.com [Tue, 11 Sep 2018 19:19:52 +0000 (19:19 +0000)]
Unreviewed, attempt to fix Apple builds after r235903
https://bugs.webkit.org/show_bug.cgi?id=188872

If it really needs to be inlined, it will need to move to the header....

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageClient const):

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

13 months agoUnreviewed, fix build after r235903
mcatanzaro@igalia.com [Tue, 11 Sep 2018 18:56:09 +0000 (18:56 +0000)]
Unreviewed, fix build after r235903
https://bugs.webkit.org/show_bug.cgi?id=188872

This broke all ports except GTK. Need to add a missing header.

* UIProcess/PageClient.h:

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

13 months agoAdd missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
commit-queue@webkit.org [Tue, 11 Sep 2018 18:38:28 +0000 (18:38 +0000)]
Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
https://bugs.webkit.org/show_bug.cgi?id=189506

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2018-09-11
Reviewed by Tim Horton.

m_pipStandbyElement is only defined in
WebKit/WebProcess/FullScreen/WebFullScreenManager.h
only when ENABLE(VIDEO) (see
https://bugs.webkit.org/show_bug.cgi?id=181338)

* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::setPIPStandbyElement):

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

13 months agoTest for array initialization in arrayProtoFuncSplice.
mark.lam@apple.com [Tue, 11 Sep 2018 18:25:56 +0000 (18:25 +0000)]
Test for array initialization in arrayProtoFuncSplice.
https://bugs.webkit.org/show_bug.cgi?id=170253
<rdar://problem/31328773>

Rubber-stamped by Saam Barati.

* stress/regress-170253.js: Added.

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

13 months agoUnreviewed, fix some -Wreturn-type warnings
mcatanzaro@igalia.com [Tue, 11 Sep 2018 18:22:17 +0000 (18:22 +0000)]
Unreviewed, fix some -Wreturn-type warnings

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::sourceFromNewReceiver):
* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::toRTCRtpTransceiverDirection):
(WebCore::fromRTCRtpTransceiverDirection):

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

13 months agoWebPageProxy should hold a WeakPtr to its PageClient
mcatanzaro@igalia.com [Tue, 11 Sep 2018 18:16:58 +0000 (18:16 +0000)]
WebPageProxy should hold a WeakPtr to its PageClient
https://bugs.webkit.org/show_bug.cgi?id=188872

Reviewed by Ryosuke Niwa.

This ensures the PageClient reference is always valid when used.

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::setDragCaretRect):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::PageClientProtector::PageClientProtector):
(WebKit::PageClientProtector::~PageClientProtector):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::pageClient const):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
(WebKit::WebPageProxy::setViewNeedsDisplay):
(WebKit::WebPageProxy::requestScroll):
(WebKit::WebPageProxy::viewScrollPosition const):
(WebKit::WebPageProxy::updateActivityState):
(WebKit::WebPageProxy::activityStateDidChange):
(WebKit::WebPageProxy::viewDidEnterWindow):
(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::layerHostingModeDidChange):
(WebKit::WebPageProxy::viewSize const):
(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::didPerformDragOperation):
(WebKit::WebPageProxy::processNextQueuedMouseEvent):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::preferencesDidChange):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didDestroyNavigation):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didReachLayoutMilestone):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::setWindowFrame):
(WebKit::WebPageProxy::getWindowFrame):
(WebKit::WebPageProxy::getWindowFrameWithCallback):
(WebKit::WebPageProxy::screenToRootView):
(WebKit::WebPageProxy::rootViewToScreen):
(WebKit::WebPageProxy::syncRootViewToScreen):
(WebKit::WebPageProxy::accessibilityScreenToRootView):
(WebKit::WebPageProxy::rootViewToAccessibilityScreen):
(WebKit::WebPageProxy::didChangeViewportProperties):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::showShareSheet):
(WebKit::WebPageProxy::handleDownloadRequest):
(WebKit::WebPageProxy::didChangeContentSize):
(WebKit::WebPageProxy::showColorPicker):
(WebKit::WebPageProxy::showDataListSuggestions):
(WebKit::WebPageProxy::compositionWasCanceled):
(WebKit::WebPageProxy::registerInsertionUndoGrouping):
(WebKit::WebPageProxy::canUndoRedo):
(WebKit::WebPageProxy::executeUndoRedo):
(WebKit::WebPageProxy::clearAllEditCommands):
(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):
(WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::registerEditCommand):
(WebKit::WebPageProxy::canUndo):
(WebKit::WebPageProxy::canRedo):
(WebKit::WebPageProxy::setToolTip):
(WebKit::WebPageProxy::setCursor):
(WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):
(WebKit::WebPageProxy::exitAcceleratedCompositingMode):
(WebKit::WebPageProxy::updateAcceleratedCompositingMode):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
(WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
(WebKit::WebPageProxy::didFinishLoadingDataForCustomContentProvider):
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
(WebKit::WebPageProxy::showCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanelSoon):
(WebKit::WebPageProxy::recordAutocorrectionResponse):
(WebKit::WebPageProxy::useDarkAppearance const):
(WebKit::WebPageProxy::showDictationAlternativeUI):
(WebKit::WebPageProxy::removeDictationAlternatives):
(WebKit::WebPageProxy::dictationAlternatives):
(WebKit::WebPageProxy::setEditableElementIsFocused):
(WebKit::WebPageProxy::takeViewSnapshot):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
(WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
(WebKit::WebPageProxy::willRecordNavigationSnapshot):
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::videoControlsManagerDidChange):
(WebKit::WebPageProxy::handleControlledElementIDResponse const):
(WebKit::WebPageProxy::didPerformImmediateActionHitTest):
(WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
(WebKit::WebPageProxy::didHandleAcceptedCandidate):
(WebKit::WebPageProxy::addPlaybackTargetPickerClient):
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
(WebKit::WebPageProxy::didChangeBackgroundColor):
(WebKit::WebPageProxy::didRestoreScrollPosition):
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
(WebKit::WebPageProxy::didInsertAttachment):
(WebKit::WebPageProxy::didRemoveAttachment):
* UIProcess/WebPageProxy.h:
* UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
(WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::viewWidget):
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect const):
(WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
(WebKit::WebPageProxy::overflowScrollViewDidScroll):
(WebKit::WebPageProxy::overflowScrollWillStartScroll):
(WebKit::WebPageProxy::overflowScrollDidEndScroll):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::layerTreeCommitComplete):
(WebKit::WebPageProxy::didReceivePositionInformation):
(WebKit::WebPageProxy::saveImageToLibrary):
(WebKit::WebPageProxy::interpretKeyEvent):
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::couldNotRestorePageState):
(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):
(WebKit::WebPageProxy::didGetTapHighlightGeometries):
(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::stopAssistingNode):
(WebKit::WebPageProxy::showInspectorHighlight):
(WebKit::WebPageProxy::hideInspectorHighlight):
(WebKit::WebPageProxy::showInspectorIndication):
(WebKit::WebPageProxy::hideInspectorIndication):
(WebKit::WebPageProxy::enableInspectorNodeSearch):
(WebKit::WebPageProxy::disableInspectorNodeSearch):
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::commitPotentialTapFailed):
(WebKit::WebPageProxy::didNotHandleTapAsClick):
(WebKit::WebPageProxy::didCompleteSyntheticClick):
(WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::didHandleStartDataInteractionRequest):
(WebKit::WebPageProxy::didHandleAdditionalDragItemsRequest):
(WebKit::WebPageProxy::didConcludeEditDataInteraction):
(WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
(WebKit::WebPageProxy::insertDictatedTextAsync):
(WebKit::WebPageProxy::setPromisedDataForImage):
(WebKit::WebPageProxy::didPerformDictionaryLookup):
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::makeFirstResponder):
(WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
(WebKit::WebPageProxy::colorSpace):
(WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
(WebKit::WebPageProxy::setPluginComplexTextInputState):
(WebKit::WebPageProxy::executeSavedCommandBySelector):
(WebKit::WebPageProxy::intrinsicContentSizeDidChange):
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
(WebKit::WebPageProxy::acceleratedCompositingRootLayer const):
(WebKit::WebPageProxy::showPDFContextMenu):
(WebKit::WebPageProxy::showTelephoneNumberMenu):
(WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates const):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::startWindowDrag):
(WebKit::WebPageProxy::platformWindow):
(WebKit::WebPageProxy::rootViewToWindow):
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::inspectorAttachmentView):
(WebKit::WebPageProxy::remoteObjectRegistry):
* UIProcess/win/WebPageProxyWin.cpp:
(WebKit::WebPageProxy::viewWidget):
* UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::viewBackend):

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

13 months agoTest for IntlObject initialization.
mark.lam@apple.com [Tue, 11 Sep 2018 18:10:46 +0000 (18:10 +0000)]
Test for IntlObject initialization.
https://bugs.webkit.org/show_bug.cgi?id=170251
<rdar://problem/31328419>

Rubber-stamped by Saam Barati.

* stress/regress-170251.js: Added.

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

13 months agoTest for array memcpy'ing when JSGlobalObject::haveABadTime.
mark.lam@apple.com [Tue, 11 Sep 2018 17:59:37 +0000 (17:59 +0000)]
Test for array memcpy'ing when JSGlobalObject::haveABadTime.
https://bugs.webkit.org/show_bug.cgi?id=169889
<rdar://problem/31155607>

Reviewed by Saam Barati.

* stress/regress-169889-array-concat.js: Added.
* stress/regress-169889-array-concat1.js: Added.
* stress/regress-169889-array-slice.js: Added.

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

13 months agoUnreviewed, a speculative build fix for r235888.
jiewen_tan@apple.com [Tue, 11 Sep 2018 17:54:58 +0000 (17:54 +0000)]
Unreviewed, a speculative build fix for r235888.

* Modules/mediastream/MediaDevices.h:
Add class Document forward declaration.

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

13 months agoTest for incorrect check in emitPutDerivedConstructorToArrowFunctionContextScope.
mark.lam@apple.com [Tue, 11 Sep 2018 17:43:27 +0000 (17:43 +0000)]
Test for incorrect check in emitPutDerivedConstructorToArrowFunctionContextScope.
https://bugs.webkit.org/show_bug.cgi?id=169445
<rdar://problem/30957435>

Reviewed by Saam Barati.

* stress/regress-169445.js: Added.
(let.gun.eval.A):
(let.gun.eval.B.C):
(let.gun.eval.B.C.prototype.trigger):
(let.gun.eval.B.C.prototype.triggerWithRestParameters):
(let.gun.eval.B):
(let.gun.eval):

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

13 months agoRegression(PSON): "Swipe back" snapshot is missing when navigating back cross-process
cdumez@apple.com [Tue, 11 Sep 2018 17:42:28 +0000 (17:42 +0000)]
Regression(PSON): "Swipe back" snapshot is missing when navigating back cross-process
https://bugs.webkit.org/show_bug.cgi?id=189482
<rdar://problem/44317222>

Reviewed by Geoffrey Garen.

The issue was that when we swap process on navigation, we:
1. Call processDidTerminate() which calls resetState() and clears the displayed content
2. Reattach the WebPageProxy to a new WebProcess
3. Trigger the navigation
4. Take the navigation snapshot

When the navigation snapshot occurs at step 4, the view is already blank in the case of
process swap. To avoid the issue, we take the navigation snapshot earlier, before calling
processDidTerminate() and we suppress the next navigation snapshot as it would be blank.

At some point, we will likely want to display the previous' WebProcess content longer,
until the new WebProcess has something interesting to display. Once this is implemented,
we'll likely be able to drop the early snapshotting logic.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::suppressNextAutomaticNavigationSnapshot):

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

13 months agoAdd Web API Statistics Collection
commit-queue@webkit.org [Tue, 11 Sep 2018 17:14:07 +0000 (17:14 +0000)]
Add Web API Statistics Collection
https://bugs.webkit.org/show_bug.cgi?id=187773
<rdar://problem/44155162>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-11
Reviewed by Brent Fulgham.

Source/WebCore:

Added data collection for web API statistics, specifically regarding the canvas, font loads,
screen functions, and navigator functions. The data collection code is placed under a runtime
enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written
to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
includes a struct to keep track of HTML5 canvas element read and writes.

Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
       http/tests/webAPIStatistics/font-load-data-collection.html
       http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
       http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::load):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontAt):

The following are the functions where we'd like to record a canvas read.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toDataURL):
(WebCore::HTMLCanvasElement::toBlob):
(WebCore::HTMLCanvasElement::getImageData):
(WebCore::HTMLCanvasElement::toMediaSample):
(WebCore::HTMLCanvasElement::captureStream):

The following are the functions where we'd like to record a canvas write.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

The following files and functions handle the CanvasActivityRecord struct and
its respective functions.

* loader/CanvasActivityRecord.cpp: Added.
(WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
(WebCore::CanvasActivityRecord::mergeWith):
* loader/CanvasActivityRecord.h: Added.
(WebCore::CanvasActivityRecord::encode const):
(WebCore::CanvasActivityRecord::decode):

* loader/DocumentThreadableLoader.cpp:
* loader/FrameLoader.cpp:
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):

Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key.
Now the encodeHashSet function has been generalized to take any key to encode the entries
in the HashSet. Also added functionality to encode an OptionSet by converting it to its
raw bitmask state.

* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::encodeHashSet):
(WebCore::encodeOriginHashSet):
(WebCore::encodeOptionSet):
(WebCore::encodeFontHashSet):
(WebCore::encodeCanvasActivityRecord):
(WebCore::ResourceLoadStatistics::encode const):
(WebCore::decodeHashSet):
(WebCore::decodeOriginHashSet):
(WebCore::decodeOptionSet):
(WebCore::decodeFontHashSet):
(WebCore::decodeCanvasActivityRecord):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::navigatorAPIEnumToString):
(WebCore::screenAPIEnumToString):
(WebCore::appendNavigatorAPIOptionSet):
(WebCore::appendScreenAPIOptionSet):
(WebCore::ResourceLoadStatistics::toString const):
(WebCore::ResourceLoadStatistics::merge):
* loader/ResourceLoadStatistics.h:
* loader/ResourceTiming.cpp:

The following are the navigator functions recorded for the web API statistics.

* page/Navigator.cpp:
(WebCore::Navigator::appVersion const):
(WebCore::Navigator::userAgent const):
(WebCore::Navigator::plugins):
(WebCore::Navigator::mimeTypes):
(WebCore::Navigator::cookieEnabled const):
(WebCore::Navigator::javaEnabled const):

The following are the screen functions recorded for the web API statistics.

* page/Screen.cpp:
(WebCore::Screen::height const):
(WebCore::Screen::width const):
(WebCore::Screen::colorDepth const):
(WebCore::Screen::pixelDepth const):
(WebCore::Screen::availLeft const):
(WebCore::Screen::availTop const):
(WebCore::Screen::availHeight const):
(WebCore::Screen::availWidth const):

Source/WebKit:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:

LayoutTests:

Added new tests and expectations for the web API statistics data collection.

* TestExpectations:
* http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt: Added.
* http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html: Added.
* http/tests/webAPIStatistics/font-load-data-collection-expected.txt: Added.
* http/tests/webAPIStatistics/font-load-data-collection.html: Added.
* http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt: Added.
* http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html: Added.
* http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt: Added.
* http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html: Added.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

13 months agoUnreviewed, rebaseline imported/w3c/web-platform-tests/css/cssom/interfaces.html...
cdumez@apple.com [Tue, 11 Sep 2018 16:24:21 +0000 (16:24 +0000)]
Unreviewed, rebaseline imported/w3c/web-platform-tests/css/cssom/interfaces.html after r235889.

* web-platform-tests/css/cssom/interfaces-expected.txt:

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

13 months agoplaybackControlsManagerUpdateTimerFired and
commit-queue@webkit.org [Tue, 11 Sep 2018 16:07:45 +0000 (16:07 +0000)]
playbackControlsManagerUpdateTimerFired and
m_playbackControlsManagerUpdateTimer must be
guarded with ENABLE(VIDEO), otherwise the following
error occurs with the VIDEO feature turned off:

  error: 'MediaElementSession' has not been declared

Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
https://bugs.webkit.org/show_bug.cgi?id=189500

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2018-09-11
Reviewed by Anders Carlsson.

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::schedulePlaybackControlsManagerUpdate):
* page/Page.h:

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

13 months agoRefactor filter list checking code
fred.wang@free.fr [Tue, 11 Sep 2018 12:48:33 +0000 (12:48 +0000)]
Refactor filter list checking code
https://bugs.webkit.org/show_bug.cgi?id=185087

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-11
Reviewed by Antonio Gomes.

No new tests, behavior unchanged.

* page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.

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

13 months agoModify more tests to use document.scrollingElement to access viewport scroll properties
commit-queue@webkit.org [Tue, 11 Sep 2018 12:47:54 +0000 (12:47 +0000)]
Modify more tests to use document.scrollingElement to access viewport scroll properties
https://bugs.webkit.org/show_bug.cgi?id=189495

After r235806, it is wrong to use document.body to access scroll properties of the viewport
in standard mode. New tests added since r227781 are modified to use
document.scrollingElement instead and avoid flaky behavior. For consistency, we do the same
for old tests in quirks mode. Note that WPT tests as well as the following tests using
document.body on purpose are not modified:
- fast/dom/Element/*
- events/scroll-in-scaled-page-with-overflow-hidden.html
- compositing/ios/overflow-scroll-update-overlap.html
- body-stuck-with-dirty-bit-with-columns.html

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-11
Reviewed by Antonio Gomes.

* compositing/rtl/rtl-absolute-overflow-scrolled.html:
* compositing/rtl/rtl-fixed-overflow-scrolled.html:
* editing/caret/ios/absolute-caret-position-after-scroll.html:
* editing/caret/ios/fixed-caret-position-after-scroll.html:
* editing/execCommand/delete-no-scroll.html:
* editing/input/resources/reveal-utilities.js:
(performJumpAtTheEdgeTest):
* editing/pasteboard/copy-crash.html:
* editing/selection/ios/absolute-selection-after-scroll.html:
* editing/selection/ios/fixed-selection-after-scroll.html:
* fast/autoresize/autoresize-with-iframe-expected.txt:
* fast/autoresize/autoresize-with-iframe.html:
* fast/autoresize/basic-expected.txt:
* fast/autoresize/basic.html:
* fast/autoresize/turn-off-autoresize-expected.txt:
* fast/autoresize/turn-off-autoresize.html:
* fast/css/element-scrollByLines-scrollByPages-obsolete.html:
* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/non-numeric-values-numeric-parameters.html:
* fast/dom/resources/check-scroll-position-onload.html:
* fast/dom/scroll-position-for-new-loads.html:
* fast/events/attempt-scroll-with-no-scrollbars.html:
* fast/events/fire-scroll-event.html:
* fast/events/frame-scroll-fake-mouse-move.html:
* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt:
* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html:
* fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html:
* fast/events/mouse-cursor-image-set.html:
* fast/events/mouse-cursor-multiframecur.html:
* fast/events/mouse-cursor.html:
* fast/events/no-scroll-on-input-text-selection-expected.txt:
* fast/events/no-scroll-on-input-text-selection.html:
* fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt:
* fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html:
* fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt:
* fast/events/platform-wheelevent-paging-x-in-scrolling-page.html:
* fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt:
* fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html:
* fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt:
* fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html:
* fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt:
* fast/events/platform-wheelevent-paging-y-in-scrolling-page.html:
* fast/events/scale-and-scroll-body-expected.txt:
* fast/events/scale-and-scroll-body.html:
* fast/events/scale-and-scroll-window-expected.txt:
* fast/events/scale-and-scroll-window.html:
* fast/events/scroll-after-click-on-tab-index.html:
* fast/events/scroll-to-anchor-in-overflow-hidden.html:
* fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt:
* fast/events/touch/ios/touchmove-cancelable-after-touchstart.html:
* fast/forms/autofocus-opera-003.html:
* fast/forms/input-readonly-autoscroll.html:
* fast/forms/resources/common.js:
(getAbsoluteRect):
* fast/frames/iframe-scroll-page-up-down.html:
* fast/frames/transparent-scrollbar.html:
* fast/harness/results.html:
* fast/html/empty-fragment-id-goto-top-expected.txt:
* fast/html/empty-fragment-id-goto-top.html:
* fast/images/imagemap-scroll.html:
* fast/loader/scroll-position-restored-on-back-non-cached.html:
* fast/loader/scroll-position-restored-on-back.html:
* fast/multicol/body-stuck-with-dirty-bit-with-columns.html:
* fast/repaint/resources/iframe-scroll-repaint-iframe.html:
* fast/scrolling/ios/iframe-scroll-into-view.html:
* fast/scrolling/latching/scroll-div-latched-div.html:
* fast/scrolling/latching/scroll-div-latched-mainframe.html:
* fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html:
* fast/scrolling/latching/scroll-iframe-fragment.html:
* fast/scrolling/latching/scroll-iframe-latched-iframe.html:
* fast/scrolling/latching/scroll-iframe-latched-mainframe.html:
* fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html:
* fast/scrolling/latching/scroll-select-bottom-test.html:
* fast/scrolling/latching/scroll-select-latched-mainframe.html:
* fast/scrolling/latching/scroll-select-latched-select.html:
* fast/scrolling/rtl-point-in-iframe.html:
* fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html:
* fast/table/assert-when-visual-overflow-is-cleared.html:
* fast/transforms/selection-bounds-in-transformed-view.html:
* http/tests/navigation/anchor-frames-cross-origin-expected.txt:
* http/tests/navigation/resources/frame-with-anchor-cross-origin.html:
* jquery/resources/test/unit/offset.js:
* legacy-animation-engine/fast/harness/results.html:
* media/video-controls-to-not-scroll-page-on-load.html:
* media/video-main-content-allow-then-scroll-expected.txt:
* media/video-main-content-allow-then-scroll.html:
* scrollbars/scrollbar-large-overflow-rectangle.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
* tiled-drawing/scrolling/latched-to-deleted-node.html:
* tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html:
* tiled-drawing/scrolling/non-fast-region/top-content-inset.html:
* tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html:
* tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html:

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

13 months agoUnreviewed follow-up to ChangeLog roll-over
philn@webkit.org [Tue, 11 Sep 2018 10:10:52 +0000 (10:10 +0000)]
Unreviewed follow-up to ChangeLog roll-over

Those 2 ChangeLogs are not meant to be here.

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

13 months ago== Rolled over to ChangeLog-2018-09-11 ==
philn@webkit.org [Tue, 11 Sep 2018 08:24:30 +0000 (08:24 +0000)]
== Rolled over to ChangeLog-2018-09-11 ==

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

13 months ago[GStreamer] use-after-free in MockVideoCaptureSource
philn@webkit.org [Tue, 11 Sep 2018 08:20:13 +0000 (08:20 +0000)]
[GStreamer] use-after-free in MockVideoCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=189462

Reviewed by Xabier Rodriguez-Calvar.

* platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
(WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer):
Copy the BGRA data before passing ownership to GStreamer. Also
include a few code style cosmetic changes.

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

13 months agoUpdate idlharness.js and webidl2.js.
Ms2ger@igalia.com [Tue, 11 Sep 2018 08:14:48 +0000 (08:14 +0000)]
Update idlharness.js and webidl2.js.
https://bugs.webkit.org/show_bug.cgi?id=189303

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update idlharness.js and webidl2.js. Fix tests that are now broken
because of increased strictness in the harness. Fix tests that have
been broken for a while.

Update expectations. (The main change is the removal of "Unscopable
handled correctly for ..." subtests.)

* web-platform-tests/FileAPI/idlharness-expected.txt:
* web-platform-tests/FileAPI/idlharness.html: Update from upstream.
* web-platform-tests/FileAPI/idlharness.worker-expected.txt:
* web-platform-tests/FileAPI/idlharness.worker.js: Update from upstream.
* web-platform-tests/IndexedDB/interfaces.any-expected.txt:
* web-platform-tests/IndexedDB/interfaces.any.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/idlharness.https-expected.txt:
* web-platform-tests/WebCryptoAPI/idlharness.https.worker-expected.txt:
* web-platform-tests/WebIDL/interfaces-expected.txt:
* web-platform-tests/credential-management/idl.https-expected.txt:
* web-platform-tests/css/cssom-view/interfaces-expected.txt:
* web-platform-tests/css/geometry/interfaces-expected.txt:
* web-platform-tests/css/geometry/interfaces.worker-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/interfaces.html: Use the new method for dependency IDLs.
* web-platform-tests/encoding/idlharness-expected.txt:
* web-platform-tests/eventsource/interfaces-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/hr-time/idlharness-expected.txt:
* web-platform-tests/hr-time/idlharness.html: Add missing dependency IDL.
* web-platform-tests/html/webappapis/animation-frames/idlharness-expected.txt:
* web-platform-tests/interfaces/IndexedDB.idl: Fix bug caught by stricter IDL parser.
* web-platform-tests/interfaces/intersection-observer.idl: Added from upstream.
* web-platform-tests/interfaces/web-audio-api.idl:
  Added to fix webaudio/the-audio-api/{the-gainnode-interface, the-delaynode-interface}/idl-test.html.
* web-platform-tests/intersection-observer/idlharness.window-expected.txt:
  Update for added intersection-observer.idl.
* web-platform-tests/media-source/interfaces-expected.txt: Update from macOS.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt:
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all.html: Add missing dependency IDLs.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt:
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices.html: Add missing dependency IDLs.
* web-platform-tests/notifications/interfaces-expected.txt:
* web-platform-tests/payment-request/idlharness.https.window-expected.txt:
* web-platform-tests/resource-timing/idlharness-expected.txt:
* web-platform-tests/resources/idlharness.js:
* web-platform-tests/resources/webidl2/CHANGELOG.md: Added.
* web-platform-tests/resources/webidl2/README.md:
* web-platform-tests/resources/webidl2/checker/index.html: Added.
* web-platform-tests/resources/webidl2/checker/w3c-import.log: Added.
* web-platform-tests/resources/webidl2/lib/w3c-import.log:
* web-platform-tests/resources/webidl2/lib/webidl2.js:
* web-platform-tests/resources/webidl2/lib/writer.js:
* web-platform-tests/resources/webidl2/package-lock.json: Added.
* web-platform-tests/resources/webidl2/package.json:
* web-platform-tests/resources/webidl2/test/invalid.js:
* web-platform-tests/resources/webidl2/test/invalid/idl/array.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl.
* web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl.
* web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl.
* web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl.
* web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl:
* web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl: Added.
* web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log:
* web-platform-tests/resources/webidl2/test/invalid/json/array.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/caller.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json:
* web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/enum.json:
* web-platform-tests/resources/webidl2/test/invalid/json/exception.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/iterator.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json:
* web-platform-tests/resources/webidl2/test/invalid/json/module.json:
* web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json:
* web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json:
* web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/raises.json:
* web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json:
* web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/record-key.json:
* web-platform-tests/resources/webidl2/test/invalid/json/record-single.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json:
* web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json:
* web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json:
* web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json:
* web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json:
* web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json:
* web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/union-one.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json: Added.
* web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log:
* web-platform-tests/resources/webidl2/test/syntax.js:
* web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl: Removed.
* web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl: Removed.
* web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl: Added.
* web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl: Added.
* web-platform-tests/resources/webidl2/test/syntax/idl/record.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl: Removed.
* web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl.
* web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl:
* web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log:
* web-platform-tests/resources/webidl2/test/syntax/json/allowany.json:
* web-platform-tests/resources/webidl2/test/syntax/json/array.json: Removed.
* web-platform-tests/resources/webidl2/test/syntax/json/attributes.json:
* web-platform-tests/resources/webidl2/test/syntax/json/callback.json:
* web-platform-tests/resources/webidl2/test/syntax/json/caller.json: Removed.
* web-platform-tests/resources/webidl2/test/syntax/json/constants.json:
* web-platform-tests/resources/webidl2/test/syntax/json/constructor.json:
* web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json:
* web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json:
* web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json:
* web-platform-tests/resources/webidl2/test/syntax/json/documentation.json:
* web-platform-tests/resources/webidl2/test/syntax/json/enum.json:
* web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json:
* web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json:
* web-platform-tests/resources/webidl2/test/syntax/json/exception.json: Removed.
* web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json:
* web-platform-tests/resources/webidl2/test/syntax/json/generic.json:
* web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json:
* web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json:
* web-platform-tests/resources/webidl2/test/syntax/json/implements.json:
* web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json:
* web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json:
* web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json:
* web-platform-tests/resources/webidl2/test/syntax/json/iterable.json:
* web-platform-tests/resources/webidl2/test/syntax/json/iterator.json:
* web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json:
* web-platform-tests/resources/webidl2/test/syntax/json/maplike.json:
* web-platform-tests/resources/webidl2/test/syntax/json/mixin.json: Added.
* web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json:
* web-platform-tests/resources/webidl2/test/syntax/json/namespace.json:
* web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json:
* web-platform-tests/resources/webidl2/test/syntax/json/nullable.json:
* web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json:
* web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json:
* web-platform-tests/resources/webidl2/test/syntax/json/overloading.json:
* web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json:
* web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json:
* web-platform-tests/resources/webidl2/test/syntax/json/primitives.json:
* web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json: Added.
* web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json:
* web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json:
* web-platform-tests/resources/webidl2/test/syntax/json/record.json:
* web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json:
* web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json:
* web-platform-tests/resources/webidl2/test/syntax/json/sequence.json:
* web-platform-tests/resources/webidl2/test/syntax/json/serializer.json: Removed.
* web-platform-tests/resources/webidl2/test/syntax/json/setlike.json:
* web-platform-tests/resources/webidl2/test/syntax/json/static.json:
* web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json:
* web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json:
* web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json:
* web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json:
* web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json:
* web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json:
* web-platform-tests/resources/webidl2/test/syntax/json/typedef.json:
* web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json:
* web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json:
* web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json:
* web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log:
* web-platform-tests/resources/webidl2/test/util/acquire.js: Added.
* web-platform-tests/resources/webidl2/test/util/collect.js: Added.
* web-platform-tests/resources/webidl2/test/util/w3c-import.log: Added.
* web-platform-tests/resources/webidl2/test/w3c-import.log:
* web-platform-tests/resources/webidl2/test/web/w3c-import.log:
* web-platform-tests/resources/webidl2/test/writer.js: Added.
* web-platform-tests/resources/webidl2/w3c-import.log:
* web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:
* web-platform-tests/service-workers/service-worker/interfaces-window.https-expected.txt:
* web-platform-tests/url/interfaces.any-expected.txt:
* web-platform-tests/url/interfaces.any.worker-expected.txt:
* web-platform-tests/user-timing/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/AnimationEffectTiming/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/AnimationPlaybackEvent/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/DocumentTimeline/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness-expected.txt:
* web-platform-tests/web-share/idlharness.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html: Escape less-than signs.
* web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html: Escape less-than signs.
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/idl-test-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/idl-test-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/idl-test.html: Escape less-than signs.
* web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/idl-test-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/idl-test.html: Escape less-than signs.
* web-platform-tests/workers/interfaces.worker-expected.txt:
* web-platform-tests/xhr/idlharness.any-expected.txt:
* web-platform-tests/xhr/idlharness.any.worker-expected.txt:
* web-platform-tests/xhr/interfaces-expected.txt:

LayoutTests:

Updated expectations.

* http/wpt/credential-management/idl.https-expected.txt:
* http/wpt/entries-api/interfaces-expected.txt:
* http/wpt/webauthn/idl.https-expected.txt:
* http/wpt/webauthn/idl.https.html: Fix confusion in untested IDLs.
* platform/ios-wk2/imported/w3c/web-platform-tests/web-share/idlharness.https-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt: Removed; the platform-neutral file was updated.

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

13 months ago[WebAuthN] Polish AuthenticatorManager and rename it to AuthenticatorCoordinator
jiewen_tan@apple.com [Tue, 11 Sep 2018 07:59:20 +0000 (07:59 +0000)]
[WebAuthN] Polish AuthenticatorManager and rename it to AuthenticatorCoordinator
https://bugs.webkit.org/show_bug.cgi?id=189277
<rdar://problem/44115936>

Reviewed by Chris Dumez.

Source/WebCore:

This patch aims to polish AuthenticatorManager such that:
1) It is no longer a singleton. Instead, it will live with Page. It was a singleton simply because static
PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable() have to access it. However, this request
can be fulfilled by adding an attribute [CallWith=Document] to the IDL defination. Therefore, there is no
such need. Also, the singleton is illy implemented as it owns a single IPC proxy to UI Process which means
different web pages will talk to the same web page proxy. Anyway, making it live with Page should fix everything.
2) Since we are now planning to support external authenticators, the manager of all authenticators will then
have to live in UI Process which makes this AuthenticatorManager obsolete. Instead, rename it to AuthenticatorCoordinator.
3) Rename CredentialsMessenger to AuthenticatorCoordinatorClient to tight it to WebAuthN. Also, simplify the
message reply model as PublicKeyCredentialCreationOptions/PublicKeyCredentialRequestOptions =>
ExceptionData/PublicKeyCredentialData for makeCredential/getAssertion operations.
4) Restrict one request per time, i.e. makeCredential/getAssertion for a single page.
5) Unifying makeCredentialReply/getAssertionReply/exceptionReply into requestReply for IPC. Correspondingly,
unify callback and exceptionCallback into callback as well for LocalAuthenticator.
6) Enhance PublicKeyCredentialCreationOptions encoding/decoding with encoder.encodeFixedLengthData/decoder.decodeFixedLengthData.

Covered by existing tests.

* DerivedSources.make:
* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::get):
(WebCore::CredentialsContainer::isCreate):
* Modules/credentialmanagement/CredentialsContainer.h:
* Modules/credentialmanagement/CredentialsMessenger.cpp: Removed.
* Modules/credentialmanagement/CredentialsMessenger.h: Removed.
* Modules/webauthn/AuthenticatorAssertionResponse.cpp: Removed.
* Modules/webauthn/AuthenticatorAssertionResponse.h:
(WebCore::AuthenticatorAssertionResponse::create):
(WebCore::AuthenticatorAssertionResponse::authenticatorData const):
(WebCore::AuthenticatorAssertionResponse::signature const):
(WebCore::AuthenticatorAssertionResponse::userHandle const):
(WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
* Modules/webauthn/AuthenticatorAttestationResponse.cpp: Removed.
* Modules/webauthn/AuthenticatorAttestationResponse.h:
(WebCore::AuthenticatorAttestationResponse::create):
(WebCore::AuthenticatorAttestationResponse::attestationObject const):
(WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):
* Modules/webauthn/AuthenticatorCoordinator.cpp: Renamed from Source/WebCore/Modules/webauthn/AuthenticatorManager.cpp.
(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):
(WebCore::AuthenticatorCoordinatorInternal::initTimeoutTimer):
(WebCore::AuthenticatorCoordinatorInternal::didTimeoutTimerFire):
(WebCore::AuthenticatorCoordinator::AuthenticatorCoordinator):
(WebCore::AuthenticatorCoordinator::setClient):
(WebCore::AuthenticatorCoordinator::create const):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
(WebCore::AuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable const):
* Modules/webauthn/AuthenticatorCoordinator.h: Renamed from Source/WebCore/Modules/webauthn/AuthenticatorManager.h.
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp: Added.
(WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient):
(WebCore::AuthenticatorCoordinatorClient::requestReply):
(WebCore::AuthenticatorCoordinatorClient::isUserVerifyingPlatformAuthenticatorAvailableReply):
(WebCore::AuthenticatorCoordinatorClient::setRequestCompletionHandler):
(WebCore::AuthenticatorCoordinatorClient::addQueryCompletionHandler):
* Modules/webauthn/AuthenticatorCoordinatorClient.h: Copied from Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h.
* Modules/webauthn/AuthenticatorResponse.cpp: Removed.
* Modules/webauthn/AuthenticatorResponse.h:
(WebCore::AuthenticatorResponse::AuthenticatorResponse):
(WebCore::AuthenticatorResponse::clientDataJSON const):
* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::create):
(WebCore::PublicKeyCredential::tryCreate):
(WebCore::PublicKeyCredential::PublicKeyCredential):
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
* Modules/webauthn/PublicKeyCredential.h:
* Modules/webauthn/PublicKeyCredential.idl:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
(WebCore::PublicKeyCredentialCreationOptions::encode const):
(WebCore::PublicKeyCredentialCreationOptions::decode):
* Modules/webauthn/PublicKeyCredentialData.h: Added.
(WebCore::PublicKeyCredentialData::encode const):
(WebCore::PublicKeyCredentialData::decode):
* Modules/webauthn/cocoa/LocalAuthenticator.h:
* Modules/webauthn/cocoa/LocalAuthenticator.mm:
(WebCore::LocalAuthenticator::makeCredential):
(WebCore::LocalAuthenticator::getAssertion):
* Modules/webvr/VRStageParameters.cpp:
Add a header file to prevent linkage error.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp:
* page/Page.h:
(WebCore::Page::authenticatorCoordinator const):
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::mockAuthenticatorCoordinator const):
(WebCore::Internals::mockCredentialsMessenger const): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
* testing/MockAuthenticatorCoordinator.cpp: Added.
(WebCore::MockAuthenticatorCoordinator::setCreationReturnBundle):
(WebCore::MockAuthenticatorCoordinator::setAssertionReturnBundle):
(WebCore::MockAuthenticatorCoordinator::makeCredential):
(WebCore::MockAuthenticatorCoordinator::getAssertion):
(WebCore::MockAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
* testing/MockAuthenticatorCoordinator.h: Renamed from Source/WebCore/testing/MockCredentialsMessenger.h.
* testing/MockAuthenticatorCoordinator.idl: Renamed from Source/WebCore/testing/MockCredentialsMessenger.idl.
* testing/MockCredentialsMessenger.cpp: Removed.

Source/WebKit:

* DerivedSources.make:
* SourcesCocoa.txt:
* UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Removed.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp: Added.
(WebKit::WebAuthenticatorCoordinatorProxy::WebAuthenticatorCoordinatorProxy):
(WebKit::WebAuthenticatorCoordinatorProxy::~WebAuthenticatorCoordinatorProxy):
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebAuthenticatorCoordinatorProxy::requestReply):
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailableReply):
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: Renamed from Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in: Renamed from Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in.
* UIProcess/WebPageProxy.cpp:
(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Removed.
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: Added.
(WebKit::WebAuthenticatorCoordinator::WebAuthenticatorCoordinator):
(WebKit::WebAuthenticatorCoordinator::~WebAuthenticatorCoordinator):
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h: Renamed from Source/WebKit/WebProcess/CredentialManagement/WebCredentialsMessenger.h.
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.messages.in: Renamed from Source/WebKit/WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_cpuLimit):
(WebKit::m_credentialsMessenger): Deleted.
* WebProcess/WebPage/WebPage.h:

Tools:

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

LayoutTests:

* http/wpt/credential-management/credentialscontainer-store-basics.https.html:
* http/wpt/webauthn/idl.https.html:
* http/wpt/webauthn/public-key-credential-create-failure.https.html:
* http/wpt/webauthn/public-key-credential-create-success.https.html:
* http/wpt/webauthn/public-key-credential-get-failure.https.html:
* http/wpt/webauthn/public-key-credential-get-success.https.html:
* http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available.html:

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

13 months agoUnreviewed, add yet another email address to the collection.
rwlbuis@webkit.org [Tue, 11 Sep 2018 07:10:35 +0000 (07:10 +0000)]
Unreviewed, add yet another email address to the collection.

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

13 months agoRemove unused needsDestruction class variables from HashTraits
Hironori.Fujii@sony.com [Tue, 11 Sep 2018 05:18:31 +0000 (05:18 +0000)]
Remove unused needsDestruction class variables from HashTraits
https://bugs.webkit.org/show_bug.cgi?id=189490

Reviewed by Daniel Bates.

Source/WebCore:

needsDestruction has been obsoleted in Bug 121983.

No new tests (No behavior change).

* css/makeprop.pl: Removed needsDestruction.
* platform/graphics/FloatSizeHash.h: Ditto.
* platform/graphics/IntPointHash.h: Ditto.
* platform/graphics/IntRectHash.h: Ditto.
* platform/graphics/IntSizeHash.h: Ditto.
* platform/graphics/WidthCache.h: Ditto.

Source/WebKitLegacy/mac:

* History/BinaryPropertyList.cpp: Removed needsDestruction.

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

13 months agoTest262 failure with Named Capture Groups - using a reference before the group is...
msaboff@apple.com [Tue, 11 Sep 2018 04:53:56 +0000 (04:53 +0000)]
Test262 failure with Named Capture Groups - using a reference before the group is defined
https://bugs.webkit.org/show_bug.cgi?id=189407

Reviewed by Alex Christensen.

JSTests:

Re-enabled previously failing test.

* test262.yaml:
* test262/expectations.yaml:

Source/JavaScriptCore:

Added code to save the named forward references we see during parsing and validating that
they are all present when parsing the RegExp is complete.  If there are unnamed references,
we reparse with some variation of behavior.  Just like for numeric references, the
behavior is different depending on whether or not the unicode (u flag) is present.
For non-unicode patterns, we treat the \k<...> as a literal pattern.  For a unicode
pattern we throw an exception.

Did some refactoring, renaming YarrPattern::reset() and YarrPatternConstructor::reset()
resetForReparsing() as that is the only use for those methods.  Also changed
all the delegate methods that take a String to take a const String& to eliminate
copy churn.

* yarr/YarrParser.h:
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomNamedBackReference):
(JSC::Yarr::Parser::CharacterClassParserDelegate::isValidNamedForwardReference):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomNamedForwardReference):
(JSC::Yarr::Parser::parseEscape):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::resetForReparsing):
(JSC::Yarr::YarrPatternConstructor::saveUnmatchedNamedForwardReferences):
(JSC::Yarr::YarrPatternConstructor::atomNamedBackReference):
(JSC::Yarr::YarrPatternConstructor::isValidNamedForwardReference):
(JSC::Yarr::YarrPatternConstructor::atomNamedForwardReference):
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPatternConstructor::reset): Deleted.
* yarr/YarrPattern.h:
(JSC::Yarr::YarrPattern::resetForReparsing):
(JSC::Yarr::YarrPattern::containsIllegalNamedForwardReferences):
(JSC::Yarr::YarrPattern::reset): Deleted.
* yarr/YarrSyntaxChecker.cpp:
(JSC::Yarr::SyntaxChecker::atomNamedBackReference):
(JSC::Yarr::SyntaxChecker::isValidNamedForwardReference):
(JSC::Yarr::SyntaxChecker::atomNamedForwardReference):

Source/WebCore:

Created new delegate stubs for RegExp parsing.  These are not needed for the URL filtering
use cases.  Also changed all the delegate methods that take a String to take
const String& to eliminate copy churn.

Updated TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::PatternParser::atomNamedBackReference):
(WebCore::ContentExtensions::PatternParser::isValidNamedForwardReference):
(WebCore::ContentExtensions::PatternParser::atomNamedForwardReference):
(WebCore::ContentExtensions::URLFilterParser::statusString):
* contentextensions/URLFilterParser.h:

Tools:

Updated test.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):

LayoutTests:

Updated tests.

* js/regexp-named-capture-groups-expected.txt:
* js/script-tests/regexp-named-capture-groups.js:

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

13 months agoUpdate shadow DOM and custom elements tests
rniwa@webkit.org [Tue, 11 Sep 2018 03:59:41 +0000 (03:59 +0000)]
Update shadow DOM and custom elements tests
https://bugs.webkit.org/show_bug.cgi?id=189494

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Re-imported WPT tests for shadow DOM and custom elements.

* resources/import-expectations.json:
* web-platform-tests/custom-elements/range-and-constructors-expected.txt: Added.
* web-platform-tests/custom-elements/range-and-constructors.html: Added.
* web-platform-tests/custom-elements/w3c-import.log:
* web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt:
* web-platform-tests/shadow-dom/Document-prototype-currentScript.html:
* web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt: Added.
* web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt:
* web-platform-tests/shadow-dom/Element-interface-attachShadow.html:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html:
* web-platform-tests/shadow-dom/OWNERS: Removed.
* web-platform-tests/shadow-dom/directionality-001.tentative-expected.html: Added.
* web-platform-tests/shadow-dom/directionality-001.tentative.html: Added.
* web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt: Added.
* web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html: Added.
* web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt: Added.
* web-platform-tests/shadow-dom/form-control-form-attribute.html: Added.
* web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt: Added.
* web-platform-tests/shadow-dom/getElementById-dynamic-001.html: Added.
* web-platform-tests/shadow-dom/input-element-list-expected.txt: Added.
* web-platform-tests/shadow-dom/input-element-list.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html: Added.
* web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt:
* web-platform-tests/shadow-dom/leaktests/get-elements.html:
* web-platform-tests/shadow-dom/leaktests/w3c-import.log:
* web-platform-tests/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithEventLog):
* web-platform-tests/shadow-dom/resources/shadow-dom-utils.js:
* web-platform-tests/shadow-dom/resources/w3c-import.log:
* web-platform-tests/shadow-dom/w3c-import.log:

LayoutTests:

Skip the test hitting a debug assertion until the bug 189493 is fixed.

* TestExpectations:

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

13 months agoUnreviewed, fix ProcessSwap API tests after r235867.
cdumez@apple.com [Tue, 11 Sep 2018 01:35:44 +0000 (01:35 +0000)]
Unreviewed, fix ProcessSwap API tests after r235867.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::exitAcceleratedCompositingMode):
Add null-check for drawing area.

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

13 months ago[WHLSL] Inlining should be optional
commit-queue@webkit.org [Tue, 11 Sep 2018 01:25:13 +0000 (01:25 +0000)]
[WHLSL] Inlining should be optional
https://bugs.webkit.org/show_bug.cgi?id=188641

Patch by Thomas Denney <tdenney@apple.com> on 2018-09-10
Reviewed by Myles C. Maxfield.

Inlining functions is now optional, and disabled by default. This patch
additionally resolves https://bugs.webkit.org/show_bug.cgi?id=189326 as
the code for calling functions was completely rewritten.

* WebGPUShadingLanguageRI/All.js: Add LateCheckAndLayoutBuffers.js
* WebGPUShadingLanguageRI/CallFunction.js:
(callFunction): Remove dependency on inlining.
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype._snapshot): Allow null srcPtr in the case of void
returns from functions.
(Evaluator.prototype._evaluateArguments): Abstract out argument
evaluation, ensuring that the order is right-to-left for
FunctionLikeBlocks (i.e. inlined functions) and regular calls.
(Evaluator.prototype._evaluateFunction): Abstracted out function body
evaluation for inlined and non-inlined functions.
(Evaluator.prototype.visitFunctionLikeBlock): Ditto.
(Evaluator.prototype.visitCallExpression): Ditto.
* WebGPUShadingLanguageRI/Inline.js:
(_inlineFunction): Moved logic that is needed regardless of inlining
into LateCheckAndLayoutBuffers.js
(resolveInlinedFunction): Deleted.
* WebGPUShadingLanguageRI/LateCheckAndLayoutBuffers.js: Moved logic for
late checking.
* WebGPUShadingLanguageRI/Prepare.js: Make inlining optional and off by
default.
* WebGPUShadingLanguageRI/SPIRV.html: Update include.
* WebGPUShadingLanguageRI/Test.html: Ditto.
* WebGPUShadingLanguageRI/Test.js: Right-to-left argument evaluation,
and inlining tests.
* WebGPUShadingLanguageRI/index.html: Update include.

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

13 months ago[iOS] Unable to change the value of select elements while preserving focus state
wenson_hsieh@apple.com [Tue, 11 Sep 2018 01:18:05 +0000 (01:18 +0000)]
[iOS] Unable to change the value of select elements while preserving focus state
https://bugs.webkit.org/show_bug.cgi?id=189475
<rdar://problem/41125764>

Reviewed by Tim Horton.

Source/WebKit:

With UITextInputMultiDocument support in WebKit (r226911), WKContentView may enter a state where the user is
able to interact with web content, but focus state is being preserved on WKWebView. This prevents keyboard and
input view dismissal from blurring the focused element (which, in turn, means that the value of certain form
controls, such as select elements, cannot be changed). This can happen in the following scenario:

1. Suppose we have a web view embedded inside of a view controller (let's call it `A`).
2. Another view controller (let's call this one `B`) is modally presented over `A`.
3. The web view is removed from `A`'s view hierarchy and reparented under `B`'s view.
4. The user taps a form control in the web view, interacts with the keyboard, and taps the Done button.

After step 2, WKContentView gets a call to `-_preserveFocusWithToken:destructively:`, which increments its focus
retain count to 1. Thus, in step 3, resigning first responder using the Done button fails to blur the element.
To fix this, we split the existing `_activeFocusedStateRetainCount` into two values: `_focusPreservationCount`,
which is safe to reset and resets to 0 when changing the focused element, and `_activeFocusedStateRetainCount`,
which always increments and decrements, and only does so when using `-_retainActiveFocusedState`.

This also fixes a bug wherein `-_restoreFocusWithToken:` is implemented as returning `void` in WebKit, even
though its declaration in UIKit returns a `BOOL`. UIKit currently calls this selector on WKContentView and
stores the result within a `BOOL`; this results in the return value of `-_restoreFocusWithToken:` effectively
becoming the last byte of the most recent value stored in `$rax` when exiting `-_restoreFocusWithToken:`. From
debugging a release build of WebKit, this turns out to just be 0x0, becoming NO, which is correct given that
WKContentView does not attempt to become first responder within `_restoreFocusWithToken:`.

Tests:  FocusPreservationTests.PreserveAndRestoreFocus
        FocusPreservationTests.ChangingFocusedNodeResetsFocusPreservationState

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _incrementFocusPreservationCount]):
(-[WKWebView _decrementFocusPreservationCount]):
(-[WKWebView _resetFocusPreservationCount]):
(-[WKWebView _isRetainingActiveFocusedState]):

Active focus state is retained if either the focus preservation count or active focus state count is non-zero.
Splitting this into two variables ensures that SPI clients of `-_retainActiveFocusedState` won't have active
focus state reset from underneath them, and additionally prevents WKContentView from retaining active focus due
to UITextInputMultiDocument protocol methods while the user is still interacting with it.

* UIProcess/API/Cocoa/WKWebViewInternal.h:

Move _activeFocusedStateRetainCount to the implementation of WKContentView; instead of directly manipulating the
variable, add helper methods to increment, decrement, or reset the focus preservation count.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):

Reset the focus preservation count.

(-[WKContentView addFocusedFormControlOverlay]):
(-[WKContentView removeFocusedFormControlOverlay]):

Use `-_retainActiveFocusedState` instead of incrementing and decrementing the counter directly.

(-[WKContentView _restoreFocusWithToken:]):
(-[WKContentView _preserveFocusWithToken:destructively:]):

Use `_incrementFocusPreservationCount` and `_decrementFocusPreservationCount` instead of manipulating counter
variables directly.

Tools:

Adds a pair of new API tests to verify that (1) resigning first responder while preserving focus does not blur
the focused element, and (2) if another element is focused and presents an input view while preserving focus,
then we reset preservation state and allow first responder resignation to blur the focused element.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/FocusPreservationTests.mm: Added.
(webViewForTestingFocusPreservation):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView textInputContentView]):
* TestWebKitAPI/ios/UIKitSPI.h:

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

13 months agoCorrectly interpret from angle for conic gradients
megan_gardner@apple.com [Tue, 11 Sep 2018 00:51:42 +0000 (00:51 +0000)]
Correctly interpret from angle for conic gradients
https://bugs.webkit.org/show_bug.cgi?id=189445

Reviewed by Simon Fraser

No new tests, no functionality is changing.

Just renaming angle to angleRadians to make the type more clear,
and hopefully avoid bugs in the future. Update patch to original bug
fix.

* css/CSSGradientValue.cpp:
(WebCore::CSSConicGradientValue::createGradient):
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildArrayForCanvasGradient):
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::hash const):
* platform/graphics/Gradient.h:
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::paint):

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

13 months agoRevert the errornous change to the test in r235864.
rniwa@webkit.org [Tue, 11 Sep 2018 00:44:15 +0000 (00:44 +0000)]
Revert the errornous change to the test in r235864.

* web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html: Replaced with LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html.

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

13 months ago[WHLSL] Add the test shader type
commit-queue@webkit.org [Tue, 11 Sep 2018 00:31:23 +0000 (00:31 +0000)]
[WHLSL] Add the test shader type
https://bugs.webkit.org/show_bug.cgi?id=189484

Patch by Thomas Denney <tdenney@apple.com> on 2018-09-10
Reviewed by Myles C. Maxfield.

Tests are now precedeed by the 'test' keyword so that they are treated
as entry points, in the same way as vertex and fragment shaders.

* WebGPUShadingLanguageRI/LateChecker.js:
(LateChecker.prototype._checkShaderType): Allow tests to return any
type, as some currently return void/pointer types.
* WebGPUShadingLanguageRI/Parse.js:
(parseFuncDecl): Add the test keyword.
* WebGPUShadingLanguageRI/Test.js: Prepend 'test' to every single test.

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

13 months agoRebaseline test after https://trac.webkit.org/changeset/235866/webkit.
tsavell@apple.com [Mon, 10 Sep 2018 23:54:51 +0000 (23:54 +0000)]
Rebaseline test after https://trac.webkit.org/changeset/235866/webkit.
https://bugs.webkit.org/show_bug.cgi?id=189178.

Unreviewed Test Gardening.

* platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:

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

13 months agoWeb Inspector: Address some ESLint warnings
joepeck@webkit.org [Mon, 10 Sep 2018 23:47:05 +0000 (23:47 +0000)]
Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=188824

Reviewed by Matt Baker.

* .eslintrc:
* UserInterface/Base/Platform.js:
* UserInterface/Controllers/AuditManager.js:
* UserInterface/Controllers/BasicBlockAnnotator.js:
* UserInterface/Controllers/CallFrameTreeController.js:
* UserInterface/Controllers/HARBuilder.js:
* UserInterface/Models/AuditReport.js:
* UserInterface/Models/AuditResult.js:
* UserInterface/Models/AuditTestCase.js:
* UserInterface/Models/AuditTestSuite.js:
* UserInterface/Models/Cookie.js:
* UserInterface/Models/SourceCodePosition.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/TestSuite.js:
* UserInterface/Views/CanvasContentView.js:
* UserInterface/Views/CollectionContentView.js:
* UserInterface/Views/ContentBrowser.js:
* UserInterface/Views/CookieStorageContentView.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DatabaseTableContentView.js:
* UserInterface/Views/FindBanner.js:
* UserInterface/Views/JSONResourceContentView.js:
* UserInterface/Views/LogContentView.js:
* UserInterface/Views/ResourceSidebarPanel.js:
* UserInterface/Views/SourceCodeTextEditor.js:
* UserInterface/Views/SpreadsheetTextField.js:
* UserInterface/Workers/Formatter/FormatterUtilities.js:

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

13 months agoMake it easier to build for SDK_VARIANT=iosmac
timothy_horton@apple.com [Mon, 10 Sep 2018 23:24:45 +0000 (23:24 +0000)]
Make it easier to build for SDK_VARIANT=iosmac
https://bugs.webkit.org/show_bug.cgi?id=189488
<rdar://problem/38254840>

Reviewed by Wenson Hsieh.

* Makefile:
* Makefile.shared:
* Source/Makefile:
Set a variety of build flags (disable libwebrtc, tools, and set
SDK_VARIANT and WK_ALTERNATE_FRAMEWORKS_DIR).

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

13 months agoUnreviewed test gardening, rebaseline fast/events/ios/keyup.html after r235818.
ryanhaddad@apple.com [Mon, 10 Sep 2018 23:15:32 +0000 (23:15 +0000)]
Unreviewed test gardening, rebaseline fast/events/ios/keyup.html after r235818.

* fast/events/ios/keyup-expected.txt:

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

13 months agoLong press on picture/link show menu obscured by keyboard.
commit-queue@webkit.org [Mon, 10 Sep 2018 22:59:16 +0000 (22:59 +0000)]
Long press on picture/link show menu obscured by keyboard.
https://bugs.webkit.org/show_bug.cgi?id=189114.

Patch by James Savage <james.savage@apple.com> on 2018-09-10
Reviewed by Megan Gardner.

Use the visible bounds of the window, not the full bounds, when deciding if
an element's rect takes up too much screen space to present from. This factors
in occlusion of the window by the keyboard, bars, and other overlapping content.

If possible, it would be nice to only account for overlapping geometry which a
popover would avoid, but that information is not available. This approach will
produce some false positives in favor of the "from touch" style, but those are
still better than getting an unusably small action sheet.

* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]): Use new helper method for style.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
(-[WKActionSheetAssistant _presentationStyleForPositionInfo:elementInfo:]):
Query new delegate method to figure out the unobscured rect of the window. This
information only exists on WKScrollView, so we have to ask for it. If this method
is not implemented, fall back to the current approach of assuming the full window
bounds are available.
(presentationStyleForView): Deleted. Replaced by instance method.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView unoccludedWindowBoundsForActionSheetAssistant:]):
Calculate the unoccluded rect using -[UIScrollView adjustedContentInset], which
factors in client specified insets and system insets (such as the keyboard).

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

13 months agoontrack events should be fired even if an existing transceiver exists
youenn@apple.com [Mon, 10 Sep 2018 22:47:09 +0000 (22:47 +0000)]
ontrack events should be fired even if an existing transceiver exists
https://bugs.webkit.org/show_bug.cgi?id=189477

Reviewed by Eric Carlson.

Source/WebCore:

In case of an OnTrack callback from libwebrtc, make sure the ontrack event is called even if a transceiver already exists for that track.

Covered by updated video-addTransceiver.html
New test video-addLegacyTransceiver.html keeps testing the old transceiver behavior.
Test: webrtc/video-addLegacyTransceiver.html

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::newTransceiver):

LayoutTests:

* webrtc/video-addLegacyTransceiver-expected.txt: Added.
* webrtc/video-addLegacyTransceiver.html: Copied from LayoutTests/webrtc/video-addTransceiver.html.
* webrtc/video-addTransceiver.html:

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

13 months agoCorrectly interpret from angle for conic gradients
megan_gardner@apple.com [Mon, 10 Sep 2018 22:23:05 +0000 (22:23 +0000)]
Correctly interpret from angle for conic gradients
https://bugs.webkit.org/show_bug.cgi?id=189445
<rdar://problem/44158271>

Reviewed by Tim Horton.

Source/WebCore:

Test: fast/gradients/conic-from-angle.html

We were pulling the angle as degrees when we really need radians.

* css/CSSGradientValue.cpp:
(WebCore::CSSConicGradientValue::createGradient):

LayoutTests:

Adding a test for a conic gradient that starts at an angle.
Cover the edges because triangles and conic gradients aren't rendered
exactly the same.

* TestExpectations:
* fast/gradients/conic-from-angle-expected.html: Added.
* fast/gradients/conic-from-angle.html: Added.
* platform/ios-12/TestExpectations:
* platform/mac/TestExpectations:

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

13 months agoRegression(PSON): WebView is blank when navigating back cross-process on iOS
cdumez@apple.com [Mon, 10 Sep 2018 22:17:58 +0000 (22:17 +0000)]
Regression(PSON): WebView is blank when navigating back cross-process on iOS
https://bugs.webkit.org/show_bug.cgi?id=189481
<rdar://problem/44315010>

Reviewed by Tim Horton.

When process swapping on navigation, the WebPageProxy would detach from the old WebProcess and destroy
its RemoteLayerTreeDrawingAreaProxy. It would then create a new process and a new RemoteLayerTreeDrawingAreaProxy
to listen for IPC from this new process. When navigating back to the original process, we would do the
same in the opposite direction. However, the issue was that the old WebProcess's WebPage would not destroy its
drawing area and some state would persist and cause issues. For example, the DrawingArea would send a
CommitLayerTree IPC to the UIProcess and set m_waitingForBackingStoreSwap to true. It normally resets
m_waitingForBackingStoreSwap to false when getting the DidUpdate IPC from the UIProcess. However, when the
WebPage is detached from its WebPageProxy (i.e. suspended due to PSON), the UIProcess would not respond to
IPC from the old WebProcess and m_waitingForBackingStoreSwap would never get reset.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
Make sure we send the SetIsSuspended IPC to the WebProcess with false value when
the SuspendedPageProxy gets destroyed, so that the WebProcess can update its
m_isSuspended flag. Previous, it was set to true when constructing the
SuspendedPageProxy but never reset to false.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateContentsAndRootView):
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
Add null checks for the drawing area now that it can be null while suspended.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
When a WebPage gets reattached to a WebPageProxy, this method is called. Since we now
destroy the drawing area upon suspension (WebPage gets detached from WebPageProxy), we
need to make sure we recreate the drawing area when reattaching.

(WebKit::WebPage::setIsSuspended):
Destroy the drawing area when the WebPage is suspended, meaning that this WebPage
is no longer associated with a WebPageProxy.

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

13 months agoExpose -apple-system-container-border color to internal web views.
commit-queue@webkit.org [Mon, 10 Sep 2018 22:16:35 +0000 (22:16 +0000)]
Expose -apple-system-container-border color to internal web views.
https://bugs.webkit.org/show_bug.cgi?id=189178.

Patch by James Savage <james.savage@apple.com> on 2018-09-10
Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: LayoutTests/fast/css/apple-system-colors.html

* css/CSSValueKeywords.in: Add new semantic color name.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const): Use system color on supported
systems, and fall back to approximation for older systems.

Source/WebCore/PAL:

* pal/spi/cocoa/NSColorSPI.h: Declare SPI.

LayoutTests:

* fast/css/apple-system-control-colors-expected.txt:
* fast/css/apple-system-control-colors.html:
* platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:
* platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt:
* platform/mac/fast/css/apple-system-control-colors-expected.txt:

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

13 months agomouseenter and mouseleave events don't get dispatched even when there is a capturing...
rniwa@webkit.org [Mon, 10 Sep 2018 21:54:14 +0000 (21:54 +0000)]
mouseenter and mouseleave events don't get dispatched even when there is a capturing event listener for a slot ancestor
https://bugs.webkit.org/show_bug.cgi?id=188561

Reviewed by Darin Adler.

Source/WebCore:

This patch makes mouseenter and mouseleave events to work with shadow trees and slots therein, and makes them uncomposed
as discussed in https://github.com/w3c/uievents/issues/208.

This patch also makes these events dispatched on DOM tree ancestors of the currently hovered element instead of
render tree's hover ancestors to be consistent with the check in hierarchyHasCapturingEventListeners and other browsers.
In particular, using hover ancestors is problematic when there is an element with display: contents such as slot elements,
which do not have a render object.

Tests: fast/shadow-dom/mouseenter-mouseleave-across-shadow-boundary.html
       fast/shadow-dom/mouseenter-mouseleave-inside-shadow-tree.html
       fast/shadow-dom/mouseenter-mouseleave-on-slot-parent.html

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
* page/EventHandler.cpp:
(WebCore::nearestCommonHoverAncestor): Deleted.
(WebCore::hierarchyHasCapturingEventListeners): Use parentInComposedTree. Else we would miss capturing event listeners
on inclusive ancestors of slots.
(WebCore::EventHandler::updateMouseEventTargetNode): Use the composed tree's ancestor chain to fire mouseenter and
mouseleave events. This is needed to dispatch mouseenter / mouseleave events on slot elements. Also removed comments
which just state what is self-evident from the code beneath them.

LayoutTests:

Added tests for listening to mouseenter and mouseleave events using capturing and bubbling event listeners
across shadow boundaries.

* fast/shadow-dom/mouseenter-mouseleave-across-shadow-boundary-expected.txt: Added.
* fast/shadow-dom/mouseenter-mouseleave-across-shadow-boundary.html: Added.
* fast/shadow-dom/mouseenter-mouseleave-inside-shadow-tree-expected.txt: Added.
* fast/shadow-dom/mouseenter-mouseleave-inside-shadow-tree.html: Added.
* fast/shadow-dom/mouseenter-mouseleave-on-slot-parent-expected.txt: Added.
* fast/shadow-dom/mouseenter-mouseleave-on-slot-parent.html: Added.
* platform/ios/TestExpectations: Skip the new tests since mouse events aren't supported on iOS.

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

13 months agoRemove isOrphan check in ShadowRoot::setInnerHTML
rniwa@webkit.org [Mon, 10 Sep 2018 21:48:55 +0000 (21:48 +0000)]
Remove isOrphan check in ShadowRoot::setInnerHTML
https://bugs.webkit.org/show_bug.cgi?id=189449

Reviewed by Darin Adler.

Removed isOrphan() check in ShadowRoot::setInnerHTML needed for webkit.org/b/88834.

The only reason this check was kept in the code was because the fix for V8 couldn't be landed
due to a perf regression but V8 binding isn't even a thing in WebKit anymore.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setInnerHTML):
* dom/ShadowRoot.h:

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

13 months agoMany textarea tests leak documents because Document::removeFocusNavigationNodeOfSubtr...
simon.fraser@apple.com [Mon, 10 Sep 2018 21:42:45 +0000 (21:42 +0000)]
Many textarea tests leak documents because Document::removeFocusNavigationNodeOfSubtree() can trigger a Document retain cycle
https://bugs.webkit.org/show_bug.cgi?id=188722

Reviewed by Ryosuke Niwa.

Fix a retain cycle created when Document::adjustFocusNavigationNodeOnNodeRemoval() sets
m_focusNavigationStartingNode to itself. m_focusNavigationStartingNode is a Node* (not sure why it's not an Element*),
making it possible to assign the Document to it, which creates a reference to the document which prevents
Document::removedLastRef() ever running and doing the necessary cleanup.

Fix by setting m_focusNavigationStartingNode to null if code tries to set it to the Document. This can happen
when an element is focused and the page calls document.write(), which removes all children.

Will be tested by future leak testing. Fixes the document leak in at least the following tests:
  fast/forms/append-children-during-form-submission.html
  fast/forms/empty-textarea-toggle-disabled.html
  fast/forms/textarea-paste-newline.html
  fast/forms/textarea-trailing-newline.html

* dom/Document.cpp:
(WebCore::Document::setFocusNavigationStartingNode):
(WebCore::Document::adjustFocusNavigationNodeOnNodeRemoval):

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

13 months agosvg/W3C-SVG-1.1/render-groups-03-t.svg and some other SVG tests leak documents
simon.fraser@apple.com [Mon, 10 Sep 2018 21:19:49 +0000 (21:19 +0000)]
svg/W3C-SVG-1.1/render-groups-03-t.svg and some other SVG tests leak documents
https://bugs.webkit.org/show_bug.cgi?id=189147

Reviewed by Dean Jackson.

Document::removedLastRef() needs to clean up m_fontSelector, because it can reference
CSSFontFaceSources that keep SVGFontFaceElements alive, and they in turn will keep
the Document alive.

Also add the beginnings of a Fonts log channel.

This will be tested by world leak testing (webkit.org/b/189332).

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::~CSSFontSelector):
* dom/Document.cpp:
(WebCore::Document::removedLastRef):
* platform/Logging.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontDataIfNeeded):
(WebCore::FontCache::purgeInactiveFontData):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
(WebCore::SVGFontFaceElement::~SVGFontFaceElement):
* svg/SVGFontFaceElement.h:

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

13 months agoCBOR coders should only be compiled if WebAuthN is enabled
don.olmstead@sony.com [Mon, 10 Sep 2018 21:11:23 +0000 (21:11 +0000)]
CBOR coders should only be compiled if WebAuthN is enabled
https://bugs.webkit.org/show_bug.cgi?id=189425

Reviewed by Jiewen Tan.

Source/WebCore:

No new tests. No change in behavior.

Just places ENABLE(WEB_AUTHN) guards around all CBOR files.

* Modules/webauthn/cbor/CBORBinary.h:
* Modules/webauthn/cbor/CBORReader.cpp:
* Modules/webauthn/cbor/CBORReader.h:
* Modules/webauthn/cbor/CBORValue.cpp:
* Modules/webauthn/cbor/CBORValue.h:
* Modules/webauthn/cbor/CBORWriter.cpp:
* Modules/webauthn/cbor/CBORWriter.h:

Tools:

Just places ENABLE(WEB_AUTHN) guards around CBOR test files.

* TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp:
* TestWebKitAPI/Tests/WebCore/CBORValueTest.cpp:
* TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp:

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

13 months ago[iOS] Arrow keys do not dispatch DOM events to non-editable elements
dbates@webkit.org [Mon, 10 Sep 2018 21:02:50 +0000 (21:02 +0000)]
[iOS] Arrow keys do not dispatch DOM events to non-editable elements
https://bugs.webkit.org/show_bug.cgi?id=189389

Reviewed by Simon Fraser.

Source/WebCore:

On iOS the arrow keys are identified by special multi character key strings: UIKeyInput{Up,
Down, Left, Right}Arrow as opposed to special key codes as on Mac. When converting the iOS-
specific WebEvent we need to take care to recognize when the key string for the event is
one of these special key strings when computing key code, character code, and key identifier
properties for the WebCore platform-specific event. These details will be included in
the corresponding DOM keyboard events that are dispatched when the arrow keys are pressed.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
Mark file PlatformEventFactoryIOS as @no-unify as it is not compatible with the unified sources
build strategy given its use of wtf/cocoa/SoftLinking.h macros.

* platform/ios/PlatformEventFactoryIOS.h:
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::convertSpecialKeyToCharCode): Manufacture the appropriate character code for an
event that represents an arrow key. Otherwise, return std::nullopt to indicate that the
event is not for an arrow key.
(WebCore::keyCodeForEvent): Manufacture the appropriate Windows virtual key code for an
event that represents an arrow key. Otherwise, do what we do now and return the key code
associated with the WebEvent.
(WebCore::keyIdentifierForKeyEvent): Modified to test if the event is for an arrow key
and return the appropriate key identifier.
(WebCore::keyForKeyEvent): Modified to test if the event is for an arrow key
and return the appropriate character code.
(WebCore::codeForKeyEvent): Modified to call keyCodeForEvent(), which knows how to account
for events that represent arrow keys.
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebKit:

Use WebCore::keyCodeForEvent() to retrieve the key code for a WebEvent instead of querying
the key code from the WebEvent directly. The function WebCore::keyCodeForEvent() knows how
to compute the key code for an event that represents an arrow key.

* Shared/ios/WebIOSEventFactory.mm:
(WebIOSEventFactory::createWebKeyboardEvent):

LayoutTests:

Update expected result now that we compute the correct keyIdentifier, keycode, and which properties
for DOM keyboard events dispatched when the arrow keys are pressed.

* fast/events/ios/keydown-keyup-in-non-editable-content-expected.txt:

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

13 months agoTry to fix the iOSMac build
timothy_horton@apple.com [Mon, 10 Sep 2018 20:57:00 +0000 (20:57 +0000)]
Try to fix the iOSMac build
https://bugs.webkit.org/show_bug.cgi?id=189469

* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextSetPluginLoadClientPolicy):
(WKContextClearPluginClientPolicies):
(WKContextCopyPlugInInfoForBundleIdentifier):
(WKContextGetInfoForInstalledPlugIns):
(WKContextResetHSTSHosts):
(WKContextResetHSTSHostsAddedAfterDate):
(WKContextRegisterSchemeForCustomProtocol):
(WKContextUnregisterSchemeForCustomProtocol):
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState initWithPage:]):
(WKPageCreateObservableState):
(WKPageGetObjectRegistry):
(WKPageIsURLKnownHSTSHost):
(WKPageLoadURLRequestReturningNavigation):
(WKPageLoadFileReturningNavigation):
(WKPageIsPlayingVideoInEnhancedFullscreen):
(WKPageSetFullscreenDelegate):
(WKPageGetFullscreenDelegate):
* UIProcess/API/C/mac/WKProtectionSpaceNS.mm:
(WKProtectionSpaceCopyNSURLProtectionSpace):

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

13 months ago[iOS] Make WKWebView become the first responder to support testing key presses to...
dbates@webkit.org [Mon, 10 Sep 2018 20:55:23 +0000 (20:55 +0000)]
[iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements
https://bugs.webkit.org/show_bug.cgi?id=189432

Reviewed by Simon Fraser.

Tools:

Make the WKWebView become the first responder immediately without the need to focus an editable
element. This allows us to test that DOM keyboard events are dispatched to non-editable elements.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView):

LayoutTests:

Add a test that DOM keyboard events are dispatched to a non-editable <body> when simulating key
presses using a hardware keyboard.

* fast/events/ios/keydown-keyup-in-non-editable-content-expected.txt: Added.
* fast/events/ios/keydown-keyup-in-non-editable-content.html: Added.

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

13 months ago[macOS] Editor::readSelectionFromPasteboard’s MailBlockquoteHandling argument is...
mitz@apple.com [Mon, 10 Sep 2018 20:39:57 +0000 (20:39 +0000)]
[macOS] Editor::readSelectionFromPasteboard’s MailBlockquoteHandling argument is effectively unused
https://bugs.webkit.org/show_bug.cgi?id=189480

Reviewed by Anders Carlsson.

No new tests, because this doesn’t change behavior.

* editing/Editor.h: Removed the MailBlockquoteHandling argument from
  readSelectionFromPasteboard.
* editing/mac/EditorMac.mm:
(WebCore::Editor::readSelectionFromPasteboard): Don’t pass mailBlockquoteHandling to
  pasteWithPasteboard. It was always set to RespectBlockquote, which is the latter’s
  default.

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

13 months ago[Payment Request] Use JSValueInWrappedObject for PaymentResponse's details attribute
aestes@apple.com [Mon, 10 Sep 2018 20:08:00 +0000 (20:08 +0000)]
[Payment Request] Use JSValueInWrappedObject for PaymentResponse's details attribute
https://bugs.webkit.org/show_bug.cgi?id=189458

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/paymentrequest/payment-response-reference-cycle-leak.https.html

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::didAuthorizePayment):

Created a PaymentResponse::DetailsFunction that converts the ApplePayPayment into a JSValue.

* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::accept):

Passed detailsFunction into PaymentResponse::create().

* Modules/paymentrequest/PaymentRequest.h:
* Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::PaymentResponse):
* Modules/paymentrequest/PaymentResponse.h:
* Modules/paymentrequest/PaymentResponse.idl:

Removed m_details and replaced it with a DetailsFunction and a cached JSValueInWrappedObject.
JSPaymentResponseCustom.cpp uses these values to implement the details attribute getter.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPaymentResponseCustom.cpp: Added.
(WebCore::JSPaymentResponse::details const):

Called PaymentResponse::detailsFunction() to cache a JSValue for the details attribute.

(WebCore::JSPaymentResponse::visitAdditionalChildren):

Visited PaymentResponse::cachedDetails().

* bindings/js/JSServiceWorkerClientCustom.cpp:

Fixed a missing include issue that cropped up due to unified source shuffling.

LayoutTests:

* fast/dom/reference-cycle-leaks.html:
* http/tests/paymentrequest/payment-response-reference-cycle-leak.https-expected.txt: Added.
* http/tests/paymentrequest/payment-response-reference-cycle-leak.https.html: Added.

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