WebKit-https.git
2 years ago[Win] WTF: Add alias for process id to use in place of direct uses of pid_t
commit-queue@webkit.org [Thu, 21 Sep 2017 02:55:06 +0000 (02:55 +0000)]
[Win] WTF: Add alias for process id to use in place of direct uses of pid_t
https://bugs.webkit.org/show_bug.cgi?id=177017

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-09-20
Reviewed by Alex Christensen.

Source/JavaScriptCore:

* API/JSRemoteInspector.cpp:
(JSRemoteInspectorSetParentProcessInformation):
* API/JSRemoteInspector.h:
* inspector/remote/RemoteInspector.h:

Source/WebKit:

* NetworkProcess/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetNetworkProcessIdentifier):
(WKContextGetDatabaseProcessIdentifier):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetProcessIdentifier):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::processIdentifier const):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
* UIProcess/Launcher/ProcessLauncher.h:
(WebKit::ProcessLauncher::processIdentifier const):
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::ProcessAssertion):
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnectToProcess):
* UIProcess/ProcessThrottler.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processIdentifier const):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::networkProcessIdentifier):
(WebKit::WebProcessPool::storageProcessIdentifier):
* UIProcess/WebProcessPool.h:

Source/WTF:

* wtf/ProcessID.h:
(WTF::getCurrentProcessID):

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

2 years ago[WK2] Add API to get the redirect chain of a WKDownload
cdumez@apple.com [Thu, 21 Sep 2017 02:48:38 +0000 (02:48 +0000)]
[WK2] Add API to get the redirect chain of a WKDownload
https://bugs.webkit.org/show_bug.cgi?id=176628
<rdar://problem/34338279>

Reviewed by Alex Christensen.

Source/WebKit:

Add API to get the redirect chain of a WKDwnload. The redirect chain includes redirects
that happened during initial load, before the load was converted into a download.

* UIProcess/API/C/WKDownload.cpp:
(WKDownloadCopyRedirectChain):
* UIProcess/API/C/WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload originatingWebView]):
(-[_WKDownload redirectChain]):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::willSendRequest):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::setRedirectChain):
(WebKit::DownloadProxy::redirectChain const):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::redirectChain const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):

Tools:

Add API test coverage for the 2 cases:
1. Download started as a download and is redirected while
   downloading.
2. Download started as a load and was redirected during the
   initial load.

* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[RedirectedDownloadDelegate _download:didReceiveServerRedirectToURL:]):
(-[RedirectedDownloadDelegate _downloadDidFinish:]):
(TEST):

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

2 years agoRefresh WPT tests up to f65af411d63ec13ee8fe208b4effd730a4a8b7fe
commit-queue@webkit.org [Thu, 21 Sep 2017 01:34:12 +0000 (01:34 +0000)]
Refresh WPT tests up to f65af411d63ec13ee8fe208b4effd730a4a8b7fe
https://bugs.webkit.org/show_bug.cgi?id=170713

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-20
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* resources/TestRepositories:
* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests: Refreshed by importer.

LayoutTests:

Rebasing tests and marking some tests as failing.

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey.https-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/send-blob-with-no-mime-type-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_hash-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt:
* tests-options.json:

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

2 years agoAdd infrastructure for adding custom headers to requests per website
achristensen@apple.com [Thu, 21 Sep 2017 01:15:23 +0000 (01:15 +0000)]
Add infrastructure for adding custom headers to requests per website
https://bugs.webkit.org/show_bug.cgi?id=177255

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by API tests.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setCustomHeaderFields):
* loader/HTTPHeaderField.cpp: Added.
(WebCore::RFC7230::isTokenCharacter):
(WebCore::RFC7230::isDelimiter):
(WebCore::RFC7230::isVisibleCharacter):
(WebCore::RFC7230::isWhitespace):
(WebCore::RFC7230::isInRange):
(WebCore::RFC7230::isOBSText):
(WebCore::RFC7230::isQuotedTextCharacter):
(WebCore::RFC7230::isQuotedPairSecondOctet):
(WebCore::RFC7230::isCommentText):
(WebCore::RFC7230::isValidName):
(WebCore::RFC7230::isValidValue):
(WebCore::HTTPHeaderField::HTTPHeaderField):
* loader/HTTPHeaderField.h: Added.
(WebCore::HTTPHeaderField::encode const):
(WebCore::HTTPHeaderField::decode):

Source/WebKit:

* Shared/WebsitePolicies.cpp: Added.
* Shared/WebsitePolicies.h:
(WebKit::WebsitePolicies::encode const):
(WebKit::WebsitePolicies::decode):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesCopyCustomHeaderFields):
(WKWebsitePoliciesSetCustomHeaderFields):
* UIProcess/API/C/WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies customHeaderFields]):
(-[_WKWebsitePolicies setCustomHeaderFields:]):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/HTTPHeaderField.cpp: Added.
(shouldRemainUnchanged):
(shouldBeInvalid):
(shouldBecome):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST):

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

2 years agoRename source list file to Sources.txt
keith_miller@apple.com [Thu, 21 Sep 2017 01:10:47 +0000 (01:10 +0000)]
Rename source list file to Sources.txt
https://bugs.webkit.org/show_bug.cgi?id=177283

Reviewed by Saam Barati.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt: Renamed from Source/JavaScriptCore/sources.txt.

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

2 years agoREGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement...
said@apple.com [Thu, 21 Sep 2017 00:35:41 +0000 (00:35 +0000)]
REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
https://bugs.webkit.org/show_bug.cgi?id=176221

Reviewed by Tim Horton.

Source/WebCore:

According to the specs:

https://www.w3.org/TR/SVG11/filters.html#FilterElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#RadialGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#PatternElementHrefAttribute

The xlink:href attribute of the SVG filter, gradient and pattern elements
must reference another element within the current SVG of the same type.

In r191731, the code of SVGPatternElement::collectPatternAttributes() was
removed and replaced by RenderSVGResourcePattern::collectPatternAttributes()
to avoid cyclic reference in the pattern element. The problem is the old
code used to check whether the referenced element is<SVGPatternElement>
before casting it. This code was not copied to the new function. So we
now allow the SVGPatternElement to reference any SVG resource element.

To fix this issue, we need to prevent SVGResources from chaining an incorrect
type of element to the SVG filter, gradient and pattern elements.

We also need to use the SVGResources for getting the referenced element
when collecting the attributes for the gradient elements. SVGResources solves
the cyclic referencing issue so there is no need to repeat the same code
in many places. Also, from now on the SVGResources will have valid linked
resource only. So casting the referenced element should always be valid.

Tests: svg/custom/pattern-invalid-content-inheritance.svg

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::collectPatternAttributes const): Asserts
the linkedResource is of type RenderSVGResourcePattern.
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::SVGResources):
(WebCore::isChainableResource): Ensure that an SVG resource can reference
only an SVG resource with the valid type.
(WebCore::SVGResources::buildCachedResources):
* rendering/svg/SVGResources.h:

LayoutTests:

* svg/custom/pattern-invalid-content-inheritance-expected.svg: Added.
* svg/custom/pattern-invalid-content-inheritance.svg: Added.

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

2 years agoMark transitions/transition-display-property.html as flaky on Windows.
pvollan@apple.com [Thu, 21 Sep 2017 00:30:17 +0000 (00:30 +0000)]
Mark transitions/transition-display-property.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177284

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoMark http/wpt/resource-timing/rt-resource-errors.html as flaky on Windows.
pvollan@apple.com [Thu, 21 Sep 2017 00:21:25 +0000 (00:21 +0000)]
Mark http/wpt/resource-timing/rt-resource-errors.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177282

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoUnreviewed, fix string capitalization
keith_miller@apple.com [Thu, 21 Sep 2017 00:11:09 +0000 (00:11 +0000)]
Unreviewed, fix string capitalization

* JavaScriptCore.xcodeproj/project.pbxproj:

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

2 years agoSpelling and grammar dots should not overlap
dbates@webkit.org [Wed, 20 Sep 2017 23:13:27 +0000 (23:13 +0000)]
Spelling and grammar dots should not overlap
https://bugs.webkit.org/show_bug.cgi?id=177265
<rdar://problem/34556424>

Reviewed by David Hyatt.

Source/WebCore:

A line may contain both spelling and grammar errors such that these errors overlap.
For example, "to mooof or not to mooof.". It is more pleasing aesthetically to
paint spelling and grammar dots such that they do not overlap. This also matches
AppKit's behavior.

A side benefit of this change is that it adds support infrastructure towards
implementing the CSS Pseudo-Elements Module Level 4 pseudo elements ::spelling-error
and ::grammar-error (see <https://bugs.webkit.org/show_bug.cgi?id=175784>).
It will also make it straightforward to add ::inactive-selection and allow us
to make ::selection conform to CSS Pseudo-Elements Module Level 4.

* CMakeLists.txt: Add file MarkerSubrange.cpp.
* WebCore.xcodeproj/project.pbxproj: Add files MarkerSubrange.{cpp, h}.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker): Modified to take a const MarkerSubrange&
instead of a RenderedDocumentMarker&.
(WebCore::InlineTextBox::paintTextMatchMarker): Modified to take a const MarkerSubrange&
instead of a RenderedDocumentMarker& and take a boolean as to whether the text match is active.
(WebCore::InlineTextBox::paintDocumentMarkers): Collect the subranges that need to be
painted, subdivide them preserving only the frontmost subrange when two or more subranges
overlap and paint the resulting subranges.
(WebCore::lineStyleForMarkerType): Deleted; converted to a lambda function inlined
in paintDocumentMarker() as this is the only place we made use of this function.
* rendering/InlineTextBox.h:
* rendering/MarkerSubrange.cpp: Added.
(WebCore::subdivide): Subdivides the specified list of subranges and returns a list of non-overlapping
subranges in paint order. The implementation of subdivide() is derived from an algorithm that
Said Abou-Hallawa came up with.
* rendering/MarkerSubrange.h: Added.
(WebCore::MarkerSubrange::MarkerSubrange):

Tools:

Add unit tests for the subdivision algorithm.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Added.
(WebCore::operator<<):
(WebCore::operator==):
(TestWebKitAPI::TEST):

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

2 years agoJSC Xcode build should use unified sources for platform independent files
keith_miller@apple.com [Wed, 20 Sep 2017 23:08:50 +0000 (23:08 +0000)]
JSC Xcode build should use unified sources for platform independent files
https://bugs.webkit.org/show_bug.cgi?id=177190

Reviewed by Saam Barati.

.:

Add a macro for collecting the set of "header" source files and adding the bundle
files to the "sources" list.

* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

This patch changes the Xcode build to use unified sources. The
main difference from a development perspective is that instead of
added source files to Xcode they need to be added to the shared
sources.txt. For now, platform specific files are still added
to the JavaScriptCore target.

Because Xcode needs to know about all the files before we generate
them all the unified source files need to be added to the
JavaScriptCore framework target. As a result, if we run out of
bundle files more will need to be added to the project. Currently,
there are no spare files. If adding more bundle files becomes
problematic we can change this.

LowLevelInterpreter.cpp can't be added to the unified source list yet
due to a clang bug.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* sources.txt: Added.

Source/WTF:

Add a new directory for build scripts that are forwarded to subsequent framework builds.

* Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb.
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:

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

2 years agoREGRESSION(r222194) [WPE] Library and executable output names broken
mcatanzaro@igalia.com [Wed, 20 Sep 2017 23:05:24 +0000 (23:05 +0000)]
REGRESSION(r222194) [WPE] Library and executable output names broken
https://bugs.webkit.org/show_bug.cgi?id=177273

Reviewed by Carlos Alberto Lopez Perez.

.:

Move the WebKit2 output name variables from here to Source/WebKit.

* Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Move the WebKit2 output name variables to here from Source/cmake, since this is a better
place and where they are set on all other ports. Update them for the changes in r222194.

* PlatformWPE.cmake:

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

2 years agoWSL should not type-check functions in the standard library that it does not use
fpizlo@apple.com [Wed, 20 Sep 2017 22:41:01 +0000 (22:41 +0000)]
WSL should not type-check functions in the standard library that it does not use
https://bugs.webkit.org/show_bug.cgi?id=177269

Reviewed by JS Bastien.

Once we added all of the swizzling operators, the size of the standard library ballooned to the point
where it's just not practical to compile anything anymore. If you want to compile
"int foo(int x) { return x}" then it will take some ridiculous amount of time (many seconds) because WSL
will have to type check all of those swizzling operators.

This change makes it so that after parsing the whole program, we remove the things that we aren't using.
We can make a really good estimate of what we need even before doing any name resolution. In practice,
this change removes almost all of the things from Program before we get to the hard work of type
checking. That's true because the standard library contains _many_ things and you'd have to try very
hard to use all of them.

This is a 13x speed-up for Test.js. It went from 155 seconds to 12 seconds on my machine.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/ConstexprTypeParameter.js:
(ConstexprTypeParameter.prototype.get origin):
* WebGPUShadingLanguageRI/Intrinsics.js:
* WebGPUShadingLanguageRI/Lexer.js:
(Lexer):
(Lexer.prototype.get originKind):
* WebGPUShadingLanguageRI/LexerToken.js:
(LexerToken.prototype.get lexer):
(LexerToken.prototype.get origin):
(LexerToken.prototype.get originKind):
(LexerToken.prototype.get isInternal):
* WebGPUShadingLanguageRI/NameContext.js:
(isWildcardKind):
(NameContext.prototype.add):
(NameContext.prototype.get let):
(NameContext.prototype.mapFor): Deleted.
* WebGPUShadingLanguageRI/NameFinder.js: Added.
(NameFinder):
(NameFinder.get worklist):
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitProtocolDecl):
* WebGPUShadingLanguageRI/OriginKind.js: Added.
(isOriginKind):
* WebGPUShadingLanguageRI/Prepare.js:
(let.prepare):
* WebGPUShadingLanguageRI/ProgramWithUnnecessaryThingsRemoved.js: Added.
(programWithUnnecessaryThingsRemoved):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(doTest):
* WebGPUShadingLanguageRI/index.html:

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

2 years agoRemove ActionType::CSSDisplayNoneStyleSheet
achristensen@apple.com [Wed, 20 Sep 2017 22:27:23 +0000 (22:27 +0000)]
Remove ActionType::CSSDisplayNoneStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=177275

Reviewed by Andy Estes.

Source/WebCore:

It not a real action type anyways.  It was a fake action type
that stored a String indicating which ContentRuleLists had not triggered
an ignore-previous-rules action, so we should apply the default stylesheet,
which is the css-display-none selectors that match everything.

No change in behaviour.  Covered by existing tests.

* contentextensions/ContentExtensionActions.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
* contentextensions/ContentExtensionsBackend.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open):
* page/UserContentProvider.cpp:
(WebCore::UserContentProvider::actionsForResourceLoad):
* page/UserContentProvider.h:

Tools:

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

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

2 years agoDevice iOS 11 builds fail with FileProvider linker errors
jbedard@apple.com [Wed, 20 Sep 2017 22:08:29 +0000 (22:08 +0000)]
Device iOS 11 builds fail with FileProvider linker errors
https://bugs.webkit.org/show_bug.cgi?id=177272
<rdar://problem/34557680>

Reviewed by David Kilzer.

For iOS device and simulator, the SYSTEM_LIBRARY_DIR should never
be on the framework search path as neither platform should ever link
with Mac frameworks.

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:

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

2 years agoFloatingObject should not hold a raw pointer to RootInlineBox.
zalan@apple.com [Wed, 20 Sep 2017 22:03:06 +0000 (22:03 +0000)]
FloatingObject should not hold a raw pointer to RootInlineBox.
https://bugs.webkit.org/show_bug.cgi?id=177266

Reviewed by Simon Fraser.

FloatingObject and RootInlineBox objects' lifetimes are very much independent from each other.

Not testable.

* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::clearLineBoxTreePointers):
* rendering/FloatingObjects.h:
(WebCore::FloatingObject::originatingLine const):
(WebCore::FloatingObject::clearOriginatingLine):
(WebCore::FloatingObject::setOriginatingLine):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::removeFloatingObject):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::appendFloatingObjectToLastLine):
(WebCore::RenderBlockFlow::reattachCleanLineFloats):
(WebCore::RenderBlockFlow::determineStartPosition):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::createWeakPtr):

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

2 years agoDrop legacy DOMError type
cdumez@apple.com [Wed, 20 Sep 2017 21:59:19 +0000 (21:59 +0000)]
Drop legacy DOMError type
https://bugs.webkit.org/show_bug.cgi?id=177207

Reviewed by Eric Carlson.

Drop legacy DOMError type. It has been removed from the Web standards,
is no longer used by our implementation and was not exposed to the
Web in WebKit (i.e. marked as [NoInterfaceObject]).

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/mediastream/MediaEndpointSessionDescription.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromiseDeferred.cpp:
* dom/DOMAllInOne.cpp:
* dom/DOMError.cpp: Removed.
* dom/DOMError.h: Removed.
* dom/DOMError.idl: Removed.
* platform/mock/RTCNotifiersMock.cpp:

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

2 years agoVersioning.
jmarcell@apple.com [Wed, 20 Sep 2017 21:28:48 +0000 (21:28 +0000)]
Versioning.

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

2 years ago[Win] Cannot find script to generate unified sources.
pvollan@apple.com [Wed, 20 Sep 2017 21:09:06 +0000 (21:09 +0000)]
[Win] Cannot find script to generate unified sources.
https://bugs.webkit.org/show_bug.cgi?id=177014

Reviewed by Keith Miller.

Source/JavaScriptCore:

The ruby script can now be found in WTF/Scripts in the forwarding headers folder.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WTF:

Copy the ruby script to WTF/Scripts in the forwarding headers folder.

* wtf/CMakeLists.txt:

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

2 years agoUnreviewed, rolling out r222254.
commit-queue@webkit.org [Wed, 20 Sep 2017 21:00:43 +0000 (21:00 +0000)]
Unreviewed, rolling out r222254.
https://bugs.webkit.org/show_bug.cgi?id=177267

Caused fast/images/animated-gif-webkit-transform.html to time
out, and possible perf regression (Requested by smfr on
#webkit).

Reverted changeset:

"Simplify compositing layer updating"
https://bugs.webkit.org/show_bug.cgi?id=176196
http://trac.webkit.org/changeset/222254

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

2 years agoUpstream googletest framework
commit-queue@webkit.org [Wed, 20 Sep 2017 20:54:57 +0000 (20:54 +0000)]
Upstream googletest framework
https://bugs.webkit.org/show_bug.cgi?id=177252

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-20
Reviewed by Alex Christensen.

This is used by libwebrtc.

* Source/third_party/googletest: Added.

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

2 years agoRemove ActionType::InvalidAction
achristensen@apple.com [Wed, 20 Sep 2017 20:46:18 +0000 (20:46 +0000)]
Remove ActionType::InvalidAction
https://bugs.webkit.org/show_bug.cgi?id=177262

Reviewed by Tim Horton.

Source/WebCore:

This was needed before r213322 because we needed to have a default constructor.
With all these cool new C++14/17 types, we don't need this any more.

No change in behaviour.

* contentextensions/ContentExtensionActions.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(WebCore::ContentExtensions::operator<<):

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

2 years agoRenderedDocumentMarker.h should include DocumentMarker.h
dbates@webkit.org [Wed, 20 Sep 2017 20:38:18 +0000 (20:38 +0000)]
RenderedDocumentMarker.h should include DocumentMarker.h
https://bugs.webkit.org/show_bug.cgi?id=177263

Reviewed by Andy Estes.

RenderedDocumentMarker extends DocumentMarker. RenderedDocumentMarker.h should
include DocumentMarker.h. Otherwise, both DocumentMarker.h and RenderedDocumentMarker.h
must be explicitly included.

* dom/RenderedDocumentMarker.h:
* rendering/RenderText.cpp:
* testing/Internals.cpp:

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

2 years agoUnreviewed, rolling out r222278.
ryanhaddad@apple.com [Wed, 20 Sep 2017 20:09:23 +0000 (20:09 +0000)]
Unreviewed, rolling out r222278.

This needs more work before it can be landed.

Reverted changeset:

"Work towards: Move test expectations from 'ios-11' to 'ios'
directory"
https://bugs.webkit.org/show_bug.cgi?id=177167
http://trac.webkit.org/changeset/222278

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

2 years agoMake a playground where people can try WSL
mmaxfield@apple.com [Wed, 20 Sep 2017 20:07:07 +0000 (20:07 +0000)]
Make a playground where people can try WSL
https://bugs.webkit.org/show_bug.cgi?id=177125

Reviewed by Filip Pizlo.

This patch creates a webpage, index.html, which lets users type in a WSL program and
run it, and see the results.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CallFunction.js:
(callFunction):
* WebGPUShadingLanguageRI/Checker.js:
(Checker):
(Checker.prototype._checkShaderType.NonNumericSearcher):
(Checker.prototype._checkShaderType.NonNumericSearcher.prototype.visitArrayRefType):
(Checker.prototype._checkShaderType.NonNumericSearcher.prototype.visitPtrType):
(Checker.prototype._checkShaderType):
(Checker.prototype.visitFuncDef):
(Checker.prototype._requireBool):
* WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js: Copied from Tools/WebGPUShadingLanguageRI/CallFunction.js.
(FlattenedStructOffsetGatherer):
(FlattenedStructOffsetGatherer.prototype.get result):
(FlattenedStructOffsetGatherer.prototype.visitReferenceType):
(FlattenedStructOffsetGatherer.prototype.visitField):
(FlattenedStructOffsetGatherer.prototype.visitNativeType):
* WebGPUShadingLanguageRI/Func.js:
(Func.prototype.toDeclString):
* WebGPUShadingLanguageRI/Inline.js:
(resolveInlinedFunction):
* WebGPUShadingLanguageRI/NameContext.js:
(NameContext.prototype.get let):
* WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
(resolveOverloadImpl):
* WebGPUShadingLanguageRI/StandardLibrary.js:
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(TEST_shaderTypes):
* WebGPUShadingLanguageRI/index.html: Added.

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

2 years ago[WSL] Restrict vertex and fragment entry points according to WSL.md
mmaxfield@apple.com [Wed, 20 Sep 2017 20:03:22 +0000 (20:03 +0000)]
[WSL] Restrict vertex and fragment entry points according to WSL.md
https://bugs.webkit.org/show_bug.cgi?id=177253

Reviewed by Filip Pizlo.

Entry points can't have template arguments, and their argument/return types need to be restricted.

* WebGPUShadingLanguageRI/Checker.js:
(Checker):
(Checker.prototype._checkShaderType.NonNumericSearcher):
(Checker.prototype._checkShaderType.NonNumericSearcher.prototype.visitArrayRefType):
(Checker.prototype._checkShaderType.NonNumericSearcher.prototype.visitPtrType):
(Checker.prototype._checkShaderType):
(Checker.prototype.visitFuncDef):
(Checker.prototype._requireBool):
* WebGPUShadingLanguageRI/Func.js:
(Func.prototype.toDeclString):
* WebGPUShadingLanguageRI/Test.js:
(TEST_shaderTypes):

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

2 years agoWork towards: Move test expectations from 'ios-11' to 'ios' directory
ryanhaddad@apple.com [Wed, 20 Sep 2017 19:38:59 +0000 (19:38 +0000)]
Work towards: Move test expectations from 'ios-11' to 'ios' directory
https://bugs.webkit.org/show_bug.cgi?id=177167

Unreviewed test gardening.

* platform/ios-11/TestExpectations: Removed.
* platform/ios/TestExpectations:

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

2 years agoClean up content extensions code in preparation for more actions with string arguments
achristensen@apple.com [Wed, 20 Sep 2017 19:37:58 +0000 (19:37 +0000)]
Clean up content extensions code in preparation for more actions with string arguments
https://bugs.webkit.org/show_bug.cgi?id=177258

Reviewed by Tim Horton.

No change in behaviour.  Covered by existing tests.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeString):
(WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::serializeSelector): Deleted.
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadAction):
(WebCore::ContentExtensions::loadRule):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::deserializeString):
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):

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

2 years ago[ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of...
jdiggs@igalia.com [Wed, 20 Sep 2017 19:30:15 +0000 (19:30 +0000)]
[ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
https://bugs.webkit.org/show_bug.cgi?id=171172

Reviewed by Chris Fleizach.

Source/WebCore:

Modify webKitAccessibleTableGetNColumns() and webkitAccessibleTableGetNRows()
to prefer the ARIA value over the DOM-based value.

No new tests needed: We already have coverage through aria-table-attributes.html.
Platform expectations for this test were updated.

* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):

LayoutTests:

Generated platform-specific expectations to reflect the new behavior.

* accessibility/aria-table-attributes.html: Modified to handle platform differences.
* platform/gtk/accessibility/aria-table-attributes-expected.txt: Added.

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

2 years agoFix HPPA and Alpha builds
berto@igalia.com [Wed, 20 Sep 2017 19:04:05 +0000 (19:04 +0000)]
Fix HPPA and Alpha builds
https://bugs.webkit.org/show_bug.cgi?id=177224

Reviewed by Alex Christensen.

.:

* CMakeLists.txt:

Source/JavaScriptCore:

* CMakeLists.txt:

Source/WTF:

* wtf/Platform.h:

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

2 years agoRename CacheStorage to DOMCacheStorage
commit-queue@webkit.org [Wed, 20 Sep 2017 19:04:00 +0000 (19:04 +0000)]
Rename CacheStorage to DOMCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=177025

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-20
Reviewed by Chris Dumez.

No change of behavior, just renaming CacheStorage class and files to DOMCacheStorage.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/cache/DOMCacheStorage.cpp: Renamed from Source/WebCore/Modules/cache/CacheStorage.cpp.
(WebCore::DOMCacheStorage::DOMCacheStorage):
(WebCore::DOMCacheStorage::origin const):
(WebCore::doSequentialMatch):
(WebCore::startSequentialMatch):
(WebCore::copyCaches):
(WebCore::DOMCacheStorage::match):
(WebCore::DOMCacheStorage::has):
(WebCore::DOMCacheStorage::retrieveCaches):
(WebCore::logConsolePersistencyError):
(WebCore::DOMCacheStorage::open):
(WebCore::DOMCacheStorage::remove):
(WebCore::DOMCacheStorage::keys):
(WebCore::DOMCacheStorage::stop):
(WebCore::DOMCacheStorage::activeDOMObjectName const):
(WebCore::DOMCacheStorage::canSuspendForDocumentSuspension const):
* Modules/cache/DOMCacheStorage.h: Renamed from Source/WebCore/Modules/cache/CacheStorage.h.
(WebCore::DOMCacheStorage::create):
* Modules/cache/DOMCacheStorage.idl: Renamed from Source/WebCore/Modules/cache/CacheStorage.idl.
* Modules/cache/DOMWindowCaches.cpp:
(WebCore::DOMWindowCaches::caches):
(WebCore::DOMWindowCaches::caches const):
* Modules/cache/DOMWindowCaches.h:
* Modules/cache/DOMWindowCaches.idl:
* Modules/cache/WorkerGlobalScopeCaches.cpp:
(WebCore::WorkerGlobalScopeCaches::caches):
(WebCore::WorkerGlobalScopeCaches::caches const):
* Modules/cache/WorkerGlobalScopeCaches.h:
* Modules/cache/WorkerGlobalScopeCaches.idl:
* WebCore.xcodeproj/project.pbxproj:

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

2 years agoMake webrtc replace track tests less flaky
commit-queue@webkit.org [Wed, 20 Sep 2017 18:10:56 +0000 (18:10 +0000)]
Make webrtc replace track tests less flaky
https://bugs.webkit.org/show_bug.cgi?id=172645
<rdar://problem/34118218>

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-20
Reviewed by Eric Carlson.

Improving stability of tests by retrying tests every 50 ms instead of once.
Doing some refactoring to put more helper routines in routine.js
Relaxing black pixel check as compression may introduce some uncertainty.
It is now considered black if RGB < (30, 30, 30).

* TestExpectations: Marking video-mute.html as Pass/Fail instead of Fail.
* webrtc/routines.js:
* webrtc/video-mute.html:
* webrtc/video-replace-muted-track.html:
* webrtc/video-replace-track-expected.txt:
* webrtc/video-replace-track-to-null.html:
* webrtc/video-replace-track.html:

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

2 years ago[Win] Cygwin 64-bit EWS process cannot find Visual Studio installation.
pvollan@apple.com [Wed, 20 Sep 2017 18:04:44 +0000 (18:04 +0000)]
[Win] Cygwin 64-bit EWS process cannot find Visual Studio installation.
https://bugs.webkit.org/show_bug.cgi?id=177244

Reviewed by Alex Christensen.

The 64-bit EWS shell process should try to find Visual Studio in the 32-bit program files folder.

* EWSTools/start-queue-win.sh:

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

2 years agoSwitch PeerConnection to release logging
eric.carlson@apple.com [Wed, 20 Sep 2017 17:55:27 +0000 (17:55 +0000)]
Switch PeerConnection to release logging
https://bugs.webkit.org/show_bug.cgi?id=177193
<rdar://problem/34529014>

Reviewed by Youenn Fablet.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::PeerConnectionBackend):
(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::newICECandidate):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):
(WebCore::PeerConnectionBackend::logChannel const):
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::PeerConnectionBackend): Deleted.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::~RTCPeerConnection):
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::addTransceiver):
(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):
(WebCore::RTCPeerConnection::createDataChannel):
(WebCore::RTCPeerConnection::setSignalingState):
(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):
(WebCore::RTCPeerConnection::updateConnectionState):
(WebCore::RTCPeerConnection::replaceTrack):
(WebCore::RTCPeerConnection::dispatchEvent):
(WebCore::RTCPeerConnection::logChannel const):
(WebCore::rtcIceGatheringStateToString): Deleted.
(WebCore::rtcIceConnectionStateToString): Deleted.
* Modules/mediastream/RTCPeerConnection.h:

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
(WebCore::LibWebRTCMediaEndpoint::startLoggingStats):
(WebCore::LibWebRTCMediaEndpoint::logChannel const):
(WebCore::LibWebRTCMediaEndpoint::statsLogInterval const):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
(PAL::LogArgument<webrtc::RTCStats>::toString):

* platform/mediastream/RTCIceConnectionState.h:
(PAL::LogArgument<WebCore::RTCIceConnectionState>::toString):

* platform/mediastream/RTCIceGatheringState.h:
(PAL::LogArgument<WebCore::RTCIceGatheringState>::toString):

* platform/mediastream/RTCPeerConnectionState.h:
(PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString):

* platform/mediastream/RTCSignalingState.h:
(PAL::LogArgument<WebCore::RTCSignalingState>::toString):

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

2 years agoVideo errors should be instances of Error
cdumez@apple.com [Wed, 20 Sep 2017 17:38:28 +0000 (17:38 +0000)]
Video errors should be instances of Error
https://bugs.webkit.org/show_bug.cgi?id=174573
<rdar://problem/34445494>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline tests now that output has changed slightly.

* web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt:

Source/WebCore:

Video errors should be instances of DOMException and Error as per:
- https://html.spec.whatwg.org/multipage/media.html#reject-pending-play-promises
- https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-2
- https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-3
- https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises-3
- https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises

No new tests, extended existing test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::noneSupported):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::pauseInternal):
* html/HTMLMediaElement.h:

LayoutTests:

* http/tests/security/video-cross-origin-caching-expected.txt:
Rebaseline test now that output has changed slightly.

* media/media-play-promise-reject-load-abort-expected.txt:
* media/media-play-promise-reject-load-abort.html:
Extend test coverage.

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

2 years ago[Curl] improve the implementation of FormDataStream
commit-queue@webkit.org [Wed, 20 Sep 2017 17:31:06 +0000 (17:31 +0000)]
[Curl] improve the implementation of FormDataStream
https://bugs.webkit.org/show_bug.cgi?id=177111

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-09-20
Reviewed by Alex Christensen.

* platform/network/curl/FormDataStreamCurl.cpp:
(WebCore::FormDataStream::read):
(WebCore::FormDataStream::hasMoreElements const):
* platform/network/curl/FormDataStreamCurl.h:
(WebCore::FormDataStream::setHTTPBody):
(WebCore::FormDataStream::FormDataStream): Deleted.
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::prepareSendData):
(WebCore::ResourceHandleCurlDelegate::didFinish):
(WebCore::ResourceHandleCurlDelegate::didFail):
(WebCore::ResourceHandleCurlDelegate::setupFormData):
* platform/network/curl/ResourceHandleCurlDelegate.h:

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

2 years agoSkip inspector tests that crash after r222259.
ryanhaddad@apple.com [Wed, 20 Sep 2017 17:21:19 +0000 (17:21 +0000)]
Skip inspector tests that crash after r222259.
https://bugs.webkit.org/show_bug.cgi?id=177249

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoCreate vector swizzle operators in WSL's standard library
mmaxfield@apple.com [Wed, 20 Sep 2017 16:44:14 +0000 (16:44 +0000)]
Create vector swizzle operators in WSL's standard library
https://bugs.webkit.org/show_bug.cgi?id=177116

Reviewed by Filip Pizlo.

Because there are 481 possible swizzling operators, StandardLibrary.js generates them
instead of including them by hand.

Adding so many functions slows down the compiler quite a bit.

* WebGPUShadingLanguageRI/Prepare.js:
(prepare):
* WebGPUShadingLanguageRI/StandardLibrary.js:
(intToString):
(_generateSwizzle):

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

2 years agoWeb Inspector: WebView indication highlights sticks around for WebKitLegacy views
commit-queue@webkit.org [Wed, 20 Sep 2017 16:19:05 +0000 (16:19 +0000)]
Web Inspector: WebView indication highlights sticks around for WebKitLegacy views
https://bugs.webkit.org/show_bug.cgi?id=177101
<rdar://problem/34500648>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-20
Reviewed by Brian Burg.

* WebInspector/WebNodeHighlight.mm:
Ensure we close the window that we have just removed.

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

2 years agoRemoved nullable from UIDragItem property
jbedard@apple.com [Wed, 20 Sep 2017 16:16:51 +0000 (16:16 +0000)]
Removed nullable from UIDragItem property
https://bugs.webkit.org/show_bug.cgi?id=176264
<rdar://problem/31144674>

Unreviewed build fix

When a nullable annotation is used in a header file,
the Objective-C compiler forces annotations on the entire
file. Remove an unneeded annotation in UIKitSPI.h so that
we can build in iOS 11.

* Platform/spi/ios/UIKitSPI.h:

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

2 years ago[GTK] Completely garbled display in GMail
magomez@igalia.com [Wed, 20 Sep 2017 16:02:51 +0000 (16:02 +0000)]
[GTK] Completely garbled display in GMail
https://bugs.webkit.org/show_bug.cgi?id=168964

Reviewed by Carlos Garcia Campos.

Do not try to decode images that are bigger than 32768 pixels, as cairo won't be able to render them,
and they will break the rendering of the rest of the page.

Covered by existent tests.

* platform/graphics/ImageBackingStore.h:
(WebCore::ImageBackingStore::isOverSize):

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

2 years agoRemove RenderNamedFlowThread and FlowThreadController
antti@apple.com [Wed, 20 Sep 2017 15:37:23 +0000 (15:37 +0000)]
Remove RenderNamedFlowThread and FlowThreadController
https://bugs.webkit.org/show_bug.cgi?id=177229

Reviewed by Andreas Kling.

Get rid of some parts of the rendering code for CSS Regions.

The feature is disabled, no functional changes.

* WebCore.xcodeproj/project.pbxproj:
* rendering/FlowThreadController.cpp: Removed.
* rendering/FlowThreadController.h: Removed.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
(WebCore::canComputeRegionRangeForBox):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::logicalHeightForChildForFragmentation const):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion const):
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::renderBoxRegionInfo const):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
(WebCore::RenderElement::hoverAncestor const):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderFlowThread::incrementAutoLogicalHeightRegions):
(WebCore::RenderFlowThread::decrementAutoLogicalHeightRegions):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects const):
(WebCore::RenderLayer::paintFixedLayersInNamedFlows): Deleted.
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed): Deleted.
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed): Deleted.
* rendering/RenderLayerCompositor.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread const): Deleted.
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp: Removed.
* rendering/RenderNamedFlowThread.h: Removed.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionRoot const):
(WebCore::RenderObject::offsetParent const):
(WebCore::RenderObject::currentRenderNamedFlowFragment const):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderGrid const):
(WebCore::RenderObject::isRenderNamedFlowThread const): Deleted.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::attachRegion):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::parentNamedFlowThread const): Deleted.
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
(WebCore::writeRenderRegionList): Deleted.
(WebCore::writeRenderNamedFlowThreads): Deleted.
* rendering/RenderView.cpp:
(WebCore::RenderView::layoutContent):
(WebCore::RenderView::layoutContentInAutoLogicalHeightRegions):
(WebCore::RenderView::layout):
(WebCore::RenderView::selectionBounds const):
(WebCore::RenderView::repaintSelection const):
(WebCore::RenderView::setSelection):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::styleDidChange):
(WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions const):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
(WebCore::RenderView::popLayoutStateForCurrentFlowThread):
(WebCore::RenderView::layoutContentToComputeOverflowInRegions): Deleted.
(WebCore::RenderView::splitSelectionBetweenSubtrees): Deleted.
(WebCore::RenderView::hasRenderNamedFlowThreads const): Deleted.
(WebCore::RenderView::flowThreadController): Deleted.
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection): Deleted.
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::setSelectionData):

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

2 years ago[WPE] Unreviewed test gardening
Ms2ger@igalia.com [Wed, 20 Sep 2017 15:30:07 +0000 (15:30 +0000)]
[WPE] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=177233

Unreviewed test gardening.

* TestExpectations:
* platform/wpe/tables/mozilla/marvin/x_th_nowrap-expected.txt:

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

2 years agoSkip failing resource timing tests on Windows.
pvollan@apple.com [Wed, 20 Sep 2017 14:55:32 +0000 (14:55 +0000)]
Skip failing resource timing tests on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177234

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years ago[WPE] Update fontconfig to 2.12.4.
Ms2ger@igalia.com [Wed, 20 Sep 2017 14:38:52 +0000 (14:38 +0000)]
[WPE] Update fontconfig to 2.12.4.
https://bugs.webkit.org/show_bug.cgi?id=177228

Reviewed by Carlos Garcia Campos.

* wpe/jhbuild.modules:
* wpe/patches/fontconfig-avoid-conflicts-with-integer-width-macros-from-TS-18.patch: Removed.

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

2 years agoRemove DOM and styling support for CSS Regions
antti@apple.com [Wed, 20 Sep 2017 12:58:45 +0000 (12:58 +0000)]
Remove DOM and styling support for CSS Regions
https://bugs.webkit.org/show_bug.cgi?id=177221

Reviewed by Andreas Kling.

Source/WebCore:

This patch removes all CSS Regions (aka "named flow") related code excluding rendering.

The feature is already disabled so no functional changes.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::convertToRegionBreak): Deleted.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BreakBetween const):
* css/CSSProperties.json:
* css/CSSRule.cpp:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchUserRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion): Deleted.
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::setSameOriginOnly):
(WebCore::ElementRuleCollector::setRegionForStyling): Deleted.
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* css/RuleSet.cpp:
(WebCore::determinePropertyWhitelistType):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::addChildRules):
(WebCore::RuleSet::shrinkToFit):
(WebCore::RuleSet::addRegionRule): Deleted.
* css/RuleSet.h:
(WebCore::RuleSet:: const):
(WebCore::RuleSet::regionSelectorsAndRuleSets const): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRegionBreakBetween): Deleted.
(WebCore::StyleBuilderConverter::convertRegionBreakInside): Deleted.
* css/StyleProperties.cpp:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::StyleResolver::checkRegionStyle): Deleted.
(WebCore::isValidRegionStyleProperty): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::regionForStyling const): Deleted.
(WebCore::checkRegionSelector): Deleted.
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleRegion::StyleRuleRegion): Deleted.
* css/StyleRule.h:
(WebCore::StyleRuleBase::isStyleRule const):
(WebCore::StyleRuleBase::isRegionRule const): Deleted.
* css/StyleSheetContents.cpp:
(WebCore::traverseSubresourcesInRules):
* css/WebKitCSSRegionRule.cpp: Removed.
* css/WebKitCSSRegionRule.h: Removed.
* css/WebKitCSSRegionRule.idl: Removed.
* css/parser/CSSAtRuleID.cpp:
(WebCore::cssAtRuleID):
* css/parser/CSSAtRuleID.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeRegionRule): Deleted.
* css/parser/CSSParserImpl.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLegacyBreakProperty):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::mapFromLegacyBreakProperty):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::consumeFlowProperty): Deleted.
(WebCore::mapFromRegionBreakBetween): Deleted.
* dom/ContainerNode.cpp:
(WebCore::destroyRenderTreeIfNeeded):
* dom/DOMNamedFlowCollection.cpp: Removed.
* dom/DOMNamedFlowCollection.h: Removed.
* dom/DOMNamedFlowCollection.idl: Removed.
* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
(WebCore::Document::webkitGetNamedFlows): Deleted.
(WebCore::Document::namedFlows): Deleted.
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
(WebCore::Element::unregisterNamedFlowContentElement): Deleted.
(WebCore::Element::setIsNamedFlowContentElement): Deleted.
(WebCore::Element::clearIsNamedFlowContentElement): Deleted.
(WebCore::Element::rareDataIsNamedFlowContentElement const): Deleted.
(WebCore::Element::setRegionOversetState): Deleted.
(WebCore::Element::regionOversetState const): Deleted.
(WebCore::Element::renderNamedFlowFragment const): Deleted.
(WebCore::Element::shouldMoveToFlowThread const): Deleted.
(WebCore::Element::webkitRegionOverset const): Deleted.
(WebCore::Element::webkitGetRegionFlowRanges const): Deleted.
* dom/Element.h:
(WebCore::Element::isNamedFlowContentElement const): Deleted.
* dom/Element.idl:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::regionOversetState const): Deleted.
(WebCore::ElementRareData::setRegionOversetState): Deleted.
(WebCore::ElementRareData::isNamedFlowContentElement const): Deleted.
(WebCore::ElementRareData::setIsNamedFlowContentElement): Deleted.
* dom/EventTargetFactory.in:
* dom/NamedFlowCollection.cpp: Removed.
* dom/NamedFlowCollection.h: Removed.
* dom/PseudoElement.h:
* dom/WebKitNamedFlow.cpp: Removed.
* dom/WebKitNamedFlow.h: Removed.
* dom/WebKitNamedFlow.idl: Removed.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::resetNonPersistentData):
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask): Deleted.
(WebCore::ChangeRegionOversetTask::scheduleFor): Deleted.
(WebCore::ChangeRegionOversetTask::unschedule): Deleted.
(WebCore::ChangeRegionOversetTask::reset): Deleted.
(WebCore::ChangeRegionOversetTask::timerFired): Deleted.
(WebCore::InspectorCSSAgent::didCreateNamedFlow): Deleted.
(WebCore::InspectorCSSAgent::willRemoveNamedFlow): Deleted.
(WebCore::InspectorCSSAgent::didChangeRegionOverset): Deleted.
(WebCore::InspectorCSSAgent::regionOversetChanged): Deleted.
(WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement): Deleted.
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement): Deleted.
(WebCore::InspectorCSSAgent::getNamedFlowCollection): Deleted.
(WebCore::InspectorCSSAgent::documentNodeWithRequestedFlowsId): Deleted.
(WebCore::InspectorCSSAgent::buildArrayForRegions): Deleted.
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl): Deleted.
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl): Deleted.
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl): Deleted.
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl): Deleted.
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl): Deleted.
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildObjectForElementData):
(WebCore::buildObjectForRegion): Deleted.
(WebCore::buildObjectForFlowRegions): Deleted.
* page/EventHandler.cpp:
(WebCore::handleWheelEventInAppropriateEnclosingBox):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName): Deleted.
* rendering/FlowThreadController.h:
* rendering/RegionOversetState.h: Removed.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::getRanges const):
(WebCore::RenderNamedFlowFragment::layoutBlock):
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::computeStyleInRegion const):
(WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
(WebCore::RenderNamedFlowFragment::setRegionOversetState): Deleted.
(WebCore::RenderNamedFlowFragment::regionOversetState const): Deleted.
(WebCore::RenderNamedFlowFragment::updateOversetState): Deleted.
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::clearContentElements):
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::hasContentElement const):
(WebCore::RenderNamedFlowThread::flowThreadName const):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
(WebCore::RenderNamedFlowThread::setMarkForDestruction):
(WebCore::RenderNamedFlowThread::resetMarkForDestruction):
(WebCore::RenderNamedFlowThread::isMarkedForDestruction const):
(WebCore::nextNodeInsideContentElement):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::installFlowThread):
* rendering/style/RenderStyleConstants.h:
* rendering/style/WillChangeData.cpp:
(WebCore::WillChangeData::propertyCreatesStackingContext):
* style/RenderTreePosition.cpp:
(WebCore::RenderTreePosition::previousSiblingRenderer const):
(WebCore::RenderTreePosition::nextSiblingRenderer const):
(WebCore::RenderTreePosition::insertionPositionForFlowThread): Deleted.
(WebCore::RenderTreePosition::isRendererReparented): Deleted.
* style/RenderTreePosition.h:
(WebCore::RenderTreePosition::RenderTreePosition):
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
(WebCore::registerElementForFlowThreadIfNeeded): Deleted.
* style/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::createContentRenderers):
* style/StyleChange.cpp:
(WebCore::Style::determineChange):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::affectsRenderedSubtree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread const): Deleted.
* svg/SVGElement.h:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:
* DOM/DOMCSS.mm:
(kitClass):
* DOM/DOMElement.mm:
(-[DOMElement webkitRegionOverset]): Deleted.

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

2 years agoAdd bindings for optional arguments to some WebGL2 methods.
Ms2ger@igalia.com [Wed, 20 Sep 2017 12:36:22 +0000 (12:36 +0000)]
Add bindings for optional arguments to some WebGL2 methods.
https://bugs.webkit.org/show_bug.cgi?id=177067

Reviewed by Antti Koivisto.

Add bindings for optional arguments to some WebGL2 methods.

No new tests: not much point in adding tests now; these methods don't
do anything anyway.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::uniform1uiv):
(WebCore::WebGL2RenderingContext::uniform2uiv):
(WebCore::WebGL2RenderingContext::uniform3uiv):
(WebCore::WebGL2RenderingContext::uniform4uiv):
(WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
(WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
(WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
(WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
(WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
(WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
(WebCore::WebGL2RenderingContext::clearBufferiv):
(WebCore::WebGL2RenderingContext::clearBufferuiv):
(WebCore::WebGL2RenderingContext::clearBufferfv):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:

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

2 years agoOn Mac, dataTransfer claims to contain URL list when dropping files
rniwa@webkit.org [Wed, 20 Sep 2017 06:40:29 +0000 (06:40 +0000)]
On Mac, dataTransfer claims to contain URL list when dropping files
https://bugs.webkit.org/show_bug.cgi?id=177219

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug by removing code which was specifically adding local filenames as URLs in "text/uri-list"
when pasting or dropping files. Neither Chrome nor Firefox exhibit this behavior, and exposing local
filenames reveal sensitive information such as username.

Test: editing/pasteboard/datatransfer-types-dropping-text-file.html

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::readString):
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::absoluteURLsFromPasteboard): Deleted.

LayoutTests:

Added a regression test. For now, it only runs on Mac WK1.

* editing/pasteboard/datatransfer-types-dropping-text-file-expected.txt: Added.
* editing/pasteboard/datatransfer-types-dropping-text-file.html: Added.
* platform/ios/TestExpectations:
* platform/wk2/TestExpectations:

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

2 years agoWebDriver: Implement commands to get and set the window rect
carlosgc@webkit.org [Wed, 20 Sep 2017 06:32:35 +0000 (06:32 +0000)]
WebDriver: Implement commands to get and set the window rect
https://bugs.webkit.org/show_bug.cgi?id=177134

Reviewed by Brian Burg.

We are currently implementing the selenium legacy ones, we should implement the w3c ones instead.

https://w3c.github.io/webdriver/webdriver-spec.html#resizing-and-positioning-windows

* Session.cpp:
(WebDriver::Session::getToplevelBrowsingContextRect): Helper to get the window rect. This is used by both get
and set window rect commands.
(WebDriver::Session::moveToplevelBrowsingContextwindow): Helper to ask automation to move the window.
(WebDriver::Session::resizeToplevelBrowsingContextwindow): Helper to ask automation to resize the window.
(WebDriver::Session::getWindowRect): Handle prompts and then call getToplevelBrowsingContextRect().
(WebDriver::Session::setWindowRect): Handle prompts and then move and resize the window according to the given
parameters and finish the operation calling getToplevelBrowsingContextRect().
* Session.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::getWindowRect): Ask the session to get the window rect.
(WebDriver::valueAsNumberInRange): Helper to check a value is a valid number in the given range.
(WebDriver::WebDriverService::setWindowRect): Get and check size and position from parameters and then ask the
session to set the window rect.
* WebDriverService.h:

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

2 years agoWebDriver: wrong response in case of errors
carlosgc@webkit.org [Wed, 20 Sep 2017 06:29:17 +0000 (06:29 +0000)]
WebDriver: wrong response in case of errors
https://bugs.webkit.org/show_bug.cgi?id=177127

Reviewed by Brian Burg.

I misunderstood the spec when I implemented this, so we either return a "value" key with the result in case of
success or the error object as the body in case of error. We should always add a "value" key to the body and set
it with either the result or the error object.

https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-an-error

* WebDriverService.cpp:
(WebDriver::WebDriverService::sendResponse const):

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

2 years agoSimplify compositing layer updating
simon.fraser@apple.com [Wed, 20 Sep 2017 06:16:44 +0000 (06:16 +0000)]
Simplify compositing layer updating
https://bugs.webkit.org/show_bug.cgi?id=176196

Reviewed by Zalan Bujtas.

Source/WebCore:

Remove compositing layer updating from the updateLayerPositions() code path, which
was problematic because it wasn't pre-order. Instead, just rely on post-layout
compositing updates, which now need to do geometry updates. Micro benchmarking shows
this to be no slower.

We can remove the 'OnHitTest' update type, since we always ensure that layout is updated
before hit testing now.

Also remove a code path that could trigger updateGeometry() during a style change, and
in response to images loads, which were bad because layout may not be up-to-date at this time.

Tested by existing compositing tests. Rebaselined two tests after confirming they are progressions.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::contentChanged):
(WebCore::RenderLayerBacking::updateAfterLayout): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::operator<<):
* rendering/RenderLayerCompositor.h:

LayoutTests:

New baselines.

* scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt:
* tiled-drawing/background-transparency-toggle-expected.txt:

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

2 years agoDo more math in terms of FloatSizes and FloatPoints
simon.fraser@apple.com [Wed, 20 Sep 2017 06:13:54 +0000 (06:13 +0000)]
Do more math in terms of FloatSizes and FloatPoints
https://bugs.webkit.org/show_bug.cgi?id=177217

Reviewed by Zalan Bujtas.
Source/WebCore:

Add operator/(const FloatSize&, const FloatSize&), GraphicsContext::translate(const FloatPoint&),
FloatRect.scale(FloatSize) and AffineTransform::translate(const FloatSize&)
and use them in lots of places to do math in terms of points and sizes.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
* platform/Theme.cpp:
(WebCore::Theme::drawNamedImage const):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::drawCrossfadeSubimage):
(WebCore::CrossfadeGeneratedImage::draw):
* platform/graphics/FloatRect.h:
(WebCore::FloatRect::center const):
(WebCore::FloatRect::scale):
* platform/graphics/FloatSize.h:
(WebCore::operator/):
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::draw):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::scaleFactorForDrawing const):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::translate):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::clampedSize):
(WebCore::ImageBuffer::createCompatibleBuffer):
* platform/graphics/LayoutSize.h:
* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::draw):
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::transformContextForPainting):
(WebCore::applyRotationForPainting):
(WebCore::PDFDocumentImage::drawPDFPage):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/transforms/AffineTransform.cpp:
(WebCore::AffineTransform::translate):
(WebCore::makeMapBetweenRects):
* platform/graphics/transforms/AffineTransform.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::paint):
* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton):
(WebCore::paintButton):
(WebCore::paintStepper):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRendererHelper::beginFilterEffect):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderLayerCompositor.cpp:
(WebCore::paintScrollbar):
(WebCore::RenderLayerCompositor::paintContents):
* rendering/RenderMediaControls.cpp:
(WebCore::getUnzoomedRectAndAdjustCurrentContext):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::paintImageControlsButton):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::RenderSVGForeignObject):
(WebCore::RenderSVGForeignObject::localToParentTransform const):
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
(WebCore::RenderSVGResourceClipper::resourceBoundingBox):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::clipToTextMask):
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::markerTransformation const):
(WebCore::RenderSVGResourceMarker::markerContentTransformation const):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::resourceBoundingBox):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::createTileImage const):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::createImageBuffer):
(WebCore::SVGRenderingContext::bufferForeground):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::buildTransformForProgress):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform const):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):

Source/WebKit:

Add operator/(const FloatSize&, const FloatSize&), GraphicsContext::translate(const FloatPoint&),
FloatRect.scale(FloatSize) and AffineTransform::translate(const FloatSize&)
and use them in lots of places to do math in terms of points and sizes.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
* UIProcess/ios/DragDropInteractionState.mm:
(WebKit::createTargetedDragPreview):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::paintSnapshotAtSize):
(WebKit::WebPage::snapshotNode):

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

2 years agoWSL should be able to trap when something fatal happens
mmaxfield@apple.com [Wed, 20 Sep 2017 05:36:26 +0000 (05:36 +0000)]
WSL should be able to trap when something fatal happens
https://bugs.webkit.org/show_bug.cgi?id=177110

Reviewed by Filip Pizlo.

WSL programs can include a statement "trap;" which causes the entry
point to immediately return the default value of its return type.
This is implemented by throw/catch and populateDefaultValue().

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/EvaluationCommon.js:
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitTrapStatement):
* WebGPUShadingLanguageRI/Parse.js:
(parseStatement):
* WebGPUShadingLanguageRI/ReturnChecker.js:
(ReturnChecker.prototype.visitTrapStatement):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitTrapStatement):
* WebGPUShadingLanguageRI/StandardLibrary.js:
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
* WebGPUShadingLanguageRI/TrapStatement.js: Copied from Tools/WebGPUShadingLanguageRI/EvaluationCommon.js.
(TrapStatement):
(TrapStatement.prototype.get origin):
(TrapStatement.prototype.toString):
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitProtocolDecl):

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

2 years agoUnreviewed follow-up to r222229, remove invalid triggers.
ryanhaddad@apple.com [Wed, 20 Sep 2017 05:25:51 +0000 (05:25 +0000)]
Unreviewed follow-up to r222229, remove invalid triggers.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

2 years agoIDBRequest and IDBTransaction error properties should be DOMExceptions
cdumez@apple.com [Wed, 20 Sep 2017 05:20:12 +0000 (05:20 +0000)]
IDBRequest and IDBTransaction error properties should be DOMExceptions
https://bugs.webkit.org/show_bug.cgi?id=177201

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT now that it is passing.

* web-platform-tests/IndexedDB/error-attributes-expected.txt:

Source/WebCore:

IDBRequest and IDBTransaction error properties should be DOMExceptions:
- https://w3c.github.io/IndexedDB/#idbrequest
- https://w3c.github.io/IndexedDB/#transaction

Previously, we used a DOMError type, which is obsolete.

No new tests, rebaselined existing test.

* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onError):
(WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore:: const):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
(WebCore::IDBRequest::onError):
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::error const):
(WebCore::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBTransaction::connectionClosedFromServer):
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::IDBError::toDOMException const):
* Modules/indexeddb/shared/IDBError.h:

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

2 years agoMove non-upstreamed Resource Timing tests out of web-platform-tests
commit-queue@webkit.org [Wed, 20 Sep 2017 04:41:42 +0000 (04:41 +0000)]
Move non-upstreamed Resource Timing tests out of web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=177197

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/resource-timing/rt-*:
These are not upstream, move them out to http/wpt.

LayoutTests:

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
Update expectations for path changes.

* http/wpt/resource-timing/resources/data.json: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/data.json.
* http/wpt/resource-timing/resources/resource.css: Added.
* http/wpt/resource-timing/resources/resource.html: Added.
* http/wpt/resource-timing/resources/resource.js: Added.
* http/wpt/resource-timing/resources/resource.png: Added.
* http/wpt/resource-timing/resources/rt-iframe-1.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-iframe-1.html.
* http/wpt/resource-timing/resources/rt-iframe-2.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-iframe-2.html.
* http/wpt/resource-timing/resources/rt-module.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-module.js.
* http/wpt/resource-timing/resources/rt-revalidation-response.py: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-revalidation-response.py.
* http/wpt/resource-timing/resources/rt-sub-module.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-sub-module.js.
* http/wpt/resource-timing/resources/rt-utilities.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-utilities.sub.js.
* http/wpt/resource-timing/resources/rt-worker-resources.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-worker-resources.js.
* http/wpt/resource-timing/rt-cors-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors-expected.txt.
* http/wpt/resource-timing/rt-cors.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors.html.
* http/wpt/resource-timing/rt-cors.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors.js.
* http/wpt/resource-timing/rt-cors.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors.worker-expected.txt.
* http/wpt/resource-timing/rt-cors.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors.worker.html.
* http/wpt/resource-timing/rt-cors.worker.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-cors.worker.js.
* http/wpt/resource-timing/rt-initiatorType-css-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-css-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-css.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-css.html.
* http/wpt/resource-timing/rt-initiatorType-element-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-element.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html.
* http/wpt/resource-timing/rt-initiatorType-fetch-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-fetch-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-fetch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-fetch.html.
* http/wpt/resource-timing/rt-initiatorType-fetch.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-fetch.js.
* http/wpt/resource-timing/rt-initiatorType-media-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-media-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-media.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-media.html.
* http/wpt/resource-timing/rt-initiatorType-other-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-other-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-other.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-other.html.
* http/wpt/resource-timing/rt-initiatorType-script-module-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-script-module-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-script-module.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-script-module.html.
* http/wpt/resource-timing/rt-initiatorType-xmlhttprequest-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest-expected.txt.
* http/wpt/resource-timing/rt-initiatorType-xmlhttprequest.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest.html.
* http/wpt/resource-timing/rt-initiatorType-xmlhttprequest.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest.js.
* http/wpt/resource-timing/rt-initiatorType.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType.worker-expected.txt.
* http/wpt/resource-timing/rt-initiatorType.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType.worker.html.
* http/wpt/resource-timing/rt-initiatorType.worker.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-initiatorType.worker.js.
* http/wpt/resource-timing/rt-nextHopProtocol-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol-expected.txt.
* http/wpt/resource-timing/rt-nextHopProtocol.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.html.
* http/wpt/resource-timing/rt-nextHopProtocol.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.js.
* http/wpt/resource-timing/rt-nextHopProtocol.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.worker-expected.txt.
* http/wpt/resource-timing/rt-nextHopProtocol.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.worker.html.
* http/wpt/resource-timing/rt-nextHopProtocol.worker.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.worker.js.
* http/wpt/resource-timing/rt-performance-extensions-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions-expected.txt.
* http/wpt/resource-timing/rt-performance-extensions.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.html.
* http/wpt/resource-timing/rt-performance-extensions.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.js.
* http/wpt/resource-timing/rt-performance-extensions.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.worker-expected.txt.
* http/wpt/resource-timing/rt-performance-extensions.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.worker.html.
* http/wpt/resource-timing/rt-performance-extensions.worker.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.worker.js.
* http/wpt/resource-timing/rt-resource-errors-expected.txt: Added.
* http/wpt/resource-timing/rt-resource-errors.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resource-errors.html.
* http/wpt/resource-timing/rt-resource-ignored-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resource-ignored-expected.txt.
* http/wpt/resource-timing/rt-resource-ignored.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resource-ignored.html.
* http/wpt/resource-timing/rt-resources-per-frame-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resources-per-frame-expected.txt.
* http/wpt/resource-timing/rt-resources-per-frame.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resources-per-frame.html.
* http/wpt/resource-timing/rt-resources-per-worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resources-per-worker-expected.txt.
* http/wpt/resource-timing/rt-resources-per-worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-resources-per-worker.html.
* http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-revalidate-requests-expected.txt.
* http/wpt/resource-timing/rt-revalidate-requests.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-revalidate-requests.html.
* http/wpt/resource-timing/rt-serialization-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-serialization-expected.txt.
* http/wpt/resource-timing/rt-serialization.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-serialization.html.
* http/wpt/resource-timing/rt-shared-resource-in-frames-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-frames-expected.txt.
* http/wpt/resource-timing/rt-shared-resource-in-frames.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-frames.html.
* http/wpt/resource-timing/rt-shared-resource-in-workers-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-workers-expected.txt.
* http/wpt/resource-timing/rt-shared-resource-in-workers.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-workers.html.
Move tests and make small modifications to ensure we load "/WebKit/resource-timing"
test resources instead of "/resource-timing" resources (web-platform-tests ones).

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

2 years ago[Curl] Fix r222147
commit-queue@webkit.org [Wed, 20 Sep 2017 04:25:52 +0000 (04:25 +0000)]
[Curl] Fix r222147
https://bugs.webkit.org/show_bug.cgi?id=177128

Patch by Daewoong Jang <daewoong.jang@naverlabs.com> on 2017-09-19
Reviewed by Alex Christensen.

* platform/network/curl/CurlSSLHandle.h:
* platform/network/curl/CurlSSLVerifier.cpp:
(WebCore::CurlSSLVerifier::certVerifyCallback):
* platform/network/curl/CurlSSLVerifier.h:

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

2 years agotiled-drawing/tiled-backing-in-window.html fails on Retina displays
simon.fraser@apple.com [Wed, 20 Sep 2017 03:46:46 +0000 (03:46 +0000)]
tiled-drawing/tiled-backing-in-window.html fails on Retina displays
https://bugs.webkit.org/show_bug.cgi?id=177113

Reviewed by Tim Horton.

Source/WebKit:

Make m_customDeviceScaleFactor a std::optional<> instead of having the weird "0 is unset"
behavior.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::deviceScaleFactor const):
(WebKit::WebPageProxy::setCustomDeviceScaleFactor):
* UIProcess/WebPageProxy.h:

Tools:

This test removes the view from the window, and then dumps the layer tree, at which point
some layers would report a contentsScale of 2 on Retina displays.

This occurs because WebKitTestRunner overrides the default device scale factor on NSWindow,
but windowless views fall back to [NSScreen mainScreen].backingScaleFactor (in WebViewImpl::intrinsicDeviceScaleFactor()).

Fix by having PlatformWebView::changeWindowScaleIfNeeded() call -_setOverrideDeviceScaleFactor: on the view.

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded):

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

2 years agoImage subclasses should support is<> and downcast<>
simon.fraser@apple.com [Wed, 20 Sep 2017 02:40:40 +0000 (02:40 +0000)]
Image subclasses should support is<> and downcast<>
https://bugs.webkit.org/show_bug.cgi?id=177209

Reviewed by Tim Horton.

Add SPECIALIZE_TYPE_TRAITS_IMAGE() for Image subclasses.

Also use #pragma once in these headers.

* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.h:
* platform/graphics/Image.h:
* platform/graphics/NamedImageGeneratedImage.h:

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

2 years agoREGRESSION (r215613): Incorrect corners clipping with border-radius
wenson_hsieh@apple.com [Wed, 20 Sep 2017 02:20:28 +0000 (02:20 +0000)]
REGRESSION (r215613): Incorrect corners clipping with border-radius
https://bugs.webkit.org/show_bug.cgi?id=176498
<rdar://problem/34112607>

Reviewed by Tim Horton.

Source/WebCore:

http://trac.webkit.org/r215613 introduced an optimization to bail out of repainting borders if the invalidated
rect to paint is fully contained within the inner rounded rect of the border. However, due to issues with
coordinate and intersection math in RoundedRect::contains() and ellipseContainsPoint(), this causes
RenderBoxModelObject::paintBorder to return early even in circumstances where the border requires a repaint.
This patch fixes the contains() helper in RoundedRect and adds a new API test suite for RoundedRect that covers
these changes.

Test: WebCore.RoundedRectContainsRect

* platform/graphics/GeometryUtilities.cpp:
(WebCore::ellipseContainsPoint):

This function attempts to return early if the Manhattan distance of the transformed point is less than the
radius of the circle that results from applying the same transformation to the ellipse. However, this bails and
returns true if `x + y <= R`, but this means that if x and y are negative, we'll always end up returning true.
We fix this by adding the absolute values instead, so the check becomes: |x| + |y| <= R.

* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::contains const):

Before this patch, otherRect's upper left location was being used to hit-test against the ellipses formed from
each of the 4 corners of the rounded rect. Instead, this should use (x, y), (maxX, y), (x, maxY), (maxX, maxY)
for the top left, top right, bottom left, and bottom right corners, respectively.

Additionally, the checks for the bottom left and bottom right to determine whether the rect corner should be
checked for intersection against the ellipse's corner are incorrect. In the bottom left corner, the check for
`otherRect.maxX() >= center.x()` should instead be `otherRect.x() <= center.x()`, and the check for
`otherRect.x() <= center.x()` should instead be `otherRect.maxX() >= center.x()`.

* platform/graphics/RoundedRect.h:

Tools:

Add WebCore API tests for RoundedRect::contains().

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

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

2 years agoSkip fast/images/animated-image-mp4.html on Windows.
pvollan@apple.com [Wed, 20 Sep 2017 01:56:30 +0000 (01:56 +0000)]
Skip fast/images/animated-image-mp4.html on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177216

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoMark accessibility/crash-table-recursive-layout.html as a failure on Windows.
pvollan@apple.com [Wed, 20 Sep 2017 01:30:20 +0000 (01:30 +0000)]
Mark accessibility/crash-table-recursive-layout.html as a failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177212

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoLayering violation in Editor::createFragment
ap@apple.com [Wed, 20 Sep 2017 01:20:29 +0000 (01:20 +0000)]
Layering violation in Editor::createFragment
https://bugs.webkit.org/show_bug.cgi?id=176123

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa/WebArchiveResourceFromNSAttributedString.h: Added.
* editing/cocoa/WebArchiveResourceFromNSAttributedString.mm: Added.
Added a wrapper class for ArchiveResource, suitable for use as a WebResourceHandler.

* editing/cocoa/WebArchiveResourceWebResourceHandler.h: Added.
* editing/cocoa/WebArchiveResourceWebResourceHandler.mm: Added.
Objects of this class can be passed as "WebResourceHandler", and created instances
of the above class.

* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::attributesForAttributedStringConversion):
(WebCore::createFragment):
On newer OS versions, don't use WebKitLegacy to convert NSAttributedString to a
document fragment. We now only use system frameworks to convert the attributed
string to HTML source, and parse HTML into a fragment directly in WebCore.

* platform/URL.h: Exported fakeURLWithRelativePart.

Source/WebKitLegacy/mac:

* Misc/WebNSURLExtras.h:
* Misc/WebNSURLExtras.mm:
* WebView/WebFrame.mm:
* WebView/WebHTMLView.mm:
Removed multiple copies of webkit-fake-url creation code, switching to URL::fakeURLWithRelativePart().

* WebCoreSupport/WebEditorClient.mm:
(_WebCreateFragment): Added a stub implementation for older OSes. This is needed
because WebKitLegacy.exp is not passed through preprocessor, so there is no sane
way to avoid exporting the symbol just on newer OSes.

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

2 years agoAllow WTF::map to use any class that is iterable and has a size getter
commit-queue@webkit.org [Wed, 20 Sep 2017 00:57:40 +0000 (00:57 +0000)]
Allow WTF::map to use any class that is iterable and has a size getter
https://bugs.webkit.org/show_bug.cgi?id=177026

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-19
Reviewed by Darin Adler.

Source/WebCore:

No change of behavior.
Using WTF::map to go from maps to vectors.

* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::resourceList):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):

Source/WTF:

Computing the Item type given to the lambda using the iterator instead of ValueType which is specific to Vector.
Adding the possibility to pass a non const container reference and a lambda taking non const references as well.

* wtf/Vector.h:
(WTF::MapFunctionInspector::acceptsReference):
(WTF::Mapper::map):
(WTF::map):

Tools:

* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):

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

2 years agoAdd missing text after r222226.
zalan@apple.com [Wed, 20 Sep 2017 00:37:14 +0000 (00:37 +0000)]
Add missing text after r222226.

* accessibility/crash-table-recursive-layout.html:

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

2 years agoMarked tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical...
jlewis3@apple.com [Wed, 20 Sep 2017 00:03:04 +0000 (00:03 +0000)]
Marked tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html as flaky on macOS Debug.
https://bugs.webkit.org/show_bug.cgi?id=171839

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years agoQuiet media player private logging
eric.carlson@apple.com [Tue, 19 Sep 2017 23:28:48 +0000 (23:28 +0000)]
Quiet media player private logging
https://bugs.webkit.org/show_bug.cgi?id=177199

Reviewed by Jer Noble.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

2 years agoAllow modern decoding of Vectors
achristensen@apple.com [Tue, 19 Sep 2017 23:17:48 +0000 (23:17 +0000)]
Allow modern decoding of Vectors
https://bugs.webkit.org/show_bug.cgi?id=177102

Reviewed by Andy Estes.

Source/WebCore:

* Modules/cache/DOMCacheEngine.h:
(WebCore::DOMCacheEngine::CacheInfos::decode):
(WebCore::DOMCacheEngine::CacheIdentifierOperationResult::decode):
* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
* Modules/indexeddb/IDBDatabaseIdentifier.h:
(WebCore::IDBDatabaseIdentifier::decode):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBGetAllResult.h:
(WebCore::IDBGetAllResult::decode):
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::decode):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IDBKeyRangeData.h:
(WebCore::IDBKeyRangeData::decode):
* Modules/indexeddb/IDBValue.h:
(WebCore::IDBValue::decode):
* Modules/indexeddb/shared/IDBError.h:
* Modules/indexeddb/shared/IDBIterateCursorData.h:
(WebCore::IDBIterateCursorData::decode):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::decode):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::decode):
* page/SecurityOriginData.h:
(WebCore::SecurityOriginData::decode):
* platform/Cookie.h:
(WebCore::Cookie::decode):
* platform/mediastream/MediaConstraints.h:
(WebCore::MediaTrackConstraintSetMap::decode):
* platform/network/FormData.h:
(WebCore::FormDataElement::decode):
* workers/service/ServiceWorkerJobData.h:
(WebCore::ServiceWorkerJobData::decode):
* workers/service/ServiceWorkerRegistrationData.h:
(WebCore::ServiceWorkerRegistrationData::decode):
* workers/service/ServiceWorkerRegistrationKey.h:
(WebCore::ServiceWorkerRegistrationKey::decode):

Source/WebKit:

Rather than allow modern decoding of Vectors of types that only allow legacy decoding,
I just made modern decoders for all types that we need to decode in Vectors.

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
* Platform/IPC/ArgumentCoders.h:
* Shared/AssistedNodeInformation.cpp:
(WebKit::OptionItem::decode):
* Shared/AssistedNodeInformation.h:
* Shared/CallbackID.h:
(WebKit::CallbackID::decode):
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentError>::decode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::decode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::decode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
* Shared/Databases/IndexedDB/WebIDBResult.cpp:
(WebKit::WebIDBResult::decode):
* Shared/FrameInfoData.cpp:
(WebKit::FrameInfoData::decode):
* Shared/Gamepad/GamepadData.cpp:
(WebKit::GamepadData::decode):
* Shared/Gamepad/GamepadData.h:
* Shared/PlatformPopupMenuData.cpp:
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h:
* Shared/Plugins/NPIdentifierData.cpp:
(WebKit::NPIdentifierData::decode):
* Shared/Plugins/NPIdentifierData.h:
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::decode):
* Shared/Plugins/NPVariantData.h:
* Shared/RTCNetwork.cpp:
(WebKit::RTCNetwork::IPAddress::decode):
(WebKit::RTCNetwork::SocketAddress::decode):
(WebKit::RTCNetwork::decode):
* Shared/RTCNetwork.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
(WebKit::RemoteLayerTreeTransaction::decode):
* Shared/SessionState.cpp:
(WebKit::HTTPBody::Element::decode):
(WebKit::FrameState::decode):
(WebKit::PageState::decode):
(WebKit::BackForwardListItemState::decode):
(WebKit::BackForwardListState::decode):
* Shared/SessionState.h:
* Shared/WebCompiledContentRuleListData.cpp:
(WebKit::WebCompiledContentRuleListData::decode):
* Shared/WebCompiledContentRuleListData.h:
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::decode):
* Shared/WebContextMenuItemData.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DOMCacheEngine::CacheInfo>::decode):
(IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
(IPC::ArgumentCoder<FloatRect>::decode):
(IPC::ArgumentCoder<FloatQuad>::decode):
(IPC::ArgumentCoder<IntRect>::decode):
(IPC::ArgumentCoder<RecentSearch>::decode):
(IPC::ArgumentCoder<Region::Span>::decode):
(IPC::ArgumentCoder<MimeClassInfo>::decode):
(IPC::ArgumentCoder<PluginInfo>::decode):
(IPC::ArgumentCoder<SelectionRect>::decode):
(IPC::ArgumentCoder<CompositionUnderline>::decode):
(IPC::ArgumentCoder<DictationAlternative>::decode):
(IPC::ArgumentCoder<GrammarDetail>::decode):
(IPC::ArgumentCoder<TextCheckingResult>::decode):
(IPC::ArgumentCoder<BlobPart>::decode):
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
(IPC::ArgumentCoder<MediaConstraints>::decode):
(IPC::ArgumentCoder<CaptureDevice>::decode):
(IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):
(IPC::ArgumentCoder<MediaSelectionOption>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebEvent.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::decode):
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::decode):
* Shared/WebPopupItem.h:
* Shared/WebUserContentControllerDataTypes.cpp:
(WebKit::WebUserScriptData::decode):
(WebKit::WebUserStyleSheetData::decode):
(WebKit::WebScriptMessageHandlerData::decode):
* Shared/WebUserContentControllerDataTypes.h:
* Shared/WebsiteData/WebsiteData.cpp:
(WebKit::WebsiteData::Entry::decode):
* Shared/WebsiteData/WebsiteData.h:
* Shared/WebsiteDataStoreParameters.cpp:
(WebKit::WebsiteDataStoreParameters::decode):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::decode):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<KeypressCommand>::decode):
* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::decodeLegacySessionState):
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::KeyframeValue::decode):
(WebKit::PlatformCAAnimationRemote::Properties::decode):

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

2 years agoUpdate bot configuration for iOS 11.
ryanhaddad@apple.com [Tue, 19 Sep 2017 22:17:58 +0000 (22:17 +0000)]
Update bot configuration for iOS 11.
https://bugs.webkit.org/show_bug.cgi?id=177165

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.ios-simulator-10 img.logo): Deleted.
(table.queue-grid tr.platform.ios-10 img.logo): Deleted.
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
(_should_file_trigger_build):
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
(ShouldBuildTest):
(ShouldBuildTest.test_should_build):

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

2 years agoOn iOS, getData can't get text set by setData during copy event
rniwa@webkit.org [Tue, 19 Sep 2017 21:50:03 +0000 (21:50 +0000)]
On iOS, getData can't get text set by setData during copy event
https://bugs.webkit.org/show_bug.cgi?id=176980
<rdar://problem/34453915>

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by iOS port not implementing Pasteboard::createPrivate(). Rather than implementing this in iOS,
replace its use for copy & paste events by StaticPasteboard Wenson added for input events. This makes read-write
pasteboard platform agnostic and paves the way to make writing to pasteboard in a single IPC in WebKit2.

Also fixed a bug that iOS port's Pasteboard::types returned the list of all supported types instead of ones
actually present in the pasteboard.

This patch also adds a vector of types to StaticPasteboard to maintain the type order.

Tests: editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html
       editing/pasteboard/dataTransfer-types-pasting-plaintext.html

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createForCopyAndPaste): Make StaticPasteboard instead of a private pasteboard.
(WebCore::DataTransfer::createForInputEvent):
* editing/Editor.cpp:
(WebCore::dispatchClipboardEvent): Call newly added commitToPasteboard on StaticPasteboard.
* platform/Pasteboard.h:
(WebCore::Pasteboard::isStatic const):
* platform/PasteboardStrategy.h:
* platform/StaticPasteboard.cpp:
(WebCore::StaticPasteboard::create): Deleted.
(WebCore::StaticPasteboard::StaticPasteboard):
(WebCore::StaticPasteboard::hasData):
(WebCore::StaticPasteboard::types): Deleted. Now simply returns m_type.
(WebCore::StaticPasteboard::readString): Added.
(WebCore::StaticPasteboard::writeString): Added.
(WebCore::StaticPasteboard::clear): Added.
(WebCore::StaticPasteboard::commitToPasteboard): Added.
(isType): Added.
* platform/StaticPasteboard.h:
(WebCore::Pasteboard::isStatic const): Added.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::Pasteboard::types): Return the actual list of types in the pasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.
* platform/wpe/PasteboardWPE.cpp:
(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.

Source/WebKit:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::copy): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::copy): Deleted.

LayoutTests:

Added regression tests to make sure dataTransfer.types returns an empty list when writing to a pasteboard (copy),
and doesn't contain image types when pasting plain text. Unfortunately, pasting image does result in plain text
content being present in the pasteboard in the form of URL so we can't test that scenario.

Also removed failing expectations from a number of tests that are now passing on iOS.

* editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy-expected.txt: Added.
* editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html: Added.
* editing/pasteboard/dataTransfer-types-pasting-plaintext-expected.txt: Added.
* editing/pasteboard/dataTransfer-types-pasting-plaintext.html: Added.
* platform/ios/TestExpectations:

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

2 years agoUse 'owned commit' instead of 'sub commit' whenever refers to a commit owned by anoth...
dewei_zhu@apple.com [Tue, 19 Sep 2017 21:47:41 +0000 (21:47 +0000)]
Use 'owned commit' instead of 'sub commit' whenever refers to a commit owned by another commit.
https://bugs.webkit.org/show_bug.cgi?id=177178

Reviewed by Ryosuke Niwa.

We use both 'owned commit' and 'sub commit' to refer to a commit owned by an another commit. We should use one term instead of two.
Renaming 'subCommit' to 'ownedCommit', 'ownsSubCommit' to 'ownsCommit' and 'sub-commit' to 'owned-commit'.

* browser-tests/commit-log-viewer-tests.js:
* public/api/commits.php:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._renderCommitList):
* public/v3/components/owned-commit-viewer.js: Renamed from Websites/perf.webkit.org/public/v3/components/sub-commit-viewer.js.
(OwnedCommitViewer):
(OwnedCommitViewer.prototype.didConstructShadowTree):
(OwnedCommitViewer.prototype._toggleVisibility):
(OwnedCommitViewer.prototype.render):
(OwnedCommitViewer.prototype._renderOwnedCommitTable):
(OwnedCommitViewer.htmlTemplate):
(OwnedCommitViewer.cssTemplate):
* public/v3/index.html:
* public/v3/models/commit-log.js:
(CommitLog):
(CommitLog.prototype.updateSingleton):
(CommitLog.prototype.ownsCommits):
(CommitLog.prototype.fetchOwnedCommits):
(CommitLog.prototype._buildOwnedCommitMap):
(CommitLog.diffOwnedCommits):
(CommitLog.prototype.ownsSubCommits): Deleted.
(CommitLog.prototype.fetchSubCommits): Deleted.
(CommitLog.prototype._buildSubCommitMap): Deleted.
(CommitLog.diffSubCommits): Deleted.
* server-tests/api-commits-tests.js:
* server-tests/api-report-commits-tests.js:
* server-tests/tools-os-build-fetcher-tests.js:
(return.waitForInvocationPromise.then):
(string_appeared_here.return.waitForInvocationPromise.then):
* tools/js/os-build-fetcher.js:
(prototype._fetchAvailableBuilds):
(prototype._addOwnedCommitsForBuild):
(prototype._addSubCommitsForBuild): Deleted.
* unit-tests/commit-log-tests.js:
(return.commit.fetchOwnedCommits.then):
(return.fetchingPromise.then):
(return.commit.fetchSubCommits.then): Deleted.

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

2 years agoAXObjectCache::performDeferredCacheUpdate is called recursively through FrameView...
zalan@apple.com [Tue, 19 Sep 2017 21:23:18 +0000 (21:23 +0000)]
AXObjectCache::performDeferredCacheUpdate is called recursively through FrameView::layout.
https://bugs.webkit.org/show_bug.cgi?id=176218
<rdar://problem/34205612>

Reviewed by Simon Fraser.

Source/WebCore:

There are certain cases when we might re-enter performDeferredCacheUpdate through recursive
layout calls (see webkit.org/b/177176) and mutate m_deferredTextChangedList multiple times.

Test: accessibility/crash-table-recursive-layout.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::performDeferredCacheUpdate):
* accessibility/AXObjectCache.h:

LayoutTests:

* accessibility/crash-table-recursive-layout-expected.txt: Added.
* accessibility/crash-table-recursive-layout.html: Added.

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

2 years ago[Cocoa] Add an ImageDecoder subclass backed by AVFoundation
jer.noble@apple.com [Tue, 19 Sep 2017 21:15:46 +0000 (21:15 +0000)]
[Cocoa] Add an ImageDecoder subclass backed by AVFoundation
https://bugs.webkit.org/show_bug.cgi?id=176825

Reviewed by Eric Carlson.

Source/WebCore:

Add a new concrete subclass of ImageDecoder which uses AVFoundation to parse and decode
image data.

AVFoundation APIs require prior knowledge of the media data's mime type to determine whether
the media data is decodable, so the mime type information must be passed through from the
CachedResource -> CachedImage -> ImageFrameCache -> ImageSource so as to be available when
creating the ImageDecoder:

(Drive-by fix: the createFrameImageAtIndex() method will mutate internal state, so make it
non-const.)

* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::mimeType const):
* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
* platform/cocoa/VideoToolboxSoftLink.cpp:
* platform/cocoa/VideoToolboxSoftLink.h:
* platform/graphics/Image.cpp:
(WebCore::Image::mimeType const):
(WebCore::Image::expectedContentSize const):
* platform/graphics/Image.h:
* platform/graphics/ImageDecoder.cpp:
(WebCore::ImageDecoder::create):
* platform/graphics/ImageDecoder.h:
(WebCore::ImageDecoder::setExpectedContentSize):
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::mimeType const):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageObserver.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::createFrameImageAtIndex):
* platform/graphics/cg/ImageDecoderCG.h:

Add the new class, ImageDecoderAVFObjC:

AVFoundation expects to load all the media data for an AVURLAsset itself. To map between the
provided SharedData and AVURLAsset's requirements, create a delegate object
WebCoreSharedBufferResourceLoaderDelegate, which responds to requests from the AVURLAsset by
extracting data from the SharedData object. Ensure AVURLAsset doesn't load any data outside
this delegate by passing the AVURLAssetReferenceRestrictionsKey /
AVAssetReferenceRestrictionForbidAll key and value in the AVURLAsset creation options.

* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: Added.
(WebCore::ImageDecoderAVFObjC::create):
(WebCore::ImageDecoderAVFObjC::mimeType const):
(WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: Added.
(SOFT_LINK_CONSTANT):
(-[WebCoreSharedBufferResourceLoaderDelegate initWithParent:]):
(-[WebCoreSharedBufferResourceLoaderDelegate setExpectedContentSize:]):
(-[WebCoreSharedBufferResourceLoaderDelegate updateData:complete:]):
(-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate enqueueRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate fulfillPendingRequests]):
(-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
(WebCore::customSchemeURL):
(WebCore::imageDecoderAssetOptions):
(WebCore::transformToRotationProperties):
(WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
(WebCore::ImageDecoderAVFObjC::canDecodeType):
(WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
(WebCore::ImageDecoderAVFObjC::readSampleMetadata): Parses the media data using AVSampleCursor to walk
    the media sample table, extracting frame presentation time, decode time, and duration.
(WebCore::ImageDecoderAVFObjC::readTrackMetadata): Reads the affine transform and size information from
    the AVAssetTrack, and transforms the transform into a rotation value.
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer): Decompress the incoming sample data, optionally rotate
    the output, and store the results in the sample data vector.
(WebCore::ImageDecoderAVFObjC::advanceCursor): Wrap around the end of the sample table.
(WebCore::ImageDecoderAVFObjC::setTrack): Reset all sample and track metadata.
(WebCore::ImageDecoderAVFObjC::encodedDataStatus const): Retrieve from sample data.
(WebCore::ImageDecoderAVFObjC::frameCount const): Ditto.
(WebCore::ImageDecoderAVFObjC::repetitionCount const): Ditto.
(WebCore::ImageDecoderAVFObjC::uti const): Ditto.
(WebCore::ImageDecoderAVFObjC::filenameExtension const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameSizeAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameOrientationAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameDurationAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameHasAlphaAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameAllowSubsamplingAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::frameBytesAtIndex const): Ditto.
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): If the sample data has already been
    decompressed, return it. Otherwise, walk through the sample table decompressing frames
    until the desired frame is decoded.
(WebCore::ImageDecoderAVFObjC::setData):
(WebCore::ImageDecoderAVFObjC::clearFrameBufferCache):

Modify WebCoreDecompressionSession so that it can emit frames which have been converted from
YUV -> RGB as part of the decode operation. Also, add a synchronous decoding operation
method, for use in ImageDecoderAVFObjC.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession):
* platform/graphics/cocoa/WebCoreDecompressionSession.h:
(WebCore::WebCoreDecompressionSession::createOpenGL):
(WebCore::WebCoreDecompressionSession::createRGB):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession):
(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
(WebCore::WebCoreDecompressionSession::decodeSample):
(WebCore::WebCoreDecompressionSession::decodeSampleSync):

Other changes:

* WebCore.xcodeproj/project.pbxproj: Add new files to project.
* platform/cocoa/VideoToolboxSoftLink.cpp: Add newly referenced methods.
* platform/cocoa/VideoToolboxSoftLink.h: Ditto.

Source/WTF:

* wtf/Platform.h:

LayoutTests:

* fast/images/animated-image-mp4-expected.txt: Added.
* fast/images/animated-image-mp4.html: Added.
* fast/images/resources/animated-red-green-blue.mp4: Added.
* platform/ios/TestExpectations:

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

2 years agoMarked imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html...
jlewis3@apple.com [Tue, 19 Sep 2017 21:11:41 +0000 (21:11 +0000)]
Marked imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html as flaky on El Capitan Debug.
https://bugs.webkit.org/show_bug.cgi?id=176486

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years ago[Curl] Move Authentication related tasks into AuthenticationChallenge class
commit-queue@webkit.org [Tue, 19 Sep 2017 20:45:09 +0000 (20:45 +0000)]
[Curl] Move Authentication related tasks into AuthenticationChallenge class
https://bugs.webkit.org/show_bug.cgi?id=177105

Currently those codes are in ResourceHandle or related companion. It will
be reused with NetworkLoadTask so that it should be separated from them.

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-09-19
Reviewed by Alex Christensen.

* platform/Curl.cmake:
* platform/network/curl/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
(WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
(WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
* platform/network/curl/AuthenticationChallengeCurl.cpp: Added.
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::AuthenticationChallenge::protectionSpaceServerTypeFromURI):
(WebCore::AuthenticationChallenge::protectionSpaceFromHandle):
(WebCore::AuthenticationChallenge::removeLeadingAndTrailingQuotes):
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::didReceiveAllHeaders):
(WebCore::ResourceHandleCurlDelegate::didReceiveHeader):
(WebCore::removeLeadingAndTrailingQuotes): Deleted.
(WebCore::ResourceHandleCurlDelegate::getProtectionSpace): Deleted.
* platform/network/curl/ResourceHandleCurlDelegate.h:

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

2 years ago[CMake] Add ENABLE_WEB_CRYPTO option and make ENABLE_SUBTLE_CRYPTO depend on it.
clopez@igalia.com [Tue, 19 Sep 2017 20:42:26 +0000 (20:42 +0000)]
[CMake] Add ENABLE_WEB_CRYPTO option and make ENABLE_SUBTLE_CRYPTO depend on it.
https://bugs.webkit.org/show_bug.cgi?id=177180

Reviewed by Michael Catanzaro.

This adds a ENABLE_WEB_CRYPTO flag and makes ENABLE_SUBTLE_CRYPTO depend on it.
The GTK and WPE ports enable them and set ENABLE_WEB_CRYPTO to public.

* Source/cmake/OptionsGTK.cmake: Set both features to ON and ENABLE_WEB_CRYPTO to public. No change in behaviour for GTK.
* Source/cmake/OptionsWPE.cmake: Do like on the GTK port. The public flag is now ENABLE_WEB_CRYPTO.
* Source/cmake/WebKitFeatures.cmake: Add the definition of ENABLE_WEB_CRYPTO and make ENABLE_SUBTLE_CRYPTO depend on it.

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

2 years agoDo not mutate RenderText content during layout.
zalan@apple.com [Tue, 19 Sep 2017 20:28:29 +0000 (20:28 +0000)]
Do not mutate RenderText content during layout.
https://bugs.webkit.org/show_bug.cgi?id=176219
<rdar://problem/34205724>

Reviewed by David Hyatt.

Source/WebCore:

Update combined text when the style/content change as opposed to lazily, during layout.
-content mutation during layout might make the inline tree go out of sync.

Test: fast/text/international/dynamic-text-combine-crash.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::setRenderedText):
(WebCore::RenderCombineText::combineTextIfNeeded):
(WebCore::RenderCombineText::combineText): Deleted.
* rendering/RenderCombineText.h:
* rendering/RenderText.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):

LayoutTests:

* fast/text/international/dynamic-text-combine-crash.html: Added.
* fast/text/text-combine-crash-expected.txt:

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

2 years agocreateMarkupInternal should protect its pointer to the Range's common ancestor
wenson_hsieh@apple.com [Tue, 19 Sep 2017 20:25:47 +0000 (20:25 +0000)]
createMarkupInternal should protect its pointer to the Range's common ancestor
https://bugs.webkit.org/show_bug.cgi?id=177033
<rdar://problem/34265390>

Reviewed by Tim Horton.

Source/WebCore:

Adds basic safeguarding to codepaths hit while executing an outdent command.

Test: editing/execCommand/outdent-with-media-query-listener-in-iframe.html

* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::outdentRegion):

Avoid an infinite loop if endOfCurrentParagraph is a null position.

* editing/markup.cpp:
(WebCore::createMarkupInternal):

Protect the raw pointer to the Range's common ancestor node.

LayoutTests:

Adds a test that removes the common ancestor node of a range in the middle of executing an outdent.

* editing/execCommand/outdent-with-media-query-listener-in-iframe-expected.txt: Added.
* editing/execCommand/outdent-with-media-query-listener-in-iframe.html: Added.

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

2 years agoPerformance Dashboard backend should support A/B testing for owned components.
dewei_zhu@apple.com [Tue, 19 Sep 2017 20:14:45 +0000 (20:14 +0000)]
Performance Dashboard backend should support A/B testing for owned components.
https://bugs.webkit.org/show_bug.cgi?id=175978

Reviewed by Ryosuke Niwa.

Add backend change for Performance Dashboard to support A/B testing for owned components.
Added 'commitset_commit_owner' and 'commitset_requires_build' columns to 'commit_set_items' table.
'commitset_commit_owner' referrs to determine a commit with owner.
'commitset_requires_build' indicates whether a root build is required.
This will be set true whenever commit_set_item specifies a patch file,
or commit_set_item is commit with owner commit,
or any other commit from same repository and in same build-request group requires build.
SQL for updating existing database:
    'BEGIN;
        ALTER TABLE commit_set_items ADD COLUMN commitset_commit_owner integer REFERENCES commits DEFAULT NULL, ADD COLUMN commitset_requires_build boolean DEFAULT FALSE;
        UPDATE commit_set_items SET commitset_requires_build = TRUE WHERE commitset_patch_file IS NOT NULL;
        UPDATE commit_set_items SET commitset_requires_build = TRUE WHERE commitset_set IN (SELECT requests1.request_commit_set FROM build_requests as requests1 JOIN build_requests as requests2 ON requests1.request_group = requests2.request_group JOIN commit_set_items as item ON item.commitset_set = requests2.request_commit_set  WHERE item.commitset_patch_file IS NOT NULL);
        ALTER TABLE commit_set_items ADD CONSTRAINT commitset_item_with_patch_must_requires_build CHECK (commitset_patch_file IS NULL OR commitset_requires_build = TRUE),
            ADD CONSTRAINT commitset_item_with_owned_commit_must_requires_build CHECK (commitset_commit_owner IS NULL OR commitset_requires_build = TRUE);
    END;'

* init-database.sql: Updated 'commit_set_items' table.
* public/admin/triggerables.php: Only top level repository should show on triggerables page.
* public/include/build-requests-fetcher.php: Added 'commitOwner' and 'requireBuild' to 'revision_items'. Added 'commitOwner' field to a commit.
* public/include/db.php: Should be able to insert boolean value to database without explicted convert to 't' or 'f'.
* public/privileged-api/create-test-group.php:
    Added logic to process 'commitOwner' and 'requireBuild' in 'commit_set_items'.
    Removed a 'FIXME' that has been addressed before this commit.
* public/v3/models/build-request.js:
(BuildRequest.constructBuildRequestsFromData): Set 'commitOwner' field for a commit set item.
* public/v3/models/commit-set.js:
(CommitSet): Added maps for repository to commit owner and whether a repository requires builds.
(CommitSet.prototype.updateSingleton):
(CommitSet.prototype._updateFromObject):
(CommitSet.prototype.ownerRevisionForRepository): Returns owner revision for a given repository in current commit set.
(CommitSet.prototype.requiresBuildForRepository): Returns whether a repository need to build.
(CommitSet.prototype.equals): Equality check should include 2 new maps.
(CustomCommitSet): CustomCommitSet should be able to store commit with an owner commit.
(CustomCommitSet.prototype.setRevisionForRepository): Added each revision list entry should have 'ownerRevision'(null by default).
(CustomCommitSet.prototype.equals): Equality check should also check the equality of 'ownerRevision'.
(CustomCommitSet.prototype.ownerRevisionForRepository): Returns a owner revision for a given repository.
* public/v3/models/repository.js:
(Repository.prototype.findOwnedRepositoryByName): Return an repository owned by current repository with a given name.
* public/v3/models/test-group.js: Added 'ownerRevision' field in each entry of revisionSet.
* server-tests/api-build-requests-tests.js: Added tests.
* server-tests/privileged-api-create-test-group-tests.js: Added tests.
* server-tests/privileged-api-upload-file-tests.js: Fix unit tests by setting'requires_build' field to be true when updating commit_set_item which has a patch..
* server-tests/resources/mock-data.js: Added mock build requests with commit sets contain owned commits.
(MockData.jscRepositoryId): Returns id for JavaScriptsCore repository.
(MockData.addMockConfiguration): Added mock JavaScriptCore and owned JavaScriptCore repositories and commits associated with them.
(MockData.ownedJSCRepositoryId): Added a JavaScriptCore repository with WebKit as owner.
(MockData.addMockConfiguration): Added mock data for test cases those require a commit with a owner commit.
(MockData.addTestGroupWithOwnedCommits): Added mock data for analysis tasks, the build requires of which contains owned commits.
(MockData.set addAnotherTriggerable): Added another triggerable which has mac, webkit and javascript core repositories as triggerable repository group.
(MockData.set addAnotherMockTestGroup): Added another mock test group.
* tools/js/v3-models.js: Import CustomCommitSet.
* unit-tests/resources/mock-v3-models.js: Added an owned webkit repository.
* unit-tests/commit-set-tests.js: Added unit tests CustomCommitSet.

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

2 years agoUnreviewed, rolling out r222217 and r222214.
ryanhaddad@apple.com [Tue, 19 Sep 2017 20:09:09 +0000 (20:09 +0000)]
Unreviewed, rolling out r222217 and r222214.
This change introduced two LayoutTest failures.
https://bugs.webkit.org/show_bug.cgi?id=177026

Source/WebCore:

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::setRenderedText):
(WebCore::RenderCombineText::combineText):
(WebCore::RenderCombineText::combineTextIfNeeded): Deleted.
* rendering/RenderCombineText.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):

LayoutTests:

* fast/text/international/dynamic-text-combine-crash-expected.txt: Removed.
* fast/text/international/dynamic-text-combine-crash.html: Removed.
* fast/text/text-combine-crash-expected.txt:

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

2 years agoAttempt to fix Linux build.
zalan@apple.com [Tue, 19 Sep 2017 19:32:01 +0000 (19:32 +0000)]
Attempt to fix Linux build.

* rendering/RenderText.cpp:

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

2 years agoWeb Inspector: Adopt named groups in complex regexes
commit-queue@webkit.org [Tue, 19 Sep 2017 18:46:35 +0000 (18:46 +0000)]
Web Inspector: Adopt named groups in complex regexes
https://bugs.webkit.org/show_bug.cgi?id=177117

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-19
Reviewed by Matt Baker.

* UserInterface/Base/URLUtilities.js:
(parseSecurityOrigin):
(parseDataURL):
(parseURL):
* UserInterface/Models/Color.js:
(WI.Color.fromString):

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

2 years agoPrimitive protocol should have capital name
fpizlo@apple.com [Tue, 19 Sep 2017 18:28:25 +0000 (18:28 +0000)]
Primitive protocol should have capital name
https://bugs.webkit.org/show_bug.cgi?id=177097

Reviewed by JF Bastien.

As soon as I started programming in WSL, I found that I preferred to capitalize protocol names. So, my
early decision to call the primitive protocol "primitive" instead of "Primitive" seems absurd now. This
change reverses that decision.

Aesthetically, this is a slight improvement. For example:

    struct Bar<T:Primitive> {
        Foo<device T^> f;
    }

This makes more sense since all of the non-keyword type identifiers are capital.

The one place where this is an aesthetic regression is native primitive typedefs, which now look like:

    native Primitive typedef bool;

I'm happy with that tradeoff, since native typedefs are only in the standard library. Users don't see
this.

* WebGPUShadingLanguageRI/AddressSpace.js:
(protocolSuffix):
* WebGPUShadingLanguageRI/Intrinsics.js:
(Intrinsics):
* WebGPUShadingLanguageRI/NativeType.js:
(NativeType.prototype.toString):
(NativeType):
* WebGPUShadingLanguageRI/Parse.js:
(parseNative):
* WebGPUShadingLanguageRI/StandardLibrary.js:
* WebGPUShadingLanguageRI/Test.js:
(TEST_passNullAndNotNullFullPoly):
(TEST_passNullAndNotNullFullPolyReverse):

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

2 years agoDo not mutate RenderText content during layout.
zalan@apple.com [Tue, 19 Sep 2017 18:07:57 +0000 (18:07 +0000)]
Do not mutate RenderText content during layout.
https://bugs.webkit.org/show_bug.cgi?id=176219
<rdar://problem/34205724>

Reviewed by David Hyatt.

Source/WebCore:

Update combined text when the style/content change as opposed to lazily, during layout.
-content mutation during layout might make the inline tree go out of sync.

Test: fast/text/international/dynamic-text-combine-crash.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::setRenderedText):
(WebCore::RenderCombineText::combineTextIfNeeded):
(WebCore::RenderCombineText::combineText): Deleted.
* rendering/RenderCombineText.h:
* rendering/RenderText.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):

LayoutTests:

* fast/text/international/dynamic-text-combine-crash.html: Added.
* fast/text/text-combine-crash-expected.txt:

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

2 years agoMarked http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response...
jlewis3@apple.com [Tue, 19 Sep 2017 17:56:41 +0000 (17:56 +0000)]
Marked http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=176240

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 years agoExpose WKPageRef as a private property on WKWebView on Mac
achristensen@apple.com [Tue, 19 Sep 2017 17:45:06 +0000 (17:45 +0000)]
Expose WKPageRef as a private property on WKWebView on Mac
https://bugs.webkit.org/show_bug.cgi?id=177022
<rdar://problem/34342762>

Reviewed by Andy Estes.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageRefForTransitionToWKWebView]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

2 years agoMake _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
achristensen@apple.com [Tue, 19 Sep 2017 17:41:42 +0000 (17:41 +0000)]
Make _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
https://bugs.webkit.org/show_bug.cgi?id=177124

Reviewed by Andy Estes.

The boolean added in r213747 was getting lost in two places:
1. The API::ProcessPoolConfiguration gets copied before it's used, so we need to set the bool on the copy.
2. The bool was not getting copied from that ProcessPoolConfiguration to the NetworkProcessCreationParameters
to be sent to the NetworkProcess to be given to the NSURLSessionConfiguration in NetworkSessionCocoa.mm.

These two problems were fixed and verified manually with a customized iOS app on my phone.
Unfortunately, this cannot be tested well with our current test infrastructure.

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

2 years agoCannot put typedefs of templated structs inside structs
fpizlo@apple.com [Tue, 19 Sep 2017 16:38:37 +0000 (16:38 +0000)]
Cannot put typedefs of templated structs inside structs
https://bugs.webkit.org/show_bug.cgi?id=177123

Reviewed by Michael Saboff.

Ever since I wrote the generic type instantiation code in WSL, it had a bizarre stink to it. I
did not know what it was, until I met this test case:

    struct Foo { int2 x; }

The problem was that Type has a getter called instantiatedType, which invoked
InstantiateImmediates. That's great. Where we went wrong was that TypeRef overrode
instantiatedType, and then InstantiateImmediates called TypeRef.instantiatedType from its
visitTypeRef. What a mess. None of that was necessary for anything, and it was just wrong. This
patch fixes it so that:

- Type has an instantiatedType getter, which does InstantiateImmediates. I didn't change this.
  This was the only part of the status quo that really made sense.

- TypeRef no longer overrides instantiatedType.

- InstantianteImmediates.prototype.visitTypeRef now does what TypeRef's instantiatedType would
  have done.

And voila! This test case passes and so do all of the other test cases.

The reason why that specific test case did not work was that the use of a TypeDef (int2) for
a generic type instantiation (vec2<int>) caused there to be two TypeRef's in a row, sorta like
this, if we could use wrap() to denote a TypeRef that just wrapped another type:

    wrap(vec2<int>)

We would call instantiatedType on this monstrosity. Since TypeRef overrode instantiatedType,
we would stop there because that TypeRef has no type arguments - it's just a wrapper. Well,
actually, we'd do something a bit stranger than stopping there - there's more to the story -
but the effect was the same. Now we do InstantiateImmediates, which recursively builds a new
type. This chews through the wrapper and then instantiates the wrapped type, as we want it to.
Also, this approach no longer has the stink. instantiatedType isn't overriden by anyone
anymore!

* WebGPUShadingLanguageRI/Checker.js:
* WebGPUShadingLanguageRI/InstantiateImmediates.js:
(InstantiateImmediates.prototype.visitTypeRef):
(InstantiateImmediates.prototype.visitReferenceType): Deleted.
* WebGPUShadingLanguageRI/Test.js:
(TEST_instantiateStructInStructWithInt2):
* WebGPUShadingLanguageRI/TypeRef.js:
(TypeRef.wrap):
(TypeRef.prototype.setTypeAndArguments):
(TypeRef.prototype.toString):
(TypeRef):
(TypeRef.prototype.get instantiatedType): Deleted.

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

2 years agoREGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
commit-queue@webkit.org [Tue, 19 Sep 2017 16:03:09 +0000 (16:03 +0000)]
REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
https://bugs.webkit.org/show_bug.cgi?id=177114
<rdar://problem/34505265>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-19
Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WI.loaded):
We need to register the settings change handler regardless of what the
initial value of the setting is.

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

2 years agowebrtc/video-rotation.html is failing and now occasionally times out.
commit-queue@webkit.org [Tue, 19 Sep 2017 15:53:01 +0000 (15:53 +0000)]
webrtc/video-rotation.html is failing and now occasionally times out.
https://bugs.webkit.org/show_bug.cgi?id=175305

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-19
Reviewed by Alex Christensen.

* TestExpectations: Marking test as passing.
* webrtc/video-rotation-expected.txt:
* webrtc/video-rotation.html: Removing unneded subtest. Purpose of the test is checking that rotation change video size.

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

2 years agoLayoutTest webrtc/video-getParameters.html is failing
commit-queue@webkit.org [Tue, 19 Sep 2017 15:51:50 +0000 (15:51 +0000)]
LayoutTest webrtc/video-getParameters.html is failing
https://bugs.webkit.org/show_bug.cgi?id=170148

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-19
Reviewed by Alex Christensen.

* TestExpectations: Marking test as passing.
* webrtc/video-getParameters.html: Further sanitizing parameters against changes.

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

2 years ago[Win] WebKit fails to build with 64-bit Perl.
pvollan@apple.com [Tue, 19 Sep 2017 15:00:16 +0000 (15:00 +0000)]
[Win] WebKit fails to build with 64-bit Perl.
https://bugs.webkit.org/show_bug.cgi?id=177106

Reviewed by Brent Fulgham.

Visual Studio is installed in the 32-bit program files folder.

* Scripts/webkitdirs.pm:
(programFilesPathX86):
(visualStudioInstallDir):
(msBuildInstallDir):

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

2 years ago[GTK] The binding code of Media Source Extension of AudioTrack, VideoTrack and TextTr...
nael.ouedraogo@crf.canon.fr [Tue, 19 Sep 2017 09:00:15 +0000 (09:00 +0000)]
[GTK] The binding code of Media Source Extension of AudioTrack, VideoTrack and TextTrack is not generated
https://bugs.webkit.org/show_bug.cgi?id=174620

Reviewed by Michael Catanzaro.

LayoutTests/imported/w3c:

Fix WPT test that checks MSE interfaces. This test failed since webm is not supported for MSE in GTK port.
Already merged in WPT repository (https://github.com/w3c/web-platform-tests/pull/6531).

* web-platform-tests/media-source/interfaces.html:

Source/WebCore:

Add AudioTrackMediaSource, VideoTrackMediaSource and TextTrackMediaSource IDL files in CMakeLists. Fix WPT test
that checks MSE interfaces. This test failed since webm is not supported for MSE in GTK port. PR already merged
in WPT repository.

Remove skipped test that is now passing in TestExpectation. Modify expected file for GTK (same as mac).

* CMakeLists.txt:

LayoutTests:

Add AudioTrackMediaSource, VideoTrackMediaSource and TextTrackMediaSource IDL files in CMakeLists. Fix WPT test
that checks MSE interfaces. This test failed since webm is not supported for MSE in GTK port. PR already merged
in WPT repository.

Remove skipped test that is now passing in TestExpectation. Modify expected file for GTK (same as mac).

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt: Added.

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

2 years agoWebDriver: wrong key name for capabilities in new session response
carlosgc@webkit.org [Tue, 19 Sep 2017 06:41:42 +0000 (06:41 +0000)]
WebDriver: wrong key name for capabilities in new session response
https://bugs.webkit.org/show_bug.cgi?id=177074

Reviewed by Brian Burg.

We are using "value", it should be "capabilities".
https://w3c.github.io/webdriver/webdriver-spec.html#new-session

* WebDriverService.cpp:
(WebDriver::WebDriverService::newSession):

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

2 years agoWebDriver: HTTP responses should include Cache-Control header with no-cache value
carlosgc@webkit.org [Tue, 19 Sep 2017 06:40:01 +0000 (06:40 +0000)]
WebDriver: HTTP responses should include Cache-Control header with no-cache value
https://bugs.webkit.org/show_bug.cgi?id=177073

Reviewed by Sergio Villar Senin.

6.3 Processing Model.
Set the response‚Äôs header with name and value with the following values:

Content-Type "application/json; charset=utf-8"
Cache-Control "no-cache"

https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response

We were setting the Content-Type, but not the Cache-Control. This is checked by all WPT WebDriver tests.

* soup/HTTPServerSoup.cpp:
(WebDriver::HTTPServer::listen): Add Cache-Control header.

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

2 years ago[Harfbuzz] adjustSelectionRectForComplexText() should also pass the character range...
carlosgc@webkit.org [Tue, 19 Sep 2017 06:35:27 +0000 (06:35 +0000)]
[Harfbuzz] adjustSelectionRectForComplexText() should also pass the character range when shaping
https://bugs.webkit.org/show_bug.cgi?id=177049

Reviewed by Michael Catanzaro.

Now that the shaper support receiving a range we should use that also in
adjustSelectionRectForComplexText(). This will ensure consistent results with
getGlyphsAndAdvancesForComplexText().

* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::adjustSelectionRectForComplexText const):

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

2 years ago[WSL] Cannot put templated structs inside structs
fpizlo@apple.com [Tue, 19 Sep 2017 04:15:56 +0000 (04:15 +0000)]
[WSL] Cannot put templated structs inside structs
https://bugs.webkit.org/show_bug.cgi?id=177120

Reviewed by Myles Maxfield.

It turns out that we still need to instantiate structs even if not passing type arguments,
since its fields may need to be instantiated.

This makes Myles's test case pass. When writing the test case, I encountered parser bugs, and
I fixed them.

* WebGPUShadingLanguageRI/CallFunction.js:
(callFunction):
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitReferenceType):
* WebGPUShadingLanguageRI/FuncInstantiator.js:
(FuncInstantiator.prototype.getUnique):
(FuncInstantiator):
* WebGPUShadingLanguageRI/Parse.js:
(parseSuffixOperator):
(parsePossibleSuffix):
(parsePostIncrement):
* WebGPUShadingLanguageRI/StructType.js:
(StructType.prototype.instantiate):
* WebGPUShadingLanguageRI/Test.js:
(checkNumber):
(checkEnum):
(TEST_instantiateStructInStruct):
* WebGPUShadingLanguageRI/TypeRef.js:
(TypeRef.prototype.get instantiatedType):
(TypeRef.prototype.get isPrimitive):

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

2 years agoWSL should support enum
fpizlo@apple.com [Tue, 19 Sep 2017 03:44:25 +0000 (03:44 +0000)]
WSL should support enum
https://bugs.webkit.org/show_bug.cgi?id=176977

Reviewed by Myles Maxfield.

This implements enum. Enums members are referenced Java-style. For example, if we have an enum like:

    enum Bank {
        GP,
        FP
    }

Then you refer to the members by saying Bank.GP and Bank.FP.

Also adds a hack that makes operator- on a literal fold the literal. This fixes two issues:

- Lets you use negative literals in constexprs.
- Means that negative literals also get literal type unification.

WSL's constexpr support is really thin, but I think it's all we really need for now.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitEnumType):
(Checker.prototype.visitEnumLiteral):
* WebGPUShadingLanguageRI/ConstexprFolder.js: Added.
(ConstexprFolder.prototype.visitCallExpression):
(ConstexprFolder.prototype.visitTypeOrVariableRef):
(ConstexprFolder):
* WebGPUShadingLanguageRI/CreateLiteral.js:
(createLiteral.GenericLiteral.prototype.get valueForSelectedType):
(createLiteral.GenericLiteral.prototype.get negConstexpr):
* WebGPUShadingLanguageRI/DoubleLiteral.js:
(let.DoubleLiteral.createLiteral.negConstexpr):
* WebGPUShadingLanguageRI/EBufferBuilder.js:
(EBufferBuilder.prototype.visitEnumLiteral):
* WebGPUShadingLanguageRI/EnumLiteral.js: Added.
(EnumLiteral):
(EnumLiteral.prototype.get member):
(EnumLiteral.prototype.get type):
(EnumLiteral.prototype.get isConstexpr):
(EnumLiteral.prototype.unifyImpl):
(EnumLiteral.prototype.toString):
* WebGPUShadingLanguageRI/EnumMember.js: Added.
(EnumMember):
(EnumMember.prototype.get origin):
(EnumMember.prototype.get name):
(EnumMember.prototype.toString):
* WebGPUShadingLanguageRI/EnumType.js: Added.
(EnumType):
(EnumType.prototype.add):
(EnumType.prototype.get origin):
(EnumType.prototype.get name):
(EnumType.prototype.get baseType):
(EnumType.prototype.get memberNames):
(EnumType.prototype.memberByName):
(EnumType.prototype.get members):
(EnumType.prototype.get memberMap):
(EnumType.prototype.get isPrimitive):
(EnumType.prototype.populateDefaultValue):
(EnumType.prototype.get size):
(EnumType.prototype.toString):
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitGenericLiteral):
(Evaluator.prototype.visitEnumLiteral):
* WebGPUShadingLanguageRI/FloatLiteral.js:
(let.FloatLiteral.createLiteral.negConstexpr):
* WebGPUShadingLanguageRI/FoldConstexprs.js: Added.
(foldConstexprs):
* WebGPUShadingLanguageRI/IntLiteral.js:
(let.IntLiteral.createLiteral.negConstexpr):
* WebGPUShadingLanguageRI/Intrinsics.js:
(Intrinsics):
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitProtocolDecl):
* WebGPUShadingLanguageRI/Parse.js:
(parseConstexpr):
(parsePossibleSuffix):
(parseEnumMember):
(parseEnumType):
(parse):
* WebGPUShadingLanguageRI/Prepare.js:
(prepare):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitEnumType):
(Rewriter.prototype.visitEnumMember):
(Rewriter.prototype.visitEnumLiteral):
* WebGPUShadingLanguageRI/StructType.js:
(StructType.prototype.get origin):
(StructType.prototype.instantiate):
* WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Added.
(synthesizeEnumFunctions):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(checkEnum):
(TEST_simpleEnum):
(TEST_enumWithManualValues):
(TEST_enumWithoutZero):
(TEST_enumConstexprGenericFunction):
(TEST_enumConstexprGenericStruct):
* WebGPUShadingLanguageRI/UintLiteral.js:
(let.UintLiteral.createLiteral.negConstexpr):
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitProtocolDecl):

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

2 years agoWSL prepare() should cache the parsed standard library
fpizlo@apple.com [Tue, 19 Sep 2017 03:19:22 +0000 (03:19 +0000)]
WSL prepare() should cache the parsed standard library
https://bugs.webkit.org/show_bug.cgi?id=177118

Reviewed by Myles Maxfield.

The execution time of Test.js is too damn high!

So I made it 2x faster by caching the parsed standard library.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CloneProgram.js: Added.
(cloneProgram):
* WebGPUShadingLanguageRI/Prepare.js:
(let.prepare):
(prepare): Deleted.
* WebGPUShadingLanguageRI/StatementCloner.js: Added.
(StatementCloner.prototype.visitFuncDef):
(StatementCloner.prototype.visitNativeFunc):
(StatementCloner.prototype.visitNativeType):
(StatementCloner.prototype.visitTypeDef):
(StatementCloner.prototype.visitStructType):
(StatementCloner.prototype.visitConstexprTypeParameter):
(StatementCloner.prototype.visitProtocolDecl):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(doTest):

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

2 years ago[WebGL] VideoTextureCopierCV doesn't correctly restore vertex attribute state
dino@apple.com [Tue, 19 Sep 2017 02:55:33 +0000 (02:55 +0000)]
[WebGL] VideoTextureCopierCV doesn't correctly restore vertex attribute state
https://bugs.webkit.org/show_bug.cgi?id=176771
<rdar://problem/34386621>

Reviewed by Antoine Quint.

Source/WebCore:

The OpenGL context in VideoTextureCopierCV wasn't being restored to
the state it had before rendering a video to a texture. Specifically
the vertex attribute values were never recorded by the state saver.

Update the existing test of VideoTextureCopierCV so that it is
explicitly doing something different from the WebCore code, which
means that state will have to be correctly restored for the test
to pass.

* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture): Make sure
to record the vertex attribute state once we know the location of the position attribute.
(WebCore::VideoTextureCopierCV::GC3DStateSaver::GC3DStateSaver):
(WebCore::VideoTextureCopierCV::GC3DStateSaver::~GC3DStateSaver):
(WebCore::VideoTextureCopierCV::GC3DStateSaver::saveVertexAttribState): Save all the
applicable vertex attribute state information.
* platform/graphics/cv/VideoTextureCopierCV.h: GC3DStateSaver can use a reference
to the GC3D rather than a pointer.

LayoutTests:

Tweak this test to make sure it does something different from
the code in WebCore to render a video into a texture, thus
ensuring that we're testing state is correctly restored.

* fast/canvas/webgl/texImage2D-video-flipY-true.html:

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