WebKit.git
2 years agowebkit-patch: Passing --no-review should submit patch to EWS by default
dbates@webkit.org [Mon, 14 Aug 2017 21:14:10 +0000 (21:14 +0000)]
webkit-patch: Passing --no-review should submit patch to EWS by default
https://bugs.webkit.org/show_bug.cgi?id=148899

Reviewed by David Kilzer.

Make "webkit-patch upload --no-review" and "webkit-patch post-commits --no-review" submit
the patch(es) for EWS analysis by default. Add a new optional command line argument, --no-ews,
to these commands to not submit a non-reviewed patch(es) for EWS analysis.

Frequently I want to post a draft of a patch without review to have the EWS bots process
it to catch build and test breakage before I clean it up and post it for formal review.
Currently this requires using "webkit-patch upload --no-review --open-bug" to upload the
patch and open the bug in Safari so that I can click the Submit for EWS analysis button.
We should teach "webkit-patch upload" and "webkit-patch post-commits" how to do this.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._parse_attachment_id_from_add_patch_to_bug_response): Add helper function to
parse the attachment id from the response page after adding an attachment to the bug.
(Bugzilla.add_patch_to_bug): Modified to parse and return the attachment id from the
HTTP response after uploading the patch.
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzilla.add_patch_to_bug): Return a dummy attachment id for testing purposes.
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
(test__parse_attachment_id_from_add_patch_to_bug_response): Added.
* Scripts/webkitpy/tool/commands/upload.py:
(Upload): Add step SubmitToEWS to the list of steps when uploading a patch.
(PostCommits.__init__): Add --no-ews option to the list of applicable option flags for
this command.
(PostCommits.execute): Submit the patch to EWS, if applicable.
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(test_upload): Set options.ews to False as the upload command expects this option
to be specified.
(test_upload_with_no_review_and_ews): Added.
* Scripts/webkitpy/tool/steps/__init__.py: Import module SubmitToEWS.
* Scripts/webkitpy/tool/steps/options.py:
(Options): Added command line option --no-ews (defaults: False - submit to EWS).
* Scripts/webkitpy/tool/steps/postdiff.py:
(PostDiff.options): Add --no-ews option to the list of applicable option flags for
this command.
(PostDiff.run): Submit the patch to EWS, if applicable.
* Scripts/webkitpy/tool/steps/submittoews.py: Added.
(SubmitToEWS):
(SubmitToEWS.options): Return an empty array as we this step does not have any command line options.
(SubmitToEWS.run): Submit the specified attachment ids for EWS analysis.

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

2 years ago[css-ui] Implement caret-color support
dbates@webkit.org [Mon, 14 Aug 2017 19:28:33 +0000 (19:28 +0000)]
[css-ui] Implement caret-color support
https://bugs.webkit.org/show_bug.cgi?id=166572
<rdar://problem/33852589>

Update GTK expected results following r220706.

* platform/gtk/editing/style/5065910-expected.txt:
* platform/gtk/editing/style/5084241-expected.txt:

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

2 years ago[WPE] Implement WebCore::standardUserAgent()
aperez@igalia.com [Mon, 14 Aug 2017 18:42:26 +0000 (18:42 +0000)]
[WPE] Implement WebCore::standardUserAgent()
https://bugs.webkit.org/show_bug.cgi?id=175507

Reviewed by Michael Catanzaro.

Remove "_GLIB" from user-agent version macros.

.:

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

* platform/glib/UserAgentGLib.cpp:
(WebCore::versionForUAString):

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

2 years agoPut the ScopedArgumentsTable's ScopeOffset array in some gigacage
fpizlo@apple.com [Mon, 14 Aug 2017 18:33:16 +0000 (18:33 +0000)]
Put the ScopedArgumentsTable's ScopeOffset array in some gigacage
https://bugs.webkit.org/show_bug.cgi?id=174921

Reviewed by Mark Lam.

Source/JavaScriptCore:

Uses CagedUniquePtr<> to cage the ScopeOffset array.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitScopedArgumentsGetByVal):
* runtime/ScopedArgumentsTable.cpp:
(JSC::ScopedArgumentsTable::create):
(JSC::ScopedArgumentsTable::setLength):
* runtime/ScopedArgumentsTable.h:

Source/WTF:

If you want to std::unique_ptr a class that knows that it should be in the Gigacage, then we
would create the Gigacage equivalent of WTF_MAKE_FAST_ALLOCATED and it would just work.

But this does not work if we want to std::unique_ptr a primitive type. So, this patch adds a
solution for this problem: CagedUniquePtr<>. This will handle allocation
(CagedUniquePtr<>::create()) and deallocation (in the style of std::unique_ptr). It has three
variants:

- Non-array types.
- Arrays that don't have destructors.
- Arrays that have destructors.

Just like std::unique_ptr, the array case is triggered by saying "[]" at the end of the type.

Unlike std::unique_ptr and most other smart pointers, the whole point of this smart pointer is
to dictate where the thing you're pointing at is allocated. For this reason, it has to know how
to do things like the array destructor protocol. So it creates its own: the CagedUniquePtr for
arrays with destructors is a fat pointer that remembers the length of the array.

CagedUniquePtr<> makes it impossible to leak/release the pointer. This is stricter than what
std::unique_ptr does, and is probably appropriate for all of the places where we would use this
type.

So far, we only use it for ScopedArgumentsTable::m_arguments, but I suspect that it will be
useful in other places.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CagedUniquePtr.h: Added.
(WTF::CagedUniquePtr::CagedUniquePtr):
(WTF::CagedUniquePtr::create):
(WTF::CagedUniquePtr::operator=):
(WTF::CagedUniquePtr::~CagedUniquePtr):
(WTF::CagedUniquePtr::get const):
(WTF::CagedUniquePtr::getMayBeNull const):
(WTF::CagedUniquePtr::operator== const):
(WTF::CagedUniquePtr::operator!= const):
(WTF::CagedUniquePtr::operator bool const):
(WTF::CagedUniquePtr::operator* const):
(WTF::CagedUniquePtr::operator-> const):
(WTF::CagedUniquePtr::operator[] const):
(WTF::CagedUniquePtr::destroy):
* wtf/Gigacage.cpp:
(Gigacage::tryMallocArray):
(Gigacage::malloc):
(Gigacage::mallocArray):
* wtf/Gigacage.h:

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

2 years agoDisable two flaky VideoControlsManager API tests.
ryanhaddad@apple.com [Mon, 14 Aug 2017 18:32:28 +0000 (18:32 +0000)]
Disable two flaky VideoControlsManager API tests.

Unreviewed test gardening.

* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):

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

2 years agoWeb Inspector: Remove text-shadow and gradient backgrounds
mattbaker@apple.com [Mon, 14 Aug 2017 17:56:56 +0000 (17:56 +0000)]
Web Inspector: Remove text-shadow and gradient backgrounds
https://bugs.webkit.org/show_bug.cgi?id=175430

Reviewed by Brian Burg.

Inspector should more closely match flat system look. Remove text-shadow
embossing and replace linear gradients in popover backgrounds and selected
tree item background color.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label):
* UserInterface/Views/CompletionSuggestionsView.css:
(.completion-suggestions-container:not(:active) > .item.selected,):
* UserInterface/Views/DebuggerDashboardView.css:
(.toolbar .dashboard.debugger):
* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component > .title):
* UserInterface/Views/Main.css:
(.bouncy-highlight):
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content .empty-content-placeholder > .message):
* UserInterface/Views/Popover.js:
(WI.Popover.prototype._drawBackground):
* UserInterface/Views/RecordingTraceDetailsSidebarPanel.css:
(.sidebar > .details.recording-trace > .content > .no-trace-data > .message):
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .label):
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message):
(@media (-webkit-min-device-pixel-ratio: 2)): Deleted.
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules .label.filter-matching-label,): Deleted.
* UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css:
(.style-spreadsheet .inherited):
* UserInterface/Views/TimelineDataGrid.css:
(.tree-outline.timeline-data-grid .item:hover):
* UserInterface/Views/TimelineDataGrid.js:
(WI.TimelineDataGrid.prototype._createPopoverContent):
* UserInterface/Views/Variables.css:
(:root):

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

2 years agoOnly create directory and sandbox extension handle for storage directories if they...
timothy_horton@apple.com [Mon, 14 Aug 2017 17:56:47 +0000 (17:56 +0000)]
Only create directory and sandbox extension handle for storage directories if they are set
https://bugs.webkit.org/show_bug.cgi?id=175522

Reviewed by Brady Eidson.

Source/WebKit:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
If using a non-persistent WebsiteDataStore, all the storage directories
are unset, but we still try to create them and make sandbox extensions
for them. This has no effect except a ton of noisy logging, but that
is reason enough to stop.

This is similar to r216053, but for more directories.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewDoesNotLogDuringInitialization.mm: Added.
(TEST):
Add a test that making a WKWebView with an ephemeral WKWebsiteDataStore
doesn't log anything to stderr.

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

2 years agosub-categorize Sandbox violation logs
jbedard@apple.com [Mon, 14 Aug 2017 17:44:35 +0000 (17:44 +0000)]
sub-categorize Sandbox violation logs
https://bugs.webkit.org/show_bug.cgi?id=175536
<rdar://problem/33834416>

Reviewed by David Kilzer.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs._parse_darwin_crash_log): Add 'Sandbox-' to the log name if the log is
a Sandbox violation.
(CrashLogs._find_all_logs_darwin): Update comment.
* Scripts/webkitpy/common/system/crashlogs_unittest.py:
(make_mock_sandbox_report_darwin): Create a Sandbox violation log for testing.
(CrashLogsTest.create_crash_logs_darwin): Add Sandbox violation to list of crashes.
(CrashLogsTest.test_find_all_log_darwin): 8 logs in testing instead of 7.
(CrashLogsTest.test_duplicate_log_darwin): Check for Sandbox violation log.
* Scripts/webkitpy/port/darwin.py:
(DarwinPort._merge_crash_logs): Handle Sandbox violation case.

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

2 years agoUnreviewed, rollout r220622 & r220696
cdumez@apple.com [Mon, 14 Aug 2017 17:42:09 +0000 (17:42 +0000)]
Unreviewed, rollout r220622 & r220696
https://bugs.webkit.org/show_bug.cgi?id=175482
<rdar://problem/33860695>

Seems to have caused failures on iOS.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
* web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
* web-platform-tests/fetch/http-cache/cc-request-expected.txt:

Source/WebCore:

* CMakeLists.txt:
* Modules/beacon/NavigatorBeacon.cpp:
(WebCore::NavigatorBeacon::sendBeacon):
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
(WebCore::FetchBodyOwner::BlobLoader::didFail):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::start):
(WebCore::FetchLoader::didFail):
* Modules/fetch/FetchLoaderClient.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didFail):
* Modules/fetch/FetchResponse.h:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::finishLoading):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):
* loader/cache/CachedResourceLoader.h:
* loader/cache/KeepaliveRequestTracker.cpp: Removed.
* loader/cache/KeepaliveRequestTracker.h: Removed.
* platform/network/FormData.cpp:
(WebCore::FormData::appendFile):
(WebCore::FormData::appendFileRange):
(WebCore::FormData::appendBlob):
(WebCore::FormData::expandDataStore):
* platform/network/FormData.h:

LayoutTests:

* fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt:
* http/tests/contentextensions/async-xhr-onerror-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
* http/wpt/beacon/beacon-quota-expected.txt: Removed.
* http/wpt/beacon/beacon-quota.html: Removed.
* inspector/worker/resources-in-worker-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:

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

2 years ago[css-ui] Implement caret-color support
dbates@webkit.org [Mon, 14 Aug 2017 17:29:34 +0000 (17:29 +0000)]
[css-ui] Implement caret-color support
https://bugs.webkit.org/show_bug.cgi?id=166572
<rdar://problem/33852589>

Reviewed by David Hyatt.

Source/WebCore:

Add support for the CSS property caret-color as per <https://www.w3.org/TR/css-ui-3/#caret-color> (02 March 2017).
The property caret-color specifies the color of the text insertion caret in an editable element,
say an HTML textarea element.

Unlike other CSS color properties caret-color can have value "auto" and this is its initial
value. Internally we treat value "auto" as an invalid caret color to simplify the code.

Tests: editing/pasteboard/preserve-caret-color.html
       fast/css/caret-color-auto.html
       fast/css/caret-color-fallback-to-color.html
       fast/css/caret-color-inherit.html
       fast/css/caret-color-span-inside-editable-parent.html
       fast/css/caret-color.html
       fast/history/visited-link-caret-color.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json: Add property caret-color. We represent the initial  "auto" Also, fix up
wording in a comment while I am here.
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty): Add caret-color to the list of properties that can be
applied to visited hyperlinks.
* css/parser/CSSParserFastPaths.cpp:
(WebCore::parseCaretColor): Added.
(WebCore::CSSParserFastPaths::maybeParseValue): Unlike other CSS color properties caret-color
can be defined to be "auto". We explicitly check if the property is caret-color and use
parseCaretColor() to parse its value.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeCaretColor): Added.
(WebCore::CSSPropertyParser::parseSingleValue): Similar to the change to CSSParserFastPaths::maybeParseValue()
use a dedicated code path to parse caret-color.
* editing/EditingStyle.cpp: Preserve caret-color during editing operations.
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret const): Modified code to query property caret-color instead of
color for the color of the text insertion caret. Always honor the caret-color of the editable
element if it is valid color. Note that "caret-color: auto" is treated as an invalid color
internally. A caret-color can have an invalid color if its inherits from the CSS color property
with an invalid color. If caret-color is a valid color then we take it to be the color of the
text insertion caret. Otherwise, we do what we do today and use a heuristic to determine the
color of the text-insertion caret.
(WebCore::disappearsIntoBackground): Deleted; moved logic into CaretBase::paintCaret().
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add property wrapper
to support animating caret-color.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const): Modified to consider
changes to caret color.
(WebCore::RenderStyle::colorIncludingFallback const): Modified to compute the appropriate
color for property caret-color with respect to an unvisited or visited link.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setCaretColor): Added.
(WebCore::RenderStyle::setVisitedLinkCaretColor): Added.
(WebCore::RenderStyle::caretColor const): Added.
(WebCore::RenderStyle::visitedLinkCaretColor const): Added.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Modified to consider caret color.
(WebCore::StyleRareInheritedData::operator== const): Ditto.
* rendering/style/StyleRareInheritedData.h:

LayoutTests:

Add reference tests to ensure that we do not regress CSS property caret-color.

* TestExpectations: Unskip Web Platform Tests that now pass.
* editing/deleting/maintain-style-after-delete-expected.txt: Updated expected result.
* editing/inserting/insert-paragraph-with-font-and-background-color-expected.txt: Ditto.
* editing/pasteboard/do-not-copy-unnecessary-styles-2-expected.txt: Ditto.
* editing/pasteboard/onpaste-text-html-expected.txt: Ditto.
* editing/pasteboard/preserve-caret-color-expected.txt: Added.
* editing/pasteboard/preserve-caret-color.html: Added.
* editing/pasteboard/preserve-underline-color-expected.txt:
* fast/css/caret-color-auto-expected.html: Added.
* fast/css/caret-color-auto.html: Added.
* fast/css/caret-color-expected.html: Added.
* fast/css/caret-color-fallback-to-color-expected.html: Added.
* fast/css/caret-color-fallback-to-color.html: Added.
* fast/css/caret-color-inherit-expected.html: Added.
* fast/css/caret-color-inherit.html: Added.
* fast/css/caret-color-span-inside-editable-parent-expected.html: Added.
* fast/css/caret-color-span-inside-editable-parent.html: Added.
* fast/css/caret-color.html: Added.
* fast/events/before-input-events-prevent-drag-and-drop-expected.txt: Updated expected result.
* fast/events/input-events-paste-rich-datatransfer-expected.txt: Ditto.
* fast/events/ondrop-text-html-expected.txt: Ditto.
* fast/history/visited-link-caret-color-expected.html: Added.
* fast/history/visited-link-caret-color.html: Added.
* platform/ios/TestExpectations: Skip the tests on iOS as iOS does not enable
ENABLE(TEXT_CARET). UIKit renders the text insertion caret on iOS.
* platform/mac/editing/style/5065910-expected.txt: Updated expected result.
* platform/mac/editing/style/5084241-expected.png: Ditto.
* platform/mac/editing/style/5084241-expected.txt: Ditto.
* platform/ios-wk2/editing/style/5084241-expected.txt: Ditto.

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

2 years agoAdd Automator service to copy permalink to Clipboard
dbates@webkit.org [Mon, 14 Aug 2017 17:25:18 +0000 (17:25 +0000)]
Add Automator service to copy permalink to Clipboard
https://bugs.webkit.org/show_bug.cgi?id=170978

Reviewed by Joseph Pecoraro.

It is helpful to reference using a hyperlink a particular line of code when having
a discussion on IRC or in a bug. You can get such a link by navigating to the file
in the Trac Browse Source viewer and selecting the line your are interested in.
I found myself doing this often enough that I wrote an Automator service to do it
for me.

This Automator service works with Xcode 8 and Xcode 9 beta 5 (9M202q) or later.

* CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist: Added.
* CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow: Added.
* CopyPermalink/README: Added.

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

2 years agoAddress flakiness related to download tests
cdumez@apple.com [Mon, 14 Aug 2017 17:09:41 +0000 (17:09 +0000)]
Address flakiness related to download tests
https://bugs.webkit.org/show_bug.cgi?id=175338
<rdar://problem/33865119>

Unreviewed, forgot in r220626 to reset m_shouldLogDownloadCallbacks to false
between tests.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

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

2 years agoGardening: fix Windows build.
mark.lam@apple.com [Mon, 14 Aug 2017 16:41:47 +0000 (16:41 +0000)]
Gardening: fix Windows build.
https://bugs.webkit.org/show_bug.cgi?id=175446

Not reviewed.

* assembler/MacroAssemblerX86Common.cpp:
(JSC::booleanTrueForAvoidingNoReturnDeclaration):
(JSC::ctiMasmProbeTrampoline):

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

2 years ago[CoordGraphics] Simplify CoordinatedGraphicsScene state updates
zandobersek@gmail.com [Mon, 14 Aug 2017 16:41:18 +0000 (16:41 +0000)]
[CoordGraphics] Simplify CoordinatedGraphicsScene state updates
https://bugs.webkit.org/show_bug.cgi?id=175528

Reviewed by Carlos Garcia Campos.

Hold the information about state updates in ThreadedCompositor, in the
m_attributes struct. This way we don't need to store the updates in
functors and accumulate them in the CoordinatedGraphicsScene class, but
instead just apply any pending state update or atlas removal before the
scene is rendered.

This removes the need to update the CoordinatedGraphicsScene object from
the main thread with data that ultimately has to be handled on the
composition thread. Similarly, when updating CoordinatedGraphicsScene, we
only need to synchronize on the m_attributes lock object once in order to
retrieve the scene update information, instead of having each functor do
that repeatedly.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::applyStateChanges):
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::detach):
(WebKit::CoordinatedGraphicsScene::setActive):
(WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted.
(WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::renderLayerTree):
(WebKit::ThreadedCompositor::updateSceneState):
(WebKit::ThreadedCompositor::releaseUpdateAtlases):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

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

2 years agoREGRESSION(r220517-r220521) [GTK] Various compositing tests fail
zandobersek@gmail.com [Mon, 14 Aug 2017 16:37:01 +0000 (16:37 +0000)]
REGRESSION(r220517-r220521) [GTK] Various compositing tests fail
https://bugs.webkit.org/show_bug.cgi?id=175478

Reviewed by Sergio Villar Senin.

Source/WebCore:

Fix a regression introduced in r220519. Move a framebuffer binding in TextureMapperGL
away from GraphicsContext3D and onto the OpenGL API to work around the framebuffer
binding state that's kept in the GraphicsContext3D class. This mismatch in how the
framebuffer was bound was causing a couple of test failures in compositing tests.

No new tests -- regressed tests have their failure expectations removed.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::bindDefaultSurface): Don't use GraphicsContext3D for the
glBindFramebuffer() call. This would be done in subsequent patches that would move
TextureMapperGL off the GraphicsContext3D usage, but this specific use case clashes
with the framebuffer binding that's done in BitmapTextureGL and was causing test
failures.

LayoutTests:

* platform/gtk/TestExpectations: Remove failure and flakiness expectations.

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

2 years agoUnreviewed fix after r220622 to address crashes on iOS.
cdumez@apple.com [Mon, 14 Aug 2017 15:54:12 +0000 (15:54 +0000)]
Unreviewed fix after r220622 to address crashes on iOS.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::finishLoading):

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

2 years ago[GTK][WPE] Avoid emitting WebKitFaviconDatabase::favicon-changed multiple times while...
carlosgc@webkit.org [Mon, 14 Aug 2017 15:44:02 +0000 (15:44 +0000)]
[GTK][WPE] Avoid emitting WebKitFaviconDatabase::favicon-changed multiple times while setting an icon
https://bugs.webkit.org/show_bug.cgi?id=175531

Reviewed by Michael Catanzaro.

When webkitFaviconDatabaseSetIconForPageURL() is called, both setIconURLForPageURL() and setIconDataForIconURL()
might notify the client, which ends up emitting the WebKitFaviconDatabase::favicon-changed signal and calling
webkitFaviconDatabaseSetIconURLForPageURL(). Both things are already done by
webkitFaviconDatabaseSetIconForPageURL() itself, so we can just ignore the client notification while setting a
new icon.

* UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(webkitFaviconDatabaseSetIconURLForPageURL): Return early if isSettingIcon is true.
(webkitFaviconDatabaseSetIconForPageURL): Set isSettingIcon to true for the scope.

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

2 years agoFactor text autosizing into a class
antti@apple.com [Mon, 14 Aug 2017 13:20:47 +0000 (13:20 +0000)]
Factor text autosizing into a class
https://bugs.webkit.org/show_bug.cgi?id=175530

Reviewed by Andreas Kling.

Move the remaining parts out of Document.

* css/StyleBuilderCustom.h:
(WebCore::computeLineHeightMultiplierDueToFontSize):
* dom/Document.cpp:
(WebCore::Document::destroyRenderTree):
(WebCore::Document::textAutoSizing):
(WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
(WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.
(WebCore::Document::addAutoSizedNode): Deleted.
(WebCore::Document::updateAutoSizedNodes): Deleted.
(WebCore::Document::clearAutoSizedNodes): Deleted.
* dom/Document.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustComputedFontSizes):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
(WebCore::RenderElement::resetTextAutosizing):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingTraits::constructDeletedValue):
(WebCore::TextAutoSizingTraits::isDeletedValue):
(WebCore::TextAutoSizing::addTextNode):
(WebCore::TextAutoSizing::updateRenderTree):
(WebCore::TextAutoSizing::reset):
* rendering/TextAutoSizing.h:

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

2 years agoGTK-focused gardening.
commit-queue@webkit.org [Mon, 14 Aug 2017 12:28:51 +0000 (12:28 +0000)]
GTK-focused gardening.
https://bugs.webkit.org/show_bug.cgi?id=175529

Unreviewed test gardening.

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-14

* http/wpt/css/css-pseudo-4/marker-font-properties-expected.html: Set line-height for more reliable rendering.
* http/wpt/css/css-pseudo-4/marker-font-properties.html: Set line-height for more reliable rendering.
* media/video-fullscreen-restriction-removed-expected.txt: DOMException's toString was changed in r219663; rebaseline. (The test is marked as flaky on mac.)
* platform/gtk/TestExpectations:
* platform/gtk/http/tests/dom/document-attributes-null-handling-expected.txt: SecurityError got a new message in r220376; rebaseline.
* platform/gtk/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt: Added: GTK does not yet enable the in-progress ServiceWorker implementation.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt: TypeError got a new message in r220622; rebaseline.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt: Added: TypeError uses a different message on GTK.

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

2 years ago[GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
carlosgc@webkit.org [Mon, 14 Aug 2017 11:12:23 +0000 (11:12 +0000)]
[GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
https://bugs.webkit.org/show_bug.cgi?id=175527

Reviewed by Žan Doberšek.

The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might
be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database.

* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::IconRecord::setImageData): Return early if passed in buffer is nullptr.

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

2 years ago[ThreadedCompositor] Improve composition and update state handling
zandobersek@gmail.com [Mon, 14 Aug 2017 10:23:35 +0000 (10:23 +0000)]
[ThreadedCompositor] Improve composition and update state handling
https://bugs.webkit.org/show_bug.cgi?id=172448

Reviewed by Carlos Garcia Campos.

In the ThreadedCompositor and related classes, we now track composition
and scene update states separately. This enables properly piping in the
DisplayRefreshMonitor object, leveraging it for both display refresh
notifications and signalling to the client that the scene update is
completed.

In CompositingRunLoop, two separate states are now used, one for
compositing and the other for scene update. Access to both should be done
while the related Lock object is held. The pending update state is also
tracked in order to schedule any required updates as soon as the current
state update is completed.

In ThreadedCompositor, the information about client notification and
update completion coordination is now also kept under a Lock object,
moving away from atomics. DisplayRefreshMonitor can now utilize just
two methods in order to either schedule an update or report that update
as finished.

* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop):
(WebKit::CompositingRunLoop::scheduleUpdate):
(WebKit::CompositingRunLoop::stopUpdates):
(WebKit::CompositingRunLoop::compositionCompleted):
(WebKit::CompositingRunLoop::updateCompleted):
(WebKit::CompositingRunLoop::updateTimerFired):
(WebKit::CompositingRunLoop::isActive): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
(WebKit::CompositingRunLoop::stateLock):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::m_displayRefreshMonitor):
(WebKit::ThreadedCompositor::sceneUpdateFinished):
(WebKit::ThreadedCompositor::updateSceneState):
(WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate):
(WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate):
(WebKit::ThreadedCompositor::renderNextFrameIfNeeded): Deleted.
(WebKit::ThreadedCompositor::completeCoordinatedUpdateIfNeeded): Deleted.
(WebKit::ThreadedCompositor::coordinateUpdateCompletionWithClient): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
(WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback):
(WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback):

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

2 years ago[GTK] Update some test expectations.
commit-queue@webkit.org [Mon, 14 Aug 2017 08:28:14 +0000 (08:28 +0000)]
[GTK] Update some test expectations.
https://bugs.webkit.org/show_bug.cgi?id=175480

Unreviewed test gardening.

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-14

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/webrtc/simplecall-expected.txt: Added.

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

2 years ago[Render Tree Mutation] First letter should not mutate the render tree while in layout.
antti@apple.com [Mon, 14 Aug 2017 07:10:17 +0000 (07:10 +0000)]
[Render Tree Mutation] First letter should not mutate the render tree while in layout.
https://bugs.webkit.org/show_bug.cgi?id=163848
Source/WebCore:

Reviewed by Zalan Bujtas.

RenderBlock::updateFirstLetter shouldn't be called during layout. Instead it should
be invoked by the RenderTreeUpdater.

With this future patches can move updateFirstLetter() and the related functions
completely out of the render tree.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layout):

    No more updateFirstLetter calls during layout...

(WebCore::RenderBlock::computePreferredLogicalWidths):

    ...or preferred width computation.

(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderBlock.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::updateFirstLetter):
* rendering/RenderRubyRun.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateFirstLetter):
* rendering/RenderTable.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::updateFirstLetter):
* rendering/svg/RenderSVGText.h:
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::popParent):

    Call updateFirstLetter when closing the element. All of of descedant renderers are known here
    so this can be resolved correctly.

LayoutTests:

<rdar://problem/33402718>

Reviewed by Zalan Bujtas.

* fast/text-autosizing/ios/first-letter-expected.html: Added.

    Turn into reftest for easier debugging and robustness.

* imported/blink/fast/css/first-letter-range-insert-expected.txt:

    This is crash-or-assert test and the output change here doesn't matter.

* platform/ios/fast/text-autosizing/ios/first-letter-expected.txt: Removed.
* platform/mac/fast/text-autosizing/ios/first-letter-expected.txt: Removed.

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

2 years agoComposition underline color is always black
rego@igalia.com [Mon, 14 Aug 2017 06:31:35 +0000 (06:31 +0000)]
Composition underline color is always black
https://bugs.webkit.org/show_bug.cgi?id=174675

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch uses the current color of the text instead of black
for the composition underline marker.
This makes it visible in the case we have a black/dark background.

Test: editing/composition-underline-color.html

* editing/CompositionUnderline.h:
(WebCore::CompositionUnderline::CompositionUnderline):
Added new attribute compositionUnderlineColor.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintCompositionUnderline):
Use the text color if compositionUnderlineColor is TextColor.

Source/WebKit:

This patch uses the current color of the text instead of black
for the composition underline marker.
This makes it visible in the case we have a black/dark background.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::extractUnderlines): If NSUnderlineColorAttributeName
is not present use text color for composition underline.
(WebKit::WebViewImpl::setMarkedText): Use text color
for composition underline in the plain text case.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
Use text color for composition underline.
(WebKit::InputMethodFilter::updatePreedit): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setCompositionForTesting): Ditto.

Source/WebKitLegacy/mac:

* WebView/WebHTMLView.mm:
(extractUnderlines): If NSUnderlineColorAttributeName
is not present use text color for composition underline.
(-[WebHTMLView setMarkedText:selectedRange:]): Use text color
for composition underline in the plain text case.

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::setCompositionForTesting): Use text color for
composition underline.

LayoutTests:

Added new test to check that the composition underline
is using the text color.
The test hides the text and the caret, so it only shows
the composition underline and checks against an -expected-mismatch
that the color of the composition marker is different.

* editing/composition-underline-color-expected-mismatch.html: Added.
* editing/composition-underline-color.html: Added.

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

2 years ago[GTK] stop kinetic scrolling when a zero movement is reached
carlosgc@webkit.org [Mon, 14 Aug 2017 06:23:27 +0000 (06:23 +0000)]
[GTK] stop kinetic scrolling when a zero movement is reached
https://bugs.webkit.org/show_bug.cgi?id=175468

Reviewed by Michael Catanzaro.

This is GTK+ change by Christian Hergert.
https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=4f63d839550f7a9038b391e7d3e1e6fc8bdfafa6

When the kinetic scrolling reduces its speed, there can be multiple frames where the movement is zero pixels,
followed by a 1 pixel movement later on. This causes a "jitter" right at the end of the scroll which makes it
feel less quality than other platforms. Instead, we should just clamp it as soon as we get a zero movement.

* platform/ScrollAnimationKinetic.cpp:
(WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):

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

2 years agoDrop non-const getter for CachedResource::resourceRequest()
cdumez@apple.com [Sun, 13 Aug 2017 21:07:55 +0000 (21:07 +0000)]
Drop non-const getter for CachedResource::resourceRequest()
https://bugs.webkit.org/show_bug.cgi?id=175524

Reviewed by Youenn Fablet.

Drop non-const getter for CachedResource::resourceRequest(). It would be unsafe to modify the request of a CachedResource
after it has been cached. Exposing such a getter is therefore a footgun.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::resourceRequest const):
(WebCore::CachedResource::ignoreForRequestCount const):
(WebCore::CachedResource::setIgnoreForRequestCount):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::ignoreForRequestCount const):
(WebCore::CachedResourceRequest::setIgnoreForRequestCount):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
* platform/network/ResourceRequestBase.h:

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

2 years ago[WPE] Implement WebCore::standardUserAgent()
aperez@igalia.com [Sun, 13 Aug 2017 12:13:27 +0000 (12:13 +0000)]
[WPE] Implement WebCore::standardUserAgent()
https://bugs.webkit.org/show_bug.cgi?id=175507

Reviewed by Carlos Alberto Lopez Perez.

Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.

.:

* Source/cmake/OptionsGTK.cmake: Rename "GTK" with "GLIB" in UA version macros.
* Source/cmake/OptionsWPE.cmake: Add UA version macros.

Source/WebCore:

* PlatformGTK.cmake: Handlde renaming of UserAgentGtk.cpp to UserAgentGLib.cpp.
* PlatformWPE.cmake: Add UserAgentGLib.cpp and UserAgentQuirks.cpp to the list of built WebCore sources.
* platform/glib/UserAgentGLib.cpp: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.cpp.
(WebCore::versionForUAString): Change "GTK" in UA version macros to "GLIB".

Source/WebKit:

* UIProcess/API/glib/WebKitSettings.cpp: Remove preprocessor conditionals for the WPE port.
(webkit_settings_set_user_agent):
(webkit_settings_set_user_agent_with_application_details):
* UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::standardUserAgent): Remove hardcoded value and make use of WebCore::standardUserAgent().

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

2 years ago[ARM64] Use x29 and x30 instead of fp and lr to make GCC happy
ossy@webkit.org [Sun, 13 Aug 2017 06:47:49 +0000 (06:47 +0000)]
[ARM64] Use x29 and x30 instead of fp and lr to make GCC happy
https://bugs.webkit.org/show_bug.cgi?id=175512
<rdar://problem/33863584>

Reviewed by Mark Lam.

* CMakeLists.txt: Added MacroAssemblerARM64.cpp.
* assembler/MacroAssemblerARM64.cpp: Use x29 and x30 instead of fp and lr to make GCC happy.

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

2 years agoARM_TRADITIONAL: static assertion failed: ProbeContext_size_matches_ctiMasmProbeTramp...
ossy@webkit.org [Sun, 13 Aug 2017 06:22:44 +0000 (06:22 +0000)]
ARM_TRADITIONAL: static assertion failed: ProbeContext_size_matches_ctiMasmProbeTrampoline
https://bugs.webkit.org/show_bug.cgi?id=175513

Reviewed by Mark Lam.

* assembler/MacroAssemblerARM.cpp: Added d16-d31 FP registers too.

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

2 years agoFTL's compileGetTypedArrayByteOffset needs to do caging
fpizlo@apple.com [Sun, 13 Aug 2017 01:59:16 +0000 (01:59 +0000)]
FTL's compileGetTypedArrayByteOffset needs to do caging
https://bugs.webkit.org/show_bug.cgi?id=175366

Reviewed by Saam Barati.

While implementing boxing in the DFG, I noticed that there was some missing boxing in the FTL. This
fixes the case in GetTypedArrayByteOffset, and files FIXMEs for more such cases.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::cagedMayBeNull):
* runtime/ArrayBuffer.h:
* runtime/ArrayBufferView.h:
* runtime/JSArrayBufferView.h:

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

2 years agoReplace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
rniwa@webkit.org [Sat, 12 Aug 2017 22:14:53 +0000 (22:14 +0000)]
Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
https://bugs.webkit.org/show_bug.cgi?id=175474
.:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

* Configurations/FeatureDefines.xcconfig:
* runtime/CommonIdentifiers.h:

Source/WebCore:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

Replaced the build flag by a runtime flag and added a stub implementation for DataTransferItemList
and DataTransferItem to make it compile. DataTransferItemList is created lazily by DataTransfer.items,
and its lifetime is tied to DataTransfer by forwarding ref and deref.

See https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface

Tests: editing/pasteboard/datatransfer-idl.html

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::items): Added. Create DataTransferItemList lazily
* dom/DataTransfer.h:
* dom/DataTransfer.idl:
* dom/DataTransferItem.cpp:
(WebCore::DataTransferItem::DataTransferItem): Added a stub implementation.
(WebCore::DataTransferItem::~DataTransferItem): Ditto.
(WebCore::DataTransferItem::getAsString const): Ditto.
(WebCore::DataTransferItem::getAsFile const): Ditto.
* dom/DataTransferItem.h:
(WebCore::DataTransferItemList): Devirtualized functions.
(WebCore::DataTransferItemList::kind const):
(WebCore::DataTransferItemList::type const):
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.cpp: Added.
(WebCore::DataTransferItemList::length const): Added a stub implementation.
(WebCore::DataTransferItemList::item): Ditto.
(WebCore::DataTransferItemList::add): Ditto.
(WebCore::DataTransferItemList::remove): Ditto.
(WebCore::DataTransferItemList::clear): Ditto.
* dom/DataTransferItemList.h:
(WebCore::DataTransferItemList::DataTransferItemList):
(WebCore::DataTransferItemList::~DataTransferItemList): Deleted.
(WebCore::DataTransferItemList::ref): Forwards to DataTransfer's ref.
(WebCore::DataTransferItemList::deref): Ditto.
* dom/DataTransferItemList.idl: Updated to match the latest specification.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Added.
(WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled const): Added.

Source/WebCore/PAL:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

Replaced the build flag by a runtime flag and disabled the feature by default.

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDataTransferItemsEnabled): Added to be used by WebKitTestRunner.
(WKPreferencesGetDataTransferItemsEnabled): Ditto.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

Replaced the build flag by a runtime flag and disabled the feature by default.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Disables dataTransfer.items by default.
(-[WebPreferences dataTransferItemsEnabled]): Added.
(-[WebPreferences setDataTransferItemsEnabled:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WTF:

Reviewed by Wenson Hsieh.

* wtf/FeatureDefines.h:

Tools:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

Enable dataTransfer.items by default in DumpRenderTree and WebKitTestRunner for testing purposes.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

<rdar://problem/33844628>

Reviewed by Wenson Hsieh.

Added a W3C-style IDL test.

* editing/pasteboard/datatransfer-idl.html: Added.

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

2 years agoAddress flakiness related to download tests
cdumez@apple.com [Sat, 12 Aug 2017 21:58:45 +0000 (21:58 +0000)]
Address flakiness related to download tests
https://bugs.webkit.org/show_bug.cgi?id=175338

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several WPT tests now that download callbacks are no longer logged.

* web-platform-tests/html/semantics/embedded-content/the-area-element/area-download-click-expected.txt:
* web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-expected.txt:

Tools:

- Update WKTR so that the flag set by testRunner.waitUntilDownloadFinished()
  is actually queried when a download completes. Previously, this would be
  identical to a call to testRunner.waitUntilDone() because any download
  completion would call testRunner.notifyDone().
- Disable logging of download callbacks by default and add a
  testRunner.setShouldLogDownloadCallbacks(true) API to allow tests to
  enable such logging.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setShouldLogDownloadCallbacks):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::downloadDidStart):
(WTR::TestController::decideDestinationWithSuggestedFilename):
(WTR::TestController::downloadDidFinish):
(WTR::TestController::downloadDidFail):
(WTR::TestController::downloadDidCancel):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setShouldLogDownloadCallbacks):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

* TestExpectations:
Unmark several download tests as flaky.

* fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html:
* fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html:
* fast/dom/HTMLAnchorElement/anchor-download.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download.html:
* fast/dom/HTMLAnchorElement/anchor-nodownload-set.html:
* http/tests/download/anchor-download-attribute-content-disposition.html:
* http/tests/download/anchor-download-no-extension.html:
* http/tests/download/anchor-download-no-value.html:
* http/tests/download/area-download-expected.txt:
* http/tests/download/area-download.html:
* http/tests/security/anchor-download-allow-blob-expected.txt:
* http/tests/security/anchor-download-allow-blob.html:
* http/tests/security/anchor-download-allow-data-expected.txt:
* http/tests/security/anchor-download-allow-data.html:
* http/tests/security/anchor-download-allow-sameorigin.html:
Update download tests to explicitly enable download callbacks logging.

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

2 years agoCaging shouldn't have to use a patchpoint for adding
fpizlo@apple.com [Sat, 12 Aug 2017 18:44:48 +0000 (18:44 +0000)]
Caging shouldn't have to use a patchpoint for adding
https://bugs.webkit.org/show_bug.cgi?id=175483

Reviewed by Mark Lam.
Source/JavaScriptCore:

Caging involves doing a Add(ptr, largeConstant). All of B3's heuristics for how to deal with
constants and associative operations dictate that you always want to sink constants. For example,
Add(Add(a, constant), b) always becomes Add(Add(a, b), constant). This is profitable because in
typical code, it reveals downstream optimizations. But it's terrible in the case of caging, because
we want the large constant (which is shared by all caging operations) to be hoisted. Reassociating to
sink constants obscures the constant in this case. Currently, moveConstants is not smart enough to
reassociate, so instead of sinking largeConstant, it tries (and often fails) to sink some other
constants instead. Without some hacks, this is a 5% Kraken regression and a 1.6% Octane regression.
It's not clear that moveConstants could ever be smart enough to rematerialize that constant and then
hoist it - that would require quite a bit of algebraic reasoning. But the only case we know of where
our current constant reassociation heuristics are wrong is caging. So, we can get away with some
hacks for just stopping B3's reassociation only in this specific case.

Previously, we achieved this by concealing the Add(ptr, largeConstant) inside a patchpoint. That's
OK, but patchpoints are expensive. They require a SharedTask instance. They require callbacks from
the backend, including during register allocation. And they cannot be CSE'd. We do want B3 to know
that if we cage the same pointer in two places, both places will compute the same value.

This patch improves the situation by introducing the Opaque opcode. This is handled by LowerToAir as
if it was Identity, but all prior phases treat it as an unknown pure unary idempotent operation. I.e.
they know that Opaque(x) == Opaque(x) and that Opaque(Opaque(x)) == Opaque(x). But they don't know
that Opaque(x) == x until LowerToAir. So, you can use Opaque exactly when you know that B3 will mess
up your code but Air won't. (Currently we know of no cases where Air messes things up on a large
enough scale to warrant new opcodes.)

This change is perf-neutral, but may start to help as I add more uses of caged() in the FTL. It also
makes the code a bit less ugly.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects const):
(JSC::B3::Value::key const):
(JSC::B3::Value::isFree const):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize const):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::caged):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::opaque):
* ftl/FTLOutput.h:

Websites/webkit.org:

Write documentation for the new Opaque opcode.

* docs/b3/intermediate-representation.html:

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

2 years agoScopedArguments overflow storage needs to be in the JSValue gigacage
fpizlo@apple.com [Sat, 12 Aug 2017 18:40:07 +0000 (18:40 +0000)]
ScopedArguments overflow storage needs to be in the JSValue gigacage
https://bugs.webkit.org/show_bug.cgi?id=174923

Reviewed by Saam Barati.

ScopedArguments overflow storage sits at the end of the ScopedArguments object, so we put that
object into the JSValue gigacage.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitScopedArgumentsGetByVal):
* runtime/ScopedArguments.h:
(JSC::ScopedArguments::subspaceFor):
(JSC::ScopedArguments::overflowStorage const):

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

2 years agoMove files inside WebCore/workers to WebCore/workers/service.
beidson@apple.com [Sat, 12 Aug 2017 05:18:27 +0000 (05:18 +0000)]
Move files inside WebCore/workers to WebCore/workers/service.
https://bugs.webkit.org/show_bug.cgi?id=175495

Rubberstamped by Tim Horton.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

* workers/service/ServiceWorker.cpp: Renamed from Source/WebCore/workers/ServiceWorker.cpp.
* workers/service/ServiceWorker.h: Renamed from Source/WebCore/workers/ServiceWorker.h.
* workers/service/ServiceWorker.idl: Renamed from Source/WebCore/workers/ServiceWorker.idl.
* workers/service/ServiceWorkerContainer.cpp: Renamed from Source/WebCore/workers/ServiceWorkerContainer.cpp.
* workers/service/ServiceWorkerContainer.h: Renamed from Source/WebCore/workers/ServiceWorkerContainer.h.
* workers/service/ServiceWorkerContainer.idl: Renamed from Source/WebCore/workers/ServiceWorkerContainer.idl.
* workers/service/ServiceWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.cpp.
* workers/service/ServiceWorkerGlobalScope.h: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.h.
* workers/service/ServiceWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerJob.cpp: Renamed from Source/WebCore/workers/ServiceWorkerJob.cpp.
* workers/service/ServiceWorkerJob.h: Renamed from Source/WebCore/workers/ServiceWorkerJob.h.
* workers/service/ServiceWorkerJobClient.h: Renamed from Source/WebCore/workers/ServiceWorkerJobClient.h.
* workers/service/ServiceWorkerProvider.cpp: Renamed from Source/WebCore/workers/ServiceWorkerProvider.cpp.
* workers/service/ServiceWorkerProvider.h: Renamed from Source/WebCore/workers/ServiceWorkerProvider.h.
* workers/service/ServiceWorkerRegistration.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.cpp.
* workers/service/ServiceWorkerRegistration.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.h.
* workers/service/ServiceWorkerRegistration.idl: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.idl.
* workers/service/ServiceWorkerRegistrationOptions.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationOptions.h.
* workers/service/ServiceWorkerRegistrationParameters.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.cpp.
* workers/service/ServiceWorkerRegistrationParameters.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.h.
* workers/service/ServiceWorkerUpdateViaCache.h: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.h.
* workers/service/ServiceWorkerUpdateViaCache.idl: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl.

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

2 years agoImplement quota limitation for keepalive Fetch requests
cdumez@apple.com [Sat, 12 Aug 2017 02:51:13 +0000 (02:51 +0000)]
Implement quota limitation for keepalive Fetch requests
https://bugs.webkit.org/show_bug.cgi?id=175482

Reviewed by Sam Weinig and Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
* web-platform-tests/fetch/http-cache/cc-request-expected.txt:
Rebaseline tests now that we provide a more helpful error message when rejecting
the fetch() promise.

* web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
Rebaseline test for keepalive Fetch requests quota which is now passing.

Source/WebCore:

Implement quota limitation for keepalive Fetch requests as per:
- https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)

This partly works for Beacon as well, meaning that no Beacon with a body
over 64Kb can be sent. However, we don't keep track about wether or not
beacon loads are inflight or not.

Also update CachedResourceLoader::requestResource() so that the caller
can get a ResourceError when it returns null. This is useful for both
Fetch and Beacon to return better error messages.

Test: http/wpt/beacon/beacon-quota.html

* CMakeLists.txt:
* Modules/beacon/NavigatorBeacon.cpp:
(WebCore::NavigatorBeacon::sendBeacon):
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
(WebCore::FetchBodyOwner::BlobLoader::didFail):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::start):
(WebCore::FetchLoader::didFail):
* Modules/fetch/FetchLoaderClient.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didFail):
* Modules/fetch/FetchResponse.h:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):
* loader/cache/CachedResourceLoader.h:
* loader/cache/KeepaliveRequestTracker.cpp: Added.
(WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
(WebCore::KeepaliveRequestTracker::canLoadRequest):
(WebCore::KeepaliveRequestTracker::registerRequest):
(WebCore::KeepaliveRequestTracker::responseReceived):
(WebCore::KeepaliveRequestTracker::notifyFinished):
(WebCore::KeepaliveRequestTracker::unregisterRequest):
* loader/cache/KeepaliveRequestTracker.h: Added.
* platform/network/FormData.cpp:
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::lengthInBytes const):
* platform/network/FormData.h:

LayoutTests:

* fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt:
* http/tests/contentextensions/async-xhr-onerror-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
Rebaseline a few tests now that we provide a more helpful error message when an XHR is failing synchronously.

* http/wpt/beacon/beacon-quota-expected.txt: Added.
* http/wpt/beacon/beacon-quota.html: Added.
Add layout test coverage for keepalive Fetch requests quota in the context of sendBeacon().
The second part of the test is still failing because WebCore does not currently know when
ping loads (e.g. beacon loads) complete. This will be addressed via Bug 175443.

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

2 years ago[WTF] Move ValueToString into WTF
don.olmstead@sony.com [Sat, 12 Aug 2017 01:13:47 +0000 (01:13 +0000)]
[WTF] Move ValueToString into WTF
https://bugs.webkit.org/show_bug.cgi?id=175469

Reviewed by Sam Weinig.

Source/WebCore:

No new tests. No change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.h:
(WTF::ValueToString<WebCore::TextTrackCue::string):
(WebCore::ValueToString<TextTrackCue::string): Deleted.
(WebCore::ValueToString<MediaTime>::string): Deleted.
* platform/LayoutUnit.h:
(WTF::ValueToString<WebCore::LayoutUnit>::string):
(WebCore::ValueToString<LayoutUnit>::string): Deleted.
* platform/PODInterval.h:
* platform/PODIntervalTree.h:
* platform/PODRedBlackTree.h:
* platform/graphics/FloatPolygon.h:
(WTF::ValueToString<WebCore::FloatPolygonEdge::string):
(WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
* rendering/FloatingObjects.h:
(WTF::ValueToString<WebCore::FloatingObject::string):
(WebCore::ValueToString<FloatingObject::string): Deleted.
* rendering/RenderFlowThread.h:
(WTF::ValueToString<WebCore::RenderRegion::string):
(WebCore::ValueToString<RenderRegion::string): Deleted.

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/ValueToString.h: Renamed from Source/WebCore/platform/ValueToString.h.

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

2 years ago[Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
commit-queue@webkit.org [Sat, 12 Aug 2017 00:32:03 +0000 (00:32 +0000)]
[Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
https://bugs.webkit.org/show_bug.cgi?id=175394

Patch by Sam Weinig <sam@webkit.org> on 2017-08-11
Reviewed by Chris Dumez.

* bindings/IDLTypes.h:
(WebCore::IDLWrapper::convertToParameterType): Deleted.

    Remove no longer used convertToParameterType.

* bindings/js/DOMPromiseProxy.h:

    - Replace Variant<Value, Exception> with ExceptionOr<Value> / ExceptionOr<void>.
    - Update ResolveCallback to have a return type of IDLType::ParameterType, rather than
      IDLType::ImplementationType, now that WTF::Function supports references as the
      return type. This is needed, since the IDLType::ParameterType for an interface T
      is T&.

* css/FontFace.cpp:
* css/FontFace.h:
* css/FontFaceSet.cpp:
* css/FontFaceSet.h:

    Update resolve callbacks to return a reference rather than a RefPtr, matching
    the new signature requirement.

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

2 years ago[WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code
commit-queue@webkit.org [Sat, 12 Aug 2017 00:07:00 +0000 (00:07 +0000)]
[WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code
https://bugs.webkit.org/show_bug.cgi?id=175457

Patch by Sam Weinig <sam@webkit.org> on 2017-08-11
Reviewed by Chris Dumez.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmBuilder.cpp: Removed.
* bindings/js/JSCryptoAlgorithmBuilder.h: Removed.
* bindings/js/JSCryptoKeyCustom.cpp: Removed.

    Remove JSCryptoAlgorithmBuilder and JSCryptoKeyCustom, add KeyAlgorithm
    IDLs and headers.

* crypto/CryptoKey.cpp:
* crypto/CryptoKey.h:
* crypto/CryptoKey.idl:

    Replace custom algorithm attribute with a union of the supported key algorithms.

* crypto/keys/CryptoAesKeyAlgorithm.h: Added.
* crypto/keys/CryptoAesKeyAlgorithm.idl: Added.
* crypto/keys/CryptoEcKeyAlgorithm.h: Added.
* crypto/keys/CryptoEcKeyAlgorithm.idl: Added.
* crypto/keys/CryptoHmacKeyAlgorithm.h: Added.
* crypto/keys/CryptoHmacKeyAlgorithm.idl: Added.
* crypto/keys/CryptoKeyAlgorithm.h: Added.
* crypto/keys/CryptoKeyAlgorithm.idl: Added.
* crypto/keys/CryptoRsaHashedKeyAlgorithm.h: Added.
* crypto/keys/CryptoRsaHashedKeyAlgorithm.idl: Added.
* crypto/keys/CryptoRsaKeyAlgorithm.h: Added.
* crypto/keys/CryptoRsaKeyAlgorithm.idl: Added.

    Add IDLs and headers fo the supported key algorithms.

* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyEC.h:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeyRaw.h:

    Give each of the existing KeyAlgorithm subclasses a dictionary() function
    that returns the populated corresponding spec'd dictionary.

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

2 years agoJSLexicalEnvironment needs to be in the JSValue gigacage
fpizlo@apple.com [Fri, 11 Aug 2017 23:18:18 +0000 (23:18 +0000)]
JSLexicalEnvironment needs to be in the JSValue gigacage
https://bugs.webkit.org/show_bug.cgi?id=174922

Reviewed by Michael Saboff.

We can sorta random access the JSLexicalEnvironment. So, we put it in the JSValue gigacage and make
the only random accesses use pointer caging.

We don't need to do anything to normal lexical environment accesses.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* runtime/JSEnvironmentRecord.h:
(JSC::JSEnvironmentRecord::subspaceFor):
(JSC::JSEnvironmentRecord::variables):

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

2 years agoUpdate TestExpectations for failing media/video-controls tests.
ryanhaddad@apple.com [Fri, 11 Aug 2017 23:12:52 +0000 (23:12 +0000)]
Update TestExpectations for failing media/video-controls tests.
https://bugs.webkit.org/show_bug.cgi?id=173978

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoSome RenderSVGResource cleanup
simon.fraser@apple.com [Fri, 11 Aug 2017 22:43:01 +0000 (22:43 +0000)]
Some RenderSVGResource cleanup
https://bugs.webkit.org/show_bug.cgi?id=175494

Reviewed by Zalan Bujtas.

Use more initializers. Remove spurious use of bitfields that didn't save any space at all.
0 -> nullptr.

No behavior change.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::fillShape):
(WebCore::RenderSVGShape::strokeShape):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::~SVGRenderingContext):
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGRenderingContext.h:
(WebCore::SVGRenderingContext::SVGRenderingContext):

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

2 years agoFix the build with modern Clang's -Wexpansion-to-defined
timothy_horton@apple.com [Fri, 11 Aug 2017 22:35:30 +0000 (22:35 +0000)]
Fix the build with modern Clang's -Wexpansion-to-defined
https://bugs.webkit.org/show_bug.cgi?id=175467
<rdar://problem/33667497>

Reviewed by Simon Fraser.

Source/WebCore:

* crypto/mac/SerializedCryptoKeyWrapMac.mm:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:
Avoid object-like macros that expand to include defined(), because this
behaves inconsistently between different compilers (though in ways
that don't matter for these particular defines, which aren't used on MSVC),
and Clang has added a warning for it.

Move ENABLE_WEBASSEMBLY to Platform.h since it depends on things that
are defined there and can't be evaluated at time-of-use because of the
aforementioned new rules. Previously, there was a cycle between
ENABLE_WEBASSEMBLY and ENABLE_B3_JIT -- break that so that it just
goes FTL_JIT->B3_JIT->WASM instead.

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

2 years agoWeb Inspector: Clicking on suggestion hint should apply it, not dismiss
nvasilyev@apple.com [Fri, 11 Aug 2017 22:33:28 +0000 (22:33 +0000)]
Web Inspector: Clicking on suggestion hint should apply it, not dismiss
https://bugs.webkit.org/show_bug.cgi?id=175409

Reviewed by Matt Baker.

Make clicking on the suggestion hint apply the completion, and place the text caret after it.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WI.CodeMirrorCompletionController.prototype._createCompletionHintMarker):

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

2 years agoWeb Inspector: Styles: Update the filter icon to match Xcode
nvasilyev@apple.com [Fri, 11 Aug 2017 21:08:58 +0000 (21:08 +0000)]
Web Inspector: Styles: Update the filter icon to match Xcode
https://bugs.webkit.org/show_bug.cgi?id=175458
<rdar://problem/33838660>

Reviewed by Matt Baker.

* UserInterface/Images/FilterFieldGlyph.svg:
Half-pixel transform is necessary for a cleaner rasterisation.

* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]::-webkit-search-decoration):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
::-webkit-search-decoration is a flexbox item. Remove `vertical-align: bottom`,
since it didn't do anything for it.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
* UserInterface/Views/FilterBar.js:
(WI.FilterBar):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WI.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
* UserInterface/Views/NetworkSidebarPanel.js:
(WI.NetworkSidebarPanel):
* UserInterface/Views/RecordingNavigationSidebarPanel.js:
(WI.RecordingNavigationSidebarPanel):
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
* UserInterface/Views/StorageSidebarPanel.js:
(WI.StorageSidebarPanel):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
* Localizations/en.lproj/localizedStrings.js:
Replace placeholder text for all filter fields with "Filter".

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

2 years agoCrash under ServiceWorkerJob::failedWithException.
beidson@apple.com [Fri, 11 Aug 2017 20:37:51 +0000 (20:37 +0000)]
Crash under ServiceWorkerJob::failedWithException.
https://bugs.webkit.org/show_bug.cgi?id=175488

Reviewed by Tim Horton.

Covered by existing tests.

* workers/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.

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

2 years agoDirectArguments should be in the JSValue gigacage
fpizlo@apple.com [Fri, 11 Aug 2017 20:08:33 +0000 (20:08 +0000)]
DirectArguments should be in the JSValue gigacage
https://bugs.webkit.org/show_bug.cgi?id=174920

Reviewed by Michael Saboff.

This puts DirectArguments in a new subspace for cells that want to be in the JSValue gigacage. All
indexed accesses to DirectArguments now do caging. get_from_arguments/put_to_arguments are exempted
because they always operate on a DirectArguments that is pointed to directly from the stack, they are
required to use fixed offsets, and you can only store JSValues.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitDirectArgumentsGetByVal):
* runtime/DirectArguments.h:
(JSC::DirectArguments::subspaceFor):
(JSC::DirectArguments::storage):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

2 years agoCreate mock ITP data in testing to prevent grandfathering
jbedard@apple.com [Fri, 11 Aug 2017 20:04:06 +0000 (20:04 +0000)]
Create mock ITP data in testing to prevent grandfathering
https://bugs.webkit.org/show_bug.cgi?id=174720

Unreviewed follow-up fix for r220604.

* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Release resourceLogPlist.

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

2 years agoCreate mock ITP data in testing to prevent grandfathering
jbedard@apple.com [Fri, 11 Aug 2017 17:30:46 +0000 (17:30 +0000)]
Create mock ITP data in testing to prevent grandfathering
https://bugs.webkit.org/show_bug.cgi?id=174720
<rdar://problem/33457779>

Reviewed by Brent Fulgham.

We don't need to be triggering grandfathering when each test runner starts. On Mac,
this may launch plugins which can cause layout tests to fail later if the test
runner does not shut-down before the plugins unload.

* WebKitTestRunner/TestController.h: Add declaration of cocoaPlatformInitialize.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Write the minimum data required to
prevent grandfathering from being triggered.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformInitialize): Call cocoaPlatformInitialize.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformInitialize): Ditto.

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

2 years agoUnreviewed, add a FIXME.
fpizlo@apple.com [Fri, 11 Aug 2017 17:26:59 +0000 (17:26 +0000)]
Unreviewed, add a FIXME.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::caged):

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

2 years agoWTF::Function does not allow for reference / non-default constructible return types
weinig@apple.com [Fri, 11 Aug 2017 16:56:37 +0000 (16:56 +0000)]
WTF::Function does not allow for reference / non-default constructible return types
https://bugs.webkit.org/show_bug.cgi?id=175244
Source/JavaScriptCore:

Reviewed by Chris Dumez.

* runtime/ArrayBuffer.cpp:
(JSC::ArrayBufferContents::transferTo):
Call reset(), rather than clear() to avoid the call to destroy() in clear(). The
destroy call needed to be a no-op anyway, since the data is being moved.

Source/WebCore:

Reviewed by Chris Dumez.

* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::invokeCallback):
Update the default value for the addArguments parameter to be an empty lambda, rather than
default initialization, which leads to a null WTF::Function. This allows us to remove support
for calling null WTF::Function. No change in behavior.

Source/WebKit:

Reviewed by Chris Dumez.

* UIProcess/WebResourceLoadStatisticsStore.h:
Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an
empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
us to remove support for calling null WTF::Function. No change in behavior.

Source/WTF:

Reviewed by Chris Dumez.

When Function, then NoncopyableFunction, was templatized to allow non-void return values
in r201493, it maintained the behavior of being callable even if the Function was null.
To accomplish this, when null, the default construction of the return parameter was used.
This means Function can't be used with return types that are not default constructible,
such as reference types and Ref.

This behavior of returning something when null is surprising, as this is not how normal
functions behave, and not very useful. Instead, we now assert that the function is not
null when being called.

* wtf/Function.h:
(WTF::Function operator(...)):
Instead of allowing a null callable wrapper by returning the default construction of
the return type, assert that the wrapper is there when calling a Function.

Tools:

<rdar://problem/33801582>

Reviewed by Chris Dumez.

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

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

2 years agoGardening: fix CLoop build.
mark.lam@apple.com [Fri, 11 Aug 2017 16:54:45 +0000 (16:54 +0000)]
Gardening: fix CLoop build.
https://bugs.webkit.org/show_bug.cgi?id=175446
<rdar://problem/33836545>

Not reviewed.

* assembler/MacroAssemblerPrinter.cpp:

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

2 years agoDFG should do caging
fpizlo@apple.com [Fri, 11 Aug 2017 16:47:14 +0000 (16:47 +0000)]
DFG should do caging
https://bugs.webkit.org/show_bug.cgi?id=174918

Reviewed by Saam Barati.

Adds the appropriate cage() calls to the DFG, including a cageTypedArrayStorage() helper that does
the conditional caging with a watchpoint.

This might be a 1% SunSpider slow-down, but it's not clear.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileCreateRest):
(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
(JSC::DFG::SpeculativeJIT::compileArraySlice):
(JSC::DFG::SpeculativeJIT::compileGetButterfly):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

2 years ago[CMake] Fix broken use of REQUIRED with find modules
annulen@yandex.ru [Fri, 11 Aug 2017 16:39:14 +0000 (16:39 +0000)]
[CMake] Fix broken use of REQUIRED with find modules
https://bugs.webkit.org/show_bug.cgi?id=175427

Reviewed by Michael Catanzaro.

Module name passed to find_package_handle_standard_args() must exactly
match file name of CMake find module including letter case, e.g. "WebP"
must be used in FindWebP.cmake file. Otherwise find_package() arguments
(REQUIRED, QUIET, version) are not processed correctly.

To continue using old XXX_FOUND variables without case changes porting
to new find_package_handle_standard_args syntax which has FOUND_VAR
parameter. Unfortunately, variable name GTK_UNIX_PRINT_FOUND is not
allowed by find_package_handle_standard_args when package name is
GTKUnixPrint, so it's replaced to GTKUnixPrint_FOUND (default).

* Source/cmake/FindGTKUnixPrint.cmake:
* Source/cmake/FindGeoClue2.cmake:
* Source/cmake/FindHyphen.cmake:
* Source/cmake/FindLibEpoxy.cmake:
* Source/cmake/FindLibGBM.cmake:
* Source/cmake/FindLibsecret.cmake:
* Source/cmake/FindLibtasn1.cmake:
* Source/cmake/FindLibxkbcommon.cmake:
* Source/cmake/FindOpenGL.cmake:
* Source/cmake/FindOpenGLES2.cmake:
* Source/cmake/FindOpenWebRTC.cmake:
* Source/cmake/FindWPEBackend-mesa.cmake:
* Source/cmake/FindWPEBackend.cmake:
* Source/cmake/FindWayland.cmake:
* Source/cmake/FindWebP.cmake:
* Source/cmake/OptionsGTK.cmake:

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

2 years agoRemove RenderQuote collection from RenderView
antti@apple.com [Fri, 11 Aug 2017 16:22:44 +0000 (16:22 +0000)]
Remove RenderQuote collection from RenderView
https://bugs.webkit.org/show_bug.cgi?id=175479

Reviewed by Andreas Kling.

We can do it well enough without maintaining this pointer structure.

Global updating doesn't work well with future direction for first-letter and similar anyway.
We need to update quote immediately when updating its style.

* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::insertedIntoTree):
(WebCore::RenderQuote::willBeRemovedFromTree):

    Just tell the view that there are renderers to update.

(WebCore::RenderQuote::styleDidChange):
(WebCore::RenderQuote::isOpen const):
(WebCore::RenderQuote::updateRenderer):
(WebCore::RenderQuote::updateRenderers): Deleted.

    Update single renderer only. RenderTreeUpdater provides the previous renderer to compute the depth.

* rendering/RenderQuote.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::registerQuote): Deleted.
(WebCore::RenderView::unregisterQuote): Deleted.
(WebCore::RenderView::updateSpecialRenderers): Deleted.

    Remove the quote list.

* rendering/RenderView.h:
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::commit):

    Ensure that all quotes are updated.

(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
(WebCore::RenderTreeUpdater::updateQuotesUpTo):

    Traverse render tree to find quotes to update starting from the previous updated quote.

* style/RenderTreeUpdater.h:

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

2 years agoUnreviewed, build fix for x86 GTK port
utatane.tea@gmail.com [Fri, 11 Aug 2017 15:44:38 +0000 (15:44 +0000)]
Unreviewed, build fix for x86 GTK port
https://bugs.webkit.org/show_bug.cgi?id=175446

Use pushfl/popfl instead of pushfd/popfd.

* assembler/MacroAssemblerX86Common.cpp:

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

2 years ago[CMake] Many warning about missing “override” keywords in ANGLE with Clang
aperez@igalia.com [Fri, 11 Aug 2017 15:44:00 +0000 (15:44 +0000)]
[CMake] Many warning about missing “override” keywords in ANGLE with Clang
https://bugs.webkit.org/show_bug.cgi?id=175475

Reviewed by Michael Catanzaro.

* CMakeLists.txt: Add "-Wno-inconsistent-missing-override" to the
compiler flags using for building the ANGLE sources.

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

2 years ago[GTK][WPE] Overriden virtual function not marked “override” in ImageBufferDataCairo.h
aperez@igalia.com [Fri, 11 Aug 2017 13:46:59 +0000 (13:46 +0000)]
[GTK][WPE] Overriden virtual function not marked “override” in ImageBufferDataCairo.h
https://bugs.webkit.org/show_bug.cgi?id=175476

Reviewed by Carlos Garcia Campos.

* platform/graphics/cairo/ImageBufferDataCairo.h: Add missing "override" qualifier.

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

2 years ago[WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style...
aperez@igalia.com [Fri, 11 Aug 2017 13:25:57 +0000 (13:25 +0000)]
[WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
https://bugs.webkit.org/show_bug.cgi?id=175477

Reviewed by Žan Doberšek.

* Shared/wpe/WebEventFactory.cpp:
(WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
compiler choose the correct WTF::String constructor.

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

2 years agoFix build warning in WebDriverService.h
clopez@igalia.com [Fri, 11 Aug 2017 12:28:21 +0000 (12:28 +0000)]
Fix build warning in WebDriverService.h
https://bugs.webkit.org/show_bug.cgi?id=166682

Unreviewed build fix.

* WebDriverService.h: Fixes the warning: class 'Capabilities' was previously declared as a struct [-Wmismatched-tags]

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

2 years ago[Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
carlosgc@webkit.org [Fri, 11 Aug 2017 10:06:12 +0000 (10:06 +0000)]
[Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
https://bugs.webkit.org/show_bug.cgi?id=175378

Reviewed by Sergio Villar Senin.

Source/WebCore:

Bring back part of the code removed in r206732, to keep a reference to the SoupMessage in the
AuthenticationChallenge since it can be different to the resource message.

* platform/network/soup/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
(WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
(WebCore::AuthenticationChallenge::soupAuth const): Deleted.
(WebCore::AuthenticationChallenge::setProposedCredential): Deleted.
* platform/network/soup/AuthenticationChallengeSoup.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::AuthenticationChallenge::platformCompare):

Source/WebKit:

In case of HTTPS resource with a proxy, libsoup uses a tunnel internally, that uses its own SoupMessage during
the proxy authentication. We were ignoring authentication requests for other messages.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::authenticateCallback): Only return early if the message does't match and it's not
HTTPS resource over a proxy.
(WebKit::NetworkDataTaskSoup::authenticate): Use the soup message from the authentication challenge.
(WebKit::NetworkDataTaskSoup::continueAuthenticate): Ditto.

Tools:

Add two test cases to check proxy authentication.

* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
(Tunnel::Tunnel):
(Tunnel::~Tunnel):
(Tunnel::connect):
(Tunnel::connected):
(serverCallback):
(ProxyAuthenticationTest::ProxyAuthenticationTest):
(ProxyAuthenticationTest::~ProxyAuthenticationTest):
(ProxyAuthenticationTest::proxyServerPortAsString):
(testWebViewAuthenticationProxy):
(testWebViewAuthenticationProxyHTTPS):
(beforeAll):

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

2 years ago[GStreamer][GTK][WPE] Unify GStreamer JHBuild moduleset for both GTK+ and WPE
calvaris@igalia.com [Fri, 11 Aug 2017 08:15:40 +0000 (08:15 +0000)]
[GStreamer][GTK][WPE] Unify GStreamer JHBuild moduleset for both GTK+ and WPE
https://bugs.webkit.org/show_bug.cgi?id=175428

Both ports share the GStreamer code as multimedia backend and till
not so long they were using different versions. Now they do use
the same versions and it does not make any sense anymore (and
neither had sense before) to have differences in the modulesets.

In this patch I created a GStreamer moduleset and referenced it
from both GTK+'s and WPE's. GStreamer patches were also moved there.

Reviewed by Žan Doberšek.

* gstreamer/jhbuild.modules: Added.
* gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Renamed from Tools/gtk/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch.
* gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Renamed from Tools/gtk/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch.
* gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Renamed from Tools/gtk/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch.
* gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Renamed from Tools/gtk/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch.
* gstreamer/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Renamed from Tools/gtk/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch.
* gstreamer/patches/openh264-configure.patch: Renamed from Tools/gtk/patches/openh264-configure.patch.
* gtk/jhbuild.modules:
* wpe/jhbuild.modules:
* wpe/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Removed.
* wpe/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Removed.
* wpe/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Removed.
* wpe/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Removed.
* wpe/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Removed.

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

2 years ago[Soup] Do not spawn the network process to setup cookie persistent storage
carlosgc@webkit.org [Fri, 11 Aug 2017 06:02:33 +0000 (06:02 +0000)]
[Soup] Do not spawn the network process to setup cookie persistent storage
https://bugs.webkit.org/show_bug.cgi?id=175424

Reviewed by Sergio Villar Senin.

The persistent storage configuration is saved and passed to network process as creation parameters, so we don't
need to spawn the network process to configure it, when it's created eventually it will use the configuration.

* UIProcess/soup/WebCookieManagerProxySoup.cpp:
(WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Use sendToNetworkingProcess() instead of
endToNetworkingProcessRelaunchingIfNecessary().

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

2 years ago[GTK][WPE] Assertion failure in TimerBase inside WebCore::IconRecord::setImageData
carlosgc@webkit.org [Fri, 11 Aug 2017 06:01:15 +0000 (06:01 +0000)]
[GTK][WPE] Assertion failure in TimerBase inside WebCore::IconRecord::setImageData
https://bugs.webkit.org/show_bug.cgi?id=173866
<rdar://problem/33122050>

Reviewed by Michael Catanzaro.

IconDatabase creates and destroys IconRecord objects in both database and main thread. If the IconRecord has a
valid icon, its Image could be created in one thread and destroyed in another, something that is not expected to
happen, because Image has a Timer member. Since we have all the data and we are decoding it right after creating
the Image, we don't really need to keep the Image object around, we could simply take a reference of the encoded
data and the decoded native image to be returned by synchronousIconForPageURL().

* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::IconRecord::image): Return NativeImagePtr now.
(WebKit::IconDatabase::IconRecord::setImageData): Create a BitmapImage to decode it and keep a reference to the
encoded data and decoded native image.
(WebKit::IconDatabase::IconRecord::snapshot const): Use m_imageData to get the encoded data.
(WebKit::IconDatabase::synchronousIconForPageURL): Return the native image and whether the icon is known or not.
(WebKit::IconDatabase::IconRecord::loadImageFromResource): Deleted.
* UIProcess/API/glib/IconDatabase.h:
* UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(getIconSurfaceSynchronously): Use new API.

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

2 years agoMake the MASM_PROBE mechanism mandatory for DFG and FTL builds.
mark.lam@apple.com [Fri, 11 Aug 2017 05:31:32 +0000 (05:31 +0000)]
Make the MASM_PROBE mechanism mandatory for DFG and FTL builds.
https://bugs.webkit.org/show_bug.cgi?id=175446
<rdar://problem/33836545>

Reviewed by Saam Barati.

Source/JavaScriptCore:

* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssembler.cpp:
(JSC::MacroAssembler::probe):
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM.cpp:
(JSC::MacroAssembler::probe):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::trustedImm32FromPtr):
* assembler/MacroAssemblerARM64.cpp:
(JSC::MacroAssembler::probe):
* assembler/MacroAssemblerARMv7.cpp:
(JSC::MacroAssembler::probe):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::trustedImm32FromPtr):
* assembler/MacroAssemblerPrinter.cpp:
* assembler/MacroAssemblerPrinter.h:
* assembler/MacroAssemblerX86Common.cpp:
* assembler/testmasm.cpp:
(JSC::isSpecialGPR):
(JSC::testProbeModifiesProgramCounter):
(JSC::run):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::print):
* b3/air/AirPrintSpecial.cpp:
* b3/air/AirPrintSpecial.h:

Source/WTF:

This is needed in order to support https://bugs.webkit.org/show_bug.cgi?id=174645.
One consequence of this is that the DFG will now be disabled for the MIPS and
Windows ports. See:
    https://bugs.webkit.org/show_bug.cgi?id=175447
    https://bugs.webkit.org/show_bug.cgi?id=175449

Also, we should only ENABLE_SIGNAL_BASED_VM_TRAPS if the DFG is enabled.  It was
never meaningful to use SIGNAL_BASED_VM_TRAPS with the baseline JIT anyway.  This
is a mis-configuration error that is now fixed.

* wtf/Platform.h:

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

2 years agoRestored svn:ignore values that went missing when the project got renamed.
mitz@apple.com [Fri, 11 Aug 2017 04:47:06 +0000 (04:47 +0000)]
Restored svn:ignore values that went missing when the project got renamed.

Source/WebKit:

* WebKit.xcodeproj: Added property svn:ignore.

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj: Added property svn:ignore.

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

2 years agoFixed building for macOS 10.12 with the macOS 10.13 SDK.
mitz@apple.com [Fri, 11 Aug 2017 04:22:59 +0000 (04:22 +0000)]
Fixed building for macOS 10.12 with the macOS 10.13 SDK.

Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
starting in that release, they have been available as SPI earlier.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
(-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::flush):

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

2 years agoWeb Inspector: Add three.js in preparation for layer visualization.
commit-queue@webkit.org [Fri, 11 Aug 2017 03:06:56 +0000 (03:06 +0000)]
Web Inspector: Add three.js in preparation for layer visualization.
https://bugs.webkit.org/show_bug.cgi?id=174798

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-08-10
Reviewed by Brian Burg.

* UserInterface/External/three.js/LICENSE: Added.
* UserInterface/External/three.js/OrbitControls.js: Added.
* UserInterface/External/three.js/three.js: Added.

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

2 years agoRename the source files for the WTF persistent coders.
beidson@apple.com [Fri, 11 Aug 2017 02:59:06 +0000 (02:59 +0000)]
Rename the source files for the WTF persistent coders.
https://bugs.webkit.org/show_bug.cgi?id=175441

Reviewed by Tim Horton.

Source/WebCore:

* platform/network/NetworkLoadMetrics.h:

Source/WebKit:

* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheKey.cpp:
* NetworkProcess/cache/NetworkCacheKey.h:
* UIProcess/API/APIContentRuleListStore.cpp:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:

* wtf/persistence/PersistentCoder.h: Renamed from Source/WTF/wtf/persistence/Coder.h.
* wtf/persistence/PersistentCoders.cpp: Renamed from Source/WTF/wtf/persistence/Coders.cpp.
* wtf/persistence/PersistentCoders.h: Renamed from Source/WTF/wtf/persistence/Coders.h.
* wtf/persistence/PersistentDecoder.cpp: Renamed from Source/WTF/wtf/persistence/Decoder.cpp.
* wtf/persistence/PersistentDecoder.h: Renamed from Source/WTF/wtf/persistence/Decoder.h.
* wtf/persistence/PersistentEncoder.cpp: Renamed from Source/WTF/wtf/persistence/Encoder.cpp.
* wtf/persistence/PersistentEncoder.h: Renamed from Source/WTF/wtf/persistence/Encoder.h.

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

2 years agoUnreviewed, adding Ross Kirsling to contributors.json\n\n* Scripts/webkitpy/common...
don.olmstead@sony.com [Fri, 11 Aug 2017 02:17:10 +0000 (02:17 +0000)]
Unreviewed, adding Ross Kirsling to contributors.json\n\n* Scripts/webkitpy/common/config/contributors.json:\n

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

2 years agoResource Load Statistics: Increase grandfathering time to 7 days
wilander@apple.com [Fri, 11 Aug 2017 01:47:03 +0000 (01:47 +0000)]
Resource Load Statistics: Increase grandfathering time to 7 days
https://bugs.webkit.org/show_bug.cgi?id=175414
<rdar://problem/33818046>

Reviewed by Brent Fulgham.

* UIProcess/WebResourceLoadStatisticsStore.h:

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

2 years agoLayout test accessibility/press-target-uses-text-descendant-node.html is flaky.
n_wang@apple.com [Fri, 11 Aug 2017 01:41:56 +0000 (01:41 +0000)]
Layout test accessibility/press-target-uses-text-descendant-node.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=175272
<rdar://problem/33756962>

Since accessibilityPress is async, we shouldn't rely on the timeout.

Reviewed by Chris Fleizach.

* accessibility/press-target-uses-text-descendant-node.html:

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

2 years agoMake ThreadGlobalData RefCounted for web thread
utatane.tea@gmail.com [Fri, 11 Aug 2017 00:41:53 +0000 (00:41 +0000)]
Make ThreadGlobalData RefCounted for web thread
https://bugs.webkit.org/show_bug.cgi?id=175439

Reviewed by Mark Lam.

When the web thread is enabled, we share ThreadGlobalData between the web thread and the main thread.
The problem happens when the main thread is dying. It could start deallocating TLS and the web
thread may see the destructed ThreadGlobalData.

Even though, the current implementation is safe because the main thread do not perform TLS deallocation
in the Darwin environment. But this is not true in Windows. And we should not rely on this condition
that depends on the platforms.

In this patch, we make ThreadGlobalData ThreadSafeRefCounted. This type verbosely describes that
ThreadGlobalData could be shared between threads when the web thread enabled. And make the life time
management simple instead of relying on the platform dependent TLS implementation.

* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::setWebCoreThreadData):
(WebCore::threadGlobalData):
* platform/ThreadGlobalData.h:
(WebCore::ThreadGlobalData::cachedResourceRequestInitiators): Deleted.
(WebCore::ThreadGlobalData::eventNames): Deleted.
(WebCore::ThreadGlobalData::threadTimers): Deleted.
(WebCore::ThreadGlobalData::qualifiedNameCache): Deleted.
(WebCore::ThreadGlobalData::cachedConverterICU): Deleted.
(WebCore::ThreadGlobalData::cachedConverterTEC): Deleted.

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

2 years agoResource Load Statistics: Add significant figures to telemetry calls
wilander@apple.com [Fri, 11 Aug 2017 00:41:09 +0000 (00:41 +0000)]
Resource Load Statistics: Add significant figures to telemetry calls
https://bugs.webkit.org/show_bug.cgi?id=175442
<rdar://problem/33834834>

Reviewed by Brent Fulgham.

With this change, logged values are allowed to have 3 significant figures
as opposed to today's 0 which is wrong.

* UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::submitTopList):
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

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

2 years agoUnreviewed, attempt to fix build failure with VC2017
utatane.tea@gmail.com [Fri, 11 Aug 2017 00:36:24 +0000 (00:36 +0000)]
Unreviewed, attempt to fix build failure with VC2017

Source/WTF:

* wtf/PriorityQueue.h:

Tools:

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

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

2 years ago[JSC] Use @toNumber in builtins
utatane.tea@gmail.com [Fri, 11 Aug 2017 00:36:23 +0000 (00:36 +0000)]
[JSC] Use @toNumber in builtins
https://bugs.webkit.org/show_bug.cgi?id=172692

Reviewed by Sam Weinig.

Use @toNumber bytecode intrinsic. It emits op_to_number, which efficiently converts
a given argument to a number.

* Modules/streams/ReadableByteStreamInternals.js:
(privateInitializeReadableByteStreamController):
(readableByteStreamControllerRespond):
* Modules/streams/StreamInternals.js:
(validateAndNormalizeQueuingStrategy):
(enqueueValueWithSize):

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

2 years agoUnreviewed, suppress warnings on GCC
utatane.tea@gmail.com [Fri, 11 Aug 2017 00:29:03 +0000 (00:29 +0000)]
Unreviewed, suppress warnings on GCC

* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
(TestWebKitAPI::CheckedArithmeticTester::run):

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

2 years ago[Xcode] With Xcode 9 developer beta, everything rebuilds when switching between comma...
mitz@apple.com [Thu, 10 Aug 2017 23:57:47 +0000 (23:57 +0000)]
[Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE
https://bugs.webkit.org/show_bug.cgi?id=173223

Reviewed by Tim Horton.

The rebuilds were happening due to a difference in the compiler options that the IDE and
xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make
xcodebuild pass that option, too, set INDEX_ENABLE_DATA_STORE to YES and
INDEX_DATA_STORE_DIR to the Index Datastore path specified in Xcode Locations preferences >
Advanced when a Custom Absolute path is selected.

* Scripts/webkitdirs.pm:
(determineBaseProductDir):

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

2 years agoRun more WTF tests
utatane.tea@gmail.com [Thu, 10 Aug 2017 23:42:14 +0000 (23:42 +0000)]
Run more WTF tests
https://bugs.webkit.org/show_bug.cgi?id=174970

Reviewed by Michael Catanzaro.

Source/WTF:

CHAR_BIT is not defined.

* wtf/LEBDecoder.h:

Tools:

Some of WTF tests are not executed in non Apple ports while they are generic ones.
This patch adds these tests to non-Apple port TestWebKitAPI.
Currently, we do not add Signals.cpp since it depends on signal functionality.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:
(isHigherPriority):
(TEST):
* TestWebKitAPI/Tests/WTF/Signals.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/ThreadMessages.cpp.
(TEST):
* TestWebKitAPI/Tests/WTF/ThreadMessages.cpp:
(TEST):

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

2 years agoApply the UNLIKELY macro to some unlikely things.
mark.lam@apple.com [Thu, 10 Aug 2017 23:00:06 +0000 (23:00 +0000)]
Apply the UNLIKELY macro to some unlikely things.
https://bugs.webkit.org/show_bug.cgi?id=175440
<rdar://problem/33834767>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::jettison):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::disassemble):
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalizeCommon):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::compileOSRExit):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeCommon):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):
* runtime/ScriptExecutable.cpp:
(JSC::ScriptExecutable::installCode):
* runtime/VM.cpp:
(JSC::VM::VM):

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getBytecodeProfile):

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

2 years agoUnreviewed test gardening for High Sierra.
ryanhaddad@apple.com [Thu, 10 Aug 2017 22:57:33 +0000 (22:57 +0000)]
Unreviewed test gardening for High Sierra.

* platform/mac-highsierra/css1/basic/inheritance-expected.txt: Added.
* platform/mac-highsierra/css2.1/t0602-c13-inh-underlin-00-e-expected.txt: Added.
* platform/mac-highsierra/css2.1/t0805-c5522-brdr-02-e-expected.txt: Added.
* platform/mac-highsierra/css3/selectors3/html/css3-modsel-18-expected.txt: Added.
* platform/mac-highsierra/css3/selectors3/xhtml/css3-modsel-18-expected.txt: Added.
* platform/mac-highsierra/css3/selectors3/xml/css3-modsel-18-expected.txt: Added.
* platform/mac-highsierra/fast/block/basic/001-expected.txt: Added.
* platform/mac-highsierra/fast/css-generated-content/initial-letter-basic-expected.txt: Added.
* platform/mac-highsierra/fast/css-generated-content/initial-letter-border-padding-expected.txt: Added.
* platform/mac-highsierra/fast/css-generated-content/initial-letter-raised-expected.txt: Added.
* platform/mac-highsierra/fast/css-generated-content/initial-letter-sunken-expected.txt: Added.
* platform/mac-highsierra/fast/css/css3-nth-child-expected.txt: Added.
* platform/mac-highsierra/fast/css/text-overflow-input-expected.txt: Added.
* platform/mac-highsierra/fast/dom/34176-expected.txt: Added.
* platform/mac-highsierra/fast/dom/clone-node-dynamic-style-expected.txt: Added.
* platform/mac-highsierra/fast/forms/basic-inputs-expected.txt: Added.
* platform/mac-highsierra/fast/forms/input-value-expected.txt: Added.
* platform/mac-highsierra/fast/forms/plaintext-mode-2-expected.txt: Added.
* platform/mac-highsierra/fast/invalid/003-expected.txt: Added.
* platform/mac-highsierra/fast/invalid/004-expected.txt: Added.
* platform/mac-highsierra/fast/invalid/nestedh3s-expected.txt: Added.
* platform/mac-highsierra/fast/selectors/018-expected.txt: Added.
* platform/mac-highsierra/fast/table/frame-and-rules-expected.txt: Added.
* platform/mac-highsierra/fast/text/atsui-multiple-renderers-expected.txt: Added.
* platform/mac-highsierra/fast/text/bidi-embedding-pop-and-push-same-expected.txt: Added.
* platform/mac-highsierra/fast/text/font-weights-expected.txt: Added.
* platform/mac-highsierra/fast/text/font-weights-zh-expected.txt: Added.
* platform/mac-highsierra/fast/text/indic-expected.txt: Added.
* platform/mac-highsierra/fast/text/international/complex-character-based-fallback-expected.txt:
* platform/mac-highsierra/svg/W3C-SVG-1.1/animate-elem-46-t-expected.txt: Added.
* platform/mac-highsierra/svg/W3C-SVG-1.1/struct-use-01-t-expected.txt: Added.
* platform/mac-highsierra/svg/batik/text/textStyles-expected.txt: Added.
* platform/mac-highsierra/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt: Added.
* platform/mac-highsierra/tables/mozilla/other/wa_table_tr_align-expected.txt: Added.

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

2 years agoTurn on support for Beacon API by default in STP
cdumez@apple.com [Thu, 10 Aug 2017 22:42:29 +0000 (22:42 +0000)]
Turn on support for Beacon API by default in STP
https://bugs.webkit.org/show_bug.cgi?id=175445
<rdar://problem/33836379>

Reviewed by Youenn Fablet.

* Shared/WebPreferencesDefinitions.h:

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

2 years agoAX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
n_wang@apple.com [Thu, 10 Aug 2017 22:15:49 +0000 (22:15 +0000)]
AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
https://bugs.webkit.org/show_bug.cgi?id=175340
<rdar://problem/33782159>

Reviewed by Chris Fleizach.

Source/WebCore:

The issue here is that we manualy set the parent object of the AccessibilitySVGRoot object
and there are chances that the parent doesn't detach it properly during the parent's destroying
process. Accessing the stale parent object will lead to a crash.
Fixed this by making the parent object a weak pointer so we don't access an invalid memory.

Test: accessibility/add-children-pseudo-element.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
* accessibility/AccessibilityRenderObject.h:
(WebCore::AccessibilityRenderObject::createWeakPtr):
* accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
(WebCore::AccessibilitySVGRoot::setParent):
(WebCore::AccessibilitySVGRoot::parentObject const):
* accessibility/AccessibilitySVGRoot.h:

LayoutTests:

* accessibility/add-children-pseudo-element-expected.txt: Added.
* accessibility/add-children-pseudo-element.html: Added.
* accessibility/resources/svg-circle.svg: Added.

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

2 years agoFix iOS simulator build after change "[WTF] Move TextStream into WTF"
ryanhaddad@apple.com [Thu, 10 Aug 2017 22:08:34 +0000 (22:08 +0000)]
Fix iOS simulator build after change "[WTF] Move TextStream into WTF"
https://bugs.webkit.org/show_bug.cgi?id=175211

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-08-10
Reviewed by Myles C. Maxfield.

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

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

2 years ago[Beacon] Do connect-src CSP check on redirects as well
cdumez@apple.com [Thu, 10 Aug 2017 21:51:15 +0000 (21:51 +0000)]
[Beacon] Do connect-src CSP check on redirects as well
https://bugs.webkit.org/show_bug.cgi?id=175410
<rdar://problem/33815470>

Reviewed by Youenn Fablet.

Source/WebCore:

Pass ContentSecurityPolicy object to createPingHandle so that we can send
enough data to the NetworkProcess so do CSP checks for Ping loads such
as Beacon. For the IPC, we serialize the ContentSecurityPolicy's response
headers. Those headers are now cached in ContentSecurityPolicy for
performance reasons. CSP headers are rarely updated in practice but
sendBeacon() may get called repeatedly for a given document.

Tests: http/wpt/beacon/connect-src-beacon-redirect-allowed.sub.html
       http/wpt/beacon/connect-src-beacon-redirect-blocked.sub.html

* loader/LoaderStrategy.h:
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::startPingLoad):
* loader/PingLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::responseHeaders const):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyResponseHeaders.h:
(WebCore::ContentSecurityPolicyResponseHeaders::encode const):
(WebCore::ContentSecurityPolicyResponseHeaders::decode):

Source/WebKit:

Pass CSP Response headers to the NetworkProcess via NetworkResourceLoadParameters
when doing a PingLoad. This allows PingLoad to do CSP checks (in particular
connect-src ones) in case the ping load gets redirected. Those checks need to be
done on the NetworkProcess side at this point because there is no guarantee the
WebContent process is still around.

To do the CSP checks, PingLoad lazily reconstructs a ContentSecurityPolicy object
from the CSP response headers.

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):
(WebKit::PingLoad::contentSecurityPolicy):
* NetworkProcess/PingLoad.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::createPingHandle):
* WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

Update createPingHandle() to take in ContentSecurityPolicy
object in but no behavior change for WK1.

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::createPingHandle):
* WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

Add layout test coverage.

* http/wpt/beacon/connect-src-beacon-redirect-allowed.sub-expected.txt: Added.
* http/wpt/beacon/connect-src-beacon-redirect-allowed.sub.html: Added.
* http/wpt/beacon/connect-src-beacon-redirect-blocked.sub-expected.txt: Added.
* http/wpt/beacon/connect-src-beacon-redirect-blocked.sub.html: Added.

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

2 years ago[WTF] ThreadSpecific should not introduce additional indirection
utatane.tea@gmail.com [Thu, 10 Aug 2017 21:19:51 +0000 (21:19 +0000)]
[WTF] ThreadSpecific should not introduce additional indirection
https://bugs.webkit.org/show_bug.cgi?id=175187

Reviewed by Mark Lam.

Source/JavaScriptCore:

* runtime/Identifier.cpp:

Source/WebCore:

We drop ThreadSpecific::replace feature which is only used by
Web thread. Instead, we use ThreadSpecific<std::unique_ptr<T>> here.

While this std::unique_ptr<T> shares one instance between main thread
and web thread, this is the same to the current implementation. It is
safe because the web thread never finishes.

And for non-web thread implementation, we just use ThreadSpecific<T>,
since it is the most efficient.

* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData):
(WebCore::ThreadGlobalData::setWebCoreThreadData):
(WebCore::threadGlobalData):
We also drop StringImpl::empty() call since it is not necessary now:
StringImpl::empty data is statically initialized by using constexpr.

* platform/ThreadGlobalData.h:
We make it FAST_ALLOCATED since it is previously allocated by fast malloc
in ThreadSpecific.

Source/WTF:

ThreadSpecific sets Data* to the TLS. And Data holds T*, which
is fast allocated actual data. But ideally, we should store T
instance directly in Data instead of introducing an additional
indirection.

This patch adds storage in Data in order to embed the instance of T. The constructor
for Data will invoke the constructor for T on the embedded storage. We also drop
ThreadSpecific::replace which is only used by the web thread to set its thread specific
ThreadGlobalData to the one shared from the main thread. The existing implementation
relies on the main thread and the web thread never exiting in order for the shared
ThreadGlobalData to stay alive. We can achieve the same semantics by using a
ThreadSpecific<std::unique_ptr<T>> to hold the ThreadGlobalData instance instead.

* wtf/ThreadSpecific.h:
(WTF::ThreadSpecific::Data::construct):
(WTF::ThreadSpecific::Data::Data):
We make it fast allocated since we previously allocated ThreadSpecific T data by fastMalloc.

(WTF::ThreadSpecific::Data::~Data):
(WTF::ThreadSpecific::Data::storagePointer const):
(WTF::canBeGCThread>::get):
We also drop RELEASE_ASSERT from ::get(). We already inserted this assert to setAndConstruct(),
so when creating the member to this TLS, we execute this release assert. So it is
not necessary to execute this assertion every time we get data from this TLS.

(WTF::canBeGCThread>::set):
(WTF::canBeGCThread>::destroy):
(WTF::canBeGCThread>::setAndConstruct):
(WTF::T):
(WTF::canBeGCThread>::replace): Deleted.

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

2 years agoRemove obsolete link from webkit-queues status page
commit-queue@webkit.org [Thu, 10 Aug 2017 20:49:01 +0000 (20:49 +0000)]
Remove obsolete link from webkit-queues status page
https://bugs.webkit.org/show_bug.cgi?id=175337

Patch by obinna obike <oobike@apple.com> on 2017-08-10
Reviewed by Aakash Jain.

* QueueStatusServer/templates/recentstatus.html:
Removed the link to the ews-watcher server.

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

2 years agoMark webgl/webgl-box-shadow.html and webgl/webgl-border.html as failing for ios-device.
jbedard@apple.com [Thu, 10 Aug 2017 20:47:16 +0000 (20:47 +0000)]
Mark webgl/webgl-box-shadow.html and webgl/webgl-border.html as failing for ios-device.
https://bugs.webkit.org/show_bug.cgi?id=175437

Unreviewed test gardening.

* platform/ios-device/TestExpectations:

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

2 years agoWKPreferences should conform to NSCopying
bburg@apple.com [Thu, 10 Aug 2017 20:34:40 +0000 (20:34 +0000)]
WKPreferences should conform to NSCopying
https://bugs.webkit.org/show_bug.cgi?id=175303
<rdar://problem/33764939>

Reviewed by Dan Bernstein.

Source/WebKit:

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
Add conformance in the private header, as there is not consensus that this
needs to be API.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences copyWithZone:]):
Copy the wrapped WebPreferences instance and return its wrapper.

Tools:

Add unit test to make sure a WKPreference and its copy are
not aliased to each other or affect each other's properties.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/Copying.mm: Added.
(TEST):

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

2 years agoFix a silly typo in Compiler.h
timothy_horton@apple.com [Thu, 10 Aug 2017 19:39:28 +0000 (19:39 +0000)]
Fix a silly typo in Compiler.h

* wtf/Compiler.h:
Heature, indeed.

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

2 years agoREGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
mcatanzaro@igalia.com [Thu, 10 Aug 2017 19:31:53 +0000 (19:31 +0000)]
REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
https://bugs.webkit.org/show_bug.cgi?id=175426

Reviewed by Carlos Alberto Lopez Perez.

.:

* Source/cmake/FindGeoClue2.cmake:

Source/WebCore:

Also stop using GEOCLUE_LIBRARIES and GEOCLUE_INCLUDE_DIRS, since they are empty. Apparently
we have not actually been using the client library at all this whole time, only the D-Bus
interface.

* PlatformGTK.cmake:

Source/WebKit:

* PlatformGTK.cmake:

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

2 years agoAdd ServiceWorkerJob.
beidson@apple.com [Thu, 10 Aug 2017 19:28:26 +0000 (19:28 +0000)]
Add ServiceWorkerJob.
https://bugs.webkit.org/show_bug.cgi?id=175241

Reviewed by Tim Horton.

Source/WebCore:

Test: http/tests/workers/service/basic-register.html

This patch does a few things:
- Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least)
- Adds a ServiceWorkerProvider interface for WebKit to implement
- Actually creates a job for service worker registration and "schedules" it,
  though it always immediately errors out the promise.

Actually queuing jobs and executing asynchronously is coming up soon.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* dom/Document.cpp:
(WebCore::Document::sessionID const):
* dom/Document.h:

* workers/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::scheduleJob):
(WebCore::ServiceWorkerContainer::jobDidFinish):
* workers/ServiceWorkerContainer.h:

* workers/ServiceWorkerJob.cpp: Added.
(WebCore::ServiceWorkerJob::ServiceWorkerJob):
(WebCore::ServiceWorkerJob::~ServiceWorkerJob):
(WebCore::ServiceWorkerJob::failedWithException):
* workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
(WebCore::ServiceWorkerJob::createRegisterJob):
(WebCore::ServiceWorkerJob::identifier const):

* workers/ServiceWorkerJobClient.h: Added.
(WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient):

* workers/ServiceWorkerProvider.cpp: Added.
(WebCore::ServiceWorkerProvider::singleton):
(WebCore::ServiceWorkerProvider::setSharedProvider):
* workers/ServiceWorkerProvider.h: Added.
* workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
* workers/ServiceWorkerRegistrationParameters.cpp: Added.
* workers/ServiceWorkerRegistrationParameters.h: Added.

Source/WebKit:

* CMakeLists.txt:
* WebKit.xcodeproj/project.pbxproj:

* WebProcess/Storage/WebServiceWorkerProvider.cpp: Added.
(WebKit::WebServiceWorkerProvider::singleton):
(WebKit::WebServiceWorkerProvider::WebServiceWorkerProvider):
(WebKit::WebServiceWorkerProvider::scheduleJob):
* WebProcess/Storage/WebServiceWorkerProvider.h: Added.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

LayoutTests:

Verifies that the "serviceWorker.register()" job we currently schedule fails as expected.

* http/tests/workers/service/basic-register-expected.txt: Added.
* http/tests/workers/service/basic-register.html: Added.
* http/tests/workers/service/resources/basic-register.js: Added.
* http/tests/workers/service/resources/empty-worker.js: Added.
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

2 years agoRemove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
timothy_horton@apple.com [Thu, 10 Aug 2017 19:05:51 +0000 (19:05 +0000)]
Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

Source/JavaScriptCore:

* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):

Source/WebCore:

* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):

Source/WebKit:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):

Tools:

* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
(TestWebKitAPI::TEST_F):

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

2 years agoFix duplicated code from r220534.
lforschler@apple.com [Thu, 10 Aug 2017 18:57:22 +0000 (18:57 +0000)]
Fix duplicated code from r220534.

Unreviewed cleanup.

* Scripts/bisect-builds:

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

2 years ago[WebCrypto] Enable SerializedCryptoKeyWrapTest in iOS
jiewen_tan@apple.com [Thu, 10 Aug 2017 18:47:56 +0000 (18:47 +0000)]
[WebCrypto] Enable SerializedCryptoKeyWrapTest in iOS
https://bugs.webkit.org/show_bug.cgi?id=175344
<rdar://problem/28507240>

Reviewed by Alexey Proskuryakov.

Add entitlements to TestWebKitAPI project for iOS. Then add Keychain Access entitlement to the project.
Finally enable the existing tests for iOS.

* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: Added.
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/cocoa/SerializedCryptoKeyWrap.mm:

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

2 years agoUnreviewed, rolling out r220463.
commit-queue@webkit.org [Thu, 10 Aug 2017 18:27:01 +0000 (18:27 +0000)]
Unreviewed, rolling out r220463.
https://bugs.webkit.org/show_bug.cgi?id=175435

unaccepted fix (Requested by n_wang on #webkit).

Reverted changeset:

"AX: crash at
WebCore::AccessibilityObject::supportsARIALiveRegion() const +
24"
https://bugs.webkit.org/show_bug.cgi?id=175340
http://trac.webkit.org/changeset/220463

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

2 years agoWrite a tool to bisect WebKit builds
lforschler@apple.com [Thu, 10 Aug 2017 18:22:01 +0000 (18:22 +0000)]
Write a tool to bisect WebKit builds
https://bugs.webkit.org/show_bug.cgi?id=174596

Reviewed by Dean Johnson and Kocsen Chung.

* Scripts/bisect-builds: Added.
(bisect_builds): main bisection algorithm
(download_archive):download an archive from S3 using existing tools
(extract_archive):extract an archive using existing tools
(find_le):Find rightmost value less than or equal to x
(find_ge):Find leftmost item greater than or equal to x
(get_api_url):generate url for the rest api/database
(get_indices_from_revisions):convert revisions to list indexes for bisection
(get_sorted_revisions):retrieve sorted revision list
(get_s3_location_for_revision):calculate the S3 archive storage location
(parse_args):parse command line arguments
(pick_next_build):compute the next build to bisect
(prompt_did_reproduce):prompt user for direction for bisection
(set_webkit_output_dir):set the folder for bisected builds to avoid overwriting engineering build output
(test_archive):Platform specific logic to test downloaded archive
(minified_platforms):return a list of minified platforms in the database
(unminified_platforms):return a list of full platforms in the database
(is_supported_platform):check if platform is supported
(validate_options):validate command line options
(main):

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

2 years agoRemove bisect-builds script.
lforschler@apple.com [Thu, 10 Aug 2017 18:17:07 +0000 (18:17 +0000)]
Remove bisect-builds script.
https://bugs.webkit.org/show_bug.cgi?id=175433

Reviewed by Aakash Jain.

* Scripts/bisect-builds: Removed.

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

2 years agoRemove ENABLE_GAMEPAD_DEPRECATED
mcatanzaro@igalia.com [Thu, 10 Aug 2017 17:04:46 +0000 (17:04 +0000)]
Remove ENABLE_GAMEPAD_DEPRECATED
https://bugs.webkit.org/show_bug.cgi?id=175361

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindGUdev.cmake: Removed.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* platform/Linux.cmake: Removed.
* platform/gamepad/deprecated/Gamepads.h: Removed.
* platform/gamepad/glib/GamepadsGlib.cpp: Removed.
* platform/gamepad/linux/GamepadDeviceLinux.cpp: Removed.
* platform/gamepad/linux/GamepadDeviceLinux.h: Removed.

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoAddressing post-review comments after r219173.
mmaxfield@apple.com [Thu, 10 Aug 2017 16:59:28 +0000 (16:59 +0000)]
Addressing post-review comments after r219173.
https://bugs.webkit.org/show_bug.cgi?id=174149

Unreviewed.

* css/CSSFontStyleValue.h:
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):

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