WebKit-https.git
8 months ago[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
don.olmstead@sony.com [Tue, 11 Dec 2018 01:17:17 +0000 (01:17 +0000)]
[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
https://bugs.webkit.org/show_bug.cgi?id=192574

Reviewed by Michael Catanzaro.

.:

* Source/cmake/WebKitFeatures.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

8 months agoAdd test262-results directory to .gitignore.
ross.kirsling@sony.com [Tue, 11 Dec 2018 00:35:51 +0000 (00:35 +0000)]
Add test262-results directory to .gitignore.
https://bugs.webkit.org/show_bug.cgi?id=192547

Reviewed by Dean Jackson.

* .gitignore:

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

8 months agoAnimated scrolling on Google Maps scrolls the page in addition to moving the map
timothy_horton@apple.com [Tue, 11 Dec 2018 00:32:38 +0000 (00:32 +0000)]
Animated scrolling on Google Maps scrolls the page in addition to moving the map
https://bugs.webkit.org/show_bug.cgi?id=192521
<rdar://problem/46382007>

Reviewed by Sam Weinig.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
Only do keyboard-based rubber-banding in directions that we can actually
scroll, not directions we can only finger-rubber-band in. This effectively
means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".

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

8 months agoSync FeatureList.pm
don.olmstead@sony.com [Tue, 11 Dec 2018 00:08:09 +0000 (00:08 +0000)]
Sync FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=192565

Reviewed by Michael Catanzaro.

* Scripts/webkitperl/FeatureList.pm:

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

8 months agoRename "forced style recalc" to "full style rebuild"
antti@apple.com [Mon, 10 Dec 2018 23:56:31 +0000 (23:56 +0000)]
Rename "forced style recalc" to "full style rebuild"
https://bugs.webkit.org/show_bug.cgi?id=192572

Reviewed by Zalan Bujtas.

Source/WebCore:

The old name is confusing.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::hasValidStyleForProperty):
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRebuild):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
(WebCore::Document::hasPendingStyleRebuild const):
(WebCore::Document::resolveStyle):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::setDesignMode):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setAnimatingFullScreen):
(WebCore::Document::setFullscreenControlsHidden):
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::hasPendingForcedStyleRecalc const): Deleted.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::needsStyleInvalidation const):
* page/Page.cpp:
(WebCore::Page::updateStyleAfterChangeInEnvironment):
* style/StyleScope.cpp:
(WebCore::Style::Scope::updateActiveStyleSheets):

Source/WebKitLegacy/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView setNeedsToApplyStyles:]):

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

8 months agoUnreviewed, rolling out r239023.
commit-queue@webkit.org [Mon, 10 Dec 2018 23:36:36 +0000 (23:36 +0000)]
Unreviewed, rolling out r239023.
https://bugs.webkit.org/show_bug.cgi?id=192571

Speculative rollout due to broken perf test (Requested by
deanj on #webkit).

Reverted changeset:

"Enable HTTP and HTTPS proxies on iOS and make it a property
of the NSURLSession"
https://bugs.webkit.org/show_bug.cgi?id=192374
https://trac.webkit.org/changeset/239023

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

8 months agoLinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
mark.lam@apple.com [Mon, 10 Dec 2018 23:14:31 +0000 (23:14 +0000)]
LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>

Reviewed by Saam Barati.

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):

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

8 months agoInclude CoreGraphics.h from WebCorePrefix.h
ap@apple.com [Mon, 10 Dec 2018 23:05:57 +0000 (23:05 +0000)]
Include CoreGraphics.h from WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=192557

Reviewed by Tim Horton.

The theory is that this will improve build time. Let's try and see what bots say.

* WebCorePrefix.h:

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

8 months ago[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
wenson_hsieh@apple.com [Mon, 10 Dec 2018 22:18:10 +0000 (22:18 +0000)]
[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
https://bugs.webkit.org/show_bug.cgi?id=192555
<rdar://problem/35204990>

Reviewed by Tim Horton.

Source/WebCore:

Add support for uploading content that conforms to "public.item" via drag and drop. Currently, iOS WebKit only
supports data that conforms to "public.content", but there exist several types of files that conform to
"public.item" but not "public.content". See below for more detail.

Test: DragAndDropTests.ExternalSourcePKCS12ToSingleFileInput

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Update this to include "public.item", and remove "public.folder", which is now redundant because "public.folder"
conforms to "public.item".

* platform/ios/WebItemProviderPasteboard.mm:
(-[NSItemProvider web_containsFileURLAndFileUploadContent]):

Pull out the "contains content that is supported for file uploads" part of this helper method into a separate
method, and use it within `-web_containsFileURLAndFileUploadContent`. Note that this prevents "public.url"-
conformant data from being uploaded as files (i.e., we never want to upload a URL string *itself* as a file).
Drawing this distinction ensures that we don't confuse item providers that contain just a URL as files when
dropping into a file upload area or file input (see API test: ExternalSourceZIPArchiveAndURLToSingleFileInput
for an example of this corner case).

(-[NSItemProvider web_containsFileUploadContent]):
(-[WebItemProviderPasteboard numberOfFiles]):

Refactor this to use `-web_containsFileUploadContent`.

Tools:

Add a test to verify that `.p12` files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
only support uploading "public.content", so files such as these would not be accepted when dropping into file
inputs, or be exposed as files on DataTransfer.

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

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

8 months agoUnreviewed, fix the iOS build after r239039.
wenson_hsieh@apple.com [Mon, 10 Dec 2018 22:10:48 +0000 (22:10 +0000)]
Unreviewed, fix the iOS build after r239039.
https://bugs.webkit.org/show_bug.cgi?id=192568

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

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

8 months agoWeb Inspector: Move TreeOutlineGroup coordination out of TreeElement
mattbaker@apple.com [Mon, 10 Dec 2018 22:03:13 +0000 (22:03 +0000)]
Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
https://bugs.webkit.org/show_bug.cgi?id=192487
<rdar://problem/46543431>

Reviewed by Devin Rousso.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.deselect):

* UserInterface/Views/TreeOutlineGroup.js:
(WI.TreeOutlineGroup):
(WI.TreeOutlineGroup.prototype.itemAdded):
(WI.TreeOutlineGroup.prototype.itemRemoved):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
(WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
(WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
(WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
make the group responsible for listening to selection changes from the
TreeOutlines it manages, and synchronizing the selection between them.

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

8 months agoInjected bundle for WebKitTestRunner leaks WKTypeRef objects
ddkilzer@apple.com [Mon, 10 Dec 2018 21:55:56 +0000 (21:55 +0000)]
Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Follow-up to address Darin's feedback.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::keyExistsInKeychain):

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

8 months agoFix WatchOS build.
achristensen@apple.com [Mon, 10 Dec 2018 21:50:11 +0000 (21:50 +0000)]
Fix WatchOS build.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionNameForFocusedFormControlView:]):

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

8 months agowebkitpy: Ref tests don't respect platform specific expectations
jbedard@apple.com [Mon, 10 Dec 2018 21:48:13 +0000 (21:48 +0000)]
webkitpy: Ref tests don't respect platform specific expectations
https://bugs.webkit.org/show_bug.cgi?id=192515
<rdar://problem/46564839>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/port/base.py:
(Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
(Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
(Port.expected_filename): Remove irrelevant FIXME, code clean-up.
(Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
search all platform expectations as well.
* Scripts/webkitpy/port/base_unittest.py:
(test_ref_tests_platform_directory):

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

8 months agoUnreviewed, rolling out r239029.
jlewis3@apple.com [Mon, 10 Dec 2018 21:30:42 +0000 (21:30 +0000)]
Unreviewed, rolling out r239029.

This patch caused internal build failures.

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239029

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

8 months agoAdd SPI to allow the client to set the user-agent at main frame level, from the UIProcess
cdumez@apple.com [Mon, 10 Dec 2018 21:26:39 +0000 (21:26 +0000)]
Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>

Reviewed by Alex Christensen.

Source/WebCore:

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setCustomUserAgent):
(WebCore::DocumentLoader::customUserAgent const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::userAgent const):

Source/WebKit:

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.

The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.

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

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
(-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
(-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
(-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomUserAgentDelegate webView:didFinishNavigation:]):

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

8 months ago[BigInt] Add ValueMul into DFG
ticaiolima@gmail.com [Mon, 10 Dec 2018 21:11:43 +0000 (21:11 +0000)]
[BigInt] Add ValueMul into DFG
https://bugs.webkit.org/show_bug.cgi?id=186175

Reviewed by Yusuke Suzuki.

JSTests:

* stress/big-int-mul-jit-osr.js: Added.
* stress/big-int-mul-jit-untyped.js: Added.
* stress/value-mul-fixup-int32-big-int.js: Added.

PerformanceTests:

* BigIntBench/big-int-simple-mul.js: Added.
* BigIntBench/value-mul-type-propagation.js: Added.

Source/JavaScriptCore:

This patch is adding a new DFG node called ValueMul. This node is
responsible to handle multiplication operations that can result into
non-number values. We emit such node during DFGByteCodeParser when the
operands are not numbers. During FixupPhase, we change this
operation to ArithMul if we can speculate Number/Boolean operands.

The BigInt specialization shows a small progression:

                        noSpec                changes

big-int-simple-mul  18.8090+-1.0435  ^  17.4305+-0.2673  ^ definitely 1.0791x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupMultiplication):
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::arithNodeFlags):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileArithMul):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):

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

8 months agoSafe browsing warning should layout buttons vertically in narrow WKWebViews
achristensen@apple.com [Mon, 10 Dec 2018 20:56:52 +0000 (20:56 +0000)]
Safe browsing warning should layout buttons vertically in narrow WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=192535
<rdar://problem/46308364>

Reviewed by Tim Horton.

They're usually next to each other, but in narrow WKWebViews they currently get clipped.
In order to make it more likely that both buttons are completely visible, put one above
the other if the WKWebView is too narrow to completely show both.  This also helps with
languages where the translations of "Go Back" or "Show Details" are rendered wider than English.

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(buttonWidth):
(-[WKSafeBrowsingWarning addContent]):

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

8 months ago[GLib] FileSystem::moveFile() should fall back to copying
aperez@igalia.com [Mon, 10 Dec 2018 20:46:29 +0000 (20:46 +0000)]
[GLib] FileSystem::moveFile() should fall back to copying
https://bugs.webkit.org/show_bug.cgi?id=192562

Reviewed by Michael Catanzaro.

No new tests needed.

* platform/glib/FileSystemGlib.cpp:
(WebCore::FileSystem::moveFile): Use g_file_move() instead of a plain g_rename(), which
provides a fall-back which does copy+delete when a direct move or rename cannot be done.

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

8 months agoAllow control over child order when adding nodes to the scrolling tree
simon.fraser@apple.com [Mon, 10 Dec 2018 20:43:40 +0000 (20:43 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Re-land r239010 after over-zealous rollout.

Source/WebCore:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

8 months agoDocument should throttle style recalc even when m_pendingStyleRecalcShouldForce is...
antti@apple.com [Mon, 10 Dec 2018 20:42:53 +0000 (20:42 +0000)]
Document should throttle style recalc even when m_pendingStyleRecalcShouldForce is true.
https://bugs.webkit.org/show_bug.cgi?id=191695

Reviewed by Zalan Bujtas.

* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):

Don't test for m_pendingStyleRecalcShouldForce.

(WebCore::Document::hasPendingStyleRecalc const):
(WebCore::Document::hasPendingForcedStyleRecalc const):

Don't base the pending status of these function on whether the timer is running.
Instead check if the style is invalid.

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

8 months agoXMLHttpRequest removes spaces from content-types before processing
commit-queue@webkit.org [Mon, 10 Dec 2018 20:31:18 +0000 (20:31 +0000)]
XMLHttpRequest removes spaces from content-types before processing
https://bugs.webkit.org/show_bug.cgi?id=8644

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

LayoutTests/imported/w3c:

Update improved test expectations.

* web-platform-tests/mimesniff/mime-types/parsing.any-expected.txt:
* web-platform-tests/mimesniff/mime-types/parsing.any.worker-expected.txt:

Source/WebCore:

Stop trimming white space characters from the middle of
type/subtype value. Also make sure whitespace being parsed
adheres to OWS definition from RFC 7230 Section 3.2.3
(referenced by RFC 7231), i.e. space or HT.

Based on http://crrev.com/416586.

Behavior matches Firefox and Chrome.

Tests: http/tests/xmlhttprequest/supported-xml-content-types.html
       web-platform-tests/mimesniff/mime-types/parsing.any.html
       web-platform-tests/mimesniff/mime-types/parsing.any.worker.html

* platform/network/HTTPParsers.cpp:
(WebCore::extractMIMETypeFromMediaType):

LayoutTests:

Update improved test expectation and remove comment.

* http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
* http/tests/xmlhttprequest/supported-xml-content-types.html:

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

8 months ago[iOS] Caret is obscured by finger when dragging over an editable element
wenson_hsieh@apple.com [Mon, 10 Dec 2018 20:27:59 +0000 (20:27 +0000)]
[iOS] Caret is obscured by finger when dragging over an editable element
https://bugs.webkit.org/show_bug.cgi?id=192499
<rdar://problem/46570101>

Reviewed by Tim Horton.

Source/WebCore:

* page/DragActions.h:

Move DragHandlingMethod to DragActions.h, and drive-by fix some minor issues (i.e. make a couple of enum classes
use 8 bits, fix the indentation levels, and update the copyright year). Also add `EnumTraits` for
DragHandlingMethod so that it may be encoded over IPC.

* page/DragController.cpp:
(WebCore::dragIsHandledByDocument):

Simplify this helper function.

(WebCore::DragController::tryDocumentDrag):
* page/DragController.h:

Expose the current DragHandlingMethod via a const getter method.

(WebCore::DragController::dragHandlingMethod const):

Source/WebKit:

Add support for setting the `precise` property of `UIDropProposal` to YES when dragging over an editable area.
When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
are covered by adding to existing API tests.

* Scripts/webkit/messages.py:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Add a new version of `-_webView:willUpdateDataInteractionOperationToOperation:forSession:` that receives and
returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
be easily removed once Safari adopts this new version.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformDragControllerAction):

Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.

(WebKit::WebPageProxy::resetCurrentDragInformation):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::currentDragHandlingMethod const):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dropInteraction:sessionDidUpdate:]):

Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
`precise` bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
"editing plain text".

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/WebPage.h:

Tools:

Augment some existing API tests to check that the `precise` flag is either on or off on `UIDropProposal`.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator lastKnownDropProposal]):

Rename `currentDropProposal` to `lastKnownDropProposal`, and expose it as a readonly property.

(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
(-[DragAndDropSimulator showCustomActionSheetBlock]):
(-[DragAndDropSimulator setConvertItemProvidersBlock:]):
(-[DragAndDropSimulator convertItemProvidersBlock]):
(-[DragAndDropSimulator setOverridePerformDropBlock:]):
(-[DragAndDropSimulator overridePerformDropBlock]):
(-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
(-[DragAndDropSimulator overrideDragUpdateBlock]):
(-[DragAndDropSimulator setDropCompletionBlock:]):
(-[DragAndDropSimulator dropCompletionBlock]):

Refactor these properties to return and take normal Objective-C blocks, rather than `BlockPtr`s. However, use
`BlockPtr` instance variables to manage the lifetimes of these blocks.

(-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
(-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.

Update this to use the new WebKit delegate hook for overriding the drop proposal.

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

8 months agoMake mock capture happen in the process used for real capture
youenn@apple.com [Mon, 10 Dec 2018 19:53:43 +0000 (19:53 +0000)]
Make mock capture happen in the process used for real capture
https://bugs.webkit.org/show_bug.cgi?id=192544

Reviewed by Eric Carlson.

Source/WebCore:

MockRealtimeMediaSourceCenter previously was setting its factories whenever mock capture is on.
Add booleans to choose which source (audio, video, display) will actually be toggled on.

Covered by existing tests.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
* platform/mock/MockRealtimeMediaSourceCenter.h:
(WebCore::MockRealtimeMediaSourceCenter::setMockAudioCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockVideoCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockDisplayCaptureEnabled):

Source/WebKit:

Make mock capture happen in the right process by only overriding
factories by mock factories for source types that UserMediaCaptureManager will not override.
That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::initialize):

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

8 months agoUse text/javascript as recommended by the HTML specification
dino@apple.com [Mon, 10 Dec 2018 19:45:45 +0000 (19:45 +0000)]
Use text/javascript as recommended by the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=192525
<rdar://problem/46569636>

Reviewed by Jon Lee.

The HTML specification says we should use text/javascript for
JavaScript files:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type

Source/WebCore:

* loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.
(WebCore::CachedScript::CachedScript):
* platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):
* platform/network/mac/WebCoreURLResponse.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):

Source/WebInspectorUI:

* UserInterface/Base/MIMETypeUtilities.js:
(WI.mimeTypeForFileExtension):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype._attemptToDetermineMIMEType):

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

8 months ago[iOS] Make WebGPU work with remote layer hosting
dino@apple.com [Mon, 10 Dec 2018 19:37:49 +0000 (19:37 +0000)]
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

* SourcesCocoa.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

* platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
from CAMetalLayer.
* platform/graphics/cocoa/WebGPULayer.mm: Added.
(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

* platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
than CALayer.

* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

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

8 months agoMove ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
ap@apple.com [Mon, 10 Dec 2018 18:06:37 +0000 (18:06 +0000)]
Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192428

Reviewed by Tim Horton.

Source/WebKit:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

8 months agoMove more macros out of WebKit's config.h
ap@apple.com [Mon, 10 Dec 2018 17:55:34 +0000 (17:55 +0000)]
Move more macros out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192430

Reviewed by Tim Horton.

Source/WebKit:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

8 months ago[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
cdumez@apple.com [Mon, 10 Dec 2018 17:51:08 +0000 (17:51 +0000)]
[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
https://bugs.webkit.org/show_bug.cgi?id=192533
rdar://problem/45732710

Patch by Darin Adler <darin@apple.com> on 2018-12-10
Reviewed by Anders Carlsson.

Source/WebCore/PAL:

* pal/spi/mac/HIServicesSPI.h: Added kMSHDoNotCreateSendRightOption.

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Pass kMSHDoNotCreateSendRightOption.

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

8 months ago[macOS] Use mach_port_mod_refs instead of mach_port_destroy
cdumez@apple.com [Mon, 10 Dec 2018 17:50:38 +0000 (17:50 +0000)]
[macOS] Use mach_port_mod_refs instead of mach_port_destroy
https://bugs.webkit.org/show_bug.cgi?id=192532
rdar://problem/45731047

Patch by Darin Adler <darin@apple.com> on 2018-12-10
Reviewed by Chris Dumez.

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::hostForPlugin): Use mach_port_mod_refs.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.

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

8 months agoUnreviewed, rolling out r238965.
tsavell@apple.com [Mon, 10 Dec 2018 17:17:26 +0000 (17:17 +0000)]
Unreviewed, rolling out r238965.

Caused internal iOS build failures

Reverted changeset:

"[iOS] Make WebGPU work with remote layer hosting"
https://bugs.webkit.org/show_bug.cgi?id=192508
https://trac.webkit.org/changeset/238965

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

8 months agoMockLibWebRTCPeerConnectionFactory should isolate copy its test case
youenn@apple.com [Mon, 10 Dec 2018 16:30:53 +0000 (16:30 +0000)]
MockLibWebRTCPeerConnectionFactory should isolate copy its test case
https://bugs.webkit.org/show_bug.cgi?id=192545

Reviewed by Eric Carlson.

Isolate copy the test case member so that it can be destroyed on another thread.
Covered by existing test that should no longer crash.

* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
* testing/MockLibWebRTCPeerConnection.h:
(WebCore::MockLibWebRTCPeerConnectionFactory::create):

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

8 months ago[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for...
cfleizach@apple.com [Mon, 10 Dec 2018 16:07:28 +0000 (16:07 +0000)]
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* Platform/spi/ios/AccessibilitySupportSPI.h:
* PlatformMac.cmake:
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginProcess.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
(WKErrorCopyCFError):
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
(WKImageCreateFromCGImage):
* Shared/ChildProcess.cpp:
* Shared/ContextMenuContextData.cpp:
* Shared/EditorState.cpp:
* Shared/Plugins/NPIdentifierData.cpp:
* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
* Shared/SessionState.cpp:
* Shared/SessionTracker.cpp:
* Shared/ShareableBitmap.cpp:
* Shared/ShareableResource.cpp:
* Shared/VisibleContentRectUpdateInfo.cpp:
* Shared/WebBackForwardListItem.cpp:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebHitTestResultData.cpp:
* Shared/WebImage.cpp:
* Shared/WebMediaSessionMetadata.cpp:
* Shared/WebMemorySampler.cpp:
* Shared/WebMouseEvent.cpp:
* Shared/WebRenderObject.cpp:
* Shared/WebSQLiteDatabaseTracker.cpp:
* Shared/WebWheelEvent.cpp:
* Shared/cf/ArgumentCodersCF.cpp:
* Shared/ios/WebPlatformTouchPointIOS.cpp:
* SourcesCocoa.txt:
* UIProcess/API/APIContentRuleListStore.cpp:
* UIProcess/API/APIHitTestResult.cpp:
* UIProcess/API/APINavigation.cpp:
* UIProcess/API/APIOpenPanelParameters.cpp:
* UIProcess/API/APIPageConfiguration.cpp:
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
* UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
* UIProcess/WebStorage/LocalStorageDatabase.cpp:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

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

8 months ago[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
mcatanzaro@igalia.com [Mon, 10 Dec 2018 14:58:31 +0000 (14:58 +0000)]
[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
https://bugs.webkit.org/show_bug.cgi?id=190241

Reviewed by Carlos Garcia Campos.

run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
Currently this actually creates the directories needed for the flatpak environment. Fix it.

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run):

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

8 months ago[GTK] Don't use the slice allocator
mcatanzaro@igalia.com [Mon, 10 Dec 2018 14:56:16 +0000 (14:56 +0000)]
[GTK] Don't use the slice allocator
https://bugs.webkit.org/show_bug.cgi?id=192360

Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/main.c:
(aboutDataRequestFree):
(aboutDataRequestNew):

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

8 months agoWKWebView should support custom tintColor
timothy_horton@apple.com [Mon, 10 Dec 2018 09:05:01 +0000 (09:05 +0000)]
WKWebView should support custom tintColor
https://bugs.webkit.org/show_bug.cgi?id=192518
<rdar://problem/37243261>

Reviewed by Wenson Hsieh.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertionPointColor]):
(-[WKContentView selectionBarColor]):
(-[WKContentView selectionHighlightColor]):
Grab insertion point and selection colors from UITextInputTraits.

(-[WKContentView _updateInteractionTintColor]):
Determine our effective tint color:
    - transparent if interaction is disabled
    - a CSS-derived color if caret-color style is applied
    - the _inheritedInteractionTintColor, which climbs up to the tintColor API
Apply it to our UITextInputTraits.

(-[WKContentView tintColorDidChange]):
(-[WKContentView textInputTraits]):
Call _updateInteractionTintColor whenever we create a new UITextInputTraits
or when the tint color changes.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
(TestWebKitAPI::TEST):
Add a test that tintColor affects UITextInputTraits' interaction colors.

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

8 months ago[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
wenson_hsieh@apple.com [Mon, 10 Dec 2018 07:54:16 +0000 (07:54 +0000)]
[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
https://bugs.webkit.org/show_bug.cgi?id=192524

Reviewed by Ryosuke Niwa.

This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
(see <rdar://problem/28300343>). This API test simulates two drops from external sources, both from the point
(300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
wide selection rect and increases the width of the document; revealing this selection causes the web view to
scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
these window coordinates no longer correspond to the drop destination element in the document.

To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
scroll horizontally after the first drop.

* TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:

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

8 months agoMove capture manager from RealtimeMediaSourceCenter to capture factory
youenn@apple.com [Mon, 10 Dec 2018 05:30:23 +0000 (05:30 +0000)]
Move capture manager from RealtimeMediaSourceCenter to capture factory
https://bugs.webkit.org/show_bug.cgi?id=192542

Reviewed by Eric Carlson.

Source/WebCore:

We should be able to run mock captures in wither UIProcess or WebProcess.
Currently, mock capture is only done in WebProcess.
This patch is a first step towards that goal.

It also simplifies RealtimeMediaSourceCenter implementation by starting to remove virtual methods.
Further refactoring will remove the need to subclass RealtimeMediaSourceCenter.
Instead, remaining virtual methods will become non virtual and their
implementation will become port specific.

Removed a JS internal method that is not longer used to further simplify RealtimeMediaSourceCenter.

No visible change of behavior.
Covered by existing tests.

* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getDisplayMediaDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/RealtimeMediaSourceFactory.h:
* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoFactory):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory):
* platform/mock/MockRealtimeMediaSourceCenter.h:
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureDeviceManager):
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Make sure to unregister for video capture as done for other capture types.
Implement manager which should be doing nothing as the manager is used for enumeration of devices
which should only happen in UIProcess.

Given that mock capture is interfering with UserMediaCaptureManager,
switching on/off mock capture will require creating a new process.
This shortcoming should be fixed once mock capture will be fully happening in
the same process as regular capture.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
* WebProcess/cocoa/UserMediaCaptureManager.h:

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

8 months agoEnable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
sbarati@apple.com [Mon, 10 Dec 2018 01:56:16 +0000 (01:56 +0000)]
Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374
<rdar://problem/46506286>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

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

Source/WebKit:

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

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

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

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

8 months agoBuild failure due to missing include of APIWebsiteDataStore.h
aperez@igalia.com [Sun, 9 Dec 2018 20:17:18 +0000 (20:17 +0000)]
Build failure due to missing include of APIWebsiteDataStore.h
https://bugs.webkit.org/show_bug.cgi?id=192541

Reviewed by Youenn Fablet.

* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
include of APIWebsiteDataStore.h

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

8 months agoUnreviewed, fix build failure on GCC 8.2, part 2
yusukesuzuki@slowstart.org [Sun, 9 Dec 2018 16:43:02 +0000 (16:43 +0000)]
Unreviewed, fix build failure on GCC 8.2, part 2

Add RefCountedArray::assign, and use it instead of operator= internally.
We should have operator=(const RefCountedArray&) since it will be automatically generated
if we do not have correct implementation here.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::assign):

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

8 months agoUnreviewed, fix build failure on GCC 8.2
yusukesuzuki@slowstart.org [Sun, 9 Dec 2018 16:09:07 +0000 (16:09 +0000)]
Unreviewed, fix build failure on GCC 8.2

We remove operator=<PtrTraits> call since it is not necessary.
This is a workaround. It seems that GCC 8.2 fails to parse this specialization.

* wtf/RefCountedArray.h:

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

8 months ago[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable...
wenson_hsieh@apple.com [Sun, 9 Dec 2018 09:05:45 +0000 (09:05 +0000)]
[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
https://bugs.webkit.org/show_bug.cgi?id=192538

Reviewed by Tim Horton.

Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
`RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
iOS simulator; instead, I manually verified using MobileAttachments.app.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView renderedDrawing]):

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

8 months agoUnreviewed, rolling out r239010.
commit-queue@webkit.org [Sun, 9 Dec 2018 08:00:32 +0000 (08:00 +0000)]
Unreviewed, rolling out r239010.
https://bugs.webkit.org/show_bug.cgi?id=192537

Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
scrolling-layers-state.html again (Requested by ap on
#webkit).

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/239010

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

8 months agoFix stray-semicolon warning seen with a new version of clang in Xcode
darin@apple.com [Sun, 9 Dec 2018 07:09:09 +0000 (07:09 +0000)]
Fix stray-semicolon warning seen with a new version of clang in Xcode
https://bugs.webkit.org/show_bug.cgi?id=192534

Reviewed by Alexey Proskuryakov.

* wtf/Lock.h: Removed an unneeded semicolon.

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

8 months ago[MediaStream] Scaled video frames should be resized in letterbox mode
eric.carlson@apple.com [Sun, 9 Dec 2018 05:36:43 +0000 (05:36 +0000)]
[MediaStream] Scaled video frames should be resized in letterbox mode
https://bugs.webkit.org/show_bug.cgi?id=192528
<rdar://problem/46576638>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/mediastream/resize-letterbox.html

* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::ImageTransferSessionVT): Use letterbox resize mode, not trim.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::captureSize const): "Capture" at the preset size, not
necessarily at the requested size to be more like a physical camera.
(WebCore::MockRealtimeVideoSource::settingsDidChange):
(WebCore::MockRealtimeVideoSource::drawAnimation):
(WebCore::MockRealtimeVideoSource::drawBoxes):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):
(WebCore::MockRealtimeVideoSource::imageBuffer const):
* platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

* fast/mediastream/resize-letterbox-expected.txt: Added.
* fast/mediastream/resize-letterbox.html: Added.

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

8 months agoDon't programmatically capitalize safe browsing warning buttons
achristensen@apple.com [Sun, 9 Dec 2018 04:11:48 +0000 (04:11 +0000)]
Don't programmatically capitalize safe browsing warning buttons
https://bugs.webkit.org/show_bug.cgi?id=192531
<rdar://problem/46417791>

Reviewed by Darin Adler.

Source/WebCore:

This doesn't work so well in other languages.
Capitalize the source strings in English instead.

* en.lproj/Localizable.strings:

Source/WebKit:

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(makeButton):

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

8 months agoSafe browsing warning should respect text size from settings
achristensen@apple.com [Sun, 9 Dec 2018 01:55:52 +0000 (01:55 +0000)]
Safe browsing warning should respect text size from settings
https://bugs.webkit.org/show_bug.cgi?id=192205

Reviewed by Tim Horton.

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontWithSize):
(makeButton):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):

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

8 months agoReduce size of PropertySlot and PutPropertySlot.
mark.lam@apple.com [Sat, 8 Dec 2018 23:53:29 +0000 (23:53 +0000)]
Reduce size of PropertySlot and PutPropertySlot.
https://bugs.webkit.org/show_bug.cgi?id=192526

Reviewed by Keith Miller.

With some minor adjustments, we can reduce the size of PropertySlot from 80 bytes
(19 padding bytes) to 64 bytes (3 padding bytes), and PutPropertySlot from 40
bytes (4 padding bytes) to 32 bytes (0 padding bytes but with 6 unused bits).
These measurements are for a 64-bit build.

* runtime/PropertySlot.h:
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):

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

8 months ago[WTF] Debug build fails due conflicting abort() method
aperez@igalia.com [Sat, 8 Dec 2018 22:10:37 +0000 (22:10 +0000)]
[WTF] Debug build fails due conflicting abort() method
https://bugs.webkit.org/show_bug.cgi?id=192491

Reviewed by Michael Catanzaro.

* wtf/Assertions.h: Use namespaced std::abort() insted of plain abort() to avoid clashes
inside classes which have an ::abort() method, but only when __cplusplus is defined to
allow inclusion of the header in plain C sources.

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

8 months agoFix lldb_webkit.py following r238771
dbates@webkit.org [Sat, 8 Dec 2018 21:53:28 +0000 (21:53 +0000)]
Fix lldb_webkit.py following r238771
(https://bugs.webkit.org/show_bug.cgi?id=190234)

Substitute WTFURLProvider for WebCoreURLProvider in one call site that was inadvertently
missed in r238771.

* lldb/lldb_webkit.py:
(WebCoreDocumentProvider.url):

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

8 months agoAllow control over child order when adding nodes to the scrolling tree
simon.fraser@apple.com [Sat, 8 Dec 2018 21:08:17 +0000 (21:08 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

One test marked as flakey, since scrolling tree order is currently dependent on HashSet
traversal order.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

Reviewed by Simon Fraser.

* platform/mac-wk2/TestExpectations: Mark fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html
as flakey, which it will be until we attach in z-order.

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

8 months agoRecord right offset with aligned wide instructions
dinfuehr@igalia.com [Sat, 8 Dec 2018 14:57:51 +0000 (14:57 +0000)]
Record right offset with aligned wide instructions
https://bugs.webkit.org/show_bug.cgi?id=192006

Reviewed by Yusuke Suzuki.

Aligning bytecode instructions inserts nops into the instruction stream.
Emitting an instruction did not record the actual start of the instruction with
aligned instructions, but the nop just before the actual instruction. This was
problematic with the StaticPropertyAnalyzer that used the wrong instruction offset.

* bytecode/InstructionStream.h:
(JSC::InstructionStream::MutableRef::clone):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::alignWideOpcode):
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitNewObject):
* generator/Opcode.rb:

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

8 months ago[ews-build] check-patch-relevance failure should not mark the overall build as failure
aakash_jain@apple.com [Sat, 8 Dec 2018 13:02:47 +0000 (13:02 +0000)]
[ews-build] check-patch-relevance failure should not mark the overall build as failure
https://bugs.webkit.org/show_bug.cgi?id=192510

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance.start):

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

8 months agoRemove unused API in NetworkProcess
commit-queue@webkit.org [Sat, 8 Dec 2018 07:35:47 +0000 (07:35 +0000)]
Remove unused API in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=192415

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Alex Christensen.

This patch removed some unused API and headers in NetworkProcess.

* NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* NetworkProcess/NetworkCORSPreflightChecker.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkContentRuleListManager.h:
* NetworkProcess/NetworkDataTask.cpp:
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadChecker.cpp:
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.cpp:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/NetworkSocketStream.cpp:
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* NetworkProcess/PingLoad.h:
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::frameID const): Deleted.
(WebKit::PreconnectTask::pageID const): Deleted.
* NetworkProcess/PreconnectTask.h:

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

8 months ago[MediaStream] 'devicechange' event should not fire in frames that can't access captur...
eric.carlson@apple.com [Sat, 8 Dec 2018 03:11:36 +0000 (03:11 +0000)]
[MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
https://bugs.webkit.org/show_bug.cgi?id=192511
<rdar://problem/46562063>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/media/media-stream/device-change-event-in-iframe.html

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::addEventListener): Don't fire the event unless the document can
access a camera or microphone.

Source/WebKit:

* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.
* UIProcess/UserMediaPermissionCheckProxy.h:
(WebKit::UserMediaPermissionCheckProxy::create):
(WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::generateRequestID): New.
(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
the page does not have a granted request and does not have persistent access.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

* fast/mediastream/device-change-event.html: Fix bogus title.
* http/tests/media/media-stream/device-change-event-in-iframe-expected.txt: Added.
* http/tests/media/media-stream/device-change-event-in-iframe.html: Added.
* http/tests/media/media-stream/resources/device-change-iframe.html: Added.

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

8 months ago[MediaStream] Address post-review comments after r238904
eric.carlson@apple.com [Sat, 8 Dec 2018 03:10:39 +0000 (03:10 +0000)]
[MediaStream] Address post-review comments after r238904
https://bugs.webkit.org/show_bug.cgi?id=192514
<rdar://problem/46564302>

Reviewed by Youenn Fablet.

No new tests, no functional change.

* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::setSize):
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):

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

8 months agoAlign the metadata table on all platforms
tzagallo@apple.com [Sat, 8 Dec 2018 01:12:57 +0000 (01:12 +0000)]
Align the metadata table on all platforms
https://bugs.webkit.org/show_bug.cgi?id=192050
<rdar://problem/46312674>

Reviewed by Mark Lam.

Although certain platforms don't require the metadata to be aligned,
values were being concurrently read and written to ValueProfiles,
which caused crashes since these operations are not atomic on unaligned
addresses.

* bytecode/Opcode.cpp:
(JSC::metadataAlignment):
* bytecode/Opcode.h:
* bytecode/UnlinkedMetadataTableInlines.h:
(JSC::UnlinkedMetadataTable::finalize):

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

8 months agoUpdate libwebrtc up to 2fb890f08c
youenn@apple.com [Sat, 8 Dec 2018 00:45:03 +0000 (00:45 +0000)]
Update libwebrtc up to 2fb890f08c
https://bugs.webkit.org/show_bug.cgi?id=192517

Reviewed by Eric Carlson.

Merge changes to track libwebrtc M72.

* Source/webrtc/DEPS:
* Source/webrtc/api/audio/echo_canceller3_config.h:
* Source/webrtc/api/rtp_headers.h:
* Source/webrtc/api/video/encoded_frame.h:
* Source/webrtc/api/video/encoded_image.h:
* Source/webrtc/call/rtp_transport_controller_send_interface.h:
* Source/webrtc/call/video_receive_stream.h:
* Source/webrtc/call/video_send_stream.h:
* Source/webrtc/common_types.h:
(webrtc::RtcpStatistics::RtcpStatistics):
(webrtc::RtcpStatisticsCallback::~RtcpStatisticsCallback):
* Source/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc:
* Source/webrtc/media/engine/webrtcvideoengine.cc:
* Source/webrtc/modules/audio_coding/BUILD.gn:
* Source/webrtc/modules/audio_coding/neteq/neteq_unittest.cc:
* Source/webrtc/modules/audio_processing/aec3/BUILD.gn:
* Source/webrtc/modules/audio_processing/aec3/aec_state.cc:
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.cc: Removed.
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.h: Removed.
* Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc: Removed.
* Source/webrtc/modules/audio_processing/aec3/echo_canceller3.cc:
* Source/webrtc/modules/audio_processing/aec3/echo_canceller3.h:
* Source/webrtc/modules/audio_processing/aec3/filter_analyzer.cc:
* Source/webrtc/modules/audio_processing/aec3/filter_analyzer.h:
* Source/webrtc/modules/audio_processing/aec3/suppression_gain.cc:
* Source/webrtc/modules/rtp_rtcp/BUILD.gn:
* Source/webrtc/modules/rtp_rtcp/include/receive_statistics.h:
* Source/webrtc/modules/rtp_rtcp/include/rtcp_statistics.h: Removed.
* Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h:
* Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h:
* Source/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h:
(webrtc::HdrMetadataExtension::ValueSize):
* Source/webrtc/modules/rtp_rtcp/source/rtp_packet_received.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc:
* Source/webrtc/modules/rtp_rtcp/source/rtp_utility.cc:
* Source/webrtc/modules/video_coding/codecs/test/videocodec_test_libvpx.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h:
* Source/webrtc/modules/video_coding/encoded_frame.h:
(webrtc::VCMEncodedFrame::video_timing_mutable):
(webrtc::VCMEncodedFrame::SetCodecSpecific):
* Source/webrtc/modules/video_coding/frame_buffer2.cc:
* Source/webrtc/modules/video_coding/frame_buffer2.h:
* Source/webrtc/modules/video_coding/frame_buffer2_unittest.cc:
* Source/webrtc/modules/video_coding/frame_object.cc:
* Source/webrtc/modules/video_coding/rtp_frame_reference_finder.cc:
* Source/webrtc/p2p/base/p2ptransportchannel.cc:
* Source/webrtc/p2p/base/p2ptransportchannel_unittest.cc:
* Source/webrtc/p2p/base/port.cc:
* Source/webrtc/p2p/base/port.h:
* Source/webrtc/p2p/client/basicportallocator.cc:
* Source/webrtc/p2p/client/basicportallocator.h:
* Source/webrtc/p2p/client/basicportallocator_unittest.cc:
* Source/webrtc/pc/peerconnection.cc:
* Source/webrtc/pc/rtcstats_integrationtest.cc:
* Source/webrtc/pc/test/peerconnectiontestwrapper.cc:
* Source/webrtc/pc/test/peerconnectiontestwrapper.h:
* Source/webrtc/rtc_base/stringize_macros.h:
* Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter_unittest.cc: Removed.
* Source/webrtc/test/fuzzers/rtp_packet_fuzzer.cc:
* Source/webrtc/tools_webrtc/ios/internal.client.webrtc/iOS64_Perf.json:
* Source/webrtc/tools_webrtc/ios/internal.tryserver.webrtc/ios_arm64_perf.json:
* Source/webrtc/tools_webrtc/whitespace.txt:
* Source/webrtc/video/report_block_stats.h:
* Source/webrtc/video/rtp_video_stream_receiver.cc:
* Source/webrtc/video/video_receive_stream.cc:

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

8 months ago[LFC] Rename LayoutFormattingState files to LayoutState
antti@apple.com [Sat, 8 Dec 2018 00:26:34 +0000 (00:26 +0000)]
[LFC] Rename LayoutFormattingState files to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=192520

Reviewed by Zalan Bujtas.

Match the class name.

* layout/FormattingContext.cpp:
* layout/FormattingContextQuirks.cpp:
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp: Removed.
* layout/LayoutFormattingState.h: Removed.
* layout/LayoutState.cpp: Copied from Source/WebCore/layout/LayoutFormattingState.cpp.
* layout/LayoutState.h: Copied from Source/WebCore/layout/LayoutFormattingState.h.
* layout/Verification.cpp:
* layout/blockformatting/BlockFormattingContext.cpp:
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
* layout/blockformatting/BlockInvalidation.cpp:
* layout/floats/FloatAvoider.cpp:
* layout/floats/FloatingContext.cpp:
* layout/floats/FloatingState.cpp:
* layout/inlineformatting/InlineFormattingContext.cpp:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
* layout/inlineformatting/InlineInvalidation.cpp:
* layout/layouttree/LayoutTreeBuilder.cpp:
* page/FrameViewLayoutContext.cpp:

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

8 months agoProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
cdumez@apple.com [Fri, 7 Dec 2018 23:56:07 +0000 (23:56 +0000)]
ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
https://bugs.webkit.org/show_bug.cgi?id=192362
<rdar://problem/46460360>

Reviewed by Ryosuke Niwa.

Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
*after* we know for sure we have a network process to communicate the policy to.
This should address the failures on iOS.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

8 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 23:38:38 +0000 (23:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316
<rdar://problem/46563726>

Unreviewed.

* Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.
Unneeded file.

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

8 months agoAdd keychain access entitlement to WebKitTestRunnerApp
jiewen_tan@apple.com [Fri, 7 Dec 2018 23:14:43 +0000 (23:14 +0000)]
Add keychain access entitlement to WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=192489
<rdar://problem/45057952>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:

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

8 months agoWKWebProcessPlugInLoadDelegate should have API for saying which rendering events...
sbarati@apple.com [Fri, 7 Dec 2018 22:35:05 +0000 (22:35 +0000)]
WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
https://bugs.webkit.org/show_bug.cgi?id=192473

Reviewed by Andy Estes.

Source/WebKit:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(PageLoaderClient::layoutMilestones const):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: Added.
(-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.
(-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.

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

8 months agoCSS Painting API code cleanup
justin_michaud@apple.com [Fri, 7 Dec 2018 21:57:49 +0000 (21:57 +0000)]
CSS Painting API code cleanup
https://bugs.webkit.org/show_bug.cgi?id=192480

Reviewed by Dean Jackson.

No new tests, since the existing tests should cover it.

* bindings/js/JSDOMWrapper.cpp:
(WebCore::outputConstraintSubspaceFor):
(WebCore::globalObjectOutputConstraintSubspaceFor):
* bindings/js/JSWorkletGlobalScopeBase.cpp:
(WebCore::toJS):
* css/CSSPaintCallback.h:
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::doCustomPaint):
* platform/graphics/CustomPaintImage.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::changedCustomPaintWatchedProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):
* worklets/PaintWorkletGlobalScope.cpp:
(WebCore::PaintWorkletGlobalScope::registerPaint):
* worklets/PaintWorkletGlobalScope.h:

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

8 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 21:38:23 +0000 (21:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Updating to latest libwebrtc will allows cherry-picking important bug fixes.

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/abseil-cpp: refreshed.
* Source/webrtc: refreshed.
* WebKit/0001-libwebrtc-changes.patch: Removed.
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Update include according new libwebrtc.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

Source/WebKit:

Update code base according new libwebrtc backend
In particular, use directly int64_t for packet time.

* Configurations/WebKit.xcconfig:
* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::signalReadPacket):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h:
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
* NetworkProcess/webrtc/NetworkRTCSocket.h:
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::signalReadPacket):

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

8 months agoREGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
jbedard@apple.com [Fri, 7 Dec 2018 21:15:17 +0000 (21:15 +0000)]
REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Unreviewed infrastructure fix.

* Scripts/webkitpy/port/device_port.py:
(DevicePort.setup_test_run): Check that the number of initialized devices matches the
number of child processes.

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

8 months ago[iOS] Make WebGPU work with remote layer hosting
dino@apple.com [Fri, 7 Dec 2018 21:10:13 +0000 (21:10 +0000)]
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

* SourcesCocoa.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

* platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
from CAMetalLayer.
* platform/graphics/cocoa/WebGPULayer.mm: Added.
(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

* platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
than CALayer.

* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

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

8 months ago[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params...
tsavell@apple.com [Fri, 7 Dec 2018 20:41:23 +0000 (20:41 +0000)]
[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=190892

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

8 months agoRename LayoutState to RenderLayoutState
antti@apple.com [Fri, 7 Dec 2018 20:10:14 +0000 (20:10 +0000)]
Rename LayoutState to RenderLayoutState
https://bugs.webkit.org/show_bug.cgi?id=192504

Reviewed by Zalan Bujtas.

The name is better used in LFC.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
* page/FrameViewLayoutContext.h:
* rendering/LayoutState.cpp: Removed.
* rendering/LayoutState.h: Removed.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderGrid.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayoutState.cpp: Copied from Source/WebCore/rendering/LayoutState.cpp.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::RenderLayoutState::computeOffsets):
(WebCore::RenderLayoutState::computeClipRect):
(WebCore::RenderLayoutState::computePaginationInformation):
(WebCore::RenderLayoutState::pageLogicalOffset const):
(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
(WebCore::RenderLayoutState::propagateLineGridInfo):
(WebCore::RenderLayoutState::establishLineGrid):
(WebCore::RenderLayoutState::addLayoutDelta):
(WebCore::RenderLayoutState::layoutDeltaMatches const):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::computeOffsets): Deleted.
(WebCore::LayoutState::computeClipRect): Deleted.
(WebCore::LayoutState::computePaginationInformation): Deleted.
(WebCore::LayoutState::pageLogicalOffset const): Deleted.
(WebCore::LayoutState::computeLineGridPaginationOrigin): Deleted.
(WebCore::LayoutState::propagateLineGridInfo): Deleted.
(WebCore::LayoutState::establishLineGrid): Deleted.
(WebCore::LayoutState::addLayoutDelta): Deleted.
(WebCore::LayoutState::layoutDeltaMatches const): Deleted.
* rendering/RenderLayoutState.h: Copied from Source/WebCore/rendering/LayoutState.h.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::isPaginated const): Deleted.
(WebCore::LayoutState::pageLogicalHeight const): Deleted.
(WebCore::LayoutState::pageLogicalHeightChanged const): Deleted.
(WebCore::LayoutState::lineGrid const): Deleted.
(WebCore::LayoutState::lineGridOffset const): Deleted.
(WebCore::LayoutState::lineGridPaginationOrigin const): Deleted.
(WebCore::LayoutState::paintOffset const): Deleted.
(WebCore::LayoutState::layoutOffset const): Deleted.
(WebCore::LayoutState::pageOffset const): Deleted.
(WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout const): Deleted.
(WebCore::LayoutState::renderer const): Deleted.
(WebCore::LayoutState::clipRect const): Deleted.
(WebCore::LayoutState::isClipped const): Deleted.
(WebCore::LayoutState::layoutDelta const): Deleted.
* rendering/RenderListBox.cpp:
* rendering/RenderMediaControlElements.cpp:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderVTTCue.cpp:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/RootInlineBox.cpp:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

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

8 months agoLayout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
tsavell@apple.com [Fri, 7 Dec 2018 19:32:23 +0000 (19:32 +0000)]
Layout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=183389

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

8 months ago[LFC] Rename formattingContext() to createFormattingContext()
antti@apple.com [Fri, 7 Dec 2018 19:25:44 +0000 (19:25 +0000)]
[LFC] Rename formattingContext() to createFormattingContext()
https://bugs.webkit.org/show_bug.cgi?id=192500

Reviewed by Zalan Bujtas.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp:
(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
* layout/blockformatting/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::createFormattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext): Deleted.
* layout/blockformatting/BlockFormattingState.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
* layout/inlineformatting/InlineFormattingState.h:

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

8 months ago[ews-app] Send bug id as a build property
aakash_jain@apple.com [Fri, 7 Dec 2018 18:53:34 +0000 (18:53 +0000)]
[ews-app] Send bug id as a build property
https://bugs.webkit.org/show_bug.cgi?id=192494

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/fetcher.py:
(BugzillaPatchFetcher.fetch):

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

8 months ago[ews-build] Builds should have a link to patch and bug
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:39 +0000 (18:51 +0000)]
[ews-build] Builds should have a link to patch and bug
https://bugs.webkit.org/show_bug.cgi?id=192492

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(ConfigureBuild.add_patch_id_url): Method to add Patch URL.
(ConfigureBuild.add_bug_id_url): Method to add Bug URL.
(ConfigureBuild.getPatchURL): Method to get Patch URL.
(ConfigureBuild.getBugURL): Method to get Bug URL.

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

8 months agoUnreviewed, rolling out r238947.
tsavell@apple.com [Fri, 7 Dec 2018 18:51:36 +0000 (18:51 +0000)]
Unreviewed, rolling out r238947.

Revision caused fast/visual-viewport/tiled-drawing/zoomed-
fixed-scrolling-layers-state.html to constantly fail

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/238947

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

8 months ago[ews-app] Configure logfile for ews-app logs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:06 +0000 (18:51 +0000)]
[ews-app] Configure logfile for ews-app logs
https://bugs.webkit.org/show_bug.cgi?id=192493

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/__init__.py:

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

8 months agoStyle queue exception on some security bugs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:48:55 +0000 (18:48 +0000)]
Style queue exception on some security bugs
https://bugs.webkit.org/show_bug.cgi?id=190793

Reviewed by Lucas Forschler.

* Scripts/webkitpy/tool/steps/applywatchlist.py:
(ApplyWatchList.run):

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

8 months ago[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
aestes@apple.com [Fri, 7 Dec 2018 18:40:31 +0000 (18:40 +0000)]
[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
https://bugs.webkit.org/show_bug.cgi?id=192498

Reviewed by Tim Horton.

Added SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL and SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT,
which behave like their non-optional variants but do not require their classes to exist.

* wtf/cocoa/SoftLinking.h:

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

8 months ago[Attachment Support] Cloned attachment elements lose their unique identifiers
wenson_hsieh@apple.com [Fri, 7 Dec 2018 18:37:58 +0000 (18:37 +0000)]
[Attachment Support] Cloned attachment elements lose their unique identifiers
https://bugs.webkit.org/show_bug.cgi?id=192483

Reviewed by Tim Horton.

Source/WebCore:

This patch adds logic to ensure that the unique identifier of a cloned attachment element is the same as the
unique identifier of the original attachment element. If the cloned attachment is inserted into the same
document as the original attachment, then we will exercise the same codepath for copied-and-pasted attachments,
and assign a new unique identifier to the attachment element, while creating a new `_WKAttachment` in the client
that's backed by the same `NSFileWrapper`.

Test: WKAttachmentTests.AttachmentIdentifierOfClonedAttachment

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::copyNonAttributePropertiesFromElement):
* html/HTMLAttachmentElement.h:

Tools:

Introduce a new API test.

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

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

8 months agoMerge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
commit-queue@webkit.org [Fri, 7 Dec 2018 18:33:43 +0000 (18:33 +0000)]
Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

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

Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
as they do the same thing. Also remove std::optional from parseAccessControlAllowList
since the function can't fail.

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

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

8 months ago[iOS] Don't update AVPlayerViewController currentTime while scrubbing
eric.carlson@apple.com [Fri, 7 Dec 2018 18:08:24 +0000 (18:08 +0000)]
[iOS] Don't update AVPlayerViewController currentTime while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=192438
<rdar://problem/42977046>

Reviewed by Jer Noble.

No new tests, tested manually.

* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.

* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
(-[WebAVPlayerController endScrubbing:]): Ditto.
(-[WebAVPlayerController isScrubbing]): Return _isScrubbing.

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

8 months ago[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream...
commit-queue@webkit.org [Fri, 7 Dec 2018 10:48:56 +0000 (10:48 +0000)]
[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
https://bugs.webkit.org/show_bug.cgi?id=186933

Source/WebCore:

Reusing the AudioSourceProviderGStreamer itself as it was doing almost everything we needed,
just added a constructor to be able to create it from a MediaStreamTrackPrivate and made it a
WebAudioSourceProvider which only means it is now a ThreadSafeRefCounted.

Sensibily refactored GStreamerMediaStreamSource so that we could reuse it to track a single
MediaStreamTrack.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::setClient):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::audioSourceProvider):
* platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
* platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcSetupSrc):
(WebCore::webkitMediaStreamSrcSetupAppSrc):
(WebCore::webkitMediaStreamSrcAddTrack):
(WebCore::webkitMediaStreamSrcSetStream):
(WebCore::webkitMediaStreamSrcNew):
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:
* platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
(WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
(WebCore::WrappedMockRealtimeAudioSource::start):
(WebCore::WrappedMockRealtimeAudioSource::addHum):
(WebCore::WrappedMockRealtimeAudioSource::render):
(WebCore::WrappedMockRealtimeAudioSource::settingsDidChange):
(WebCore::MockGStreamerAudioCaptureSource::startProducingData):
* platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Handle the case where input buffers
  are "big" and process all the data we can for each runs of the method.

LayoutTests:

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/gtk/TestExpectations:
* webrtc/clone-audio-track.html:

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

8 months agoConsecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since...
jbedard@apple.com [Fri, 7 Dec 2018 06:18:33 +0000 (06:18 +0000)]
Consecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since r238903
https://bugs.webkit.org/show_bug.cgi?id=192486

Unreviewed infrastructure fix.

WinCairo bots define WEBKIT_TEST_CHILD_PROCESSES to run less processes due to RAM restrictions.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):

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

8 months agoMove USE_NEW_THEME out of WebCore's config.h
ap@apple.com [Fri, 7 Dec 2018 05:51:30 +0000 (05:51 +0000)]
Move USE_NEW_THEME out of WebCore's config.h
https://bugs.webkit.org/show_bug.cgi?id=192426

Reviewed by Tim Horton.

Source/WebCore:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

8 months agoInjected bundle for WebKitTestRunner leaks WKTypeRef objects
ddkilzer@apple.com [Fri, 7 Dec 2018 05:34:21 +0000 (05:34 +0000)]
Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Reviewed by Simon Fraser.

Source/WebKit:

Change function parameter name from `returnData[Ref]` to
`returnRetainedData[Ref]` to document that the value returned is
a +1 retained WKTypeRef object.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostSynchronousMessage):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostSynchronousMessageForTesting):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

This patch:
- Fixes leaks in various injected bundle methods that return +1
  retained WKTypeRef objects via pointer.
- Asserts the returned object is the expected WKTypeRef.
- Replaces 0 with nullptr in many places.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didCreatePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::statisticsProcessStatisticsAndDataRecords):
(WTR::TestRunner::statisticsUpdateCookieBlocking):
(WTR::TestRunner::statisticsSubmitTelemetry):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::domCacheSize):
(WTR::TestRunner::injectUserScript):
(WTR::TestRunner::keyExistsInKeychain):

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

8 months agoAllow control over child order when adding nodes to the scrolling tree
commit-queue@webkit.org [Fri, 7 Dec 2018 01:47:04 +0000 (01:47 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-06
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Source/WebCore:

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

No new tests, behavior unchanged and already covered by existing tests.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
the new node at the end of child list.

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

8 months agoWe should ignore minimumEffectiveDeviceWidth if the page specifies device-width in...
commit-queue@webkit.org [Fri, 7 Dec 2018 01:35:25 +0000 (01:35 +0000)]
We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
https://bugs.webkit.org/show_bug.cgi?id=192377
<rdar://problem/46364206>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-12-06
Reviewed by Tim Horton.

Source/WebCore:

If the page specifies width=device-width or initial-scale=1 in the viewport meta tag, we should use the
native device width and ignore the minimum effective device width in ViewportConfiguration. The patch
also introduces scalableNativeWebpageParameters() which uses the device width as default and also allows the page
to shrink-to-fit. If a page doesn't have viewport meta tag, or if the width argument isn't device-width
and the initial scale isn't 1, we will use scalableNativeWebpageParameters() as the default configuration.

Tests: fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html
       fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateDefaultConfiguration): pick the default configuration based on
    the page's viewport arguments. Also, we will always fall back to scalableNativeWebpageParameters() if we
    can ignore scaling constraints.
(WebCore::ViewportConfiguration::setViewportArguments): When page sends us new ViewportArguments, pick
    up the correponsding default configuration before updating the configuration.
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): When m_canIgnoreScalingConstraints is
    changed, try to pick up the correponsding default configuration.
(WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Add a new default set of viewport Parameters
    this is very close to nativeWebpageParameters() excpet that it allows shrink to fit and its minimum scale
    is 0.25. We will use this Parameters for pages that doesn't have viewport meta tag; or the width is
    not device-width and initial scale is not 1.
(WebCore::ViewportConfiguration::updateConfiguration): If the page's viewport argument doesn't override
    the default width, use the m_minimumLayoutSize.width().
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): A helper method to tell
    if we should avoid using minimum effective device width.
(WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): If we are using a default
    configuration that is neither nativeWebpageParameters() nor scalableNativeWebpageParameters(), don't override
    it.
(WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): Add a helper method to return minimum
    effective device width based on shouldIgnoreMinimumEffectiveDeviceWidth().
(WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor const): Use minimumEffectiveDeviceWidth().

Source/WebKit:

Since we are using page's viewport arguments to decide the default viewport parameters and
whether we can use mininum effective device width, we should always call setViewportArguments()
regardless of shouldIgnoreMetaViewport settings.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments().
(WebKit::WebPage::didCommitLoad): Ditto.

LayoutTests:

* fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width-expected.txt: Added.
* fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html: Added.
* fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
* fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html: Added.

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

8 months agoREGRESSION: run-webkit-tests may fail when using booted simulators
jbedard@apple.com [Thu, 6 Dec 2018 23:21:33 +0000 (23:21 +0000)]
REGRESSION: run-webkit-tests may fail when using booted simulators
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run): Logging uses the number of child processes to print out information about how efficiently tests
were sharded after the fact. This number is the most meaningful if it is the maximum number of child processes used.
* Scripts/webkitpy/port/base.py:
(Port.max_child_processes): By default, Ports do not support running on any specific kind of device.
* Scripts/webkitpy/port/device_port.py:
(DevicePort.default_child_processes): Rather than using the currently initialized devices as a proxy for how many
child processes are being used, check the device manager every time. Regardless of which devices are attached or
available, iOS cannot boot watchOS devices and vice-versa. dedicated_simulators is not a known argument to
device_count_for_type, use use_booted_simulator instead.
(DevicePort.max_child_processes): Simulators can boot more devices than what is specified by device_count_for_type,
but, if no devices are available, then max_child_processes should return 0 even for simulators.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest):
(IOSDeviceTest.test_max_child_processes):
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest):
(IOSSimulatorTest.test_max_child_processes):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase):
(PortTestCase.test_max_child_processes):
* Scripts/webkitpy/port/watch_simulator_unittest.py:
(WatchSimulatorTest):
(WatchSimulatorTest.test_max_child_processes):

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

8 months agowebkitpy: Ignore case when comparing device types (Follow-up fix)
jbedard@apple.com [Thu, 6 Dec 2018 23:05:36 +0000 (23:05 +0000)]
webkitpy: Ignore case when comparing device types (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192409
<rdar://problem/46491558>

Unreviewed typo fix.

* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_comparison_lower_case):
(DeviceTypeTest.test_comparsion_lower_case): Deleted.

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

8 months agoContent Extensions: Misc fixes to debugging / perf testing code
aperez@igalia.com [Thu, 6 Dec 2018 22:34:54 +0000 (22:34 +0000)]
Content Extensions: Misc fixes to debugging / perf testing code
https://bugs.webkit.org/show_bug.cgi?id=192474

Reviewed by Mark Lam.

This make it possible to build the content extensions support with the
debugging features enabled. In particular, building with
CONTENT_EXTENSIONS_PERFORMANCE_REPORTING enabled was broken.

No new tests needed.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList): Remove usage of removed
variables machinesWihthoutConditionsCount,
totalBytecodeSizeForMachinesWithoutConditions,
machinesWithConditionsCount, and
totalBytecodeSizeForMachinesWithConditions.
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::debugPrintDot const):
Use "%" PRIu64 instead of "%llu" to format uint64_t values.
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::debugPrintDot const):
Use "%" PRIu64 instead of "%llu" to format uint64_t values.

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

8 months agoWeb Share API: share overlay does not stick to the Safari window
timothy_horton@apple.com [Thu, 6 Dec 2018 22:11:45 +0000 (22:11 +0000)]
Web Share API: share overlay does not stick to the Safari window
https://bugs.webkit.org/show_bug.cgi?id=192469
<rdar://problem/46074833>

Reviewed by Wenson Hsieh.

* UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
(-[WKShareSheet sharingServicePicker:delegateForSharingService:]):
(-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
(-[WKShareSheet sharingService:didFailToShareItems:error:]):
(-[WKShareSheet sharingService:didShareItems:]):
Implement another NSSharingServicePickerDelegate method to return
an *NSSharingService* delegate when needed.

Implement an NSSharingServiceDelegate method to return the window that
the service's UI should attach to.

Also, instead of notifying the Web Content process when a service is picked
(or not) in the NSSharingServicePicker, wait until the share has completed
(or failed) to send didComplete. This both makes the return completion
value more accurate (matching iOS, if you cancel the share during the
recipient choice step, it will now fail), and avoids explicitly tearing
down the NSSharingServicePicker too early, which breaks the UI attaching mechanism.

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

8 months agowebkitpy: Create device given lower-case DeviceType
jbedard@apple.com [Thu, 6 Dec 2018 22:09:19 +0000 (22:09 +0000)]
webkitpy: Create device given lower-case DeviceType
<https://bugs.webkit.org/show_bug.cgi?id=192472>
<rdar://problem/46532650>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._get_device_identifier_for_type): Comparing simctl device identifiers with DeviceTypes
should be letter-case agnostic.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(test_lower_case_device_type):

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

8 months ago[iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
wenson_hsieh@apple.com [Thu, 6 Dec 2018 21:22:19 +0000 (21:22 +0000)]
[iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
https://bugs.webkit.org/show_bug.cgi?id=187554
<rdar://problem/42075638>

Reviewed by Tim Horton.

Source/WebKit:

Add support for automatically switching the base writing direction to the default writing direction with respect
to the current keyboard in an editable WKWebView by implementing `-setBaseWritingDirection:forRange:`. On iOS 12
and earlier, UIKit invokes this protocol method whenever the keyboard is changed to one with a different writing
direction, although in some other versions of iOS, this only happens when first focusing an editable area.

Test: editing/input/ios/rtl-keyboard-input-on-focus.html

* Platform/spi/ios/UIKitSPI.h:

Declare UIKeyboardImpl IPI methods mostly for use in WebKitTestRunner (with the exception of
`-setInitialDirection`, which we may invoke when we receive the first post-layout EditorState update after
focusing an editable element).

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::increaseListLevel):
(WebKit::WebPageProxy::decreaseListLevel):
(WebKit::WebPageProxy::changeListType):
(WebKit::WebPageProxy::setBaseWritingDirection):

Drive-by style fixes: make these bail and return early if `!isValid()`.

(WebKit::WebPageProxy::resetStateAfterProcessExited):

Reset assisted node state in the UI process upon web process termination.

* UIProcess/WebPageProxy.h:

Add plumbing for `setBaseWritingDirection`, from `WebPageProxy` to `WebPage` to `Editor`.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView baseWritingDirectionForPosition:inDirection:]):
(coreWritingDirection):
(-[WKContentView setBaseWritingDirection:forRange:]):

Support `-setBaseWritingDirectionForPosition:forRange:`, but only in the case where the given range is the
selected range. This is all that's currently needed to fulfill the requirements in <rdar://problem/42075638>,
though we could potentially add full support for this in the future by mapping the given text range to a DOM
range and moving the selection prior to setting the base writing direction.

(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):

Add a hook to notify WKContentView when the first post-layout EditorState has been received in the UI process.
When this is invoked, if the web view is editable and the selection is not a range, we call into `UIKeyboardImpl`
to change the initial writing direction if necessary.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::stopAssistingNode):
(WebKit::WebPageProxy::editorStateChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setBaseWritingDirection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

Add support for simulating the keyboard input mode in layout tests using UIScriptController, as well as a new
`TestOption` to make the web view editable.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestController.h:
(WTR::TestController::overriddenKeyboardInputMode const):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::swizzleCurrentInputMode):
(WTR::TestController::setKeyboardInputModeIdentifier):

Swizzle out several `UIKeyboardInputModeController` methods in order to convince UIKit that the user has
selected a `UIKeyboardInputMode` corresponding to the given identifier. The call to
`-prepareKeyboardInputModeFromPreferences:` is also necessary on iOS 12 in order to update cached writing
direction state in UIKit.

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::setEditable):

LayoutTests:

Add a new layout test to verify that when focusing an editable WKWebView using a right-to-left keyboard input
mode, we will set the base writing direction to be right-to-left, and vice versa.

* TestExpectations:
* editing/input/ios/rtl-keyboard-input-on-focus-expected.txt: Added.
* editing/input/ios/rtl-keyboard-input-on-focus.html: Added.
* platform/ios-wk2/TestExpectations:
* resources/ui-helper.js:

Add a UIHelper method to set the keyboard input mode to the given identifier. Example identifiers are "en_US"
(the default U.S. English keyboard) and "he_IL" (the Hebrew keyboard, which is right-to-left).

(window.UIHelper.setKeyboardInputModeIdentifier):
(window.UIHelper):

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

8 months agoWeb Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left...
mattbaker@apple.com [Thu, 6 Dec 2018 20:37:55 +0000 (20:37 +0000)]
Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
https://bugs.webkit.org/show_bug.cgi?id=192353
<rdar://problem/46455019>

Reviewed by Devin Rousso.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.deselect):
Don't early return when the element is not the selected tree element.
This condition no longer holds now that TreeOutline supports multiple selection.

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

8 months ago-[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originatin...
david_quesada@apple.com [Thu, 6 Dec 2018 20:07:38 +0000 (20:07 +0000)]
-[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originating web view
https://bugs.webkit.org/show_bug.cgi?id=192411
rdar://problem/46492487

Reviewed by Alex Christensen.

* UIProcess/API/C/WKContext.cpp:
(WKContextResumeDownload):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _resumeDownloadFromData:path:originatingWebView:]):
(-[WKProcessPool _resumeDownloadFromData:path:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resumeDownload):
 - Set the originating page of the DownloadProxy.
 - If the originating page is non-null, use its session ID for the download.
 - Remove a FIXME. It's possible to do this now by providing the web view whose session
   should be used for the download.
* UIProcess/WebProcessPool.h:

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

8 months agoUnreviewed, a quick fix after r238919
jiewen_tan@apple.com [Thu, 6 Dec 2018 19:35:35 +0000 (19:35 +0000)]
Unreviewed, a quick fix after r238919

Add an early return such that the error message is actually meaningful.

* UIProcess/WebAuthentication/Mock/MockHidService.cpp:
(WebKit::MockHidService::platformStartDiscovery):

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

8 months agoLayout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
jiewen_tan@apple.com [Thu, 6 Dec 2018 19:32:38 +0000 (19:32 +0000)]
Layout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=181957

Reviewed by Youenn Fablet.

Since the timing information is a multiplier of a small delta, it is likely that
two timing information are the same as they are so close that fall into the same
bucket. Therefore, this patch releases the check of 't0 !== t1'.

* http/tests/misc/resource-timing-resolution-expected.txt:
* http/tests/misc/resource-timing-resolution.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

8 months agostress/big-wasm-memory tests failing on 32-bit JSC bot
keith_miller@apple.com [Thu, 6 Dec 2018 18:59:44 +0000 (18:59 +0000)]
stress/big-wasm-memory tests failing on 32-bit JSC bot
https://bugs.webkit.org/show_bug.cgi?id=192020

Reviewed by Saam Barati.

Not every platform has WebAssembly, e.g. 32-bit, so we should exit
the wasm stress tests if the WebAssembly object does not exist.

* stress/big-wasm-memory-grow-no-max.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory-grow.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.

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

8 months agoRemove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
achristensen@apple.com [Thu, 6 Dec 2018 16:55:45 +0000 (16:55 +0000)]
Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
https://bugs.webkit.org/show_bug.cgi?id=192452

Reviewed by Anders Carlsson.

Source/WebCore:

* loader/LoaderStrategy.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didRetrieveDerivedDataFromCache): Deleted.
* loader/ResourceLoader.h:
* loader/ResourceLoaderOptions.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didRetrieveDerivedDataFromCache): Deleted.
* loader/SubresourceLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didRetrieveDerivedDataFromCache): Deleted.

Source/WebKit:

This was introduced in r210835 but never used.
It's preventing me from making the disk cache associated with a SessionID/NetworkSession.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::storeDerivedDataToCache): Deleted.
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didRetrieveDerivedData): Deleted.
* WebProcess/Network/WebResourceLoader.messages.in:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.h:

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

8 months agoimported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is flaky...
tsavell@apple.com [Thu, 6 Dec 2018 16:48:56 +0000 (16:48 +0000)]
imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=191565

Unreviewed test gardening.

* platform/mac/TestExpectations:

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