WebKit-https.git
9 months agoUnreviewed, silence -Wpragmas warning
mcatanzaro@igalia.com [Thu, 20 Dec 2018 04:26:57 +0000 (04:26 +0000)]
Unreviewed, silence -Wpragmas warning

* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:

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

9 months agoUpdate test262 tests.
keith_miller@apple.com [Thu, 20 Dec 2018 04:17:37 +0000 (04:17 +0000)]
Update test262 tests.
https://bugs.webkit.org/show_bug.cgi?id=192907

Rubber stamped by Mark Lam.

* test262/*: Omitted because prepare-changelog crashes.

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

9 months ago[WinCairo] Unreviewed test gardening.
ross.kirsling@sony.com [Thu, 20 Dec 2018 04:11:15 +0000 (04:11 +0000)]
[WinCairo] Unreviewed test gardening.

* platform/wincairo/TestExpectations:

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

9 months agoHTTPS Upgrade: Use full sqlite upgrade list
commit-queue@webkit.org [Thu, 20 Dec 2018 04:04:06 +0000 (04:04 +0000)]
HTTPS Upgrade: Use full sqlite upgrade list
https://bugs.webkit.org/show_bug.cgi?id=192736
<rdar://problem/45851427>

Patch by Vivek Seth <v_seth@apple.com> on 2018-12-19
Reviewed by Chris Dumez.

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: Added.
(WebKit::NetworkHTTPSUpgradeCheckerDatabasePath):
(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::query):
(WebKit::NetworkHTTPSUpgradeChecker::isAlwaysOnLoggingAllowed const):
* NetworkProcess/NetworkHTTPSUpgradeChecker.h: Added.
(WebKit::NetworkHTTPSUpgradeChecker::didSetupCompleteSuccessfully const):
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkRequest):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:

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

9 months agoWeb Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
drousso@apple.com [Thu, 20 Dec 2018 04:00:01 +0000 (04:00 +0000)]
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
https://bugs.webkit.org/show_bug.cgi?id=192783

Reviewed by Joseph Pecoraro.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
(WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):

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

9 months agoWeb Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves...
drousso@apple.com [Thu, 20 Dec 2018 03:57:10 +0000 (03:57 +0000)]
Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
https://bugs.webkit.org/show_bug.cgi?id=192773
<rdar://problem/46782446>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype._recordSelected):
The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
ensure that the selected record is within the filtered range, use `frameIndex` instead.
The associated `WI.TimelineRuler` will already be using an index-based approach for
selection, so this will match.

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

9 months agoWeb Inspector: Canvas: the recording auto-capture input shouldn't start focused
drousso@apple.com [Thu, 20 Dec 2018 03:56:27 +0000 (03:56 +0000)]
Web Inspector: Canvas: the recording auto-capture input shouldn't start focused
https://bugs.webkit.org/show_bug.cgi?id=192454

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
(WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):

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

9 months agoLeak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKi...
jer.noble@apple.com [Thu, 20 Dec 2018 03:24:28 +0000 (03:24 +0000)]
Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
https://bugs.webkit.org/show_bug.cgi?id=192896
<rdar://46732186>

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::initCallback):

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

9 months agoRefresh usrsctplib to M72
youenn@apple.com [Thu, 20 Dec 2018 01:45:29 +0000 (01:45 +0000)]
Refresh usrsctplib to M72
https://bugs.webkit.org/show_bug.cgi?id=192863

Reviewed by Alex Christensen.

* Source/third_party/usrsctp/: Resynced to Chrome M72 branch.

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

9 months ago<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
benjamin@webkit.org [Thu, 20 Dec 2018 01:41:35 +0000 (01:41 +0000)]
<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
https://bugs.webkit.org/show_bug.cgi?id=192821

Reviewed by Chris Dumez.

Source/WebKitLegacy/mac:

When a window becomes occluded, the window server informs the application.
This should be used to suspend any work that is not visible by the user.

WebKit2 handles it just fine, but WebKit1 did not handle the notification.
In some cases, that lead to performance impact (see radar).

This patch adds an observer for the occlusion notification. I tried to stick
with the same names used by WebKit2.

* WebView/WebView.mm:
(-[WebView _isViewVisible]):
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _windowDidChangeOcclusionState:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):

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

9 months ago[GTK][WPE] Unreviewed test gardening.
aboya@igalia.com [Thu, 20 Dec 2018 01:40:11 +0000 (01:40 +0000)]
[GTK][WPE] Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=192904

* platform/gtk/TestExpectations:
* platform/gtk/animations/lineheight-animation-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt.
* platform/gtk/animations/simultaneous-start-transform-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt.
* platform/gtk/animations/width-using-ems-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt.
* platform/gtk/css1/font_properties/font-expected.txt:
* platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-00-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-06-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt:
* platform/gtk/fast/inline/inline-content-with-image-simple-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/eventsource/format-mime-bogus-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/lineheight-animation-expected.txt: Added.
* platform/gtk/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt.
* platform/gtk/legacy-animation-engine/animations/width-using-ems-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt.
* platform/wpe/TestExpectations:
* platform/wpe/css1/font_properties/font-expected.txt:
* platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-00-b-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-06-b-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt:
* platform/wpe/fast/inline/inline-content-with-image-simple-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/eventsource/format-mime-bogus-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt:
* platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt:
* platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt:

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

9 months agoRefresh libyuv to M72
youenn@apple.com [Thu, 20 Dec 2018 01:37:30 +0000 (01:37 +0000)]
Refresh libyuv to M72
https://bugs.webkit.org/show_bug.cgi?id=192864

Reviewed by Alex Christensen.

* Source/third_party/libyuv: Resynced.

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

9 months agoREGRESSION (r232991): Switching to dark mode in Mail does not update the message...
timothy@apple.com [Thu, 20 Dec 2018 01:28:06 +0000 (01:28 +0000)]
REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
https://bugs.webkit.org/show_bug.cgi?id=188891
rdar://problem/42344352

Reviewed by Simon Fraser.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
Don't return early when m_layerForOverhangAreas is null to avoid skipping
setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().

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

9 months agoWeb Inspector: Styles: shift-clicking a color-swatch to change formats starts editing...
nvasilyev@apple.com [Thu, 20 Dec 2018 01:22:39 +0000 (01:22 +0000)]
Web Inspector: Styles: shift-clicking a color-swatch to change formats starts editing the color
https://bugs.webkit.org/show_bug.cgi?id=192784
<rdar://problem/46801028>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):

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

9 months agoUse delegate instead of drawingDelegate in WKDrawingView
timothy_horton@apple.com [Thu, 20 Dec 2018 01:09:57 +0000 (01:09 +0000)]
Use delegate instead of drawingDelegate in WKDrawingView
https://bugs.webkit.org/show_bug.cgi?id=192899
<rdar://problem/46733339>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
Do the dance.

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

9 months ago[WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
justin_fan@apple.com [Thu, 20 Dec 2018 00:59:13 +0000 (00:59 +0000)]
[WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
https://bugs.webkit.org/show_bug.cgi?id=192843
<rdar://problem/46820395>

Reviewed by Myles Maxfield.

Source/WebCore:

Test: webgpu/pipeline-layouts.html

Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
* Modules/webgpu/WebGPUBindGroupLayout.cpp:
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h:
(WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createPipelineLayout const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
* Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
(WebCore::WebGPUPipelineLayout::create):
(WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
* Modules/webgpu/WebGPUPipelineLayout.h: Added.
* Modules/webgpu/WebGPUPipelineLayout.idl: Added.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createPipelineLayout const): Added.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
(WebCore::GPUPipelineLayout::create):
(WebCore::GPUPipelineLayout::GPUPipelineLayout):
* platform/graphics/gpu/GPUPipelineLayout.h: Added.
* platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.

Add files and symbols to project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Add missing include:
* Modules/webgpu/WebGPUQueue.h:

LayoutTests:

Update bind-group-layouts and rename to match new PipelineLayout functionality.

* webgpu/bind-group-layouts-expected.txt: Removed.
* webgpu/pipeline-layouts-expected.txt: Added.
* webgpu/pipeline-layouts.html: Renamed from LayoutTests/webgpu/bind-group-layouts.html.

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

9 months agoNavigations away from the SafeBrowsing interstitial show a flash of old content
achristensen@apple.com [Thu, 20 Dec 2018 00:55:10 +0000 (00:55 +0000)]
Navigations away from the SafeBrowsing interstitial show a flash of old content
https://bugs.webkit.org/show_bug.cgi?id=192676

Reviewed by Chris Dumez.

Source/WebKit:

When a user clicks through a safe browsing warning, do not remove the warning until content is drawn for the destination.
Otherwise, the user will confusingly see the page before the warning while the navigation happens.
We can only do this for warnings caused by main frame navigations, though.  Other warnings (such as those caused by iframes)
need to be cleared immediately, and we still need to clear the warning immediately if the user has said to go back.

This change is reflected in an updated API test.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
* UIProcess/Cocoa/WKSafeBrowsingWarning.h:
* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(-[WKSafeBrowsingWarning forMainFrameNavigation]):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showSafeBrowsingWarning):
(WebKit::WebViewImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):
* UIProcess/PageClient.h:
(WebKit::PageClient::clearSafeBrowsingWarningIfForMainFrameNavigation):
* UIProcess/SafeBrowsingWarning.h:
(WebKit::SafeBrowsingWarning::create):
(WebKit::SafeBrowsingWarning::forMainFrameNavigation const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReachLayoutMilestone):
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(safeBrowsingView):
(TEST):
(-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Deleted.

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

9 months agoREGRESSION: [ iOS Sim ] Layout Test imported/w3c/web-platform-tests/service-workers...
ryanhaddad@apple.com [Thu, 20 Dec 2018 00:54:10 +0000 (00:54 +0000)]
REGRESSION: [ iOS Sim ] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-missing-import-scripts.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=192250

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

9 months agoREGRESSION: imported/w3c/web-platform-tests/service-workers/service-worker/register...
ryanhaddad@apple.com [Thu, 20 Dec 2018 00:54:09 +0000 (00:54 +0000)]
REGRESSION: imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html is very flaky on iOS
https://bugs.webkit.org/show_bug.cgi?id=192279

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

9 months agoWeb Inspector: Elements tab: arrow key after undoing a DOM node delete selects the...
mattbaker@apple.com [Thu, 20 Dec 2018 00:46:10 +0000 (00:46 +0000)]
Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
https://bugs.webkit.org/show_bug.cgi?id=192871
<rdar://problem/46849060>

Reviewed by Devin Rousso.

Undoing a DOM node removal reinserts the node into the DOMTreeOutline.
When the reinserted node precedes the selected node in the tree, the
SelectionController should update `_lastSelectedIndex`.

* UserInterface/Controllers/SelectionController.js:
(WI.SelectionController.prototype.didInsertItem):

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

9 months agoWeb Inspector: Audit: provide localization support for % pass display
drousso@apple.com [Thu, 20 Dec 2018 00:31:27 +0000 (00:31 +0000)]
Web Inspector: Audit: provide localization support for % pass display
https://bugs.webkit.org/show_bug.cgi?id=192870
<rdar://problem/46779245>

Reviewed by Brian Burg.

* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.initialLayout):
(WI.AuditTestGroupContentView.prototype.layout):
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header > .percentage-pass):
(.content-view.audit-test-group > header > .percentage-pass > span): Added.
(@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added.
(@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added.
(.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted.

* Localizations/en.lproj/localizedStrings.js:

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

9 months agoSVGUseElement::findTarget should return nullptr when there is a cycle
rniwa@webkit.org [Wed, 19 Dec 2018 23:51:03 +0000 (23:51 +0000)]
SVGUseElement::findTarget should return nullptr when there is a cycle
https://bugs.webkit.org/show_bug.cgi?id=192840

Reviewed by Tim Horton.

r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
the SVG use element itself had a corresponding element.

No new tests since there should be no behavioral change.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateShadowTree):
(WebCore::SVGUseElement::findTarget const):

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

9 months ago[GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
aperez@igalia.com [Wed, 19 Dec 2018 23:44:48 +0000 (23:44 +0000)]
[GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
https://bugs.webkit.org/show_bug.cgi?id=192855

Reviewed by Michael Catanzaro.

* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::notifyDone): Use the WPE implementation.
(WTR::TestController::platformRunUntil): Use the WPE implementation.
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil): Honor the condition flag.

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

9 months agoUI process crash when focusing an editable image
timothy_horton@apple.com [Wed, 19 Dec 2018 23:37:02 +0000 (23:37 +0000)]
UI process crash when focusing an editable image
https://bugs.webkit.org/show_bug.cgi?id=192839
<rdar://problem/46786670>

Reviewed by Wenson Hsieh.

Source/WebKit:

* SourcesCocoa.txt:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _installInkPickerForDrawingViewWithID:]):
(-[WKContentView _uninstallInkPicker]):
* UIProcess/ios/WKInkPickerView.h: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.h.
* UIProcess/ios/WKInkPickerView.mm: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.mm.
(-[WKInkPickerView initWithDrawingView:]):
(-[WKInkPickerView didPickInk]):
(-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
(-[WKInkPickerView inlineInkPicker:didSelectTool:]):
(-[WKInkPickerView inlineInkPicker:didSelectColor:]):
(-[WKInkPickerView inkPickerSize]):
(-[WKInkPickerView layoutSubviews]):
(-[WKInkPickerView sizeThatFits:]):
(-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
* WebKit.xcodeproj/project.pbxproj:
Make WKInkPickerView a WKWebView subview instead of an inputView.
Also, don't force the keyboard to be visible when an editable image is focused.

LayoutTests:

* editing/images/basic-editable-image-with-gesture.html: Added.
* editing/images/basic-editable-image-with-gesture-expected.txt: Added.
* resources/ui-helper.js:
(window.UIHelper.stylusTapAt.return.new.Promise):
(window.UIHelper.stylusTapAt):
Add a test that ensures that adding an editable image from a gesture
doesn't crash, and can be drawn on.

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

9 months agoWeb Inspector: Computed: make UI more usable when the panel is narrow
nvasilyev@apple.com [Wed, 19 Dec 2018 23:28:58 +0000 (23:28 +0000)]
Web Inspector: Computed: make UI more usable when the panel is narrow
https://bugs.webkit.org/show_bug.cgi?id=192578
<rdar://problem/46615753>

Reviewed by Devin Rousso.

* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item .property-traces):
(.computed-style-section .computed-property-item.expanded .disclosure-button):
(.computed-style-section .computed-property-item .property-trace-item):
(.computed-style-section .computed-property-item .property-trace-item::before):
(.computed-style-section .computed-property-item .property):
(.computed-style-section .computed-property-item .property-trace-item .selector):
Allow CSS property values and selectors to take more than one line.

(.computed-style-section .property-trace-item .property .name,):
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection.prototype._createTrace):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.update):

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

9 months ago[WHLSL] Add a handwritten lexer
mmaxfield@apple.com [Wed, 19 Dec 2018 23:27:45 +0000 (23:27 +0000)]
[WHLSL] Add a handwritten lexer
https://bugs.webkit.org/show_bug.cgi?id=192294

Reviewed by Jon Lee.

This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
implementation matches the lexing rules in the spec (specifically, the rules that start
with an uppercase letter). The spec is at
https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.

This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.

No new tests because the lexer isn't hooked up yet; there are tests in the parser,
once that gets committed.

* Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
(WebCore::WHLSL::Lexer::Token::typeName):
(WebCore::WHLSL::Lexer::recognizeKeyword):
(WebCore::WHLSL::Lexer::consumeTokenFromStream):
(WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
(WebCore::WHLSL::isWhitespace):
(WebCore::WHLSL::isNewline):
(WebCore::WHLSL::Lexer::skipWhitespace):
(WebCore::WHLSL::Lexer::skipLineComment):
(WebCore::WHLSL::Lexer::skipLongComment):
(WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
(WebCore::WHLSL::Lexer::decimalIntLiteral const):
(WebCore::WHLSL::Lexer::decimalUintLiteral const):
(WebCore::WHLSL::isHexadecimalCharacter):
(WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
(WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
(WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
(WebCore::WHLSL::Lexer::intLiteral const):
(WebCore::WHLSL::Lexer::uintLiteral const):
(WebCore::WHLSL::Lexer::digit const):
(WebCore::WHLSL::Lexer::digitStar const):
(WebCore::WHLSL::Lexer::character const):
(WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
(WebCore::WHLSL::Lexer::coreFloatLiteral const):
(WebCore::WHLSL::Lexer::floatLiteral const):
(WebCore::WHLSL::Lexer::validIdentifier const):
(WebCore::WHLSL::Lexer::identifier const):
(WebCore::WHLSL::Lexer::operatorName const):
* Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::unconsumeToken):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::isFullyConsumed const):
(WebCore::WHLSL::Lexer::errorString):
(WebCore::WHLSL::Lexer::string const):
(WebCore::WHLSL::Lexer::anyCharacter const):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

9 months agoWeb Inspector: Timelines: correctly label Intersection Observer callbacks
simon.fraser@apple.com [Wed, 19 Dec 2018 23:17:31 +0000 (23:17 +0000)]
Web Inspector: Timelines: correctly label Intersection Observer callbacks
https://bugs.webkit.org/show_bug.cgi?id=192669
<rdar://problem/46702490>

Reviewed by Joseph Pecoraro.

Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
to Intersection Observer, Performance Observer and Mutation Observer callbacks so
that they get correctly labeled in the Inspector timeline.

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:

Source/WebCore:

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliver):
* en.lproj/Localizable.strings:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
(WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willFireObserverCallback):
(WebCore::InspectorInstrumentation::didFireObserverCallback):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createObserverCallbackData):
* inspector/TimelineRecordFactory.h:
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willFireObserverCallback):
(WebCore::InspectorTimelineAgent::didFireObserverCallback):
(WebCore::toProtocol):
* inspector/agents/InspectorTimelineAgent.h:
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::notify):
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::deliver):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.iconClassNameForRecord):

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

9 months agoResync libwebrtc with M72 branch
youenn@apple.com [Wed, 19 Dec 2018 22:45:12 +0000 (22:45 +0000)]
Resync libwebrtc with M72 branch
https://bugs.webkit.org/show_bug.cgi?id=192858

Reviewed by Eric Carlson.

Merge changes made upstream.
Some of these changes improve support of unified plan and backward compatiblity.

* Source/webrtc/api/candidate.cc:
* Source/webrtc/api/candidate.h:
* Source/webrtc/api/rtpreceiverinterface.h:
* Source/webrtc/api/umametrics.h:
* Source/webrtc/media/engine/webrtcvideoengine.cc:
* Source/webrtc/media/engine/webrtcvideoengine_unittest.cc:
* Source/webrtc/modules/audio_processing/agc2/agc2_common.h:
* Source/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc:
* Source/webrtc/modules/video_coding/BUILD.gn:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_config.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator.h:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9.cc:
* Source/webrtc/modules/video_coding/video_codec_initializer.cc:
* Source/webrtc/modules/video_coding/video_codec_initializer_unittest.cc:
* Source/webrtc/p2p/base/p2ptransportchannel_unittest.cc:
* Source/webrtc/p2p/base/port.cc:
* Source/webrtc/p2p/base/port.h:
* Source/webrtc/p2p/base/portallocator.cc:
* Source/webrtc/p2p/client/basicportallocator.cc:
* Source/webrtc/p2p/client/basicportallocator_unittest.cc:
* Source/webrtc/pc/peerconnection.cc:
* Source/webrtc/pc/peerconnection.h:
* Source/webrtc/pc/peerconnection_integrationtest.cc:
* Source/webrtc/pc/peerconnectioninternal.h:
* Source/webrtc/pc/statscollector.cc:
* Source/webrtc/pc/statscollector.h:
* Source/webrtc/pc/test/fakepeerconnectionbase.h:
* Source/webrtc/pc/test/fakepeerconnectionforstats.h:
* Source/webrtc/pc/test/mockpeerconnectionobservers.h:
(webrtc::MockStatsObserver::OnComplete):
(webrtc::MockStatsObserver::TrackIds const):
* Source/webrtc/pc/webrtcsdp_unittest.cc:
* Source/webrtc/rtc_base/fake_mdns_responder.h:
(webrtc::FakeMdnsResponder::GetMappedAddressForName const):
* Source/webrtc/rtc_base/fakenetwork.h:
(rtc::FakeNetworkManager::CreateMdnsResponder):
(rtc::FakeNetworkManager::GetMdnsResponderForTesting const):
* Source/webrtc/video/video_send_stream_impl.cc:
* Source/webrtc/video/video_stream_encoder.cc:

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

9 months agoContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int...
csaavedra@igalia.com [Wed, 19 Dec 2018 22:24:04 +0000 (22:24 +0000)]
ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
https://bugs.webkit.org/show_bug.cgi?id=192854

Reviewed by Alex Christensen.

* contentextensions/DFANode.h: Define CharRange's chars as signed

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

9 months agoWeb Inspector: Audit: "Clear Filters" button gets clipped when window is vertically...
drousso@apple.com [Wed, 19 Dec 2018 22:09:22 +0000 (22:09 +0000)]
Web Inspector: Audit: "Clear Filters" button gets clipped when window is vertically small
https://bugs.webkit.org/show_bug.cgi?id=192868
<rdar://problem/46780400>

Reviewed by Matt Baker.

* UserInterface/Views/Main.css:
(.message-text-view):

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

9 months agoJSPropertyNameEnumerator should cache the iterated object's structure only after...
mark.lam@apple.com [Wed, 19 Dec 2018 22:00:43 +0000 (22:00 +0000)]
JSPropertyNameEnumerator should cache the iterated object's structure only after getting its property names.
https://bugs.webkit.org/show_bug.cgi?id=192464
<rdar://problem/46519455>

Reviewed by Saam Barati.

JSTests:

This patch is about a 10% speed up on the new for-in-on-object-with-lazily-materialized-properties.js
microbenchmark.

* microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js: Added.
* stress/property-name-enumerator-should-cache-structure-after-getting-property-names.js: Added.

Source/JavaScriptCore:

This is because the process of getting its property names may cause some lazy
properties to be reified, and the structure will change.  This is needed in order
for get_direct_pname to work correctly.

* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):

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

9 months agoRemove RTCRtpTransceiver.setDirection
youenn@apple.com [Wed, 19 Dec 2018 22:00:22 +0000 (22:00 +0000)]
Remove RTCRtpTransceiver.setDirection
https://bugs.webkit.org/show_bug.cgi?id=192869

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/historical-expected.txt:

Source/WebCore:

Covered by rebased test.

* Modules/mediastream/RTCRtpTransceiver.idl:

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

9 months ago[ MacOS iOS ] Layout Test webrtc/no-port-zero-in-upd-candidates.html is flaky timeout
youenn@apple.com [Wed, 19 Dec 2018 22:00:16 +0000 (22:00 +0000)]
[ MacOS iOS ] Layout Test webrtc/no-port-zero-in-upd-candidates.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=192866

Reviewed by Alex Christensen.

* webrtc/no-port-zero-in-upd-candidates.html:
Add some more logging in the test in case of time out.

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

9 months ago[MediaStream] Force system camera/microphone TCC prompt if necessary
eric.carlson@apple.com [Wed, 19 Dec 2018 21:25:29 +0000 (21:25 +0000)]
[MediaStream] Force system camera/microphone TCC prompt if necessary
https://bugs.webkit.org/show_bug.cgi?id=192820
<rdar://problem/42680098>

Reviewed by Jer Noble.

Source/WebKit:

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Enable TCC check
and prompt on Mojave.

Source/WTF:

* wtf/Platform.h: Define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE.

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

9 months agoForce synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
jer.noble@apple.com [Wed, 19 Dec 2018 21:11:12 +0000 (21:11 +0000)]
Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
https://bugs.webkit.org/show_bug.cgi?id=192856
<rdar://problem/46843245>

Reviewed by Alex Christensen.

Some decoders exposed through VideoToolbox will decode asynchronously even when
kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.

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

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

9 months agoWeb Inspector: Dark Mode: selected text is too light when Inspector window is inactive
nvasilyev@apple.com [Wed, 19 Dec 2018 21:09:43 +0000 (21:09 +0000)]
Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive
https://bugs.webkit.org/show_bug.cgi?id=190542
<rdar://problem/45238712>

Reviewed by Devin Rousso.

* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-selected):

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

9 months agoWeb Inspector: column sort controls in Layers tab sidebar don't render correctly...
nvasilyev@apple.com [Wed, 19 Dec 2018 21:08:53 +0000 (21:08 +0000)]
Web Inspector: column sort controls in Layers tab sidebar don't render correctly in dark mode
https://bugs.webkit.org/show_bug.cgi?id=192845

Reviewed by Devin Rousso.

* UserInterface/Views/DataGrid.css:
(@media (prefers-dark-interface)):
(.data-grid th.sortable:active):
Drive-by: replace obnoxiously light background of the pressed header with a more subtle gray.
(.data-grid th.sort-ascending > div:first-child::after, .data-grid th.sort-descending > div:first-child::after):
Invert colors of the arrow glyph.

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

9 months agoAllow clients to set the navigator platform
megan_gardner@apple.com [Wed, 19 Dec 2018 20:21:31 +0000 (20:21 +0000)]
Allow clients to set the navigator platform
https://bugs.webkit.org/show_bug.cgi?id=192735

Reviewed by Tim Horton.

Source/WebCore:

Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.

Lots of piping to allow the setting of a custom navigator platform.

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setCustomNavigatorPlatform):
(WebCore::DocumentLoader::customNavigatorPlatform const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::navigatorPlatform const):
* loader/FrameLoader.h:
* page/Navigator.cpp:
(WebCore::Navigator::platform const):
* page/Navigator.h:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform const):
(WebCore::NavigatorBase::platform): Deleted.
* page/NavigatorBase.h:

Source/WebKit:

Add private API to allow clients to override the default navigator
platform. Some websites check for the platform, which
interfears with our request desktop site feature. This should
help more sites function as expected.

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

Source/WebKitLegacy/mac:

Add stubs to fill out the added functionality in FrameLoaderClient.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::navigatorPlatform):

Tools:

Add a test for setting a custom navigator platform.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomNavigatorPlatformDelegate webView:didFinishNavigation:]):

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

9 months ago[GTK] Cannot build with CMake <3.7
aperez@igalia.com [Wed, 19 Dec 2018 19:58:21 +0000 (19:58 +0000)]
[GTK] Cannot build with CMake <3.7
https://bugs.webkit.org/show_bug.cgi?id=192865

Reviewed by Michael Catanzaro.

* Source/cmake/OptionsGTK.cmake: Convert usage of VERSION_GREATER_EQUAL to a
combination of VERSION_GREATER + STREQUAL.

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

9 months agoREGRESSION (r234940): [ MacOS ] Layout Test imported/w3c/web-platform-tests/media...
ryanhaddad@apple.com [Wed, 19 Dec 2018 19:26:24 +0000 (19:26 +0000)]
REGRESSION (r234940): [ MacOS ] Layout Test imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190976

Unreviewed test gardening.

* platform/mac/TestExpectations: Mark test as flaky.

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

9 months agoUnreviewed, rolling out r239347.
ryanhaddad@apple.com [Wed, 19 Dec 2018 19:11:06 +0000 (19:11 +0000)]
Unreviewed, rolling out r239347.

Caused the leaks bot to hit an exception and the new test
crashes on certain configurations.

Reverted changeset:

"Synchronous media query evaluation could destroy current
Frame/FrameView."
https://bugs.webkit.org/show_bug.cgi?id=192781
https://trac.webkit.org/changeset/239347

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

9 months agoUnreviewed, rolling out r239358.
tsavell@apple.com [Wed, 19 Dec 2018 18:57:09 +0000 (18:57 +0000)]
Unreviewed, rolling out r239358.

Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
crash on Debug bots

Reverted changeset:

"Clean up IndexedDB files between tests"
https://bugs.webkit.org/show_bug.cgi?id=192796
https://trac.webkit.org/changeset/239358

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

9 months agoSync some include directories in WebCore
don.olmstead@sony.com [Wed, 19 Dec 2018 18:23:36 +0000 (18:23 +0000)]
Sync some include directories in WebCore
https://bugs.webkit.org/show_bug.cgi?id=192819

Reviewed by Michael Catanzaro.

Added missing include directories around features that have only been enabled on
Apple ports. Removes obsolete directories from list and moves harfbuzz directories
into the freetype cmake file.

* CMakeLists.txt:
* platform/FreeType.cmake:

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

9 months agoFix build on 64bit ARM with arm64 SYSTEM_PROCESSOR
commit-queue@webkit.org [Wed, 19 Dec 2018 15:37:50 +0000 (15:37 +0000)]
Fix build on 64bit ARM with arm64 SYSTEM_PROCESSOR
https://bugs.webkit.org/show_bug.cgi?id=192497

Patch by Lucas Stach <l.stach@pengutronix.de> on 2018-12-19
Reviewed by Philippe Normand.

Android and some embedded Linux build systems use arm64 instead of
aarch64 as the CMAKE_HOST_PROCESSOR. Fix the JIT build for this scenario.

* CMakeLists.txt:

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

9 months ago[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
ticaiolima@gmail.com [Wed, 19 Dec 2018 12:12:37 +0000 (12:12 +0000)]
[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
https://bugs.webkit.org/show_bug.cgi?id=192723

Reviewed by Saam Barati.

PerformanceTests:

* BigIntBench/big-int-cse.js: Added.
* BigIntBench/big-int-global-cse.js: Added.
* BigIntBench/big-int-licm.js: Added.

Source/JavaScriptCore:

This patch is adjusting clobberize rules into ValueOp nodes to enable
more optimizations when we speculate BigIntUse. In such case, DFG now
is able to apply CSE, LICM and commutativity on nodes like
ValueAdd(BigInt, BigInt), ValueSub(BigInt, BigInt), etc.

Here are the numbers we can observe with some microbenchmarks:

                          baseline                 changes

big-int-cse           108.2733+-0.8445    ^    80.9897+-4.9781   ^ definitely 1.3369x faster
big-int-licm          75.6641+-0.3477     ^    57.8144+-1.6043   ^ definitely 1.3087x faster
big-int-global-cse    145.3557+-1.0552    ^    86.5866+-0.3025   ^ definitely 1.6787x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

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

9 months ago[MSE] Remove unused method: stopAskingForMoreSamples()
aboya@igalia.com [Wed, 19 Dec 2018 11:37:39 +0000 (11:37 +0000)]
[MSE] Remove unused method: stopAskingForMoreSamples()
https://bugs.webkit.org/show_bug.cgi?id=192754

Reviewed by Xabier Rodriguez-Calvar.

The stopAskingForMoreSamples() method from SourceBufferPrivate is not
being used by anyone. SourceBuffer is not calling it and no
SourceBufferPrivate is implementing it. Let's remove that noise.

* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::setActive):
(WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:

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

9 months agoString overflow in JSC::createError results in ASSERT in WTF::makeString
tzagallo@apple.com [Wed, 19 Dec 2018 11:33:12 +0000 (11:33 +0000)]
String overflow in JSC::createError results in ASSERT in WTF::makeString
https://bugs.webkit.org/show_bug.cgi?id=192833
<rdar://problem/45706868>

Reviewed by Mark Lam.

JSTests:

* stress/string-overflow-createError.js: Added.

Source/JavaScriptCore:

JSC::createError was calling WTF::makeString which would result in an
assertion failure when the string was too big. Change it to call
WTF::tryMakeString instead and return an OutOfMemory error if we fail
to create the error string.

* runtime/ExceptionHelpers.cpp:
(JSC::createError):

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

9 months ago[MSE] Remove dead code: sourceBufferPrivateSeekToTime()
aboya@igalia.com [Wed, 19 Dec 2018 11:20:16 +0000 (11:20 +0000)]
[MSE] Remove dead code: sourceBufferPrivateSeekToTime()
https://bugs.webkit.org/show_bug.cgi?id=192827

Reviewed by Xabier Rodriguez-Calvar.

This patch makes two dead code removal changes in
SourceBufferPrivateClient:

First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
is only inherited by SourceBuffer, it makes no sense to have default
implementations there (they will never be used), moreso it being a
client interface.

Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
to had an empty implementation, which SourceBuffer did not overwrite,
therefore making any calls to it useless.

All calls to sourceBufferPrivateSeekToTime() have been removed:

SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
itself, used to call this method. This patch deletes it completely.

MockSourceBufferPrivate::seekToTime(), which only called this empty
method, has also been removed along with its only usage in
MockMediaSourcePrivate::seekToTime().

* platform/graphics/SourceBufferPrivateClient.h:
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::seekToTime):
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
* platform/mock/mediasource/MockSourceBufferPrivate.h:

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

9 months ago[EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should...
calvaris@igalia.com [Wed, 19 Dec 2018 08:55:54 +0000 (08:55 +0000)]
[EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
https://bugs.webkit.org/show_bug.cgi?id=192815

Reviewed by Jer Noble.

https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
says that distinctiveIdentifier and persistentState default to
optional. Our implementation does not define a default leaving it
to the first option of the enum, which currently is Required.

* platform/encryptedmedia/CDMKeySystemConfiguration.h:

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

9 months agoMerge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
commit-queue@webkit.org [Wed, 19 Dec 2018 08:00:27 +0000 (08:00 +0000)]
Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

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

Prefer return value to out parameter for parseAccessControlAllowList.

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

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

9 months agoREGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
zandobersek@gmail.com [Wed, 19 Dec 2018 07:41:19 +0000 (07:41 +0000)]
REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
https://bugs.webkit.org/show_bug.cgi?id=192230

Reviewed by Carlos Garcia Campos.

Single tile can after r235165 be assigned multiple content updates
without a commit occurring between each update, whereas before these
commits were done for each update.

To avoid repeating updates for a single tile purging information about
the previous update, these updates are now accumulated inside a Vector
and then iterated over during the commit phase.

* platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::addUpdate):
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
(WebCore::CoordinatedBackingStore::updateTile):
(WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
(WebCore::CoordinatedBackingStoreTile::scale const):

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

9 months agoError message for `-x ** y` contains a typo.
ross.kirsling@sony.com [Wed, 19 Dec 2018 06:37:46 +0000 (06:37 +0000)]
Error message for `-x ** y` contains a typo.
https://bugs.webkit.org/show_bug.cgi?id=192832

Reviewed by Saam Barati.

JSTests:

* ChakraCore/test/UnitTestFramework/UnitTestFramework.js:
(assert.assert.return.throws):
* stress/pow-expects-update-expression-on-lhs.js:
(throw.new.Error):
Update test expectations which match against the exact error message.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseBinaryExpression):
Make corrections to error message: "amiguous" -> "ambiguous", "parenthesis" -> "parentheses"

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

9 months ago[iOS] A copied text selection is pasted as a web archive attachment in the entry...
wenson_hsieh@apple.com [Wed, 19 Dec 2018 06:10:28 +0000 (06:10 +0000)]
[iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
https://bugs.webkit.org/show_bug.cgi?id=192842
<rdar://problem/46823586>

Reviewed by Tim Horton.

Source/WebCore:

Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
this is internally tracked in <rdar://problem/46830277>.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):

Tools:

Adjusts an existing API test to verify that "com.apple.webarchive" is not one of the types registered to the
item provider when dragging a rich text selection.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

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

9 months agoUnreviewed, add a missing UNUSED_PARAM()
mcatanzaro@igalia.com [Wed, 19 Dec 2018 05:31:11 +0000 (05:31 +0000)]
Unreviewed, add a missing UNUSED_PARAM()

* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::getPrivateImpl):

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

9 months agoREGRESSION(r239134) iOS safe browsing warning unable to show details
achristensen@apple.com [Wed, 19 Dec 2018 05:01:04 +0000 (05:01 +0000)]
REGRESSION(r239134) iOS safe browsing warning unable to show details
https://bugs.webkit.org/show_bug.cgi?id=192837

Reviewed by Tim Horton.

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(-[WKSafeBrowsingWarning addContent]):
I had a fragile design that relied on the internal view heirarchy structure of UIScrollView,
which I changed in r239134 by introducing a layout which changed where its scrollbars were in the view heirarchy.
I now have a more robust design that saves a WeakObjCPtr to the view I need to traverse to.
Testing is problematic because this had to do with scrollbars and UIScrollView internals which seem to behave
differently in TestWebKitAPI, but I verified manually that this fixes the issue.

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

9 months ago[Win][Clang] Fix compilation warnings under Source/WebKit directory
Hironori.Fujii@sony.com [Wed, 19 Dec 2018 04:35:34 +0000 (04:35 +0000)]
[Win][Clang] Fix compilation warnings under Source/WebKit directory
https://bugs.webkit.org/show_bug.cgi?id=192695

Reviewed by Alex Christensen.

* NetworkProcess/cache/NetworkCacheData.cpp:
(makeSalt): Enclosed by #if !OS(WINDOWS).
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
(WebKit::NetworkCache::directoryEntryType): Ditto.
* Platform/win/ModuleWin.cpp:
(WebKit::Module::platformFunctionPointer const): Cast a function pointer with reinterpret_cast<void*>().
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
Moved the initializer of m_webPage in order to be encluded by #if PLATFORM(GTK).
* UIProcess/DrawingAreaProxyImpl.h: Ditto.
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::processName): Removed the duplicated 'const' type qualifier.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformAttach): Removed an unused variable.
(WebKit::WebInspectorProxy::platformDetach): Ditto.
* UIProcess/win/WebPopupMenuProxyWin.cpp: Ditto.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::paint): Ditto.
(WebKit::WebPopupMenu::setUpPlatformData): Ditto.
* UIProcess/win/WebPopupMenuProxyWin.h: Marked override methods with 'override'.
* WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h: Ditto.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Removed an unused variable.

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

9 months agoUpdate CSS Properties and Values API to use new cycle fallback behaviour
justin_michaud@apple.com [Wed, 19 Dec 2018 03:21:15 +0000 (03:21 +0000)]
Update CSS Properties and Values API to use new cycle fallback behaviour
https://bugs.webkit.org/show_bug.cgi?id=192800

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Re-import tests and adjust expected results. Some of the tests go from pass to fail because
this patch adds some extra dependency checking to property registrations to fix a crash, but
now unsupported syntaxes like <length-percentage> do not register properly.

* web-platform-tests/css/css-properties-values-api/register-property-expected.txt:
* web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing-expected.txt:
* web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html:
* web-platform-tests/css/css-properties-values-api/register-property.html:
* web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt:
* web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html:
* web-platform-tests/css/css-properties-values-api/registered-property-computation-expected.txt:
* web-platform-tests/css/css-properties-values-api/registered-property-computation.html:
* web-platform-tests/css/css-properties-values-api/registered-property-cssom-expected.txt:
* web-platform-tests/css/css-properties-values-api/registered-property-cssom.html:
* web-platform-tests/css/css-properties-values-api/registered-property-initial-expected.txt:
* web-platform-tests/css/css-properties-values-api/registered-property-initial.html:
* web-platform-tests/css/css-properties-values-api/resources/utils.js: Added.
(generate_name):
(any_initial_value):
(generate_property):
(all_syntaxes):
* web-platform-tests/css/css-properties-values-api/resources/w3c-import.log: Added.
* web-platform-tests/css/css-properties-values-api/self-utils-expected.txt: Added.
* web-platform-tests/css/css-properties-values-api/self-utils.html: Added.
* web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt:
* web-platform-tests/css/css-properties-values-api/typedom.tentative.html:
* web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt:
* web-platform-tests/css/css-properties-values-api/unit-cycles.html:
* web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-cycles.html:
* web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-expected.txt:
* web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html:
* web-platform-tests/css/css-properties-values-api/w3c-import.log:

Source/WebCore:

Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing.

* css/CSSCustomPropertyValue.h:
* css/CSSVariableReferenceValue.cpp:
(WebCore::resolveVariableReference):
* css/DOMCSSRegisterCustomProperty.cpp:
(WebCore::DOMCSSRegisterCustomProperty::registerProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyCascadedCustomProperty):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):

LayoutTests:

* css-custom-properties-api/crash.html:
* css-custom-properties-api/inherits-expected.txt:
* css-custom-properties-api/inherits.html:
* css-custom-properties-api/registerProperty-expected.txt:
* css-custom-properties-api/registerProperty.html:

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

9 months agoUpdate ARM64EHash
sbarati@apple.com [Wed, 19 Dec 2018 02:27:00 +0000 (02:27 +0000)]
Update ARM64EHash
https://bugs.webkit.org/show_bug.cgi?id=192823
<rdar://problem/45468257>

Reviewed by Mark Lam.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::ARM64Assembler):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::AbstractMacroAssembler):
* assembler/AssemblerBuffer.h:
(JSC::ARM64EHash::update):
(JSC::ARM64EHash::finalHash const):
(JSC::AssemblerBuffer::AssemblerBuffer):
(JSC::AssemblerBuffer::putIntegralUnchecked):
(JSC::ARM64EHash::ARM64EHash): Deleted.
(JSC::ARM64EHash::hash const): Deleted.
(JSC::ARM64EHash::randomSeed const): Deleted.
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):

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

9 months ago[macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crash...
wenson_hsieh@apple.com [Wed, 19 Dec 2018 02:11:58 +0000 (02:11 +0000)]
[macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337
https://bugs.webkit.org/show_bug.cgi?id=192836
<rdar://problem/45321184>

Reviewed by Tim Horton.

r239337 exposed a subtle issue in the implementation of `-[WKDataListSuggestionsView updateWithInformation:]`,
wherein we might end up recomputing information for table view cells at rows that no longer exist. This currently
happens because we first set the datalist's `_suggestions`, then change the table view's frame, and then finally
reload the table view; however, in the case where the number of suggestions decreased and the frame changed
(which prompts AppKit to ask us again for table cell views), we'll attempt to access an out-of-bounds index in
the `_suggestions` vector.

To address this, we change our suggestions and immediately reload the table view before updating `NSTableView`'s
frame, so that we only provide table view cells for rows that actually correspond to items in `_suggestions`.

* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsView updateWithInformation:]):

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

9 months ago[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https...
jiewen_tan@apple.com [Wed, 19 Dec 2018 01:25:52 +0000 (01:25 +0000)]
[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 4.

Add some additional temporary logging info to determine if the time out value passed to the timer is right.
Once the bug is determined and fixed, we should remove all logging added in this patch.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::initTimeOutTimer):

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

9 months agoWrong value for key property in keydown and keyup events generated holding Control key
dbates@webkit.org [Wed, 19 Dec 2018 00:23:21 +0000 (00:23 +0000)]
Wrong value for key property in keydown and keyup events generated holding Control key
https://bugs.webkit.org/show_bug.cgi?id=192788
<rdar://problem/46795214>

Reviewed by Wenson Hsieh.

Similar to what we do on Mac, compute the DOM key property from the characters ignoring
modifier keys input string when the Control key is held down.

* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::keyForKeyEvent):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::keyForKeyEvent):

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

9 months agoGardening: test options fix.
mark.lam@apple.com [Wed, 19 Dec 2018 00:02:45 +0000 (00:02 +0000)]
Gardening: test options fix.
https://bugs.webkit.org/show_bug.cgi?id=192822

Unreviewed.

* stress/json-stringify-string-builder-overflow.js:

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

9 months agoREGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky...
david_quesada@apple.com [Tue, 18 Dec 2018 23:59:34 +0000 (23:59 +0000)]
REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=192810
<rdar://problem/46812536>

Reviewed by Alex Christensen.

* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
    After releasing our reference to the web view, wait until the next turn of the runloop
    before checking that the originatingWebView has been zeroed, since the web view might
    still be referenced in the autorelease pool. This _WKDownload unit test isn't about
    testing general memory management of WKWebViews, only that _WKDownload does not retain
    its web view via the 'originatingWebView' property.

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

9 months agoClean up IndexedDB files between tests
sihui_liu@apple.com [Tue, 18 Dec 2018 23:56:23 +0000 (23:56 +0000)]
Clean up IndexedDB files between tests
https://bugs.webkit.org/show_bug.cgi?id=192796

Reviewed by Geoffrey Garen.

Source/WebCore:

We should clean up the IndexedDB files between tests to make sure each test is independent of others.

This patch also fixes some issues in IDB.

Covered by existing tests.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
We should shut down all open databases instead of databases from open database connections before deleting
files, because database starts accessing files before connection to database is established.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase
and UniqueIDBDatabase can be destructed after shutdown.

(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be
invoked during the hard close.

(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
Tasks like didOpenBackingStore could be posted from database thread to main thread after
immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any
database operation.

(WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access
m_backingStore when m_backingStore may already be deleted.

(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort.
m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in
transactionCompleted, so they do not need to be cleared here.

Source/WebKit:

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreRemoveAllIndexedDatabasesSync):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext):
(WTR::RemoveAllIndexedDatabasesCallback):
(WTR::TestController::ClearIndexedDatabases):
* WebKitTestRunner/TestController.h:

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

9 months agoThick overlines and line-throughs grow in the wrong direction
mmaxfield@apple.com [Tue, 18 Dec 2018 23:38:54 +0000 (23:38 +0000)]
Thick overlines and line-throughs grow in the wrong direction
https://bugs.webkit.org/show_bug.cgi?id=192264

Reviewed by Dean Jackson.

Source/WebCore:

Overlines should grow upward, and line-throughs should stay centered.

Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html

* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* style/InlineTextBoxStyle.cpp:
(WebCore::visualOverflowForDecorations):

LayoutTests:

I can't figure out a way to test the line-through, so this just tests the overline.

* fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html: Added.

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

9 months agoFix API test introduced in r239339 on iOS.
achristensen@apple.com [Tue, 18 Dec 2018 23:02:16 +0000 (23:02 +0000)]
Fix API test introduced in r239339 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=192675

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(TEST):
The iOS implementation of the safe browsing warning is a little different.
It does some element creation when it is added to the window so it knows how big it is.
To test these elements, we need to simulate adding it to the window.
A similar technique is done in other iOS API tests, such as SafeBrowsing.ShowWarningSPI.

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

9 months agoJSON.stringify() should throw OOM on StringBuilder overflows.
mark.lam@apple.com [Tue, 18 Dec 2018 22:24:33 +0000 (22:24 +0000)]
JSON.stringify() should throw OOM on StringBuilder overflows.
https://bugs.webkit.org/show_bug.cgi?id=192822
<rdar://problem/46670577>

Reviewed by Saam Barati.

JSTests:

* stress/json-stringify-string-builder-overflow.js: Added.

Source/JavaScriptCore:

* runtime/JSONObject.cpp:
(JSC::Stringifier::stringify):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::appendNextProperty):

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

9 months agoRedeclaration of var over let/const/class should be a syntax error.
ross.kirsling@sony.com [Tue, 18 Dec 2018 22:14:20 +0000 (22:14 +0000)]
Redeclaration of var over let/const/class should be a syntax error.
https://bugs.webkit.org/show_bug.cgi?id=192298

Reviewed by Keith Miller.

JSTests:

* test262.yaml:
* test262/expectations.yaml:
Mark 46 tests as passing.

* stress/block-scope-redeclarations.js:
Add some new tests.

* stress/for-in-invalidate-context-weird-assignments.js:
* stress/for-in-tests.js:
Replace tests for outdated behavior with tests for SyntaxError.

* ChakraCore/test/LetConst/defer3.baseline-jsc:
* ChakraCore/test/LetConst/letvar.baseline-jsc:
Update expectations.

Source/JavaScriptCore:

From https://tc39.github.io/ecma262/#sec-block-static-semantics-early-errors:
It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList also occurs in the
VarDeclaredNames of StatementList.

Accordingly, this patch ensures that { let x; { var x; } } and { { var x; } let x; } are syntax errors.

For the "var after" scenario:
When checking for existing lexically-declared names, we can't simply check the current var scope;
we need to check *all* enclosing scopes up to (and including) the current var scope. In so doing,
we must also avoid violating the Annex B.3.5 condition that allows `try {} catch (e) { var e; }`.

For the "var before" scenario:
We ensure that lexical scopes always keep track of the vars being hoisted over them; this gives us
a simple way to check the current block's var-declared names prior to making a lexical declaration.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseTryStatement):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::setIsSimpleCatchParameterScope): Added.
(JSC::Scope::isSimpleCatchParameterScope): Added.
(JSC::Scope::declareVariable):
(JSC::Scope::addVariableBeingHoisted): Added.
(JSC::Scope::declareLexicalVariable):
(JSC::Scope::hasDeclaredVariable):
(JSC::Scope::hasLexicallyDeclaredVariable): Added.
(JSC::Parser::declareHoistedVariable): Added.
(JSC::Parser::declareVariable):

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

9 months agoSome iOS app crash in FrameLoader::checkCompleted
rniwa@webkit.org [Tue, 18 Dec 2018 22:03:07 +0000 (22:03 +0000)]
Some iOS app crash in FrameLoader::checkCompleted
https://bugs.webkit.org/show_bug.cgi?id=192804
<rdar://problem/44240573>

Reviewed by Tim Horton.

It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
is trying to send a delegate message. Disable the release assertion while this is happening
so that iOS app would not crash.

Unfortunately no new test as there is no way to easily test UIWebView in iOS,
and this requires a race between the web thread & the main thread.

* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
* platform/ios/wak/WebCoreThread.h:
* platform/ios/wak/WebCoreThread.mm:
(WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
(WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
(SendDelegateMessage):

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

9 months agoclang-tidy: Use const reference for MediaTime parameter to prevent object copy
ddkilzer@apple.com [Tue, 18 Dec 2018 21:54:24 +0000 (21:54 +0000)]
clang-tidy: Use const reference for MediaTime parameter to prevent object copy
<https://webkit.org/b/192814>

Reviewed by Mark Lam.

Source/JavaScriptCore:

* runtime/JSCJSValue.h:
(JSC::jsNumber):

Source/WebCore:

* bindings/js/JSDOMConvertNumbers.h:
(WebCore::JSConverter<IDLUnrestrictedDouble>::convert):

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

9 months ago[WebGPU] BindGroupLayout and Device::createBindGroupLayout
justin_fan@apple.com [Tue, 18 Dec 2018 21:51:56 +0000 (21:51 +0000)]
[WebGPU] BindGroupLayout and Device::createBindGroupLayout
https://bugs.webkit.org/show_bug.cgi?id=192817

Reviewed by Dean Jackson.

Update bind-group-layouts to test new functionality.

Source/WebCore:

Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
* Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
(WebCore::WebGPUBindGroupLayout::create):
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h: Added.
* Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroupLayout const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl:
* platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
* platform/graphics/gpu/GPUBindGroupLayout.h: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
* platform/graphics/gpu/GPUDevice.h:

Add files and symbols to project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Missing includes that were previously provided via UnifiedSources:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/sql/SQLiteFileSystem.h:

LayoutTests:

* webgpu/bind-group-layouts-expected.txt:
* webgpu/bind-group-layouts.html:

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

9 months agoUnreviewed test gardening after r239306 and r239338.
ryanhaddad@apple.com [Tue, 18 Dec 2018 21:51:06 +0000 (21:51 +0000)]
Unreviewed test gardening after r239306 and r239338.

Move test compositing/contents-format baselines for Mojave into platform/mac, add new baselines for High Sierra and earlier.

* platform/mac-highsierra-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Copied from LayoutTests/platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: Copied from LayoutTests/platform/mac-mojave/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt.
* platform/mac-highsierra/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Copied from LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt.
* platform/mac-mojave-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Removed.
* platform/mac-mojave/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Removed.
* platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: Renamed from LayoutTests/platform/mac-mojave/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt.
* platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt:
* platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt:

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

9 months agoMake ReadableStreamXX constructs use PrivateIdentifier
youenn@apple.com [Tue, 18 Dec 2018 21:41:34 +0000 (21:41 +0000)]
Make ReadableStreamXX constructs use PrivateIdentifier
https://bugs.webkit.org/show_bug.cgi?id=192771

Reviewed by Chris Dumez.

PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
Covered by existing binding tests.

* Modules/streams/ReadableByteStreamController.idl:
* Modules/streams/ReadableStreamBYOBReader.idl:
* Modules/streams/ReadableStreamBYOBRequest.idl:
* Modules/streams/ReadableStreamDefaultController.idl:
* Modules/streams/ReadableStreamDefaultReader.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsConstructorProperty):
* bindings/scripts/preprocess-idls.pl:
(shouldExposeInterface):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
* bindings/scripts/test/TestCustomConstructor.idl: Removed.

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

9 months agoHTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
commit-queue@webkit.org [Tue, 18 Dec 2018 20:59:53 +0000 (20:59 +0000)]
HTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
https://bugs.webkit.org/show_bug.cgi?id=192612
<rdar://problem/46651207>

Patch by Vivek Seth <v_seth@apple.com> on 2018-12-18
Reviewed by Andy Estes.

* Configurations/WebKit.xcconfig:
* DerivedSources.make:
* Scripts/generate-https-upgrade-database.sh: Added.
* WebKit.xcodeproj/project.pbxproj:

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

9 months agoSynchronous media query evaluation could destroy current Frame/FrameView.
zalan@apple.com [Tue, 18 Dec 2018 20:09:32 +0000 (20:09 +0000)]
Synchronous media query evaluation could destroy current Frame/FrameView.
https://bugs.webkit.org/show_bug.cgi?id=192781
<rdar://problem/34416793>

Reviewed by Chris Dumez.

Source/WebCore:

Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.

Test: printing/print-with-media-query-destory.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):

LayoutTests:

* printing/print-with-media-query-destory-expected.txt: Added.
* printing/print-with-media-query-destory.html: Added.

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

9 months agoUnreviewed, fix the 32-bit watchOS build after r239314
wenson_hsieh@apple.com [Tue, 18 Dec 2018 19:45:24 +0000 (19:45 +0000)]
Unreviewed, fix the 32-bit watchOS build after r239314

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):

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

9 months agoWeb Inspector: Layers: increase default column width for other localizations
drousso@apple.com [Tue, 18 Dec 2018 19:43:55 +0000 (19:43 +0000)]
Web Inspector: Layers: increase default column width for other localizations
https://bugs.webkit.org/show_bug.cgi?id=192812
<rdar://problem/46628625>

Reviewed by Brian Burg.

* UserInterface/Views/LayerDetailsSidebarPanel.js:
(WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):

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

9 months agowebkitpy: Ignore device type for test when using --force
jbedard@apple.com [Tue, 18 Dec 2018 19:42:55 +0000 (19:42 +0000)]
webkitpy: Ignore device type for test when using --force
https://bugs.webkit.org/show_bug.cgi?id=192786
<rdar://problem/46794894>

Reviewed by Daniel Bates.

It is sometimes the case that a contributor will wish to run a test on a specific device,
despite expectations which indicate a test should not be run on that device.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/device_port.py:
(DevicePort.default_child_processes): Strip device type information when using --force.
(DevicePort.setup_test_run): Only allow incomplete match when using --force.

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

9 months agoWeb Inspector: m3u8 content not shown, it should be text
joepeck@webkit.org [Tue, 18 Dec 2018 19:18:44 +0000 (19:18 +0000)]
Web Inspector: m3u8 content not shown, it should be text
https://bugs.webkit.org/show_bug.cgi?id=192731
<rdar://problem/46747728>

Reviewed by Devin Rousso.

Source/WebCore:

* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::setResourceContent):
Don't clobber data if setting empty content on a resource that has content.

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::shouldTreatAsText):
Additional non-"text/" mime types that can be treated as text.

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
* platform/MIMETypeRegistry.h:
Detect media playlist mime types that are text (m3u8/m3u).

Source/WebInspectorUI:

* UserInterface/Base/MIMETypeUtilities.js:
(WI.shouldTreatMIMETypeAsText):
Support m3u8/m3u files as text.

LayoutTests:

* inspector/unit-tests/mimetype-utilities-expected.txt:
* inspector/unit-tests/mimetype-utilities.html:
Tests for shouldTreatMIMETypeAsText.

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

9 months agoRemove <meta http-equiv=set-cookie> support
dbates@webkit.org [Tue, 18 Dec 2018 19:17:15 +0000 (19:17 +0000)]
Remove <meta http-equiv=set-cookie> support
https://bugs.webkit.org/show_bug.cgi?id=185077
<rdar://problem/41791397>

Reviewed by Brent Fulgham.

Source/WebCore:

Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
the HTML living standard was ammended to define this pragma as no-op. Chrome and Edge have also
removed support for this pragma and Firefox has an open bug to remove it.

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Emit a message that the Set-Cookie pragma is obsolete and
was ignored instead of setting the cookie.
* html/parser/XSSAuditor.cpp:
(WebCore::isDangerousHTTPEquiv): We no longer need to consider the Set-Cookie pragma
as dangerous and erase attribute http-equiv when we find it because we no longer honor
this pragma.

LayoutTests:

Update test now that we no longer consider the HTTP equiv. pragma Set-Cookie as
dangerous (since it is ignored).

* http/tests/security/xssAuditor/cookie-injection-expected.txt:

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

9 months agoCSS Typed OM should expose attributeStyleMap
justin_michaud@apple.com [Tue, 18 Dec 2018 18:51:05 +0000 (18:51 +0000)]
CSS Typed OM should expose attributeStyleMap
https://bugs.webkit.org/show_bug.cgi?id=192671

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt:
* web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt:

Source/WebCore:

Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing
TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap.

Test: css-typedom/attributeStyleMap.html

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* css/ElementCSSInlineStyle.idl:
* css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h.
* css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl.
* css/typedom/StylePropertyMapReadOnly.cpp: Added.
(WebCore::StylePropertyMapReadOnly::reifyValue):
(WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
* css/typedom/StylePropertyMapReadOnly.h:
(WebCore::StylePropertyMapReadOnly::create): Deleted.
(WebCore::StylePropertyMapReadOnly::get const): Deleted.
(WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted.
* css/typedom/StylePropertyMapReadOnly.idl:
* css/typedom/TypedOMCSSImageValue.h:
* dom/Element.cpp:
(WebCore::Element::attributeStyleMap):
(WebCore::Element::setAttributeStyleMap):
* dom/Element.h:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::attributeStyleMap):
(WebCore::ElementRareData::setAttributeStyleMap):
* dom/StyledElement.cpp:
(WebCore::StyledElement::ensureAttributeStyleMap):
* dom/StyledElement.h:
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2DBase::drawImage):
* platform/graphics/CustomPaintImage.cpp:
(WebCore::extractComputedProperty):
(WebCore::CustomPaintImage::doCustomPaint):

LayoutTests:

* css-typedom/attributeStyleMap-expected.txt: Added.
* css-typedom/attributeStyleMap.html: Added.
* css-typedom/sameobject-expected.txt: Added.
* css-typedom/sameobject.html: Added.
* fast/css-custom-paint/properties.html:
* platform/ios-wk1/TestExpectations:
* platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Added.
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Added.
* platform/win/TestExpectations:

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

9 months agoUnreviewed. Appease a build error where we weren't using a variable defined in an...
sbarati@apple.com [Tue, 18 Dec 2018 18:40:28 +0000 (18:40 +0000)]
Unreviewed. Appease a build error where we weren't using a variable defined in an "if"

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

9 months agoWKWebView has old URL while displaying SafeBrowsing interstitial, for link-click...
achristensen@apple.com [Tue, 18 Dec 2018 18:26:33 +0000 (18:26 +0000)]
WKWebView has old URL while displaying SafeBrowsing interstitial, for link-click navigations
https://bugs.webkit.org/show_bug.cgi?id=192675

Reviewed by Geoffrey Garen.

Source/WebKit:

When a safe browsing warning is being shown, WKWebView.URL should be the unsafe website, not the safe website before it.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
* UIProcess/SafeBrowsingWarning.h:
(WebKit::SafeBrowsingWarning::create):
(WebKit::SafeBrowsingWarning::url const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(goBack):
(TEST):
(visitUnsafeSite):
(-[SafeBrowsingHelper observeValueForKeyPath:ofObject:change:context:]):
(-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):

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

9 months agoFix test failure after r239306.
simon.fraser@apple.com [Tue, 18 Dec 2018 17:11:50 +0000 (17:11 +0000)]
Fix test failure after r239306.

Need Mojave WK1 results for this test.

* platform/mac-mojave-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Added.

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

9 months agoCalling setValue() while typing should invoke -textDidChangeInTextField in the inject...
wenson_hsieh@apple.com [Tue, 18 Dec 2018 15:37:10 +0000 (15:37 +0000)]
Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle
https://bugs.webkit.org/show_bug.cgi?id=192785
<rdar://problem/45321184>

Reviewed by Tim Horton.

Source/WebCore:

Makes a minor adjustment in `TextFieldInputType::setValue` to consider value changes as "user editing", if we're
currently processing a keystroke from the user. This is useful for certain private clients, such as Safari, that
need to know when the user is typing in a text form control, but the page is preventing default text insertion
behavior and instead updating values programmatically.

Test: fast/forms/call-text-did-change-in-text-field-when-typing.html

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::setValue):

LayoutTests:

Add a test to verify that:
1. When typing in a focused field, the injected bundle method is invoked.
2. When changing the value of the focused field under non-typing user interaction, the method isn't invoked.
3. When changing the value of the focused field programmatically without user gesture, the method isn't invoked.

* TestExpectations:
* fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt: Added.
* fast/forms/call-text-did-change-in-text-field-when-typing.html: Added.
* platform/wk2/TestExpectations:

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

9 months ago[LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
zalan@apple.com [Tue, 18 Dec 2018 15:30:25 +0000 (15:30 +0000)]
[LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
https://bugs.webkit.org/show_bug.cgi?id=192801

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):

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

9 months ago[LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWit...
zalan@apple.com [Tue, 18 Dec 2018 15:28:47 +0000 (15:28 +0000)]
[LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWithClearance
https://bugs.webkit.org/show_bug.cgi?id=192799

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):

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

9 months ago[LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
zalan@apple.com [Tue, 18 Dec 2018 15:27:09 +0000 (15:27 +0000)]
[LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
https://bugs.webkit.org/show_bug.cgi?id=192798

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):

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

9 months agoRegression(r239182) SuspendedPage's process reuse for link navigation optimization...
cdumez@apple.com [Tue, 18 Dec 2018 15:26:50 +0000 (15:26 +0000)]
Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
https://bugs.webkit.org/show_bug.cgi?id=192772

Reviewed by Antti Koivisto.

Source/WebKit:

With r239182, if the page in the previous process would fail to enter PageCache, we would destroy
the corresponding SuspendedPageProxy, which would potentially terminate the process. This would
regress performance when trying to navigate back in history to that page. This would also regress
performance when link-navigating to the same domain as we would have previously reused the suspended
page's process for such navigation.

Address the issue by keeping the SuspendedPageProxy alive even if the WebPage fails to suspend.
When trying to reuse a SuspendedPageProxy, if the page failed to suspend, reuse its process but
not the suspended page itself.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::waitUntilReadyToUnsuspend):
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::didSuspend):
(WebKit::SuspendedPageProxy::didFailToSuspend):
(WebKit::SuspendedPageProxy::loggingString const):
* UIProcess/SuspendedPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

9 months ago[LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
zalan@apple.com [Tue, 18 Dec 2018 15:25:32 +0000 (15:25 +0000)]
[LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
https://bugs.webkit.org/show_bug.cgi?id=192794

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):

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

9 months ago[LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBef...
zalan@apple.com [Tue, 18 Dec 2018 15:23:47 +0000 (15:23 +0000)]
[LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBeforeCollapsesWithPreviousSibling collapsing logic
https://bugs.webkit.org/show_bug.cgi?id=192791

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):

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

9 months ago[LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and...
zalan@apple.com [Tue, 18 Dec 2018 15:19:21 +0000 (15:19 +0000)]
[LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and marginBeforeCollapsesWithParentMarginBefore collapsing logic
https://bugs.webkit.org/show_bug.cgi?id=192787

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::hasClearance):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):

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

9 months agoUnreviewed, JHBuild GTK build fix attempt
philn@webkit.org [Tue, 18 Dec 2018 13:00:36 +0000 (13:00 +0000)]
Unreviewed, JHBuild GTK build fix attempt

* gtk/jhbuild.modules: There's no libffi in this moduleset anymore.
There's no ninja module either, it should be provided by the host system.

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

9 months agoSkip the stress/elidable-new-object-roflcopter-then-exit.js test on 32-bit.
mark.lam@apple.com [Tue, 18 Dec 2018 08:16:14 +0000 (08:16 +0000)]
Skip the stress/elidable-new-object-roflcopter-then-exit.js test on 32-bit.
https://bugs.webkit.org/show_bug.cgi?id=191374
<rdar://problem/46525447>

Reviewed by Yusuke Suzuki.

This test runs too slow on 32-bit, and is not relevant for non-JIT builds.

* stress/elidable-new-object-roflcopter-then-exit.js:

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

9 months agoSkip the stress/materialized-regexp-has-correct-last-index-set-by-match.js test on...
mark.lam@apple.com [Tue, 18 Dec 2018 07:58:59 +0000 (07:58 +0000)]
Skip the stress/materialized-regexp-has-correct-last-index-set-by-match.js test on 32-bit.
https://bugs.webkit.org/show_bug.cgi?id=192019
<rdar://problem/46525456>

Reviewed by Yusuke Suzuki.

The test runs too slow on 32-bit.

* stress/materialized-regexp-has-correct-last-index-set-by-match.js:

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

9 months agoSkip the stress/materialize-regexp-cyclic-regexp.js test on 32-bit.
mark.lam@apple.com [Tue, 18 Dec 2018 07:51:24 +0000 (07:51 +0000)]
Skip the stress/materialize-regexp-cyclic-regexp.js test on 32-bit.
https://bugs.webkit.org/show_bug.cgi?id=191373
<rdar://problem/46525458>

Reviewed by Yusuke Suzuki.

The test is already slow running with a JIT on 64-bit.  It will always timeout
on 32-bit without a JIT.

* stress/materialize-regexp-cyclic-regexp.js:

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

9 months agoArray unshift/shift should not race against the AI in the compiler thread.
mark.lam@apple.com [Tue, 18 Dec 2018 06:56:51 +0000 (06:56 +0000)]
Array unshift/shift should not race against the AI in the compiler thread.
https://bugs.webkit.org/show_bug.cgi?id=192795
<rdar://problem/46724263>

Reviewed by Saam Barati.

JSTests:

* stress/array-unshift-should-not-race-against-compiler-thread.js: Added.

Source/JavaScriptCore:

The Array unshift and shift operations for ArrayStorage type arrays are protected
using the cellLock.  The AbstractInterpreter's foldGetByValOnConstantProperty()
function does grab the cellLock before reading a value from the array's ArrayStorage,
but does not get the array butterfly under the protection of the cellLock.

This is insufficient and racy.  For ArrayStorage type arrays, the fetching of the
butterfly also needs to be protected by the cellLock.  The unshift / shift
operations can move values around in the butterfly.  Hence, the fact that AI has
fetched a butterfly pointer (while ensuring no structure change) is insufficient
to guarantee that the values in the butterfly haven't shifted.

Having AI hold the cellLock the whole time (from before fetching the butterfly
till after reading the value from it) eliminates this race.  Note: we only need
to do this for ArrayStorage type arrays.

Note also that though AI is holding the cellLock in this case, we still need to
ensure that the array structure hasn't changed around the fetching of the butterfly.
This is because operations other than unshift and shift are guarded by this
protocol, and not the cellLock.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* runtime/JSArray.cpp:
(JSC::JSArray::unshiftCountSlowCase):

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

9 months ago[JSC] Optimize Object.keys by caching own keys results in StructureRareData
yusukesuzuki@slowstart.org [Tue, 18 Dec 2018 06:54:49 +0000 (06:54 +0000)]
[JSC] Optimize Object.keys by caching own keys results in StructureRareData
https://bugs.webkit.org/show_bug.cgi?id=190047

Reviewed by Saam Barati.

JSTests:

* stress/object-keys-cached-zero.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed-attribute.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed-index.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed.js: Added.
(shouldBe):
(test):
* stress/object-keys-indexed-non-cache.js: Added.
(shouldBe):
(test):
* stress/object-keys-overrides-get-property-names.js: Added.
(shouldBe):
(test):
(noInline):

Source/JavaScriptCore:

Object.keys is one of the most frequently used function in web-tooling-benchmarks (WTB).
Object.keys is dominant in lebab of WTB, and frequently called in babel and others.
Since our Structure knows the shape of JSObject, we can cache the result of Object.keys
in Structure (StructureRareData) as we cache JSPropertyNameEnumerator in StructureRareData.

This patch caches the result of Object.keys in StructureRareData. The cached array is created
as JSImmutableButterfly. And Object.keys creates CoW from this data. Currently, the lifetime
strategy of this JSImmutableButterfly is the same to cached JSPropertyNameEnumerator. It is
referenced from Structure, and collected when Structure is collected.

This improves several benchmarks in SixSpeed.

                                baseline                  patched

    object-assign.es5      350.1710+-3.6303     ^    226.0368+-4.7558        ^ definitely 1.5492x faster
    for-of-object.es6      269.1941+-3.3430     ^    127.9317+-2.3875        ^ definitely 2.1042x faster

And it improves WTB lebab by 11.8%.

    Before: lebab:  6.10 runs/s
    After:  lebab:  6.82 runs/s

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToNewArrayBuffer):
* dfg/DFGNode.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectKeys):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeys):
* runtime/Butterfly.h:
(JSC::ContiguousData::Data::setStartingValue):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/JSImmutableButterfly.h:
(JSC::JSImmutableButterfly::JSImmutableButterfly):
We set JSEmpty to the underlying butterfly storage if indexing type is Contiguous.
Otherwise, JSImmutableButterfly is half-baked one until all the storage is filled with some meaningful values, it leads to crash
if half-baked JSImmutableButterfly is exposed to GC.
* runtime/ObjectConstructor.cpp:
(JSC::ownPropertyKeys):
* runtime/Structure.cpp:
(JSC::Structure::canCachePropertyNameEnumerator const):
* runtime/Structure.h:
* runtime/StructureInlines.h:
(JSC::Structure::setCachedOwnKeys):
(JSC::Structure::cachedOwnKeys const):
(JSC::Structure::cachedOwnKeysIgnoringSentinel const):
(JSC::Structure::canCacheOwnKeys const):
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
(JSC::StructureRareData::cachedPropertyNameEnumerator const): Deleted.
(JSC::StructureRareData::setCachedPropertyNameEnumerator): Deleted.
* runtime/StructureRareData.h:
* runtime/StructureRareDataInlines.h:
(JSC::StructureRareData::cachedPropertyNameEnumerator const):
(JSC::StructureRareData::setCachedPropertyNameEnumerator):
(JSC::StructureRareData::cachedOwnKeys const):
(JSC::StructureRareData::cachedOwnKeysIgnoringSentinel const):
(JSC::StructureRareData::cachedOwnKeysConcurrently const):
(JSC::StructureRareData::setCachedOwnKeys):
(JSC::StructureRareData::previousID const): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):

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

9 months ago[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https...
jiewen_tan@apple.com [Tue, 18 Dec 2018 06:37:28 +0000 (06:37 +0000)]
[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Source/WebKit:

Part 3.

Add some additional temporary logging info to determine if the timer is working as expected.
Once the bug is determined and fixed, we should remove all logging added in this patch.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::timeOutTimerFired):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):

LayoutTests:

Add a time out value.

* http/wpt/webauthn/public-key-credential-create-success-hid.https.html:

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

9 months agoEnable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
sbarati@apple.com [Tue, 18 Dec 2018 06:33:58 +0000 (06:33 +0000)]
Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374
<rdar://problem/46506286>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

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

Source/WebKit:

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

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

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

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