WebKit-https.git
3 months agoUnreviewed, rolling out r251558.
jlewis3@apple.com [Thu, 24 Oct 2019 22:51:10 +0000 (22:51 +0000)]
Unreviewed, rolling out r251558.

This broke internal builds

Reverted changeset:

"Add a mechanism to find and manipulate text by paragraphs"
https://bugs.webkit.org/show_bug.cgi?id=203286
https://trac.webkit.org/changeset/251558

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

3 months agoREGRESSION(r251409) Service worker connection should not be established without servi...
achristensen@apple.com [Thu, 24 Oct 2019 22:48:40 +0000 (22:48 +0000)]
REGRESSION(r251409) Service worker connection should not be established without service worker entitlement
https://bugs.webkit.org/show_bug.cgi?id=203385
<rdar://problem/37790257>

Reviewed by Chris Dumez.

r251409 introduced a new call to establishSWServerConnection that should have an entitlement check.
This was caught by a unit test in CI that is not easy to reproduce in WebKit's test.  See the radar.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):

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

3 months agoUnreviewed, rolling out r251269, r251294, and r251328.
rniwa@webkit.org [Thu, 24 Oct 2019 22:40:07 +0000 (22:40 +0000)]
Unreviewed, rolling out r251269, r251294, and r251328.
https://bugs.webkit.org/show_bug.cgi?id=203384

Probably made many animation tests flaky (Requested by rniwa
on #webkit).

Reverted changesets:

"Integrate resize event with HTML5 event loop"
https://bugs.webkit.org/show_bug.cgi?id=202964
https://trac.webkit.org/changeset/251269

"Flaky Test: fast/events/resize-subframe-in-rendering-
update.html"
https://bugs.webkit.org/show_bug.cgi?id=203140
https://trac.webkit.org/changeset/251294

"Flaky Test: fast/events/resize-subframe-in-rendering-
update.html"
https://bugs.webkit.org/show_bug.cgi?id=203140
https://trac.webkit.org/changeset/251328

Patch by Commit Queue <commit-queue@webkit.org> on 2019-10-24

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

3 months ago[iOS] Mismatch in com.apple.coremedia.audiodeviceclock declarations
bfulgham@apple.com [Thu, 24 Oct 2019 22:14:01 +0000 (22:14 +0000)]
[iOS] Mismatch in com.apple.coremedia.audiodeviceclock declarations
https://bugs.webkit.org/show_bug.cgi?id=203367
<rdar://problem/56581166>

Reviewed by Per Arne Vollan.

The 'common.sb' sandbox allows access to "com.apple.coremedia.audiodeviceclock.xpc", but
the WebContent sandbox blocked access to "com.apple.coremedia.audiodeviceclock". This means
we aren't blocking that endpoint.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 months ago[ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html...
sihui_liu@apple.com [Thu, 24 Oct 2019 22:12:49 +0000 (22:12 +0000)]
[ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html is consistently Failing
https://bugs.webkit.org/show_bug.cgi?id=203173
<rdar://problem/56424721>

Source/JavaScriptCore:

Hold a strong reference to JSGlobalOjbect in ConsoleMessage so that object is not garbage collected before
WebConsoleAgent::frameWindowDiscarded.

Covered by existing test: inspector/console/webcore-logging.html.

Reviewed by Geoffrey Garen.

* inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::ConsoleMessage):
(Inspector::ConsoleMessage::clear):
* inspector/ConsoleMessage.h:

LayoutTests:

Reviewed by Geoffrey Garen.

play() returns a promise and the promise can be rejected by a later pause(). We didn't handle
that case so we could receive a type JavaScript message for the unhandled rejected promise.

* inspector/console/webcore-logging.html:
* platform/mac-wk1/TestExpectations:

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

3 months agoRefactor "builds" table "build_number" row to "build_tag" to fit more generic use...
dewei_zhu@apple.com [Thu, 24 Oct 2019 22:00:37 +0000 (22:00 +0000)]
Refactor "builds" table "build_number" row to "build_tag" to fit more generic use cases.
https://bugs.webkit.org/show_bug.cgi?id=203270

Reviewed by Ryosuke Niwa.

Rename "build_number" to "build_tag" to fit more generic use cases.
Add support to be backward compatible to accept reports contain either
"buildNumber" or "buildTag".

* browser-tests/index.html:
* init-database.sql:
* migrate-database.sql: Updated migration sql for this change.
* public/admin/test-configurations.php:
* public/api/measurement-set.php:
* public/api/runs.php:
* public/api/upload-root.php: Added support for both "buildNumber" and "buildTag".
* public/include/report-processor.php: Added support for both "buildNumber" and "buildTag".
* public/v3/models/builder.js:
(Builder.prototype.urlForBuild):
(Builder):
(Build):
(Build.prototype.buildTag):
(Build.prototype.label):
(Build.prototype.url):
(Build.prototype.buildNumber): Deleted.
* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor):
(MeasurementAdaptor.prototype.applyTo.return.build):
* public/v3/pages/chart-pane-status-view.js:
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage.prototype._renderTooltip):
* server-tests/admin-platforms-tests.js:
(reportsForDifferentPlatforms):
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-commits-tests.js:
* server-tests/api-manifest-tests.js:
* server-tests/api-measurement-set-tests.js:
* server-tests/api-report-tests.js: Added unit tests for testing "buildNumber" and "buildTag".
(emptyReport):
(reportWitMismatchingCommitTime):
(reportWithOneSecondCommitTimeDifference):
(emptySlaveReport):
(makeReport):
(reportWithSameSubtestName):
* server-tests/api-upload-root-tests.js: Added unit tests for testing "buildNumber" and "buildTag".
* server-tests/privileged-api-add-build-requests-tests.js:
* server-tests/privileged-api-create-analysis-task-tests.js:
* server-tests/privileged-api-create-test-group-tests.js:
(createAnalysisTask):
* server-tests/privileged-api-upate-run-status.js:
* server-tests/privileged-api-update-test-group-tests.js:
(async.createAnalysisTask):
* server-tests/resources/mock-data.js:
(MockData.addMockConfiguration):
(MockData.sampleBuildData):
(MockData.finishedBuildData):
* server-tests/tools-sync-buildbot-integration-tests.js:
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.buildTag):
(BuildbotBuildEntry.prototype.url):
(BuildbotSyncer.prototype.urlForBuildTag):
(BuildbotBuildEntry.prototype.buildNumber): Deleted.
(BuildbotSyncer.prototype.urlForBuildNumber): Deleted.
* unit-tests/analysis-task-tests.js:
(measurementCluster):
* unit-tests/buildbot-syncer-tests.js:
* unit-tests/measurement-adaptor-tests.js:
* unit-tests/measurement-set-analyzer-tests.js:
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-v3-models.js:

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

3 months ago[iOS] Mismatch in com.apple.MediaPlayer.RemotePlayerService declarations
bfulgham@apple.com [Thu, 24 Oct 2019 21:42:23 +0000 (21:42 +0000)]
[iOS] Mismatch in com.apple.MediaPlayer.RemotePlayerService declarations
https://bugs.webkit.org/show_bug.cgi?id=203368
<rdar://problem/56581152>

Reviewed by Per Arne Vollan.

The 'common.sb' sandbox allows access to the xpc-service-name "com.apple.MediaPlayer.RemotePlayerService",
but we block access to the global-name "com.apple.MediaPlayer.RemoteService". We aren't blocking
the right thing.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 months agoUnreviewed, a test fix after r251498
jiewen_tan@apple.com [Thu, 24 Oct 2019 21:28:49 +0000 (21:28 +0000)]
Unreviewed, a test fix after r251498

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

3 months agoUnreviewed test gardening.
simon.fraser@apple.com [Thu, 24 Oct 2019 21:21:47 +0000 (21:21 +0000)]
Unreviewed test gardening.

Make the test added in r251385 pass in WebKit1.

* compositing/video/video-border-radius-clipping-expected.html:
* compositing/video/video-border-radius-clipping.html:

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

3 months agoExpose pageZoom as API.
beidson@apple.com [Thu, 24 Oct 2019 21:17:53 +0000 (21:17 +0000)]
Expose pageZoom as API.
https://bugs.webkit.org/show_bug.cgi?id=203381

Reviewed by Andy Estes.

Source/WebKit:

No new tests (No behavior change, identical to SPI)

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setPageZoom:]):
(-[WKWebView pageZoom]):
(-[WKWebView _pageZoomFactor]):
(-[WKWebView _setPageZoomFactor:]):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController toggleZoomMode:]):
(-[WK2BrowserWindowController resetZoom:]):
(-[WK2BrowserWindowController canResetZoom]):
(-[WK2BrowserWindowController currentZoomFactor]):
(-[WK2BrowserWindowController setCurrentZoomFactor:]):

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

3 months ago[JSC] Properly organize wasm operations
ysuzuki@apple.com [Thu, 24 Oct 2019 21:11:30 +0000 (21:11 +0000)]
[JSC] Properly organize wasm operations
https://bugs.webkit.org/show_bug.cgi?id=203360

Reviewed by Keith Miller.

This patch cleans up operation functions called from Wasm.

1. Properly name these operations with prefix "operation".
2. Do not use lambda. Define function with JIT_OPERATION.
3. Consolidate them in WasmOperations.cpp.

* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::addRefFunc):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableSize):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::addGrowMemory):
(JSC::Wasm::AirIRGenerator::emitWriteBarrierForJSWrapper):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64Popcnt>):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addRefFunc):
(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::emitWriteBarrierForJSWrapper):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
* wasm/WasmInstance.cpp:
(JSC::Wasm::getWasmTableElement): Deleted.
(JSC::Wasm::setWasmTableElement): Deleted.
(JSC::Wasm::doWasmTableGrow): Deleted.
(JSC::Wasm::doWasmTableFill): Deleted.
(JSC::Wasm::doWasmRefFunc): Deleted.
* wasm/WasmInstance.h:
* wasm/WasmOperations.cpp:
(JSC::Wasm::operationWasmUnwind):
(JSC::Wasm::operationConvertToF64):
(JSC::Wasm::operationConvertToI32):
(JSC::Wasm::operationConvertToF32):
(JSC::Wasm::operationIterateResults):
(JSC::Wasm::operationAllocateResultsArray):
(JSC::Wasm::operationWasmWriteBarrierSlowPath):
(JSC::Wasm::operationPopcount32):
(JSC::Wasm::operationPopcount64):
(JSC::Wasm::operationGrowMemory):
(JSC::Wasm::operationGetWasmTableElement):
(JSC::Wasm::setWasmTableElement):
(JSC::Wasm::operationSetWasmTableElement):
(JSC::Wasm::operationWasmTableGrow):
(JSC::Wasm::operationWasmTableFill):
(JSC::Wasm::operationWasmRefFunc):
(JSC::Wasm::operationGetWasmTableSize):
(JSC::Wasm::operationWasmToJSException):
* wasm/WasmOperations.h:
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
(JSC::Wasm::allocateResultsArray): Deleted.
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
(JSC::Wasm::operationWasmToJSException): Deleted.
* wasm/js/WasmToJS.h:
* wasm/js/WebAssemblyInstanceConstructor.cpp:

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

3 months agoAdd a mechanism to find and manipulate text by paragraphs
rniwa@webkit.org [Thu, 24 Oct 2019 21:01:22 +0000 (21:01 +0000)]
Add a mechanism to find and manipulate text by paragraphs
https://bugs.webkit.org/show_bug.cgi?id=203286

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch introduces TextManipulationController which allows WebKit clients to find and replace
text content in a given document by paragraph boundary. For now, TextManipulationController finds
all paragraphs in the document and invokes the callback for each paragraph. In the future, this
controller will support detecting removal and insertion of new content to the document.

Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs
       TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens
       TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent
       TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged
       TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway

* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items
in TextManipulationController may keep a bunch of nodes alive and not let this document destructed.
(WebCore::Document::textManipulationController): Added.
* dom/Document.h:
(WebCore::Document::textManipulationControllerIfExists): Added.
* editing/TextManipulationController.cpp: Added.
(WebCore::TextManipulationController::TextManipulationController): Added.
(WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke
the callback.
(WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs.
(WebCore::TextManipulationController::completeManipulation): Added.
(WebCore::TextManipulationController::replace): Added. A helper for completeManipulation.
* editing/TextManipulationController.h: Added.
(WebCore::TextManipulationController::ManipulationToken::encode const): Added.
(WebCore::TextManipulationController::ManipulationToken::decode): Added.

Source/WebKit:

This patch introduces a new SPI to find paragraphs of text and let client replace the content of each paragraph.
For now, this SPI is limited to find & replace contents of main frame's document.

WKWebView's _startTextManipulationsWithCompletionHandler sends StartTextManipulations message to WebContent process
to find all paragraphs in the main frame. WebContent process will send back DidFindTextManipulationItem message
for each paragraph, which in turn calls back _WKTextManipulationDelegate's _webView: didFindTextManipulationItem:.

Upon receiving this delegate callback, the client can invoke WKWebView's _completeTextManipulation to replace
the content. It will send CompleteTextManipulation to WebContent process, which will invoke completeManipulation
on main frame's document's TextManipulationController.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _textManipulationDelegate]): Aded.
(-[WKWebView _setTextManipulationDelegate:]): Aded.
(-[WKWebView _startTextManipulationsWithCompletionHandler:]):
(-[WKWebView _completeTextManipulation:completion:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKTextManipulationDelegate.h: Added.
* UIProcess/API/Cocoa/_WKTextManipulationItem.h: Added.
* UIProcess/API/Cocoa/_WKTextManipulationItem.mm: Added.
(-[_WKTextManipulationItem initWithIdentifier:tokens:]):
(-[_WKTextManipulationItem identifier]):
(-[_WKTextManipulationItem tokens]):
* UIProcess/API/Cocoa/_WKTextManipulationToken.h: Added.
* UIProcess/API/Cocoa/_WKTextManipulationToken.mm: Added.
(-[_WKTextManipulationToken init]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::startTextManipulations):
(WebKit::WebPageProxy::didFindTextManipulationItem):
(WebKit::WebPageProxy::completeTextManipulation):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::startTextManipulations):
(WebKit::WebPage::completeTextManipulation):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

Added basic API tests for the new SPI.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: Added.
(-[TextManipulationDelegate init]):
(-[TextManipulationDelegate _webView:didFindItem:forFrame:]):
(-[TextManipulationDelegate items]):
(TestWebKitAPI::createItem):

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

3 months ago[Web Animations] Fix compositing/backing/transform-transition-from-outside-view.html
commit-queue@webkit.org [Thu, 24 Oct 2019 20:48:18 +0000 (20:48 +0000)]
[Web Animations] Fix compositing/backing/transform-transition-from-outside-view.html
https://bugs.webkit.org/show_bug.cgi?id=184566

Patch by Antoine Quint <graouts@apple.com> on 2019-10-24
Reviewed by Simon Fraser.

For the most part this is the same fix that Simon Fraser made to address 184611 in r251412 although here I also
changed the setTimeout call to requestAnimationFrame in order to ensure that the backing store bit was set in the
layer dump for WK1.

* TestExpectations:
* compositing/backing/transform-transition-from-outside-view.html:

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

3 months ago[JSC] Remove LLInt's Callee size assumption
ysuzuki@apple.com [Thu, 24 Oct 2019 20:27:38 +0000 (20:27 +0000)]
[JSC] Remove LLInt's Callee size assumption
https://bugs.webkit.org/show_bug.cgi?id=203282

Reviewed by Mark Lam.

LLInt code still assumes that Callee is always allocated in non-LargeAllocation.
This patch removes this assumption by following three changes.

1. If we can get CodeBlock, we get VM& from CodeBlock.
2. In nativeCallTrampoline and internalFunctionCallTrampoline, we get VM& from JSGlobalObject. It involves one more pointer-chasing but it is OK
   since this JSGlobalObject's VM* field will be touched in called native functions anyway. And this code is only used when we are not using JIT.
3. In exception handling code in LLInt, we get VM& from callee by checking LargeAllocation possibility. This is OK since it is only executed when
   exception unwinding happens, and which is an expensive operation anyway.

* heap/LargeAllocation.h:
(JSC::LargeAllocation::headerSize):
* heap/WeakSet.h:
(JSC::WeakSet::WeakSet):
(JSC::WeakSet::vm const):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::vm const):
(JSC::JSGlobalObject::defaultCodeGenerationMode const):
* runtime/VM.h:
(JSC::WeakSet::heap const):

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

3 months agoUnreviewed fix after r251511.
bfulgham@apple.com [Thu, 24 Oct 2019 20:07:25 +0000 (20:07 +0000)]
Unreviewed fix after r251511.

Some syctl names were omitted from the initial checkin.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 months ago[LFC][IFC] Add support for partial leading and trailing content
zalan@apple.com [Thu, 24 Oct 2019 20:04:19 +0000 (20:04 +0000)]
[LFC][IFC] Add support for partial leading and trailing content
https://bugs.webkit.org/show_bug.cgi?id=203375

Reviewed by Antti Koivisto.

This patch adds support for splitting text content across multiple lines when needed.
It also supports complex cases when the text content spreads across multiple inline level boxes with different word-break values e.g.
<span style="word-break: keep-all">donotsplitthiscontent</span><span style="word-break: break-all">splitthiscontent</span>
would produce something like this with certain constraints.
                        -> | <- available width
"donotsplitthiscontentsplit
thiscontent"

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
* layout/inlineformatting/InlineLineBreaker.cpp:
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::shouldWrapFloatBox):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):
(WebCore::Layout::LineBreaker::breakingContext): Deleted.
(WebCore::Layout::LineBreaker::breakingContextForFloat): Deleted.
* layout/inlineformatting/InlineLineBreaker.h:
* layout/inlineformatting/InlineLineLayout.cpp:
(WebCore::Layout::LineLayout::LineInput::LineInput):
(WebCore::Layout::LineLayout::layout):
(WebCore::Layout::LineLayout::close):
(WebCore::Layout::LineLayout::placeInlineItem):
(WebCore::Layout::LineLayout::processUncommittedContent):
(WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
(WebCore::Layout::LineLayout::UncommittedContent::trim):
* layout/inlineformatting/InlineLineLayout.h:
* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::InlineTextItem::left const):
(WebCore::Layout::InlineTextItem::right const):
(WebCore::Layout::InlineTextItem::split const): Deleted.
* layout/inlineformatting/InlineTextItem.h:

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

3 months agoFormalize PDF snapshot API.
beidson@apple.com [Thu, 24 Oct 2019 19:43:49 +0000 (19:43 +0000)]
Formalize PDF snapshot API.
https://bugs.webkit.org/show_bug.cgi?id=203374

Reviewed by Tim Horton.

Source/WebKit:

Covered by API tests and MiniBrowser usage.

* SourcesCocoa.txt:
* UIProcess/API/Cocoa/WKPDFConfiguration.h: Added.
* UIProcess/API/Cocoa/WKPDFConfiguration.mm: Added.
(-[WKPDFConfiguration init]):
(-[WKPDFConfiguration copyWithZone:]):

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView createPDFWithConfiguration:completionHandler:]):
(-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]):

* UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: Unified build strikes again.

* WebKit.xcodeproj/project.pbxproj:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController saveAsPDF:]):

* TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
(TestWebKitAPI::TEST):

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

3 months agoWeb Inspector: assertion failure at GeneralStyleDetailsSidebarPanel.js:34:23
yurys@chromium.org [Thu, 24 Oct 2019 19:27:26 +0000 (19:27 +0000)]
Web Inspector: assertion failure at GeneralStyleDetailsSidebarPanel.js:34:23
https://bugs.webkit.org/show_bug.cgi?id=203376

Reviewed by Devin Rousso.

Use class's prototype instead of class itself when doing instanceof check.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel):

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

3 months ago[iOS] Remove 'deny' rules that do not have a corresponding 'allow' rule
bfulgham@apple.com [Thu, 24 Oct 2019 19:12:02 +0000 (19:12 +0000)]
[iOS] Remove 'deny' rules that do not have a corresponding 'allow' rule
https://bugs.webkit.org/show_bug.cgi?id=203352

Reviewed by Per Arne Vollan.

Now that we no longer import 'common.sb', and have removed entries that allowed
services that we block, we can remove the 'deny' command. This is safe because
everything is denied by default.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 months agoUnreviewed, skip new tests added in 251509 on Windows
cdumez@apple.com [Thu, 24 Oct 2019 19:09:05 +0000 (19:09 +0000)]
Unreviewed, skip new tests added in 251509 on Windows

DataTransferItems is not supported on this platform.

* platform/win/TestExpectations:

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

3 months agoWeb Inspector: CONSOLE ERROR removeEventListener cannot remove blackboxed-urls-change...
yurys@chromium.org [Thu, 24 Oct 2019 18:53:41 +0000 (18:53 +0000)]
Web Inspector: CONSOLE ERROR removeEventListener cannot remove blackboxed-urls-changed because it doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=203372

Reviewed by Devin Rousso.

Avoid console errors when opening source panel.

* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype._updateSourceCode): Only remove listener if it has
been added before.

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

3 months agoPass CORS-enabled schemes through WebProcess instead of having them NetworkProcess...
achristensen@apple.com [Thu, 24 Oct 2019 18:50:26 +0000 (18:50 +0000)]
Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global
https://bugs.webkit.org/show_bug.cgi?id=202891

Reviewed by Youenn Fablet.

Source/WebCore:

* platform/LegacySchemeRegistry.cpp:
(WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
(WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
(WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled):
* platform/LegacySchemeRegistry.h:

Source/WebKit:

No change in behavior.  Now the LegacySchemeRegistry is not used as much in the NetworkProcess, a step towards no use at all.
This functionality is currently only available through the glib API webkit_security_manager_register_uri_scheme_as_cors_enabled
but it has been requested in bug 201180 and bug 199064.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::registerURLSchemesAsCORSEnabled):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::schemeRegistry):
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const): Deleted.
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkSchemeRegistry.cpp: Added.
(WebKit::NetworkSchemeRegistry::registerURLSchemeAsCORSEnabled):
(WebKit::NetworkSchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
* NetworkProcess/NetworkSchemeRegistry.h: Added.
(WebKit::NetworkSchemeRegistry::create):
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
Use nullptr, indicating that the PingLoad constructor that is used in ad click attribution should not check the custom scheme registry.
This is Ok because ad click attribution is only used for HTTP family schemes.
(WebKit::m_blobFiles):
* NetworkProcess/PingLoad.h:
* Sources.txt:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCORSEnabled):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsCORSEnabled const): Deleted.
* WebProcess/WebProcess.h:

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

3 months ago[Cocoa] Make it possible to convert SharedBuffer segments and data views to NSData...
aestes@apple.com [Thu, 24 Oct 2019 17:51:34 +0000 (17:51 +0000)]
[Cocoa] Make it possible to convert SharedBuffer segments and data views to NSData without copying
https://bugs.webkit.org/show_bug.cgi?id=203348

Reviewed by Alex Christensen.

Source/WebCore:

Added an API test.

* platform/SharedBuffer.h:
* platform/cocoa/SharedBufferCocoa.mm:
(-[WebCoreSharedBufferData initWithDataSegment:position:]):
(-[WebCoreSharedBufferData length]):
(-[WebCoreSharedBufferData bytes]):
(WebCore::SharedBuffer::createCFData const):
(WebCore::SharedBuffer::createNSDataArray const):
(WebCore::SharedBuffer::DataSegment::createNSData const):
(WebCore::SharedBufferDataView::createNSData const):
(-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]): Deleted.

Tools:

* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
(TestWebKitAPI::TEST_F):

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

3 months agoFetchResponse should not prevent entering the back/forward cache
cdumez@apple.com [Thu, 24 Oct 2019 16:57:33 +0000 (16:57 +0000)]
FetchResponse should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203092
<rdar://problem/56554677>

Reviewed by Alex Christensen.

Source/WebCore:

Drop shouldPreventEnteringBackForwardCache_DEPRECATED() in FetchResponse to allow pages to
enter the back/forward cache, even when the fetch response has a blob loader. r251495
already made this safe by updating the FetchBodyOwner parent class to not resolve promises
while in the back/forward cache.

Test: fast/history/page-cache-active-fetch-response-blobReadAsBlob.html

* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
* Modules/fetch/FetchResponse.h:

LayoutTests:

Add layout test coverage.

* TestExpectations:
* fast/history/page-cache-active-fetch-response-blobReadAsBlob-expected.txt: Added.
* fast/history/page-cache-active-fetch-response-blobReadAsBlob.html: Added.

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

3 months ago[MSE][GStreamer] Reintroduce ensureGLVideoSinkContext() fix
aboya@igalia.com [Thu, 24 Oct 2019 16:39:56 +0000 (16:39 +0000)]
[MSE][GStreamer] Reintroduce ensureGLVideoSinkContext() fix
https://bugs.webkit.org/show_bug.cgi?id=201401

Reviewed by Philippe Normand.

That patch was almost mechanically reverted temporarily along the rest
of the WebKitMediaSrc rework. In theory that should have been OK since
it was supposed to fix a regression of that patch... But actually
the bug was already causing problems before, the WebKitMediaSrc rework
just exposed a more common case.

It has been reported that the same bug arises when adding some CSS
styles to the <video> element, and the patch fixes the issue.

And the patch actually makes sense in any case... since without it
some perfectly valid state transitions are not covered!

So I'm reintroducing it.

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

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

3 months ago[Web Animations] Only process CSS properties affected by a given CSS transition
graouts@webkit.org [Thu, 24 Oct 2019 16:35:08 +0000 (16:35 +0000)]
[Web Animations] Only process CSS properties affected by a given CSS transition
https://bugs.webkit.org/show_bug.cgi?id=203238

Reviewed by Simon Fraser.

When the "transition" property, or one of its longhands, would change we would iterate over every known CSS property to identify whether the before and after
styles showed reasons to create, modify or cancel a backing CSSTransition object. However, we only need to do this in the case where "transition-property" is
"all", ie. where the Animation object has its animationMode() set to Animation::AnimateAll. In all other cases, we only need to iterate over the CSS properties
specified by "transition-property".

We now compile a list of CSS properties to iterate over by looking at all properties listed in the "transition-property" for the before and after styles.

* animation/AnimationTimeline.cpp:
(WebCore::compileTransitionPropertiesInStyle):
(WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
(WebCore::AnimationTimeline::updateCSSTransitionsForElement):
* animation/AnimationTimeline.h:

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

3 months agoXMLHttpRequest.responseXML url should be the HTTP response URL
youenn@apple.com [Thu, 24 Oct 2019 16:24:00 +0000 (16:24 +0000)]
XMLHttpRequest.responseXML url should be the HTTP response URL
https://bugs.webkit.org/show_bug.cgi?id=203289

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt:
* web-platform-tests/xhr/responsexml-document-properties-expected.txt:

Source/WebCore:

Follow https://xhr.spec.whatwg.org/#document-response step 9.
Covered by rebased tests.

* xml/XMLHttpRequest.cpp:

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

3 months agoRemoving expectations for legacy-animation-engine/compositing/backing/transform-trans...
tsavell@apple.com [Thu, 24 Oct 2019 16:12:48 +0000 (16:12 +0000)]
Removing expectations for legacy-animation-engine/compositing/backing/transform-transition-from-outside-view.html
https://bugs.webkit.org/show_bug.cgi?id=203225

unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 months agoMove property cascade out of StyleResolver
antti@apple.com [Thu, 24 Oct 2019 16:06:56 +0000 (16:06 +0000)]
Move property cascade out of StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=203361

Reviewed by Zalan Bujtas.

Rename StyleResolver::CascadedProperties -> Style::PropertyCascade and move it into a file of its own.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::cascadedPropertiesForRollback):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::applyCascadedPropertiesImpl):
(WebCore::shouldApplyPropertyInParseOrder): Deleted.
(WebCore::isValidMarkerStyleProperty): Deleted.
(WebCore::isValidCueStyleProperty): Deleted.
(WebCore::StyleResolver::CascadedProperties::CascadedProperties): Deleted.
(WebCore::StyleResolver::CascadedProperties::hasProperty const): Deleted.
(WebCore::StyleResolver::CascadedProperties::property): Deleted.
(WebCore::StyleResolver::CascadedProperties::hasCustomProperty const): Deleted.
(WebCore::StyleResolver::CascadedProperties::customProperty const): Deleted.
(WebCore::StyleResolver::CascadedProperties::setPropertyInternal): Deleted.
(WebCore::StyleResolver::CascadedProperties::set): Deleted.
(WebCore::StyleResolver::CascadedProperties::setDeferred): Deleted.
(WebCore::StyleResolver::CascadedProperties::addMatch): Deleted.
(WebCore::declarationsForCascadeLevel): Deleted.
(WebCore::StyleResolver::CascadedProperties::addNormalMatches): Deleted.
(WebCore::hasImportantProperties): Deleted.
(WebCore::StyleResolver::CascadedProperties::addImportantMatches): Deleted.
(WebCore::StyleResolver::CascadedProperties::applyDeferredProperties): Deleted.
(WebCore::StyleResolver::CascadedProperties::Property::apply): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::authorRollback const):
(WebCore::StyleResolver::State::userRollback const):
(WebCore::StyleResolver::State::setAuthorRollback):
(WebCore::StyleResolver::State::setUserRollback):
(WebCore::StyleResolver::CascadedProperties::customProperties): Deleted.
(WebCore::StyleResolver::cascadeLevel const): Deleted.
(WebCore::StyleResolver::setCascadeLevel): Deleted.
* style/PropertyCascade.cpp: Added.
(WebCore::Style::shouldApplyPropertyInParseOrder):
(WebCore::Style::isValidMarkerStyleProperty):
(WebCore::Style::isValidCueStyleProperty):
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::setPropertyInternal):
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::declarationsForCascadeLevel):
(WebCore::Style::PropertyCascade::addNormalMatches):
(WebCore::Style::hasImportantProperties):
(WebCore::Style::PropertyCascade::addImportantMatches):
(WebCore::Style::PropertyCascade::applyDeferredProperties):
(WebCore::Style::PropertyCascade::Property::apply):
* style/PropertyCascade.h: Added.
(WebCore::Style::PropertyCascade::customProperties):
(WebCore::Style::PropertyCascade::hasProperty const):
(WebCore::Style::PropertyCascade::property):
(WebCore::Style::PropertyCascade::hasCustomProperty const):
(WebCore::Style::PropertyCascade::customProperty const):

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

3 months agoREGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow...
tsavell@apple.com [Thu, 24 Oct 2019 15:52:56 +0000 (15:52 +0000)]
REGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow-selection.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=203366

Unreviewed test gardening

* platform/ios/TestExpectations:

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

3 months agoAudioContext should not prevent entering the back/forward cache
cdumez@apple.com [Thu, 24 Oct 2019 14:39:09 +0000 (14:39 +0000)]
AudioContext should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203102

Reviewed by Geoffrey Garen.

Source/WebCore:

Allow pages with AudioContexts that are rendering in the back/forward cache.
Upon entering the back/forward cache, we suspend rendering and update IsPlaying
state so that the browser no longer shows the "Audio Playing" icon. Upon restoring
from the back/forward cache, we resume rendering and update IsPlaying state again
so that the browser shows the "Audio Playing" icon again. I tested it on:
- http://webaudioplayground.appspot.com

With regards to events dispatching, the AudioContext class is already using a
GenericEventQueue that properly delays event dispatching while in the back/forward
cache.

No new tests, updated existing test.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::suspend):
(WebCore::AudioContext::resume):
(WebCore::AudioContext::suspendRendering):
(WebCore::AudioContext::resumeRendering):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:

LayoutTests:

Update layout test coverage.

* fast/history/page-cache-running-audiocontext-expected.txt:
* fast/history/page-cache-running-audiocontext.html:

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

3 months ago[Web Animations] Update WPT tests related to Web Animations and remove imported Mozil...
commit-queue@webkit.org [Thu, 24 Oct 2019 13:25:16 +0000 (13:25 +0000)]
[Web Animations] Update WPT tests related to Web Animations and remove imported Mozilla tests
https://bugs.webkit.org/show_bug.cgi?id=203291

Patch by Antoine Quint <graouts@apple.com> on 2019-10-24
Reviewed by Youenn Fablet.

LayoutTests/imported/mozilla:

* css-animations/test_animation-cancel-expected.txt: Removed.
* css-animations/test_animation-cancel.html: Removed.
* css-animations/test_animation-currenttime-expected.txt: Removed.
* css-animations/test_animation-currenttime.html: Removed.
* css-animations/test_animation-finish-expected.txt: Removed.
* css-animations/test_animation-finish.html: Removed.
* css-animations/test_animation-finished-expected.txt: Removed.
* css-animations/test_animation-finished.html: Removed.
* css-animations/test_animation-id.html: Removed.
* css-animations/test_animation-pausing.html: Removed.
* css-animations/test_animation-playstate.html: Removed.
* css-animations/test_animation-ready.html: Removed.
* css-animations/test_animation-reverse-expected.txt: Removed.
* css-animations/test_animation-reverse.html: Removed.
* css-animations/test_animation-starttime-expected.txt: Removed.
* css-animations/test_animation-starttime.html: Removed.
* css-animations/test_animations-dynamic-changes.html: Removed.
* css-animations/test_event-dispatch.html: Removed.
* css-animations/test_event-order-expected.txt: Removed.
* css-animations/test_event-order.html: Removed.
* css-animations/test_setting-effect.html: Removed.
* css-transitions/test_animation-cancel.html: Removed.
* css-transitions/test_animation-currenttime-expected.txt: Removed.
* css-transitions/test_animation-currenttime.html: Removed.
* css-transitions/test_animation-finished-expected.txt: Removed.
* css-transitions/test_animation-finished.html: Removed.
* css-transitions/test_animation-pausing-expected.txt: Removed.
* css-transitions/test_animation-pausing.html: Removed.
* css-transitions/test_animation-ready-expected.txt: Removed.
* css-transitions/test_animation-ready.html: Removed.
* css-transitions/test_animation-starttime-expected.txt: Removed.
* css-transitions/test_animation-starttime.html: Removed.
* css-transitions/test_csstransition-transitionproperty.html: Removed.
* css-transitions/test_document-get-animations-expected.txt: Removed.
* css-transitions/test_document-get-animations.html: Removed.
* css-transitions/test_element-get-animations-expected.txt: Removed.
* css-transitions/test_element-get-animations.html: Removed.
* css-transitions/test_event-dispatch.html: Removed.
* css-transitions/test_keyframeeffect-getkeyframes-expected.txt: Removed.
* css-transitions/test_keyframeeffect-getkeyframes.html: Removed.
* css-transitions/test_setting-effect-expected.txt: Removed.
* css-transitions/test_setting-effect.html: Removed.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/css/css-animations: Resynced.
* web-platform-tests/css/css-transitions: Imported.
* web-platform-tests/web-animations: Resynced.

LayoutTests:

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* platform/mac-wk1/TestExpectations:
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/win/TestExpectations:
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* tests-options.json:

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

3 months ago[GTK][WPE] Enable runtime setting with experimental features for Server Timing API
clopez@igalia.com [Thu, 24 Oct 2019 11:26:22 +0000 (11:26 +0000)]
[GTK][WPE] Enable runtime setting with experimental features for Server Timing API
https://bugs.webkit.org/show_bug.cgi?id=203295

Reviewed by Carlos Garcia Campos.

Enable the runtime ServerTiming by default when GTK or WPE is built
with experimental features enabled.

No new tests, no change in behaviour for WTR.

* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.h:

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

3 months ago[JSC] Get 32-bit ports back into building order
zandobersek@gmail.com [Thu, 24 Oct 2019 09:06:58 +0000 (09:06 +0000)]
[JSC] Get 32-bit ports back into building order
https://bugs.webkit.org/show_bug.cgi?id=203358

Reviewed by Carlos Garcia Campos.

Get JSC building again on 32-bit architectures after changes in r251468.
Some 32-bit code in LLint and JIT is brought back, and additional casts
around BytecodeIndex construction are added as necessary.

* dfg/DFGOSRExit.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::setCurrentVPC):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
* jit/JITInlines.h:
(JSC::JIT::updateTopCallFrame):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_log_shadow_chicken_tail):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

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

3 months agoDisable pichdr generation on MIPS for return location labels
commit-queue@webkit.org [Thu, 24 Oct 2019 08:36:00 +0000 (08:36 +0000)]
Disable pichdr generation on MIPS for return location labels
https://bugs.webkit.org/show_bug.cgi?id=203040

Patch by Paulo Matos <pmatos@igalia.com> on 2019-10-24
Reviewed by Yusuke Suzuki.

Disable generation of pichdr for return location labels generated in
defineOSRExitReturnLabel. Since r250806 (Allow OSR exit to the LLInt),
MIPS was segfaulting since the pichdr after an OSR exit was corruption
the gp register.

* offlineasm/mips.rb:

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

3 months agoMove MatchResult and related types out of StyleResolver
antti@apple.com [Thu, 24 Oct 2019 08:18:36 +0000 (08:18 +0000)]
Move MatchResult and related types out of StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=203252

Reviewed by Zalan Bujtas.

Reverse the dependency between StyleResolver and ElementRuleCollector so that the former depends on the latter.
This makes the code easier to understand and enables further cleanups.

The patch also gets rid of the confusing RuleRange objects in fovor of splitting declarations from different cascade levels to separate vectors.
The desired cascade level is indicated with an enum instead of a range.

There is also some general modernization.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchResult const):
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::transferMatchedRules):
(WebCore::ElementRuleCollector::matchAllRules):
(WebCore::ElementRuleCollector::addMatchedProperties):
(WebCore::ElementRuleCollector::matchedResult): Deleted.
* css/ElementRuleCollector.h:
(WebCore::PseudoStyleRequest::PseudoStyleRequest):
(WebCore::MatchResult::isEmpty const):
(WebCore::operator==):
(WebCore::operator!=):
* css/PageRuleCollector.cpp:
(WebCore::PageRuleCollector::matchPageRules):
* css/PageRuleCollector.h:
(WebCore::PageRuleCollector::matchResult const):
(WebCore::PageRuleCollector::matchedResult): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::computeMatchedPropertiesHash):
(WebCore::StyleResolver::findFromMatchedPropertiesCache):
(WebCore::extractDirectionAndWritingMode):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::cascadedPropertiesForRollback):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::declarationsForCascadeLevel):
(WebCore::StyleResolver::CascadedProperties::addNormalMatches):
(WebCore::StyleResolver::CascadedProperties::addImportantMatches):
(WebCore::StyleResolver::MatchResult::addMatchedProperties): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.
(WebCore::cascadeLevelForIndex): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::MatchedPropertiesCacheItem::MatchedPropertiesCacheItem):
(WebCore::PseudoStyleRequest::PseudoStyleRequest): Deleted.
(WebCore::StyleResolver::RuleRange::RuleRange): Deleted.
(WebCore::StyleResolver::MatchRanges::MatchRanges): Deleted.
(WebCore::StyleResolver::MatchRanges::UARuleRange): Deleted.
(WebCore::StyleResolver::MatchRanges::authorRuleRange): Deleted.
(WebCore::StyleResolver::MatchRanges::userRuleRange): Deleted.
(WebCore::StyleResolver::MatchResult::MatchResult): Deleted.
(WebCore::StyleResolver::MatchResult::matchedProperties const): Deleted.
(WebCore::StyleResolver::isRightPage const): Deleted.

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

3 months agoWeb Inspector: provide a way to inject "bootstrap" JavaScript into the page as the...
drousso@apple.com [Thu, 24 Oct 2019 06:54:49 +0000 (06:54 +0000)]
Web Inspector: provide a way to inject "bootstrap" JavaScript into the page as the first script executed
https://bugs.webkit.org/show_bug.cgi?id=195847
<rdar://problem/48950551>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When debugging webpages, it's often useful to be able to swizzle various functions in order
to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
this can be difficult, such as if the page saves a copy of the function and references that
instead, in which case it would be helpful to have a way to guarantee that the swizzled code
is the first thing evaluated after the context is created.

This change adds support for that concept, which has been named Inspector Bootstrap Script.
Once created, it will be injected as the first user script to every new global object that
is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
new global objects created _after_ the modification happened.

* inspector/protocol/Page.json:
Add `setBoostrapScript` command.

Source/WebCore:

When debugging webpages, it's often useful to be able to swizzle various functions in order
to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
this can be difficult, such as if the page saves a copy of the function and references that
instead, in which case it would be helpful to have a way to guarantee that the swizzled code
is the first thing evaluated after the context is created.

This change adds support for that concept, which has been named Inspector Bootstrap Script.
Once created, it will be injected as the first user script to every new global object that
is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
new global objects created _after_ the modification happened.

Tests: inspector/page/setBootstrapScript-main-frame.html
       inspector/page/setBootstrapScript-sub-frame.html

* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::setBootstrapScript): Added.
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld): Added.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
* inspector/agents/page/PageDebuggerAgent.h:
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::didClearWindowObjectInWorld): Added.
(WebCore::PageDebuggerAgent::didClearMainFrameWindowObject): Deleted.
* inspector/agents/page/PageRuntimeAgent.h:
* inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didClearWindowObjectInWorld): Added.
(WebCore::PageRuntimeAgent::didCreateMainWorldContext): Deleted.
Rename existing global object creation "notifications" for more consistency between agents.

Source/WebInspectorUI:

When debugging webpages, it's often useful to be able to swizzle various functions in order
to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
this can be difficult, such as if the page saves a copy of the function and references that
instead, in which case it would be helpful to have a way to guarantee that the swizzled code
is the first thing evaluated after the context is created.

This change adds support for that concept, which has been named Inspector Bootstrap Script.
Once created, it will be injected as the first user script to every new global object that
is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
new global objects created _after_ the modification happened.

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsBootstrapScript): Added.
(WI.NetworkManager.get bootstrapScriptURL): Added.
(WI.NetworkManager.get bootstrapScriptSourceObjectStoreKey): Added.
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get bootstrapScript): Added.
(WI.NetworkManager.prototype.get bootstrapScriptEnabled): Added.
(WI.NetworkManager.prototype.set bootstrapScriptEnabled): Added.
(WI.NetworkManager.prototype.async createBootstrapScript): Added.
(WI.NetworkManager.prototype.destroyBootstrapScript): Added.
(WI.NetworkManager.prototype._processServiceWorkerConfiguration):
(WI.NetworkManager.prototype._handleBootstrapScriptContentDidChange): Added.

* UserInterface/Models/LocalScript.js:
(WI.LocalScript):
(WI.LocalScript.prototype.get editable): Added.
(WI.LocalScript.prototype.get supportsScriptBlackboxing): Added.
(WI.LocalScript.prototype.requestContentFromBackend):
(WI.LocalScript.prototype.handleCurrentRevisionContentChange): Added.
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView):
(WI.ScriptContentView.prototype._contentWillPopulate):
(WI.ScriptContentView.prototype._contentDidPopulate):
(WI.ScriptContentView.prototype._handleTextEditorContentDidChange): Added.
Support editing of `WI.LocalScript` that are specifically marked as such.

* UserInterface/Models/Script.js:
(WI.Script):
(WI.Script.prototype.get displayName):
(WI.Script.prototype.get displayURL):
(WI.Script.prototype.isMainResource):
(WI.Script.prototype._resolveResource):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
(WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
(WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
Allow a `WI.Script` to not have an associated `WI.Target`, specifically for `WI.LocalScript`.

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalOverride): Added.
(WI.SourcesNavigationSidebarPanel.prototype._removeResourceOverride): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleBootstrapScriptCreated): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleBootstrapScriptDestroyed): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride): Removed.
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride): Removed.
Add an item in the create resource context menu for creating/focusing the bootstrap script.

* UserInterface/Views/ScriptTreeElement.js:
(WI.ScriptTreeElement):
* UserInterface/Views/BootstrapScriptTreeElement.js: Added.
(WI.BootstrapScriptTreeElement):
(WI.BootstrapScriptTreeElement.prototype.onattach):
(WI.BootstrapScriptTreeElement.prototype.ondetach):
(WI.BootstrapScriptTreeElement.prototype.ondelete):
(WI.BootstrapScriptTreeElement.prototype.onspace):
(WI.BootstrapScriptTreeElement.prototype.canSelectOnMouseDown):
(WI.BootstrapScriptTreeElement.prototype.populateContextMenu):
(WI.BootstrapScriptTreeElement.prototype.updateStatus):
(WI.BootstrapScriptTreeElement.prototype._handleNetworkManagerBootstrapScriptToggled):
* UserInterface/Views/BootstrapScriptTreeElement.css: Added.
(.item.script.bootstrap .status > input[type="checkbox"]):
* UserInterface/Views/LocalResourceOverrideTreeElement.css:
(.item.resource.override .status > input[type="checkbox"]): Added.
(.item.resource.override .status > div): Removed.
Don't show the full bootstrap script URL. Instead, show "Inspector Bootstrap Script".

* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype.didPresentDialog):
Show the bootstrap script in the open resource dialog.

* UserInterface/Base/Utilities.js:
(isWebInspectorBootstrapScript): Added.

* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.scriptDidFail):

* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore.static _open):
(WI.ObjectStore.prototype.async get): Added.
Add a generalized object store that can be used for one-off values that need the larger
storage capacity of `IndexedDB`.

* .eslintrc:
* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/page/setBootstrapScript-main-frame.html: Added.
* inspector/page/setBootstrapScript-main-frame-expected.txt: Added.
* inspector/page/setBootstrapScript-sub-frame.html: Added.
* inspector/page/setBootstrapScript-sub-frame-expected.txt: Added.
* inspector/page/resources/bootstrap-iframe.html: Added.

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

3 months ago[Picture-in-Picture Web API] Implement EnterPictureInPictureEvent support
commit-queue@webkit.org [Thu, 24 Oct 2019 06:34:07 +0000 (06:34 +0000)]
[Picture-in-Picture Web API] Implement EnterPictureInPictureEvent support
https://bugs.webkit.org/show_bug.cgi?id=202616

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

Implement the support for enterpictureinpicture and leavepictureinpicture events.
- Add a public method schduleEvent() to HTMLMediaElement in order to fire enterpictureinpicture
event which includes properties.
- In order to notify the observer (HTMLVideoElementPictureInPicture) after entering picture-in-picture
transition is completed and the picture-in-picture window size information is available,
we have to change setVideoFullscreenFrame() to virtual in HTMLMediaElement and implement it in
HTMLVideoElement to track the transition state.
- The PictureInPictureWindow does not need to ba an ActiveDOMObject, so it is updated accordingly.

With manual tests, the implementation passes LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/enter-picture-in-picture.html
and LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/leave-picture-in-picture.html.

* Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
(WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::pictureInPictureWindowResized):
* Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
* Modules/pictureinpicture/PictureInPictureWindow.cpp:
(WebCore::PictureInPictureWindow::PictureInPictureWindow):
(WebCore::PictureInPictureWindow::activeDOMObjectName const): Deleted.
(WebCore::PictureInPictureWindow::eventTargetInterface const): Deleted.
(WebCore::PictureInPictureWindow::scriptExecutionContext const): Deleted.
* Modules/pictureinpicture/PictureInPictureWindow.h:
* Modules/pictureinpicture/PictureInPictureWindow.idl:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::scheduleEvent):
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::fullscreenModeChanged):
(WebCore::HTMLVideoElement::didBecomeFullscreenElement):
(WebCore::HTMLVideoElement::setVideoFullscreenFrame):
* html/HTMLVideoElement.h:
* platform/PictureInPictureObserver.h:

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

3 months ago[JSC] Remove wasmAwareLexicalGlobalObject
ysuzuki@apple.com [Thu, 24 Oct 2019 05:34:21 +0000 (05:34 +0000)]
[JSC] Remove wasmAwareLexicalGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=203351

Reviewed by Mark Lam.

Source/JavaScriptCore:

CallFrame::lexicalGlobalObject() is no longer called frequently. We can just make the current wasmAwareLexicalGlobalObject as CallFrame::lexicalGlobalObject,
and remove wasmAwareLexicalGlobalObject function.

* debugger/Debugger.cpp:
(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::breakProgram):
(JSC::lexicalGlobalObjectForCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::deprecatedVMEntryGlobalObject const):
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::thisValue const):
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):
* debugger/DebuggerCallFrame.h:
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::thisObject const):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::thisValue const):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::lexicalGlobalObjectFromWasmCallee const):
(JSC::CallFrame::wasmAwareLexicalGlobalObject): Deleted.
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::debug):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::createArguments):
* interpreter/StackVisitor.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_throw_stack_overflow_error):
* runtime/JSFunction.cpp:
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor):
(JSC::RetrieveArgumentsFunctor::operator() const):
(JSC::retrieveArguments):
* runtime/JSScope.h:
(JSC::CallFrame::lexicalGlobalObject const):
* runtime/RegExpInlines.h:
(JSC::RegExp::matchInline):
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):

Source/WebCore:

* bindings/js/CommonVM.cpp:
(WebCore::lexicalFrameFromCommonVM):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::responsibleDocument):
* bindings/js/StructuredClone.cpp:
(WebCore::cloneArrayBufferImpl):
* dom/Document.cpp:
(WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):
(WebCore::Internals::isFromCurrentWorld const):

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

3 months agoNotification should not prevent entering the back/forward cache
cdumez@apple.com [Thu, 24 Oct 2019 04:01:30 +0000 (04:01 +0000)]
Notification should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203099
<rdar://problem/56557479>

Reviewed by Geoffrey Garen.

Source/WebCore:

Notifications currently displayed were preventing a page from entering the back/forward cache.
Instead, we now make sure to close any visible notification upon suspension. Since closing
a notification will fire events, we also schedule tasks on the window event loop to fire those
events, instead of firing these events synchronously. The Window event loop takes care of delaying
those events if the document is suspended.

Test: fast/history/page-cache-notification-showing.html

* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
(WebCore::Notification::show):
(WebCore::Notification::close):
(WebCore::Notification::document const):
(WebCore::Notification::activeDOMObjectName const):
(WebCore::Notification::stop):
(WebCore::Notification::suspend):
(WebCore::Notification::queueTask):
(WebCore::Notification::dispatchShowEvent):
(WebCore::Notification::dispatchClickEvent):
(WebCore::Notification::dispatchCloseEvent):
(WebCore::Notification::dispatchErrorEvent):
* Modules/notifications/Notification.h:
* dom/AbstractEventLoop.h:

LayoutTests:

Add layout test coverage.

* fast/history/page-cache-notification-non-suspendable-expected.txt: Removed.
* fast/history/page-cache-notification-non-suspendable.html: Removed.
* fast/history/page-cache-notification-showing-expected.txt: Added.
* fast/history/page-cache-notification-showing.html: Added.

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

3 months ago[SVG2] Fix SVGSVGElement to conform with SVG2
commit-queue@webkit.org [Thu, 24 Oct 2019 03:42:59 +0000 (03:42 +0000)]
[SVG2] Fix SVGSVGElement to conform with SVG2
https://bugs.webkit.org/show_bug.cgi?id=203278

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-10-23
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/svg/historical-expected.txt:
* web-platform-tests/svg/idlharness.window-expected.txt:
Some sub-tests are passing now with this change.

Source/WebCore:

The interface of SVGSVGElement is defined here:
    https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement

-- Delete the viewport attribute.
-- Delete the attributes contentScriptType and contentStyleType.
-- Delete pixelUnitxxx() and screenPixelxxx() functions.
-- Make the SVGElement argument to checkIntersection() and
   checkEnclosure() be non-optional.

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):
(WebCore::SVGSVGElement::contentScriptType const): Deleted.
(WebCore::SVGSVGElement::setContentScriptType): Deleted.
(WebCore::SVGSVGElement::contentStyleType const): Deleted.
(WebCore::SVGSVGElement::setContentStyleType): Deleted.
(WebCore::SVGSVGElement::viewport const): Deleted.
(WebCore::SVGSVGElement::pixelUnitToMillimeterX const): Deleted.
(WebCore::SVGSVGElement::pixelUnitToMillimeterY const): Deleted.
(WebCore::SVGSVGElement::screenPixelToMillimeterX const): Deleted.
(WebCore::SVGSVGElement::screenPixelToMillimeterY const): Deleted.
(WebCore::SVGSVGElement::suspendRedraw): Deleted.
(WebCore::SVGSVGElement::unsuspendRedraw): Deleted.
(WebCore::SVGSVGElement::unsuspendRedrawAll): Deleted.
(WebCore::SVGSVGElement::forceRedraw): Deleted.
* svg/SVGSVGElement.h:
* svg/SVGSVGElement.idl:

LayoutTests:

* svg/custom/immutable-properties-expected.txt:
* svg/custom/immutable-properties.html:
SVGSVGElement.viewport has to be removed.

* svg/custom/intersection-list-null-expected.txt: Removed.
* svg/custom/intersection-list-null.svg: Removed.
The specs state that the SVGElement argument to checkIntersection() and
checkEnclosure() is not optional. This test was testing the argument
optional case.

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

3 months ago[iOS 13] imported/mozilla/svg/text/textpath-selection.svg is flaky
wenson_hsieh@apple.com [Thu, 24 Oct 2019 03:25:35 +0000 (03:25 +0000)]
[iOS 13] imported/mozilla/svg/text/textpath-selection.svg is flaky
https://bugs.webkit.org/show_bug.cgi?id=203247
<rdar://problem/52124292>

Reviewed by Tim Horton.

Tools:

Roughly 1 in 3000 runs, this test fails due to an image diff, where only the expectation or test page shows a
native selection view on iOS. Both the test and expectation create DOM selections on the page, which is then
followed by a native selection view on the page at some point in the future.

This "point in the future" depends on both WebKit implementation details (i.e. when the next remote layer tree
commit happens) as well as UIKit implementation details (for example, many methods in UITextSelectionView and
UIWKTextInteractionAssistant will schedule changes to UIView geometry using a runloop timer, instead of applying
the updates immediately). Because of the latter, it's impractical to expect native selection views on iOS to
always appear or not appear after finishing this layout test.

To mitigate this rare source of flakiness, we hide these native text selection views when snapshotting iOS
WKWebViews for the purposes of ref and pixel testing.

Note that we still have a considerable number of layout tests that inspect these native selection views on iOS,
but they work by waiting until the native selection views reach a particular state (e.g. by polling for the
number of ranged selection subviews, or the presence of selection handles, or waiting for a caret selection with
a given geometry, etc.), which ensures that they are robust against subtle changes to the timing of selection
updates in the UI process.

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

LayoutTests:

Remove the failing test expectation. See Tools/ChangeLog for more details.

* platform/ios-wk2/TestExpectations:

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

3 months agoUndo incidental change from BytecodeIndex class patch
keith_miller@apple.com [Thu, 24 Oct 2019 03:09:13 +0000 (03:09 +0000)]
Undo incidental change from BytecodeIndex class patch
https://bugs.webkit.org/show_bug.cgi?id=203339

Reviewed by Mark Lam.

JSTests:

* stress/error-source-location-assertion.js: Added.

Source/JavaScriptCore:

It's not totally clear why we need to claim our bytecode index is
0 when we can't figure what the true index is. I'd rather unbreak
our build for now, however, and fix the underlying issue in
https://bugs.webkit.org/show_bug.cgi?id=203340

* runtime/Error.cpp:
(JSC::getBytecodeIndex):

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

3 months agoUnreviewed build fix after r251509.
cdumez@apple.com [Thu, 24 Oct 2019 02:31:12 +0000 (02:31 +0000)]
Unreviewed build fix after r251509.

* Modules/entriesapi/FileSystemDirectoryEntry.cpp:

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

3 months agoWebBackForwardCache::removeEntriesMatching() may re-enter and crash
cdumez@apple.com [Thu, 24 Oct 2019 02:29:24 +0000 (02:29 +0000)]
WebBackForwardCache::removeEntriesMatching() may re-enter and crash
https://bugs.webkit.org/show_bug.cgi?id=203341
<rdar://problem/56553939>

Reviewed by Geoffrey Garen.

Source/WebKit:

When WebBackForwardCache::removeEntriesMatching() was clearing the WebBackForwardListItem's
WebBackForwardCacheEntry, it could destroyed a SuspendedPageProxy which could shutdown a
WebProcess. Upon shutting down, we would try to remove WebBackForwardCache entries associated
with a given process, re-enter removeEntriesMatching() and crash.

To address the issue, I made WebBackForwardCache::removeEntriesMatching() safe to re-enter.
We now clear the WebBackForwardListItems' WebBackForwardCacheEntries only after we're done
updating m_itemsWithCachedPage.

* UIProcess/WebBackForwardCache.cpp:
(WebKit::WebBackForwardCache::removeEntriesMatching):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

3 months agoRename force-press-related functions to refer to context menus, and fix a former...
megan_gardner@apple.com [Thu, 24 Oct 2019 02:22:45 +0000 (02:22 +0000)]
Rename force-press-related functions to refer to context menus, and fix a former force-press test
https://bugs.webkit.org/show_bug.cgi?id=202663
<rdar://problem/52699530>

Reviewed by Dean Jackson.

Source/WebKit:

Add plumbing for contextMenu tests to function again, and rename all
relevant fuctions to more correctly reflect that this does not specifically
require a force press to activate any longer.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didShowContextMenu]):
(-[WKWebView _didDismissContextMenu]):
(-[WKWebView _didShowForcePressPreview]): Deleted.
(-[WKWebView _didDismissForcePressPreview]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemControllerDidCancelPreview:]):

Tools:

Rename all relevant fuctions to more correctly reflect that this does not specifically
require a force press to activate any longer.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptContext.h:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setDidShowContextMenuCallback):
(WTR::UIScriptController::didShowContextMenuCallback const):
(WTR::UIScriptController::setDidDismissContextMenuCallback):
(WTR::UIScriptController::didDismissContextMenuCallback const):
(WTR::UIScriptController::setDidShowForcePressPreviewCallback): Deleted.
(WTR::UIScriptController::didShowForcePressPreviewCallback const): Deleted.
(WTR::UIScriptController::setDidDismissForcePressPreviewCallback): Deleted.
(WTR::UIScriptController::didDismissForcePressPreviewCallback const): Deleted.
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView resetInteractionCallbacks]):
(-[TestRunnerWKWebView _didShowContextMenu]):
(-[TestRunnerWKWebView _didDismissContextMenu]):
(-[TestRunnerWKWebView _didShowForcePressPreview]): Deleted.
(-[TestRunnerWKWebView _didDismissForcePressPreview]): Deleted.
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::setDidShowContextMenuCallback):
(WTR::UIScriptControllerIOS::setDidDismissContextMenuCallback):
(WTR::UIScriptControllerIOS::setDidShowForcePressPreviewCallback): Deleted.
(WTR::UIScriptControllerIOS::setDidDismissForcePressPreviewCallback): Deleted.

LayoutTests:

Move and rename force press test to correctly test context menu functionality.

* fast/events/touch/ios/long-press-on-link-expected.txt: Renamed from LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link-expected.txt.
* fast/events/touch/ios/long-press-on-link.html: Added.
* platform/iphone-7/fast/events/touch/force-press-on-link.html: Removed.
* resources/ui-helper.js:
(window.UIHelper.longPressAndGetContextMenuContentAt.return.new.Promise.):
(window.UIHelper.longPressAndGetContextMenuContentAt.return.new.Promise):
(window.UIHelper.longPressAndGetContextMenuContentAt):
(window.UIHelper.waitForInputSessionAt.return.new.Promise.):
(window.UIHelper.waitForInputSessionAt.return.new.Promise):
(window.UIHelper.waitForInputSessionAt):

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

3 months agoImport the css/css-values web platform tests
simon.fraser@apple.com [Thu, 24 Oct 2019 01:44:56 +0000 (01:44 +0000)]
Import the css/css-values web platform tests
https://bugs.webkit.org/show_bug.cgi?id=203342

Reviewed by Dean Jackson.
LayoutTests/imported/w3c:

Import wpt revision e68120da0fb52f010f206f3ecc63cfa09885b0f4 (Wed Oct 23 13:18:06 2019 -0700)
css-values tests.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-values/META.yml: Added.
* web-platform-tests/css/css-values/absolute-length-units-001-expected.txt: Added.
* web-platform-tests/css/css-values/absolute-length-units-001.html: Added.
* web-platform-tests/css/css-values/absolute_length_units-expected.txt: Added.
* web-platform-tests/css/css-values/absolute_length_units.html: Added.
* web-platform-tests/css/css-values/angle-units-001-expected.xht: Added.
* web-platform-tests/css/css-values/angle-units-001.html: Added.
* web-platform-tests/css/css-values/angle-units-002-expected.xht: Added.
* web-platform-tests/css/css-values/angle-units-002.html: Added.
* web-platform-tests/css/css-values/angle-units-003-expected.xht: Added.
* web-platform-tests/css/css-values/angle-units-003.html: Added.
* web-platform-tests/css/css-values/angle-units-004-expected.xht: Added.
* web-platform-tests/css/css-values/angle-units-004.html: Added.
* web-platform-tests/css/css-values/angle-units-005-expected.xht: Added.
* web-platform-tests/css/css-values/angle-units-005.html: Added.
* web-platform-tests/css/css-values/attr-color-invalid-cast-expected.html: Added.
* web-platform-tests/css/css-values/attr-color-invalid-cast.html: Added.
* web-platform-tests/css/css-values/attr-color-invalid-fallback-expected.html: Added.
* web-platform-tests/css/css-values/attr-color-invalid-fallback.html: Added.
* web-platform-tests/css/css-values/attr-color-valid-expected.html: Added.
* web-platform-tests/css/css-values/attr-color-valid.html: Added.
* web-platform-tests/css/css-values/attr-in-max-expected.html: Added.
* web-platform-tests/css/css-values/attr-in-max.html: Added.
* web-platform-tests/css/css-values/attr-invalid-type-001-expected.html: Added.
* web-platform-tests/css/css-values/attr-invalid-type-001.html: Added.
* web-platform-tests/css/css-values/attr-invalid-type-002-expected.html: Added.
* web-platform-tests/css/css-values/attr-invalid-type-002.html: Added.
* web-platform-tests/css/css-values/attr-invalid-type-008-expected.xht: Added.
* web-platform-tests/css/css-values/attr-invalid-type-008.html: Added.
* web-platform-tests/css/css-values/attr-length-invalid-cast-expected.html: Added.
* web-platform-tests/css/css-values/attr-length-invalid-cast.html: Added.
* web-platform-tests/css/css-values/attr-length-invalid-fallback-expected.html: Added.
* web-platform-tests/css/css-values/attr-length-invalid-fallback.html: Added.
* web-platform-tests/css/css-values/attr-length-valid-expected.html: Added.
* web-platform-tests/css/css-values/attr-length-valid-zero-expected.html: Added.
* web-platform-tests/css/css-values/attr-length-valid-zero-nofallback-expected.html: Added.
* web-platform-tests/css/css-values/attr-length-valid-zero-nofallback.html: Added.
* web-platform-tests/css/css-values/attr-length-valid-zero.html: Added.
* web-platform-tests/css/css-values/attr-length-valid.html: Added.
* web-platform-tests/css/css-values/attr-px-invalid-cast-expected.html: Added.
* web-platform-tests/css/css-values/attr-px-invalid-cast.html: Added.
* web-platform-tests/css/css-values/attr-px-invalid-fallback-expected.html: Added.
* web-platform-tests/css/css-values/attr-px-invalid-fallback.html: Added.
* web-platform-tests/css/css-values/attr-px-valid-expected.html: Added.
* web-platform-tests/css/css-values/attr-px-valid.html: Added.
* web-platform-tests/css/css-values/calc-angle-values-expected.txt: Added.
* web-platform-tests/css/css-values/calc-angle-values.html: Added.
* web-platform-tests/css/css-values/calc-background-position-002-expected.txt: Added.
* web-platform-tests/css/css-values/calc-background-position-002.html: Added.
* web-platform-tests/css/css-values/calc-background-position-003-expected.txt: Added.
* web-platform-tests/css/css-values/calc-background-position-003.html: Added.
* web-platform-tests/css/css-values/calc-ch-ex-lang-expected.html: Added.
* web-platform-tests/css/css-values/calc-ch-ex-lang.html: Added.
* web-platform-tests/css/css-values/calc-in-calc-expected.html: Added.
* web-platform-tests/css/css-values/calc-in-calc.html: Added.
* web-platform-tests/css/css-values/calc-in-color-001-expected.txt: Added.
* web-platform-tests/css/css-values/calc-in-color-001.html: Added.
* web-platform-tests/css/css-values/calc-in-counter-001-expected.xhtml: Added.
* web-platform-tests/css/css-values/calc-in-counter-001.xhtml: Added.
* web-platform-tests/css/css-values/calc-in-font-feature-settings-expected.txt: Added.
* web-platform-tests/css/css-values/calc-in-font-feature-settings.html: Added.
* web-platform-tests/css/css-values/calc-in-max-expected.html: Added.
* web-platform-tests/css/css-values/calc-in-max.html: Added.
* web-platform-tests/css/css-values/calc-in-media-queries-001-expected.html: Added.
* web-platform-tests/css/css-values/calc-in-media-queries-001.html: Added.
* web-platform-tests/css/css-values/calc-in-media-queries-002-expected.html: Added.
* web-platform-tests/css/css-values/calc-in-media-queries-002.html: Added.
* web-platform-tests/css/css-values/calc-integer-expected.txt: Added.
* web-platform-tests/css/css-values/calc-integer.html: Added.
* web-platform-tests/css/css-values/calc-invalid-range-clamping-expected.html: Added.
* web-platform-tests/css/css-values/calc-invalid-range-clamping.html: Added.
* web-platform-tests/css/css-values/calc-letter-spacing-expected.txt: Added.
* web-platform-tests/css/css-values/calc-letter-spacing.html: Added.
* web-platform-tests/css/css-values/calc-min-height-expected.xht: Added.
* web-platform-tests/css/css-values/calc-min-height.html: Added.
* web-platform-tests/css/css-values/calc-nesting-002-expected.txt: Added.
* web-platform-tests/css/css-values/calc-nesting-002.html: Added.
* web-platform-tests/css/css-values/calc-nesting-expected.txt: Added.
* web-platform-tests/css/css-values/calc-nesting.html: Added.
* web-platform-tests/css/css-values/calc-parenthesis-stack-expected.html: Added.
* web-platform-tests/css/css-values/calc-parenthesis-stack.html: Added.
* web-platform-tests/css/css-values/calc-positive-fraction-001-expected.xht: Added.
* web-platform-tests/css/css-values/calc-positive-fraction-001.html: Added.
* web-platform-tests/css/css-values/calc-rem-lang-expected.html: Added.
* web-platform-tests/css/css-values/calc-rem-lang.html: Added.
* web-platform-tests/css/css-values/calc-rgb-percent-001-expected.txt: Added.
* web-platform-tests/css/css-values/calc-rgb-percent-001.html: Added.
* web-platform-tests/css/css-values/calc-rounding-001-expected.txt: Added.
* web-platform-tests/css/css-values/calc-rounding-001.html: Added.
* web-platform-tests/css/css-values/calc-serialization-002-expected.txt: Added.
* web-platform-tests/css/css-values/calc-serialization-002.html: Added.
* web-platform-tests/css/css-values/calc-serialization-expected.txt: Added.
* web-platform-tests/css/css-values/calc-serialization.html: Added.
* web-platform-tests/css/css-values/calc-time-values-expected.txt: Added.
* web-platform-tests/css/css-values/calc-time-values.html: Added.
* web-platform-tests/css/css-values/calc-unit-analysis-expected.txt: Added.
* web-platform-tests/css/css-values/calc-unit-analysis.html: Added.
* web-platform-tests/css/css-values/calc-z-index-fractions-001-expected.txt: Added.
* web-platform-tests/css/css-values/calc-z-index-fractions-001.html: Added.
* web-platform-tests/css/css-values/calc-zero-percent-height-expected.html: Added.
* web-platform-tests/css/css-values/calc-zero-percent-height.html: Added.
* web-platform-tests/css/css-values/ch-unit-001-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-001.html: Added.
* web-platform-tests/css/css-values/ch-unit-002-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-002.html: Added.
* web-platform-tests/css/css-values/ch-unit-003-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-003.html: Added.
* web-platform-tests/css/css-values/ch-unit-004-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-004.html: Added.
* web-platform-tests/css/css-values/ch-unit-008-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-008.html: Added.
* web-platform-tests/css/css-values/ch-unit-009-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-009.html: Added.
* web-platform-tests/css/css-values/ch-unit-010-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-010.html: Added.
* web-platform-tests/css/css-values/ch-unit-011-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-011.html: Added.
* web-platform-tests/css/css-values/ch-unit-012-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-012.html: Added.
* web-platform-tests/css/css-values/ch-unit-013-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-013.html: Added.
* web-platform-tests/css/css-values/ch-unit-014-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-014.html: Added.
* web-platform-tests/css/css-values/ch-unit-015-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-015.html: Added.
* web-platform-tests/css/css-values/ch-unit-016-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-016.html: Added.
* web-platform-tests/css/css-values/ch-unit-017-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-017.html: Added.
* web-platform-tests/css/css-values/ch-unit-018-expected.html: Added.
* web-platform-tests/css/css-values/ch-unit-018.html: Added.
* web-platform-tests/css/css-values/clamp-length-computed-expected.txt: Added.
* web-platform-tests/css/css-values/clamp-length-computed.html: Added.
* web-platform-tests/css/css-values/clamp-length-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/clamp-length-invalid.html: Added.
* web-platform-tests/css/css-values/clamp-length-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/clamp-length-serialize.html: Added.
* web-platform-tests/css/css-values/ex-calc-expression-001-expected.html: Added.
* web-platform-tests/css/css-values/ex-calc-expression-001.html: Added.
* web-platform-tests/css/css-values/ex-unit-001-expected.html: Added.
* web-platform-tests/css/css-values/ex-unit-001.html: Added.
* web-platform-tests/css/css-values/ex-unit-002-expected.html: Added.
* web-platform-tests/css/css-values/ex-unit-002.html: Added.
* web-platform-tests/css/css-values/ex-unit-003-expected.html: Added.
* web-platform-tests/css/css-values/ex-unit-003.html: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-001-expected.txt: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-001.html: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-002-expected.txt: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-002.html: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-003-expected.txt: Added.
* web-platform-tests/css/css-values/getComputedStyle-border-radius-003.html: Added.
* web-platform-tests/css/css-values/ic-unit-001-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-001.html: Added.
* web-platform-tests/css/css-values/ic-unit-002-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-002.html: Added.
* web-platform-tests/css/css-values/ic-unit-003-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-003.html: Added.
* web-platform-tests/css/css-values/ic-unit-004-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-004.html: Added.
* web-platform-tests/css/css-values/ic-unit-008-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-008.html: Added.
* web-platform-tests/css/css-values/ic-unit-009-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-009.html: Added.
* web-platform-tests/css/css-values/ic-unit-010-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-010.html: Added.
* web-platform-tests/css/css-values/ic-unit-011-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-011.html: Added.
* web-platform-tests/css/css-values/ic-unit-012-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-012.html: Added.
* web-platform-tests/css/css-values/initial-background-color-expected.html: Added.
* web-platform-tests/css/css-values/initial-background-color.html: Added.
* web-platform-tests/css/css-values/lh-rlh-on-root-001-expected.txt: Added.
* web-platform-tests/css/css-values/lh-rlh-on-root-001.html: Added.
* web-platform-tests/css/css-values/lh-unit-001-expected.xht: Added.
* web-platform-tests/css/css-values/lh-unit-001.html: Added.
* web-platform-tests/css/css-values/lh-unit-002-expected.xht: Added.
* web-platform-tests/css/css-values/lh-unit-002.html: Added.
* web-platform-tests/css/css-values/line-break-ch-unit-expected.txt: Added.
* web-platform-tests/css/css-values/line-break-ch-unit.html: Added.
* web-platform-tests/css/css-values/max-20-arguments-expected.html: Added.
* web-platform-tests/css/css-values/max-20-arguments.html: Added.
* web-platform-tests/css/css-values/max-length-percent-001-expected.html: Added.
* web-platform-tests/css/css-values/max-length-percent-001.html: Added.
* web-platform-tests/css/css-values/max-unitless-zero-invalid-expected.html: Added.
* web-platform-tests/css/css-values/max-unitless-zero-invalid.html: Added.
* web-platform-tests/css/css-values/min-length-percent-001-expected.html: Added.
* web-platform-tests/css/css-values/min-length-percent-001.html: Added.
* web-platform-tests/css/css-values/min-max-percentage-length-interpolation-expected.html: Added.
* web-platform-tests/css/css-values/min-max-percentage-length-interpolation.html: Added.
* web-platform-tests/css/css-values/minmax-angle-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-angle-computed.html: Added.
* web-platform-tests/css/css-values/minmax-angle-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-angle-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-angle-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-angle-serialize.html: Added.
* web-platform-tests/css/css-values/minmax-integer-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-integer-computed.html: Added.
* web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-computed.html: Added.
* web-platform-tests/css/css-values/minmax-length-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-percent-computed.html: Added.
* web-platform-tests/css/css-values/minmax-length-percent-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-percent-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-percent-serialize.html: Added.
* web-platform-tests/css/css-values/minmax-length-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-length-serialize.html: Added.
* web-platform-tests/css/css-values/minmax-number-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-number-computed.html: Added.
* web-platform-tests/css/css-values/minmax-number-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-number-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-number-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-number-serialize.html: Added.
* web-platform-tests/css/css-values/minmax-percentage-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-percentage-computed.html: Added.
* web-platform-tests/css/css-values/minmax-percentage-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-percentage-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-percentage-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-percentage-serialize.html: Added.
* web-platform-tests/css/css-values/minmax-time-computed-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-time-computed.html: Added.
* web-platform-tests/css/css-values/minmax-time-invalid-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-time-invalid.html: Added.
* web-platform-tests/css/css-values/minmax-time-serialize-expected.txt: Added.
* web-platform-tests/css/css-values/minmax-time-serialize.html: Added.
* web-platform-tests/css/css-values/percentage-rem-low-expected.html: Added.
* web-platform-tests/css/css-values/percentage-rem-low.html: Added.
* web-platform-tests/css/css-values/q-unit-case-insensitivity-001-expected.xht: Added.
* web-platform-tests/css/css-values/q-unit-case-insensitivity-001.html: Added.
* web-platform-tests/css/css-values/q-unit-case-insensitivity-002-expected.xht: Added.
* web-platform-tests/css/css-values/q-unit-case-insensitivity-002.html: Added.
* web-platform-tests/css/css-values/resources/ChTestNoZero.woff: Added.
* web-platform-tests/css/css-values/resources/ChTestShortZero.woff: Added.
* web-platform-tests/css/css-values/resources/ChTestZeroWidthZero.woff: Added.
* web-platform-tests/css/css-values/resources/ExTest.woff: Added.
* web-platform-tests/css/css-values/resources/w3c-import.log: Added.
* web-platform-tests/css/css-values/rgba-011-expected.txt: Added.
* web-platform-tests/css/css-values/rgba-011.html: Added.
* web-platform-tests/css/css-values/support/1x1-green.png: Added.
* web-platform-tests/css/css-values/support/1x1-lime.png: Added.
* web-platform-tests/css/css-values/support/1x1-maroon.png: Added.
* web-platform-tests/css/css-values/support/1x1-navy.png: Added.
* web-platform-tests/css/css-values/support/1x1-red.png: Added.
* web-platform-tests/css/css-values/support/1x1-white.png: Added.
* web-platform-tests/css/css-values/support/60x60-gg-rr.png: Added.
* web-platform-tests/css/css-values/support/60x60-green.png: Added.
* web-platform-tests/css/css-values/support/60x60-red.png: Added.
* web-platform-tests/css/css-values/support/README: Added.
* web-platform-tests/css/css-values/support/a-green.css: Added.
(.a):
* web-platform-tests/css/css-values/support/b-green.css: Added.
(.b):
* web-platform-tests/css/css-values/support/c-red.css: Added.
(.c):
* web-platform-tests/css/css-values/support/cat.png: Added.
* web-platform-tests/css/css-values/support/import-green.css: Added.
(.import):
* web-platform-tests/css/css-values/support/import-red.css: Added.
(.import):
* web-platform-tests/css/css-values/support/pattern-grg-rgr-grg.png: Added.
* web-platform-tests/css/css-values/support/pattern-grg-rrg-rgg.png: Added.
* web-platform-tests/css/css-values/support/pattern-rgr-grg-rgr.png: Added.
* web-platform-tests/css/css-values/support/pattern-tr.png: Added.
* web-platform-tests/css/css-values/support/ruler-h-50%.png: Added.
* web-platform-tests/css/css-values/support/ruler-h-50px.png: Added.
* web-platform-tests/css/css-values/support/ruler-v-100px.png: Added.
* web-platform-tests/css/css-values/support/ruler-v-50px.png: Added.
* web-platform-tests/css/css-values/support/square-purple.png: Added.
* web-platform-tests/css/css-values/support/square-teal.png: Added.
* web-platform-tests/css/css-values/support/square-white.png: Added.
* web-platform-tests/css/css-values/support/support/README: Added.
* web-platform-tests/css/css-values/support/support/swatch-green.png: Added.
* web-platform-tests/css/css-values/support/support/swatch-red.png: Added.
* web-platform-tests/css/css-values/support/support/w3c-import.log: Added.
* web-platform-tests/css/css-values/support/swatch-blue.png: Added.
* web-platform-tests/css/css-values/support/swatch-green.png: Added.
* web-platform-tests/css/css-values/support/swatch-lime.png: Added.
* web-platform-tests/css/css-values/support/swatch-orange.png: Added.
* web-platform-tests/css/css-values/support/swatch-red.png: Added.
* web-platform-tests/css/css-values/support/swatch-teal.png: Added.
* web-platform-tests/css/css-values/support/swatch-white.png: Added.
* web-platform-tests/css/css-values/support/swatch-yellow.png: Added.
* web-platform-tests/css/css-values/support/test-bl.png: Added.
* web-platform-tests/css/css-values/support/test-br.png: Added.
* web-platform-tests/css/css-values/support/test-inner-half-size.png: Added.
* web-platform-tests/css/css-values/support/test-outer.png: Added.
* web-platform-tests/css/css-values/support/test-tl.png: Added.
* web-platform-tests/css/css-values/support/test-tr.png: Added.
* web-platform-tests/css/css-values/support/vh-support-transform-origin-iframe.html: Added.
* web-platform-tests/css/css-values/support/vh-support-transform-translate-iframe.html: Added.
* web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html: Added.
* web-platform-tests/css/css-values/support/w3c-import.log: Added.
* web-platform-tests/css/css-values/unset-value-storage-expected.txt: Added.
* web-platform-tests/css/css-values/unset-value-storage.html: Added.
* web-platform-tests/css/css-values/urls/empty-expected.txt: Added.
* web-platform-tests/css/css-values/urls/empty.html: Added.
* web-platform-tests/css/css-values/urls/support/empty-urls.css: Added.
(#external-unquoted):
(#external-quoted):
* web-platform-tests/css/css-values/urls/support/w3c-import.log: Added.
* web-platform-tests/css/css-values/urls/w3c-import.log: Added.
* web-platform-tests/css/css-values/vh-calc-support-expected.html: Added.
* web-platform-tests/css/css-values/vh-calc-support-pct-expected.html: Added.
* web-platform-tests/css/css-values/vh-calc-support-pct.html: Added.
* web-platform-tests/css/css-values/vh-calc-support.html: Added.
* web-platform-tests/css/css-values/vh-em-inherit-expected.html: Added.
* web-platform-tests/css/css-values/vh-em-inherit.html: Added.
* web-platform-tests/css/css-values/vh-inherit-expected.html: Added.
* web-platform-tests/css/css-values/vh-inherit.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-pct-expected.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-pct.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-px-expected.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-px.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-vh-expected.html: Added.
* web-platform-tests/css/css-values/vh-interpolate-vh.html: Added.
* web-platform-tests/css/css-values/vh-support-atviewport-expected.htm: Added.
* web-platform-tests/css/css-values/vh-support-atviewport.html: Added.
* web-platform-tests/css/css-values/vh-support-expected.html: Added.
* web-platform-tests/css/css-values/vh-support-margin-expected.html: Added.
* web-platform-tests/css/css-values/vh-support-margin.html: Added.
* web-platform-tests/css/css-values/vh-support-transform-origin-expected.html: Added.
* web-platform-tests/css/css-values/vh-support-transform-origin.html: Added.
* web-platform-tests/css/css-values/vh-support-transform-translate-expected.html: Added.
* web-platform-tests/css/css-values/vh-support-transform-translate.html: Added.
* web-platform-tests/css/css-values/vh-support.html: Added.
* web-platform-tests/css/css-values/vh-zero-support-expected.html: Added.
* web-platform-tests/css/css-values/vh-zero-support.html: Added.
* web-platform-tests/css/css-values/vh_not_refreshing_on_chrome-expected.html: Added.
* web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html: Added.
* web-platform-tests/css/css-values/viewport-relative-lengths-scaled-viewport-expected.txt: Added.
* web-platform-tests/css/css-values/viewport-relative-lengths-scaled-viewport.html: Added.
* web-platform-tests/css/css-values/viewport-unit-011-expected.html: Added.
* web-platform-tests/css/css-values/viewport-unit-011.html: Added.
* web-platform-tests/css/css-values/viewport-units-css2-001-expected.txt: Added.
* web-platform-tests/css/css-values/viewport-units-css2-001.html: Added.
* web-platform-tests/css/css-values/w3c-import.log: Added.

LayoutTests:

Import wpt revision e68120da0fb52f010f206f3ecc63cfa09885b0f4 (Wed Oct 23 13:18:06 2019 -0700)
css-values tests.

* TestExpectations:
* platform/ios/imported/w3c/web-platform-tests/css/css-values/absolute_length_units-expected.txt: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-values/lh-rlh-on-root-001-expected.txt: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Added.
* tests-options.json:

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

3 months ago[JSC] Figure out missing prepareCallOperation
ysuzuki@apple.com [Thu, 24 Oct 2019 01:00:07 +0000 (01:00 +0000)]
[JSC] Figure out missing prepareCallOperation
https://bugs.webkit.org/show_bug.cgi?id=203285

Reviewed by Mark Lam.

Source/JavaScriptCore:

We start using __builtin_frame_address to get CallFrame* in JIT operations. For the platform which is not supporting this API (MSVC),
we put frame-pointer to vm.topCallFrame in the caller side. The problem is that all Apple platform is now using __builtin_frame_address,
and we are not testing vm.topCallFrame version at all.

To find missing prepareCallOperation call, we introduce JITOperationPrologueCallFrameTracer. When USE(BUILTIN_FRAME_ADDRESS) is enabled and
if it is debug build, we anyway put frame-pointer to vm.topCallFrame. And after that, we ensure that vm.topCallFrame is the same to the
CallFrame* gained by __builtin_frame_address. By doing this, we can find places missing this call in debug build of Apple ports.

We also found that FTL's custom getter calling is putting wrong value to vm.topCallFrame. This patch fixes it too.

* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::operationCompileOSRExit):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::operationDebugPrintSpeculationFailure):
(JSC::DFG::OSRExit::compileOSRExit): Deleted.
(JSC::DFG::OSRExit::debugOperationPrintSpeculationFailure): Deleted.
* dfg/DFGOSRExit.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):
(JSC::DFG::osrWriteBarrier):
* dfg/DFGOSRExitCompilerCommon.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitThunkGenerator):
(JSC::DFG::osrExitGenerationThunkGenerator):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):
(JSC::FTL::DFG::LowerDFGToB3::callCheck):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
(JSC::FTL::operationCompileFTLOSRExit):
(JSC::FTL::compileFTLOSRExit): Deleted.
* ftl/FTLOSRExitCompiler.h:
* ftl/FTLOperations.cpp:
(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):
(JSC::FTL::operationCompileFTLLazySlowPath):
(JSC::FTL::compileFTLLazySlowPath): Deleted.
* ftl/FTLOperations.h:
* ftl/FTLSlowPathCall.cpp:
(JSC::FTL::SlowPathCallContext::makeCall):
* ftl/FTLThunks.cpp:
(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::osrExitGenerationThunkGenerator):
(JSC::FTL::lazySlowPathGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):
* ftl/FTLThunks.h:
(JSC::FTL::generateIfNecessary):
(JSC::FTL::Thunks::getSlowPathCallThunk):
* interpreter/FrameTracers.h:
(JSC::SlowPathFrameTracer::SlowPathFrameTracer):
(JSC::JITOperationPrologueCallFrameTracer::JITOperationPrologueCallFrameTracer):
(JSC::JITOperationPrologueCallFrameTracer::~JITOperationPrologueCallFrameTracer):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::callExceptionFuzz):
(JSC::AssemblyHelpers::debugCall):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::prepareCallOperation):
* jit/CCallHelpers.cpp:
(JSC::CCallHelpers::ensureShadowChickenPacket):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::prepareCallOperation): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/Repatch.cpp:
(JSC::ftlThunkAwareRepatchCall):
* jit/ThunkGenerators.cpp:
(JSC::boundThisNoArgsFunctionCallGenerator):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleHostCall):
* runtime/AtomicsObject.cpp:
(JSC::operationAtomicsAdd):
(JSC::operationAtomicsAnd):
(JSC::operationAtomicsCompareExchange):
(JSC::operationAtomicsExchange):
(JSC::operationAtomicsIsLockFree):
(JSC::operationAtomicsLoad):
(JSC::operationAtomicsOr):
(JSC::operationAtomicsStore):
(JSC::operationAtomicsSub):
(JSC::operationAtomicsXor):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/StringPrototype.cpp:
(JSC::operationStringProtoFuncReplaceRegExpEmptyStr):
(JSC::operationStringProtoFuncReplaceRegExpString):
(JSC::operationStringProtoFuncReplaceGeneric):
* tools/JSDollarVM.cpp:
(IGNORE_WARNINGS_BEGIN):
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
* wasm/WasmOperations.cpp:
(JSC::Wasm::operationWasmThrowBadI64):
(JSC::Wasm::operationWasmTriggerOSREntryNow):
(JSC::Wasm::operationWasmTriggerTierUpNow):
(JSC::Wasm::operationThrowBadI64): Deleted.
(JSC::Wasm::triggerOSREntryNow): Deleted.
(JSC::Wasm::triggerTierUpNow): Deleted.
* wasm/WasmOperations.h:
* wasm/WasmThunks.cpp:
(JSC::Wasm::triggerOMGEntryTierUpThunkGenerator):
* wasm/js/JSWebAssembly.cpp:
(JSC::instantiate):
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::operationWasmToJSException):
(JSC::Wasm::emitThrowWasmToJSException):
(JSC::Wasm::wasmToJSException): Deleted.
* wasm/js/WasmToJS.h:
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):

Source/WebCore:

Use JITOperationPrologueCallFrameTracer instead of NativeCallFrameTracer.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateOperationDefinition):
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
* domjit/DOMJITHelpers.h:
(WebCore::DOMJIT::toWrapperSlow):

Source/WTF:

Enable USE(BUILTIN_FRAME_ADDRESS) regardless of platform is the compilers and architectures match.

* wtf/Platform.h:

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

3 months agomacCatalyst: Should dispatch contextmenu event on right click
timothy_horton@apple.com [Thu, 24 Oct 2019 00:55:02 +0000 (00:55 +0000)]
macCatalyst: Should dispatch contextmenu event on right click
https://bugs.webkit.org/show_bug.cgi?id=203316
<rdar://problem/54617376>

Reviewed by Wenson Hsieh.

Source/WebCore:

macCatalyst does not have ENABLE(CONTEXT_MENUS), because it uses the
iOS-style platform-driven context menu API, but should still dispatch
the contextmenu event on right click, for pages that depend on that.

Separate ENABLE(CONTEXT_MENU_EVENT) out from ENABLE(CONTEXT_MENUS).

In the future, calling preventDefault on the contextmenu event should
block the platform context menu from appearing, but currently they
use entirely different gestures.

* page/EventHandler.cpp:
* page/EventHandler.h:
* replay/UserInputBridge.cpp:
* replay/UserInputBridge.h:

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::isContextClick):
(WebKit::handleContextMenuEvent):
(WebKit::WebPage::contextMenuForKeyEvent):
(WebKit::handleMouseEvent):
* WebProcess/WebPage/WebPage.h:

Source/WTF:

* wtf/FeatureDefines.h:

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

3 months ago[EWS] Multiple builds are triggered for one patch sometimes in new EWS
aakash_jain@apple.com [Thu, 24 Oct 2019 00:18:15 +0000 (00:18 +0000)]
[EWS] Multiple builds are triggered for one patch sometimes in new EWS
https://bugs.webkit.org/show_bug.cgi?id=199417

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/fetcher.py:
(BugzillaPatchFetcher.fetch): Set the flag before sending the patch to buildbot. Unset it in case of failure.
Also added additional check for sent_to_buildbot flag before processing patch.
* BuildSlaveSupport/ews-app/ews/models/patch.py:
(Patch.save_patch): Improved logging.
(Patch.set_sent_to_buildbot): Modified to accept sent_to_buildbot paramater, and set the value accordingly.

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

3 months agoUnreviewed, rolling out r251469.
repstein@apple.com [Thu, 24 Oct 2019 00:09:48 +0000 (00:09 +0000)]
Unreviewed, rolling out r251469.

Broke accessibility/ios-simulator/link-with-images-text.html
on iOS

Reverted changeset:

"AX: Implement support for new ARIA roles: code, strong,
emphasis, generic"
https://bugs.webkit.org/show_bug.cgi?id=203257
https://trac.webkit.org/changeset/251469# Please enter the commit message for your changes. Lines starting

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

3 months agoUnreviewed, rolling out r251261.
tsavell@apple.com [Thu, 24 Oct 2019 00:05:58 +0000 (00:05 +0000)]
Unreviewed, rolling out r251261.

This broke multiple tests

Reverted changeset:

"Using version 1 CFRunloopSource for faster task dispatch"
https://bugs.webkit.org/show_bug.cgi?id=202874
https://trac.webkit.org/changeset/251261

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

3 months agoUnreviewed, rolling out r251482.
tsavell@apple.com [Thu, 24 Oct 2019 00:04:57 +0000 (00:04 +0000)]
Unreviewed, rolling out r251482.

r251261 broke multiple tests, reverting this as part of that
rollout.

Reverted changeset:

"[ Mac WK1 ] REGRESSION (r251261): Layout Test
inspector/console/webcore-logging.html is consistently
Failing"
https://bugs.webkit.org/show_bug.cgi?id=203173
https://trac.webkit.org/changeset/251482

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

3 months agoUnreviewed, a speculative build fix after r251498
jiewen_tan@apple.com [Thu, 24 Oct 2019 00:03:30 +0000 (00:03 +0000)]
Unreviewed, a speculative build fix after r251498

* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

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

3 months ago[iOS] Stop including 'common.sb'
bfulgham@apple.com [Thu, 24 Oct 2019 00:02:25 +0000 (00:02 +0000)]
[iOS] Stop including 'common.sb'
https://bugs.webkit.org/show_bug.cgi?id=203318

Reviewed by Per Arne Vollan.

Replace the 'import' of common.sb with the equivalent statements. This is the
first step in a task to remove uneeded sandbox rules.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 months ago[ANGLE] Improve compile-time macOS guards and avoid ObjC if possible
dino@apple.com [Wed, 23 Oct 2019 23:37:35 +0000 (23:37 +0000)]
[ANGLE] Improve compile-time macOS guards and avoid ObjC if possible
https://bugs.webkit.org/show_bug.cgi?id=203343

Reviewed by Simon Fraser.

Use the more official compile-time detection of Apple platforms, so that
it will be easier to differentiate between macOS and iOS. Also move some
.mm files to .cpp where possible.

* ANGLE.xcodeproj/project.pbxproj:
* src/gpu_info_util/SystemInfo_mac.cpp: Renamed from Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_mac.mm.
(angle::GetSystemInfo):
* src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp:
* src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:
* src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp: Renamed from Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.mm.
* src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.cpp: Renamed from Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm.
* src/libANGLE/renderer/gl/cgl/RendererCGL.cpp: Renamed from Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/RendererCGL.mm.
* src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:

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

3 months agoFileSystemDirectoryReader / FileSystemEntry should not prevent entering the back...
cdumez@apple.com [Wed, 23 Oct 2019 23:25:31 +0000 (23:25 +0000)]
FileSystemDirectoryReader / FileSystemEntry should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203090
<rdar://problem/56550805>

Reviewed by Geoffrey Garen.

Source/WebCore:

FileSystemDirectoryReader / FileSystemEntry no longer prevent entering the back/forward cache.
We now dispatch tasks to the window event loop whenever we need to call a JS callback since the
window event loop takes care of suspending tasks while in the back/forward cache.

Tests: editing/pasteboard/entries-api/DirectoryEntry-getFile-back-forward-cache.html
       editing/pasteboard/entries-api/DirectoryReader-readEntries-back-forward-cache.html

* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::getEntry):
* Modules/entriesapi/FileSystemDirectoryReader.cpp:
(WebCore::FileSystemDirectoryReader::document const):
(WebCore::FileSystemDirectoryReader::readEntries):
* Modules/entriesapi/FileSystemDirectoryReader.h:
* Modules/entriesapi/FileSystemEntry.cpp:
(WebCore::FileSystemEntry::document const):
(WebCore::FileSystemEntry::getParent):
* Modules/entriesapi/FileSystemEntry.h:
* Modules/entriesapi/FileSystemFileEntry.cpp:
(WebCore::FileSystemFileEntry::file):

LayoutTests:

Add layout test coverage.

* editing/pasteboard/entries-api/DirectoryEntry-getFile-back-forward-cache-expected.txt: Added.
* editing/pasteboard/entries-api/DirectoryEntry-getFile-back-forward-cache.html: Added.
* editing/pasteboard/entries-api/DirectoryReader-readEntries-back-forward-cache-expected.txt: Added.
* editing/pasteboard/entries-api/DirectoryReader-readEntries-back-forward-cache.html: Added.

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

3 months ago[iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
mmaxfield@apple.com [Wed, 23 Oct 2019 23:14:05 +0000 (23:14 +0000)]
[iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
https://bugs.webkit.org/show_bug.cgi?id=203345

Reviewed by Simon Fraser.

Source/WebCore:

This iOS-specific quirk made Yahoo Japan stop using the 800-weight
version of Hiragino Sans because it's too heavy. We were using the
800-weight because the site requests 700 but we didn't have a 700-
weight of Hiragino Sans. However, now in iOS 13 we do have a 700-
weight of Hiragino Sans, so we can just delete this quirk.

Also, it turns out that Yahoo Japan modified their content to no
longer hit this quirk anyway, so this patch has 0 behavior change.

Site specific quirks are untestable.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontRangesForFamily):
* page/Quirks.cpp:
(WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const): Deleted.
* page/Quirks.h:

Source/WTF:

* wtf/Platform.h:

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

3 months agoupdate expectations for inspector/heap/getRemoteObject.html
tsavell@apple.com [Wed, 23 Oct 2019 23:13:43 +0000 (23:13 +0000)]
update expectations for inspector/heap/getRemoteObject.html
https://bugs.webkit.org/show_bug.cgi?id=156077

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 months agoIgnore document.open/write after the active parser has been aborted
cdumez@apple.com [Wed, 23 Oct 2019 23:02:32 +0000 (23:02 +0000)]
Ignore document.open/write after the active parser has been aborted
https://bugs.webkit.org/show_bug.cgi?id=203028

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window-expected.txt:

Source/WebCore:

Ignore document.open/write after the active parser has been aborted, as per:
- https://github.com/whatwg/html/pull/4907

Test: imported/blink/fast/loader/document-write-after-location-change.html

* dom/Document.cpp:
(WebCore::Document::open):
(WebCore::Document::cancelParsing):
(WebCore::Document::implicitOpen):
(WebCore::Document::write):
* dom/Document.h:

LayoutTests:

Import test from blink.

* imported/blink/fast/loader/document-write-after-location-change-expected.txt: Added.
* imported/blink/fast/loader/document-write-after-location-change.html: Added.
* imported/blink/fast/loader/resources/pass-and-notify-done.html: Added.

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

3 months agoREGRESSION (r250936?) [ iOS ]: Layout Test http/tests/IndexedDB/storage-limit-1.https...
repstein@apple.com [Wed, 23 Oct 2019 22:47:38 +0000 (22:47 +0000)]
REGRESSION (r250936?) [ iOS ]: Layout Test http/tests/IndexedDB/storage-limit-1.https.html is a Flaky Failure (203275)
https://bugs.webkit.org/show_bug.cgi?id=203275

Unreviewed Test Gardening.

* platform/ios-wk2/TestExpectations:

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

3 months ago[macOS WK2] Layout Test http/tests/storageAccess/request-and-grant-access-then-naviga...
commit-queue@webkit.org [Wed, 23 Oct 2019 22:39:34 +0000 (22:39 +0000)]
[macOS WK2] Layout Test http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html is a flaky timeout (198670)
https://bugs.webkit.org/show_bug.cgi?id=198670
<rdar://problem/51529251>

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-10-23
Reviewed by John Wilander.

Was able to reproduce flaky timeouts extremely rarely accompanied by
the error 'JS ERROR TypeError: null is not an object (evaluating
'document.body.appendChild’)'. Since the frame was being created in
head, the document body was sometimes not finished loading by the time
the appendChild call was being made. Moving the frame load to the body should fix this flakiness.

* http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html:
* platform/mac-wk2/TestExpectations:

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

3 months agoDon't try to compile .inc files in ANGLE
dino@apple.com [Wed, 23 Oct 2019 22:34:57 +0000 (22:34 +0000)]
Don't try to compile .inc files in ANGLE
https://bugs.webkit.org/show_bug.cgi?id=203315

Reviewed by Simon Fraser.

These are headers, not files we need to compile directly.

* ANGLE.xcodeproj/project.pbxproj:

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

3 months ago[Quick Look] Move PreviewConverter from platform/network/ to platform/
aestes@apple.com [Wed, 23 Oct 2019 22:23:52 +0000 (22:23 +0000)]
[Quick Look] Move PreviewConverter from platform/network/ to platform/
https://bugs.webkit.org/show_bug.cgi?id=203309

Reviewed by Tim Horton.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/PreviewConverter.h: Renamed from Source/WebCore/platform/network/ios/PreviewConverter.h.
* platform/ios/PreviewConverterIOS.mm: Renamed from Source/WebCore/platform/network/ios/PreviewConverter.mm.

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

3 months agoImplement dumpResourceLoadStatistics in SQLite ITP Database
commit-queue@webkit.org [Wed, 23 Oct 2019 22:06:46 +0000 (22:06 +0000)]
Implement dumpResourceLoadStatistics in SQLite ITP Database
https://bugs.webkit.org/show_bug.cgi?id=203224
<rdar://problem/56482165>

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-10-23
Reviewed by John Wilander.

Source/WebKit:

This patch implements dumpResourceLoadStatistics() in the ITP database
store. This function required a boolean flag isScheduledForWebsiteDataRemoval that
now must be stored in the database, resulting in a small schema change.

Because of the schema change, this patch also compares any existing
database file against the new schema, and deletes the existing file if the schema is
not current.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
The logic for topFrameLinkDecorationsFromQuery was the opposite
of all other "xyzFrom" queries. When merging data from the memory
store, the load statistic being inserted holds a list of topFrames
which it has been redirected to from. I think it makes more sense
to also organize the table this way.

(WebKit::ObservedDomainsTableSchemaV1):
(WebKit::ObservedDomainsTableSchemaV1Alternate):
For support on both iOS and MacOS, there are two CREATE TABLE queries
to compare to, depending on whether the query result contains quotes
around the table name.

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase):
(WebKit::ResourceLoadStatisticsDatabaseStore::openAndDropOldDatabaseIfNecessary):
The code to check for the current schema was adapted from SQLiteIDBBackingStore.cpp

(WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertObservedDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList):
The previous naming of the list parameter in this function was
confusing because it is used by many different relationships not just
subframes under top frames.

(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
topFrameLinkDecorationsFrom were never inserted into the database.

(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationships):
(WebKit::ResourceLoadStatisticsDatabaseStore::merge):
(WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistic):
Since the statement to get all data for a given domain is now used in
multiple places, I stored the query as a constexpr auto.

(WebKit::ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration):
Matched the memory store functionality, which calls the boolean
"gotLinkDecorationFromPrevalentResource." I thought isScheduledForWebsiteDataRemoval
would be more clear of a name, because this flag gets cleared even when
prevalent top frame link decorations for this domain still exist in the table.

(WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics):
(WebKit::ResourceLoadStatisticsDatabaseStore::setIsScheduledForWebsiteDataRemoval):
(WebKit::ResourceLoadStatisticsDatabaseStore::prevalentDomains): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::domains):
To match memory store functionality, the check for website data to
delete should check all domains, not just prevalent ones.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUnexpiredRecentUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllWebsiteDataFor):
This now needs to check if the resource is prevalent, because it is
no longer guaranteed.

(WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllButCookiesFor):
(WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToRemoveWebsiteDataFor):
(WebKit::ResourceLoadStatisticsDatabaseStore::getDomainStringFromDomainID):
(WebKit::ResourceLoadStatisticsDatabaseStore::getSubStatisticStatement):
(WebKit::ResourceLoadStatisticsDatabaseStore::appendSubStatisticList):
(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString):
This functionality matches the toString function in
ResourceLoadStatistics.cpp.

(WebKit::CompletionHandler<void):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

LayoutTests:

Migrated tests from the memory store to be used to test dumping
for database store. Both tests are almost identical to the memory
store tests except they set the useITPDatabase flag to true and
log-cross-site-load-with-link-decoration-database.html tests one additional domain
to be sure that listing multiple domains in a category works in the database store.

* http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration-database-expected.txt: Added.
* http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration-database.html: Added.
* http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration-database-expected.txt: Added.
* http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration-database.html: Added.

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

3 months ago[WebAuthn] Warn users when multiple NFC tags present
jiewen_tan@apple.com [Wed, 23 Oct 2019 21:58:17 +0000 (21:58 +0000)]
[WebAuthn] Warn users when multiple NFC tags present
https://bugs.webkit.org/show_bug.cgi?id=200932
<rdar://problem/54890736>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new tests in existing test file.

* testing/MockWebAuthenticationConfiguration.h:
(WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
* testing/MockWebAuthenticationConfiguration.idl:
Adds a new test option.

Source/WebKit:

This patch utilizes -[_WKWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:] to
inform clients about multiple physical tags are presenting such that clients can instruct users
to select only one of them physically. Given a physical tag could have multiple different
interfaces, which NearField will treat them into different NFTags, the tagID is then used to
identify if there are actually multiple physical tags.

This patch also adds the ability to restart polling of a partiuclar NFReaderSession to NfcConnection
and the ability to restart the whole session to NfcService. The former is used to recover from errors
in the discovery stages, and the latter is used to recover from errors returned from authenticators
in the request stages. For the latter, given NfcConnection is not awared of the syntax of FIDO2/U2F
protocol, and CtapAuthenticator/U2fAuthenticator are not awared the transport of the underneath driver.
A generic restartDiscovery process is added to each service and it is up to the actual service to
implement the actual process such that AuthenticatorManager can arbitrarily call it after exceptions
are returned to restart the whole NFC session. To achieve restartDiscovery, NfcConnection is made
RefCounted as well such that both the NfcService and the CtapNfcDriver could hold it at the same time.
CtapNfcDriver uses the connection to complete requests as before while NfcService has the new capability
to use it to stop the current session when restartDiscovery kicks off.

* Platform/spi/Cocoa/NearFieldSPI.h:
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::serviceStatusUpdated):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::restartDiscovery):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::startDiscovery):
(WebKit::AuthenticatorTransportService::restartDiscovery):
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
(WebKit::AuthenticatorTransportService::restartDiscoveryInternal):
* UIProcess/WebAuthentication/Cocoa/NfcConnection.h:
* UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
(WebKit::NfcConnection::create):
(WebKit::NfcConnection::NfcConnection):
(WebKit::NfcConnection::~NfcConnection):
(WebKit::NfcConnection::stop const):
(WebKit::NfcConnection::didDetectTags):
(WebKit::NfcConnection::restartPolling):
(WebKit::NfcConnection::startPolling):
(WebKit::NfcConnection::didDetectTags const): Deleted.
* UIProcess/WebAuthentication/Cocoa/NfcService.h:
* UIProcess/WebAuthentication/Cocoa/NfcService.mm:
(WebKit::NfcService::NfcService):
(WebKit::NfcService::didConnectTag):
(WebKit::NfcService::didDetectMultipleTags const):
(WebKit::NfcService::setConnection):
(WebKit::NfcService::restartDiscoveryInternal):
(WebKit::NfcService::platformStartDiscovery):
(WebKit::NfcService::setDriver): Deleted.
* UIProcess/WebAuthentication/Mock/MockNfcService.h:
* UIProcess/WebAuthentication/Mock/MockNfcService.mm:
(-[WKMockNFTag tagID]):
(-[WKMockNFTag initWithNFTag:]):
(-[WKMockNFTag dealloc]):
(-[WKMockNFTag initWithType:]):
(-[WKMockNFTag initWithType:tagID:]):
(WebKit::MockNfcService::receiveStopPolling):
(WebKit::MockNfcService::receiveStartPolling):
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags):
(WebKit::MockNfcService::detectTags const): Deleted.
* UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp:
(WebKit::CtapNfcDriver::CtapNfcDriver):
* UIProcess/WebAuthentication/fido/CtapNfcDriver.h:
* UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(TestWebKitAPI::TEST):
Adds a new test for -[_WKWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:].
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-nfc-multiple-tags.html: Added.

LayoutTests:

* http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-nfc.https.html:
Adds new tests for multiple physical tags and service restart.

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

3 months ago[SVG2] Fix SVGElement to conform with SVG2
commit-queue@webkit.org [Wed, 23 Oct 2019 21:22:40 +0000 (21:22 +0000)]
[SVG2] Fix SVGElement to conform with SVG2
https://bugs.webkit.org/show_bug.cgi?id=203280

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-10-23
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/svg/historical-expected.txt:
Some sub-tests are now passing with this change.

Source/WebCore:

The interface of SVGElement is defined here:
    https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement.

-- Remove SVGElement.getPresentationAttribute.
-- Remove the SVGElement attributes xmllang and xmlspace.
-- Remove the class SVGLangSpace

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
instead of calling PropertyRegistry::isKnownAttribute().

* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::getPresentationAttribute): Deleted.
* svg/SVGElement.h:
* svg/SVGElement.idl:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
instead of calling PropertyRegistry::isKnownAttribute().

* svg/SVGLangSpace.cpp: Removed.
* svg/SVGLangSpace.h: Removed.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):

LayoutTests:

* platform/gtk/svg/custom/getPresentationAttribute-expected.png: Removed.
* platform/gtk/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/ios/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/mac/svg/custom/getPresentationAttribute-expected.png: Removed.
* platform/mac/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/mac/svg/custom/getPresentationAttribute-modify-expected.png: Removed.
* platform/win/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/wincairo/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/wpe/svg/custom/getPresentationAttribute-expected.txt: Removed.
* svg/custom/getPresentationAttribute.svg: Removed.
* svg/custom/path-getPresentationAttribute-crash-expected.txt: Removed.
* svg/custom/path-getPresentationAttribute-crash.html: Removed.
SVGElement.getPresentationAttribute has to be removed.

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

3 months ago[WebAuthn] Add more information to _WKWebAuthenticationPanel
jiewen_tan@apple.com [Wed, 23 Oct 2019 20:59:52 +0000 (20:59 +0000)]
[WebAuthn] Add more information to _WKWebAuthenticationPanel
https://bugs.webkit.org/show_bug.cgi?id=202561
<rdar://problem/55973910>

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by new tests within existing test files.

* Modules/webauthn/AuthenticatorCoordinator.cpp:
* Modules/webauthn/WebAuthenticationConstants.h:

Source/WebKit:

This change adds transports and type to _WKWebAuthenticationPanel such that
clients can know what transport the current ceremony demands and the type of
the current ceremony. These extra information allow clients to give users
more specific instructions to interact with authenticators.

To pass transports to client, the way how them is collected is changed significantly:
1) The timing is moved to runPanel before the client delegate call.
2) NfcService::isAvailable is added for AuthenticatorManager to determine if NFC
is available in the current device.
3) AuthenticatorManager::filterTransports is added to filter transports requested
by RP to ones that are available. This process is handled by each service naturally
before.
4) AuthenticatorManager::startRequest is now being splitted into AuthenticatorManager::handleRequest,
AuthenticatorManager::runPanel and AuthenticatorManager::getTransports.

To pass type to _WKWebAuthenticationPanel, ClientDataType is moved from
WebCore::AuthenticatorCoordinator to WebCore::WebAuthenticationConstants in
order to be reused to indicate the ceremony type.

* UIProcess/API/APIWebAuthenticationPanel.cpp:
(API::WebAuthenticationPanel::create):
(API::WebAuthenticationPanel::WebAuthenticationPanel):
* UIProcess/API/APIWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(-[_WKWebAuthenticationPanel relyingPartyID]):
(wkWebAuthenticationTransport):
(-[_WKWebAuthenticationPanel transports]):
(wkWebAuthenticationType):
(-[_WKWebAuthenticationPanel type]):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::WebCore::collectTransports):
(WebKit::WebCore::getClientDataType):
(WebKit::AuthenticatorManager::handleRequest):
(WebKit::AuthenticatorManager::filterTransports const):
(WebKit::AuthenticatorManager::startDiscovery):
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::getTransports const):
(WebKit::AuthenticatorManager::respondReceivedInternal): Deleted.
(WebKit::AuthenticatorManager::startRequest): Deleted.
* UIProcess/WebAuthentication/AuthenticatorManager.h:
(WebKit::AuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Cocoa/NfcService.h:
* UIProcess/WebAuthentication/Cocoa/NfcService.mm:
(WebKit::NfcService::isAvailable):
(WebKit::NfcService::platformStartDiscovery):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::filterTransports const):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h:

Tools:

Adds new API tests.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelUIDelegate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]):
(-[TestWebAuthenticationPanelUIDelegate panel]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html: Added.

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

3 months ago[ews] iOS-13-Simulator-WK2-Tests-EWS is failing with an KeyError exception
aakash_jain@apple.com [Wed, 23 Oct 2019 20:47:21 +0000 (20:47 +0000)]
[ews] iOS-13-Simulator-WK2-Tests-EWS is failing with an KeyError exception
https://bugs.webkit.org/show_bug.cgi?id=203281

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/layout_test_failures.py:
(LayoutTestFailures.results_from_string.get_failing_tests): Gracefully handle the case of missing 'report' key.

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

3 months agoFetchRequest should not prevent entering the back/forward cache
cdumez@apple.com [Wed, 23 Oct 2019 20:38:22 +0000 (20:38 +0000)]
FetchRequest should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203091
<rdar://problem/56525333>

Reviewed by Youenn Fablet.

Source/WebCore:

FetchRequest used to prevent the page from entering the back/forward cache while it had a blob
load in progress. We no longer prevent suspension in such case. Instead, if the document is
suspended when the blob load finishes, we post a task to the Window event loop to do the work
and resolve / reject the promise. The Window event loop makes sure not to delays tasks that
are associated with a document that is suspended.

Tests: fast/history/page-cache-active-fetch-request-blobReadAsBlob.html
       fast/history/page-cache-active-fetch-request-blobReadAsReadableStream.html
       fast/history/page-cache-active-fetch-request-blobReadAsText.html

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::runNetworkTaskWhenPossible):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::blobChunk):
(WebCore::FetchBodyOwner::postSuspendableNetworkTask): Deleted.
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchRequest.cpp:
* Modules/fetch/FetchRequest.h:
* dom/AbstractEventLoop.h:

LayoutTests:

Add layout test coverage.

* TestExpectations:
* fast/history/page-cache-active-fetch-request-blobReadAsBlob-expected.txt: Added.
* fast/history/page-cache-active-fetch-request-blobReadAsBlob.html: Added.
* fast/history/page-cache-active-fetch-request-blobReadAsReadableStream-expected.txt: Added.
* fast/history/page-cache-active-fetch-request-blobReadAsReadableStream.html: Added.
* fast/history/page-cache-active-fetch-request-blobReadAsText-expected.txt: Added.
* fast/history/page-cache-active-fetch-request-blobReadAsText.html: Added.

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

3 months agoWeb Inspector: notify inspector when provisional page is created, committed and destroyed
yurys@chromium.org [Wed, 23 Oct 2019 20:16:00 +0000 (20:16 +0000)]
Web Inspector: notify inspector when provisional page is created, committed and destroyed
https://bugs.webkit.org/show_bug.cgi?id=202704

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* inspector/InspectorTarget.h: changed InspectorTarget to not require FrontendChannel as
all messages are routed by means of the owning InspectorTargetAgent.
* inspector/agents/InspectorTargetAgent.cpp:
(Inspector::InspectorTargetAgent::InspectorTargetAgent):
(Inspector::buildTargetInfoObject):
(Inspector::InspectorTargetAgent::targetCreated):
(Inspector::InspectorTargetAgent::targetDestroyed):
(Inspector::InspectorTargetAgent::didCommitProvisionalTarget): this method is used to
notify frontend that corresponding provisional target has committed and replaced previous
target.
(Inspector::InspectorTargetAgent::connectionType const):
(Inspector::InspectorTargetAgent::connectToTargets):
(Inspector::InspectorTargetAgent::disconnectFromTargets):
* inspector/agents/InspectorTargetAgent.h:
* inspector/protocol/Target.json: extended TargetInfo with provisional page details and
added event which is fired when provisional page gets committed. If provisional
load fails there will be targetDestroyed event without corresponding commit.

Source/WebCore:

Test: http/tests/inspector/target/target-events-for-proisional-page.html

* inspector/InspectorController.cpp:
(WebCore::InspectorController::setIsUnderTest): This method may be called several times
when reloading inspected page with opened frontend so the assumption that there are no
connected frontends when this method is called from tests doesn't hold anymore.

Source/WebInspectorUI:

Updated frontend code to understand provisional targets. For now there are
no changes frontend behavior, it will wait for the provisional target to commit
and will not send any commands to it before that.

* UserInterface/Base/Main.js: Moved a bunch of methods shared between Main.js and Test.js
to TargetManager.js to keep them in sync.
* UserInterface/Controllers/TargetManager.js:
(WI.TargetManager):
(WI.TargetManager.prototype.removeTarget):
(WI.TargetManager.prototype.createMultiplexingBackendTarget):
(WI.TargetManager.prototype.createDirectBackendTarget):
(WI.TargetManager.prototype.targetCreated):
(WI.TargetManager.prototype.didCommitProvisionalTarget):
(WI.TargetManager.prototype.targetDestroyed):
(WI.TargetManager.prototype.dispatchMessageFromTarget):
(WI.TargetManager.prototype._checkAndHandlePageTargetTransition):
(WI.TargetManager.prototype._checkAndHandlePageTargetTermination):
(WI.TargetManager.prototype._initializeBackendTarget):
(WI.TargetManager.prototype._initializePageTarget):
(WI.TargetManager.prototype._transitionPageTarget):
(WI.TargetManager.prototype._terminatePageTarget):
(WI.TargetManager.prototype._resetMainExecutionContext):
(WI.TargetManager.prototype._redirectGlobalAgentsToConnection):
* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection.sendMessageToBackend):
(InspectorBackend.WorkerConnection):
(InspectorBackend.TargetConnection.sendMessageToBackend):
(InspectorBackend.TargetConnection):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.destroy): Mark target as destroyed to distinguish expected command errors from
genuine failures.

(WI.Target.prototype.isDestroyed):
* UserInterface/Protocol/TargetObserver.js: Since the front-end doesn't
send commands to the provisional targets yet, it has to ignore all activities
related to provisional pages. For that reason we need two sets to keep track of
- provisional pages that were destroyed and never committed
- old pages which were replaced by committed page and for which following targetDestroyed
event should be ignored
Better support for provisional targets will be added to frontend in a separate change.
(WI.TargetObserver):
(WI.TargetObserver.prototype.targetCreated):
(WI.TargetObserver.prototype.didCommitProvisionalTarget): For now convert the event into a subsequence
of targetDestroyed/targetCreated events which matches previous behavior.

(WI.TargetObserver.prototype.targetDestroyed):
(WI.TargetObserver.prototype.dispatchMessageFromTarget):
* UserInterface/Test/Test.js:
(WI.transitionPageTarget):
(WI.terminatePageTarget):

Source/WebKit:

Target.targetCreated event is now generated for provisional pages as well as for regular
ones. This is the first step toward reattaching inspector earlier during PSON. In the future
if debugging is in progress the provisional target (page) will be paused until a signal from
inspector frontend. This will enable the frontend configure all agents before navigation starts.

* Sources.txt:
* UIProcess/API/APIWebAuthenticationPanel.cpp:
(API::WebAuthenticationPanel::WebAuthenticationPanel): Added explicit namespace specifier
to the constructor's argument as otherwise compilation fails due to conflict between API::String
and WTF::String.

* UIProcess/InspectorTargetProxy.cpp:
(WebKit::InspectorTargetProxy::create):
(WebKit::InspectorTargetProxy::connect):
(WebKit::InspectorTargetProxy::disconnect):
(WebKit::InspectorTargetProxy::sendMessageToTargetBackend):
(WebKit::InspectorTargetProxy::didCommitProvisionalTarget):
(WebKit::InspectorTargetProxy::isProvisional const):
(WebKit::InspectorTargetProxy::previousTargetID const):
* UIProcess/InspectorTargetProxy.h: Target proxy can start as a provisional target (with a pointer to
ProvisionalPageProxy) and later either be committed or destroyed.

* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::didReceiveMessage): Forward inspector messages to parent page's WebPageInspectorController.
Since each WebPage has a unique identifier the target ids will be globally unique and there is no risk of collisions.

* UIProcess/ProvisionalPageProxy.h:
(WebKit::ProvisionalPageProxy::page const):
* UIProcess/WebPageInspectorController.cpp:
(WebKit::getTargetID):
(WebKit::WebPageInspectorController::WebPageInspectorController):
(WebKit::WebPageInspectorController::clearTargets):
(WebKit::WebPageInspectorController::createInspectorTarget):
(WebKit::WebPageInspectorController::destroyInspectorTarget):
(WebKit::WebPageInspectorController::didCreateProvisionalPage):
(WebKit::WebPageInspectorController::didDestroyProvisionalPage):
(WebKit::WebPageInspectorController::didCommitProvisionalPage):
(WebKit::WebPageInspectorController::addTarget):
* UIProcess/WebPageInspectorController.h:
* UIProcess/WebPageInspectorTargetAgent.cpp: Removed. Merged this agent into InspectorTargetAgent.
* UIProcess/WebPageInspectorTargetAgent.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::commitProvisionalPage):
* UIProcess/WebPageProxy.h: Moved the target management logic into WebPageInspectorController.
WebPageProxy/ProvisionalPageProxy are expected to notifiy it about key lifecycle events and also
forward to it messages from inspector in the inspected WebProcess. How it translates to Target
events is inspector's business.

* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPageInspectorTarget.cpp:
(WebKit::WebPageInspectorTarget::identifier const):
(WebKit::WebPageInspectorTarget::connect):
(WebKit::WebPageInspectorTarget::disconnect):
(WebKit::WebPageInspectorTarget::toTargetID):
* WebProcess/WebPage/WebPageInspectorTarget.h: Made the target own frontend channel instance as it's the
only place where the page specific channel is used.

* WebProcess/WebPage/WebPageInspectorTargetController.cpp:
(WebKit::WebPageInspectorTargetController::removeTarget):
(WebKit::WebPageInspectorTargetController::connectInspector):
(WebKit::WebPageInspectorTargetController::disconnectInspector):
* WebProcess/WebPage/WebPageInspectorTargetController.h:
* WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.cpp:
(WebKit::WebPageInspectorTargetFrontendChannel::WebPageInspectorTargetFrontendChannel):
(WebKit::WebPageInspectorTargetFrontendChannel::sendMessageToFrontend):
* WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.h: The channel's lifetime is managed by owning
target. No need to reference count it.

LayoutTests:

Added new test for Target events during PSON. It is only enabled on WebKit2 as there is
no Target agent in WebKit1.

* TestExpectations:
* http/tests/inspector/target/target-events-for-provisional-page-expected.txt: Added.
* http/tests/inspector/target/target-events-for-provisional-page.html: Added.
* platform/wk2/TestExpectations:

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

3 months agoChange some image-related CSSValue subclasses to use references
simon.fraser@apple.com [Wed, 23 Oct 2019 20:14:57 +0000 (20:14 +0000)]
Change some image-related CSSValue subclasses to use references
https://bugs.webkit.org/show_bug.cgi?id=203284

Reviewed by Zalan Bujtas.

The fake-virtual CSSValue subclasses all have the same functions, but their types
have diverged. Convert some from pointers to references.

* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::fixedSize):
(WebCore::CSSCanvasValue::image):
* css/CSSCanvasValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
* css/CSSNamedImageValue.cpp:
(WebCore::CSSNamedImageValue::image):
* css/CSSNamedImageValue.h:

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

3 months agowpt/css/css-images/gradient/color-stops-parsing.html fails
simon.fraser@apple.com [Wed, 23 Oct 2019 20:14:54 +0000 (20:14 +0000)]
wpt/css/css-images/gradient/color-stops-parsing.html fails
https://bugs.webkit.org/show_bug.cgi?id=200211

Reviewed by Dean Jackson.
LayoutTests/imported/w3c:

New result.

* web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt:

Source/WebCore:

CSS gradients allow a single color stop to have multiple positions. In this case
we need to copy the color from the first to subsequent stops.

Tested by web-platform-tests/css/css-images/gradient/color-stops-parsing.html
and imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-conic.html.

* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::gradientWithStylesResolved): Copy colors to subsequent stops.
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Fix the parsing of
stops with multiple positions.

LayoutTests:

Mark the conic gradient test as skipped, then passing on Mojave+.

* TestExpectations:
* platform/mac/TestExpectations:

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

3 months agoPython 3: Add support in webkitpy.results
jbedard@apple.com [Wed, 23 Oct 2019 20:02:05 +0000 (20:02 +0000)]
Python 3: Add support in webkitpy.results
https://bugs.webkit.org/show_bug.cgi?id=202478

Reviewed by Carlos Alberto Lopez Perez.

* Scripts/test-webkitpy-python3: Add webkitpy.results.
* Scripts/webkitpy/results/upload.py:
(Upload.Encoder.default): Use range instead of xrange.
(Upload.create_configuration): Support items iteration for Python 3.
(Upload.create_run_stats): Change iteritems to items.
(Upload.create_test_result): Ditto.
* Scripts/webkitpy/results/upload_unittest.py:
(UploadTest.Options.__init__): Change iteritems to items.
(UploadTest.normalize): Ditto.

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

3 months agoBe strict on request's Content-Type
commit-queue@webkit.org [Wed, 23 Oct 2019 19:41:09 +0000 (19:41 +0000)]
Be strict on request's Content-Type
https://bugs.webkit.org/show_bug.cgi?id=191356

Patch by Rob Buis <rbuis@igalia.com> on 2019-10-23
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import some tests and update improved test results.

* web-platform-tests/cors/304-expected.txt:
* web-platform-tests/cors/basic-expected.txt:
* web-platform-tests/cors/client-hint-request-headers-expected.txt:
* web-platform-tests/cors/cors-safelisted-request-header.any-expected.txt: Added.
* web-platform-tests/cors/cors-safelisted-request-header.any.html: Added.
* web-platform-tests/cors/cors-safelisted-request-header.any.js: Added.
(safelist):
(true.forEach):
* web-platform-tests/cors/cors-safelisted-request-header.any.worker-expected.txt: Added.
* web-platform-tests/cors/cors-safelisted-request-header.any.worker.html: Added.
* web-platform-tests/cors/credentials-flag-expected.txt:
* web-platform-tests/cors/late-upload-events-expected.txt:
* web-platform-tests/cors/origin-expected.txt:
* web-platform-tests/cors/preflight-cache-expected.txt:
* web-platform-tests/cors/preflight-failure-expected.txt:
* web-platform-tests/cors/redirect-origin-expected.txt:
* web-platform-tests/cors/redirect-preflight-2-expected.txt:
* web-platform-tests/cors/redirect-preflight-expected.txt:
* web-platform-tests/cors/redirect-userinfo-expected.txt:
* web-platform-tests/cors/request-headers-expected.txt:
* web-platform-tests/cors/response-headers-expected.txt:
* web-platform-tests/cors/simple-requests-expected.txt:
* web-platform-tests/cors/status-async-expected.txt:
* web-platform-tests/cors/status-expected.txt:
* web-platform-tests/cors/status-preflight-expected.txt:
* web-platform-tests/cors/support.js:

Source/WebCore:

Implement steps 1-3 from Content-Type rules defined here:
https://fetch.spec.whatwg.org/#cors-safelisted-request-header

Behavior matches Firefox and Chrome.

Tests: imported/w3c/web-platform-tests/cors/cors-safelisted-request-header.any.html
       imported/w3c/web-platform-tests/cors/cors-safelisted-request-header.any.worker.html

* platform/network/HTTPParsers.cpp:
(WebCore::isCorsUnsafeRequestHeaderByte):
(WebCore::containsCORSUnsafeRequestHeaderBytes):
(WebCore::isCrossOriginSafeRequestHeader):

LayoutTests:

Remove expected results for tests that now pass.

* TestExpectations:
* platform/mac-wk1/imported/w3c/web-platform-tests/cors/client-hint-request-headers-expected.txt: Removed.
* platform/mac-wk1/imported/w3c/web-platform-tests/cors/late-upload-events-expected.txt: Removed.

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

3 months ago[WebAuthn] Supply FrameInfo in -[WKUIDelegatePrivate _webView:runWebAuthenticationPan...
jiewen_tan@apple.com [Wed, 23 Oct 2019 19:36:43 +0000 (19:36 +0000)]
[WebAuthn] Supply FrameInfo in -[WKUIDelegatePrivate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=202563
<rdar://problem/55973968>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new test contents within existing tests.

* Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::create const):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
* Modules/webauthn/AuthenticatorCoordinatorClient.h:

Source/WebKit:

This patch makes WKFrameInfo available to clients via the above SPI. To do so,
SecuirtyOrigin of the caller document is passed from WebContent Process.

* UIProcess/API/APIUIClient.h:
(API::UIClient::runWebAuthenticationPanel):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::runWebAuthenticationPanel):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::runPanel):
* UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Tools:

Adds new test contents into existing tests.

* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelUIDelegate init]):
(-[TestWebAuthenticationPanelUIDelegate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]):
(-[TestWebAuthenticationPanelUIDelegate frame]):
(TestWebKitAPI::TEST):

LayoutTests:

* http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
Imporves the flakiness.

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

3 months ago[Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
aestes@apple.com [Wed, 23 Oct 2019 19:34:32 +0000 (19:34 +0000)]
[Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
https://bugs.webkit.org/show_bug.cgi?id=203306

Reviewed by Tim Horton.

Source/WebCore:

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
* loader/ios/LegacyPreviewLoader.h: Renamed from Source/WebCore/loader/ios/PreviewLoader.h.
* loader/ios/LegacyPreviewLoader.mm: Renamed from Source/WebCore/loader/ios/PreviewLoader.mm.
(testingClient):
(emptyClient):
(WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
(WebCore::LegacyPreviewLoader::~LegacyPreviewLoader):
(WebCore::LegacyPreviewLoader::create):
(WebCore::LegacyPreviewLoader::didReceiveResponse):
(WebCore::LegacyPreviewLoader::didReceiveData):
(WebCore::LegacyPreviewLoader::didReceiveBuffer):
(WebCore::LegacyPreviewLoader::didFinishLoading):
(WebCore::LegacyPreviewLoader::didFail):
(WebCore::LegacyPreviewLoader::setClientForTesting):
* platform/network/ios/LegacyPreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/PreviewLoaderClient.h.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setQuickLookPassword):
* testing/MockPreviewLoaderClient.h:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
* WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPreviewLoaderClient):
* WebView/WebDataSource.mm:
(-[WebDataSource _quickLookPreviewLoaderClient]):
(-[WebDataSource _setQuickLookPreviewLoaderClient:]):
* WebView/WebDataSourceInternal.h:

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

3 months agoWeb Inspector: Replace color wheel with square HSB color picker
nvasilyev@apple.com [Wed, 23 Oct 2019 19:25:01 +0000 (19:25 +0000)]
Web Inspector: Replace color wheel with square HSB color picker
https://bugs.webkit.org/show_bug.cgi?id=203169
<rdar://problem/56449832>

Reviewed by Devin Rousso.

Replace the color wheel with a square HSB color picker.

The square HSB color picker provides more precision for choosing saturation,
and it's more familiar to most web developers.

* UserInterface/Main.html:
* UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker > .hue):
(body[dir=ltr] .color-picker > .hue):
(body[dir=rtl] .color-picker > .hue):
* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker):
(WI.ColorPicker.prototype.get colorSquare):
(WI.ColorPicker.prototype.set color):
(WI.ColorPicker.prototype.colorSquareColorDidChange):
(WI.ColorPicker.prototype.sliderValueDidChange):
(WI.ColorPicker.prototype._updateColor):
(WI.ColorPicker.prototype._updateSliders):
Add a hue slider. The new color picker has the hue slider instead of the brightness slider.

* UserInterface/Views/ColorSquare.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorWheel.css.
(.color-square):
(.color-square > .saturation-gradient):
(.color-square > .lightness-gradient):
(.color-square > .fill):
(.color-square > .crosshair):
* UserInterface/Views/ColorSquare.js: Added.
(WI.ColorSquare):
(WI.ColorSquare.prototype.get element):
(WI.ColorSquare.prototype.set dimension):
(WI.ColorSquare.prototype.get hue):
(WI.ColorSquare.prototype.set hue):
(WI.ColorSquare.prototype.get tintedColor):
(WI.ColorSquare.prototype.set tintedColor):
(WI.ColorSquare.prototype.get rawColor):
(WI.ColorSquare.prototype.handleEvent):
(WI.ColorSquare.prototype.get _saturation):
(WI.ColorSquare.prototype.get _brightness):
(WI.ColorSquare.prototype.get _lightness):
(WI.ColorSquare.prototype._handleMousedown):
(WI.ColorSquare.prototype._handleMousemove):
(WI.ColorSquare.prototype._handleMouseup):
(WI.ColorSquare.prototype._updateColorForMouseEvent):
(WI.ColorSquare.prototype._setCrosshairPosition):
(WI.ColorSquare.prototype._updateBaseColor):
* UserInterface/Views/ColorWheel.js: Removed.
* UserInterface/Views/GradientEditor.js:
(WI.GradientEditor):

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

3 months agofast/forms/ios/click-should-not-suppress-misspelling.html is a flaky failure
wenson_hsieh@apple.com [Wed, 23 Oct 2019 19:13:36 +0000 (19:13 +0000)]
fast/forms/ios/click-should-not-suppress-misspelling.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=203283
<rdar://problem/52701047>

Reviewed by Tim Horton.

This layout test frequently fails on iOS 13, because it assumes that the `selectionchange` event due to tapping
a misspelled word must occur within one zero-delay timeout after detecting a click event. However, this is not
guaranteed; to fix the test, we simply wait until both `click` and `selectionchange` events have occured, and
then check that the entire contents of the text field are selected.

* fast/forms/ios/click-should-not-suppress-misspelling-expected.txt:
* fast/forms/ios/click-should-not-suppress-misspelling.html:

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

3 months agoWeb Inspector: frontend tests should clear output before resending results
yurys@chromium.org [Wed, 23 Oct 2019 19:09:04 +0000 (19:09 +0000)]
Web Inspector: frontend tests should clear output before resending results
https://bugs.webkit.org/show_bug.cgi?id=203262

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Inspector front-end tests will clear output log before resending teset results. This avoids
race between InspectorTest.testPageDidLoad event and TestPage.addResult calls that may have
already be sent to the new page after navigation. The latter events otherwise would be added
twice.

* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness):
(FrontendTestHarness.prototype.testPageDidLoad):
(FrontendTestHarness.prototype.reloadPage):
(FrontendTestHarness.prototype.reportUnhandledRejection):
(FrontendTestHarness.prototype.reportUncaughtException):
(FrontendTestHarness.prototype._resendResults): Don't resend the results when the page is loaded
first time.

LayoutTests:

Unflake some of the tests that reload inspected page. This is achieved by waiting for
explicit TestPageDidLoad event. At that point it's known that accumulated so far test
output has been resent to the inspected page and the log lines will not change their
order / appear twice.

* http/tests/inspector/resources/inspector-test.js:
(TestPage.clearOutput):
* inspector/debugger/breakpoint-action-eval.html:
* inspector/debugger/breakpoint-action-log-expected.txt:
* inspector/debugger/breakpoint-action-log.html:
* inspector/debugger/probe-manager-add-remove-actions-expected.txt:
* inspector/debugger/probe-manager-add-remove-actions.html:

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

3 months ago[LFC] LayoutState should have out-of-line destructor
antti@apple.com [Wed, 23 Oct 2019 18:49:37 +0000 (18:49 +0000)]
[LFC] LayoutState should have out-of-line destructor
https://bugs.webkit.org/show_bug.cgi?id=203307

Reviewed by Zalan Bujtas.

Otherwise instantiating it requires a pile of other headers.

* layout/LayoutState.cpp:
* layout/LayoutState.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutTree):

Use makeUnique.

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

3 months agoString.prototype.matchAll should throw on non-global regex
ross.kirsling@sony.com [Wed, 23 Oct 2019 18:45:37 +0000 (18:45 +0000)]
String.prototype.matchAll should throw on non-global regex
https://bugs.webkit.org/show_bug.cgi?id=202838

Reviewed by Keith Miller.

JSTests:

* stress/string-matchall.js: Added.

* test262/expectations.yaml:
Mark four test cases as passing.

Source/JavaScriptCore:

* builtins/StringPrototype.js:
(matchAll):
Implement normative change from https://github.com/tc39/ecma262/pull/1716.

* builtins/BuiltinNames.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/RegExpConstructor.cpp:
(JSC::esSpecIsRegExp): Added.
* runtime/RegExpConstructor.h:
Expose isRegExp to builtins. (This differs from @isRegExpObject by first checking for Symbol.match.)

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

3 months ago[ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html...
sihui_liu@apple.com [Wed, 23 Oct 2019 18:29:29 +0000 (18:29 +0000)]
[ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html is consistently Failing
https://bugs.webkit.org/show_bug.cgi?id=203173
<rdar://problem/56424721>

Source/JavaScriptCore:

Hold a strong reference to JSGlobalOjbect in ConsoleMessage so that object is not garbage collected before
WebConsoleAgent::frameWindowDiscarded.

Covered by existing test: inspector/console/webcore-logging.html.

Reviewed by Geoffrey Garen.

* inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::ConsoleMessage):
(Inspector::ConsoleMessage::clear):
* inspector/ConsoleMessage.h:

LayoutTests:

Reviewed by Geoffrey Garen.

play() returns a promise and the promise can be rejected by a later pause(). We didn't handle
that case so we could receive a type JavaScript message for the unhandled rejected promise.

* inspector/console/webcore-logging.html:
* platform/mac-wk1/TestExpectations:

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

3 months agoResync imported/w3c/web-platform-tests/html/webappapis WPT tests from upstream
cdumez@apple.com [Wed, 23 Oct 2019 18:23:28 +0000 (18:23 +0000)]
Resync imported/w3c/web-platform-tests/html/webappapis WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=203298

Reviewed by Youenn Fablet.

Resync imported/w3c/web-platform-tests/html/webappapis WPT tests from upstream 32ffb13f7f7fce355bf.

* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window-expected.txt:
* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js:
(async_test.t.window.handlers.afterOpen.t.step_func_done):
(async_test.t.window.handlers.afterOpenAsync.t.step_func_done):
* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/location-set-and-document-open-expected.txt: Added.
* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/location-set-and-document-open.html: Added.
* web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/w3c-import.log:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.serviceworker-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.serviceworker.html: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/disallow-crossorigin.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/support/promise-access-control.py:
(main):

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

3 months agoUpdate test262 (2019.10.11)
ross.kirsling@sony.com [Wed, 23 Oct 2019 18:07:55 +0000 (18:07 +0000)]
Update test262 (2019.10.11)
https://bugs.webkit.org/show_bug.cgi?id=202861

Reviewed by Keith Miller.

* test262/config.yaml:
* test262/expectations.yaml:
* test262/harness/:
* test262/latest-changes-summary.txt:
* test262/test/:
* test262/test262-Revision.txt:

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

3 months agoUnreviewed, fix tvOS and watchOS engineering builds after r251377
wenson_hsieh@apple.com [Wed, 23 Oct 2019 17:03:25 +0000 (17:03 +0000)]
Unreviewed, fix tvOS and watchOS engineering builds after r251377

-[UIPasteboard itemProviders] is only available on iOS.

* TestWebKitAPI/Tests/WebKitCocoa/ClipboardTests.mm:
(writeMultipleObjectsToPlatformPasteboard):

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

3 months agoPython 3: 2to3 script may not be in a user's path
jbedard@apple.com [Wed, 23 Oct 2019 15:42:56 +0000 (15:42 +0000)]
Python 3: 2to3 script may not be in a user's path
https://bugs.webkit.org/show_bug.cgi?id=203213

Reviewed by Dewei Zhu.

* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.__init__): Remove executive dependencies.
(AutoinstallImportHook._install_beautifulsoup): Use multiprocess because 2to3 sets
Some undesirable global logging state.

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

3 months agoRemove NavigatorBase::serviceWorkerIfExists
youenn@apple.com [Wed, 23 Oct 2019 07:56:35 +0000 (07:56 +0000)]
Remove NavigatorBase::serviceWorkerIfExists
https://bugs.webkit.org/show_bug.cgi?id=203241

Reviewed by Chris Dumez.

Remove unused method.
No change of behavior.

* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::serviceWorkerIfExists): Deleted.
* page/NavigatorBase.h:

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

3 months agoprepare-ChangeLog should whine about not having tests in WebKit-only patches
timothy_horton@apple.com [Wed, 23 Oct 2019 07:31:05 +0000 (07:31 +0000)]
prepare-ChangeLog should whine about not having tests in WebKit-only patches
https://bugs.webkit.org/show_bug.cgi?id=203027

Reviewed by Ryosuke Niwa.

* Scripts/prepare-ChangeLog:
(generateNewChangeLogs):
Put the "No new tests" or list of newly added tests in the deeper
of the WebCore or WebKit ChangeLogs, depending on which directories
the patch touches.

This is mostly intended to encourage tests for WebKit-only changes.

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

3 months agoMake `JSGlobalObject*` threading change more stabilized by adding tests and assertions
ysuzuki@apple.com [Wed, 23 Oct 2019 05:16:51 +0000 (05:16 +0000)]
Make `JSGlobalObject*` threading change more stabilized by adding tests and assertions
https://bugs.webkit.org/show_bug.cgi?id=203274

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch does some follow-up changes after r251425.

1. Add tests that tests vm.topCallFrame from C++ world to ensure that `vm.topCallFrame` is kept nullptr if it is accessed from C++ world even after executing some scripts.
2. Add assertion to ensure that `DECLARE_CALL_FRAME` is only called in JIT operation's prologue.
3. Remove some of ExecState::deprecatedVM call.
4. Define `USE(BUILTIN_FRAME_ADDRESS)` when using __builtin_frame_address to get CallFrame.

* API/tests/testapi.cpp:
(TestAPI::topCallFrameAccess):
(testCAPIViaCpp):
* interpreter/CallFrame.cpp:
(JSC::isFromJSCode):
* interpreter/CallFrame.h:
* jit/CCallHelpers.h:
(JSC::CCallHelpers::prepareCallOperation):
* tools/VMInspector.cpp:
(JSC::VMInspector::dumpRegisters):

Source/WTF:

* wtf/Platform.h:

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

3 months agowpt/css/css-images/gradient/color-stops-parsing.html fails
simon.fraser@apple.com [Wed, 23 Oct 2019 03:51:33 +0000 (03:51 +0000)]
wpt/css/css-images/gradient/color-stops-parsing.html fails
https://bugs.webkit.org/show_bug.cgi?id=200211

Reviewed by Dean Jackson.
LayoutTests/imported/w3c:

New result.

* web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt:

Source/WebCore:

CSS gradients allow a single color stop to have multiple positions. In this case
we need to copy the color from the first to subsequent stops.

Tested by web-platform-tests/css/css-images/gradient/color-stops-parsing.html
and imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-conic.html.

* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::gradientWithStylesResolved): Copy colors to subsequent stops.
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Fix the parsing of
stops with multiple positions.

LayoutTests:

Mark the conic gradient test as skipped, then passing on Mojave+.

* TestExpectations:
* platform/mac/TestExpectations:

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

3 months agoVersioning.
kocsen_chung@apple.com [Wed, 23 Oct 2019 03:27:49 +0000 (03:27 +0000)]
Versioning.

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

3 months agoUnreviewed, WinCairo build fix after r251468
ysuzuki@apple.com [Wed, 23 Oct 2019 03:06:29 +0000 (03:06 +0000)]
Unreviewed, WinCairo build fix after r251468
https://bugs.webkit.org/show_bug.cgi?id=203276

* jit/JIT.h:

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

3 months agoUnreviewed build fix for non-unified source builds
Hironori.Fujii@sony.com [Wed, 23 Oct 2019 02:37:43 +0000 (02:37 +0000)]
Unreviewed build fix for non-unified source builds
https://bugs.webkit.org/show_bug.cgi?id=203055
<rdar://problem/56504295>

* WebProcess/Storage/WebServiceWorkerProvider.cpp: Added #include <WebCore/RuntimeEnabledFeatures.h>.

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

3 months agoAX: Implement support for new ARIA roles: code, strong, emphasis, generic
jdiggs@igalia.com [Wed, 23 Oct 2019 02:34:00 +0000 (02:34 +0000)]
AX: Implement support for new ARIA roles: code, strong, emphasis, generic
https://bugs.webkit.org/show_bug.cgi?id=203257

Reviewed by Chris Fleizach.

Source/WebCore:

Create new internal AccessibilityRole types for the new roles.
Treat code, strong, and emphasis as internal format style groups,
which are equivalent to their corresponding HTML elements.

No new tests. Instead, added new roles to existing tests and updated
expectations.

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::isStyleFormatGroup const):
* accessibility/AccessibilityObjectInterface.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessible.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

Add new roles to existing role-related tests and update expectations.

* accessibility/gtk/xml-roles-exposed-expected.txt:
* accessibility/gtk/xml-roles-exposed.html:
* accessibility/roles-computedRoleString.html:
* accessibility/roles-exposed.html:
* platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

3 months agoBytecodeIndex should be a proper C++ class
keith_miller@apple.com [Wed, 23 Oct 2019 00:55:38 +0000 (00:55 +0000)]
BytecodeIndex should be a proper C++ class
https://bugs.webkit.org/show_bug.cgi?id=203276

Reviewed by Mark Lam.

This patch makes a change to how we refer to the bytecode index in
a bytecode stream. Previously we just used an unsigned number to
represent the index, this patch changes most of the code to use a
BytecodeIndex class instead. The only places where this patch does
not change this is for jump and switch targets / deltas.

Additionally, this patch attempts to canonicalize the terminology
around how we refer to bytecode indices. Now we use the word index
to refer to the bytecode index class and offset to refer to the
unsigned byte offset into the instruction stream.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/ByValInfo.h:
(JSC::ByValInfo::ByValInfo):
(JSC::getByValInfoBytecodeIndex):
* bytecode/BytecodeBasicBlock.cpp:
(JSC::BytecodeBasicBlock::computeImpl):
* bytecode/BytecodeGeneratorification.cpp:
(JSC::GeneratorLivenessAnalysis::run):
* bytecode/BytecodeIndex.cpp: Added.
(JSC::BytecodeIndex::dump const):
* bytecode/BytecodeIndex.h: Added.
(JSC::BytecodeIndex::BytecodeIndex):
(JSC::BytecodeIndex::offset const):
(JSC::BytecodeIndex::asBits const):
(JSC::BytecodeIndex::hash const):
(JSC::BytecodeIndex::deletedValue):
(JSC::BytecodeIndex::isHashTableDeletedValue const):
(JSC::BytecodeIndex::operator bool const):
(JSC::BytecodeIndex::operator == const):
(JSC::BytecodeIndex::operator != const):
(JSC::BytecodeIndex::operator < const):
(JSC::BytecodeIndex::operator > const):
(JSC::BytecodeIndex::operator <= const):
(JSC::BytecodeIndex::operator >= const):
(JSC::BytecodeIndex::fromBits):
(JSC::BytecodeIndexHash::hash):
(JSC::BytecodeIndexHash::equal):
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::getLivenessInfoAtBytecodeIndex):
(JSC::BytecodeLivenessAnalysis::computeFullLiveness):
(JSC::BytecodeLivenessAnalysis::computeKills):
(JSC::BytecodeLivenessAnalysis::dumpResults):
(JSC::BytecodeLivenessAnalysis::getLivenessInfoAtBytecodeOffset): Deleted.
* bytecode/BytecodeLivenessAnalysis.h:
* bytecode/BytecodeLivenessAnalysisInlines.h:
(JSC::BytecodeLivenessPropagation::stepOverInstruction):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForBytecodeIndex):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForBlock):
(JSC::BytecodeLivenessPropagation::getLivenessInfoAtBytecodeIndex):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForBytecodeOffset): Deleted.
(JSC::BytecodeLivenessPropagation::getLivenessInfoAtBytecodeOffset): Deleted.
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeIndex):
(JSC::computeDefsForBytecodeIndex):
(JSC::computeUsesForBytecodeOffset): Deleted.
(JSC::computeDefsForBytecodeOffset): Deleted.
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFromLLInt):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
* bytecode/CallLinkStatus.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
(JSC::CodeBlock::addRareCaseProfile):
(JSC::CodeBlock::rareCaseProfileForBytecodeIndex):
(JSC::CodeBlock::rareCaseProfileCountForBytecodeIndex):
(JSC::CodeBlock::handlerForBytecodeIndex):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndex):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndexSlow):
(JSC::CodeBlock::lineNumberForBytecodeIndex):
(JSC::CodeBlock::columnNumberForBytecodeIndex):
(JSC::CodeBlock::expressionRangeForBytecodeIndex const):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::tryGetValueProfileForBytecodeIndex):
(JSC::CodeBlock::valueProfilePredictionForBytecodeIndex):
(JSC::CodeBlock::valueProfileForBytecodeIndex):
(JSC::CodeBlock::validate):
(JSC::CodeBlock::arithProfileForBytecodeIndex):
(JSC::CodeBlock::couldTakeSpecialArithFastCase):
(JSC::CodeBlock::bytecodeIndexFromCallSiteIndex):
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset): Deleted.
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset const): Deleted.
(JSC::CodeBlock::tryGetValueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::likelyToTakeSlowCase):
(JSC::CodeBlock::couldTakeSlowCase):
(JSC::CodeBlock::bytecodeIndex):
* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::approximateHash const):
(JSC::CodeOrigin::dump const):
* bytecode/CodeOrigin.h:
(JSC::CodeOrigin::CodeOrigin):
(JSC::CodeOrigin::isSet const):
(JSC::CodeOrigin::isHashTableDeletedValue const):
(JSC::CodeOrigin::bytecodeIndex const):
(JSC::CodeOrigin::OutOfLineCodeOrigin::OutOfLineCodeOrigin):
(JSC::CodeOrigin::buildCompositeValue):
(JSC::CodeOrigin::hash const):
* bytecode/DFGExitProfile.cpp:
(JSC::DFG::FrequentExitSite::dump const):
(JSC::DFG::ExitProfile::exitSitesFor):
* bytecode/DFGExitProfile.h:
(JSC::DFG::FrequentExitSite::FrequentExitSite):
(JSC::DFG::FrequentExitSite::operator== const):
(JSC::DFG::FrequentExitSite::subsumes const):
(JSC::DFG::FrequentExitSite::hash const):
(JSC::DFG::FrequentExitSite::bytecodeIndex const):
(JSC::DFG::FrequentExitSite::isHashTableDeletedValue const):
(JSC::DFG::QueryableExitProfile::hasExitSite const):
(JSC::DFG::FrequentExitSite::bytecodeOffset const): Deleted.
* bytecode/DeferredSourceDump.cpp:
(JSC::DeferredSourceDump::DeferredSourceDump):
(JSC::DeferredSourceDump::dump):
* bytecode/DeferredSourceDump.h:
(): Deleted.
* bytecode/FullBytecodeLiveness.h:
(JSC::FullBytecodeLiveness::getLiveness const):
(JSC::FullBytecodeLiveness::operandIsLive const):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfo):
* bytecode/GetByIdStatus.h:
* bytecode/ICStatusUtils.cpp:
(JSC::hasBadCacheExitSite):
* bytecode/ICStatusUtils.h:
* bytecode/InByIdStatus.cpp:
(JSC::InByIdStatus::computeFor):
* bytecode/InByIdStatus.h:
* bytecode/InlineCallFrame.cpp:
(JSC::InlineCallFrame::dumpInContext const):
* bytecode/InstanceOfStatus.cpp:
(JSC::InstanceOfStatus::computeFor):
* bytecode/InstanceOfStatus.h:
* bytecode/InstructionStream.h:
(JSC::InstructionStream::BaseRef::offset const):
(JSC::InstructionStream::BaseRef::index const):
(JSC::InstructionStream::at const):
* bytecode/LazyOperandValueProfile.h:
(JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
(JSC::LazyOperandValueProfileKey::operator== const):
(JSC::LazyOperandValueProfileKey::hash const):
(JSC::LazyOperandValueProfileKey::bytecodeIndex const):
(JSC::LazyOperandValueProfileKey::isHashTableDeletedValue const):
(JSC::LazyOperandValueProfileKey::bytecodeOffset const): Deleted.
* bytecode/MethodOfGettingAValueProfile.cpp:
(JSC::MethodOfGettingAValueProfile::fromLazyOperand):
* bytecode/MethodOfGettingAValueProfile.h:
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):
* bytecode/PutByIdStatus.h:
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::StructureStubInfo):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeIndex):
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeIndex const):
(JSC::UnlinkedCodeBlock::handlerForBytecodeIndex):
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset const): Deleted.
(JSC::UnlinkedCodeBlock::handlerForBytecodeOffset): Deleted.
* bytecode/UnlinkedCodeBlock.h:
* bytecode/ValueProfile.h:
(JSC::RareCaseProfile::RareCaseProfile):
(JSC::getRareCaseProfileBytecodeIndex):
(JSC::getRareCaseProfileBytecodeOffset): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::ForInContext::finalize):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::currentPosition):
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::BasicBlock):
* dfg/DFGBasicBlock.h:
(JSC::DFG::getBytecodeBeginForBlock):
(JSC::DFG::blockForBytecodeIndex):
(JSC::DFG::blockForBytecodeOffset): Deleted.
* dfg/DFGBlockInsertionSet.cpp:
(JSC::DFG::BlockInsertionSet::insert):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::flushIfTerminal):
(JSC::DFG::ByteCodeParser::branchData):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::ByteCodeParser::getPrediction):
(JSC::DFG::ByteCodeParser::getArrayMode):
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::makeDivSafe):
(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::allocateUntargetableBlock):
(JSC::DFG::ByteCodeParser::makeBlockTargetable):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleCallVariant):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::linkBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::addCodeOrigin):
(JSC::DFG::CommonData::addUniqueCallSiteIndex):
(JSC::DFG::CommonData::lastCallSite const):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::catchOSREntryDataForBytecodeIndex):
(JSC::DFG::CommonData::appendCatchEntrypoint):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):
(JSC::DFG::Graph::willCatchExceptionInMachineFrame):
* dfg/DFGGraph.h:
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::clearOSREntryBlockAndResetThresholds):
* dfg/DFGJITCode.h:
(JSC::DFG::JITCode::appendOSREntryData):
(JSC::DFG::JITCode::osrEntryDataForBytecodeIndex):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::setStartOfCode):
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::OSREntryData::dumpInContext const):
(JSC::DFG::prepareOSREntry):
(JSC::DFG::prepareCatchOSREntry):
* dfg/DFGOSREntry.h:
(JSC::DFG::getOSREntryDataBytecodeIndex):
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntrypointCreationPhase.cpp:
(JSC::DFG::OSREntrypointCreationPhase::run):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):
(JSC::DFG::printOSRExit):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExit::debugOperationPrintSpeculationFailure):
* dfg/DFGOSRExit.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):
* dfg/DFGOSRExitCompilerCommon.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::cleanMustHandleValuesIfNecessary):
* dfg/DFGPlan.h:
(JSC::DFG::Plan::osrEntryBytecodeIndex const):
(JSC::DFG::Plan::tierUpInLoopHierarchy):
(JSC::DFG::Plan::tierUpAndOSREnterBytecodes):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::emitSwitchCharStringJump):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::TierUpCheckInjectionPhase::buildNaturalLoopToLoopHintMap):
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGValidate.cpp:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLForOSREntryJITCode.h:
(JSC::FTL::ForOSREntryJITCode::setBytecodeIndex):
(JSC::FTL::ForOSREntryJITCode::bytecodeIndex const):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueNegate):
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry):
* ftl/FTLOSREntry.h:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::callSiteIndex const):
(JSC::CallFrame::unsafeCallSiteIndex const):
(JSC::CallFrame::setCurrentVPC):
(JSC::CallFrame::bytecodeIndex):
(JSC::CallFrame::codeOrigin):
(JSC::CallFrame::dump):
(JSC::CallFrame::bytecodeOffset): Deleted.
* interpreter/CallFrame.h:
(JSC::CallSiteIndex::CallSiteIndex):
(JSC::CallSiteIndex::operator bool const):
(JSC::CallSiteIndex::operator== const):
(JSC::CallSiteIndex::bits const):
(JSC::CallSiteIndex::bytecodeIndex const):
(JSC::DisposableCallSiteIndex::DisposableCallSiteIndex):
(): Deleted.
* interpreter/Interpreter.cpp:
(JSC::GetStackTraceFunctor::operator() const):
(JSC::findExceptionHandler):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::update):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::readInlinedFrame):
(JSC::StackVisitor::Frame::retrieveExpressionInfo const):
(JSC::StackVisitor::Frame::dump const):
* interpreter/StackVisitor.h:
(JSC::StackVisitor::Frame::bytecodeIndex const):
(JSC::StackVisitor::Frame::bytecodeOffset const): Deleted.
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):
(JSC::JIT::privateCompileExceptionHandlers):
* jit/JIT.h:
(JSC::CallRecord::CallRecord):
(JSC::SlowCaseEntry::SlowCaseEntry):
(JSC::SwitchRecord::SwitchRecord):
(JSC::ByValCompilationInfo::ByValCompilationInfo):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
* jit/JITCodeMap.h:
(JSC::JITCodeMap::Entry::Entry):
(JSC::JITCodeMap::Entry::bytecodeIndex const):
(JSC::JITCodeMap::append):
(JSC::JITCodeMap::find const):
* jit/JITDisassembler.cpp:
(JSC::JITDisassembler::dumpVectorForInstructions):
(JSC::JITDisassembler::reportInstructions):
* jit/JITDisassembler.h:
* jit/JITInlines.h:
(JSC::JIT::emitNakedCall):
(JSC::JIT::emitNakedTailCall):
(JSC::JIT::updateTopCallFrame):
(JSC::JIT::linkAllSlowCasesForBytecodeIndex):
(JSC::JIT::addSlowCase):
(JSC::JIT::addJump):
(JSC::JIT::emitJumpSlowToHot):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::linkAllSlowCasesForBytecodeOffset): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_has_indexed_property):
* jit/JITOperations.cpp:
(JSC::getByVal):
(JSC::tryGetByValOptimize):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
* jit/JITWorklist.cpp:
(JSC::JITWorklist::Plan::Plan):
(JSC::JITWorklist::Plan::compileNow):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):
* jit/JITWorklist.h:
* jit/PCToCodeOriginMap.cpp:
(JSC::PCToCodeOriginMap::PCToCodeOriginMap):
(JSC::PCToCodeOriginMap::findPC const):
* jit/PCToCodeOriginMap.h:
(JSC::PCToCodeOriginMapBuilder::defaultCodeOrigin):
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::call):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* profiler/ProfilerOrigin.cpp:
(JSC::Profiler::Origin::Origin):
(JSC::Profiler::Origin::dump const):
(JSC::Profiler::Origin::toJS const):
* profiler/ProfilerOrigin.h:
(JSC::Profiler::Origin::Origin):
(JSC::Profiler::Origin::operator! const):
(JSC::Profiler::Origin::bytecodeIndex const):
(JSC::Profiler::Origin::hash const):
(JSC::Profiler::Origin::isHashTableDeletedValue const):
* runtime/Error.cpp:
(JSC::getBytecodeIndex):
(JSC::getBytecodeOffset): Deleted.
* runtime/Error.h:
* runtime/ErrorInstance.cpp:
(JSC::appendSourceToError):
(JSC::ErrorInstance::finishCreation):
* runtime/SamplingProfiler.cpp:
(JSC::tryGetBytecodeIndex):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::reportTopBytecodes):
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::StackFrame::CodeLocation::hasBytecodeIndex const):
* runtime/StackFrame.cpp:
(JSC::StackFrame::StackFrame):
(JSC::StackFrame::computeLineAndColumn const):
* runtime/StackFrame.h:
(JSC::StackFrame::hasBytecodeIndex const):
(JSC::StackFrame::bytecodeIndex):
(JSC::StackFrame::hasBytecodeOffset const): Deleted.
(JSC::StackFrame::bytecodeOffset): Deleted.
* tools/VMInspector.cpp:
(JSC::VMInspector::dumpRegisters):

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

3 months agoResource Load Statistics (experimental): Block all third-party cookies
wilander@apple.com [Wed, 23 Oct 2019 00:54:41 +0000 (00:54 +0000)]
Resource Load Statistics (experimental): Block all third-party cookies
https://bugs.webkit.org/show_bug.cgi?id=203266
<rdar://problem/56512858>

Reviewed by Alex Christensen.

This change updates the experimental change in
<https://trac.webkit.org/changeset/251213> to block all
third-party cookies, regardless of user interaction with
the first-party website.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-database.html
       http/tests/resourceLoadStatistics/third-party-cookie-blocking.html

* page/Settings.yaml:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::shouldBlockCookies const):
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingEnabled):
(WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingOnSitesWithoutUserInteractionEnabled): Deleted.

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::setShouldBlockThirdPartyCookiesForTesting):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Shared/WebPreferences.yaml:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):

LayoutTests:

* http/tests/resourceLoadStatistics/third-party-cookie-blocking-database-expected.txt: Renamed from LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-expected.txt.
* http/tests/resourceLoadStatistics/third-party-cookie-blocking-database.html: Renamed from LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html.
* http/tests/resourceLoadStatistics/third-party-cookie-blocking-expected.txt: Renamed from LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database-expected.txt.
* http/tests/resourceLoadStatistics/third-party-cookie-blocking.html: Renamed from LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html.

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

3 months agoWeb Inspector: Sources: keep the function/object name sticky in the object preview...
drousso@apple.com [Wed, 23 Oct 2019 00:33:37 +0000 (00:33 +0000)]
Web Inspector: Sources: keep the function/object name sticky in the object preview popover
https://bugs.webkit.org/show_bug.cgi?id=203259

Reviewed by Matt Baker.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content):
(.popover .debugger-popover-content.expandable): Added.
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):
(.popover .debugger-popover-content.formatted): Added.
(.popover .expandable): Deleted.
Use flexbox to ensure that only the function/object body is scrollable.
Adjust the min/max width/height to take less space for smaller objects.

* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
Wrap formatted values in a `<div>` so we can apply special styling to them.

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

3 months agoediting/pasteboard/paste-and-sanitize.html is a flaky failure
wenson_hsieh@apple.com [Wed, 23 Oct 2019 00:33:03 +0000 (00:33 +0000)]
editing/pasteboard/paste-and-sanitize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=203199
<rdar://problem/53551736>

Reviewed by Tim Horton.

Try to make this test more robust in WebKit2 on iOS 13 by ensuring at least one round trip between the web
content process and the UI process after copying and pasting. The root cause of the flakiness is still unknown,
but evidence suggests that code in Pasteboard.framework needs at least one runloop to sever the connection
between the application process and `pasted` after writing content to the pasteboard; otherwise, this
post-writing cleanup step will race against the next time we attempt to trigger a paste.

* editing/pasteboard/paste-and-sanitize.html:
* platform/ios-12/TestExpectations:
* platform/ios/TestExpectations:

Remove the failing test expectations.

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

3 months agoMake it possible to not include IPC Messages headers in other headers
timothy_horton@apple.com [Tue, 22 Oct 2019 22:59:20 +0000 (22:59 +0000)]
Make it possible to not include IPC Messages headers in other headers
https://bugs.webkit.org/show_bug.cgi?id=203074

* Scripts/webkit/messages_unittest.py:
(GeneratedFileContentsTest.assertHeaderEqual):
(GeneratedFileContentsTest.assertImplementationEqual):
(UnsupportedPrecompilerDirectiveTest.test_error_at_else):
(UnsupportedPrecompilerDirectiveTest.test_error_at_elif):
Fix the message generator unit tests.

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