WebKit.git
7 months agoImprove test freshness page interaction experience.
dewei_zhu@apple.com [Fri, 11 Oct 2019 23:17:52 +0000 (23:17 +0000)]
Improve test freshness page interaction experience.
https://bugs.webkit.org/show_bug.cgi?id=202684

Reviewed by Ryosuke Niwa.

Change test freshness page show tooltip on click instead of popuping on mouse hover.
And clicking anywhere in 'page-with-heading' section except the tooltip can dismiss tooltip.
Add keyboard support to move focus around including 'Tab' key support.
Add support to use 'Enter' key to show or dismiss tooltip.
Add support to use 'Escape' key to dismiss tooltip.

* public/shared/common-component-base.js: Added support for link to specify 'tabindex'.
(CommonComponentBase.prototype.createLink):
(CommonComponentBase.createLink):
(CommonComponentBase):
* public/v3/components/base.js: Added support for customizing whether or not prevent default and stop propagation
while creating event handler.
(ComponentBase.prototype.createEventHandler):
(ComponentBase.createEventHandler):
(ComponentBase):
* public/v3/components/freshness-indicator.js:
(FreshnessIndicator): Removed 'url' property and removed customization for mouse event.
(FreshnessIndicator.prototype.update):
(FreshnessIndicator.prototype.didConstructShadowTree): Deleted.
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage): Changed to show tooltip on click and added key board event.
(TestFreshnessPage.prototype.didConstructShadowTree): Added key event support.
(TestFreshnessPage.prototype._findClosestIndicatorAnchorForCoordinate):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.prototype._constructTableCell): Added tabIndex for each cell that contains freshness indicator.
(TestFreshnessPage.prototype._configureAnchorForIndicator):
(TestFreshnessPage.prototype._clearIndicatorState): Changed the color of links in tooltip to a more readable color.
Added styles when anchor for status cell and links on tooltip are focused.
(TestFreshnessPage.cssTemplate):

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

7 months agoUpdate build.webkit.org basedir
aakash_jain@apple.com [Fri, 11 Oct 2019 21:47:15 +0000 (21:47 +0000)]
Update build.webkit.org basedir
https://bugs.webkit.org/show_bug.cgi?id=202856

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/build.webkit.org-config/buildbot.tac: Updated basedir. Also increased the
size of twistd.log files and reduced number of files for easier maintenance.

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

7 months agoLayout Test fast/events/touch/ios/tap-with-passive-listener-inside-active-listener...
dino@apple.com [Fri, 11 Oct 2019 21:45:36 +0000 (21:45 +0000)]
Layout Test fast/events/touch/ios/tap-with-passive-listener-inside-active-listener.html is a Flaky Failure
https://bugs.webkit.org/show_bug.cgi?id=202867
<rdar://52968736>

Reviewed by Wenson Hsieh.

From the failing results, it looks like the event listener for touchend was firing
after the uiScriptController returned its result, which is strange.
I was unable to reproduce this, so I rewrote the test to use UIHelper, which
hopefully will improve the situation (although... is basically the same code).

* fast/events/touch/ios/tap-with-passive-listener-inside-active-listener-expected.txt:
* fast/events/touch/ios/tap-with-passive-listener-inside-active-listener.html:

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

7 months ago[ews] Services EWS should also run build.webkit.org unit tests
aakash_jain@apple.com [Fri, 11 Oct 2019 21:26:47 +0000 (21:26 +0000)]
[ews] Services EWS should also run build.webkit.org unit tests
https://bugs.webkit.org/show_bug.cgi?id=202864

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories.py:
(ServicesFactory.__init__): Added new RunBuildWebKitUnitTests step.
* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance): Added paths for build.webkit.org code.
(RunBuildWebKitUnitTests): Build step to run build.webkit.org unit tests.
(RunBuildWebKitUnitTests.__init__): Set workdir, timeout and logEnviron.
(RunBuildWebKitUnitTests.getResultSummary): Customize Buildbot messages for this build step.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.

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

7 months agoWeb Inspector: Local Resource Overrides: UI for overriding image and font resource...
joepeck@webkit.org [Fri, 11 Oct 2019 20:44:05 +0000 (20:44 +0000)]
Web Inspector: Local Resource Overrides: UI for overriding image and font resource content
https://bugs.webkit.org/show_bug.cgi?id=202016
<rdar://problem/55541475>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Extend SourceCodeRevision to be a (content, base64Encoded, mimeType) tuple and
make clients update the revision content more explicitly (`updateRevisionContent`).
This also includes `blobContent` as a more explicit way to get the content as
a Blob, which may not always be desired.

Switch LocalResource use the originalRevision / currentRevision instead of
keeping its own localContent / localContentIsBase64Encoded properties.

Introduce a `DropZoneView` to simplify handling of presenting a drop zone
over a specific element. And use it for the ImageResourceContentView for local
resource overrides to accept new content.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.

* .eslintrc:
* UserInterface/Base/BlobUtilities.js: Added.
(WI.BlobUtilities.blobForContent):
(WI.BlobUtilities.decodeBase64ToBlob):
(WI.BlobUtilities.textToBlob):
(WI.BlobUtilities.blobAsText):
(WI.BlobUtilities):
* UserInterface/Base/FileUtilities.js:
(WI.FileUtilities.async.readDataURL):
(WI.FileUtilities):
* UserInterface/Base/MIMETypeUtilities.js:
(WI.fileExtensionForFilename):
(WI.fileExtensionForURL):
* UserInterface/Base/Utilities.js:
Move around or introduce some minor utilities.

* UserInterface/Models/SourceCodeRevision.js:
(WI.SourceCodeRevision):
(WI.SourceCodeRevision.prototype.get sourceCode):
(WI.SourceCodeRevision.prototype.get content):
(WI.SourceCodeRevision.prototype.get base64Encoded):
(WI.SourceCodeRevision.prototype.get mimeType):
(WI.SourceCodeRevision.prototype.get blobContent):
(WI.SourceCodeRevision.prototype.updateRevisionContent):
(WI.SourceCodeRevision.prototype.copy):
(WI.SourceCodeRevision.prototype.set content): Deleted.
Data is now a (content, base64Encoded, mimeType) tuple.

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange): Deleted.
This is now a unified resource content change path without anything special for
local resource overrides.

* UserInterface/Models/LocalResource.js:
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.requestContentFromBackend):
(WI.LocalResource.prototype.handleCurrentRevisionContentChange):
(WI.LocalResource):
(WI.LocalResource.prototype.get localContent): Deleted.
(WI.LocalResource.prototype.get localContentIsBase64Encoded): Deleted.
(WI.LocalResource.prototype.hasContent): Deleted.
(WI.LocalResource.prototype.setContent): Deleted.
(WI.LocalResource.prototype.updateOverrideContent): Deleted.
Use originalRevision / currentRevision as appropriate.

* UserInterface/Views/DropZoneView.css: Added.
(.drop-zone):
(.drop-zone.visible):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/DropZoneView.js: Added.
(WI.DropZoneView):
(WI.DropZoneView.prototype.get delegate):
(WI.DropZoneView.prototype.get targetElement):
(WI.DropZoneView.prototype.set targetElement):
(WI.DropZoneView.prototype.initialLayout):
(WI.DropZoneView.prototype._startActiveDrag):
(WI.DropZoneView.prototype._stopActiveDrag):
(WI.DropZoneView.prototype._handleDragEnter):
(WI.DropZoneView.prototype._handleDragLeave):
(WI.DropZoneView.prototype._handleDragOver):
(WI.DropZoneView.prototype._handleDrop):
Simplified handling of a drop zone.

* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype.removeLoadingIndicator):
More safely remove children and subviews.

(WI.ResourceContentView):
(WI.ResourceContentView.prototype.get resource):
(WI.ResourceContentView.prototype.get navigationItems):
(WI.ResourceContentView.prototype.localResourceOverrideInitialContent):
(WI.ResourceContentView.prototype.closed):
(WI.ResourceContentView.prototype.removeLoadingIndicator):
(WI.ResourceContentView.prototype._contentAvailable):
(WI.ResourceContentView.prototype._issueWasAdded):
(WI.ResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.ResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.ResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.ResourceContentView.prototype._mouseWasClicked):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.localResourceOverrideInitialContent):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride): Deleted.
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride): Deleted.
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged): Deleted.
Extract generalized local resource override properties into the ResourceContentView base class.

* UserInterface/Views/FontResourceContentView.css:
(.content-view.resource.font):
(.content-view.resource.font > .drop-zone):
(.content-view.resource.font > .preview-container):
(.content-view.resource.font .preview):
* UserInterface/Views/FontResourceContentView.js:
(WI.FontResourceContentView):
(WI.FontResourceContentView.prototype.contentAvailable):
(WI.FontResourceContentView.prototype.shown):
(WI.FontResourceContentView.prototype.hidden):
(WI.FontResourceContentView.prototype.closed):
(WI.FontResourceContentView.prototype.layout):
(WI.FontResourceContentView.prototype._updatePreviewElement.createMetricElement):
(WI.FontResourceContentView.prototype._updatePreviewElement):
(WI.FontResourceContentView.prototype.dropZoneShouldAppearForDragEvent):
(WI.FontResourceContentView.prototype.dropZoneHandleDrop):
Create a drop zone that will update the font local resource override content.

* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image):
(.content-view.resource.image > .drop-zone):
(.content-view.resource.image > .img-container):
(.content-view.resource.image img):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.get navigationItems):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.closed):
(WI.ImageResourceContentView.prototype.dropZoneShouldAppearForDragEvent):
(WI.ImageResourceContentView.prototype.dropZoneHandleDrop):
Create a drop zone that will update the image local resource override content.

* UserInterface/Models/Script.js:
(WI.Script.prototype.get mimeType):
Seems like this should have a default value given there may not be a resource.

* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype.show):
Better handling here, since the utilities expects a number not a string.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.createObjectURL):
* UserInterface/Views/LocalResourceOverrideTreeElement.js:
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
Use currentRevision more appropriately.

* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype._processContent):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
(WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges):
(WI.CSSManager.prototype._resourceContentDidChange):
(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
Update revision content more explicitly.

LayoutTests:

* inspector/unit-tests/mimetype-utilities-expected.txt:
* inspector/unit-tests/mimetype-utilities.html:
Test new utilities.

* http/tests/inspector/network/fetch-response-body.html:
* http/tests/inspector/network/xhr-response-body.html:
Renamed utilities.

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

7 months agoLayout test fast/events/touch/ios/tap-with-active-listener-inside-window-with-passive...
dino@apple.com [Fri, 11 Oct 2019 20:42:36 +0000 (20:42 +0000)]
Layout test fast/events/touch/ios/tap-with-active-listener-inside-window-with-passive-listener.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=202863
<rdar://51724211>

Reviewed by Tim Horton.

Another case where we are getting more touchmoves during a drag than we expected.
However, this time we still want to listen, and we can't use { once: true } because
there are multiple sequential drags. Instead, keep a list of the moves we've seen and
only output the first one.

Also, remove the coordinate logging for the move, since it might not be consistent.

* fast/events/touch/ios/tap-with-active-listener-inside-window-with-passive-listener-expected.txt:
* fast/events/touch/ios/tap-with-active-listener-inside-window-with-passive-listener.html:

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

7 months agoMove SuspendedPage logic from WebProcessPool to new WebBackForwardCache class
cdumez@apple.com [Fri, 11 Oct 2019 20:40:48 +0000 (20:40 +0000)]
Move SuspendedPage logic from WebProcessPool to new WebBackForwardCache class
https://bugs.webkit.org/show_bug.cgi?id=202660

Reviewed by Antti Koivisto.

Source/WebKit:

Move SuspendedPage logic from WebProcessPool to new WebBackForwardCache class. This is
a first step towards implementing back / forward cache handling in the UIProcess.

The following changes were made:
1. SuspendedPageProxy objects are now normally owned by their associated WebBackForwardListItem
   (Similarly to CachedPage objects being owned by their HistoryItem in WebCore) instead of the
   WebProcessPool.
2. A new WebBackForwardCache class is introduced to cap the number of cached pages and clear
   them (similary to the PageCache in WebCore).

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::~WebBackForwardListItem):
(WebKit::WebBackForwardListItem::wasRemovedFromBackForwardList):
(WebKit::WebBackForwardListItem::setSuspendedPage):
(WebKit::WebBackForwardListItem::takeSuspendedPage):
(WebKit::WebBackForwardListItem::suspendedPage const):
* Shared/WebBackForwardListItem.h:
* Sources.txt:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _maximumSuspendedPageCount]):
* UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::findReusableSuspendedPageProcess):
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::setBackForwardListItem):
(WebKit::SuspendedPageProxy::clearBackForwardListItem):
(WebKit::SuspendedPageProxy::backForwardCache const):
(WebKit::SuspendedPageProxy::suspensionTimedOut):
* UIProcess/SuspendedPageProxy.h:
* UIProcess/WebAuthentication/Mock/MockHidConnection.h:
* UIProcess/WebAuthentication/Mock/MockHidService.h:
* UIProcess/WebBackForwardCache.cpp: Added.
(WebKit::WebBackForwardCache::removeOldestEntry):
(WebKit::WebBackForwardCache::setCapacity):
(WebKit::WebBackForwardCache::addEntry):
(WebKit::WebBackForwardCache::removeEntry):
(WebKit::WebBackForwardCache::takeEntry):
(WebKit::WebBackForwardCache::removeEntriesForProcess):
(WebKit::WebBackForwardCache::removeEntriesForPage):
(WebKit::WebBackForwardCache::removeEntriesMatching):
(WebKit::WebBackForwardCache::clear):
* UIProcess/WebBackForwardCache.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.h.
(WebKit::WebBackForwardCache::capacity const):
(WebKit::WebBackForwardCache::size const):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::didRemoveItem):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::suspendCurrentPageIfPossible):
(WebKit::WebPageProxy::backForwardCache const):
(WebKit::WebPageProxy::shouldUseBackForwardCache const):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::process const):
* UIProcess/WebProcessPool.cpp:
(WebKit::m_webProcessCache):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::processForRegistrableDomain):
(WebKit::WebProcessPool::handleMemoryPressureWarning):
(WebKit::WebProcessPool::updateBackForwardCacheCapacity):
(WebKit::WebProcessPool::setCacheModel):
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setMockWebAuthenticationConfiguration):
* WebKit.xcodeproj/project.pbxproj:

Tools:

Drop test that relied on reusing a SuspendedPage's process from a loadHTMLStringLoad (optimization).
This no longer works now that SuspendedPages are owned by their associated back/forward item because
we currently do not create a back/forward item for loadHTMLString requests. Suspending a page for a
loadHTMLString was also wasteful since there was no way to restore that page (given that there was
no WebBackForwardListItem to go back to).

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

7 months agoOnly use CFNetwork SPI for metrics where needed
commit-queue@webkit.org [Fri, 11 Oct 2019 20:38:10 +0000 (20:38 +0000)]
Only use CFNetwork SPI for metrics where needed
https://bugs.webkit.org/show_bug.cgi?id=202825

Patch by Alex Christensen <achristensen@webkit.org> on 2019-10-11
Reviewed by Joseph Pecoraro.

Source/WebCore:

* platform/network/NetworkLoadMetrics.h:

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(stringForSSLProtocolVersion):
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

Source/WTF:

* wtf/Platform.h:

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

7 months agoRemove some dead code in webkitpy's mac.py
bburg@apple.com [Fri, 11 Oct 2019 20:35:05 +0000 (20:35 +0000)]
Remove some dead code in webkitpy's mac.py
https://bugs.webkit.org/show_bug.cgi?id=202853

Reviewed by Alexey Proskuryakov.

- Remove _build_java_test_support as it no longer does anything.
- Remove _check_port_build as it's only used to build Java test support.
- Remove unused is_mavericks() function.
- Remove a log stripping pattern that was fixed several releases ago.

* Scripts/webkitpy/port/base.py:
(Port.check_build):
(Port.check_api_test_build):
(Port._check_driver):
(Port._check_port_build): Deleted.
* Scripts/webkitpy/port/mac.py:
(MacPort.operating_system):
(MacPort.default_child_processes):
(MacPort.logging_patterns_to_strip):
(MacPort.is_mavericks): Deleted.
(MacPort._build_java_test_support): Deleted.
(MacPort._check_port_build): Deleted.

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

7 months agoPages frequently fail to enter the back/forward cache due to frames with a quick...
cdumez@apple.com [Fri, 11 Oct 2019 20:26:15 +0000 (20:26 +0000)]
Pages frequently fail to enter the back/forward cache due to frames with a quick redirect coming
https://bugs.webkit.org/show_bug.cgi?id=202768
<rdar://problem/56132022>

Reviewed by Alex Christensen.

Source/WebCore:

When a quick redirect is scheduled with the navigation scheduler, we set the m_quickRedirectComing flag.
This flag is supposed to get unset if the navigation gets cancelled and when the navigation actually
happens. However, for a navigation to a javascript: URL, we would return early after executing the JS
and fail to reset the m_quickRedirectComing flag. Later on, we would fail to enter the page cache because
we would think that the iframe still has a quick redirect scheduled.

Test: fast/history/page-cache-iframe-js-url.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
Reset the m_quickRedirectComing flag if we return early after executing
the javascript URL.

(WebCore::FrameLoader::stopForPageCache):
Stop policy checks & cancel scheduled navigations after stopping loads. Stopping loads may
run script which may in theory schedule new navigations. This is hardening.

LayoutTests:

Add lauout test coverage.

* fast/history/page-cache-iframe-js-url-expected.txt: Added.
* fast/history/page-cache-iframe-js-url.html: Added.

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

7 months agoRoll ANGLE for ETC extensions and EGL_ANGLE_device_cgl
achristensen@apple.com [Fri, 11 Oct 2019 20:20:31 +0000 (20:20 +0000)]
Roll ANGLE for ETC extensions and EGL_ANGLE_device_cgl
https://bugs.webkit.org/show_bug.cgi?id=202780

Roll ANGLE to c5e0ac757a112a24a0118d434e652fd7b558e6a8 via new
update-angle.sh script.

Patch by Kenneth Russell <kbr@chromium.org> on 2019-10-11
Reviewed by Alex Christensen.

* .gitignore:
* ANGLE.plist:
* ANGLE.xcodeproj/project.pbxproj:
* BUILD.gn:
* CMakeLists.txt:
* CONTRIBUTORS:
* DEPS:
* GLESv2.cmake:
* OWNERS:
* PRESUBMIT.py:
(_CheckExportValidity):
(CheckChangeOnUpload):
(CheckChangeOnCommit):
* README.md:
* android/angle_apk.gni:
* build_overrides/angle.gni:
* changes.diff:
* doc/DevSetup.md:
* dotfile_settings.gni:
* extensions/ANGLE_compressed_texture_etc.txt: Added.
* extensions/EGL_ANGLE_device_cgl.txt: Added.
* extensions/EGL_ANGLE_feature_control.txt:
* extensions/EGL_ANGLE_platform_angle_d3d11on12.txt: Added.
* extensions/EGL_ANGLE_platform_angle_device_type_swiftshader.txt: Added.
* extensions/EGL_ANGLE_platform_angle_metal.txt: Added.
* gni/angle.gni:
* include/EGL/eglext_angle.h:
* include/platform/Feature.h:
(angle::Feature::Feature):
* include/platform/FeaturesD3D.h:
* include/platform/FeaturesGL.h:
* include/platform/FeaturesVk.h:
* include/platform/FrontendFeatures.h:
* samples/WindowTest/WindowTest.cpp:
* samples/gles1/DrawTexture.cpp:
* samples/multi_texture/MultiTexture.cpp:
* samples/multiple_draw_buffers/MultipleDrawBuffers.cpp:
* samples/particle_system/ParticleSystem.cpp:
* samples/sample_util/SampleApplication.cpp:
(SampleApplication::SampleApplication):
* samples/sample_util/SampleApplication.h:
* scripts/code_generation_hashes/ANGLE_format.json:
* scripts/code_generation_hashes/ANGLE_load_functions_table.json:
* scripts/code_generation_hashes/D3D11_format.json:
* scripts/code_generation_hashes/DXGI_format.json:
* scripts/code_generation_hashes/GL_EGL_WGL_loader.json:
* scripts/code_generation_hashes/GL_EGL_entry_points.json:
* scripts/code_generation_hashes/OpenGL_dispatch_table.json:
* scripts/code_generation_hashes/Static_builtins.json:
* scripts/code_generation_hashes/Vulkan_format.json:
* scripts/code_generation_hashes/Vulkan_internal_shader_programs.json:
* scripts/code_generation_hashes/Vulkan_mandatory_format_support_table.json:
* scripts/code_generation_hashes/proc_table.json:
* scripts/export_targets.py:
(has_all_includes):
* scripts/generate_entry_points.py:
(get_resource_id_types):
(format_resource_id_types):
(write_capture_helper_header):
(get_resource_id_type_from_param_type):
(format_param_type_to_resource_id_type_case):
(format_param_type_resource_id_cases):
(format_resource_id_type_name_case):
(write_capture_helper_source):
* scripts/generate_vulkan_layers_json.py:
(main):
* scripts/registry_xml.py:
* src/common/PackedEnums.cpp:
(gl::operator<<):
* src/common/PackedEnums.h:
(angle::EnumSize<E>):
(gl::FromGLenum<VertexAttribType>):
(gl::ToGLenum):
(gl::ValueEquals):
(gl::operator==):
(gl::operator!=):
* src/common/android_util.cpp:
(angle::android::NativePixelFormatToGLInternalFormat):
* src/common/angleutils.h:
* src/common/debug.h:
* src/common/platform.h:
* src/common/system_utils_winuwp.cpp: Added.
(angle::SetEnvironmentVar):
(angle::GetEnvironmentVar):
(angle::GetSharedLibraryExtension):
(angle::GetPathSeparator):
(angle::GetCurrentTime):
(angle::UwpLibrary::UwpLibrary):
(angle::OpenSharedLibrary):
(angle::IsDebuggerAttached):
(angle::BreakDebugger):
* src/common/tls.cpp:
(CreateTLSIndex):
(DestroyTLSIndex):
(SetTLSValue):
(GetTLSValue):
* src/common/tls.h:
* src/common/utilities.cpp:
(gl::StripLastArrayIndex):
* src/common/utilities.h:
* src/compiler.gni:
* src/compiler/translator/Compiler.cpp:
(sh::TCompiler::compileTreeImpl):
* src/compiler/translator/ImmutableString_ESSL_autogen.cpp:
* src/compiler/translator/ImmutableString_autogen.cpp:
* src/compiler/translator/IntermNode.h:
(sh::TIntermPreprocessorDirective::getDirective const): Deleted.
(sh::TIntermPreprocessorDirective::getCommand const): Deleted.
* src/compiler/translator/ParseContext.cpp:
(sh::TParseContext::TParseContext):
(sh::TParseContext::checkIsValidArraySize):
(sh::TParseContext::parseFunctionDeclarator):
* src/compiler/translator/ParseContext.h:
(sh::TParseContext::getOutputType const):
* src/compiler/translator/ShaderVars.cpp:
(sh::ShaderVariable::operator=):
* src/compiler/translator/SymbolTable.cpp:
(sh::TSymbolTable::setGlInArraySize):
(sh::TSymbolTable::gl_FragData const):
(sh::TSymbolTable::gl_SecondaryFragDataEXT const):
(sh::SymbolRule::get const):
(sh::FindMangledBuiltIn):
(sh::UnmangledEntry::matches const):
* src/compiler/translator/SymbolTable.h:
(sh::SymbolRule::SymbolRule):
(sh::SymbolRule::Get):
(sh::UnmangledEntry::UnmangledEntry):
(sh::SymbolEntry::SymbolEntry): Deleted.
* src/compiler/translator/SymbolTable_ESSL_autogen.cpp:
(sh::BuiltInVariable::angle_BaseInstance):
(sh::BuiltInVariable::angle_BaseVertex):
(sh::BuiltInVariable::gl_BaseInstance):
(sh::BuiltInVariable::gl_BaseVertex):
(sh::BuiltInVariable::gl_DrawID):
(sh::BuiltInVariable::gl_FragColor):
(sh::BuiltInVariable::gl_FragCoord):
(sh::BuiltInVariable::gl_FragDepth):
(sh::BuiltInVariable::gl_FrontFacing):
(sh::BuiltInVariable::gl_GlobalInvocationID):
(sh::BuiltInVariable::gl_InstanceID):
(sh::BuiltInVariable::gl_InstanceIndex):
(sh::BuiltInVariable::gl_InvocationID):
(sh::BuiltInVariable::gl_LastFragColor):
(sh::BuiltInVariable::gl_LastFragColorARM):
(sh::BuiltInVariable::gl_Layer):
(sh::BuiltInVariable::gl_LayerGS):
(sh::BuiltInVariable::gl_LayerVS):
(sh::BuiltInVariable::gl_LocalInvocationID):
(sh::BuiltInVariable::gl_LocalInvocationIndex):
(sh::BuiltInVariable::gl_NumWorkGroups):
(sh::BuiltInVariable::gl_PointCoord):
(sh::BuiltInVariable::gl_PointSize):
(sh::BuiltInVariable::gl_Position):
(sh::BuiltInVariable::gl_PrimitiveID):
(sh::BuiltInVariable::gl_PrimitiveIDGS):
(sh::BuiltInVariable::gl_PrimitiveIDIn):
(sh::BuiltInVariable::gl_SecondaryFragColorEXT):
(sh::BuiltInVariable::gl_VertexID):
(sh::BuiltInVariable::gl_VertexIndex):
(sh::BuiltInVariable::gl_ViewID_OVR):
(sh::BuiltInVariable::gl_ViewportIndex):
(sh::BuiltInVariable::gl_WorkGroupID):
(sh::BuiltInVariable::gl_WorkGroupSize):
(sh::TSymbolTable::initializeBuiltInVariables):
(sh::TSymbolTable::findBuiltIn const):
(sh::TSymbolTable::isUnmangledBuiltInName const):
(sh::TSymbolTable::getSymbol const): Deleted.
(sh::TSymbolTable::getUnmangled const): Deleted.
(sh::TSymbolTable::getUnmangledBuiltInForShaderVersion): Deleted.
* src/compiler/translator/SymbolTable_autogen.cpp:
(sh::BuiltInVariable::angle_BaseInstance):
(sh::BuiltInVariable::angle_BaseVertex):
(sh::BuiltInVariable::gl_BaseInstance):
(sh::BuiltInVariable::gl_BaseVertex):
(sh::BuiltInVariable::gl_DrawID):
(sh::BuiltInVariable::gl_FragColor):
(sh::BuiltInVariable::gl_FragCoord):
(sh::BuiltInVariable::gl_FragDepth):
(sh::BuiltInVariable::gl_FrontFacing):
(sh::BuiltInVariable::gl_GlobalInvocationID):
(sh::BuiltInVariable::gl_InstanceID):
(sh::BuiltInVariable::gl_InstanceIndex):
(sh::BuiltInVariable::gl_InvocationID):
(sh::BuiltInVariable::gl_LastFragColor):
(sh::BuiltInVariable::gl_LastFragColorARM):
(sh::BuiltInVariable::gl_Layer):
(sh::BuiltInVariable::gl_LayerGS):
(sh::BuiltInVariable::gl_LayerVS):
(sh::BuiltInVariable::gl_LocalInvocationID):
(sh::BuiltInVariable::gl_LocalInvocationIndex):
(sh::BuiltInVariable::gl_NumWorkGroups):
(sh::BuiltInVariable::gl_PointCoord):
(sh::BuiltInVariable::gl_PointSize):
(sh::BuiltInVariable::gl_Position):
(sh::BuiltInVariable::gl_PrimitiveID):
(sh::BuiltInVariable::gl_PrimitiveIDGS):
(sh::BuiltInVariable::gl_PrimitiveIDIn):
(sh::BuiltInVariable::gl_SecondaryFragColorEXT):
(sh::BuiltInVariable::gl_VertexID):
(sh::BuiltInVariable::gl_VertexIndex):
(sh::BuiltInVariable::gl_ViewID_OVR):
(sh::BuiltInVariable::gl_ViewportIndex):
(sh::BuiltInVariable::gl_WorkGroupID):
(sh::BuiltInVariable::gl_WorkGroupSize):
(sh::TSymbolTable::initializeBuiltInVariables):
(sh::TSymbolTable::findBuiltIn const):
(sh::TSymbolTable::isUnmangledBuiltInName const):
(sh::TSymbolTable::getSymbol const): Deleted.
(sh::TSymbolTable::getUnmangled const): Deleted.
(sh::TSymbolTable::getUnmangledBuiltInForShaderVersion): Deleted.
* src/compiler/translator/SymbolTable_autogen.h:
* src/compiler/translator/TranslatorVulkan.cpp:
(sh::TranslatorVulkan::translate):
* src/compiler/translator/gen_builtin_symbols.py:
(get_shader_version_for_level):
(GroupedList.__init__):
(GroupedList.add_entry):
(GroupedList.format_rule):
(GroupedList):
(GroupedList.format_rules):
(GroupedList.get_rules):
(GroupedList.get_names):
(GroupedList.get_offsets):
(GroupedList.update_arrays):
(GroupedList.update_arrays.add_rule):
(UnmangledGroupedList.add_entry):
(UnmangledGroupedList.get_array):
(define_constexpr_variable):
(process_single_function_group):
(process_function_group):
(process_single_variable_group):
(GroupedList.add_obj): Deleted.
(GroupedList.get_array): Deleted.
(UnmangledGroupedList.add_obj): Deleted.
* src/feature_support_util/feature_support_util.cpp:
* src/gpu_info_util/SystemInfo_win.cpp:
(angle::GetSystemInfo):
* src/image_util/loadimage.cpp:
(angle::LoadD24S8ToD32F):
(angle::LoadD32ToD32FX32):
(angle::LoadD32ToD32F):
* src/image_util/loadimage.h:
* src/libANGLE/Buffer.cpp:
(gl::Buffer::Buffer):
* src/libANGLE/Buffer.h:
* src/libANGLE/Caps.cpp:
(gl::DetermineHalfFloatTextureFilteringSupport):
(gl::DetermineFloatTextureFilteringSupport):
(gl::Extensions::setTextureExtensionSupport):
(gl::GetExtensionInfoMap):
(egl::DisplayExtensions::getStrings const):
(egl::DeviceExtensions::getStrings const):
(egl::ClientExtensions::getStrings const):
* src/libANGLE/Caps.h:
* src/libANGLE/Constants.h:
* src/libANGLE/Context.cpp:
(gl::Context::Context):
(gl::Context::initialize):
(gl::Context::onDestroy):
(gl::Context::bindImageTexture):
(gl::Context::getQueryiv):
(gl::Context::detachTexture):
(gl::Context::generateSupportedExtensions const):
(gl::Context::initCaps):
(gl::Context::onSubjectStateChange):
(gl::StateCache::updateActiveAttribsMask):
(gl::StateCache::updateVertexAttribTypesValidation):
* src/libANGLE/Context.h:
* src/libANGLE/Device.cpp:
(egl::Device::getAttribute):
(egl::Device::getDevice): Deleted.
* src/libANGLE/Device.h:
* src/libANGLE/Display.cpp:
(egl::Display::createContext):
(egl::GenerateClientExtensions):
(egl::Display::isValidNativeDisplay):
(egl::Display::initializeFrontendFeatures):
(egl::Display::queryStringi):
* src/libANGLE/ErrorStrings.h:
* src/libANGLE/Fence.h:
* src/libANGLE/FrameCapture.cpp:
(angle::ParamCapture::ParamCapture):
(angle::ParamCapture::operator=):
(angle::ParamBuffer::ParamBuffer):
(angle::ParamBuffer::operator=):
(angle::ParamBuffer::getParam):
(angle::ParamBuffer::getParam const):
(angle::ParamBuffer::addParam):
(angle::ParamBuffer::addReturnValue):
(angle::ParamBuffer::getClientArrayPointerParameter):
(angle::CallCapture::CallCapture):
(angle::CallCapture::operator=):
(angle::CallCapture::name const):
(angle::ReplayContext::ReplayContext):
(angle::ReplayContext::~ReplayContext):
(angle::FrameCapture::FrameCapture):
(angle::FrameCapture::maybeCaptureClientData):
(angle::FrameCapture::captureCall):
(angle::FrameCapture::captureUpdateResourceIDs):
(angle::FrameCapture::maybeUpdateResourceIDs):
(angle::FrameCapture::captureClientArraySnapshot):
(angle::FrameCapture::onEndFrame):
(angle::DataCounters::getAndIncrement):
(angle::FrameCapture::reset):
(angle::CaptureGenHandlesImpl):
(angle::WriteParamValueToStream<ParamType::TBufferID>):
(angle::WriteParamValueToStream<ParamType::TFenceNVID>):
(angle::WriteParamValueToStream<ParamType::TFramebufferID>):
(angle::WriteParamValueToStream<ParamType::TMemoryObjectID>):
(angle::WriteParamValueToStream<ParamType::TPathID>):
(angle::WriteParamValueToStream<ParamType::TProgramPipelineID>):
(angle::WriteParamValueToStream<ParamType::TQueryID>):
(angle::WriteParamValueToStream<ParamType::TRenderbufferID>):
(angle::WriteParamValueToStream<ParamType::TSamplerID>):
(angle::WriteParamValueToStream<ParamType::TSemaphoreID>):
(angle::WriteParamValueToStream<ParamType::TShaderProgramID>):
(angle::WriteParamValueToStream<ParamType::TTextureID>):
(angle::WriteParamValueToStream<ParamType::TTransformFeedbackID>):
(angle::WriteParamValueToStream<ParamType::TVertexArrayID>):
(angle::CallCapture::~CallCapture): Deleted.
(angle::ParamBuffer::~ParamBuffer): Deleted.
(angle::ParamCapture::~ParamCapture): Deleted.
(angle::FrameCapture::~FrameCapture): Deleted.
(angle::FrameCapture::anyClientArray const): Deleted.
(angle::FrameCapture::saveCapturedFrameAsCpp): Deleted.
(angle::FrameCapture::getAndIncrementCounter): Deleted.
(angle::FrameCapture::writeStringPointerParamReplay): Deleted.
(angle::FrameCapture::writeRenderbufferIDPointerParamReplay): Deleted.
(angle::FrameCapture::writeBinaryParamReplay): Deleted.
(angle::FrameCapture::writeCallReplay): Deleted.
* src/libANGLE/FrameCapture.h:
(angle::CaptureGenHandles):
* src/libANGLE/FrameCapture_mock.cpp: Added.
(angle::CallCapture::~CallCapture):
(angle::ParamBuffer::~ParamBuffer):
(angle::ParamCapture::~ParamCapture):
(angle::FrameCapture::FrameCapture):
(angle::FrameCapture::~FrameCapture):
(angle::FrameCapture::onEndFrame):
(angle::FrameCapture::replay):
* src/libANGLE/Framebuffer.cpp:
(gl::Framebuffer::formsRenderingFeedbackLoopWith const):
(gl::Framebuffer::formsCopyingFeedbackLoopWith const):
* src/libANGLE/Framebuffer.h:
* src/libANGLE/FramebufferAttachment.cpp:
(gl::FramebufferAttachment::getRedSize const):
(gl::FramebufferAttachment::getGreenSize const):
(gl::FramebufferAttachment::getBlueSize const):
(gl::FramebufferAttachment::getAlphaSize const):
(gl::FramebufferAttachment::getDepthSize const):
(gl::FramebufferAttachment::getStencilSize const):
* src/libANGLE/FramebufferAttachment.h:
* src/libANGLE/GLES1State.cpp:
(gl::GLES1State::getActiveAttributesMask const):
* src/libANGLE/GLES1State.h:
* src/libANGLE/ImageIndex.cpp:
* src/libANGLE/ImageIndex.h:
* src/libANGLE/MemoryObject.cpp:
(gl::MemoryObject::MemoryObject):
* src/libANGLE/MemoryObject.h:
* src/libANGLE/MemoryProgramCache.cpp:
* src/libANGLE/Program.cpp:
(gl::ProgramBindings::bindLocation):
(gl::ProgramBindings::getBindingByName const):
(gl::ProgramBindings::getBinding const):
(gl::ProgramBindings::begin const):
(gl::ProgramBindings::end const):
(gl::ProgramAliasedBindings::ProgramAliasedBindings):
(gl::ProgramAliasedBindings::~ProgramAliasedBindings):
(gl::ProgramAliasedBindings::bindLocation):
(gl::ProgramAliasedBindings::getBindingByName const):
(gl::ProgramAliasedBindings::getBinding const):
(gl::ProgramAliasedBindings::begin const):
(gl::ProgramAliasedBindings::end const):
(gl::ProgramState::getAttributeLocation const):
(gl::ProgramState::getFirstAttachedShaderStageType const):
(gl::ProgramState::getLastAttachedShaderStageType const):
(gl::Program::getFragmentInputBindingInfo const):
(gl::Program::link):
(gl::ProgramState::updateProgramInterfaceInputs):
(gl::ProgramState::updateProgramInterfaceOutputs):
(gl::Program::unlink):
(gl::Program::getActiveAttribute const):
(gl::Program::getActiveAttributeCount const):
(gl::Program::getActiveAttributeMaxLength const):
(gl::Program::getAttributes const):
(gl::Program::getInputResource const):
(gl::Program::getInputResourceIndex const):
(gl::Program::getResourceMaxNameSize const):
(gl::Program::getInputResourceMaxNameSize const):
(gl::Program::getOutputResourceMaxNameSize const):
(gl::Program::getResourceLocation const):
(gl::Program::getInputResourceLocation const):
(gl::Program::getOutputResourceLocation const):
(gl::Program::getOutputResourceIndex const):
(gl::Program::getResourceName const):
(gl::Program::getInputResourceName const):
(gl::Program::getOutputResourceName const):
(gl::Program::getUniformResourceName const):
(gl::Program::getBufferVariableResourceName const):
(gl::Program::getOutputResource const):
(gl::Program::getUniformLocationBindings const):
(gl::Program::linkUniforms):
(gl::Program::linkAttributes):
(gl::Program::linkValidateGlobalNames const):
(gl::Program::getMergedVaryings const):
(gl::Program::linkOutputVariables):
(gl::Program::serialize const):
(gl::Program::deserialize):
* src/libANGLE/Program.h:
(gl::ProgramVaryingRef::get const):
* src/libANGLE/ProgramLinkedResources.cpp:
(gl::UniformLinker::link):
(gl::UniformLinker::indexUniforms):
(gl::UniformLinker::gatherUniformLocationsAndCheckConflicts):
* src/libANGLE/ProgramLinkedResources.h:
* src/libANGLE/ProgramPipeline.cpp:
(gl::ProgramPipeline::ProgramPipeline):
* src/libANGLE/ProgramPipeline.h:
* src/libANGLE/Query.cpp:
(gl::Query::Query):
* src/libANGLE/Query.h:
* src/libANGLE/RefCountObject.h:
(gl::RefCountObject::RefCountObject):
(gl::RefCountObject::id const):
(gl::BindingPointer::id const):
* src/libANGLE/Renderbuffer.cpp:
(gl::Renderbuffer::Renderbuffer):
(gl::Renderbuffer::getId const):
* src/libANGLE/Renderbuffer.h:
* src/libANGLE/Sampler.cpp:
(gl::Sampler::Sampler):
* src/libANGLE/Sampler.h:
* src/libANGLE/Semaphore.cpp:
(gl::Semaphore::Semaphore):
* src/libANGLE/Semaphore.h:
* src/libANGLE/Shader.cpp:
(gl::Shader::resolveCompile):
(gl::Shader::getTransformFeedbackVaryingMappedName):
* src/libANGLE/State.cpp:
(gl::State::getSamplerTextureId const):
(gl::State::detachTexture):
(gl::State::detachSampler):
(gl::State::detachRenderbuffer):
(gl::State::removeTransformFeedbackBinding):
(gl::State::getActiveQueryId const):
(gl::State::detachBuffer):
(gl::State::getIntegerv):
(gl::State::getIntegeri_v):
(gl::State::syncImages):
(gl::State::onImageStateChange):
* src/libANGLE/State.h:
(gl::State::getSamplerId const):
(gl::State::getRenderbufferId const):
* src/libANGLE/Texture.cpp:
(gl::Texture::Texture):
(gl::Texture::setStorage):
(gl::Texture::getId const):
* src/libANGLE/Texture.h:
* src/libANGLE/TransformFeedback.cpp:
(gl::TransformFeedback::TransformFeedback):
(gl::TransformFeedback::detachBuffer):
* src/libANGLE/TransformFeedback.h:
* src/libANGLE/VaryingPacking.cpp:
(gl::VaryingPacking::collectAndPackUserVaryings):
(gl::VaryingPacking::packUserVaryings):
* src/libANGLE/VertexArray.cpp:
(gl::VertexArray::detachBuffer):
(gl::VertexArray::bindVertexBufferImpl):
* src/libANGLE/VertexArray.h:
* src/libANGLE/capture_gles_2_0_params.cpp:
(gl::CaptureDeleteBuffers_buffersPacked):
(gl::CaptureDeleteFramebuffers_framebuffersPacked):
(gl::CaptureDeleteTextures_texturesPacked):
(gl::CaptureGenBuffers_buffersPacked):
(gl::CaptureGenFramebuffers_framebuffersPacked):
(gl::CaptureGenRenderbuffers_renderbuffersPacked):
(gl::CaptureGenTextures_texturesPacked):
(gl::CaptureShaderSource_string):
* src/libANGLE/capture_gles_3_0_params.cpp:
(gl::CaptureDeleteQueries_idsPacked):
(gl::CaptureDeleteSamplers_samplersPacked):
(gl::CaptureDeleteTransformFeedbacks_idsPacked):
(gl::CaptureDeleteVertexArrays_arraysPacked):
(gl::CaptureGenQueries_idsPacked):
(gl::CaptureGenSamplers_samplersPacked):
(gl::CaptureGenTransformFeedbacks_idsPacked):
(gl::CaptureGenVertexArrays_arraysPacked):
* src/libANGLE/capture_gles_3_1_params.cpp:
(gl::CaptureDeleteProgramPipelines_pipelinesPacked):
(gl::CaptureGenProgramPipelines_pipelinesPacked):
* src/libANGLE/capture_gles_ext_params.cpp:
(gl::CaptureDeleteQueriesEXT_idsPacked):
(gl::CaptureGenQueriesEXT_idsPacked):
* src/libANGLE/features.h:
* src/libANGLE/formatutils.cpp:
(gl::UnsizedHalfFloatOESRGBATextureAttachmentSupport):
(gl::BuildInternalFormatInfoMap):
(gl::InternalFormat::computeDepthPitch const):
(gl::GetVertexFormatID):
(gl::GetVertexFormatFromID):
(gl::GetVertexFormatSize):
* src/libANGLE/frame_capture_utils_autogen.cpp:
(angle::GetResourceIDTypeFromParamType):
(angle::GetResourceIDTypeName):
* src/libANGLE/frame_capture_utils_autogen.h:
* src/libANGLE/queryutils.cpp:
(gl::GetBufferVariableResourceProperty):
(gl::QueryProgramResourceLocation):
(gl::QueryProgramResourceiv):
(egl::QueryContextAttrib):
* src/libANGLE/renderer/DeviceImpl.h:
* src/libANGLE/renderer/Format.h:
(angle::Format::isVertexTypeHalfFloat const):
* src/libANGLE/renderer/FormatID_autogen.h:
* src/libANGLE/renderer/Format_table_autogen.cpp:
(angle::Format::InternalFormatToID):
* src/libANGLE/renderer/angle_format.py:
(gl_format_channels):
(get_vertex_copy_function):
* src/libANGLE/renderer/angle_format_map.json:
* src/libANGLE/renderer/copyvertex.h:
* src/libANGLE/renderer/copyvertex.inc.h:
(rx::CopyTo32FVertexData):
(rx::CopyXYZ10ToXYZW32FVertexData):
(rx::CopyW2XYZ10ToXYZW32FVertexData):
* src/libANGLE/renderer/d3d/DeviceD3D.cpp:
(rx::DeviceD3D::getAttribute):
(rx::DeviceD3D::getDevice): Deleted.
* src/libANGLE/renderer/d3d/DeviceD3D.h:
* src/libANGLE/renderer/d3d/HLSLCompiler.cpp:
(rx::HLSLCompiler::ensureInitialized):
(rx::HLSLCompiler::compileToBinary):
* src/libANGLE/renderer/d3d/ProgramD3D.cpp:
(rx::ProgramD3D::getVertexExecutableForCachedInputLayout):
* src/libANGLE/renderer/d3d/RendererD3D.cpp:
(rx::DefaultGLErrorCode):
* src/libANGLE/renderer/d3d/ShaderD3D.cpp:
(rx::ShaderD3D::compile):
* src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp:
(rx::Buffer11::getConstantBufferRange):
(rx::Buffer11::NativeStorage::FillBufferDesc):
* src/libANGLE/renderer/d3d/d3d11/Context11.cpp:
(rx::Context11::drawArrays):
(rx::Context11::drawArraysInstanced):
(rx::Context11::drawArraysInstancedBaseInstance):
(rx::Context11::drawArraysIndirect):
* src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp:
(rx::DebugAnnotator11::initialize):
* src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp:
(rx::Renderer11::Renderer11):
(rx::Renderer11::initialize):
(rx::Renderer11::callD3D11On12CreateDevice):
(rx::Renderer11::initializeD3DDevice):
(rx::Renderer11::generateDisplayExtensions const):
(rx::Renderer11::isValidNativeWindow const):
(rx::Renderer11::createNativeWindow const):
(rx::Renderer11::drawArrays):
(rx::Renderer11::release):
(rx::Renderer11::getShareHandleSupport const):
(rx::Renderer11::copyImageInternal):
* src/libANGLE/renderer/d3d/d3d11/Renderer11.h:
* src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp:
(rx::TextureStorage11::getSRVForImage):
(rx::TextureStorage11::getUAVForImage):
* src/libANGLE/renderer/d3d/d3d11/Trim11.cpp:
(rx::Trim11::trim):
(rx::Trim11::registerForRendererTrimRequest):
(rx::Trim11::unregisterForRendererTrimRequest):
* src/libANGLE/renderer/d3d/d3d11/Trim11.h:
* src/libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.cpp:
(rx::RoHelper::SupportedWindowsRelease):
* src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp:
(rx::d3d11_gl::GenerateCaps):
(rx::d3d11::InitializeFeatures):
* src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h:
* src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp:
(rx::NativeWindow11WinRT::createSwapChain):
* src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h:
* src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h:
* src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp:
(rx::d3d9::InitializeFeatures):
* src/libANGLE/renderer/gen_angle_format_table.py:
(ceil_int):
(get_channel_struct):
(get_mip_generation_function):
* src/libANGLE/renderer/gl/BlitGL.cpp:
(rx::BlitGL::copyImageToLUMAWorkaroundTexture):
(rx::BlitGL::copySubImageToLUMAWorkaroundTexture):
(rx::BlitGL::blitColorBufferWithShader):
(rx::BlitGL::copySubTexture):
(rx::BlitGL::copySubTextureCPUReadback):
(rx::BlitGL::copyTexSubImage):
(rx::BlitGL::clearRenderableTexture):
(rx::BlitGL::clearRenderbuffer):
(rx::BlitGL::clearFramebuffer):
(rx::BlitGL::clearRenderableTextureAlphaToOne):
(rx::BlitGL::initializeResources):
(rx::BlitGL::orphanScratchTextures):
(rx::BlitGL::setScratchTextureParameter):
(rx::BlitGL::getBlitProgram):
(rx::BlitGL::getBlitProgramType): Deleted.
* src/libANGLE/renderer/gl/BlitGL.h:
* src/libANGLE/renderer/gl/ContextGL.cpp:
(rx::ContextGL::createRenderbuffer):
(rx::ContextGL::setDrawArraysState):
(rx::ContextGL::setDrawElementsState):
(rx::ContextGL::drawArrays):
(rx::ContextGL::updateAttributesForBaseInstance):
(rx::ContextGL::resetUpdatedAttributes):
(rx::ContextGL::drawArraysInstancedBaseInstance):
(rx::ContextGL::drawElements):
(rx::ContextGL::drawElementsInstancedBaseVertexBaseInstance):
(rx::ContextGL::validateState const):
* src/libANGLE/renderer/gl/ContextGL.h:
* src/libANGLE/renderer/gl/ProgramGL.cpp:
(rx::ProgramGL::link):
* src/libANGLE/renderer/gl/RenderbufferGL.cpp:
(rx::RenderbufferGL::RenderbufferGL):
(rx::RenderbufferGL::~RenderbufferGL):
(rx::RenderbufferGL::onDestroy):
(rx::RenderbufferGL::setStorage):
(rx::RenderbufferGL::setStorageMultisample):
(rx::RenderbufferGL::initializeContents):
* src/libANGLE/renderer/gl/RenderbufferGL.h:
* src/libANGLE/renderer/gl/ShaderGL.cpp:
(rx::ShaderGL::compile):
* src/libANGLE/renderer/gl/StateManagerGL.cpp:
(rx::StateManagerGL::bindBufferBase):
(rx::StateManagerGL::bindBufferRange):
(rx::StateManagerGL::validateState const):
* src/libANGLE/renderer/gl/StateManagerGL.h:
* src/libANGLE/renderer/gl/SurfaceGL.cpp:
(rx::SurfaceGL::initializeContents):
* src/libANGLE/renderer/gl/TextureGL.cpp:
(rx::TextureGL::setImageHelper):
(rx::TextureGL::setSubImage):
(rx::TextureGL::setCompressedImage):
(rx::TextureGL::setCompressedSubImage):
(rx::TextureGL::copyImage):
(rx::TextureGL::copySubTextureHelper):
(rx::TextureGL::setStorage):
(rx::TextureGL::setImageExternal):
(rx::TextureGL::setStorageMultisample):
(rx::TextureGL::setStorageExternalMemory):
(rx::TextureGL::setEGLImageTarget):
(rx::TextureGL::setLevelInfo):
(rx::TextureGL::initializeContents):
* src/libANGLE/renderer/gl/VertexArrayGL.cpp:
(rx::VertexArrayGL::streamAttributes const):
(rx::VertexArrayGL::validateState const):
* src/libANGLE/renderer/gl/VertexArrayGL.h:
* src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp: Added.
(rx::DeviceCGL::DeviceCGL):
(rx::DeviceCGL::~DeviceCGL):
(rx::DeviceCGL::initialize):
(rx::DeviceCGL::getAttribute):
(rx::DeviceCGL::getType):
(rx::DeviceCGL::generateExtensions const):
* src/libANGLE/renderer/gl/cgl/DeviceCGL.h: Added.
* src/libANGLE/renderer/gl/cgl/DisplayCGL.h:
* src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:
(rx::DisplayCGL::createDevice):
(rx::DisplayCGL::getCGLPixelFormat const):
(rx::DisplayCGL::generateExtensions const):
* src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.mm:
(rx::IOSurfaceSurfaceCGL::initializeAlphaChannel):
* src/libANGLE/renderer/gl/egl/DisplayEGL.cpp:
(rx::DisplayEGL::generateExtensions const):
* src/libANGLE/renderer/gl/glx/DisplayGLX.cpp:
(rx::DisplayGLX::makeCurrent):
* src/libANGLE/renderer/gl/glx/WindowSurfaceGLX.cpp:
(rx::WindowSurfaceGLX::initialize):
* src/libANGLE/renderer/gl/renderergl_utils.cpp:
(rx::nativegl_gl::GenerateCaps):
(rx::nativegl_gl::InitializeFeatures):
(rx::nativegl_gl::InitializeFrontendFeatures):
(rx::nativegl::SupportsCompute):
(rx::nativegl::GetBufferBindingQuery):
(rx::nativegl::GetBufferBindingString):
* src/libANGLE/renderer/gl/renderergl_utils.h:
* src/libANGLE/renderer/load_functions_data.json:
* src/libANGLE/renderer/load_functions_table_autogen.cpp:
(angle::GetLoadFunctionsMap):
* src/libANGLE/renderer/null/DeviceNULL.cpp:
(rx::DeviceNULL::getAttribute):
(rx::DeviceNULL::getDevice): Deleted.
* src/libANGLE/renderer/null/DeviceNULL.h:
* src/libANGLE/renderer/renderer_utils.cpp:
(rx::ShouldUseDebugLayers):
* src/libANGLE/renderer/vulkan/BufferVk.cpp:
(rx::BufferVk::release):
(rx::BufferVk::mapRangeImpl):
(rx::BufferVk::setDataImpl):
* src/libANGLE/renderer/vulkan/CommandGraph.cpp:
(rx::vk::CommandGraphResource::CommandGraphResource):
(rx::vk::CommandGraphResource::~CommandGraphResource):
(rx::vk::CommandGraphResource::isResourceInUse const):
(rx::vk::CommandGraphResource::recordCommands):
(rx::vk::CommandGraphResource::addWriteDependency):
(rx::vk::CommandGraphResource::addReadDependency):
(rx::vk::CommandGraphResource::startNewCommands):
(rx::vk::CommandGraphResource::onWriteImpl):
(rx::vk::SharedGarbage::SharedGarbage):
(rx::vk::SharedGarbage::operator=):
(rx::vk::SharedGarbage::destroyIfComplete):
(rx::vk::CommandGraph::~CommandGraph):
(rx::vk::CommandGraph::submitCommands):
(rx::vk::CommandGraph::releaseResourceUses):
(rx::vk::CommandGraph::releaseResourceUsesAndUpdateSerials):
(rx::vk::CommandGraphResource::resetQueueSerial): Deleted.
* src/libANGLE/renderer/vulkan/CommandGraph.h:
(rx::vk::CommandGraphResource::getLatestSerial const):
(rx::vk::CommandGraphResource::hasStartedRenderPass const):
(rx::vk::CommandGraphResource::updateCurrentAccessNodes):
(rx::vk::CommandGraphResource::onGraphAccess):
(rx::vk::CommandGraphResource::appendToStartedRenderPass):
(rx::vk::CommandGraphResource::renderPassStartedButEmpty const):
(rx::vk::CommandGraphResource::clearRenderPassColorAttachment):
(rx::vk::CommandGraphResource::clearRenderPassDepthAttachment):
(rx::vk::CommandGraphResource::clearRenderPassStencilAttachment):
(rx::vk::CommandGraphResource::invalidateRenderPassColorAttachment):
(rx::vk::CommandGraphResource::invalidateRenderPassDepthAttachment):
(rx::vk::CommandGraphResource::invalidateRenderPassStencilAttachment):
(rx::vk::CommandGraphResource::getRenderPassRenderArea const):
(rx::vk::CommandGraphResource::addGlobalMemoryBarrier):
(rx::vk::CommandGraphResource::hasChildlessWritingNode const):
(rx::vk::CommandGraph::onResourceUse):
(rx::vk::CommandGraphResource::getStoredQueueSerial const): Deleted.
(rx::vk::CommandGraphResource::updateQueueSerial): Deleted.
* src/libANGLE/renderer/vulkan/ContextVk.cpp:
(rx::CommandBatch::CommandBatch):
(rx::CommandBatch::operator=):
(rx::CommandBatch::destroy):
(rx::CommandQueue::destroy):
(rx::CommandQueue::init):
(rx::CommandQueue::checkCompletedCommands):
(rx::CommandQueue::releaseToCommandBatch):
(rx::CommandQueue::clearAllGarbage):
(rx::CommandQueue::allocatePrimaryCommandBuffer):
(rx::CommandQueue::releasePrimaryCommandBuffer):
(rx::CommandQueue::handleDeviceLost):
(rx::CommandQueue::hasInFlightCommands const):
(rx::CommandQueue::finishToSerialOrTimeout):
(rx::CommandQueue::submitFrame):
(rx::CommandQueue::getLastSubmittedFence const):
(rx::ContextVk::ContextVk):
(rx::ContextVk::onDestroy):
(rx::ContextVk::initialize):
(rx::ContextVk::setupDraw):
(rx::ContextVk::setupIndirectDraw):
(rx::ContextVk::setupIndexedIndirectDraw):
(rx::ContextVk::setupLineLoopIndexedIndirectDraw):
(rx::ContextVk::handleDirtyGraphicsVertexBuffers):
(rx::ContextVk::handleDirtyGraphicsIndexBuffer):
(rx::ContextVk::submitFrame):
(rx::ContextVk::flushCommandGraph):
(rx::ContextVk::synchronizeCpuGpuTime):
(rx::ContextVk::traceGpuEventImpl):
(rx::ContextVk::checkCompletedGpuEvents):
(rx::ContextVk::flushGpuEvents):
(rx::ContextVk::clearAllGarbage):
(rx::ContextVk::handleDeviceLost):
(rx::ContextVk::drawArraysIndirect):
(rx::ContextVk::drawElementsIndirect):
(rx::ContextVk::syncState):
(rx::ContextVk::onMakeCurrent):
(rx::ContextVk::dispatchComputeIndirect):
(rx::ContextVk::memoryBarrier):
(rx::ContextVk::writeAtomicCounterBufferDriverUniformOffsets):
(rx::ContextVk::updateActiveTextures):
(rx::ContextVk::updateActiveImages):
(rx::ContextVk::shouldFlush):
(rx::ContextVk::flushImpl):
(rx::ContextVk::finishImpl):
(rx::ContextVk::isSerialInUse const):
(rx::ContextVk::checkCompletedCommands):
(rx::ContextVk::finishToSerial):
(rx::ContextVk::finishToSerialOrTimeout):
(rx::ContextVk::getCompatibleRenderPass):
(rx::ContextVk::getRenderPassWithOps):
(rx::ContextVk::ensureSubmitFenceInitialized):
(rx::ContextVk::getNextSubmitFence):
(rx::ContextVk::getLastSubmittedFence const):
(rx::ContextVk::getTimestamp):
(rx::ContextVk::updateDefaultAttribute):
(rx::ContextVk::waitForSwapchainImageIfNecessary):
(rx::ContextVk::CommandBatch::CommandBatch): Deleted.
(rx::ContextVk::CommandBatch::operator=): Deleted.
(rx::ContextVk::CommandBatch::destroy): Deleted.
(rx::ContextVk::releaseToCommandBatch): Deleted.
(rx::ContextVk::recycleCommandBatch): Deleted.
(rx::ContextVk::getCommandGraph): Deleted.
* src/libANGLE/renderer/vulkan/ContextVk.h:
(rx::ContextVk::onVertexAttributeChange):
(rx::ContextVk::getCurrentQueueSerial const):
(rx::ContextVk::getLastSubmittedQueueSerial const):
(rx::ContextVk::getLastCompletedQueueSerial const):
(rx::ContextVk::addGarbage):
(rx::ContextVk::getCommandGraph):
(rx::ContextVk::releaseObject): Deleted.
* src/libANGLE/renderer/vulkan/DeviceVk.cpp:
(rx::DeviceVk::getAttribute):
(rx::DeviceVk::getDevice): Deleted.
* src/libANGLE/renderer/vulkan/DeviceVk.h:
* src/libANGLE/renderer/vulkan/DisplayVk.cpp:
(rx::DisplayVk::generateExtensions const):
* src/libANGLE/renderer/vulkan/FramebufferVk.cpp:
(rx::FramebufferVk::destroy):
(rx::FramebufferVk::invalidate):
(rx::FramebufferVk::invalidateSub):
(rx::FramebufferVk::clearImpl):
(rx::FramebufferVk::getImplementationColorReadType const):
(rx::FramebufferVk::blitWithCommand):
(rx::FramebufferVk::blit):
(rx::FramebufferVk::resolveColorWithCommand):
(rx::FramebufferVk::readPixelsImpl):
(rx::FramebufferVk::onScissorChange):
* src/libANGLE/renderer/vulkan/FramebufferVk.h:
(rx::FramebufferVk::appendToStartedRenderPass):
* src/libANGLE/renderer/vulkan/GlslangWrapper.cpp:
* src/libANGLE/renderer/vulkan/ImageVk.cpp:
(rx::ImageVk::onDestroy):
(rx::ImageVk::orphan):
* src/libANGLE/renderer/vulkan/ImageVk.h:
* src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp:
(rx::MemoryObjectVk::createImage):
* src/libANGLE/renderer/vulkan/OverlayVk.cpp:
(rx::OverlayVk::createFont):
(rx::OverlayVk::cullWidgets):
(rx::OverlayVk::onPresent):
* src/libANGLE/renderer/vulkan/PersistentCommandPool.cpp:
(rx::vk::PersistentCommandPool::destroy):
(rx::vk::PersistentCommandPool::allocate):
(rx::vk::PersistentCommandPool::alloc): Deleted.
* src/libANGLE/renderer/vulkan/PersistentCommandPool.h:
* src/libANGLE/renderer/vulkan/ProgramVk.cpp:
(rx::ProgramVk::reset):
(rx::ProgramVk::initDefaultUniformLayoutMapping):
(rx::ProgramVk::updateDefaultUniformsDescriptorSet):
(rx::ProgramVk::updateBuffersDescriptorSet):
(rx::ProgramVk::updateAtomicCounterBuffersDescriptorSet):
(rx::ProgramVk::updateImagesDescriptorSet):
(rx::ProgramVk::updateTransformFeedbackDescriptorSetImpl):
(rx::ProgramVk::updateDescriptorSets):
* src/libANGLE/renderer/vulkan/ProgramVk.h:
(rx::ProgramVk::getGraphicsPipeline):
* src/libANGLE/renderer/vulkan/README.md:
* src/libANGLE/renderer/vulkan/RenderTargetVk.cpp:
(rx::RenderTargetVk::RenderTargetVk):
(rx::RenderTargetVk::init):
(rx::RenderTargetVk::reset):
(rx::RenderTargetVk::onColorDraw):
(rx::RenderTargetVk::onDepthStencilDraw):
(rx::RenderTargetVk::updateSwapchainImage):
(rx::RenderTargetVk::getImageForRead):
(rx::RenderTargetVk::getImageForWrite const):
(rx::RenderTargetVk::getFetchImageView const): Deleted.
* src/libANGLE/renderer/vulkan/RenderTargetVk.h:
* src/libANGLE/renderer/vulkan/RenderbufferVk.cpp:
(rx::RenderbufferVk::setStorageImpl):
(rx::RenderbufferVk::setStorageEGLImageTarget):
(rx::RenderbufferVk::releaseImage):
* src/libANGLE/renderer/vulkan/RenderbufferVk.h:
* src/libANGLE/renderer/vulkan/RendererVk.cpp:
(rx::RendererVk::~RendererVk):
(rx::RendererVk::onDestroy):
(rx::RendererVk::notifyDeviceLost):
(rx::RendererVk::initialize):
(rx::RendererVk::initializeDevice):
(rx::RendererVk::initFeatures):
(rx::RendererVk::queueSubmit):
(rx::RendererVk::cleanupGarbage):
(rx::RendererVk::getMaxFenceWaitTimeNs const):
(rx::RendererVk::onCompletedSerial):
(rx::RendererVk::nextSerial): Deleted.
(rx::RendererVk::addGarbage): Deleted.
* src/libANGLE/renderer/vulkan/RendererVk.h:
(rx::CollectGarbage):
(rx::RendererVk::getMaxVertexAttribDivisor const):
(rx::RendererVk::collectGarbageAndReinit):
(rx::RendererVk::getCurrentQueueSerial const):
(rx::RendererVk::getLastSubmittedQueueSerial const):
(rx::RendererVk::getLastCompletedQueueSerial const):
(rx::RendererVk::shouldCleanupGarbage):
* src/libANGLE/renderer/vulkan/SamplerVk.cpp:
(rx::SamplerVk::onDestroy):
(rx::SamplerVk::syncState):
* src/libANGLE/renderer/vulkan/SecondaryCommandBuffer.cpp:
(rx::vk::priv::SecondaryCommandBuffer::executeCommands):
(rx::vk::priv::SecondaryCommandBuffer::dumpCommands const):
* src/libANGLE/renderer/vulkan/SecondaryCommandBuffer.h:
(rx::vk::priv::SecondaryCommandBuffer::drawIndirect):
(rx::vk::priv::SecondaryCommandBuffer::drawIndexedIndirect):
* src/libANGLE/renderer/vulkan/SemaphoreVk.cpp:
(rx::SemaphoreVk::onDestroy):
* src/libANGLE/renderer/vulkan/SurfaceVk.cpp:
(rx::OffscreenSurfaceVk::AttachmentImage::initialize):
(rx::OffscreenSurfaceVk::AttachmentImage::destroy):
(rx::OffscreenSurfaceVk::OffscreenSurfaceVk):
(rx::WindowSurfaceVk::WindowSurfaceVk):
(rx::WindowSurfaceVk::createSwapChain):
(rx::WindowSurfaceVk::releaseSwapchainImages):
(rx::WindowSurfaceVk::destroySwapChainImages):
(rx::WindowSurfaceVk::present):
(rx::WindowSurfaceVk::nextSwapchainImage):
* src/libANGLE/renderer/vulkan/SyncVk.cpp:
(rx::vk::SyncHelper::SyncHelper):
(rx::vk::SyncHelper::~SyncHelper):
(rx::vk::SyncHelper::releaseToRenderer):
(rx::vk::SyncHelper::initialize):
(rx::vk::SyncHelper::clientWait):
(rx::vk::SyncHelper::serverWait):
(rx::vk::SyncHelper::getStatus):
(rx::SyncVk::onDestroy):
(rx::SyncVk::serverWait):
(rx::EGLSyncVk::onDestroy):
(rx::EGLSyncVk::serverWait):
(rx::FenceSyncVk::FenceSyncVk): Deleted.
(rx::FenceSyncVk::~FenceSyncVk): Deleted.
(rx::FenceSyncVk::onDestroy): Deleted.
(rx::FenceSyncVk::initialize): Deleted.
(rx::FenceSyncVk::clientWait): Deleted.
(rx::FenceSyncVk::serverWait): Deleted.
(rx::FenceSyncVk::getStatus): Deleted.
* src/libANGLE/renderer/vulkan/SyncVk.h:
* src/libANGLE/renderer/vulkan/TextureVk.cpp:
(rx::TextureVk::onDestroy):
(rx::TextureVk::copySubImageImpl):
(rx::TextureVk::copySubTextureImpl):
(rx::TextureVk::copySubImageImplWithTransfer):
(rx::TextureVk::copySubImageImplWithDraw):
(rx::TextureVk::setStorageExternalMemory):
(rx::TextureVk::setEGLImageTarget):
(rx::TextureVk::ensureImageAllocated):
(rx::TextureVk::setImageHelper):
(rx::TextureVk::copyImageDataToBufferAndGetData):
(rx::TextureVk::copyImageDataToBuffer):
(rx::TextureVk::generateMipmapsWithCPU):
(rx::TextureVk::generateMipmap):
(rx::TextureVk::setBaseLevel):
(rx::TextureVk::changeLevels):
(rx::TextureVk::bindTexImage):
(rx::TextureVk::getAttachmentRenderTarget):
(rx::TextureVk::ensureImageInitialized):
(rx::TextureVk::initLayerRenderTargets):
(rx::TextureVk::syncState):
(rx::TextureVk::getReadImageView const):
(rx::TextureVk::getFetchImageView const):
(rx::TextureVk::getLayerLevelDrawImageView):
(rx::TextureVk::getLayerLevelStorageImageView):
(rx::TextureVk::initImage):
(rx::TextureVk::initImageViews):
(rx::TextureVk::releaseImage):
(rx::TextureVk::releaseImageViews):
(rx::TextureVk::releaseStagingBuffer):
(rx::TextureVk::getLevelCount const):
(rx::TextureVk::generateMipmapLevelsWithCPU):
(rx::TextureVk::TextureVkViews::TextureVkViews): Deleted.
(rx::TextureVk::TextureVkViews::~TextureVkViews): Deleted.
(rx::TextureVk::TextureVkViews::release): Deleted.
(rx::TextureVk::init3DRenderTargets): Deleted.
(rx::TextureVk::initCubeMapRenderTargets): Deleted.
(rx::TextureVk::getTextureViews const): Deleted.
(rx::TextureVk::initImageViewImpl): Deleted.
* src/libANGLE/renderer/vulkan/TextureVk.h:
(): Deleted.
* src/libANGLE/renderer/vulkan/TransformFeedbackVk.cpp:
(rx::TransformFeedbackVk::onBeginOrEnd):
* src/libANGLE/renderer/vulkan/UtilsVk.cpp:
(rx::UtilsVk::ensureConvertIndexIndirectResourcesInitialized):
(rx::UtilsVk::ensureConvertIndexIndirectLineLoopResourcesInitialized):
(rx::UtilsVk::convertIndexIndirectBuffer):
(rx::UtilsVk::convertLineLoopIndexIndirectBuffer):
(rx::UtilsVk::startRenderPass):
(rx::UtilsVk::clearFramebuffer):
(rx::UtilsVk::blitResolveImpl):
(rx::UtilsVk::stencilBlitResolveNoShaderExport):
(rx::UtilsVk::copyImage):
(rx::UtilsVk::cullOverlayWidgets):
(rx::UtilsVk::drawOverlay):
* src/libANGLE/renderer/vulkan/UtilsVk.h:
* src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:
(rx::VertexArrayVk::destroy):
(rx::VertexArrayVk::convertIndexBufferIndirectGPU):
(rx::VertexArrayVk::handleLineLoopIndirect):
(rx::VertexArrayVk::convertVertexBufferCPU):
(rx::VertexArrayVk::syncDirtyAttrib):
(rx::VertexArrayVk::updateStreamedAttribs):
(rx::VertexArrayVk::updateDefaultAttrib):
(rx::VertexArrayVk::updateClientAttribs): Deleted.
* src/libANGLE/renderer/vulkan/VertexArrayVk.h:
(rx::VertexArrayVk::getStreamingVertexAttribsMask const):
* src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp:
(rx::HardwareBufferImageSiblingVkAndroid::initImpl):
(rx::HardwareBufferImageSiblingVkAndroid::release):
* src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.h:
* src/libANGLE/renderer/vulkan/doc/FastOpenGLStateTransitions.md:
* src/libANGLE/renderer/vulkan/doc/FormatTablesAndEmulation.md:
* src/libANGLE/renderer/vulkan/doc/OpenGLLineSegmentRasterization.md:
* src/libANGLE/renderer/vulkan/doc/ShaderModuleCompilation.md:
* src/libANGLE/renderer/vulkan/gen_vk_internal_shaders.py:
(shader_path):
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000000.inc:
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000001.inc:
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000008.inc:
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000009.inc:
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000018.inc:
* src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000019.inc:
* src/libANGLE/renderer/vulkan/shaders/src/ConvertIndex.comp:
* src/libANGLE/renderer/vulkan/shaders/src/ConvertIndex.comp.json:
* src/libANGLE/renderer/vulkan/shaders/src/ConvertVertex.comp:
* src/libANGLE/renderer/vulkan/shaders/src/ConvertVertex.comp.json:
* src/libANGLE/renderer/vulkan/vk_cache_utils.cpp:
(rx::vk::GraphicsPipelineDesc::initializePipeline const):
(rx::vk::GraphicsPipelineDesc::updateVertexInput):
(rx::vk::PipelineLayoutDesc::updatePushConstantRange):
(rx::RenderPassCache::addRenderPass):
(rx::GraphicsPipelineCache::release):
(rx::GraphicsPipelineCache::insertPipeline):
* src/libANGLE/renderer/vulkan/vk_cache_utils.h:
* src/libANGLE/renderer/vulkan/vk_caps_utils.cpp:
(rx::RendererVk::ensureCapsInitialized const):
* src/libANGLE/renderer/vulkan/vk_format_map.json:
* src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp:
(rx::vk::Format::initialize):
* src/libANGLE/renderer/vulkan/vk_format_utils.cpp:
(rx::MapSwizzleState):
* src/libANGLE/renderer/vulkan/vk_helpers.cpp:
(rx::vk::DynamicBuffer::allocate):
(rx::vk::DynamicBuffer::releaseBufferListToRenderer):
(rx::vk::DynamicBuffer::release):
(rx::vk::DynamicBuffer::releaseInFlightBuffers):
(rx::vk::DescriptorPoolHelper::release):
(rx::vk::LineLoopHelper::LineLoopHelper):
(rx::vk::LineLoopHelper::streamIndicesIndirect):
(rx::vk::LineLoopHelper::release):
(rx::vk::LineLoopHelper::destroy):
(rx::vk::BufferHelper::init):
(rx::vk::BufferHelper::release):
(rx::vk::ImageHelper::ImageHelper):
(rx::vk::ImageHelper::init):
(rx::vk::ImageHelper::initExternal):
(rx::vk::ImageHelper::releaseImage):
(rx::vk::ImageHelper::releaseStagingBuffer):
(rx::vk::ImageHelper::destroy):
(rx::vk::ImageHelper::getBaseLevel):
(rx::vk::ImageHelper::setBaseAndMaxLevels):
(rx::vk::ImageHelper::generateMipmapsWithBlit):
(rx::vk::ImageHelper::removeStagedUpdates):
(rx::vk::ImageHelper::stageSubresourceUpdate):
(rx::vk::ImageHelper::stageSubresourceUpdateAndGetData):
(rx::vk::ImageHelper::stageSubresourceUpdateFromBuffer):
(rx::vk::ImageHelper::stageSubresourceUpdateFromFramebuffer):
(rx::vk::ImageHelper::allocateStagingMemory):
(rx::vk::ImageHelper::flushStagedUpdates):
(rx::vk::ImageHelper::isUpdateStaged):
(rx::vk::ImageHelper::SubresourceUpdate::SubresourceUpdate):
(rx::vk::ImageHelper::SubresourceUpdate::release):
(rx::vk::FramebufferHelper::release):
(rx::vk::ShaderProgramHelper::release):
(rx::vk::DynamicBuffer::releaseBufferListToContext): Deleted.
(rx::vk::DynamicBuffer::releaseBufferListToDisplay): Deleted.
(rx::vk::ImageHelper::dumpResources): Deleted.
* src/libANGLE/renderer/vulkan/vk_helpers.h:
(rx::vk::ShaderProgramHelper::getShader):
(rx::vk::ShaderProgramHelper::getGraphicsPipeline):
* src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp:
(rx::vk::ShaderLibrary::destroy):
(rx::vk::ShaderLibrary::getConvertIndexIndirectLineLoop_comp):
* src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.gni:
* src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h:
* src/libANGLE/renderer/vulkan/vk_utils.cpp:
(rx::HasKhronosValidationLayer):
(rx::HasStandardValidationLayer):
(rx::GetAvailableValidationLayers):
(rx::vk::StagingBuffer::init):
(rx::vk::StagingBuffer::release):
(rx::vk::GarbageObject::GarbageObject):
(rx::vk::GarbageObject::operator=):
(rx::vk::GarbageObject::destroy):
(rx::gl_vk::GetSamplerMipmapMode):
(rx::vk::StagingBuffer::dumpResources): Deleted.
(rx::vk::GarbageObjectBase::GarbageObjectBase): Deleted.
(rx::vk::GarbageObjectBase::destroy): Deleted.
(rx::vk::GarbageObject::destroyIfComplete): Deleted.
* src/libANGLE/renderer/vulkan/vk_utils.h:
(rx::vk::GarbageObject::valid const):
(rx::vk::GarbageObject::Get):
(rx::vk::GetGarbage):
(rx::vk::GarbageObjectBase::GarbageObjectBase): Deleted.
* src/libANGLE/renderer/vulkan/vk_wrapper.h:
(rx::vk::WrappedObject::getHandle const):
(rx::vk::WrappedObject::valid const):
(rx::vk::WrappedObject::ptr const):
(rx::vk::WrappedObject::release):
(rx::vk::WrappedObject::WrappedObject):
(rx::vk::WrappedObject::~WrappedObject):
(rx::vk::WrappedObject::operator=):
(rx::vk::priv::CommandBuffer::SupportsQueries):
(rx::vk::priv::CommandBuffer::getMemoryUsageStats const):
(rx::vk::priv::CommandBuffer::drawIndexedIndirect):
(rx::vk::priv::CommandBuffer::drawIndirect):
(rx::vk::WrappedObject::dumpResources): Deleted.
(rx::vk::priv::CommandBuffer::getMemoryUsageStats): Deleted.
* src/libANGLE/validationEGL.cpp:
(egl::ValidateCreateContext):
(egl::ValidateMakeCurrent):
(egl::ValidateCompatibleSurface):
(egl::ValidateStreamConsumerGLTextureExternalKHR):
(egl::ValidateStreamConsumerGLTextureExternalAttribsNV):
(egl::ValidateQueryStringiANGLE):
(egl::ValidateCompatibleConfigs): Deleted.
* src/libANGLE/validationEGL.h:
* src/libANGLE/validationES.cpp:
(gl::ValidateRenderbufferStorageParametersBase):
(gl::ValidateTexStorageMultisample):
* src/libANGLE/validationES.h:
(gl::ValidateVertexFormat):
* src/libANGLE/validationES2.cpp:
(gl::ValidateES2TexStorageParameters):
* src/libANGLE/validationES3.cpp:
(gl::ValidateES3TexStorageParametersBase):
* src/libANGLE/validationES31.cpp:
(gl::err::ValidateProgramResourceIndex):
* src/libGLESv2.gni:
* src/libGLESv2/entry_points_egl_ext.cpp:
* src/tests/BUILD.gn:
* src/tests/angle_deqp_tests_main.cpp:
(main):
* src/tests/angle_end2end_tests.gni:
* src/tests/compiler_tests/DebugShaderPrecision_test.cpp:
(TEST_F):
* src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp:
(sh::TEST):
* src/tests/compiler_tests/ImmutableString_test_autogen.cpp:
(sh::TEST):
* src/tests/compiler_tests/QualificationOrder_test.cpp:
(TEST_F):
* src/tests/deqp_support/angle_deqp_gtest.cpp:
(angle::InitTestHarness):
* src/tests/deqp_support/angle_deqp_libtester_main.cpp:
* src/tests/deqp_support/deqp_egl_TestExpectations: Removed.
* src/tests/deqp_support/deqp_gles2_TestExpectations: Removed.
* src/tests/deqp_support/deqp_gles31_TestExpectations: Removed.
* src/tests/deqp_support/deqp_gles3_TestExpectations: Removed.
* src/tests/deqp_support/deqp_khr_gles2_TestExpectations: Removed.
* src/tests/deqp_support/deqp_khr_gles31_TestExpectations: Removed.
* src/tests/deqp_support/deqp_khr_gles3_TestExpectations: Removed.
* src/tests/deqp_support/tcuANGLENativeDisplayFactory.cpp:
* src/tests/deqp_support/tcuANGLEPlatform.cpp:
(tcu::ANGLEPlatform::ANGLEPlatform):
* src/tests/deqp_support/tes31Context_override.cpp:
(deqp::gles31::Context::Context):
(deqp::gles31::Context::~Context):
(deqp::gles31::Context::createRenderContext):
(deqp::gles31::Context::destroyRenderContext):
(deqp::gles31::Context::getRenderTarget const):
* src/tests/egl_tests/EGLDeviceCGLTest.cpp: Added.
(EGLDeviceCGLQueryTest::EGLDeviceCGLQueryTest):
(TEST_P):
* src/tests/egl_tests/EGLDirectCompositionTest.cpp:
* src/tests/egl_tests/EGLFeatureControlTest.cpp:
(TEST_P):
* src/tests/egl_tests/EGLNoConfigContextTest.cpp: Added.
(EGLNoConfigContextTest::EGLNoConfigContextTest):
(TEST_P):
* src/tests/gl_tests/BlendFuncExtendedTest.cpp:
(angle::EXTBlendFuncExtendedDrawTestES3::LinkProgram):
* src/tests/gl_tests/ComputeShaderTest.cpp:
* src/tests/gl_tests/CopyTexImageTest.cpp:
(angle::TEST_P):
* src/tests/gl_tests/CopyTextureTest.cpp:
(angle::CopyTextureVariationsTest::initializeSourceTexture):
(angle::CopyTextureVariationsTest::testCopyTexture):
(angle::CopyTextureVariationsTest::testCopySubTexture):
(angle::TEST_P):
* src/tests/gl_tests/DrawBaseVertexBaseInstanceTest.cpp:
(angle::DrawBaseVertexBaseInstanceTest::DrawBaseVertexBaseInstanceTest):
(angle::DrawBaseVertexBaseInstanceTest::vertexShaderSource300):
* src/tests/gl_tests/FramebufferTest.cpp:
(TEST_P):
* src/tests/gl_tests/GLSLTest.cpp:
* src/tests/gl_tests/IndexBufferOffsetTest.cpp:
* src/tests/gl_tests/InstancingTest.cpp:
* src/tests/gl_tests/LineLoopTest.cpp:
(LineLoopTest::checkPixels):
(LineLoopTest::runTest):
(LineLoopIndirectTest::runTest):
(TEST_P):
* src/tests/gl_tests/LinkAndRelinkTest.cpp:
(angle::TEST_P):
* src/tests/gl_tests/MipmapTest.cpp:
* src/tests/gl_tests/OcclusionQueriesTest.cpp:
* src/tests/gl_tests/ParallelShaderCompileTest.cpp:
(angle::ParallelShaderCompileTest::TaskRunner::run):
* src/tests/gl_tests/ProgramInterfaceTest.cpp:
* src/tests/gl_tests/SimpleOperationTest.cpp:
* src/tests/gl_tests/StateChangeTest.cpp:
* src/tests/gl_tests/TextureTest.cpp:
(angle::SliceFormatColor):
(angle::SliceFormatColor32F):
* src/tests/gl_tests/TimerQueriesTest.cpp:
* src/tests/gl_tests/UniformBufferTest.cpp:
* src/tests/gl_tests/VertexAttributeTest.cpp:
(angle::TypeStride):
(angle::Normalize10):
(angle::Normalize2):
(angle::Pack1010102):
(angle::VertexAttributeTest::checkPixels):
(angle::VertexAttributeTest::checkRGBPixels):
(angle::VertexAttributeTest::runTest):
(angle::TEST_P):
* src/tests/gles1_conformance_tests/ConformanceTests.cpp:
(angle::TEST_P):
* src/tests/perf_tests/ANGLEPerfTest.cpp:
* src/tests/perf_tests/DrawCallPerf.cpp:
(angle::DrawArraysPerfParams::DrawArraysPerfParams): Deleted.
(angle::DrawArraysPerfParams::story const): Deleted.
(angle::operator<<): Deleted.
(angle::CreateSimpleTexture2D): Deleted.
(angle::DrawCallPerfBenchmark::DrawCallPerfBenchmark): Deleted.
(angle::DrawCallPerfBenchmark::initializeBenchmark): Deleted.
(): Deleted.
* src/tests/perf_tests/EGLMakeCurrentPerf.cpp:
* src/tests/perf_tests/LinkProgramPerfTest.cpp:
(angle::TEST_P):
* src/tests/perf_tests/MultiviewPerf.cpp:
(angle::MultiviewCPUBoundBenchmark::initializeBenchmark):
(angle::MultiviewGPUBoundBenchmark::initializeBenchmark):
(angle::TEST_P):
* src/tests/perf_tests/UniformsPerf.cpp:
(TEST_P):
* src/tests/perf_tests/VulkanPipelineCachePerf.cpp:
(rx::VulkanPipelineCachePerfTest::step):
* src/tests/perf_tests/glmark2Benchmark.cpp:
* src/tests/test_expectations/GPUTestConfig.cpp:
(angle::GPUTestConfig::GPUTestConfig):
* src/tests/test_expectations/GPUTestConfig.h:
* src/tests/test_expectations/GPUTestExpectationsParser.cpp:
(angle::GPUTestExpectationsParser::parseLine):
* src/tests/test_utils/ANGLETest.cpp:
* src/tests/test_utils/ANGLETest.h:
* src/tests/test_utils/angle_test_configs.cpp:
(angle::PlatformParameters::initDefaultParameters):
(angle::operator<<):
(angle::egl_platform::VULKAN_SWIFTSHADER):
(angle::ES2_VULKAN_SWIFTSHADER):
* src/tests/test_utils/angle_test_configs.h:
* src/tests/test_utils/angle_test_instantiate.cpp:
(angle::IsWindows7):
* src/tests/test_utils/angle_test_instantiate.h:
* src/third_party/compiler/README.chromium:
* third_party/vulkan-headers/BUILD.gn: Removed.
* third_party/vulkan-headers/vulkan_headers_script_deps.gni: Removed.
* third_party/vulkan-loader/BUILD.gn:
* third_party/vulkan-tools/BUILD.gn: Removed.
* third_party/vulkan-validation-layers/BUILD.gn: Removed.
* third_party/vulkan-validation-layers/dummy_spirv_tools_commit_id.h: Removed.
* util/EGLWindow.cpp:
* util/fuchsia/ScenicWindow.cpp:
(ScenicWindow::resetNativeWindow):
* util/posix/crash_handler_posix.cpp: Renamed from Source/ThirdParty/ANGLE/util/posix/Posix_crash_handler.cpp.
* util/posix/test_utils_posix.cpp: Renamed from Source/ThirdParty/ANGLE/util/posix/Posix_system_utils.cpp.
* util/test_utils.h: Renamed from Source/ThirdParty/ANGLE/util/system_utils.h.
* util/util.gni:
* util/util_gl.h:
* util/windows/WGLWindow.cpp:
* util/windows/test_utils_win.cpp: Renamed from Source/ThirdParty/ANGLE/util/windows/Windows_system_utils.cpp.
(angle::PrintStackBacktrace):
* util/windows/win32/test_utils_win32.cpp: Renamed from Source/ThirdParty/ANGLE/util/windows/win32/Win32_system_utils.cpp.
* util/x11/X11Window.cpp:

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

7 months ago[build.webkit.org] API tests should output result summary in json format
aakash_jain@apple.com [Fri, 11 Oct 2019 19:17:18 +0000 (19:17 +0000)]
[build.webkit.org] API tests should output result summary in json format
https://bugs.webkit.org/show_bug.cgi?id=202854

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunAPITests): Output results in json format as well.

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

7 months agoGet StorageAccess API features working on SQLite database implementation (195422)
ddkilzer@apple.com [Fri, 11 Oct 2019 19:14:08 +0000 (19:14 +0000)]
Get StorageAccess API features working on SQLite database implementation (195422)
https://bugs.webkit.org/show_bug.cgi?id=195422
<rdar://problem/54213519>

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-10-11
Reviewed by Brent Fulgham.

Source/WebKit:

This patch migrates the http/tests/storageAccess/ Layout tests to
use the ITP database and uncovered 3 bugs in the process.

1. It was previously blocking cookies to a third party domain which
was not marked as prevalent. Now it ensures that the user is prompted
using the storage acess API regarding that third party domain.

2. It was not requesting storage access if cookies had previously been
blocked. Now it will only return early from
ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener
if cookie access is allowed, and request storage access otherwise.

3. hasUserGrantedStorageAccessThroughPrompt was returning true even
if the result was not previously granted storage access.

All of these fixes match behavior in
ResourceLoadStatisticsMemoryStore.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):

LayoutTests:

This patch migrates tests in http/tests/storageAccess to use the ITP
SQLite Database to ensure the storageAccess API features are working.
Additionally, the Safari UI flow was manually tested for the database
using tlstestwebkit.org (no automated tests exist for this).

It also updates the test expectations for two tests that consistently
timeout on the flakiness dashboard and will be looked into in a
separate radar.

Most storageAccess tests are skipped on ios because of incompatibility
with recognizing user interaction.

* http/tests/storageAccess/deny-storage-access-under-opener-database-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-database.html: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-database-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-database.html: Added.
* http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture-database-expected.txt: Added.
* http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture-database.html: Added.
* http/tests/storageAccess/deny-without-prompt-preserves-gesture-database-expected.txt: Added.
* http/tests/storageAccess/deny-without-prompt-preserves-gesture-database.html: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-database-expected.txt: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-database.html: Added.
* http/tests/storageAccess/grant-with-prompt-preserves-gesture-database-expected.txt: Added.
* http/tests/storageAccess/grant-with-prompt-preserves-gesture-database.html: Added.
* http/tests/storageAccess/has-storage-access-crash-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-crash-database.html: Added.
* http/tests/storageAccess/has-storage-access-false-by-default-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-false-by-default-database.html: Added.
* http/tests/storageAccess/has-storage-access-false-by-default-ephemeral-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-false-by-default-ephemeral-database.html: Added.
* http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-user-interaction-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-user-interaction-database.html: Added.
* http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html: Added.
* http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database-expected.txt: Added.
* http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database.html: Added.
* http/tests/storageAccess/remove-requesting-iframe-database-expected.txt: Added.
* http/tests/storageAccess/remove-requesting-iframe-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html: Added.
* http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html: Added.
* http/tests/storageAccess/request-storage-access-crash-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-crash-database.html: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin-database.html: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token-database.html: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-user-gesture-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-user-gesture-database.html: Added.
* http/tests/storageAccess/request-storage-access-same-origin-iframe-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-same-origin-iframe-database.html: Added.
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-database.html: Added.
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token-database.html: Added.
* http/tests/storageAccess/request-storage-access-top-frame-database-expected.txt: Added.
* http/tests/storageAccess/request-storage-access-top-frame-database.html: Added.
* platform/ios/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

7 months agoPosition::upstream/downstream should not need to call ensureLineBoxes
antti@apple.com [Fri, 11 Oct 2019 19:03:37 +0000 (19:03 +0000)]
Position::upstream/downstream should not need to call ensureLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=202203

Reviewed by Zalan Bujtas.

Source/WebCore:

This avoids forced switch to complex text layout path by Position constructor and will allow future cleanups.

Currently simple line path strips end of line whitespace when white-space:pre-wrap is set.
These are don't affect rendering but they are needed for editing positions.
This patch makes simple line path match the complex path by generating runs for these whitespaces.

* dom/Position.cpp:
(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::ensureLineBoxesIfNeeded): Deleted.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):

Create a new run if isLineBreak bit is set.

(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::trailingWhitespaceWidth const):
(WebCore::SimpleLineLayout::computeLineLeft):

Also compute width of the hanging whitespace when aligning the line. This matches the code
in updateLogicalWidthForLeft/Right/CenterAlignedBlock in the complex path.

(WebCore::SimpleLineLayout::preWrap):

breakSpaces implies preWrap is off.

(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):

Crete runs also for soft linebreaks in pre-wrap.
Add whitespace runs to the end of the line in pre-wrap.

(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):

Hang the whitespace run when wrapping.

(WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.

Remainging logic moved to the callsite.

LayoutTests:

Some additional end of line whitespaces.

* TestExpectations:

Skip imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-013.html.

This test starts failing because soft linebreak clears the trailing whitespace run.
The failing behavior aligns simple path with the complex path. The existing textarea-pre-wrap-013.html
test (which takes the complex path) is already skipped because of this.

* platform/mac/fast/forms/targeted-frame-submission-expected.txt:
* platform/mac/fast/forms/textarea-scroll-height-expected.txt:
* platform/mac/fast/loader/text-document-wrapping-expected.txt:
* platform/mac/fast/parser/open-comment-in-textarea-expected.txt:
* platform/mac/http/tests/misc/acid3-expected.txt:
* platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt:

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

7 months agoLayout test fast/events/touch/ios/passive-by-default-on-document-and-window.html...
dino@apple.com [Fri, 11 Oct 2019 18:47:34 +0000 (18:47 +0000)]
Layout test fast/events/touch/ios/passive-by-default-on-document-and-window.html is a flaky failure on Internal iOS Testers
https://bugs.webkit.org/show_bug.cgi?id=202858
<rdar://51829520>

Reviewed by Tim Horton.

We can't guarantee how many touchmove events we'll get for a drag, so
this was flaky. Easiest thing to do is remove the listeners, since they
aren't an important part of the test. (We could have removed them on
firing too, which we do for the similar test that exercises the case
where we don't use the default options)

* fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:
* fast/events/touch/ios/passive-by-default-on-document-and-window.html:

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

7 months agoWasm B3IRGenerator should use arguments for control data.
keith_miller@apple.com [Fri, 11 Oct 2019 18:47:19 +0000 (18:47 +0000)]
Wasm B3IRGenerator should use arguments for control data.
https://bugs.webkit.org/show_bug.cgi?id=202855

Reviewed by Yusuke Suzuki.

JSTests:

* wasm/stress/loop-more-args-than-results.js: Added.

Source/JavaScriptCore:

This was failing a test on our bots. I'm not sure how I missed
it... I also added another test for good measure.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::ControlData::ControlData):

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

7 months agoREGRESSION: fast/events/touch/ios/long-press-on-image.html is failing
dino@apple.com [Fri, 11 Oct 2019 17:22:28 +0000 (17:22 +0000)]
REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing
https://bugs.webkit.org/show_bug.cgi?id=202845
Source/WebKit:

Reviewed by Antoine Quint.

Update _contentsOfUserInterfaceItem so that it returns more information
on a context menu.

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

LayoutTests:

<rdar://51717197>

Reviewed by Antoine Quint.

This test failed because images no longer pop up action sheets, but
instead use context menus.

We no longer need to test the actions in the context menu here, since
it is covered by the TestWebKitAPI/Tests/WebKitCocoa/ContextMenus test.

However, we can still use this test to ensure we are getting a
context menu on the correct element.

* fast/events/touch/ios/long-press-on-image-expected.txt:
* fast/events/touch/ios/long-press-on-image.html:
* platform/iphone-7/fast/events/touch/force-press-on-link.html: This
test currently fails and needs to be rewritten (rdar://problem/52699530),
but at least update it to use the new data from the Internal API.

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

7 months agoUse sendWithAsyncReply for cookie getting/clearing functions
commit-queue@webkit.org [Fri, 11 Oct 2019 16:41:45 +0000 (16:41 +0000)]
Use sendWithAsyncReply for cookie getting/clearing functions
https://bugs.webkit.org/show_bug.cgi?id=202841

Patch by Alex Christensen <achristensen@webkit.org> on 2019-10-11
Reviewed by Carlos Garcia Campos.

No change in behavior.  This just simplifies the message sending a bit.

* NetworkProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteAllCookies):
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
* NetworkProcess/Cookies/WebCookieManager.h:
* NetworkProcess/Cookies/WebCookieManager.messages.in:
* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
* UIProcess/API/APIHTTPCookieStore.cpp:
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookies):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicy):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setCookieAcceptPolicy:]):
* UIProcess/API/glib/WebKitCookieManager.cpp:
(webkit_cookie_manager_set_accept_policy):
(webkit_cookie_manager_get_accept_policy):
(webkit_cookie_manager_add_cookie):
(webkit_cookie_manager_get_cookies):
(webkit_cookie_manager_delete_cookie):
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::addSingleCookie):
* UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::processPoolDestroyed):
(WebKit::WebCookieManagerProxy::processDidClose):
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::deleteCookie):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::getAllCookies):
(WebKit::WebCookieManagerProxy::getCookies):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Deleted.
(WebKit::WebCookieManagerProxy::didSetCookies): Deleted.
(WebKit::WebCookieManagerProxy::didGetCookies): Deleted.
(WebKit::WebCookieManagerProxy::didDeleteCookies): Deleted.
(WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy): Deleted.
(WebKit::WebCookieManagerProxy::didSetHTTPCookieAcceptPolicy): Deleted.
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebCookieManagerProxy.messages.in:

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

7 months agoRemove some support for < iOS 13
krollin@apple.com [Fri, 11 Oct 2019 16:29:23 +0000 (16:29 +0000)]
Remove some support for < iOS 13
https://bugs.webkit.org/show_bug.cgi?id=202819
<rdar://problem/56164233>

Reviewed by Anders Carlsson.

Remove some support for iOS versions less than 13.0.

Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
values >= 130000. This means that expressions like
"__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
"__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

This removal is part of a series of patches effecting the removal of
dead code for old versions of iOS. This particular pass involves
changes in which Jiewen Tan was involved. These changes are isolated
from other similar changes in order to facilitate the reviewing
process.

* wtf/Platform.h:

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

7 months agoLayout Test media/W3C/audio/events/event_progress.html is flaky
commit-queue@webkit.org [Fri, 11 Oct 2019 15:20:53 +0000 (15:20 +0000)]
Layout Test media/W3C/audio/events/event_progress.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181966

Patch by Peng Liu <peng.liu6@apple.com> on 2019-10-11
Reviewed by Eric Carlson.

It is possible that video/audio elements fire "progress" event again
when the event handler is still processing the previous "progress" event.
We need to ignore all the events except the first one to make sure
the test cases generate consistent output.

In addition, this patch fixes some errors in JS file names and function parameters.

* http/tests/resources/js-test-pre.js:
(isSuccessfullyParsed):
* media/W3C/audio/events/event_order_loadstart_progress.html:
* media/W3C/audio/events/event_progress.html:
* media/W3C/audio/events/event_progress_manual.html:
* media/W3C/video/events/event_order_loadstart_progress.html:
* media/W3C/video/events/event_progress.html:
* media/W3C/video/events/event_progress_manual.html:
* media/W3C/w3cwrapper.js:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* resources/js-test-pre.js:
(isSuccessfullyParsed):

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

7 months agoUnreviewed, rolling out r250945.
jbedard@apple.com [Fri, 11 Oct 2019 14:30:20 +0000 (14:30 +0000)]
Unreviewed, rolling out r250945.

Broke 18 Debug API tests

Reverted changeset:

"Add support for CompactPointerTuple<..., OptionSet<...>>"
https://bugs.webkit.org/show_bug.cgi?id=201316
https://trac.webkit.org/changeset/250945

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

7 months agoOfflineAudioContext does not validate allocation of destination buffer
commit-queue@webkit.org [Fri, 11 Oct 2019 14:18:01 +0000 (14:18 +0000)]
OfflineAudioContext does not validate allocation of destination buffer
https://bugs.webkit.org/show_bug.cgi?id=177259

Patch by Bjorn Melinder <bjornm@spotify.com> on 2019-10-11
Reviewed by Eric Carlson.

Moved the allocation of the destination buffer to the static
OfflineAudioContext::create method where we are able to handle a failed
allocation properly and return an Exception. This change handles both
negative lengths as well as too large lengths where the memory cannot
be allocated.

Source/WebCore:

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::OfflineAudioContext):
(WebCore::OfflineAudioContext::create):
* Modules/webaudio/OfflineAudioContext.h:

LayoutTests:

* webaudio/offlineaudiocontext-constructor-expected.txt:
* webaudio/offlineaudiocontext-constructor.html:

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

7 months agoFlaky test: imported/w3c/web-platform-tests/offscreen-canvas/compositing/2d.composite...
commit-queue@webkit.org [Fri, 11 Oct 2019 11:37:39 +0000 (11:37 +0000)]
Flaky test: imported/w3c/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.html
https://bugs.webkit.org/show_bug.cgi?id=202801

Patch by Chris Lord <clord@igalia.com> on 2019-10-11
Reviewed by Alexey Proskuryakov.

More OffscreenCanvas tests failing due to unhandled Promise rejection.
See also bug #202782.

* TestExpectations:

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

7 months ago[cmake] Use HINTS instead of PATHS when searching in paths from pkg-config
annulen@yandex.ru [Fri, 11 Oct 2019 09:04:12 +0000 (09:04 +0000)]
[cmake] Use HINTS instead of PATHS when searching in paths from pkg-config
https://bugs.webkit.org/show_bug.cgi?id=202831

Reviewed by Carlos Garcia Campos.

HINTS and PATHS sections are similar, however HINTS is processed before
default system locations, while PATHS - after. If target file can be found
in the system, pkg-config results are ignored in case of PATHS, making it
impossible to override system version of library with PKG_CONFIG_PATH.

Note that CMake documentation recommends using PATHS for hard-coded guesses.

* Source/cmake/FindEnchant.cmake:
* Source/cmake/FindFontconfig.cmake:
* Source/cmake/FindLibEpoxy.cmake:
* Source/cmake/FindLibtasn1.cmake:
* Source/cmake/FindSqlite.cmake:

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

7 months agoUnreviewed GTK and WPE gardening after r251001. Removing crash expectations after
magomez@igalia.com [Fri, 11 Oct 2019 08:53:41 +0000 (08:53 +0000)]
Unreviewed GTK and WPE gardening after r251001. Removing crash expectations after
bug 202784 was fixed.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

7 months agoMediaTime pretty printer can print if time is invalid
calvaris@igalia.com [Fri, 11 Oct 2019 08:21:02 +0000 (08:21 +0000)]
MediaTime pretty printer can print if time is invalid
https://bugs.webkit.org/show_bug.cgi?id=202735

Reviewed by Eric Carlson.

* wtf/MediaTime.cpp:
(WTF::MediaTime::toString const): Append ", invalid" if isInvalid().
(WTF::MediaTime::toJSONObject const): Set boolean invalid to true
when invalid.

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

7 months agoRemove unused WebProcessPool::requestNetworkingStatistics
commit-queue@webkit.org [Fri, 11 Oct 2019 06:59:35 +0000 (06:59 +0000)]
Remove unused WebProcessPool::requestNetworkingStatistics
https://bugs.webkit.org/show_bug.cgi?id=202818

Patch by Alex Christensen <achristensen@webkit.org> on 2019-10-10
Reviewed by Chris Dumez.

Its only use was removed in rdar://problem/56160996

* NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading const):
(WebKit::DownloadManager::activeDownloadCount const): Deleted.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount const): Deleted.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveMessage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics): Deleted.
* UIProcess/WebProcessPool.h:

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

7 months ago[WinCairo] auto-installing raises exception "Inner message: global name 'urllib2...
Hironori.Fujii@sony.com [Fri, 11 Oct 2019 05:18:34 +0000 (05:18 +0000)]
[WinCairo] auto-installing raises exception "Inner message: global name 'urllib2' is not defined" since r250869
https://bugs.webkit.org/show_bug.cgi?id=202839

Reviewed by Jonathan Bedard.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._download_to_stream): Replaced urllib2.urlopen with urlopen.

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

7 months agoGuard GCrypt-specific code with USE(GCRYPT) instead of PLATFORM macros
annulen@yandex.ru [Fri, 11 Oct 2019 02:47:23 +0000 (02:47 +0000)]
Guard GCrypt-specific code with USE(GCRYPT) instead of PLATFORM macros
https://bugs.webkit.org/show_bug.cgi?id=202829

Reviewed by Jiewen Tan.

* crypto/keys/CryptoKeyEC.h:
* crypto/keys/CryptoKeyRSA.h:

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

7 months agoGenerateAndAllocateRegisters can trivially elide self moves at end of liveness
keith_miller@apple.com [Fri, 11 Oct 2019 02:23:37 +0000 (02:23 +0000)]
GenerateAndAllocateRegisters can trivially elide self moves at end of liveness
https://bugs.webkit.org/show_bug.cgi?id=202833

Reviewed by Saam Barati.

This also fixes a bug where if a tmp is moved to itself at the end of its lifetime
we would mess up the accounting for the tmp.

In order to catch these bugs earlier during generation I added a
checkConsistency function that if a tmp is in a reg that reg is
not available and that reg thinks the tmp is also allocated in it.

* b3/B3Bank.h:
(JSC::B3::bankForReg):
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
(JSC::B3::Air::GenerateAndAllocateRegisters::checkConsistency):
(JSC::B3::Air::GenerateAndAllocateRegisters::generate):
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.h:

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

7 months agoNew html5lib requires newer version of six.py than that shipped in macOS 10.14.6
commit-queue@webkit.org [Fri, 11 Oct 2019 01:50:31 +0000 (01:50 +0000)]
New html5lib requires newer version of six.py than that shipped in macOS 10.14.6
https://bugs.webkit.org/show_bug.cgi?id=202830

Autoinstall six along with html5lib.

Patch by Kenneth Russell <kbr@chromium.org> on 2019-10-10
Reviewed by Jonathan Bedard.

* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_mechanize):
(AutoinstallImportHook._install_pytest):

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

7 months agoresults.webkit.org: Sort out certificates on Catalina
jbedard@apple.com [Fri, 11 Oct 2019 01:30:25 +0000 (01:30 +0000)]
results.webkit.org: Sort out certificates on Catalina
https://bugs.webkit.org/show_bug.cgi?id=202837

Unreviewed infrastructure repair.

This is a temporary strategy until we sort out our certificates on the newly
deployed Catalina bots.

* Scripts/webkitpy/results/upload.py:
(Upload.upload):
(Upload.upload_archive):
* Scripts/webkitpy/results/upload_unittest.py:
(UploadTest.test_upload):
(UploadTest.test_archive_upload):

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

7 months agoWeb Inspector: use more C++ keywords for defining agents
yurys@chromium.org [Fri, 11 Oct 2019 00:25:40 +0000 (00:25 +0000)]
Web Inspector: use more C++ keywords for defining agents
https://bugs.webkit.org/show_bug.cgi?id=200959
<rdar://problem/54735374>

Reviewed by Joseph Pecoraro.

Add override annotation to overrided virtual methods in inspector code. This
change is automatically generated by the following command:
clang-tidy -checks='-*,modernize-use-override' -header-filter='.*inspector.*' -fix -p WebKitBuild/Release/
    WebKitBuild/Release/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-84c9f43f-*.cpp
    WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource-84c9f43f-*.cpp

Source/JavaScriptCore:

* inspector/InjectedScript.h:
* inspector/InjectedScriptModule.h:
* inspector/JSGlobalObjectConsoleClient.h:
* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectScriptDebugServer.h:
* inspector/JSInjectedScriptHost.cpp:
* inspector/ScriptDebugServer.h:
* inspector/agents/InspectorAgent.h:
* inspector/agents/InspectorAuditAgent.h:
* inspector/agents/InspectorConsoleAgent.h:
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorHeapAgent.h:
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/agents/InspectorScriptProfilerAgent.h:
* inspector/agents/InspectorTargetAgent.h:
* inspector/agents/JSGlobalObjectAuditAgent.h:
* inspector/agents/JSGlobalObjectDebuggerAgent.h:
* inspector/agents/JSGlobalObjectRuntimeAgent.h:
* inspector/remote/RemoteAutomationTarget.h:
* inspector/remote/RemoteConnectionToTarget.h:

Source/WebCore:

No new tests. No behavior changes.

* inspector/InspectorController.h:
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/PageScriptDebugServer.h:
* inspector/WebInjectedScriptManager.h:
* inspector/WorkerInspectorController.h:
* inspector/WorkerScriptDebugServer.h:
* inspector/WorkerToPageFrontendChannel.h:
* inspector/agents/InspectorApplicationCacheAgent.h:
* inspector/agents/InspectorCPUProfilerAgent.h:
* inspector/agents/InspectorCSSAgent.h:
* inspector/agents/InspectorCanvasAgent.h:
* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMDebuggerAgent.h:
* inspector/agents/InspectorDOMStorageAgent.h:
* inspector/agents/InspectorDatabaseAgent.h:
* inspector/agents/InspectorIndexedDBAgent.cpp:
* inspector/agents/InspectorIndexedDBAgent.h:
* inspector/agents/InspectorLayerTreeAgent.h:
* inspector/agents/InspectorMemoryAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorTimelineAgent.h:
* inspector/agents/InspectorWorkerAgent.h:
* inspector/agents/WebConsoleAgent.h:
* inspector/agents/WebDebuggerAgent.h:
* inspector/agents/WebHeapAgent.h:
* inspector/agents/page/PageAuditAgent.h:
* inspector/agents/page/PageConsoleAgent.h:
* inspector/agents/page/PageDOMDebuggerAgent.h:
* inspector/agents/page/PageDebuggerAgent.h:
* inspector/agents/page/PageHeapAgent.h:
* inspector/agents/page/PageNetworkAgent.h:
* inspector/agents/page/PageRuntimeAgent.h:
* inspector/agents/worker/ServiceWorkerAgent.h:
* inspector/agents/worker/WorkerAuditAgent.h:
* inspector/agents/worker/WorkerConsoleAgent.h:
* inspector/agents/worker/WorkerDOMDebuggerAgent.h:
* inspector/agents/worker/WorkerDebuggerAgent.h:
* inspector/agents/worker/WorkerNetworkAgent.h:
* inspector/agents/worker/WorkerRuntimeAgent.h:

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

7 months agoModify JSTests/stress/string-overflow-createError-*.js tests to allow an OOME result.
mark.lam@apple.com [Thu, 10 Oct 2019 23:44:01 +0000 (23:44 +0000)]
Modify JSTests/stress/string-overflow-createError-*.js tests to allow an OOME result.
https://bugs.webkit.org/show_bug.cgi?id=202828

Reviewed by Yusuke Suzuki.

The tests intentionally allocate a very large string.  Hence, for some memory
limited configurations, it is perfectly reasonable for the test to throw an Out
Of Memory error.

* stress/string-overflow-createError-builder.js:
* stress/string-overflow-createError-fit.js:

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

7 months agoUse HAVE(IOSURFACE_RGB10) instead of PLATFORM(IOS_FAMILY) where appropriate
timothy_horton@apple.com [Thu, 10 Oct 2019 22:28:39 +0000 (22:28 +0000)]
Use HAVE(IOSURFACE_RGB10) instead of PLATFORM(IOS_FAMILY) where appropriate
https://bugs.webkit.org/show_bug.cgi?id=202823

Reviewed by Wenson Hsieh.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::layerContentsFormat):
* platform/ios/LegacyTileGridTile.mm:
(WebCore::LegacyTileGridTile::LegacyTileGridTile):

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

7 months agoImport css/css-images WPT tests
clopez@igalia.com [Thu, 10 Oct 2019 22:02:03 +0000 (22:02 +0000)]
Import css/css-images WPT tests
https://bugs.webkit.org/show_bug.cgi?id=200210

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Imported css/css-images tests from WPT ToT (a879756282) and generated expectations for the non ref-tests.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-images/META.yml: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations-expected.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations002-expected.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations002.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations003-expected.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations003.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations004-expected.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations004.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations005-expected.html: Added.
* web-platform-tests/css/css-images/css-image-fallbacks-and-annotations005.html: Added.
* web-platform-tests/css/css-images/gradient-border-box-expected.html: Added.
* web-platform-tests/css/css-images/gradient-border-box.html: Added.
* web-platform-tests/css/css-images/gradient-button-expected.html: Added.
* web-platform-tests/css/css-images/gradient-button.html: Added.
* web-platform-tests/css/css-images/gradient-content-box-expected.html: Added.
* web-platform-tests/css/css-images/gradient-content-box.html: Added.
* web-platform-tests/css/css-images/gradient-crash-expected.html: Added.
* web-platform-tests/css/css-images/gradient-crash.html: Added.
* web-platform-tests/css/css-images/gradient-move-stops-expected.html: Added.
* web-platform-tests/css/css-images/gradient-move-stops.html: Added.
* web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt: Added.
* web-platform-tests/css/css-images/gradient/color-stops-parsing.html: Added.
* web-platform-tests/css/css-images/gradient/w3c-import.log: Added.
* web-platform-tests/css/css-images/gradients-with-border-expected.html: Added.
* web-platform-tests/css/css-images/gradients-with-border.html: Added.
* web-platform-tests/css/css-images/gradients-with-transparent-expected.html: Added.
* web-platform-tests/css/css-images/gradients-with-transparent.html: Added.
* web-platform-tests/css/css-images/idlharness-expected.txt: Added.
* web-platform-tests/css/css-images/idlharness.html: Added.
* web-platform-tests/css/css-images/image-fit-001.xht: Added.
* web-platform-tests/css/css-images/image-fit-006.xht: Added.
* web-platform-tests/css/css-images/inheritance-expected.txt: Added.
* web-platform-tests/css/css-images/inheritance.html: Added.
* web-platform-tests/css/css-images/linear-gradient-1-expected.html: Added.
* web-platform-tests/css/css-images/linear-gradient-1.html: Added.
* web-platform-tests/css/css-images/linear-gradient-2-expected.html: Added.
* web-platform-tests/css/css-images/linear-gradient-2.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-conic-expected.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-conic.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-linear-2-expected.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-linear-2.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-linear-expected.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-linear.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-radial-2-expected.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-radial-2.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-radial-expected.html: Added.
* web-platform-tests/css/css-images/multiple-position-color-stop-radial.html: Added.
* web-platform-tests/css/css-images/parsing/gradient-position-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/gradient-position-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/gradient-position-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/gradient-position-valid.html: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-computed-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-computed.html: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-orientation-valid.html: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-computed-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-computed.html: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-rendering-valid.html: Added.
* web-platform-tests/css/css-images/parsing/image-resolution-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-resolution-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/image-resolution-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/image-resolution-valid.html: Added.
* web-platform-tests/css/css-images/parsing/object-fit-computed-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-fit-computed.html: Added.
* web-platform-tests/css/css-images/parsing/object-fit-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-fit-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/object-fit-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-fit-valid.html: Added.
* web-platform-tests/css/css-images/parsing/object-position-computed-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-position-computed.html: Added.
* web-platform-tests/css/css-images/parsing/object-position-invalid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-position-invalid.html: Added.
* web-platform-tests/css/css-images/parsing/object-position-valid-expected.txt: Added.
* web-platform-tests/css/css-images/parsing/object-position-valid.html: Added.
* web-platform-tests/css/css-images/parsing/w3c-import.log: Added.
* web-platform-tests/css/css-images/support/1x1-green.gif: Added.
* web-platform-tests/css/css-images/support/1x1-green.png: Added.
* web-platform-tests/css/css-images/support/1x1-green.svg: Added.
* web-platform-tests/css/css-images/support/1x1-lime.png: Added.
* web-platform-tests/css/css-images/support/1x1-maroon.png: Added.
* web-platform-tests/css/css-images/support/1x1-navy.png: Added.
* web-platform-tests/css/css-images/support/1x1-red.png: Added.
* web-platform-tests/css/css-images/support/1x1-white.png: Added.
* web-platform-tests/css/css-images/support/60x60-gg-rr.png: Added.
* web-platform-tests/css/css-images/support/60x60-green.png: Added.
* web-platform-tests/css/css-images/support/60x60-red.png: Added.
* web-platform-tests/css/css-images/support/a-green.css: Added.
(.a):
* web-platform-tests/css/css-images/support/b-green.css: Added.
(.b):
* web-platform-tests/css/css-images/support/c-red.css: Added.
(.c):
* web-platform-tests/css/css-images/support/cat.png: Added.
* web-platform-tests/css/css-images/support/import-green.css: Added.
(.import):
* web-platform-tests/css/css-images/support/import-red.css: Added.
(.import):
* web-platform-tests/css/css-images/support/intrinsic-size.jpg: Added.
* web-platform-tests/css/css-images/support/intrinsic-size.png: Added.
* web-platform-tests/css/css-images/support/pattern-grg-rgr-grg.png: Added.
* web-platform-tests/css/css-images/support/pattern-grg-rrg-rgg.png: Added.
* web-platform-tests/css/css-images/support/pattern-rgr-grg-rgr.png: Added.
* web-platform-tests/css/css-images/support/pattern-tr.png: Added.
* web-platform-tests/css/css-images/support/ruler-h-50%.png: Added.
* web-platform-tests/css/css-images/support/ruler-h-50px.png: Added.
* web-platform-tests/css/css-images/support/ruler-v-100px.png: Added.
* web-platform-tests/css/css-images/support/ruler-v-50px.png: Added.
* web-platform-tests/css/css-images/support/square-purple.png: Added.
* web-platform-tests/css/css-images/support/square-teal.png: Added.
* web-platform-tests/css/css-images/support/square-white.png: Added.
* web-platform-tests/css/css-images/support/support/swatch-green.png: Added.
* web-platform-tests/css/css-images/support/support/swatch-red.png: Added.
* web-platform-tests/css/css-images/support/support/w3c-import.log: Added.
* web-platform-tests/css/css-images/support/swatch-blue.png: Added.
* web-platform-tests/css/css-images/support/swatch-green.png: Added.
* web-platform-tests/css/css-images/support/swatch-lime.png: Added.
* web-platform-tests/css/css-images/support/swatch-orange.png: Added.
* web-platform-tests/css/css-images/support/swatch-red.png: Added.
* web-platform-tests/css/css-images/support/swatch-white.png: Added.
* web-platform-tests/css/css-images/support/swatch-yellow.png: Added.
* web-platform-tests/css/css-images/support/test-bl.png: Added.
* web-platform-tests/css/css-images/support/test-br.png: Added.
* web-platform-tests/css/css-images/support/test-inner-half-size.png: Added.
* web-platform-tests/css/css-images/support/test-outer.png: Added.
* web-platform-tests/css/css-images/support/test-tl.png: Added.
* web-platform-tests/css/css-images/support/test-tr.png: Added.
* web-platform-tests/css/css-images/support/w3c-import.log: Added.
* web-platform-tests/css/css-images/tiled-gradients-expected.html: Added.
* web-platform-tests/css/css-images/tiled-gradients.html: Added.
* web-platform-tests/css/css-images/tiled-radial-gradients-expected.html: Added.
* web-platform-tests/css/css-images/tiled-radial-gradients.html: Added.
* web-platform-tests/css/css-images/w3c-import.log: Added.

LayoutTests:

Import css/css-images tests

* TestExpectations: Mark the new imported ref-tests that fail and a test that crashes.

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

7 months agoW3C test importer breaks svg files.
clopez@igalia.com [Thu, 10 Oct 2019 21:57:57 +0000 (21:57 +0000)]
W3C test importer breaks svg files.
https://bugs.webkit.org/show_bug.cgi?id=202806

Reviewed by Jonathan Bedard.

The WebKit W3C importer tries to rewrite the xml/html/css files
when importing the tests to rewrite paths and such.

The issue is that to decide if rewrite the file or not uses the
mimetype and the current code was comparing for something like
if "xml" in str(mimetype[0])

But svg files have mimetype "image/svg+xml" so the previous code
was trying to rewrite svg files, breaking them.

This patches changes that code to only rewrite if the mimetype
also contains the "application/" or "text/" string.

It also adds an info log (printed when verbose enabled) to tell
that a file has been rewritten.

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.import_tests):

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

7 months agoWeb Inspector: Sources: enable tab by default
drousso@apple.com [Thu, 10 Oct 2019 21:57:36 +0000 (21:57 +0000)]
Web Inspector: Sources: enable tab by default
https://bugs.webkit.org/show_bug.cgi?id=202341

Reviewed by Joseph Pecoraro.

The experimental Sources Tab has progressed enough that it can be enabled by default. There
are some new features that are only available in the Sources Tab that are also ready to be
used (e.g. local resource overrides).

* UserInterface/Main.html:
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Base/Setting.js:
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showResources):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForURL):
* UserInterface/Views/DefaultDashboardView.js:
(WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.populateContextMenu):
* UserInterface/Views/SearchResultTreeElement.js:
(WI.SearchResultTreeElement.prototype.populateContextMenu):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.isTabAllowed): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.css: Removed.
* UserInterface/Views/DebuggerSidebarPanel.js: Removed.
* UserInterface/Views/DebuggerTabContentView.js: Removed.
* UserInterface/Views/ResourceSidebarPanel.css: Removed.
* UserInterface/Views/ResourceSidebarPanel.js: Removed.
* UserInterface/Views/ResourcesTabContentView.js: Removed.
Remove the experimental setting, as well as code for the Resources Tab and the Debugger Tab.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

7 months ago[Catalina] LayoutTest fast/canvas/webgl/texImage2D-mse-flip-{true,false}.html failing
jer.noble@apple.com [Thu, 10 Oct 2019 21:56:16 +0000 (21:56 +0000)]
[Catalina] LayoutTest fast/canvas/webgl/texImage2D-mse-flip-{true,false}.html failing
https://bugs.webkit.org/show_bug.cgi?id=202771
<rdar://problem/49441298>

Reviewed by Eric Carlson.

Catalina no longer creates IOSurface-backed CVPixelBuffers by default for certain
codecs; make the CVPixelBuffers generated by WebCoreDecompressionSession IOSurface-backed
explicitly by passing in the correct attributes when creating the VTDecompressionSession.

* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):

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

7 months ago[Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
mmaxfield@apple.com [Thu, 10 Oct 2019 21:38:55 +0000 (21:38 +0000)]
[Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
https://bugs.webkit.org/show_bug.cgi?id=202778
<rdar://problem/52594556>

Reviewed by Simon Fraser.

Source/WebCore:

This was caught by fast/text/international/system-language/han-quotes.html,
but we didn't have time to fix it until now.

Test: fast/text/international/system-language/han-quotes.html

* platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):

LayoutTests:

* platform/mac/TestExpectations:

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

7 months ago[WinCairo] Move remote communication handling from RemoteInspectorServer to RemoteIns...
Basuke.Suzuki@sony.com [Thu, 10 Oct 2019 21:20:12 +0000 (21:20 +0000)]
[WinCairo] Move remote communication handling from RemoteInspectorServer to RemoteInspector.
https://bugs.webkit.org/show_bug.cgi?id=202763

Reviewed by Ross Kirsling.

Source/JavaScriptCore:

Because RemoteInspector now exists in UIProcess, the old implementation which communicate with RemoteInspector
in WebProcess and RemoteInspectorServer in UIProcess was meaningless or even bad. Remove this complex
implementation and move communication handling from RemoteInspectorServer to RemoteInspector and communicate
each other directly.

* inspector/remote/RemoteInspector.h:
* inspector/remote/socket/RemoteInspectorConnectionClient.cpp:
* inspector/remote/socket/RemoteInspectorConnectionClient.h:
* inspector/remote/socket/RemoteInspectorServer.cpp:
(Inspector::RemoteInspectorServer::~RemoteInspectorServer):
(Inspector::RemoteInspectorServer::start):
(Inspector::RemoteInspectorServer::didAccept):
* inspector/remote/socket/RemoteInspectorServer.h:
* inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::connect):
(Inspector::RemoteInspector::didClose):
(Inspector::RemoteInspector::sendWebInspectorEvent):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::stopInternal):
(Inspector::RemoteInspector::pushListingsNow):
(Inspector::RemoteInspector::pushListingsSoon):
(Inspector::RemoteInspector::sendMessageToRemote):
(Inspector::RemoteInspector::setup):
(Inspector::RemoteInspector::sendMessageToTarget):
(Inspector::RemoteInspector::backendCommands const):
(Inspector::RemoteInspector::dispatchMap):
(Inspector::RemoteInspector::setupInspectorClient):
(Inspector::RemoteInspector::setupTarget):
(Inspector::RemoteInspector::frontendDidClose):
(Inspector::RemoteInspector::sendMessageToBackend):
* inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp:
(Inspector::RemoteInspectorSocketEndpoint::~RemoteInspectorSocketEndpoint):
(Inspector::RemoteInspectorSocketEndpoint::listenInet):
(Inspector::RemoteInspectorSocketEndpoint::isListening):
(Inspector::RemoteInspectorSocketEndpoint::workerThread):
(Inspector::RemoteInspectorSocketEndpoint::generateConnectionID):
(Inspector::RemoteInspectorSocketEndpoint::makeConnection):
(Inspector::RemoteInspectorSocketEndpoint::createClient):
(Inspector::RemoteInspectorSocketEndpoint::createListener):
(Inspector::RemoteInspectorSocketEndpoint::invalidateListener):
(Inspector::RemoteInspectorSocketEndpoint::getPort const):
(Inspector::RemoteInspectorSocketEndpoint::acceptInetSocketIfEnabled):
* inspector/remote/socket/RemoteInspectorSocketEndpoint.h:

Source/WebKit:

Remove deleted method invocations.

* UIProcess/win/WebProcessPoolWin.cpp:
(WebKit::initializeRemoteInspectorServer):
(WebKit::WebProcessPool::platformInitialize):

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

7 months agoUnreviewed, tweak test to address flakiness on WK1.
cdumez@apple.com [Thu, 10 Oct 2019 20:30:21 +0000 (20:30 +0000)]
Unreviewed, tweak test to address flakiness on WK1.

* media/media-source/media-source-page-cache-expected.txt:
* media/media-source/media-source-page-cache.html:

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

7 months agoresults.webkit.org: Serve correct exit codes when aborting
jbedard@apple.com [Thu, 10 Oct 2019 20:29:17 +0000 (20:29 +0000)]
results.webkit.org: Serve correct exit codes when aborting
https://bugs.webkit.org/show_bug.cgi?id=202817

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/view_routes.py:
(ViewRoutes.error): Return exit code along with html string.

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

7 months agoDo not timeout a load intercepted by service worker that receives a response
youenn@apple.com [Thu, 10 Oct 2019 19:52:04 +0000 (19:52 +0000)]
Do not timeout a load intercepted by service worker that receives a response
https://bugs.webkit.org/show_bug.cgi?id=202787

Reviewed by Chris Dumez.

Source/WebKit:

Stop making ServiceWorkerFetchTask ref counted since it is not needed and
can potentially make ServiceWorkerFetchTask oulive its WebSWServerToContextConnection member.

Stop the ServiceWorkerFetchTask timeout timer whenever receiving a response so that the load will not timeout in that case.
This ensures that a load that is starting in a service worker will not be failing.
Instead the load will go to network process.

Removed m_didReachTerminalState which is not needed as WebSWServerToContextConnection unregisters the ServiceWorkerFetchTask
as an IPC listener for all terminating messages.

* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveData):
(WebKit::ServiceWorkerFetchTask::didReceiveFormData):
(WebKit::ServiceWorkerFetchTask::didFinish):
(WebKit::ServiceWorkerFetchTask::didFail):
(WebKit::ServiceWorkerFetchTask::didNotHandle):
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::startFetch):
(WebKit::WebSWServerToContextConnection::fetchTaskTimedOut):
Use a Vector instead of a HasSet for performance reasons.
Update according fetch map using unique_ptr instead of Ref<>.
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:

LayoutTests:

* http/wpt/service-workers/fetch-timeout-worker.js: Added.
(async.doTest):
* http/wpt/service-workers/fetch-timeout.https-expected.txt: Added.
* http/wpt/service-workers/fetch-timeout.https.html: Added.
* http/wpt/service-workers/resources/lengthy-pass.py:
(main):

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

7 months agoEmergency unittest fix for wkbuild.
jlewis3@apple.com [Thu, 10 Oct 2019 19:49:27 +0000 (19:49 +0000)]
Emergency unittest fix for wkbuild.

Unreviewed test fix.

* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
(ShouldBuildTest):

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

7 months agoFontFaceSet's ready promise is not always resolved
mmaxfield@apple.com [Thu, 10 Oct 2019 19:42:15 +0000 (19:42 +0000)]
FontFaceSet's ready promise is not always resolved
https://bugs.webkit.org/show_bug.cgi?id=202548

Reviewed by Youenn Fablet.

Source/WebCore:

When we do layout on an element, FontRanges::glyphDataForCharacter() will cause the first
available font to start loading, but will continue looking at subsequent fonts to see if
there's a good one we can render while the load is happening. When looking for a fallback
font, it calls FontRanges::Range::font() with a ExternalResourceDownloadPolicy set to
Forbid. This is fine, except that a side effect of calling this function is that the
CSSFontFace marks itself as Loading, which means document.fonts.ready is deferred. Then,
the load finishes, and the subsequent CSSFontFace is never actually used, meaning it never
exits the Loading state, which means document.fonts.ready never fires.

The solution to this is to just only allow the font to enter the Loading state if it's not
one of these "subsequent" fonts.

Test: fast/text/fontfaceset-ready-not-fired.html

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::pump):

LayoutTests:

* fast/text/fontfaceset-ready-not-fired-expected.txt: Added.
* fast/text/fontfaceset-ready-not-fired.html: Added.
* fast/text/fontfaceset-ready-not-fired-2-expected.txt: Added.
* fast/text/fontfaceset-ready-not-fired-2.html: Added.

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

7 months agoUnreviewed, speculative fix build failure on 32bit
ysuzuki@apple.com [Thu, 10 Oct 2019 19:40:50 +0000 (19:40 +0000)]
Unreviewed, speculative fix build failure on 32bit
https://bugs.webkit.org/show_bug.cgi?id=202569

* llint/LowLevelInterpreter32_64.asm:

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

7 months agoUpdated new Catalina queues names as per new Buildbot naming scheme
aakash_jain@apple.com [Thu, 10 Oct 2019 18:44:51 +0000 (18:44 +0000)]
Updated new Catalina queues names as per new Buildbot naming scheme
https://bugs.webkit.org/show_bug.cgi?id=202816

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/build.webkit.org-config/config.json: Renamed builder name and removed spaces.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: Ditto.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.

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

7 months agoMockRealtimeVideoSource::setFrameRateWithPreset should not use preset after moving it
youenn@apple.com [Thu, 10 Oct 2019 18:42:17 +0000 (18:42 +0000)]
MockRealtimeVideoSource::setFrameRateWithPreset should not use preset after moving it
https://bugs.webkit.org/show_bug.cgi?id=202800

Reviewed by Alexey Proskuryakov.

This does not affect behavior right now since clients typically get the intrinsic size through media samples.
But this could create some inconsistencies.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

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

7 months agoFixing build scheduling for Catalina queues.
jlewis3@apple.com [Thu, 10 Oct 2019 18:35:39 +0000 (18:35 +0000)]
Fixing build scheduling for Catalina queues.
https://bugs.webkit.org/show_bug.cgi?id=202814

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/config.json: Drive By fix of Trigger.
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
(_should_file_trigger_build):

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

7 months agopointerevents/ios/touch-action-pinch-zoom-allows-zooming.html is failing after r250361
wenson_hsieh@apple.com [Thu, 10 Oct 2019 18:23:13 +0000 (18:23 +0000)]
pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html is failing after r250361
https://bugs.webkit.org/show_bug.cgi?id=202777
<rdar://problem/56128421>

Reviewed by Tim Horton.

This layout test is intended to verify that pinching to zoom out in an element with `touch-action: pinch-zoom`
will cause the page scale to change (i.e. decrease). This test works on iPhone, where the initial-scale meta
viewport property is respected. However, a desktop viewport configuration is used by default on iPad, which
ignores the initial-scale property by default.

Prior to r250361, we would always try and scale down content to fit within the viewport, such that the initial
scale in this layout test on iPad would be approximately 0.384; this meant that the test would pass, regardless
of whether it even attempted to pinch zoom at all, since it would always pass the `pageScale != 1` assertion.

However, after r250361, we now no longer attempt to scale down to fit the viewport when the content width is
excessively large (the maximum width breakpoint is 1920px), which makes the initial scale 1. This layout test
makes the content width 2000px, which exceeds this maximum width limit and causes us to avoid shrinking to fit.
This means that we'll end up failing the pageScale assertion and timing out as a result.

To fix this, simply mark the test as `contentMode=mobile`, such that even on iPad, we'll respect the
initial-scale meta viewport property, and the test will actually pinch to zoom the page out as expected.

* pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html:

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

7 months agoWeb Inspector: Timelines: don't call willDispatchEvent/didDispatchEvent unless there...
drousso@apple.com [Thu, 10 Oct 2019 18:04:45 +0000 (18:04 +0000)]
Web Inspector: Timelines: don't call willDispatchEvent/didDispatchEvent unless there is a listener for the event
https://bugs.webkit.org/show_bug.cgi?id=202713

Reviewed by Joseph Pecoraro.

Fixes failing inspector/timeline/timeline-recording.html after r250672. This was because the
`InspectorTimelineAgent` expected a corresponding `willDispatchEvent` before it was told
about the `didDispatchEvent`, which wasn't happening since only `willDispatchEvent` would
early-return if the `DOMWindow` didn't have any event listeners for the dispatched event. By
making the `DOMWindow::dispatchEvent` itself early-return in that case, it now handles both
`willDispatchEvent` and `didDispatchEvent`, ensuring that they are always called in pairs.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchEvent):

* dom/EventTarget.cpp:
(WebCore::EventTarget::innerInvokeEventListeners):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::didDispatchEvent):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::didDispatchEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
`InspectorInstrumentation::willDispatchEventImpl` was always called with `hasEventListeners`
as `true`, so there's no reason to keep that parameter around. Similarly, the change inside
`DOMWindow::dispatchEvent` will make it so that the same is true for
`InspectorInstrumentation::willDispatchEventOnWindowImpl` as well.

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

7 months agoFlaky Test: media/media-source/media-source-page-cache.html
cdumez@apple.com [Thu, 10 Oct 2019 17:17:51 +0000 (17:17 +0000)]
Flaky Test: media/media-source/media-source-page-cache.html
https://bugs.webkit.org/show_bug.cgi?id=202775

Reviewed by Eric Carlson.

SourceBufferList should never prevent entering the page cache, even if it has
pending events in its queue. Its queue is a MainThreadGenericEventQueue, which
is Page Cache-aware and will properly suspend the firing of events when needed.

No new tests, covered by flaky test which should no longer be.

* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::canSuspendForDocumentSuspension const):

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

7 months agoAdd a unit test for StorageQuotaManager
sihui_liu@apple.com [Thu, 10 Oct 2019 16:57:26 +0000 (16:57 +0000)]
Add a unit test for StorageQuotaManager
https://bugs.webkit.org/show_bug.cgi?id=202755

Reviewed by Youenn Fablet.

Source/WebCore:

Expose state of StorageQuotaManager for newly added unit test.

* storage/StorageQuotaManager.h:
(WebCore::StorageQuotaManager::state const):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/StorageQuotaManager.cpp: Added.
(TestWebKitAPI::TEST):

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

7 months agoSpeculativeLoad should use CompletionHandler
commit-queue@webkit.org [Thu, 10 Oct 2019 16:37:13 +0000 (16:37 +0000)]
SpeculativeLoad should use CompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=202795

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

SpeculativeLoad should use CompletionHandler, as remarked in
Bug 201641 review.

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:

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

7 months agoSupport programmatic paste requests on macOS
wenson_hsieh@apple.com [Thu, 10 Oct 2019 16:17:18 +0000 (16:17 +0000)]
Support programmatic paste requests on macOS
https://bugs.webkit.org/show_bug.cgi?id=202773
<rdar://problem/48957166>

Reviewed by Tim Horton.

Source/WebCore:

Adds support for programmatic paste requests on macOS. See below for more details.

Tests: editing/pasteboard/dom-paste/dom-paste-confirmation.html
       editing/pasteboard/dom-paste/dom-paste-consecutive-confirmations.html
       editing/pasteboard/dom-paste/dom-paste-rejection.html
       editing/pasteboard/dom-paste/dom-paste-requires-user-gesture.html
       editing/pasteboard/dom-paste/dom-paste-same-origin.html

* editing/EditorCommand.cpp:
(WebCore::defaultValueForSupportedPaste):
(WebCore::supportedPaste):
(WebCore::allowPasteFromDOM):
(WebCore::enabledPaste):

Fixes an existing bug uncovered by the layout test editing/execCommand/clipboard-access.html, which tests the
results of `document.queryCommandEnabled("copy")` and `document.queryCommandEnabled("paste")`. The problem here
is that document.queryCommandEnabled("paste") returns true if DOM paste access requests are enabled, regardless
of whether or not there is an active user gesture. This is inconsistent with the behavior of "copy" and "cut",
which return false in the case where there is no user gesture (and the clipboard access policy is also equal to
ClipboardAccessPolicy::RequiresUserGesture -- refer to `allowCopyCutFromDOM`).

When pasting, we only DOM paste access requests to be triggered only in the case where there is a user gesture.
This means that enabledPaste should additionally be gated on a user gesture check. For consistency with the
implementation of `enabledCopy`, we introduce a `allowPasteFromDOM` helper that is similar to
`allowCopyCutFromDOM`, and additionally check this constraint when the paste command's source is the DOM (as
opposed to a menu or key binding).

This adjustment also adds a missing canDHTMLPaste() check prior to consulting canPaste(). This ensures that when
evaluating document.queryCommandEnabled("Paste"), we'll dispatch a "beforepaste" event, similar to how
evaluating document.queryCommandEnabled("Copy") dispatches a "beforecopy" event.

* platform/LocalizedStrings.h:

Mark a function as WEBCORE_EXPORT.

Source/WebKit:

Adds support for programmatic paste requests on macOS, as well as some testing SPI in WKWebView to allow
WebKitTestRunner to grab the NSMenu used for the DOM paste request. This patch adopts the same strategy taken to
allow programmatic paste on iOS, by allowing programmatic pastes coming from the page to show platform UI which
the user must then interact with in order to proceed with the paste. See below for more details.

* Shared/WebPreferencesDefaultValues.h:

Make this available on both iOS and macOS (iOS family is omitted for now, since callout bar UI is not generally
present on non-iOS iOS-family platforms such as Apple Watch).

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

This selector is called when the user taps the Paste option in the presented NSMenu.

(-[WKWebView _activeMenu]):

Returns the currently active NSMenu. Only for testing purposes.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _web_grantDOMPasteAccess]):

Same exercise as above, only for WKView instead of WKWebView.

* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::domPasteMenu const):
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKDOMPasteMenuDelegate initWithWebViewImpl:]):
(-[WKDOMPasteMenuDelegate menuDidClose:]):
(-[WKDOMPasteMenuDelegate numberOfItemsInMenu:]):
(-[WKDOMPasteMenuDelegate confinementRectForMenu:onScreen:]):

Adds a new object, whose purpose is to be a delegate for the NSMenu that is presented when requesting DOM paste
access. This object is used instead of WKWebView, since API clients may end up making the WKWebView the delegate
for a different menu, in which case some implementations (either theirs or ours) of NSMenuDelegate methods would
not be called. Avoiding this would require the client to be aware that WKWebView conforms to NSMenuDelegate,
which is only declared privately.

(WebKit::WebViewImpl::handleProcessSwapOrExit):

On process swap or exit, automatically bail out of any pending DOM paste request by denying it.

(WebKit::WebViewImpl::requestDOMPasteAccess):
(WebKit::WebViewImpl::handleDOMPasteRequestWithResult):

Handle the DOM paste request by showing an NSMenu near the mouse cursor with a single option to paste.

* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::requestDOMPasteAccess):

Tools:

Adds new testing support to enable us to test programmatic paste requests on macOS.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:

Add a few new UIScriptController methods:
- activateAtPoint(x, y, callback): used to activate content underneath at (x, y), in root view coordinates
  (WKWebView on macOS, and WKContentView on iOS). On macOS, this moves the mouse to the given location and
  clicks.
- chooseMenuAction(action, callback): used to select a menu item with the given title.
- dismissMenu(): dismisses the platform menu.

Note that dismissMenu and chooseMenuAction currently only work for the DOM paste menu, but could be extended in
the future to handle the system context menu.

* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::dismissMenu):
(WTR::UIScriptController::chooseMenuAction):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::activateAtPoint):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues):
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView initWithFrame:configuration:]):
(-[TestRunnerWKWebView _didShowMenu]):
(-[TestRunnerWKWebView _didHideMenu]):

Make these present across both macOS and iOS. On macOS, we listen for NSMenuDidBeginTrackingNotification and
NSMenuDidEndTrackingNotification to know when a menu has been shown or dismissed.

(-[TestRunnerWKWebView dismissActiveMenu]):
(-[TestRunnerWKWebView resetInteractionCallbacks]):

Make these available on both iOS and macOS. The only interaction callbacks on macOS are currently
didShowMenuCallback and didHideMenuCallback.

(-[TestRunnerWKWebView _willHideMenu]):
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::setDidShowMenuCallback):
(WTR::UIScriptControllerCocoa::setDidHideMenuCallback):
(WTR::UIScriptControllerCocoa::dismissMenu):
(WTR::UIScriptControllerCocoa::isShowingMenu const):

Move these implementations into UIScriptControllerCocoa, from UIScriptControllerIOS.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):

Instead of clearing all interaction callbacks in TestControllerIOS, do it in TestControllerCocoa where it
affects both macOS and iOS.

* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::activateAtPoint):
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::chooseMenuAction):
(WTR::UIScriptControllerIOS::rectForMenuAction const):
(WTR::UIScriptControllerIOS::setDidShowMenuCallback): Deleted.
(WTR::UIScriptControllerIOS::setDidHideMenuCallback): Deleted.
(WTR::UIScriptControllerIOS::isShowingMenu const): Deleted.

Abstract rectForMenuAction and singleTapAtPointWithModifiers out into private helper methods, such that they can
be used from within other script controller methods.

* WebKitTestRunner/mac/UIScriptControllerMac.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:

Implement the new script controller hooks on macOS.

(WTR::UIScriptControllerMac::clearAllCallbacks):
(WTR::UIScriptControllerMac::chooseMenuAction):
(WTR::UIScriptControllerMac::activateAtPoint):

LayoutTests:

Refactors existing layout tests for programmatic paste requests on iOS, such that they now run in both iOS and
macOS. See below for more details.

* TestExpectations:
* editing/pasteboard/dom-paste/dom-paste-confirmation-expected.txt: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-confirmation-expected.txt.
* editing/pasteboard/dom-paste/dom-paste-confirmation.html: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-confirmation.html.
* editing/pasteboard/dom-paste/dom-paste-consecutive-confirmations-expected.txt: Added.
* editing/pasteboard/dom-paste/dom-paste-consecutive-confirmations.html: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-consecutive-confirmations.html.
* editing/pasteboard/dom-paste/dom-paste-rejection-expected.txt: Added.
* editing/pasteboard/dom-paste/dom-paste-rejection.html: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-rejection.html.
* editing/pasteboard/dom-paste/dom-paste-requires-user-gesture-expected.txt: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-requires-user-gesture-expected.txt.
* editing/pasteboard/dom-paste/dom-paste-requires-user-gesture.html: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-requires-user-gesture.html.
* editing/pasteboard/dom-paste/dom-paste-same-origin-expected.txt: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-same-origin-expected.txt.
* editing/pasteboard/dom-paste/dom-paste-same-origin.html: Renamed from LayoutTests/editing/pasteboard/ios/dom-paste-same-origin.html.
* editing/pasteboard/dom-paste/resources/dom-paste-helper.js: Added.

Re-word some of these layout tests' descriptions to reference "clicks or taps", instead of just "taps", and also
replace mentions of "callout bars" with platform-agnostic "menus".

(return.new.Promise.):
(async._waitForOrTriggerPasteMenu):
(async.triggerPasteMenuAfterActivatingLocation):
(async.waitForPasteMenu):

Refactor these testing helpers to support both iOS and macOS:

(1) Replace code that finds callout bar menu items and synthesizes taps on iOS, with code that instead chooses a
menu item with the given title (in this case, "Paste"). This is supported on both macOS and iOS, where we invoke
the NSMenuItem's action and dismiss the menu item, and find and tap the callout bar menu item, respectively.

(2) Implement UIScriptController::activateAtPoint, which is used as a cross-platform way of activating an
element at the given point. On iOS, this taps the given location, and on macOS, this moves the mouse to that
location and then simulates a click (mouse down and mouse up). In a subsequent patch, we should additionally use
this in the implementation of UIHelper.activateAt().

* editing/pasteboard/ios/dom-paste-consecutive-confirmations-expected.txt: Removed.
* editing/pasteboard/ios/dom-paste-rejection-expected.txt: Removed.
* editing/pasteboard/ios/resources/dom-paste-helper.js: Removed.
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

Skip editing/pasteboard/dom-paste everywhere for now, except for macOS and iOS WebKit2.

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

7 months agoUpdate libwebrtc third-party jsoncpp to M78
youenn@apple.com [Thu, 10 Oct 2019 15:56:17 +0000 (15:56 +0000)]
Update libwebrtc third-party jsoncpp to M78
https://bugs.webkit.org/show_bug.cgi?id=202729

Reviewed by Eric Carlson.

* Source/third_party/jsoncpp: Updated.

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

7 months ago[GTK][WPE] Lots of media related tests crashing or flaky after r250918 - [ Mac WK2...
eric.carlson@apple.com [Thu, 10 Oct 2019 15:31:20 +0000 (15:31 +0000)]
[GTK][WPE] Lots of media related tests crashing or flaky after r250918 - [ Mac WK2 ] Layout Test fast/mediastream/MediaStreamTrack-getSettings.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=202784

Unreviewed, fix GTK and WPE test crashes.

* platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
(WebCore::WrappedMockRealtimeAudioSource::render): Reconfigure if necessary.
(WebCore::WrappedMockRealtimeAudioSource::reconfigure): New, setup for rendering.
(WebCore::WrappedMockRealtimeAudioSource::settingsDidChange): Call reconfigure.

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

7 months agoresults.webkit.org: Increase default limit for test results (Follow-up fix)
jbedard@apple.com [Thu, 10 Oct 2019 15:19:46 +0000 (15:19 +0000)]
results.webkit.org: Increase default limit for test results (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=202757

Unreviewed follow-up fix.

* resultsdbpy/resultsdbpy/view/templates/commits.html: Switch default and maximum limits.

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

7 months agoRemove unified plan runtime flag
youenn@apple.com [Thu, 10 Oct 2019 15:15:01 +0000 (15:15 +0000)]
Remove unified plan runtime flag
https://bugs.webkit.org/show_bug.cgi?id=202721

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by existing tests.

* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::RTCRtpSender):
* Modules/mediastream/RTCRtpTransceiver.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
(WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
(WebCore::LibWebRTCMediaEndpoint::OnTrack):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):
(WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
(WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
* testing/Internals.cpp:
(WebCore::Internals::useMockRTCPeerConnectionFactory):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsConstructed): Remove ability to disable unified plan.

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

7 months agoFlaky Test: imported/w3c/web-platform-tests/offscreen-canvas/drawing-images-to-the...
commit-queue@webkit.org [Thu, 10 Oct 2019 15:14:21 +0000 (15:14 +0000)]
Flaky Test: imported/w3c/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
https://bugs.webkit.org/show_bug.cgi?id=202782

Patch by Chris Lord <clord@igalia.com> on 2019-10-10
Reviewed by Youenn Fablet.

Some OffscreenCanvas tests are failing due to unhandled Promise
rejection from unimplemented API. Mark this, and other tests that are
affected with DumpJSConsoleLogInStdErr.

* TestExpectations:

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

7 months agoRemove a "The " in "The The HTTP headers of the response"
aperez@igalia.com [Thu, 10 Oct 2019 14:57:25 +0000 (14:57 +0000)]
Remove a "The " in "The The HTTP headers of the response"
https://bugs.webkit.org/show_bug.cgi?id=194851

Reviewed by Carlos Garcia Campos.

* Shared/API/glib/WebKitURIResponse.cpp:
(webkit_uri_response_class_init): Fix typo in description of the WebKitURIResponse::http-headers property.

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

7 months agoresults.webkit.org: Start reporting results
jbedard@apple.com [Thu, 10 Oct 2019 14:47:10 +0000 (14:47 +0000)]
results.webkit.org: Start reporting results
https://bugs.webkit.org/show_bug.cgi?id=202639

Reviewed by Dewei Zhu.

* BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
(loadBuilderConfig): Load API key for results.webkit.org.
* BuildSlaveSupport/build.webkit.org-config/make_passwords_json.py:
(create_mock_slave_passwords_dict): Add mock for API key.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebKitTests): Start reporting to results.webkit.org.
(RunWebKitTests.__init__): Do not print the environment to hide the API key.
(RunWebKitTests.start): Add the API key to the environment.
(RunAPITests): Start reporting to results.webkit.org.
(RunAPITests.__init__): Do not print the environment to hide the API key.
(RunAPITests.start): Add the API key to the environment.
(RunPythonTests): Start reporting to results.webkit.org.
(RunPythonTests.__init__): Do not print the environment to hide the API key.
(RunPythonTests.start): Add the API key to the environment.
* Scripts/webkitpy/results/upload.py:
(Upload):
(Upload.upload): Add API_KEY, if it exists, to the request.
(Upload.upload_archive): Ditto.

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

7 months agoDOMCacheStorage should not prevent pages from entering the back/forward cache
cdumez@apple.com [Thu, 10 Oct 2019 14:24:07 +0000 (14:24 +0000)]
DOMCacheStorage should not prevent pages from entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=202608

Reviewed by Youenn Fablet.

Source/WebCore:

Make DOMCacheStorage fully suspendable by queueing all its asynchronous promise resolutions
to a SuspendableTaskQueue. This makes sure that no promises are resolved while suspended
in the page cache.

Test: http/tests/navigation/page-cache-domcachestorage-pending-promise.html

* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::DOMCacheStorage):
(WebCore::DOMCacheStorage::doSequentialMatch):
(WebCore::DOMCacheStorage::match):
(WebCore::DOMCacheStorage::has):
(WebCore::DOMCacheStorage::open):
(WebCore::DOMCacheStorage::doOpen):
(WebCore::DOMCacheStorage::remove):
(WebCore::DOMCacheStorage::doRemove):
(WebCore::DOMCacheStorage::keys):
(WebCore::DOMCacheStorage::canSuspendForDocumentSuspension const):
* Modules/cache/DOMCacheStorage.h:

LayoutTests:

Add layout test coverage.

* http/tests/navigation/page-cache-domcachestorage-pending-promise-expected.txt: Added.
* http/tests/navigation/page-cache-domcachestorage-pending-promise.html: Added.

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

7 months agoRename yasm-1.3.0 folder to yasm
youenn@apple.com [Thu, 10 Oct 2019 11:19:45 +0000 (11:19 +0000)]
Rename yasm-1.3.0 folder to yasm
https://bugs.webkit.org/show_bug.cgi?id=202725

Reviewed by Eric Carlson.

To align with upstream repository.

* Configurations/yasm.xcconfig:
* Source/third_party/yasm: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/yasm-1.3.0.
* libwebrtc.xcodeproj/project.pbxproj:

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

7 months agoUnreviewed GTK and WPE gardening after r250954.
magomez@igalia.com [Thu, 10 Oct 2019 10:38:38 +0000 (10:38 +0000)]
Unreviewed GTK and WPE gardening after r250954.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

7 months agoUpdate libwebrtc third-party abseilcpp to M78
youenn@apple.com [Thu, 10 Oct 2019 09:17:32 +0000 (09:17 +0000)]
Update libwebrtc third-party abseilcpp to M78
https://bugs.webkit.org/show_bug.cgi?id=202726

Reviewed by Alex Christensen.

* CMakeLists.txt: Remove optional.cc.
* Source/third_party/abseil-cpp: Updated.
* libwebrtc.xcodeproj/project.pbxproj: Remove optional.cc.

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

7 months agoUpdate libwebrtc third-party opus to M78
youenn@apple.com [Thu, 10 Oct 2019 08:45:55 +0000 (08:45 +0000)]
Update libwebrtc third-party opus to M78
https://bugs.webkit.org/show_bug.cgi?id=202728

Reviewed by Alex Christensen.

* Source/third_party/opus: Updated.

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

7 months agoUpdate libwebrtc third-arty libyuv to M78
youenn@apple.com [Thu, 10 Oct 2019 08:16:50 +0000 (08:16 +0000)]
Update libwebrtc third-arty libyuv to M78
https://bugs.webkit.org/show_bug.cgi?id=202727

Reviewed by Alex Christensen.

libyuv

* Source/third_party/libyuv: Updated.

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

7 months ago[Mac] Allow SYS___pthread_markcancel call
youenn@apple.com [Thu, 10 Oct 2019 08:00:32 +0000 (08:00 +0000)]
[Mac] Allow SYS___pthread_markcancel call
https://bugs.webkit.org/show_bug.cgi?id=202723

Reviewed by Alex Christensen.

Allow this pthread call as libwebrtc uses it on the Mac as well.

* WebProcess/com.apple.WebProcess.sb.in:

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

7 months agoAdd asserts to MediaStreamPrivate observer routines
youenn@apple.com [Thu, 10 Oct 2019 07:44:40 +0000 (07:44 +0000)]
Add asserts to MediaStreamPrivate observer routines
https://bugs.webkit.org/show_bug.cgi?id=202724

Reviewed by Alex Christensen.

These methods are only to be called in main thread.
Add asserts to validate this.
No change of behavior.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::addObserver):
(WebCore::MediaStreamPrivate::removeObserver):
(WebCore::MediaStreamPrivate::forEachObserver const):

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

7 months agoA service worker process should not be created when enqueuing a service worker job
youenn@apple.com [Thu, 10 Oct 2019 06:59:13 +0000 (06:59 +0000)]
A service worker process should not be created when enqueuing a service worker job
https://bugs.webkit.org/show_bug.cgi?id=202578
<rdar://problem/55979690>

Reviewed by Chris Dumez.

Source/WebCore:

Ask for a service worker context connection when planning to install or run a service worker.
This allows to not spin unnecessarily service worker processes for jobs that do not end up installing a service worker.

Covered by existing tests.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::tryInstallContextData):
(WebCore::SWServer::runServiceWorkerIfNecessary):

Source/WebKit:

Remove the calls to create service worker context connection.
They are now done at SWServer level when trying to either run a service worker or install one.

* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::postMessageToServiceWorker):
(WebKit::WebSWServerConnection::scheduleJobInServer):

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

7 months agoLayoutTest inspector/dom-debugger/node-removed.html is flaky
yurys@chromium.org [Thu, 10 Oct 2019 05:28:18 +0000 (05:28 +0000)]
LayoutTest inspector/dom-debugger/node-removed.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=154610
<rdar://problem/24801209>

Reviewed by Matt Baker.

Reenabled the test on all platforms.

The test was missing call to Debugger.setBreakpointsActive. Apparently at the time
it was written calling Debugger.setBreakpoint automatically activated breakpoint but
the behavior changed over time. I also removed some unnecessary code.

* inspector/dom-debugger/node-removed-expected.txt:
* inspector/dom-debugger/node-removed.html:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

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

7 months agoREGRESSION(r250948): Web Inspector: Styles: CSS selector becomes gray after stopping...
nvasilyev@apple.com [Thu, 10 Oct 2019 05:12:58 +0000 (05:12 +0000)]
REGRESSION(r250948): Web Inspector: Styles: CSS selector becomes gray after stopping editing without modifying it
https://bugs.webkit.org/show_bug.cgi?id=202781

Reviewed by Matt Baker.

When not editing, CSS selectors that match the selected node are highlighted (black in the light mode,
white in the dark mode). When editing starts, span elements that provide highlighting get removed.
When editing stops, active selectors should get highlighted.

r250948 stopped calling `_renderSelector` when selector wasn't modified.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit):
* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField.prototype._handleBlur):

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

7 months agoUnreviewed, fix the internal iOS build
wenson_hsieh@apple.com [Thu, 10 Oct 2019 03:08:32 +0000 (03:08 +0000)]
Unreviewed, fix the internal iOS build

* page/PointerCaptureController.h: Add some missing forward declarations.

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

7 months agoRemove some support for < iOS 13
krollin@apple.com [Thu, 10 Oct 2019 02:23:05 +0000 (02:23 +0000)]
Remove some support for < iOS 13
https://bugs.webkit.org/show_bug.cgi?id=202371
<rdar://problem/55853960>

Reviewed by Youenn Fablet.

Remove some support for iOS versions less than 13.0.

Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
values >= 130000. This means that expressions like
"__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
"__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

This removal is part of a series of patches effecting the removal of
dead code for old versions of iOS. This particular pass involves
changes in which Dean Jackson was involved. These changes are isolated
from other similar changes in order to facilitate the reviewing
process.

* wtf/FeatureDefines.h:
* wtf/Platform.h:

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

7 months agoMake fast/text/complex-initial-advance.html more robust
mmaxfield@apple.com [Thu, 10 Oct 2019 02:02:19 +0000 (02:02 +0000)]
Make fast/text/complex-initial-advance.html more robust
https://bugs.webkit.org/show_bug.cgi?id=202708

Unreviewed follow up to r250884.

Makes test robust enough to pass on Mojave.

* fast/text/complex-initial-advance-expected.html:
* fast/text/complex-initial-advance.html:

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

7 months agoUnreviewed, fix an asserition after r250937.
sihui_liu@apple.com [Thu, 10 Oct 2019 01:44:50 +0000 (01:44 +0000)]
Unreviewed, fix an asserition after r250937.

Space increase tasks will be finished once it's started.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):

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

7 months ago[Clipboard API] Refactor Pasteboard item reading functions to work on both iOS and...
wenson_hsieh@apple.com [Thu, 10 Oct 2019 01:27:14 +0000 (01:27 +0000)]
[Clipboard API] Refactor Pasteboard item reading functions to work on both iOS and macOS
https://bugs.webkit.org/show_bug.cgi?id=202647

Reviewed by Tim Horton.

Source/WebCore:

Moves some pasteboard helper functions out of iOS-specific code, and into platform-agnostic code. See below for
more details. There is no change in behavior, as nothing exercises these new pasteboard functions on macOS yet.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Pasteboard.cpp:
(WebCore::Pasteboard::allPasteboardItemInfo const):
(WebCore::Pasteboard::pasteboardItemInfo const):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::readBuffer):
(WebCore::Pasteboard::readURL):

Add some new helpers on Pasteboard to read Strings, data, and URLs from the platform pasteboard. These forward
to the platform strategy which, in WebKit2, are currently implemented using sync IPC, but could be changed in
the future to be fully asynchronous.

* platform/Pasteboard.h:
(WebCore::Pasteboard::name const):

Expose a cross-platform name() getter on Pasteboard. On non-Cocoa platforms, this simply returns the empty
string, but on macOS and iOS, this returns the platform pasteboard name, which is stored in m_pasteboardName.

* platform/PasteboardItemInfo.h:
(WebCore::PasteboardItemInfo::pathForContentType const):
(WebCore::PasteboardItemInfo::contentTypeForHighestFidelityItem const):
(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):

Adds a couple of new members to PasteboardItemInfo (which represents metadata about a given item in the platform
pasteboard). These are changeCount (which is self explanatory), and webSafeTypesByFidelity, which is a list of
types in fidelity order which contains the list of pasteboard types that are safe to expose to bindings. These
may include types such as "text/plain", "text/html", "text/uri-list", and "image/png".

To distinguish this list from the existing contentTypesByFidelity list, I've also renamed contentTypesByFidelity
to platformTypesByFidelity, to make it more obvious that this other list of types are platform-specific, and not
generally safe to expose to the web.

* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:

Move several helpers out into platform-agnostic code.

* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::fileContentState):
* platform/cocoa/PlatformPasteboardCocoa.mm: Added.

Add a new file to contain the implementation of PlatformPasteboard::allPasteboardItemInfo, which is the same
across Cocoa platforms.

(WebCore::PlatformPasteboard::allPasteboardItemInfo):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readRespectingUTIFidelities):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::informationForItemAtIndex):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::readString const):
(WebCore::PlatformPasteboard::readURL const):

Additionally refactor all methods on PlatformPasteboard that take pasteboard item indices as signed integers
(`int`) to receive `size_t` values instead.

(WebCore::PlatformPasteboard::allPasteboardItemInfo): Deleted.
* platform/libwpe/PasteboardLibWPE.cpp:
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::read):
* platform/libwpe/PlatformPasteboardLibWPE.cpp:
(WebCore::PlatformPasteboard::readString const):

Add an implementation stub for WPE.

* platform/mac/PlatformPasteboardMac.mm:
(WebCore::modernPasteboardTypeForWebSafeMIMEType):
(WebCore::webSafeMIMETypeForModernPasteboardType):

Add helpers to convert between modern NSPasteboardTypes and web-safe types. While some logic exists today on
macOS to convert between legacy pasteboard types and web-safe types, conversion between the modern pasteboard
types and web-safe types are needed since NSPasteboardItem's types only support NSPasteboardTypes and
dynamically declared types that match the format of a universal type identfier (for instance, "com.foo.bar").

(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::readString const):
(WebCore::PlatformPasteboard::readURL const):
(WebCore::PlatformPasteboard::count const):
(WebCore::PlatformPasteboard::informationForItemAtIndex):

Implement all of these helpers by looking up the NSPasteboardItem at the given item index and querying it for
data for non-legacy pasteboard types.

(WebCore::PlatformPasteboard::itemAtIndex const):

Source/WebKit:

Refactor iOS-specific pasteboard functions to be platform-agnostic. See WebCore ChangeLog for more details.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::allPasteboardItemInfo):
(WebKit::WebPasteboardProxy::informationForItemAtIndex):
(WebKit::WebPasteboardProxy::getPasteboardItemsCount):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
(WebKit::WebPasteboardProxy::writeURLToPasteboard):
(WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
(WebKit::WebPasteboardProxy::writeImageToPasteboard):
(WebKit::WebPasteboardProxy::writeStringToPasteboard):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::allPasteboardItemInfo):
(WebKit::WebPasteboardProxy::informationForItemAtIndex):
(WebKit::WebPasteboardProxy::getPasteboardItemsCount):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* UIProcess/wpe/WebPasteboardProxyWPE.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::informationForItemAtIndex):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
(WebKit::WebPlatformStrategies::readURLFromPasteboard):
(WebKit::WebPlatformStrategies::readStringFromPasteboard):
(WebKit::WebPlatformStrategies::writeToPasteboard):
(WebKit::WebPlatformStrategies::updateSupportedTypeIdentifiers):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

Refactor iOS-specific pasteboard functions to be platform-agnostic. See WebCore ChangeLog for more details.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::informationForItemAtIndex):
(WebPlatformStrategies::allPasteboardItemInfo):
(WebPlatformStrategies::getPasteboardItemsCount):
(WebPlatformStrategies::readBufferFromPasteboard):
(WebPlatformStrategies::readURLFromPasteboard):
(WebPlatformStrategies::readStringFromPasteboard):
(WebPlatformStrategies::writeToPasteboard):
(WebPlatformStrategies::updateSupportedTypeIdentifiers):

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

7 months agoUnreviewed. Try to fix build for Windows C_LOOP
sbarati@apple.com [Thu, 10 Oct 2019 01:01:58 +0000 (01:01 +0000)]
Unreviewed. Try to fix build for Windows C_LOOP

* llint/LowLevelInterpreter.asm:

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

7 months agoWeb Inspector: Modifying CSS selector by pressing Enter or Tab causes 2 CSS.setRuleSe...
nvasilyev@apple.com [Thu, 10 Oct 2019 00:55:10 +0000 (00:55 +0000)]
Web Inspector: Modifying CSS selector by pressing Enter or Tab causes 2 CSS.setRuleSelector backend calls
https://bugs.webkit.org/show_bug.cgi?id=202769
<rdar://problem/56132166>

Reviewed by Matt Baker.

Previously, spreadsheetSelectorFieldDidChange would get called twice:
1. On Enter or Tab key press.
2. On blur event.

With this patch, it only gets called on blur event.

* UserInterface/Models/CSSRule.js:
(WI.CSSRule.prototype.set selectorText):
Remove dead code. Calling `_selectorResolved(true)` would cause an uncaught exception.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange): Removed.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit): Added.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldWillNavigate): Added.
Split spreadsheetSelectorFieldDidChange into spreadsheetSelectorFieldDidCommit and spreadsheetSelectorFieldWillNavigate.

* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField):
(WI.SpreadsheetSelectorField.prototype.startEditing):
(WI.SpreadsheetSelectorField.prototype.stopEditing):
(WI.SpreadsheetSelectorField.prototype._handleBlur):
(WI.SpreadsheetSelectorField.prototype._handleKeyDown):
Add `_valueBeforeEditing` to check if the value was modified before the blur event.
Similar logic exists in SpreadsheetTextField.

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

7 months agoRename WheelEventTestTrigger and improve naming in related code
simon.fraser@apple.com [Thu, 10 Oct 2019 00:24:44 +0000 (00:24 +0000)]
Rename WheelEventTestTrigger and improve naming in related code
https://bugs.webkit.org/show_bug.cgi?id=202772

Reviewed by Tim Horton.

Change the "test trigger" terminology to "monitor wheel events"; after all, tests
call monitorWheelEvents() and callAfterScrollingCompletes(), and this is not triggering
a test.

Source/WebCore:

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::adjustScrollbarsForLayout):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::didAddScrollbar):
* page/Page.cpp:
(WebCore::Page::ensureWheelEventTestMonitor):
(WebCore::Page::ensureTestTrigger): Deleted.
* page/Page.h:
(WebCore::Page::wheelEventTestMonitor const):
(WebCore::Page::clearWheelEventTestMonitor):
(WebCore::Page::isMonitoringWheelEvents const):
(WebCore::Page::testTrigger const): Deleted.
(WebCore::Page::clearTrigger): Deleted.
(WebCore::Page::expectsWheelEventTriggers const): Deleted.
* page/WheelEventTestMonitor.cpp: Added.
(WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
(WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer):
(WebCore::WheelEventTestMonitor::deferForReason):
(WebCore::WheelEventTestMonitor::removeDeferralForReason):
(WebCore::WheelEventTestMonitor::triggerTestTimerFired):
(WebCore::operator<<):
* page/WheelEventTestMonitor.h: Renamed from Source/WebCore/page/WheelEventTestTrigger.h.
* page/WheelEventTestTrigger.cpp: Removed.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const):
(WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const):
(WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted.
(WebCore::AsyncScrollingCoordinator::deferTestsForReason const): Deleted.
(WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason const): Deleted.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView):
(WebCore::ScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateScrollingNode::setIsMonitoringWheelEvents):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
(WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Deleted.
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::isMonitoringWheelEvents const):
(WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger const): Deleted.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::deferWheelEventTestCompletionForReason):
(WebCore::ScrollingTree::removeWheelEventTestCompletionDeferralForReason):
(WebCore::ScrollingTree::deferTestsForReason): Deleted.
(WebCore::ScrollingTree::removeTestDeferralForReason): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason):
(WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason):
(WebCore::ThreadedScrollingTree::deferTestsForReason): Deleted.
(WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const): Deleted.
* platform/Logging.h:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::deferWheelEventTestCompletionForReason const):
(WebCore::ScrollAnimator::removeWheelEventTestCompletionDeferralForReason const):
(WebCore::ScrollAnimator::deferTestsForReason const): Deleted.
(WebCore::ScrollAnimator::removeTestDeferralForReason const): Deleted.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestMonitor):
(WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger): Deleted.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::deferWheelEventTestCompletionForReason const):
(WebCore::ScrollControllerClient::removeWheelEventTestCompletionDeferralForReason const):
(WebCore::ScrollControllerClient::deferTestsForReason const): Deleted.
(WebCore::ScrollControllerClient::removeTestDeferralForReason const): Deleted.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::startSnapRubberbandTimer):
(WebCore::ScrollController::stopSnapRubberbandTimer):
(WebCore::ScrollController::scheduleStatelessScrollSnap):
(WebCore::ScrollController::startDeferringWheelEventTestCompletionDueToScrollSnapping):
(WebCore::ScrollController::stopDeferringWheelEventTestCompletionDueToScrollSnapping):
(WebCore::ScrollController::startScrollSnapTimer):
(WebCore::ScrollController::stopScrollSnapTimer):
(WebCore::ScrollController::startDeferringTestsDueToScrollSnapping): Deleted.
(WebCore::ScrollController::stopDeferringTestsDueToScrollSnapping): Deleted.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::didBeginScrollGesture const):
(WebCore::ScrollAnimatorMac::didEndScrollGesture const):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* rendering/RenderBox.cpp:
(WebCore::setupWheelEventMonitor):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::setupWheelEventTestTrigger): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
* rendering/RenderListBox.cpp:
(WebCore::setupWheelEventTestMonitor):
(WebCore::RenderListBox::setScrollTop):
(WebCore::RenderListBox::createScrollbar):
(WebCore::setupWheelEventTestTrigger): Deleted.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::monitorWheelEvents):
(WebCoreTestSupport::setTestCallbackAndStartNotificationTimer):
(WebCoreTestSupport::clearWheelEventTestMonitor):
(WebCoreTestSupport::clearWheelEventTestTrigger): Deleted.
* testing/js/WebCoreTestSupport.h:

Source/WebKit:

* UIProcess/API/C/WKPage.cpp:
(WKPageClearWheelEventTestMonitor):
(WKPageClearWheelEventTestTrigger): Deleted.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearWheelEventTestMonitor):
(WebKit::WebPageProxy::clearWheelEventTestTrigger): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageStartMonitoringScrollOperations):
(WKBundlePageRegisterScrollOperationCompletionCallback):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):
* WebProcess/WebPage/EventDispatcher.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearWheelEventTestMonitor):
(WebKit::WebPage::clearWheelEventTestTrigger): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

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

7 months agoAdd support for CompactPointerTuple<..., OptionSet<...>>
dbates@webkit.org [Thu, 10 Oct 2019 00:13:22 +0000 (00:13 +0000)]
Add support for CompactPointerTuple<..., OptionSet<...>>
https://bugs.webkit.org/show_bug.cgi?id=201316

Reviewed by Yusuke Suzuki.

Source/WebCore:

Use the new CompactPointerTuple capability to replace CompactPointerTuple<RenderObject*, uint8_t>
with CompactPointerTuple<RenderObject*, OptionSet<ElementStyleFlag>> in Node.h.

* dom/Node.h:
(WebCore::Node::hasStyleFlag const):
(WebCore::Node::setStyleFlag):
(WebCore::Node::clearStyleFlags):
Update code now that we support CompactPointerTuple<..., OptionSet<...>>.

Source/WTF:

Support using an OptionSet<> for the byte value portion of a CompactPointerTuple so that
you can encode both a pointer and 8-bit bitmask in a type-safe way. Another benefit of
supporting OptionSet<> is that we have a LLDB pretty-printer for it so this makes it easy
to see the set flags in such a CompactPointerTuple.

* wtf/CompactPointerTuple.h:

Tools:

Add a test to ensure we encode and decode a compact pointer tuple correctly when an uint8_t and
a OptionSet<> as the byte value portion of the tuple.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/CompactPointerTuple.cpp: Added.
(TestWebKitAPI::TEST):

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

7 months agoIsLoggedIn: Add as experimental feature
wilander@apple.com [Thu, 10 Oct 2019 00:03:47 +0000 (00:03 +0000)]
IsLoggedIn: Add as experimental feature
https://bugs.webkit.org/show_bug.cgi?id=202707
<rdar://problem/56095064>

Reviewed by Brent Fulgham and Chris Dumez.

IsLoggedIn was proposed to the WebAppSec WG at TPAC 2019.
So far there is only an explainer posted to the mailing list:
https://lists.w3.org/Archives/Public/public-webappsec/2019Sep/0004.html

Source/WebCore:

This patch adds the three experimental web APIs:
- Promise<void> setLoggedIn()
- Promise<void> setLoggedOut()
- Promise<bool> isLoggedIn()

It also tests that those APIs are only exposed in secure contexts.

The functionality is implemented as a supplement to Navigator.

Tests: http/tests/is-logged-in/available-in-secure-contexts.https.html
       http/tests/is-logged-in/unavailable-in-insecure-contexts.html

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/NavigatorIsLoggedIn.cpp: Added.
(WebCore::NavigatorIsLoggedIn::from):
(WebCore::NavigatorIsLoggedIn::supplementName):
(WebCore::NavigatorIsLoggedIn::setLoggedIn):
(WebCore::NavigatorIsLoggedIn::setLoggedOut):
(WebCore::NavigatorIsLoggedIn::isLoggedIn):
* page/NavigatorIsLoggedIn.h: Added.
* page/NavigatorIsLoggedIn.idl: Added.
* page/PointerCaptureController.cpp:
* page/PointerCaptureController.h:
* page/Settings.yaml:

Source/WebKit:

* Shared/WebPreferences.yaml:

LayoutTests:

* http/tests/is-logged-in/available-in-secure-contexts.https-expected.txt: Added.
* http/tests/is-logged-in/available-in-secure-contexts.https.html: Added.
* http/tests/is-logged-in/unavailable-in-insecure-contexts-expected.txt: Added.
* http/tests/is-logged-in/unavailable-in-insecure-contexts.html: Added.
* platform/ios-device-wk1/TestExpectations:
* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/mac-highsierra/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/wincairo-wk1/TestExpectations:

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

7 months agoUnreviewed, rolling out r250930.
russell_e@apple.com [Wed, 9 Oct 2019 23:50:03 +0000 (23:50 +0000)]
Unreviewed, rolling out r250930.

Broke watchOS Builds

Reverted changeset:

"Add support for CompactPointerTuple<..., OptionSet<...>>"
https://bugs.webkit.org/show_bug.cgi?id=201316
https://trac.webkit.org/changeset/250930

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

7 months ago[iOS] LayoutTest fast/events/touch/ios/double-tap-for-double-click2.html is timing out
zalan@apple.com [Wed, 9 Oct 2019 23:39:26 +0000 (23:39 +0000)]
[iOS] LayoutTest fast/events/touch/ios/double-tap-for-double-click2.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=202765
<rdar://problem/56123067>

Reviewed by Wenson Hsieh.

Currently when a dblclick handler is dynamically registered while executing the click handler, we don't always pick up the newly added handler (see webkit.org/b/202766).
Modify the test so that it passes consistently (and still preserve the dynamic behavior).

* fast/events/touch/ios/double-tap-for-double-click2.html:

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

7 months ago[WebAuthn] Move the mock testing entrance to Internals
jiewen_tan@apple.com [Wed, 9 Oct 2019 23:03:06 +0000 (23:03 +0000)]
[WebAuthn] Move the mock testing entrance to Internals
https://bugs.webkit.org/show_bug.cgi?id=202560
<rdar://problem/55973793>

Reviewed by Chris Dumez.

Source/WebCore:

This patch moves TestRunner.setWebAuthenticationMockConfiguration to
Internals.setMockWebAuthenticationConfiguration and removes the old
entrance. The purpose of this patch is to allow API tests to use
the same mock infrastructure that is used by layout tests.

No new tests, covered by updates on existing tests.

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
* WebCore.xcodeproj/project.pbxproj:
* page/ChromeClient.h:
(WebCore::ChromeClient::setMockWebAuthenticationConfiguration):
* testing/Internals.cpp:
(WebCore::Internals::setMockWebAuthenticationConfiguration):
* testing/Internals.h:
* testing/Internals.idl:
* testing/MockWebAuthenticationConfiguration.h: Added.
(WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode):
(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
(WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
(WebCore::MockWebAuthenticationConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::decode):
* testing/MockWebAuthenticationConfiguration.idl: Added.

Source/WebKit:

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Deleted.
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::createMock):
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::MockAuthenticatorManager):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h:
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::shouldContinueFeedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h:
* UIProcess/WebAuthentication/Mock/MockHidService.cpp:
(WebKit::MockHidService::MockHidService):
* UIProcess/WebAuthentication/Mock/MockHidService.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::MockLocalConnection):
* UIProcess/WebAuthentication/Mock/MockLocalService.h:
* UIProcess/WebAuthentication/Mock/MockLocalService.mm:
(WebKit::MockLocalService::MockLocalService):
* UIProcess/WebAuthentication/Mock/MockNfcService.h:
* UIProcess/WebAuthentication/Mock/MockNfcService.mm:
(WebKit::MockNfcService::MockNfcService):
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMockWebAuthenticationConfiguration):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setMockWebAuthenticationConfiguration):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setWebAuthenticationMockConfiguration): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/wpt/webauthn/ctap-hid-failure.https.html:
* http/wpt/webauthn/ctap-hid-success.https.html:
* http/wpt/webauthn/ctap-nfc-failure.https.html:
* http/wpt/webauthn/idl.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html:
* http/wpt/webauthn/public-key-credential-create-failure.https.html:
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
* http/wpt/webauthn/public-key-credential-create-success-local.https.html:
* http/wpt/webauthn/public-key-credential-create-success-nfc.https.html:
* http/wpt/webauthn/public-key-credential-create-success-u2f.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-hid.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-local.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html:
* http/wpt/webauthn/public-key-credential-get-failure.https.html:
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
* http/wpt/webauthn/public-key-credential-get-success-local.https.html:
* http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
* http/wpt/webauthn/public-key-credential-get-success-u2f.https.html:
* http/wpt/webauthn/resources/public-key-credential-ip-address.https.html:

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

7 months agoClean up WheelEventTestTriggers logging
simon.fraser@apple.com [Wed, 9 Oct 2019 22:48:47 +0000 (22:48 +0000)]
Clean up WheelEventTestTriggers logging
https://bugs.webkit.org/show_bug.cgi?id=202764

Reviewed by Tim Horton.

Make DeferTestTriggerReason a bit set, and use OptionSet<> rather than StdSet. Make
DeferTestTriggerReason and ScrollableAreaReasonMap loggable, and simplify the logging.

* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
(WebCore::WheelEventTestTrigger::deferTestsForReason):
(WebCore::WheelEventTestTrigger::removeTestDeferralForReason):
(WebCore::WheelEventTestTrigger::triggerTestTimerFired):
(WebCore::operator<<):
(WebCore::dumpState): Deleted.
* page/WheelEventTestTrigger.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::deferTestsForReason const):
(WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason const):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const):

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

7 months agoLayout test fast/events/touch/ios/passive-by-default-overridden-on-document-and-windo...
dino@apple.com [Wed, 9 Oct 2019 22:46:39 +0000 (22:46 +0000)]
Layout test fast/events/touch/ios/passive-by-default-overridden-on-document-and-window.html is a flaky failure on Internal iOS testers
https://bugs.webkit.org/show_bug.cgi?id=202770
<rdar://51715312>

Reviewed by Megan Gardner.

Remove the touchmove listeners after firing once, because we can't
tell exactly how many we'll get for a drag.

* fast/events/touch/ios/passive-by-default-overridden-on-document-and-window.html:

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

7 months agoIndexedDB: update size to actual disk usage only when estimated increase is bigger...
sihui_liu@apple.com [Wed, 9 Oct 2019 22:38:56 +0000 (22:38 +0000)]
IndexedDB: update size to actual disk usage only when estimated increase is bigger than space available
https://bugs.webkit.org/show_bug.cgi?id=201957

Reviewed by Youenn Fablet.

For better performance.

Covered by existing tests.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::QuotaUser::resetSpaceUsed): m_estimatedSpaceIncrease will be updated when task
is finished, so no need to clear it when doing reset.
(WebCore::IDBServer::IDBServer::QuotaUser::computeSpaceUsed):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp: instead of reading file size after each task, just add the
task size to known usage and get an estimated usage.
(WebCore::IDBServer::UniqueIDBDatabase::startSpaceIncreaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::generateUniqueCallbackIdentifier):
(WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
(WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
(WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
(WebCore::IDBServer::UniqueIDBDatabase::forgetErrorCallback):
(WebCore::IDBServer::generateUniqueCallbackIdentifier): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* storage/StorageQuotaManager.cpp: use m_state to decide what action to take on next request. Previously when a
request asked for size bigger than space available, we would go to ask for more space directly. Now because IDB
can be reporting estimated usage, we first ask IDB to compute its actual disk usage and ask for more space if
actual space available is smaller than requested size.
(WebCore::StorageQuotaManager::askUserToInitialize):
(WebCore::StorageQuotaManager::removeUser):
(WebCore::StorageQuotaManager::requestSpace):
(WebCore::StorageQuotaManager::askForMoreSpace):
(WebCore::StorageQuotaManager::processPendingRequests):
* storage/StorageQuotaManager.h:
* storage/StorageQuotaUser.h:
(WebCore::StorageQuotaUser::computeSpaceUsed):

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

7 months agoIndexedDB: include size of index records in size estimate of put/add task
sihui_liu@apple.com [Wed, 9 Oct 2019 22:20:29 +0000 (22:20 +0000)]
IndexedDB: include size of index records in size estimate of put/add task
https://bugs.webkit.org/show_bug.cgi?id=202483

Reviewed by Geoffrey Garen.

Source/WebCore:

SQLiteIDBBackingStore has two tables IndexRecords and Records. For add operation add(VALUE, KEY), we add a new
record to Records table. If we can extract index value from VALUE for some index, we would add a new record to
IndexRecords table.

We estimated the task szie of add task with (KEY_SIZE + VALUE_SIZE), but we didn't count the size that could be
added to the IndexRecords table. This could lead to storage abuse.

Test: storage/indexeddb/request-size-estimate.html

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* storage/indexeddb/request-size-estimate-expected.txt: Added.
* storage/indexeddb/request-size-estimate.html: Added.
* storage/indexeddb/resources/request-size-estimate.js: Added.
(randomKey):
(randomPropertyValue):
(createObject):
(prepareDatabase):
(onOpenSuccess):

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

7 months agoYoutube.com is unable to enter the back/forward cache on macOS
cdumez@apple.com [Wed, 9 Oct 2019 22:03:29 +0000 (22:03 +0000)]
Youtube.com is unable to enter the back/forward cache on macOS
https://bugs.webkit.org/show_bug.cgi?id=202754
<rdar://problem/56117666>

Reviewed by Eric Carlson.

Source/WebCore:

As of r250542, the MainThreadGenericEventQueue used by both MediaSource and
SourceBuffer to fire event is PageCache-aware. As a result, both these
ActiveDOMObjects can now safety suspend without risking running script while
in the page cache. I did have to update some logic in MediaSource::removeSourceBuffer()
to make sure we do not unnecessarily construct new ActiveDOMObjects while
suspending, as this is not allowed.

Test: media/media-source/media-source-page-cache.html

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::canSuspendForDocumentSuspension const):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::canSuspendForDocumentSuspension const):
* Modules/mediasource/SourceBuffer.h:

LayoutTests:

Add layout test coverage.

* media/media-source/media-source-page-cache-expected.txt: Added.
* media/media-source/media-source-page-cache.html: Added.

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

7 months ago[Cocoa] IPC::decode should gracefully handle a nil allowed class
aestes@apple.com [Wed, 9 Oct 2019 21:29:19 +0000 (21:29 +0000)]
[Cocoa] IPC::decode should gracefully handle a nil allowed class
https://bugs.webkit.org/show_bug.cgi?id=202753

Reviewed by Geoffrey Garen.

If IPC::decode is called with a nil allowed class, an NSInvalidArgumentException will be
thrown when trying to create an NSArray literal with a nil value. Depending on who calls
IPC::decode, this exception might or might not be caught, leading to dropped messages or
crashes.

One case of this happening is tracked by rdar://problem/55839467. In this case, the nil
allowed class was due to a build misconfiguration, and the exception caused the UI process
to not respond to a synchronous IPC message, hanging the WebContent process.

rdar://problem/55839467 was resolved by fixing the build misconfiguration, but this patch
improves IPC::decode so that a nil allowed class results in a message decoding failure
rather than a maybe-caught NSException.

* Shared/Cocoa/ArgumentCodersCocoa.h:
(IPC::decode):

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

7 months agoUnreviewed, roll out r250878
ysuzuki@apple.com [Wed, 9 Oct 2019 21:23:56 +0000 (21:23 +0000)]
Unreviewed, roll out r250878
https://bugs.webkit.org/show_bug.cgi?id=202656

Breaking vimeo page.

JSTests:

* stress/getter-setter-should-be-cell.js: Removed.

Source/JavaScriptCore:

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGFixupPhase.cpp:
* runtime/GetterSetter.cpp:
* runtime/GetterSetter.h:
* runtime/JSGlobalObject.cpp:
(JSC::getGetterById):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::regExpProtoGlobalGetter const):
(JSC::JSGlobalObject::regExpProtoUnicodeGetter const):
(JSC::JSGlobalObject::getterSetterStructure const):
* runtime/JSType.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

7 months agoMark crypto/workers/subtle/aes-indexeddb.html as a timeout on Mojave Release wk2
tsavell@apple.com [Wed, 9 Oct 2019 21:06:46 +0000 (21:06 +0000)]
Mark crypto/workers/subtle/aes-indexeddb.html as a timeout on Mojave Release wk2
https://bugs.webkit.org/show_bug.cgi?id=202500

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

7 months agoAdd support for CompactPointerTuple<..., OptionSet<...>>
dbates@webkit.org [Wed, 9 Oct 2019 21:02:49 +0000 (21:02 +0000)]
Add support for CompactPointerTuple<..., OptionSet<...>>
https://bugs.webkit.org/show_bug.cgi?id=201316

Reviewed by Yusuke Suzuki.

Source/WebCore:

Use the new CompactPointerTuple capability to replace CompactPointerTuple<RenderObject*, uint8_t>
with CompactPointerTuple<RenderObject*, OptionSet<ElementStyleFlag>> in Node.h.

* dom/Node.h:
(WebCore::Node::hasStyleFlag const):
(WebCore::Node::setStyleFlag):
(WebCore::Node::clearStyleFlags):
Update code now that we support CompactPointerTuple<..., OptionSet<...>>.

Source/WTF:

Support using an OptionSet<> for the byte value portion of a CompactPointerTuple so that
you can encode both a pointer and 8-bit bitmask in a type-safe way. Another benefit of
supporting OptionSet<> is that we have a LLDB pretty-printer for it so this makes it easy
to see the set flags in such a CompactPointerTuple.

* wtf/CompactPointerTuple.h:

Tools:

Add a test to ensure we encode and decode a compact pointer tuple correctly when an uint8_t and
a OptionSet<> as the byte value portion of the tuple.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/CompactPointerTuple.cpp: Added.
(TestWebKitAPI::TEST):

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

7 months agoRunResolver::rangeForRendererWithOffsets should check for range end
zalan@apple.com [Wed, 9 Oct 2019 21:01:08 +0000 (21:01 +0000)]
RunResolver::rangeForRendererWithOffsets should check for range end
https://bugs.webkit.org/show_bug.cgi?id=202761
<rdar://problem/55917924>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch ensures that when rangeForRenderer comes back with a collapsed run (empty range), rangeForRendererWithOffsets returns an empty range as well.

Test: fast/text/simple-line-layout-range-check-end.html

* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const):

LayoutTests:

* fast/text/simple-line-layout-range-check-end-expected.txt: Added.
* fast/text/simple-line-layout-range-check-end.html: Added.

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

7 months ago[iOS] Layout Test fast/events/touch/ios/touchstart-and-touchend-outside-touchmove...
commit-queue@webkit.org [Wed, 9 Oct 2019 20:12:19 +0000 (20:12 +0000)]
[iOS] Layout Test fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target.html is Timing Out
https://bugs.webkit.org/show_bug.cgi?id=202759
<rdar://problem/56122388>

Patch by Antoine Quint <graouts@apple.com> on 2019-10-09
Reviewed by Dean Jackson.

This test would be run after fast/events/touch/ios/touchmove-cancelable-after-touchstart.html which does not
cleanly finish its simulated touch gesture with a touchend. Now that it does both tests can run one after the
other reliably.

* fast/events/touch/ios/touchmove-cancelable-after-touchstart.html:

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

7 months agoresults.webkit.org: Increase default limit for test results
jbedard@apple.com [Wed, 9 Oct 2019 19:57:07 +0000 (19:57 +0000)]
results.webkit.org: Increase default limit for test results
https://bugs.webkit.org/show_bug.cgi?id=202757

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/controller/suite_controller.py:
(SuiteController): Increase DEFAULT_LIMIT.
* resultsdbpy/resultsdbpy/controller/test_controller.py:
(TestController): Ditto.
* resultsdbpy/resultsdbpy/view/static/js/commit.js:
(_CommitBank.prototype._load): Make commit shards larger.
* resultsdbpy/resultsdbpy/view/static/js/drawer.js: Increase default slider size.
* resultsdbpy/resultsdbpy/view/templates/commits.html: Keep smaller slider size.

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

7 months ago[MSE][GStreamer] Fix video sometimes not appearing
aboya@igalia.com [Wed, 9 Oct 2019 19:40:05 +0000 (19:40 +0000)]
[MSE][GStreamer] Fix video sometimes not appearing
https://bugs.webkit.org/show_bug.cgi?id=201401

Reviewed by Xabier Rodriguez-Calvar.

LayoutTests/imported/w3c:

Added a test that reproduces the sequence of operations that was
causing the video to not appear in WebKitGTK and checks that this time
there is visible output.

* web-platform-tests/lint.whitelist:
* web-platform-tests/media-source/mediasource-video-is-visible-expected.html: Added.
* web-platform-tests/media-source/mediasource-video-is-visible.html: Added.
* web-platform-tests/media-source/mp4/test-a-1s.mp4: Added.
* web-platform-tests/media-source/mp4/test-a-1s.mp4-manifest.json: Added.
* web-platform-tests/media-source/mp4/test-v-1s-blue.mp4: Added.
* web-platform-tests/media-source/mp4/test-v-1s-blue.mp4-manifest.json: Added.
* web-platform-tests/media-source/webm/test-a-1s.webm: Added.
* web-platform-tests/media-source/webm/test-a-1s.webm-manifest.json: Added.
* web-platform-tests/media-source/webm/test-v-1s-blue.webm: Added.
* web-platform-tests/media-source/webm/test-v-1s-blue.webm-manifest.json: Added.

Source/WebCore:

The code in MediaPlayerPrivateGStreamer::changePipelineState() was
supposed to call `ensureGLVideoSinkContext()` on upwards transitions
to PAUSED but the code did not take into account non-step-by-step
state transitions, which happens frequently with playbin3 in the MSE
case.

Before the patch, when playbin3 transitioned from READY to PLAYING
without stopping for preroll this call would not be made and the
texture IDs received at the sink would not correspond to the
compositor GL context, leading to artifacts (often the player controls
or a blank screen).

Test: imported/w3c/web-platform-tests/media-source/mediasource-video-is-visible.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):

LayoutTests:

Added an exact expectation picture to avoid errors in the test runner
(only a fuzzy match is expected, and different platforms render video
with slightly different colors).

* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-video-is-visible-expected.html: Added.
* platform/mac/TestExpectations:

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