Timeline



Aug 6, 2017:

11:06 PM Changeset in webkit [220329] by Carlos Garcia Campos
  • 24 edits
    3 adds in trunk

[GTK][WPE] Add API to provide browser information required by automation
https://bugs.webkit.org/show_bug.cgi?id=175130

Source/JavaScriptCore:

Reviewed by Brian Burg.

Add browserName and browserVersion to RemoteInspector::Client::Capabilities and virtual methods to the Client to
get them.

  • inspector/remote/RemoteInspector.cpp:

(Inspector::RemoteInspector::updateClientCapabilities): Update also browserName and browserVersion.

  • inspector/remote/RemoteInspector.h:
  • inspector/remote/glib/RemoteInspectorGlib.cpp:

(Inspector::RemoteInspector::requestAutomationSession): Call updateClientCapabilities() after the session is
requested to ensure they are updated before StartAutomationSession reply is sent.

  • inspector/remote/glib/RemoteInspectorServer.cpp: Add browserName and browserVersion as return values of

StartAutomationSession mesasage.

Source/WebDriver:

Reviewed by Brian Burg.

  • Session.cpp:

(WebDriver::Session::createTopLevelBrowsingContext): Check if startAutomationSession and complete the command
with error in that case.

  • SessionHost.h:
  • glib/SessionHostGlib.cpp:

(WebDriver::SessionHost::matchCapabilities): Match the capabilities that are known only after the browser has
been launched.
(WebDriver::SessionHost::startAutomationSession): Handle the StartAutomationSession response, extracting the
capabilities and calling matchCapabilities() to match them.
(WebDriver::SessionHost::setTargetList): Return early if the session was rejected before due to invalid
capabilities.

Source/WebKit:

Reviewed by Michael Catanzaro.

When a new automation session is started, the web driver receives some required capabilities from the client,
like browser name and version. The session should be rejected if those required capabilities don't match with
the actual browser that is launched. We don't know that information in WebKit, so we need to add API so that
users can provide it when a new session request is made. This patch adds boxed object WebKitApplicationInfo that
can be used to set the application name and version. This object can be set to a WebKitAutomationSession when
WebKitWebContext::automation-started signal is emitted.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • UIProcess/API/glib/WebKitApplicationInfo.cpp: Added.

(webkit_application_info_new):
(webkit_application_info_ref):
(webkit_application_info_unref):
(webkit_application_info_set_name):
(webkit_application_info_get_name):
(webkit_application_info_set_version):
(webkit_application_info_get_version):

  • UIProcess/API/glib/WebKitAutomationSession.cpp:

(webkitAutomationSessionDispose):
(webkit_automation_session_class_init):
(webkitAutomationSessionGetBrowserName):
(webkitAutomationSessionGetBrowserVersion):
(webkit_automation_session_set_application_info):
(webkit_automation_session_get_application_info):

  • UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
  • UIProcess/API/glib/WebKitWebContext.cpp:
  • UIProcess/API/gtk/WebKitApplicationInfo.h: Added.
  • UIProcess/API/gtk/WebKitAutomationSession.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:
  • UIProcess/API/wpe/WebKitApplicationInfo.h: Added.
  • UIProcess/API/wpe/WebKitAutomationSession.h:
  • UIProcess/API/wpe/webkit.h:

Tools:

Reviewed by Michael Catanzaro.

  • MiniBrowser/gtk/main.c:

(automationStartedCallback): Set browser information when a new automation session is started.

  • TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:

(testAutomationSessionApplicationInfo):
(beforeAll):

8:24 PM Changeset in webkit [220328] by Ryan Haddad
  • 6 edits
    1 delete in trunk/Tools

Unreviewed, rolling out r220295.

This change introduced 4 errors in webkitpy tests.

Reverted changeset:

"[XCode] webkit-patch should run sort-Xcode-project-file"
https://bugs.webkit.org/show_bug.cgi?id=174036
http://trac.webkit.org/changeset/220295

8:00 PM Changeset in webkit [220327] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable API test NowPlayingControlsTests.NowPlayingControlsIOS.

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/NowPlayingControlsTests.mm:

(TestWebKitAPI::TEST):

5:06 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
4:34 PM Changeset in webkit [220326] by clopez@igalia.com
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
https://bugs.webkit.org/show_bug.cgi?id=175125

Reviewed by Michael Catanzaro.

Some platforms define cflags on the (E)GL pkg-config files that we
need to pass to the build system when including the (E)GL headers.
And we are already doing this when building WebCore (after r184954).

But now we need to do this also on WebKit (former WebKit2) because
we include (E)GL headers (and make use of them) on the UIProcess.

  • CMakeLists.txt:
4:24 PM Changeset in webkit [220325] by jcraig@apple.com
  • 3 edits in trunk/Websites/webkit.org

2017-08-06 James Craig <jcraig@apple.com>

Update prefers-reduced-motion demos to link back to blog post
https://bugs.webkit.org/show_bug.cgi?id=175251

Unreviewed, added some cross links to older demo files.

  • blog-files/prefers-reduced-motion/axi.htm:
  • blog-files/prefers-reduced-motion/prm.htm:
10:57 AM Changeset in webkit [220324] by Yusuke Suzuki
  • 4 edits
    1 add in trunk

Promise resolve and reject function should have length = 1
https://bugs.webkit.org/show_bug.cgi?id=175242

Reviewed by Saam Barati.

JSTests:

  • stress/builtin-function-length.js: Added.

(shouldBe):
(shouldThrow):
(shouldBe.JSON.stringify.Object.getOwnPropertyDescriptor):
(shouldBe.JSON.stringify.Object.getOwnPropertyNames.Array.prototype.filter.sort):

Source/JavaScriptCore:

Previously we have separate system for "length" and "name" for builtin functions.
The builtin functions do not use lazy reifying system. Instead, they have direct
properties when instantiating it. While the function created for properties (like
Array.prototype.filter) is created by JSFunction::createBuiltin(), function inside
these builtin functions are just created by JSFunction::create(). Since it does
not set any values for "length", these functions do not have "length" property.
So, the resolve and reject functions passed to Promise's executor do not have
"length" property.

This patch make builtin functions use standard lazy reifying system for "length".
So, "length" property of the builtin function just works as if the normal functions
do.

  • runtime/JSFunction.cpp:

(JSC::JSFunction::createBuiltinFunction):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):
(JSC::JSFunction::reifyLazyPropertyIfNeeded):
(JSC::JSFunction::reifyLazyPropertyForHostOrBuiltinIfNeeded):
(JSC::JSFunction::reifyLazyLengthIfNeeded):
(JSC::JSFunction::reifyLazyBoundNameIfNeeded):
(JSC::JSFunction::reifyBoundNameIfNeeded): Deleted.

  • runtime/JSFunction.h:
6:04 AM Changeset in webkit [220323] by gskachkov@gmail.com
  • 8 edits
    1 add in trunk

[Next] Async iteration - Implement Async Generator - parser
https://bugs.webkit.org/show_bug.cgi?id=175210

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/async-await-syntax.js:

(testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax):

  • stress/async-iteration-syntax.js: Added.

(assert):
(checkSyntax):
(checkSyntaxError):
(checkSimpleAsyncGeneratorSloppyMode):
(checkSimpleAsyncGeneratorStrictMode):
(checkNestedAsyncGenerators):
(checkSimpleAsyncGeneratorSyntaxErrorInStrictMode):

  • stress/generator-class-methods-syntax.js:

Source/JavaScriptCore:

Current implementation is draft version of Async Iteration.
Link to spec https://tc39.github.io/proposal-async-iteration/

Current patch implement only parser part of the Async generator
Runtime part will be in next ptches

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createFunctionMetadata):

  • parser/Parser.cpp:

(JSC::getAsynFunctionBodyParseMode):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::stringArticleForFunctionMode):
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePropertyMethod):
(JSC::Parser<LexerType>::parseAsyncFunctionExpression):

  • parser/Parser.h:

(JSC::Scope::setSourceParseMode):

  • parser/ParserModes.h:

(JSC::isFunctionParseMode):
(JSC::isAsyncFunctionParseMode):
(JSC::isAsyncArrowFunctionParseMode):
(JSC::isAsyncGeneratorFunctionParseMode):
(JSC::isAsyncFunctionOrAsyncGeneratorWrapperParseMode):
(JSC::isAsyncFunctionWrapperParseMode):
(JSC::isAsyncFunctionBodyParseMode):
(JSC::isGeneratorMethodParseMode):
(JSC::isAsyncMethodParseMode):
(JSC::isAsyncGeneratorMethodParseMode):
(JSC::isMethodParseMode):
(JSC::isGeneratorOrAsyncFunctionBodyParseMode):
(JSC::isGeneratorOrAsyncFunctionWrapperParseMode):

Aug 5, 2017:

9:43 PM Changeset in webkit [220322] by fpizlo@apple.com
  • 18 edits
    2 adds in trunk

REGRESSION (r219895-219897): Number of leaks on Open Source went from 9240 to 235983 and is now at 302372
https://bugs.webkit.org/show_bug.cgi?id=175083

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

This fixes the leak by making MarkedBlock::specializedSweep call destructors when the block is empty,
even if we are using the pop path.

Also, this fixes HeapCellInlines.h to no longer include MarkedBlockInlines.h. That's pretty
important, since MarkedBlockInlines.h is the GC's internal guts - we don't want to have to recompile
the world just because we changed it.

Finally, this adds a new testing SPI for waiting for all VMs to finish destructing. This makes it
easier to debug leaks.

  • bytecode/AccessCase.cpp:
  • bytecode/PolymorphicAccess.cpp:
  • heap/HeapCell.cpp:

(JSC::HeapCell::isLive):

  • heap/HeapCellInlines.h:

(JSC::HeapCell::isLive): Deleted.

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::tryAllocateWithoutCollecting):
(JSC::MarkedAllocator::endMarking):

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::specializedSweep):

  • jit/AssemblyHelpers.cpp:
  • jit/Repatch.cpp:
  • runtime/TestRunnerUtils.h:
  • runtime/VM.cpp:

(JSC::waitForVMDestruction):
(JSC::VM::~VM):

Source/WTF:

Adds a classic ReadWriteLock class. I wrote my own because I can never remember if the pthread one is
guaranted to bias in favor of writers or not.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Condition.h:

(WTF::ConditionBase::construct):
(WTF::Condition::Condition):

  • wtf/Lock.h:

(WTF::LockBase::construct):
(WTF::Lock::Lock):

  • wtf/ReadWriteLock.cpp: Added.

(WTF::ReadWriteLockBase::construct):
(WTF::ReadWriteLockBase::readLock):
(WTF::ReadWriteLockBase::readUnlock):
(WTF::ReadWriteLockBase::writeLock):
(WTF::ReadWriteLockBase::writeUnlock):

  • wtf/ReadWriteLock.h: Added.

(WTF::ReadWriteLockBase::ReadLock::tryLock):
(WTF::ReadWriteLockBase::ReadLock::lock):
(WTF::ReadWriteLockBase::ReadLock::unlock):
(WTF::ReadWriteLockBase::WriteLock::tryLock):
(WTF::ReadWriteLockBase::WriteLock::lock):
(WTF::ReadWriteLockBase::WriteLock::unlock):
(WTF::ReadWriteLockBase::read):
(WTF::ReadWriteLockBase::write):
(WTF::ReadWriteLock::ReadWriteLock):

Tools:

Leaks results are super confusing if leaks runs while some VMs are destructing. This calls a new SPI
to wait for VM destructions to finish before running the next test. This makes it easier to
understand leaks results from workers tests, and leads to fewer reported leaks.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(runTest):

4:48 PM Changeset in webkit [220321] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

check-webkit-style: fix path-specific rules for WebKit2 rename
https://bugs.webkit.org/show_bug.cgi?id=175182

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-08-05
Reviewed by David Kilzer.

  • Scripts/webkitpy/style/checker.py:
3:11 PM Changeset in webkit [220320] by commit-queue@webkit.org
  • 15 edits in trunk

[Fetch API] Response should keep all ResourceResponse information
https://bugs.webkit.org/show_bug.cgi?id=175099

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-05
Reviewed by Sam Weinig.

Source/WebCore:

No change of behavior, covered by existing tests.

Disabling filtering of resource response at DocumentThreadableLoader for fetch API and doing the filtering at FetchResponse level.
This requires passing the tainting parameter to FetchResponse. For that purpose, we store the tainting on the ResourceResponse itself.
This allows mimicking the concept of internal response from the fetch spec.
This might be useful for future developments related to caching the responses.

The body is now also stored in FetchResponse so a flag is added to ensure we only expose the body if allowed.

Changing storage of opaque redirect information to keep the redirection information in the response.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::blob):
(WebCore::FetchBodyOwner::consumeNullBody):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didReceiveResponse):
(WebCore::FetchResponse::consume):
(WebCore::FetchResponse::consumeBodyAsStream):
(WebCore::FetchResponse::createReadableStreamSource):

  • Modules/fetch/FetchResponse.h:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::responseReceived):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/DocumentThreadableLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::setBodyDataFrom):
(WebCore::CachedResource::setResponse):

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::crossThreadData const):
(WebCore::ResourceResponseBase::fromCrossThreadData):
(WebCore::ResourceResponseBase::filter):

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::setTainting):
(WebCore::ResourceResponseBase::tainting const):
(WebCore::ResourceResponseBase::encode const):
(WebCore::ResourceResponseBase::decode):

LayoutTests:

Updating test now that we are no longer cancelling the load in case of opaque responses.

  • http/tests/inspector/network/fetch-network-data-expected.txt:
  • http/tests/inspector/network/fetch-network-data.html:
11:59 AM Changeset in webkit [220319] by commit-queue@webkit.org
  • 10 edits in trunk/LayoutTests/imported/w3c

[Cache API] Add Cache and CacheStorage IDL definitions
https://bugs.webkit.org/show_bug.cgi?id=175201
<rdar://problem/33738001>

Unreviewed.
Rebasing test expectations after http://trac.webkit.org/changeset/220310.

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-05

  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt:
7:10 AM Changeset in webkit [220318] by mark.lam@apple.com
  • 5 edits
    1 delete in trunk/Source/JavaScriptCore

Move DFG::OSRExitCompiler methods into DFG::OSRExit [step 3].
https://bugs.webkit.org/show_bug.cgi?id=175228
<rdar://problem/33735737>

Reviewed by Saam Barati.

Merge the 32-bit OSRExit::compileExit() method into the 64-bit version, and
delete OSRExit32_64.cpp.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExit32_64.cpp: Removed.
  • jit/GPRInfo.h:

(JSC::JSValueSource::payloadGPR const):

4:14 AM Changeset in webkit [220317] by Carlos Garcia Campos
  • 9 edits in trunk/Source

WebDriver: Implement page load strategy
https://bugs.webkit.org/show_bug.cgi?id=175183

Reviewed by Brian Burg.

Source/WebDriver:

Validate and parse page load strategy when processing capabilities.

  • Capabilities.h:
  • Session.cpp:

(WebDriver::Session::pageLoadStrategyString const): Helper to get the page load strategy as a String to be
passed to Automation.
(WebDriver::Session::go): Pass page load strategy if present.
(WebDriver::Session::back): Ditto.
(WebDriver::Session::forward): Ditto.
(WebDriver::Session::refresh): Ditto.
(WebDriver::Session::waitForNavigationToComplete): Ditto.

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::deserializePageLoadStrategy):
(WebDriver::WebDriverService::parseCapabilities const):
(WebDriver::WebDriverService::validatedCapabilities const):
(WebDriver::WebDriverService::newSession):

Source/WebKit:

Split pending navigation maps into normal and eager, and use one or the other depending on the received page
load strategy. We need to keep different maps for every page load strategy because every command could use a
different strategy.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::waitForNavigationToComplete): Extract page load strategy from parameter and pass
it to waitForNavigationToCompleteOnPage() and waitForNavigationToCompleteOnFrame().
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Return early if page load strategy is
none. Otherwise at the pening callback to the normal or eager map depeding on the page load straegy.
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Ditto.
(WebKit::respondToPendingNavigationCallbacksWithTimeout): Helper to send pening navigation callback in case of
timeout failure.
(WebKit::WebAutomationSession::loadTimerFired): Call finishPendingNavigationsWithTimeoutFailure() with all the maps.
(WebKit::WebAutomationSession::navigateBrowsingContext): Extract page load strategy from parameter and pass it
to waitForNavigationToCompleteOnPage().
(WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
(WebKit::WebAutomationSession::navigationOccurredForFrame): Use the normal maps.
(WebKit::WebAutomationSession::documentLoadedForFrame): Stop timeout timer and dispatch eager pending navigations.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Notify the automation session.

3:32 AM Changeset in webkit [220316] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebDriver

Unreviewed. Try to fix build with clang after r220315.

  • WebDriverService.cpp:

(WebDriver::WebDriverService::validatedCapabilities const):
(WebDriver::WebDriverService::mergeCapabilities const):

2:27 AM Changeset in webkit [220315] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebDriver

WebDriver: properly handle capabilities and process firstMatch too
https://bugs.webkit.org/show_bug.cgi?id=174618

Reviewed by Brian Burg.

Implement processing of capabilities following the spec. This patch adds validation, merging and matching of
capabilities.

7.2 Processing Capabilities.
https://w3c.github.io/webdriver/webdriver-spec.html#processing-capabilities

  • Capabilities.h: Make all capabilities optional and move Timeouts struct here.
  • Session.h:
  • WebDriverService.cpp:

(WebDriver::deserializeTimeouts): Helper to extract timeouts from JSON object.
(WebDriver::WebDriverService::parseCapabilities const): At this point capabilities have already been validated,
so we just need to get them without checking the value type.
(WebDriver::WebDriverService::validatedCapabilities const): Validate the given capabilities, ensuring types of
values are the expected one.
(WebDriver::WebDriverService::mergeCapabilities const): Merge the alwaysMatch and firstMatch capabilities into a
single object ensuring that the same capability is not in both.
(WebDriver::WebDriverService::matchCapabilities const): Try to match the merged capabilities againt the platform
expected capabilities.
(WebDriver::WebDriverService::processCapabilities const): Validate, merge and match the capabilities.
(WebDriver::WebDriverService::newSession): Use processCapabilities(). Also initialize the timeouts from
capabilities and add all capabilities to the command result.
(WebDriver::WebDriverService::setTimeouts): Use deserializeTimeouts().

  • WebDriverService.h:
  • glib/SessionHostGlib.cpp:

(WebDriver::SessionHost::launchBrowser): Updated to properly access the capabilities that are now optional.
(WebDriver::SessionHost::startAutomationSession): Add FIXME.

  • gtk/WebDriverServiceGtk.cpp:

(WebDriver::WebDriverService::platformCapabilities): Return the Capabilities with the known required ones filled.
(WebDriver::WebDriverService::platformValidateCapability const): Validate webkitgtk:browserOptions.
(WebDriver::WebDriverService::platformMatchCapability const): This does nothing for now.
(WebDriver::WebDriverService::platformCompareBrowserVersions): Compare the given browser versions.
(WebDriver::WebDriverService::platformParseCapabilities const): Updated now that capabilites have already been
validated before.

1:11 AM Changeset in webkit [220314] by Carlos Garcia Campos
  • 17 edits in trunk/Source

WebDriver: use in-view center point for clicks instead of bounding box center point
https://bugs.webkit.org/show_bug.cgi?id=174863

Reviewed by Simon Fraser.

Source/WebCore:

Make DOMRect, and FloatPoint::narrowPrecision() available to WebKit layer. Also add
FrameView::clientToDocumentPoint().

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.h:
  • page/FrameView.h:
  • platform/graphics/FloatPoint.h:

Source/WebDriver:

The center of the element bounding box is not always part of the element, like in multiline links, for example.

11.1 Element Interactability.
https://www.w3.org/TR/webdriver/#dfn-in-view-center-point

  • CommandResult.cpp:

(WebDriver::CommandResult::httpStatusCode): Add ElementClickIntercepted and ElementNotInteractable errors.
(WebDriver::CommandResult::errorString): Ditto.

  • CommandResult.h: Ditto.
  • Session.cpp:

(WebDriver::Session::computeElementLayout): Get the in-view center point and isObscured from the result too.
(WebDriver::Session::getElementRect): Ignore in-view center point and isObscured.
(WebDriver::Session::elementClick): Fail in case the element is not interactable or is obscured.

  • Session.h:

Source/WebKit:

Change computeElementLayout to also return the in-view center point and whether it's obscured by another
element.

  • UIProcess/Automation/Automation.json: Add optional inViewCenterPoint to the result and isObscured.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::didComputeElementLayout): Handle inViewCenterPoint and isObscured.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::elementInViewClientCenterPoint): Get the client in-view center point and whether it's obscured
according to the spec.
(WebKit::WebAutomationSessionProxy::computeElementLayout): Pass inViewCenterPoint and isObscured to
DidComputeElementLayout message.

1:08 AM Changeset in webkit [220313] by Carlos Garcia Campos
  • 3 edits
    6 adds in trunk

getClientRects doesn't work with list box option elements
https://bugs.webkit.org/show_bug.cgi?id=175016

Reviewed by Darin Adler.

Source/WebCore:

Since HTMLOptionElement and HTMLOptGroupElement don't have a renderer, we are always returning an empty list
from getClientRects. This is working fine in both chromium and firefox, option elements return its own bounding
box and group elements return the bounding box of the group label and all its children items.

Test: fast/dom/HTMLSelectElement/listbox-items-client-rects.html

  • dom/Element.cpp:

(WebCore::listBoxElementBoundingBox): Helper function to return the bounding box of a HTMLOptionElement or
HTMLOptGroupElement element.
(WebCore::Element::getClientRects): Use listBoxElementBoundingBox() in case of HTMLOptionElement or
HTMLOptGroupElement.
(WebCore::Element::boundingClientRect): Ditto.

LayoutTests:

Add new test to check list box option elements client rects.

  • fast/dom/HTMLSelectElement/listbox-items-client-rects-expected.txt: Added.
  • fast/dom/HTMLSelectElement/listbox-items-client-rects.html: Added.
  • platform/ios-simulator-wk2/fast/dom/HTMLSelectElement/listbox-items-client-rects-expected.txt: Added.
12:57 AM Changeset in webkit [220312] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Automation: files selected for upload should be matched against 'accept' attribute values case-insensitively
https://bugs.webkit.org/show_bug.cgi?id=175191
<rdar://problem/33725790>

Reviewed by Carlos Garcia Campos.

Values of the "accept" attribute are to be compared in a case-insensitive manner, per
https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file)

Except for converting MIME types and extensions to lowercase, most of these changes
were lost in a rebase prior to landing the patch.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::fileCanBeAcceptedForUpload): Fix some issues:

  • Handle a file ending in a period.
  • Handle MIME type inference failing.
  • Convert extensions and MIMEs to lower case, per specification.

(WebKit::WebAutomationSession::handleRunOpenPanel):

  • Strip the leading period from file extensions.
  • These range converters crash unless the API::Array is retained by a local variable.

Aug 4, 2017:

10:06 PM Changeset in webkit [220311] by commit-queue@webkit.org
  • 29 edits
    1 copy
    47 adds in trunk

[Cache API] Add Cache and CacheStorage IDL definitions
https://bugs.webkit.org/show_bug.cgi?id=175201

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-04
Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/cache-storage/common.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-add.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-delete.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-storage-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-storage-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/cache-storage.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/window/sandboxed-iframes.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-add.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-delete.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-put.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-storage-keys.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-storage-match.https-expected.txt: Added.
  • web-platform-tests/service-workers/cache-storage/worker/cache-storage.https-expected.txt: Added.
  • web-platform-tests/service-workers/stub-4.6.2-cache-expected.txt: Added.
  • web-platform-tests/service-workers/stub-4.6.3-cache-storage-expected.txt: Added.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Covered by activated tests.
Adding IDLs as per https://www.w3.org/TR/service-workers-1/#idl-index.
Implementation is guarded by a runtime flag which is off by default.
It is off for DRT but on for WTR.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/cache/Cache.cpp: Added.

(WebCore::Cache::match):
(WebCore::Cache::matchAll):
(WebCore::Cache::add):
(WebCore::Cache::addAll):
(WebCore::Cache::put):
(WebCore::Cache::remove):
(WebCore::Cache::keys):

  • Modules/cache/Cache.h: Added.

(WebCore::Cache::create):
(WebCore::Cache::Cache):

  • Modules/cache/Cache.idl: Added.
  • Modules/cache/CacheQueryOptions.h: Added.
  • Modules/cache/CacheQueryOptions.idl: Added.
  • Modules/cache/CacheStorage.cpp: Added.

(WebCore::CacheStorage::match):
(WebCore::CacheStorage::has):
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
(WebCore::CacheStorage::keys):

  • Modules/cache/CacheStorage.h: Added.

(WebCore::CacheStorage::create):

  • Modules/cache/CacheStorage.idl: Added.
  • Modules/cache/DOMWindowCaches.cpp: Added.

(WebCore::DOMWindowCaches::DOMWindowCaches):
(WebCore::DOMWindowCaches::supplementName):
(WebCore::DOMWindowCaches::from):
(WebCore::DOMWindowCaches::caches):
(WebCore::DOMWindowCaches::caches const):

  • Modules/cache/DOMWindowCaches.h: Added.
  • Modules/cache/DOMWindowCaches.idl: Added.
  • Modules/cache/WorkerGlobalScopeCaches.cpp: Added.

(WebCore::WorkerGlobalScopeCaches::supplementName):
(WebCore::WorkerGlobalScopeCaches::from):
(WebCore::WorkerGlobalScopeCaches::caches):
(WebCore::WorkerGlobalScopeCaches::caches const):

  • Modules/cache/WorkerGlobalScopeCaches.h: Added.
  • Modules/cache/WorkerGlobalScopeCaches.idl: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCacheAPIEnabled):
(WebCore::RuntimeEnabledFeatures::cacheAPIEnabled const):

Source/WebKit:

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences cacheAPIEnabled]):
(-[WebPreferences setCacheAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setCacheAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/mac-highsierra/js/dom/global-constructors-attributes-expected.txt:
9:59 PM Changeset in webkit [220310] by beidson@apple.com
  • 40 edits
    1 copy
    1 add in trunk

Have navigator.serviceWorker() actually return a ServiceWorkerContainer object.
https://bugs.webkit.org/show_bug.cgi?id=175215

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/FileAPI/historical.https-expected.txt:
  • web-platform-tests/background-fetch/interfaces-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.https-expected.txt:
  • web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt:
  • web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt:

Source/WebCore:

  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::serviceWorker): Actually create and remember an object.

  • page/NavigatorBase.h:
  • workers/ServiceWorkerContainer.cpp:

(WebCore::rejectLater): Asynchronously reject the given promise with an error message.
(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::refEventTarget): Ref the underlying Navigator.
(WebCore::ServiceWorkerContainer::derefEventTarget): Deref the underlying Navigator.
(WebCore::ServiceWorkerContainer::ready): rejectLater the promise.
(WebCore::ServiceWorkerContainer::addRegistration): Ditto.
(WebCore::ServiceWorkerContainer::getRegistration): Ditto.
(WebCore::ServiceWorkerContainer::getRegistrations): Ditto.

  • workers/ServiceWorkerContainer.h:

LayoutTests:

  • platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt.
7:14 PM Changeset in webkit [220309] by BJ Burg
  • 3 edits in trunk/Source/WebKit

Expose WKPreferences SPI for toggling mock capture devices prompt
https://bugs.webkit.org/show_bug.cgi?id=175227
<rdar://problem/33734528>

Reviewed by Youenn Fablet.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mockCaptureDevicesPromptEnabled]):
(-[WKPreferences _setMockCaptureDevicesPromptEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
6:01 PM Changeset in webkit [220308] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix typo in testmasm.cpp: ENABLE(JSVALUE64) should be USE(JSVALUE64).
https://bugs.webkit.org/show_bug.cgi?id=175230
<rdar://problem/33735857>

Reviewed by Saam Barati.

  • assembler/testmasm.cpp:

(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):

5:20 PM Changeset in webkit [220307] by msaboff@apple.com
  • 1 edit
    39 adds in trunk/PerformanceTests

Create a new JavaScript RegExp benchmark
https://bugs.webkit.org/show_bug.cgi?id=175225

Reviewed by JF Bastien.

This is a new benchmark for Regular Expressions. It borrows regex-dna from
SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic,
and adds a new flight planner benchmark that uses RegExp's for textual parsing.

There needs to be some additions and changes to some of the textual content.
This includes adding more BASIC programs to the Basic test and increasing
keyword usage in the Flight Planner to increase the 16-bit coverage.

The intent is to grow this benchmark by adding a JavaScript implementation of the
offline assembler lexer and parser as well as adding some targeted micro benchmark
tests.

  • RexBench: Added.
  • RexBench/Basic: Added.
  • RexBench/Basic/ast.js: Added.
  • RexBench/Basic/basic.js: Added.
  • RexBench/Basic/benchmark.js: Added.
  • RexBench/Basic/caseless_map.js: Added.
  • RexBench/Basic/lexer.js: Added.
  • RexBench/Basic/number.js: Added.
  • RexBench/Basic/parser.js: Added.
  • RexBench/Basic/random.js: Added.
  • RexBench/Basic/state.js: Added.
  • RexBench/Basic/stress-test.js: Added.
  • RexBench/Basic/util.js: Added.
  • RexBench/FlightPlanner: Added.
  • RexBench/FlightPlanner/airways.js: Added.
  • RexBench/FlightPlanner/benchmark.js: Added.
  • RexBench/FlightPlanner/convert-nfdc.py: Added.
  • RexBench/FlightPlanner/expectations.js: Added.
  • RexBench/FlightPlanner/flight_planner.js: Added.
  • RexBench/FlightPlanner/use_unicode.js: Added.
  • RexBench/FlightPlanner/waypoints.js: Added.
  • RexBench/Octane2: Added.
  • RexBench/Octane2/base.js: Added.
  • RexBench/Octane2/regexp.js: Added.
  • RexBench/SunSpider: Added.
  • RexBench/SunSpider/regex-dna.js: Added.
  • RexBench/about.html: Added.
  • RexBench/basic_benchmark.js: Added.
  • RexBench/cli.js: Added.
  • RexBench/driver.js: Added.
  • RexBench/flightplan_benchmark.js: Added.
  • RexBench/flightplan_unicode_benchmark.js: Added.
  • RexBench/glue.js: Added.
  • RexBench/index.html: Added.
  • RexBench/octane2_benchmark.js: Added.
  • RexBench/results.js: Added.
  • RexBench/stats.js: Added.
  • RexBench/styles.css: Added.
  • RexBench/sunspider_benchmark.js: Added.
5:04 PM Changeset in webkit [220306] by mark.lam@apple.com
  • 9 edits
    1 move
    3 deletes in trunk/Source/JavaScriptCore

Move DFG::OSRExitCompiler methods into DFG::OSRExit [step 2].
https://bugs.webkit.org/show_bug.cgi?id=175214
<rdar://problem/33733308>

Rubber-stamped by Michael Saboff.

Copy the 64-bit and common methods into DFGOSRExit.cpp, and delete the unused
DFGOSRExitCompiler files.

Also renamed DFGOSRExitCompiler32_64.cpp to DFGOSRExit32_64.cpp.

Also move debugOperationPrintSpeculationFailure() into DFGOSRExit.cpp. It's only
used by compileOSRExit(), and will be changed to not be a DFG operation function
when we use JIT probes for DFG OSR exits later in
https://bugs.webkit.org/show_bug.cgi?id=175144.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGJITCompiler.cpp:
  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExit::debugOperationPrintSpeculationFailure):

  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExit32_64.cpp: Copied from Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp.
  • dfg/DFGOSRExitCompiler.cpp: Removed.
  • dfg/DFGOSRExitCompiler.h: Removed.
  • dfg/DFGOSRExitCompiler32_64.cpp: Removed.
  • dfg/DFGOSRExitCompiler64.cpp: Removed.
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGThunks.cpp:
4:28 PM Changeset in webkit [220305] by BJ Burg
  • 3 edits in trunk/Source/WebKit

Fix typo in WKPreferences _iceCandidateFiltertingEnabled property
https://bugs.webkit.org/show_bug.cgi?id=175224

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _iceCandidateFilteringEnabled]):
(-[WKPreferences _iceCandidateFiltertingEnabled]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
4:22 PM Changeset in webkit [220304] by Chris Dumez
  • 1 edit
    4 adds in trunk/LayoutTests

Add test coverage for sendBeacon() keepalive flag
https://bugs.webkit.org/show_bug.cgi?id=175212

Reviewed by Youenn Fablet.

  • http/wpt/beacon/keepalive-after-navigation-expected.txt: Added.
  • http/wpt/beacon/keepalive-after-navigation.html: Added.
  • http/wpt/beacon/support/sendBeacon-onunload-iframe.html: Added.
4:09 PM Changeset in webkit [220303] by Chris Dumez
  • 21 edits in trunk

[Beacon] Update sendBeacon to use the CachedResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=175192
<rdar://problem/33725923>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline test as our Content-Type header has changed for ArrayBuffer / ArrayBufferView
payloads.

  • web-platform-tests/beacon/headers/header-content-type-expected.txt:

Source/WebCore:

Update sendBeacon to use the FetchRequest / CachedResourceLoader instead of
the PingLoader. This gets us closer to the specification which is based on
Fetch and reduces code duplication. This also fixes an issue where our
Origin header was not properly set on Beacon resquests.

In a follow-up, we will implement in CachedResourceLoader Fetch's quota for
inflight keepalive requests which is needed to fully support sendBeacon().

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

  • Modules/beacon/NavigatorBeacon.h:
  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient):

  • loader/PingLoader.cpp:
  • loader/PingLoader.h:
  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType):

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType):
(WebCore::CachedResource::load):

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent const):
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
(WebCore::isResourceSuitableForDirectReuse):

  • loader/cache/CachedResourceLoader.h:

Source/WebKit:

Deal with new Beacon CachedResource type.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

LayoutTests:

Rebaseline a few tests now that the Origin header is properly set of our Beacon
requests. This is a progression and matches the results from Blink.

Our Content-Type header for ArrayBuffer / ArrayBufferView payloads has also
changed. It is unclear which one is best but at least we are now consistent
with Fetch.

  • http/tests/blink/sendbeacon/beacon-cookie-expected.txt:
  • http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
  • http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
  • http/wpt/beacon/headers/header-content-type-same-origin.html:
3:34 PM Changeset in webkit [220302] by wilander@apple.com
  • 14 edits
    2 adds in trunk

Resource Load Statistics: Report user interaction immediately, but only when needed
https://bugs.webkit.org/show_bug.cgi?id=175090
<rdar://problem/33685546>

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::ResourceLoadObserver):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Now tells the UI process immediately but also records that it has
done so to avoid doing it when not needed.

(WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):

Conditional throttling gone, now always throttles.

(WebCore::ResourceLoadObserver::notifyObserver):

Renamed from ResourceLoadObserver::notificationTimerFired().

(WebCore::ResourceLoadObserver::clearState):

New function to allow the test runner to reset the web process'
statistics state now that we keep track of whether or not we've
reported user interaction to the UI process.

(WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
(WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.

  • loader/ResourceLoadObserver.h:

(): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.

No longer needed since user interaction is always communicated
immediately.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearResourceLoadStatistics):

Test infrastructure. Ends up calling
WebCore::ResourceLoadObserver::clearState().

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

Now calls WebCore::ResourceLoadObserver::clearState().

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html:

Now no longer needs to disable throttling since reports of
user interaction happen immediately (when needed).

  • http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html: Added.
  • platform/mac-wk2/TestExpectations:

user-interaction-only-reported-once-within-short-period-of-time.html marked as [ Pass ].

3:19 PM Changeset in webkit [220301] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1-branch/Source

Versioning.

3:14 PM Changeset in webkit [220300] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.38

Tag Safari-604.1.38.

3:12 PM Changeset in webkit [220299] by Matt Baker
  • 12 edits
    1 add in trunk

Web Inspector: capture async stack trace when workers/main context posts a message
https://bugs.webkit.org/show_bug.cgi?id=167084
<rdar://problem/30033673>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.h:

Add PostMessage async call type.

Source/WebCore:

Add instrumentation to DOMWindow to support showing asynchronous
stack traces when the debugger pauses in a MessageEvent handler.

Test: inspector/debugger/async-stack-trace.html

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didPostMessageImpl):
(WebCore::InspectorInstrumentation::didFailPostMessageImpl):
(WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
(WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didPostMessage):
(WebCore::InspectorInstrumentation::didFailPostMessage):
(WebCore::InspectorInstrumentation::willDispatchPostMessage):
(WebCore::InspectorInstrumentation::didDispatchPostMessage):

  • inspector/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
(WebCore::PageDebuggerAgent::didPostMessage):
(WebCore::PageDebuggerAgent::didFailPostMessage):
(WebCore::PageDebuggerAgent::willDispatchPostMessage):
(WebCore::PageDebuggerAgent::didDispatchPostMessage):

  • inspector/PageDebuggerAgent.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):
(WebCore::DOMWindow::postMessageTimerFired):

LayoutTests:

Add a test to check for asynchronous stack trace data when the debugger
pauses inside a MessageEvent handler.

  • inspector/debugger/async-stack-trace-expected.txt:
  • inspector/debugger/async-stack-trace.html:
  • inspector/debugger/resources/postMessage-echo.html: Added.
3:03 PM Changeset in webkit [220298] by mark.lam@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Move DFG::OSRExitCompiler methods into DFG::OSRExit [step 1].
https://bugs.webkit.org/show_bug.cgi?id=175208
<rdar://problem/33732402>

Reviewed by Saam Barati.

This will minimize the code diff and make it easier to review the patch for
https://bugs.webkit.org/show_bug.cgi?id=175144 later. We'll do this patch in 3
steps:

  1. Do the code changes to move methods into OSRExit.
  2. Copy the 64-bit and common methods into DFGOSRExit.cpp, and delete the unused DFGOSRExitCompiler files.
  3. Merge the 32-bit OSRExitCompiler methods into the 64-bit version, and delete DFGOSRExitCompiler32_64.cpp.

Splitting this refactoring into these 3 steps also makes it easier to review this
patch and understand what is being changed.

  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitCompiler.cpp:

(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExitCompiler::emitRestoreArguments): Deleted.
(): Deleted.

  • dfg/DFGOSRExitCompiler.h:

(JSC::DFG::OSRExitCompiler::OSRExitCompiler): Deleted.
(): Deleted.

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExitCompiler::compileExit): Deleted.

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExitCompiler::compileExit): Deleted.

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

2:57 PM Changeset in webkit [220297] by Chris Dumez
  • 2 edits in trunk/LayoutTests

LayoutTest imported/w3c/web-platform-tests/beacon/beacon-basic-string.html is a flaky failure (harness timeout)
https://bugs.webkit.org/show_bug.cgi?id=175202

Unreviewed, mark test as flaky.

2:46 PM Changeset in webkit [220296] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Add an API test for r220286
https://bugs.webkit.org/show_bug.cgi?id=175206

Reviewed by Simon Fraser.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:

(-[AnimatedResizeWebView _webView:didChangeSafeAreaShouldAffectObscuredInsets:]):
(createAnimatedResizeWebView):
(TEST):
Add a test to ensure that we don't call
_webView:didChangeSafeAreaShouldAffectObscuredInsets: during an
animated resize.

2:45 PM Changeset in webkit [220295] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk/Tools

[XCode] webkit-patch should run sort-Xcode-project-file
https://bugs.webkit.org/show_bug.cgi?id=174036

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-08-04
Reviewed by Simon Fraser.

  • Scripts/webkitpy/common/config/ports.py:
  • Scripts/webkitpy/tool/commands/download.py:
  • Scripts/webkitpy/tool/commands/upload.py:
  • Scripts/webkitpy/tool/steps/init.py:
  • Scripts/webkitpy/tool/steps/options.py:
  • Scripts/webkitpy/tool/steps/sortxcodeprojectfiles.py: Added.
2:39 PM Changeset in webkit [220294] by Devin Rousso
  • 27 edits
    2 copies
    6 adds in trunk

Web Inspector: add source view for WebGL shader programs
https://bugs.webkit.org/show_bug.cgi?id=138593
<rdar://problem/18936194>

Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/protocol/Canvas.json:
    • Add ShaderType enum that contains "vertex" and "fragment".
    • Add requestShaderSource command that will return the original source code for a given shader program and shader type.

Source/WebCore:

Test: inspector/canvas/requestShaderSource.html

  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::requestShaderSource):

  • inspector/InspectorShaderProgram.h:
  • inspector/InspectorShaderProgram.cpp:

(WebCore::InspectorShaderProgram::shaderForType):

Source/WebInspectorUI:

Shader programs are now listed in the Resources sidebar as items within the owner Canvas
context. When selected, the shown content view has two editors, one for the Vertex shader
and one for the Fragment shader. These editors use CodeMirror's "clike" mode for GLSL syntax.

  • Localizations/en.lproj/localizedStrings.js:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
  • UserInterface/Main.html:
  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager):
(WI.CanvasManager.prototype.canvasRemoved):
(WI.CanvasManager.prototype.programCreated):
(WI.CanvasManager.prototype.programDeleted):
(WI.CanvasManager.prototype._mainResourceDidChange):

  • UserInterface/Models/Collection.js:
  • UserInterface/Models/Canvas.js:

(WI.Canvas.prototype.get shaderProgramCollection)

  • UserInterface/Models/ShaderProgram.js:

(WI.ShaderProgram.prototype.requestVertexShaderSource):
(WI.ShaderProgram.prototype.requestFragmentShaderSource):
(WI.ShaderProgram.prototype._requestShaderSource):

  • UserInterface/Views/CanvasTreeElement.js:

(WI.CanvasTreeElement):
(WI.CanvasTreeElement.prototype.onattach):
(WI.CanvasTreeElement.prototype.ondetach):
(WI.CanvasTreeElement.prototype.onpopulate):
(WI.CanvasTreeElement.prototype._shaderProgramAdded):
(WI.CanvasTreeElement.prototype._shaderProgramRemoved):

  • UserInterface/Views/ShaderProgramTreeElement.js: Added.

(WI.ShaderProgramTreeElement):

  • UserInterface/Views/ShaderProgramContentView.js: Added.

(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype.shown):
(WI.ShaderProgramContentView.prototype.hidden):
(WI.ShaderProgramContentView.prototype.closed):
(WI.ShaderProgramContentView.prototype.get supportsSave):
(WI.ShaderProgramContentView.prototype.get saveData):
(WI.ShaderProgramContentView.prototype.get supportsSearch):
(WI.ShaderProgramContentView.prototype.get numberOfSearchResults):
(WI.ShaderProgramContentView.prototype.get hasPerformedSearch):
(WI.ShaderProgramContentView.prototype.set automaticallyRevealFirstSearchResult):
(WI.ShaderProgramContentView.prototype.performSearch):
(WI.ShaderProgramContentView.prototype.searchCleared):
(WI.ShaderProgramContentView.prototype.searchQueryWithSelection):
(WI.ShaderProgramContentView.prototype.revealPreviousSearchResult):
(WI.ShaderProgramContentView.prototype.revealNextSearchResult):
(WI.ShaderProgramContentView.prototype.revealPosition):
(WI.ShaderProgramContentView.prototype._editorFocused):
(WI.ShaderProgramContentView.prototype._numberOfSearchResultsDidChange):

  • UserInterface/Views/ShaderProgramContentView.css: Added.

(.content-view.shader-program > .text-editor.shader):
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,):
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,):
(body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader):
(body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader):
(.content-view.shader-program > .text-editor.shader > .type-title):
(.content-view.shader-program > .text-editor.shader > .CodeMirror):

  • UserInterface/Images/DocumentGL.png: Added.
  • UserInterface/Images/DocumentGL@2x.png: Added.
  • UserInterface/Views/ResourceIcons.css:

(.shader-program .icon):

  • UserInterface/Base/Main.js:
  • UserInterface/Views/ContentView.js:

(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.isViewable):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/ResourcesTabContentView.js:

(WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
Plumbing for displaying ShaderProgram content.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype._editorFocused):

  • Scripts/update-codemirror-resources.rb:
  • UserInterface/External/CodeMirror/clike.js: Added.

Add C-like mode for highlighting GLSL.

LayoutTests:

  • inspector/canvas/requestShaderSource-expected.txt: Added.
  • inspector/canvas/requestShaderSource.html: Added.
  • inspector/canvas/resources/shaderProgram-utilities.js:

(linkProgram):
(linkProgram.typeForScript):
(linkProgram.createShaderFromScript):

  • platform/win/TestExpectations:
2:37 PM Changeset in webkit [220293] by Matt Lewis
  • 6 edits in trunk/Source

Unreviewed, rolling out r220288.

This broke multiple builds.

Reverted changeset:

"Use MPAVRoutingController instead of deprecated versions."
https://bugs.webkit.org/show_bug.cgi?id=175063
http://trac.webkit.org/changeset/220288

2:18 PM Changeset in webkit [220292] by clopez@igalia.com
  • 2 edits in trunk/Tools

REGRESSION(r219857): run-benchmark --allplans broken
https://bugs.webkit.org/show_bug.cgi?id=175186

Reviewed by Saam Barati.

r219857 forgot to update also the calls to BenchmarkRunner() that
is done when the script is run with --allplans.

To fix this (and avoid future issues like this), let's factorize
the calls to the benchhmark runner in a run_benchmark_plan()
function.

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:

(run_benchmark_plan):
(start):

1:50 PM Changeset in webkit [220291] by fpizlo@apple.com
  • 21 edits
    7 adds
    2 deletes in trunk/Source

The allocator used to allocate memory for MarkedBlocks and LargeAllocations should not be the Subspace itself
https://bugs.webkit.org/show_bug.cgi?id=175141

Reviewed by Mark Lam.
Source/JavaScriptCore:


To make it easier to have multiple gigacages and maybe even fancier methods of allocating, this
decouples the allocator used to allocate memory from the GC Subspace. This means we no longer have
to create a new Subspace subclass to allocate memory a different way. Instead, the allocator is now
determined by the AlignedMemoryAllocator object.

This also simplifies trading of blocks. Before, Subspaces had to determine if other Subspaces could
trade blocks with them using canTradeBlocksWith(). This makes it difficult for two different
Subspaces that both use the same underlying allocator to realize that they can trade blocks with
each other. Now, you just need to ask the block being stolen and the subspace doing the stealing if
they use the same AlignedMemoryAllocator.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/AlignedMemoryAllocator.cpp: Added.

(JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
(JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):

  • heap/AlignedMemoryAllocator.h: Added.
  • heap/FastMallocAlignedMemoryAllocator.cpp: Added.

(JSC::FastMallocAlignedMemoryAllocator::singleton):
(JSC::FastMallocAlignedMemoryAllocator::FastMallocAlignedMemoryAllocator):
(JSC::FastMallocAlignedMemoryAllocator::~FastMallocAlignedMemoryAllocator):
(JSC::FastMallocAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::freeAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::dump const):

  • heap/FastMallocAlignedMemoryAllocator.h: Added.
  • heap/GigacageAlignedMemoryAllocator.cpp: Added.

(JSC::GigacageAlignedMemoryAllocator::singleton):
(JSC::GigacageAlignedMemoryAllocator::GigacageAlignedMemoryAllocator):
(JSC::GigacageAlignedMemoryAllocator::~GigacageAlignedMemoryAllocator):
(JSC::GigacageAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::freeAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::dump const):

  • heap/GigacageAlignedMemoryAllocator.h: Added.
  • heap/GigacageSubspace.cpp: Removed.
  • heap/GigacageSubspace.h: Removed.
  • heap/LargeAllocation.cpp:

(JSC::LargeAllocation::tryCreate):
(JSC::LargeAllocation::destroy):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::tryAllocateWithoutCollecting):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::tryCreate):
(JSC::MarkedBlock::Handle::Handle):
(JSC::MarkedBlock::Handle::~Handle):
(JSC::MarkedBlock::Handle::didAddToAllocator):
(JSC::MarkedBlock::Handle::subspace const):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::Handle::alignedMemoryAllocator const):
(JSC::MarkedBlock::Handle::subspace const): Deleted.

  • heap/Subspace.cpp:

(JSC::Subspace::Subspace):
(JSC::Subspace::findEmptyBlockToSteal):
(JSC::Subspace::canTradeBlocksWith): Deleted.
(JSC::Subspace::tryAllocateAlignedMemory): Deleted.
(JSC::Subspace::freeAlignedMemory): Deleted.

  • heap/Subspace.h:

(JSC::Subspace::name const):
(JSC::Subspace::alignedMemoryAllocator const):

  • runtime/JSDestructibleObjectSubspace.cpp:

(JSC::JSDestructibleObjectSubspace::JSDestructibleObjectSubspace):

  • runtime/JSDestructibleObjectSubspace.h:
  • runtime/JSSegmentedVariableObjectSubspace.cpp:

(JSC::JSSegmentedVariableObjectSubspace::JSSegmentedVariableObjectSubspace):

  • runtime/JSSegmentedVariableObjectSubspace.h:
  • runtime/JSStringSubspace.cpp:

(JSC::JSStringSubspace::JSStringSubspace):

  • runtime/JSStringSubspace.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/JSWebAssemblyCodeBlockSubspace.cpp:

(JSC::JSWebAssemblyCodeBlockSubspace::JSWebAssemblyCodeBlockSubspace):

  • wasm/js/JSWebAssemblyCodeBlockSubspace.h:

Source/WebCore:

No new tests because no new behavior.

Just adapting to an API change.

  • ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Added.
  • bindings/js/WebCoreJSClientData.cpp:

(WebCore::JSVMClientData::JSVMClientData):

1:49 PM Changeset in webkit [220290] by Chris Dumez
  • 11 edits
    2 adds in trunk

Match newly-clarified spec on textarea defaultValue/value/child text content
https://bugs.webkit.org/show_bug.cgi?id=173878

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Re-sync WPT test from upstream and rebaseline to improve test coverage.

  • web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent-expected.txt:
  • web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html:

Source/WebCore:

Update HTMLTextArea.defaultValue to match align with other browsers and match the
latest HTML specification:

The defaultValue getter should return the child text content:

Our code was traversing all Text descendants, not just the children.

The defaultValue setter should act as the setter of the Element's textContent
IDL attribute. Previously, we had a custom logic that was only removing the
text children.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::scriptContent const):

  • dom/TextNodeTraversal.cpp:

(WebCore::TextNodeTraversal::childTextContent):

  • dom/TextNodeTraversal.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::defaultValue const):
(WebCore::HTMLTextAreaElement::setDefaultValue):

  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::text const):

1:42 PM Changeset in webkit [220289] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
https://bugs.webkit.org/show_bug.cgi?id=174874
<rdar://problem/33530130>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-08-04
Reviewed by Simon Fraser.

Source/WebCore:

If an <img> element has a non-CachedImage content data, e.g. -webkit-named-image,
RenderImageResourceStyleImage will be created and attached to the RenderImage.
RenderImageResourceStyleImage::m_cachedImage will be set to null at the
beginning because the m_styleImage->isCachedImage() is false in this case.
When ImageLoader finishes loading the url of the src attribute,
RenderImageResource::setCachedImage() will be called to set m_cachedImage.

A crash will happen when the RenderImage is destroyed. Destroying the
RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
which ends up calling CSSNamedImageValue::image() which returns a null pointer
because the size is empty. RenderImageResourceStyleImage::shutdown() calls
image()->stopAnimation() without checking the return value of image().

Another crash will happen later when deleting the CachedImage from the memory
cache if CachedImage::canDestroyDecodedData() is called because the client
it gets from m_clients is a freed pointer. This happens because RenderImageResourceStyleImage
has m_styleImage of type StyleGeneratedImage but its m_cachedImage is set
by RenderImageResource::setCachedImage(). When RenderImageResourceStyleImage::shutdown()
is called, it calls StyleGeneratedImage::removeClient() which does not
know anything about RenderImageResourceStyleImage::m_cachedImage. So we
end up having a freed pointer in the m_clients of the CachedImage.

Test: fast/images/image-element-image-content-data.html

  • rendering/RenderImageResourceStyleImage.cpp:

(WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
of r208511 in this function. Add a call to image()->stopAnimation() without
checking the return of image() since it will return the nullImage() if
the image not available. There is no need to check m_cachedImage before
calling image() because image() does not check or access m_cachedImage.

If m_styleImage is not a CachedStyleImage but m_cachedImage is not null,
we need to remove m_renderer from the set of the clients of this m_cachedImage.

(WebCore::RenderImageResourceStyleImage::image const): The base class method
RenderImageResource::image() returns the nullImage() if the image not
available. This is because CachedImage::imageForRenderer() returns
the nullImage() if the image is not available; see CachedImage.h. We should
do the same for the derived class for consistency.

LayoutTests:

  • fast/images/image-element-image-content-data-expected.txt: Added.
  • fast/images/image-element-image-content-data.html: Added.
1:07 PM Changeset in webkit [220288] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Use MPAVRoutingController instead of deprecated versions.
https://bugs.webkit.org/show_bug.cgi?id=175063
Source/WebCore:

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-04
Reviewed by Tim Horton.

No new tests because no behavior change. This uses a different platform class to present
an interface.

Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
Add MPMediaControlsViewController.

  • platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

rdar://problem/33301230

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-04
Reviewed by Tim Horton.

Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.

  • UIProcess/ios/forms/WKAirPlayRoutePicker.h:
  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker show:fromRect:]):
(-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
(-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
(-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
(-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.

1:01 PM Changeset in webkit [220287] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Dashboard bubbles sometimes show failure count instead of crash count
https://bugs.webkit.org/show_bug.cgi?id=175157
<rdar://problem/33709009>

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js:

(BuildbotTestResults.prototype.resultSummarizer): Use the regex for the precise match first.

12:50 PM Changeset in webkit [220286] by timothy_horton@apple.com
  • 12 edits in trunk/Source/WebKit

viewport-fit changes during animated resize can cause layout size to get stuck
https://bugs.webkit.org/show_bug.cgi?id=175169
<rdar://problem/33684697>

Reviewed by Simon Fraser.

If we get a commit that changes viewport-fit state while an animated
resize is underway, and that change causes the client to push a new
minimumLayoutSizeOverride, the new size will be lost forever, and we
will get stuck laying out at the wrong size.

This is because we unconditionally apply avoidsUnsafeArea for every commit,
while most other changes that come in from a commit are ignored if we're
inside animated resize. To fix, also ignore avoidsUnsafeArea changes during
animated resize, by moving the code that keeps track of it into WKWebView
like all of the rest, and read it out of the commit in didCommitLayerTree
*after* the animated-resize early-return.

Also, fix the associated layout tests by adding a missing assignment
in _computedContentInset, which was broken in r220138.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _setAvoidsUnsafeArea:]):
(-[WKWebView _safeAreaShouldAffectObscuredInsets]):
(-[WKWebView _didChangeAvoidsUnsafeArea:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::setAvoidsUnsafeArea): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::avoidsUnsafeArea const): Deleted.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeAvoidsUnsafeArea): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCommitLayerTree):

12:44 PM Changeset in webkit [220285] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Rebaslining fast/text/font-selection-font-loading-api-parse.html for iOS 11.

Unreviewed test gardening.

  • platform/ios-11/fast/text/font-selection-font-loading-api-parse-expected.txt:
12:04 PM Changeset in webkit [220284] by commit-queue@webkit.org
  • 5 edits
    3 copies
    2 adds in trunk/Tools

Add tests for NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=175146

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-08-04
Reviewed by Darin Adler.

  • CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

New files and sort.

  • TestWebKitAPI/Tests/WTF/Logger.h:
  • TestWebKitAPI/Tests/WTF/Logger.cpp:

(TestWebKitAPI::log):
(TestWebKitAPI::takeLogStr):

  • TestWebKitAPI/Tests/WTF/RefLogger.h:
  • TestWebKitAPI/Tests/WTF/RefLogger.cpp:

(TestWebKitAPI::log): Deleted.
(TestWebKitAPI::takeLogStr): Deleted.
Extract log() / takeLogStr() from RefLogger to a general Logger.h/cpp.

  • TestWebKitAPI/Tests/WTF/LifecycleLogger.h:
  • TestWebKitAPI/Tests/WTF/LifecycleLogger.cpp: Added.

(TestWebKitAPI::LifecycleLogger::LifecycleLogger):
(TestWebKitAPI::LifecycleLogger::operator=):
(TestWebKitAPI::LifecycleLogger::~LifecycleLogger):
(TestWebKitAPI::LifecycleLogger::setName):
(TestWebKitAPI::TEST):
Add a class that logs construction / assignment / modifications.

  • TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::list):
Test construction behavior is as expected both directly and using makeNeverDestroyed.

12:03 PM Changeset in webkit [220283] by Lucas Forschler
  • 2 edits in trunk/Tools

minification logic is not implemented for ios builds
<rdar://problem/33726561>

Reviewed by Dean Johnson

  • BuildSlaveSupport/built-product-archive:

(minifyDirectory): refactor minifySource -> minifyDirectory
(archiveBuiltProduct): add ios minification logic
(minifySource): Deleted.

12:01 PM Changeset in webkit [220282] by gskachkov@gmail.com
  • 2 edits in trunk/Source/JavaScriptCore

[ESNext] Async iteration - update feature.json
https://bugs.webkit.org/show_bug.cgi?id=175197

Reviewed by Yusuke Suzuki.

Update feature.json to add status of the Async Iteration

  • features.json:
11:57 AM Changeset in webkit [220281] by Matt Baker
  • 2 edits in trunk/Source/WebCore

Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingContextBase::deleteProgram
https://bugs.webkit.org/show_bug.cgi?id=175196
<rdar://problem/33727603>

Reviewed by Devin Rousso.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::deleteProgram):

11:32 AM Changeset in webkit [220280] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fixed loading feature status page queries and anchor link URLs
https://bugs.webkit.org/show_bug.cgi?id=175156

Reviewed by Simon Fraser.

  • wp-content/themes/webkit/status.php:
11:28 AM Changeset in webkit [220279] by Matt Lewis
  • 61 edits in trunk

Unreviewed, rolling out r220271.

Rolling out due to Layout Test failing on iOS Simulator.

Reverted changeset:

"Remove STREAMS_API compilation guard"
https://bugs.webkit.org/show_bug.cgi?id=175165
http://trac.webkit.org/changeset/220271

10:59 AM Changeset in webkit [220278] by weinig@apple.com
  • 10 edits
    2 deletes in trunk/Source

[Cleanup] Remove ScriptGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=175173

Reviewed by Darin Adler.

Source/WebCore:

ScriptGlobalObject's two functions were only being used in
four places. Three of those uses (ScriptGlobalObject::set in
InspectorFrontendClientLocal, WebInspectorUI, and RemoteWebInspectorUI)
were merged into the new function addSelfToGlobalObjectInWorld on
InspectorFrontendHost. The remaining function (ScriptGlobalObject::get
in InspectorFrontendHost) was easily inlined.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/ScriptGlobalObject.cpp: Removed.
  • bindings/js/ScriptGlobalObject.h: Removed.

Removed ScriptGlobalObject.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::windowObjectCleared):
Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::showContextMenu):
Inline ScriptGlobalObject::get.

(WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
Add helper which inlines ScriptGlobalObject::set and works
as a helper for the three inspector frontends.

Source/WebKit:

  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::windowObjectCleared):

  • WebProcess/WebPage/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::windowObjectCleared):
Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.

10:10 AM Changeset in webkit [220277] by matthew_hanson@apple.com
  • 8 edits in branches/safari-604.1-branch

Revert r219896. rdar://problem/33711000

9:45 AM Changeset in webkit [220276] by Chris Dumez
  • 3 edits in trunk/LayoutTests

PROGRESSION? Multiple imported/w3c/web-platform-tests/fetch/api/ test have started to fail.
https://bugs.webkit.org/show_bug.cgi?id=175061

Unreviewed, mark Fetch/Cors tests as failing on wk2 ElCapitan only, as those tests seem to be passing
everywhere else.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
9:44 AM Changeset in webkit [220275] by BJ Burg
  • 2 edits in trunk/Source/WebKit

[Cocoa] Web Automation: copy JavaScript atoms to WebKit.framework private headers
https://bugs.webkit.org/show_bug.cgi?id=175088
<rdar://problem/33685818>

Reviewed by Joseph Pecoraro.

  • WebKit.xcodeproj/project.pbxproj:
  • Add a Copy Files phase to WebKit.framework.
  • Copy atoms to the atoms/ directory in WebKit.framework/PrivateHeaders/.
9:17 AM Changeset in webkit [220274] by Ryan Haddad
  • 14 edits
    2 deletes in trunk

Unreviewed, rolling out r220268.

This change caused assertion failures on macOS and iOS Debug
WK2.

Reverted changeset:

"Resource Load Statistics: Report user interaction
immediately, but only when needed"
https://bugs.webkit.org/show_bug.cgi?id=175090
http://trac.webkit.org/changeset/220268

9:02 AM Changeset in webkit [220273] by akling@apple.com
  • 2 edits in trunk/Source/WebKit

NetworkLoad should always invoke its redirect completion handler
https://bugs.webkit.org/show_bug.cgi?id=175179
<rdar://problem/33464999>

Reviewed by Chris Dumez.

Make sure the redirect completion handler is always invoked,
just like we already did for the response completion handler.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::~NetworkLoad):

8:39 AM Changeset in webkit [220272] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Mark beacon-basic-string.html as slow.

8:20 AM Changeset in webkit [220271] by commit-queue@webkit.org
  • 61 edits in trunk

Remove STREAMS_API compilation guard
https://bugs.webkit.org/show_bug.cgi?id=175165

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

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No change of behavior.

  • Configurations/FeatureDefines.xcconfig:
  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeAsStream):

  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::isDisturbedOrLocked const):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::blobChunk):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):
(WebCore::FetchResponse::BodyLoader::didReceiveData):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/FetchResponse.js:

(initializeFetchResponse):

  • Modules/fetch/FetchResponseSource.cpp:
  • Modules/fetch/FetchResponseSource.h:
  • Modules/streams/ByteLengthQueuingStrategy.idl:
  • Modules/streams/ByteLengthQueuingStrategy.js:
  • Modules/streams/CountQueuingStrategy.idl:
  • Modules/streams/CountQueuingStrategy.js:
  • Modules/streams/ReadableByteStreamController.idl:
  • Modules/streams/ReadableByteStreamController.js:
  • Modules/streams/ReadableByteStreamInternals.js:
  • Modules/streams/ReadableStream.idl:
  • Modules/streams/ReadableStream.js:
  • Modules/streams/ReadableStreamBYOBReader.idl:
  • Modules/streams/ReadableStreamBYOBReader.js:
  • Modules/streams/ReadableStreamBYOBRequest.idl:
  • Modules/streams/ReadableStreamBYOBRequest.js:
  • Modules/streams/ReadableStreamDefaultController.idl:
  • Modules/streams/ReadableStreamDefaultController.js:
  • Modules/streams/ReadableStreamDefaultReader.idl:
  • Modules/streams/ReadableStreamDefaultReader.js:
  • Modules/streams/ReadableStreamInternals.js:
  • Modules/streams/ReadableStreamSource.h:
  • Modules/streams/ReadableStreamSource.idl:
  • Modules/streams/StreamInternals.js:
  • Modules/streams/WritableStream.idl:
  • Modules/streams/WritableStream.js:
  • Modules/streams/WritableStreamInternals.js:
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::isReadableByteStreamAPIEnabled):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/JSReadableStreamPrivateConstructors.cpp:
  • bindings/js/JSReadableStreamPrivateConstructors.h:
  • bindings/js/JSReadableStreamSourceCustom.cpp:
  • bindings/js/ReadableStreamDefaultController.cpp:
  • bindings/js/ReadableStreamDefaultController.h:
  • page/RuntimeEnabledFeatures.h:
  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
8:16 AM Changeset in webkit [220270] by beidson@apple.com
  • 39 edits
    34 copies
    10 adds in trunk

Enable ServiceWorkers at runtime for WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=175174

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/background-fetch/interfaces-expected.txt:
  • web-platform-tests/background-fetch/interfaces-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
  • web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.https-expected.txt:
  • web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt:
  • web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt:
  • web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt:
  • web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt:

Source/WebKit:

  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::enableAllExperimentalFeatures):

LayoutTests:

  • fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt: Copied from LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/background-fetch/interfaces-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt.
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
8:04 AM Changeset in webkit [220269] by zandobersek@gmail.com
  • 41 edits in trunk

[EME][GStreamer] Register ClearKey CDMFactory
https://bugs.webkit.org/show_bug.cgi?id=175136

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Register the ClearKey CDM factory in CDMFactoryGStreamer. A CDMFactoryClearKey
singleton object is introduced and used for that registration.

The basic CDMFactoryClearKey and CDMPrivateClearKey methods are implemented,
marking org.w3.clearkey as the supported key system and keyids as the
supported init data type. Additional logic around key system configurations,
distinctive identifiers, persistent state and related restrictions and
requirements is implemented.

This improves the ClearKey EME tests a bit, now progressing to the point of
failing with a NotAllowedError exception due to the CDMInstance object failing
to properly initialize because of missing implementation.

No new tests -- relevant tests have underlying baselines updated to reflect
changes in behavior.

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::CDMFactoryClearKey::singleton):
(WebCore::CDMFactoryClearKey::supportsKeySystem):
(WebCore::CDMPrivateClearKey::supportsInitDataType const):
(WebCore::CDMPrivateClearKey::supportsConfiguration const):
(WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions const):
(WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const):
(WebCore::CDMPrivateClearKey::supportsRobustness const):
(WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement const):
(WebCore::CDMPrivateClearKey::persistentStateRequirement const):

  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp:

(WebCore::CDMFactory::platformRegisterFactories):

LayoutTests:

Update WPE baselines for EME ClearKey tests following some advancements in
ClearKey support.

  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysystemaccess-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt:
7:20 AM Changeset in webkit [220268] by wilander@apple.com
  • 14 edits
    2 adds in trunk

Resource Load Statistics: Report user interaction immediately, but only when needed
https://bugs.webkit.org/show_bug.cgi?id=175090
<rdar://problem/33685546>

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::ResourceLoadObserver):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Now tells the UI process immediately but also records that it has
done so to avoid doing it when not needed.

(WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):

Conditional throttling gone, now always throttles.

(WebCore::ResourceLoadObserver::notifyObserver):

Renamed from ResourceLoadObserver::notificationTimerFired().

(WebCore::ResourceLoadObserver::clearState):

New function to allow the test runner to reset the web process'
statistics state now that we keep track of whether or not we've
reported user interaction to the UI process.

(WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
(WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.

  • loader/ResourceLoadObserver.h:

(): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.

No longer needed since user interaction is always communicated
immediately.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearResourceLoadStatistics):

Test infrastructure. Ends up calling
WebCore::ResourceLoadObserver::clearState().

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

Now calls WebCore::ResourceLoadObserver::clearState().

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html:

Now no longer needs to disable throttling since reports of
user interaction happen immediately (when needed).

  • http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html: Added.
  • platform/mac-wk2/TestExpectations:

user-interaction-only-reported-once-within-short-period-of-time.html marked as [ Pass ].

6:25 AM Changeset in webkit [220267] by Antti Koivisto
  • 22 edits in trunk/Source/WebKit

Network cache should be usable as non-singleton
https://bugs.webkit.org/show_bug.cgi?id=175139

Reviewed by Sam Weinig.

We might want to use it as a non-singleton in the future (for example as a backend for the cache API).

This patch makes NetworkCache::Cache and NetworkCache::Storage refcounted objects and takes
care to ref them properly during asynchronous operations.

The patch doesn't actually create any non-shared instances, it just adds the capability.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):
(WebKit::NetworkProcess::setCacheModel):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::cache):

Move the shared cache instance to the network process singleton.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::NetworkResourceLoader):

Include shared cache as a reffed member for non-ephemeral instances.

(WebKit::NetworkResourceLoader::canUseCache const):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::open):

Open now returns null if it fails.
Add RegisterNotify option to set up notify trigger for the shared instance.

(WebKit::NetworkCache::Cache::Cache):
(WebKit::NetworkCache::Cache::~Cache):

Add destructor.

(WebKit::NetworkCache::dumpFileChanged):
(WebKit::NetworkCache::Cache::setCapacity):
(WebKit::NetworkCache::Cache::retrieve):

Protect the cache instance during asynchronous operations.

(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::storeRedirect):
(WebKit::NetworkCache::Cache::remove):
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::Cache::dumpContentsToFile):
(WebKit::NetworkCache::Cache::clear):
(WebKit::NetworkCache::Cache::recordsPath const):
(WebKit::NetworkCache::Cache::retrieveData):
(WebKit::NetworkCache::Cache::storeData):
(WebKit::NetworkCache::singleton): Deleted.
(WebKit::NetworkCache::Cache::initialize): Deleted.

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const):
(WebKit::NetworkCache::Cache::isEnabled const): Deleted.

Remove isEnabled() state as a cache object now always represents an enabled cache.

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
(WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

  • NetworkProcess/cache/NetworkCacheStatistics.cpp:

(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
(WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):

Operations now ref the storage. They are already deleted in the main thread so
proper destruction is taken care of.

(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::Storage::~Storage):
(WebKit::NetworkCache::Storage::synchronize):

This and other asynchronous methods now protect the Storage instance.

(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::deleteOldVersions):

  • NetworkProcess/cache/NetworkCacheStorage.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
(WebKit::NetworkProcess::clearDiskCache):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::clearDiskCache):

3:12 AM Changeset in webkit [220266] by clopez@igalia.com
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Test gardening around MOUSE_CURSOR_SCALE.
https://bugs.webkit.org/show_bug.cgi?id=109469

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-04
Reviewed by Carlos Alberto Lopez Perez.

Remove obsolete expectation for cursor-parsing-image-set.html; it may have
started passing in r209396.

Mark mouse-cursor-image-set.html as failing rather than using an incorrect
-expected file.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/events/mouse-cursor-image-set-expected.txt: Removed.
3:01 AM Changeset in webkit [220265] by clopez@igalia.com
  • 2 edits in trunk/JSTests

JSC test wasm/js-api/test_memory_constructor.js should be skipped on memoryLimited
https://bugs.webkit.org/show_bug.cgi?id=175150

Unreviewed test gardening.

  • wasm/js-api/test_memory_constructor.js:
2:54 AM Changeset in webkit [220264] by zandobersek@gmail.com
  • 10 edits
    3 adds in trunk/Source/WebCore

[EME] Push CDMFactory into the platform layer
https://bugs.webkit.org/show_bug.cgi?id=175129

Reviewed by Xabier Rodriguez-Calvar.

This is a follow-up to r219678 that moved the majority of CDM abstraction
classes into the platform layer, but missed the CDMFactory class.

The CDMFactory abstraction is now also placed in the platform layer. Only
change to the interface is that the createCDM() method can't accept a CDM
object reference anymore since that class is cemented into the WebCore
layer, and no current implementation used it anyway.

Additionally, the static Vector object of registered factories is moved
under the CDMFactory class, along with the register and unregister
functions. The platformRegisterFactories() function is added to allow for
platform-specific factory registrations to occur when the registered
factories are queried for the first time. Empty implementation for this
function is provided for non-GStreamer platforms, while for GStreamer
the implementation is kept in CDMFactoryGStreamer.cpp. It's still empty
for now, but it will register the ClearKey factory there in the near
future.

No new tests -- none affected, only refactoring.

  • CMakeLists.txt:
  • Modules/encryptedmedia/CDM.cpp:

(WebCore::createCDMPrivateForKeySystem):
(WebCore::CDM::supportsKeySystem):
(WebCore::CDM::CDM):
(): Deleted.
(WebCore::CDM::registerCDMFactory): Deleted.
(WebCore::CDM::unregisterCDMFactory): Deleted.

  • Modules/encryptedmedia/CDM.h:

(WebCore::CDMFactory::~CDMFactory): Deleted.

  • PlatformWPE.cmake:
  • platform/GStreamer.cmake:
  • platform/encryptedmedia/CDMFactory.cpp: Added.

(WebCore::CDMFactory::registerFactory):
(WebCore::CDMFactory::unregisterFactory):
(WebCore::CDMFactory::platformRegisterFactories):

  • platform/encryptedmedia/CDMFactory.h: Added.

(WebCore::CDMFactory::~CDMFactory):

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::CDMFactoryClearKey::createCDM):

  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/encryptedmedia/gstreamer/CDMFactoryGStreamer.cpp: Added.

(WebCore::CDMFactory::platformRegisterFactories):

  • testing/MockCDMFactory.cpp:

(WebCore::m_weakPtrFactory):
(WebCore::MockCDMFactory::unregister):
(WebCore::MockCDMFactory::createCDM):

  • testing/MockCDMFactory.h:
2:08 AM Changeset in webkit [220263] by zandobersek@gmail.com
  • 2 edits
    15 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Update test expectations and layout test baselines
for Web Crypto tests now that the implementation is complete.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt: Added.
1:51 AM Changeset in webkit [220262] by gskachkov@gmail.com
  • 2 edits in trunk/Source/JavaScriptCore

[EsNext] Async iteration - Add feature flag
https://bugs.webkit.org/show_bug.cgi?id=166694

Reviewed by Yusuke Suzuki.

Add feature flag to JSC to switch on/off Async Iterator

  • runtime/Options.h:
1:08 AM Changeset in webkit [220261] by fred.wang@free.fr
  • 7 edits
    2 adds in trunk

ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
https://bugs.webkit.org/show_bug.cgi?id=175135

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

Source/WebCore:

This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
that it uses the fixed position rectangle relative of the first frame ancestor instead of
the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
and RenderLayerCompositor. This fixes some flickering issues on iOS.

Test: fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:

(WebCore::ScrollingTreeFrameScrollingNode::fixedPositionRect): Helper function to get the
fixed position rect to use for that frame.

  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::enclosingFrameNode const): Helper function to get the enclosing
frame for this scrolling node or null if there is none.

  • page/scrolling/ScrollingTreeNode.h: Declare enclosingFrameNode.

Source/WebKit:

This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
that it uses the fixed position rectangle relative of the first frame ancestor instead of
the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
and RenderLayerCompositor. This fixes some flickering issues on iOS.

  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll): Use the fixed
position rect of a non-main frame if there is one.

LayoutTests:

This patch adds a new test for a position:fixed element inside an overflow node inside an
iframe. When scrolling the overflow node, the position of such an element should remain fixed
relative to the inner frame. Before that change, ScrollingTreeOverflowScrollingNodeIOS used
to take the main frame as a reference instead, causing the element to flicker and even to
disappear when the user scrolls that overflow node. We add a reftest to verify that the
element is visible and positioned at the correct location when the user scrolls.

  • fast/scrolling/ios/fixed-inside-overflow-inside-iframe-expected.html: Added.
  • fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html: Added.
12:56 AM Changeset in webkit [220260] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

Unreviewed. Removing redundant NotImplemented.h header inclusions
and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC
and CryptoKeyRSA implementation files.

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:
  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
12:52 AM Changeset in webkit [220259] by zandobersek@gmail.com
  • 2 edits
    12 adds in trunk/LayoutTests

Unreviewed WPE gardening. Update test expectations and layout test baselines
for Web Crypto tests now that the implementation is complete.

  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt: Added.
12:36 AM Changeset in webkit [220258] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unnecesary call to status bar SPI.
https://bugs.webkit.org/show_bug.cgi?id=175176
rdar://problem/20887306

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-04
Reviewed by Darin Adler.

No new tests because no behavior change.

This removes an obsolete call to SPI.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::cleanupFullscreen):

Aug 3, 2017:

11:38 PM Changeset in webkit [220257] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1-branch

Cherry-pick r220185. rdar://problem/33713528

11:38 PM Changeset in webkit [220256] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-604.1-branch

Cherry-pick r220163. rdar://problem/33711018

11:38 PM Changeset in webkit [220255] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1-branch/Source/WebCore

Cherry-pick r220153. rdar://problem/33711038

11:38 PM Changeset in webkit [220254] by matthew_hanson@apple.com
  • 8 edits in branches/safari-604.1-branch

Cherry-pick r219896. rdar://problem/33711000

11:13 PM Changeset in webkit [220253] by zandobersek@gmail.com
  • 5 edits in trunk

[GCrypt] Implement CryptoKeyEC PKCS#8 imports
https://bugs.webkit.org/show_bug.cgi?id=173647

Reviewed by Jiewen Tan.

Source/WebCore:

No new tests -- affected tests are now passing and are unskipped.

Implement libgcrypt-based support for PKCS#8 imports of EC keys.

Existing libtasn1 utilities are used to achieve this. First, the provided key data
is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member
of that structure is validated, followed by the algorithm member. The latter is
also properly tested depending on this being an import of an ECDSA or ECDH key.

Data of the parameters member is decoded against the ECParameters ASN.1 definition,
and the namedCurve object identifier is validated, making sure it represents a
valid EC curve and that this curve maches the one specified for the import
operation.

Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition.
The version member of that structure is properly validated. The optional parameters
member of that structure is already decoded against the ECParameters ASN.1
definition. If present, it is checked to contain a valid EC curve identifier that
matches the specified curve.

The optional publicKey member of the ECPrivateKey structure is validated, testing
that its data matches in size an uncompressed EC point, and that the first byte
of this data is 0x04, as expected for an uncompressed EC point.

What's left is the private key data on the initial ECPrivateKey structure. That
data is retrieved and validated, making sure its size matches the size of the
specified curve. The private-key s-expression is then constructed, embedding
the curve name and the validated private key data. This s-expression is then used
to construct an EC context.

If the optional publicKey data was provided, it's used to set the q parameter
for this EC context. Otherwise, the value for q is computed on-the-fly for the
specified EC and the provided private key. The q point is then tested through
the gcry_mpi_ec_curve_point() function, making sure that the derived point is
indeed located on the given EC.

Finally, with the private key properly validated, a new CryptoKeyEC object is
constructed, using the private-key s-expression and the parameters that were
specified for this import operation.

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::CryptoKeyEC::platformImportPkcs8):

  • crypto/gcrypt/GCryptUtilities.h:

LayoutTests:

  • platform/wpe/TestExpectations:

Unskip passing Web Crypto tests that cover PKCS#8 imports of EC keys.

9:37 PM Changeset in webkit [220252] by Chris Dumez
  • 12 edits
    1 move
    2 adds
    1 delete in trunk

Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.' without a leading 0
https://bugs.webkit.org/show_bug.cgi?id=175132

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Re-sync WPT tests from upstream c8bf1bbe9296. This extends test coverage.

  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents-expected.txt: Removed.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents.html.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/refresh.sub.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/w3c-import.log:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log:

Source/WebCore:

Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without
a leading 0. This is as per https://github.com/whatwg/html/pull/2852.

The latest spec is at:

Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html

  • html/parser/HTMLParserIdioms.cpp:

(WebCore::parseHTTPRefreshInternal):

LayoutTests:

Mark as flaky tests that used to not run because they were missing a subresource. Now that I imported
this subresource, the tests run but are failing. When they fail, those tests are flaky due to the lines
they log.

  • tests-options.json:
8:57 PM Changeset in webkit [220251] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

JSContext Inspector: Scripts sometimes do not show in resources tab
https://bugs.webkit.org/show_bug.cgi?id=175153
<rdar://problem/33708683>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-08-03
Reviewed by Matt Baker.

  • UserInterface/Views/ResourceSidebarPanel.js:

(WI.ResourceSidebarPanel.prototype.initialLayout):
When the ResourceSidebar is lazily created, be sure to add any scripts
to the sidebar that are not backed by Resources.

(WI.ResourceSidebarPanel.prototype._scriptWasAdded):
(WI.ResourceSidebarPanel.prototype._addScript):
Extract so it can be used outside of an event handler.

7:41 PM Changeset in webkit [220250] by BJ Burg
  • 66 edits in trunk

Remove ENABLE(WEB_SOCKET) guards
https://bugs.webkit.org/show_bug.cgi?id=167044

Reviewed by Joseph Pecoraro.

.:

  • 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:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • Modules/websockets/ThreadableWebSocketChannel.cpp:
  • Modules/websockets/ThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocket.cpp:
  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocket.idl:
  • Modules/websockets/WebSocketChannel.cpp:
  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WebSocketChannelClient.h:
  • Modules/websockets/WebSocketDeflateFramer.cpp:
  • Modules/websockets/WebSocketDeflateFramer.h:
  • Modules/websockets/WebSocketDeflater.cpp:
  • Modules/websockets/WebSocketDeflater.h:
  • Modules/websockets/WebSocketExtensionDispatcher.cpp:
  • Modules/websockets/WebSocketExtensionDispatcher.h:
  • Modules/websockets/WebSocketExtensionParser.cpp:
  • Modules/websockets/WebSocketExtensionParser.h:
  • Modules/websockets/WebSocketExtensionProcessor.h:
  • Modules/websockets/WebSocketFrame.cpp:
  • Modules/websockets/WebSocketFrame.h:
  • Modules/websockets/WebSocketHandshake.cpp:
  • Modules/websockets/WebSocketHandshake.h:
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::idbConnectionProxy):
(WebCore::Document::socketProvider):

  • dom/Document.h:
  • dom/ScriptExecutionContext.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didSendWebSocketFrame):

  • inspector/InspectorNetworkAgent.cpp:
  • inspector/InspectorNetworkAgent.h:
  • page/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::webSocketEnabled const):

  • page/RuntimeEnabledFeatures.h:
  • page/SocketProvider.cpp:
  • page/SocketProvider.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::socketProvider):

  • workers/WorkerThread.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/Network/WebSocketProvider.cpp:
  • WebProcess/Network/WebSocketProvider.h:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferencesPrivate.h:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:37 PM Changeset in webkit [220249] by don.olmstead@sony.com
  • 6 edits
    1 add in trunk/Source/WebCore

Remove LayoutUnit dependency in TextStream
https://bugs.webkit.org/show_bug.cgi?id=175110

Reviewed by Zalan Bujtas.

No new tests. No change in behavior.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/LayoutUnit.cpp: Added.

(WebCore::operator<<):

  • platform/LayoutUnit.h:
  • platform/text/TextStream.cpp:
  • platform/text/TextStream.h:
6:58 PM Changeset in webkit [220248] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Improve WebKitLegacy video fullscreen animation begin and end rects.
https://bugs.webkit.org/show_bug.cgi?id=175152
rdar://problem/32840576

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-03
Reviewed by Eric Carlson.

No new tests, becuase this change has no effect on the DOM.

This change uses different rects for fullscreen animation to prevent the animation
from failing, and to improve the aesthetics of the animation.

  • platform/mac/WebVideoFullscreenController.mm:

(frameExpandedToRatioOfFrame):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
(-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
(constrainFrameToRatioOfFrame): Deleted.

6:44 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
6:38 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
6:13 PM Changeset in webkit [220247] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

[EME][Mac] SecureStop left on disk in Private Browsing mode.
https://bugs.webkit.org/show_bug.cgi?id=175162

Reviewed by Eric Carlson.

Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should
be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat
an empty string as valid, and do not try to store or retrieve session information to disk in that case.

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const):

  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:

(WebCore::CDMSessionAVContentKeySession::releaseKeys):
(WebCore::CDMSessionAVContentKeySession::update):
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
(WebCore::CDMSessionAVContentKeySession::contentKeySession):

  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:

(WebCore::CDMSessionMediaSourceAVFObjC::storagePath const):

6:12 PM Changeset in webkit [220246] by clopez@igalia.com
  • 3 edits in trunk/Tools

REGRESSION(r219850): run-benchmark script broken on Linux
https://bugs.webkit.org/show_bug.cgi?id=175126

Reviewed by Stephanie Lewis.

The run-benchmark script dynamically generates the list of supported
browsers and platforms (currently Linux and OSX) by loading all
python files from Tools/Scripts/webkitpy/benchmark_runner/browser_driver
and getting the browser_name and platform variables from the
classes defined there.

This means that this classes should not raise an exception when
loaded on other platforms or otherwise they will broke the whole
script. Its fine if they raise an exception when executing any of
the methods they implement, but not when just loading/importing
the class.

Move the argument variable definitions that call on the platform
specific OSXBrowserDriver._screen_size() function from beeing
variables that are evaluated when loading the file, to be functions
that are only evaluated when the actual functionality needs to be
executed.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:

(OSXChromeDriver.launch_url):
(OSXChromeCanaryDriver.launch_url):
(create_args):
(create_chrome_options):
(create_window_size_arg):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:

(OSXFirefoxDriver.launch_url):
(OSXFirefoxNightlyDriver.launch_url):
(OSXFirefoxNightlyDriver.launch_driver):
(create_args):

6:07 PM Changeset in webkit [220245] by Chris Dumez
  • 11 edits
    7 deletes in trunk

Multiple Layout tests from web-platform-tests/beacon/ are timing out.
https://bugs.webkit.org/show_bug.cgi?id=175076
<rdar://problem/33704752>

Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Rebaseline tests that are now passing.

  • web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt:

Source/WebKit:

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::completeAuthenticationChallenge):
In the NETWORK_SESSION code path, we did not ask the client about server trust evaluation
when the clientCredentialPolicy was CannotAskClientForCredentials. This is because the
same delegate is used for HTTP authentication and server trust evaluation in the
NETWORK_SESSION code path. To align both code paths, we now ask the client about server
trust evaluation even if the policy CannotAskClientForCredentials. This allows WKTR
to trust certificates for localhost / 127.0.0.1 unconditionally and consistently.

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Removed.
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Removed.
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Removed.

Drop platform-specific expectations as those tests are now passing everywhere.

  • platform/wk2/TestExpectations:

Unskip tests that are now passing.

6:00 PM Changeset in webkit [220244] by commit-queue@webkit.org
  • 8 edits
    2 adds in trunk

[Fetch API] Add support for Request keepalive getter
https://bugs.webkit.org/show_bug.cgi?id=175151

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

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/request/request-idl-expected.txt:
  • web-platform-tests/fetch/api/request/request-idl.html:
  • web-platform-tests/fetch/api/request/request-keepalive-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-keepalive.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html

Adding keepalive as a fetch option.
Adding initialization and getter of keepalive into FetchRequest.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::buildOptions):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • loader/FetchOptions.h:
5:20 PM Changeset in webkit [220243] by commit-queue@webkit.org
  • 69 edits
    6 copies
    2 adds
    1 delete in trunk

[PAL] Move spi/cf directory into PAL
https://bugs.webkit.org/show_bug.cgi?id=175057

Patch by Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp> on 2017-08-03
Reviewed by Antti Koivisto.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • loader/cocoa/SubresourceLoaderCocoa.mm:
  • loader/mac/ResourceLoaderMac.mm:
  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • platform/mac/PluginBlacklist.mm:
  • platform/mac/WebCoreNSStringExtras.mm:
  • platform/mac/WebGLBlacklist.mm:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/CookieJarCFNet.cpp:
  • platform/network/cf/CredentialStorageCFNet.cpp:
  • platform/network/cf/ResourceHandleCFNet.cpp:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
  • platform/network/cf/ResourceRequestCFNet.cpp:
  • platform/network/cf/ResourceRequestCFNet.h:
  • platform/network/cf/ResourceResponse.h:
  • platform/network/cf/ResourceResponseCFNet.cpp:
  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:
  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/cocoa/CredentialCocoa.h:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:
  • platform/network/cocoa/ResourceRequestCocoa.mm:
  • platform/network/cocoa/ResourceResponseCocoa.mm:
  • platform/network/ios/ResourceRequestIOS.mm:
  • platform/network/mac/CookieJarMac.mm:
  • platform/network/mac/FormDataStreamMac.mm:
  • platform/network/mac/ResourceHandleMac.mm:
  • platform/network/mac/ResourceRequestMac.mm:
  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
  • platform/network/mac/WebCoreURLResponse.h:
  • testing/cocoa/WebArchiveDumpSupport.mm:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cf/CFLocaleSPI.h: Renamed from Source/WebCore/platform/spi/cf/CFLocaleSPI.h.
  • pal/spi/cf/CFNetworkConnectionCacheSPI.h: Renamed from Source/WebCore/platform/spi/cf/CFNetworkConnectionCacheSPI.h.
  • pal/spi/cf/CFNetworkSPI.h: Renamed from Source/WebCore/platform/spi/cf/CFNetworkSPI.h.
  • pal/spi/cf/CFUtilitiesSPI.h: Renamed from Source/WebCore/platform/spi/cf/CFUtilitiesSPI.h.
  • pal/spi/cf/CoreAudioSPI.h: Renamed from Source/WebCore/platform/spi/cf/CoreAudioSPI.h.
  • pal/spi/cf/CoreMediaSPI.h: Renamed from Source/WebCore/platform/spi/cf/CoreMediaSPI.h.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkLoadMac.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • Shared/cf/CookieStorageUtilsCF.h:
  • Shared/mac/ChildProcessMac.mm:
  • Shared/mac/CookieStorageShim.mm:
  • UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
  • UIProcess/API/Cocoa/WKProcessPool.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:
  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/mac/WebCookieManagerProxyMac.mm:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/cocoa/WebProcessCocoa.mm:

Source/WebKitLegacy/mac:

  • Plugins/Hosted/HostedNetscapePluginStream.mm:
  • Plugins/WebNetscapePluginStream.mm:
  • WebCoreSupport/WebFrameNetworkingContext.mm:
  • WebView/WebPreferences.mm:
  • WebView/WebView.mm:

Tools:

  • Scripts/webkitpy/style/checker.py:
  • Scripts/webkitpy/style/checker_unittest.py:

(GlobalVariablesTest.test_path_rules_specifier):

Ignore "readability/naming/underscores" style errors for sources
under the WebCore/PAL/pal/spi directory.

  • TestWebKitAPI/Tests/WebKit2Cocoa/CookieAcceptPolicy.mm:
5:14 PM Changeset in webkit [220242] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

4:54 PM Changeset in webkit [220241] by commit-queue@webkit.org
  • 47 edits in trunk

Remove FETCH_API compilation guard
https://bugs.webkit.org/show_bug.cgi?id=175154

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

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No change of behavior.

  • Configurations/FeatureDefines.xcconfig:
  • Modules/fetch/DOMWindowFetch.cpp:
  • Modules/fetch/DOMWindowFetch.h:
  • Modules/fetch/DOMWindowFetch.idl:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBody.idl:
  • Modules/fetch/FetchBodyConsumer.cpp:
  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/fetch/FetchBodyOwner.cpp:
  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchHeaders.cpp:
  • Modules/fetch/FetchHeaders.h:
  • Modules/fetch/FetchHeaders.idl:
  • Modules/fetch/FetchInternals.js:
  • Modules/fetch/FetchLoader.cpp:
  • Modules/fetch/FetchLoader.h:
  • Modules/fetch/FetchLoaderClient.h:
  • Modules/fetch/FetchRequest.cpp:
  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/FetchResponse.js:
  • Modules/fetch/FetchResponseSource.cpp:
  • Modules/fetch/FetchResponseSource.h:
  • Modules/fetch/WorkerGlobalScopeFetch.cpp:
  • Modules/fetch/WorkerGlobalScopeFetch.h:
  • Modules/fetch/WorkerGlobalScopeFetch.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::fetchAPIEnabled const):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:38 PM Changeset in webkit [220240] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.2.1

Tag Safari-604.2.1.

4:27 PM Changeset in webkit [220239] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.37

Tag Safari-604.1.37.

4:17 PM Changeset in webkit [220238] by Lucas Forschler
  • 2 edits in trunk/Tools

https://bugs.webkit.org/show_bug.cgi?id=174718

4:11 PM Changeset in webkit [220237] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1-branch/Source

Versioning.

4:11 PM Changeset in webkit [220236] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1-branch/Source

Versioning.

4:10 PM Changeset in webkit [220235] by Devin Rousso
  • 10 edits in trunk/Source

Web Inspector: add button to open Inspector2
https://bugs.webkit.org/show_bug.cgi?id=175108

Reviewed by Brian Burg.

Source/WebCore:

This patch just exposes a function to the inspector page. No new functionality was added.

  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::inspectInspector):

Source/WebInspectorUI:

  • UserInterface/Debug/Bootstrap.js:

(updateDebugUI):
(WI.runBootstrapOperations):

  • UserInterface/Views/ButtonToolbarItem.js:

(WI.ButtonToolbarItem):
(WI.ButtonToolbarItem.prototype.get label): Deleted.
(WI.ButtonToolbarItem.prototype.set label): Deleted.

  • UserInterface/Views/ButtonToolbarItem.css:

(.toolbar .item.button):
(.toolbar .item.button:not(.disabled):active):
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
(.toolbar .item.button > .glyph):
(.toolbar .item.button:not(.disabled):active > .glyph): Deleted.
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph): Deleted.
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph): Deleted.
(.toolbar .item.button > .label): Deleted.

  • UserInterface/Views/ActivateButtonToolbarItem.js:

(WI.ActivateButtonToolbarItem):
(WI.ActivateButtonToolbarItem.prototype.get label): Deleted.
(WI.ActivateButtonToolbarItem.prototype.set label): Deleted.

  • UserInterface/Base/Main.js:

(WI.contentLoaded):
Remove unused label parameter from Toolbar objects.

4:09 PM Changeset in webkit [220234] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1-branch/Source/WebKitLegacy

Cherry-pick r220205. rdar://problem/33711361

3:31 PM Changeset in webkit [220233] by Matt Baker
  • 20 edits
    1 copy
    7 adds in trunk

Web Inspector: Instrument WebGLProgram created/deleted
https://bugs.webkit.org/show_bug.cgi?id=175059

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Extend the Canvas protocol with types/events for tracking WebGLPrograms.

  • inspector/protocol/Canvas.json:

Source/WebCore:

Tests: inspector/canvas/shaderProgram-add-remove-webgl.html

inspector/canvas/shaderProgram-add-remove-webgl2.html

This patch adds instrumentation to WebGLRenderingContextBase for tracking
WebGLPrograms. A new helper class, InspectorShaderProgram, is used by
the CanvasAgent to hold related data.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::createProgram):
(WebCore::WebGLRenderingContextBase::deleteProgram):

  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::didCreateProgram):
(WebCore::InspectorCanvasAgent::willDeleteProgram):
(WebCore::InspectorCanvasAgent::clearCanvasData):
(WebCore::InspectorCanvasAgent::unbindCanvas):
(WebCore::InspectorCanvasAgent::unbindProgram):
(WebCore::InspectorCanvasAgent::assertInspectorProgram):
(WebCore::InspectorCanvasAgent::findInspectorProgram):

  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
(WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
(WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
(WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
(WebCore::InspectorInstrumentation::recordCanvasActionImpl):
(WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
(WebCore::InspectorInstrumentation::didCreateProgramImpl):
(WebCore::InspectorInstrumentation::willDeleteProgramImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::recordCanvasActionImpl):
(WebCore::InspectorInstrumentation::didCreateCSSCanvas):
(WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
(WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
(WebCore::InspectorInstrumentation::didChangeCanvasMemory):
(WebCore::InspectorInstrumentation::recordCanvasAction):
(WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
(WebCore::InspectorInstrumentation::didCreateProgram):
(WebCore::InspectorInstrumentation::willDeleteProgram):

  • inspector/InspectorShaderProgram.cpp: Added.

(WebCore::InspectorShaderProgram::create):
(WebCore::InspectorShaderProgram::InspectorShaderProgram):
(WebCore::InspectorShaderProgram::context const):

  • inspector/InspectorShaderProgram.h: Added.

Source/WebInspectorUI:

This patch adds frontend support for shader program instrumentation.
The frontend creates a ShaderProgram model object for each WebGLProgram.
Since only canvases with a WebGL context have programs, the Canvas model
object does not contain any logic specific to programs. CanvasManager
dispatches program added/removed events, and the parent Canvas can be
accessed from ShaderProgram but not the other way around.

  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager):
(WI.CanvasManager.prototype.get shaderPrograms):
(WI.CanvasManager.prototype.canvasRemoved):
(WI.CanvasManager.prototype.programCreated):
(WI.CanvasManager.prototype.programDeleted):
(WI.CanvasManager.prototype._mainResourceDidChange):
(WI.CanvasManager.prototype._dispatchShaderProgramRemoved):

  • UserInterface/Main.html:
  • UserInterface/Models/Canvas.js:

(WI.Canvas.prototype.nextShaderProgramDisplayNumber):
(WI.Canvas):

  • UserInterface/Models/ShaderProgram.js: Added.

(WI.ShaderProgram):
(WI.ShaderProgram.prototype.get identifier):
(WI.ShaderProgram.prototype.get canvas):
(WI.ShaderProgram.prototype.get displayName):

  • UserInterface/Protocol/CanvasObserver.js:

(WI.CanvasObserver.prototype.programCreated):
(WI.CanvasObserver.prototype.programDeleted):
(WI.CanvasObserver):

  • UserInterface/Test.html:

LayoutTests:

Add tests for CanvasManager shader program events and ShaderProgram model object.
WebGL and WebGL2 contexts are tested separately based on platform support.

  • inspector/canvas/resources/shaderProgram-utilities.js: Added.

(createProgram):
(deleteProgram):
(deleteContext):
(TestPage.registerInitializer.awaitProgramAdded):
(TestPage.registerInitializer):
(TestPage.registerInitializer.window.initializeTestSuite):
(TestPage.registerInitializer.window.addSimpleTestCase):
(TestPage.registerInitializer.window.addParentCanvasRemovedTestCase):

  • inspector/canvas/shaderProgram-add-remove-webgl-expected.txt: Added.
  • inspector/canvas/shaderProgram-add-remove-webgl.html: Added.
  • inspector/canvas/shaderProgram-add-remove-webgl2-expected.txt: Added.
  • inspector/canvas/shaderProgram-add-remove-webgl2.html: Added.
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
3:18 PM Changeset in webkit [220232] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

JSContext Inspector: Recording tab should not be available in New Tab picker
https://bugs.webkit.org/show_bug.cgi?id=175155

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-08-03
Reviewed by Brian Burg.

  • UserInterface/Views/RecordingTabContentView.js:

(WI.RecordingTabContentView.isTabAllowed):
Only allow the Recording Tab if we have a CanvasAgent.

1:28 PM Changeset in webkit [220231] by matthew_hanson@apple.com
  • 1 edit in branches/safari-604-branch/Source/JavaScriptCore/ChangeLog

Cherry-pick r220144. rdar://problem/33692161

1:27 PM Changeset in webkit [220230] by matthew_hanson@apple.com
  • 5 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r220138. rdar://problem/33692550

1:27 PM Changeset in webkit [220229] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604-branch

Cherry-pick r220112. rdar://problem/33692164

1:27 PM Changeset in webkit [220228] by matthew_hanson@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebCore/ChangeLog

Cherry-pick r220085. rdar://problem/33692157

1:27 PM Changeset in webkit [220227] by matthew_hanson@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebCore/ChangeLog

Cherry-pick r220084. rdar://problem/33692167

1:27 PM Changeset in webkit [220226] by Matt Lewis
  • 6 edits in trunk/Source

Unreviewed, rolling out r220209.

This caused internal build failures.

Reverted changeset:

"Use MPAVRoutingController instead of deprecated versions."
https://bugs.webkit.org/show_bug.cgi?id=175063
http://trac.webkit.org/changeset/220209

1:27 PM Changeset in webkit [220225] by matthew_hanson@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebCore/ChangeLog

Cherry-pick r220077. rdar://problem/33692157

1:27 PM Changeset in webkit [220224] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604-branch

Cherry-pick r220035. rdar://problem/33692157

1:21 PM Changeset in webkit [220223] by commit-queue@webkit.org
  • 164 edits
    13 copies
    1 move
    302 adds
    1 delete in trunk/LayoutTests

Import WPT service worker tests
https://bugs.webkit.org/show_bug.cgi?id=175053

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-03
Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Importing service-worker tests up to cfdfb48329b20e19b6492a317ac5181a99506fd2.

  • resources/resource-files.json:
  • resources/import-expectations.json:
  • web-platform-tests/service-workers/:

LayoutTests:

1:19 PM Changeset in webkit [220222] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Automation: consider file extensions in the "accept" attribute when deciding if a file can be uploaded
https://bugs.webkit.org/show_bug.cgi?id=175081

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::fileCanBeAcceptedForUpload):
(WebKit::WebAutomationSession::handleRunOpenPanel):
In cases where a file has an extension, try to match it against the
accepted extensions list. Give up if there's no extension. Otherwise,
proceed as normal to infer a MIME type based on the extension.
In cases where extension-less files are inside hidden folders, the MIME
inference will fail as well.

12:37 PM Changeset in webkit [220221] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WKE] Pass the --memory-limited option on the GTK and WPE buildbots for the JSC tests.
https://bugs.webkit.org/show_bug.cgi?id=175140

Reviewed by Alexey Proskuryakov.

We are having lately issues with JSC tests causing problems on
the GTK+ and WPE bots due to the high amount of memory some tests
need to run.

The best thing we can do now is to workaround this by disabling
all the tests marked as memoryLimited on the GTK and WPE bots.
We may revise this on the future.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunJavaScriptCoreTests.start):

12:21 PM Changeset in webkit [220220] by beidson@apple.com
  • 36 edits
    14 adds in trunk

Add SW IDLs and stub out basic functionality.
https://bugs.webkit.org/show_bug.cgi?id=175115

Reviewed by Chris Dumez.

.:

  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

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

Source/WebCore:

No new tests (Currently no behavior change).

Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
the Settings-based code generation is completely broken for non-Document contexts,
whereas the RuntimeEnabledFeatures-based generation is not.

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.
  • bindings/js/JSServiceWorkerContainerCustom.cpp: Added.

(WebCore::JSServiceWorkerContainer::ready const):

  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
(WebCore::toJSServiceWorkerGlobalScope):

  • bindings/js/JSWorkerGlobalScopeBase.h:
  • dom/EventNames.h:
  • dom/EventTargetFactory.in:
  • features.json: Change status of feature.
  • page/Navigator.idl:
  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::serviceWorker):

  • page/NavigatorBase.h:
  • page/NavigatorServiceWorker.idl: Added.
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
(WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):

  • workers/ServiceWorker.cpp: Added.

(WebCore::ServiceWorker::postMessage):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::scriptURL const):
(WebCore::ServiceWorker::state const):
(WebCore::ServiceWorker::eventTargetInterface const):
(WebCore::ServiceWorker::scriptExecutionContext const):

  • workers/ServiceWorker.h: Added.
  • workers/ServiceWorker.idl: Added.
  • workers/ServiceWorkerContainer.cpp: Added.

(WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::controller const):
(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::startMessages):
(WebCore::ServiceWorkerContainer::eventTargetInterface const):
(WebCore::ServiceWorkerContainer::scriptExecutionContext const):

  • workers/ServiceWorkerContainer.h: Added.
  • workers/ServiceWorkerContainer.idl: Added.
  • workers/ServiceWorkerGlobalScope.cpp: Added.

(WebCore::ServiceWorkerGlobalScope::registration):
(WebCore::ServiceWorkerGlobalScope::skipWaiting):

  • workers/ServiceWorkerGlobalScope.h: Added.
  • workers/ServiceWorkerGlobalScope.idl: Added.
  • workers/ServiceWorkerRegistration.cpp: Added.

(WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::installing):
(WebCore::ServiceWorkerRegistration::waiting):
(WebCore::ServiceWorkerRegistration::active):
(WebCore::ServiceWorkerRegistration::scope const):
(WebCore::ServiceWorkerRegistration::update):
(WebCore::ServiceWorkerRegistration::unregister):
(WebCore::ServiceWorkerRegistration::eventTargetInterface const):
(WebCore::ServiceWorkerRegistration::scriptExecutionContext const):

  • workers/ServiceWorkerRegistration.h: Added.
  • workers/ServiceWorkerRegistration.idl: Added.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.

The ramifications to layouttests are complicated, and we'd like to follow up in a
separate patch.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • Scripts/webkitpy/bindings/main.py:
12:17 PM Changeset in webkit [220219] by mark.lam@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

Rename ScratchBuffer::activeLengthPtr to addressOfActiveLength.
https://bugs.webkit.org/show_bug.cgi?id=175142
<rdar://problem/33704528>

Reviewed by Filip Pizlo.

The convention in the rest of of JSC for such methods which return the address of
a field is to name them "addressOf<field name>". We'll rename
ScratchBuffer::activeLengthPtr to be consistent with this convention.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewArray):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):

  • jit/ScratchRegisterAllocator.cpp:

(JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall):
(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):

  • runtime/VM.h:

(JSC::ScratchBuffer::addressOfActiveLength):
(JSC::ScratchBuffer::activeLengthPtr): Deleted.

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

12:13 PM Changeset in webkit [220218] by commit-queue@webkit.org
  • 4 edits
    1 add in trunk/LayoutTests

Test gardening.
https://bugs.webkit.org/show_bug.cgi?id=175137

Unreviewed test gardening.

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

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/images/async-image-multiple-clients-repaint-expected.txt: Added.
  • platform/gtk/fast/text/atsui-pointtooffset-calls-cg-expected.txt:
  • platform/win/TestExpectations:
11:59 AM Changeset in webkit [220217] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

Unreviewed, build fix for Windows port
https://bugs.webkit.org/show_bug.cgi?id=175013

  • wtf/Threading.h:
11:58 AM Changeset in webkit [220216] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

11:55 AM Changeset in webkit [220215] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1-branch/Source

Versioning.

11:29 AM Changeset in webkit [220214] by Yusuke Suzuki
  • 7 edits
    4 deletes in trunk/Source/WTF

Merge ThreadHolder to WTF::Thread itself
https://bugs.webkit.org/show_bug.cgi?id=175013

Reviewed by Mark Lam.

Currently, we store ThreadHolder* to the TLS, and ThreadHolder* holds Ref<Thread>.
When we get Thread& from the current thread TLS, we need to dereference the ThreadHolder*.
However, ideally, we can store Thread* directly to the current thread TLS.
While the ThreadHolder design is beautiful, it's worth optimizing by storing Thread* directly
since Thread::current() is so frequently executed.

This patch merges ThreadHolder to Thread. And we now store Thread* directly in the TLS.
When storing it to TLS, we call leakRef() to keep Thread ref count incremented by the TLS.
And when destroying the TLS, we call deref() to ensure that Thread* is dereferenced from
the TLS.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/ThreadHolder.cpp: Removed.
  • wtf/ThreadHolder.h: Removed.
  • wtf/ThreadHolderPthreads.cpp: Removed.
  • wtf/ThreadHolderWin.cpp: Removed.
  • wtf/Threading.cpp:

(WTF::Thread::entryPoint):
(WTF::initializeThreading):

  • wtf/Threading.h:

(WTF::Thread::currentMayBeNull):
(WTF::Thread::current):

  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::waitForCompletion):
(WTF::Thread::initializeCurrentTLS):
(WTF::Thread::initializeTLSKey):
(WTF::Thread::initializeTLS):
(WTF::Thread::destructTLS):
(WTF::Thread::createCurrentThread): Deleted.

  • wtf/ThreadingWin.cpp:

(WTF::Thread::initializeCurrentTLS):
(WTF::threadMapMutex):
(WTF::Thread::initializeTLSKey):
(WTF::Thread::currentDying):
(WTF::Thread::get):
(WTF::Thread::initializeTLS):
(WTF::Thread::destructTLS):
(WTF::waitForThreadCompletion):
(WTF::Thread::createCurrentThread): Deleted.

11:06 AM Changeset in webkit [220213] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1-branch

New Tag.

11:03 AM Changeset in webkit [220212] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WebKit] Sort Xcode project file
https://bugs.webkit.org/show_bug.cgi?id=175122

Patch by Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp> on 2017-08-03
Reviewed by Antti Koivisto.

  • WebKit.xcodeproj/project.pbxproj:
11:03 AM Changeset in webkit [220211] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[WebCore] Sort Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=175121

Patch by Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp> on 2017-08-03
Reviewed by Antti Koivisto.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
10:51 AM Changeset in webkit [220210] by weinig@apple.com
  • 59 edits
    4 adds
    2 deletes in trunk

Source/WebCore:
[WebIDL] Convert MutationCallback to be a normal generated callback
https://bugs.webkit.org/show_bug.cgi?id=174140

Reviewed by Darin Adler.

To make this work more nicely, I:

  • Added the ability to for non-nullable interfaces in sequences to be passed via a Ref<> rather than a RefPtr<> as a parameter to a callback function. (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
  • Added a new extended attribute for callback functions called [CallbackThisObject=Type] which allows you to specify that the callback needs a this object in addition to its arguments. When specified, the first argument of the C++ implementation function will now correspond to the this object, with the remaining arguments shifted over one.
  • Converted callback objects to all inherit directly from ActiveDOMCallback rather than having the generated JS callback derived class inherit from it. This allows us to have access to a callback's canInvokeCallback() function anywhere (needed for MutationCallback) as well as giving a place to put an optional virtual visitJSFunction to allow marking weak callbacks (while not an ideal layering, this matches what we do in EventListener). This change requires each callback to have a bit more code to import the ActiveDOMCallback's constructor and requires non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document).
  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSMutationCallback.cpp: Removed.
  • bindings/js/JSMutationCallback.h: Removed.

Remove custom JSMutationCallback.h/cpp

  • Modules/geolocation/PositionCallback.h:
  • Modules/geolocation/PositionErrorCallback.h:
  • Modules/notifications/NotificationPermissionCallback.h:
  • Modules/webaudio/AudioBufferCallback.h:
  • Modules/webdatabase/DatabaseCallback.h:
  • Modules/webdatabase/SQLStatementCallback.h:
  • Modules/webdatabase/SQLStatementErrorCallback.h:
  • Modules/webdatabase/SQLTransactionCallback.h:
  • Modules/webdatabase/SQLTransactionErrorCallback.h:
  • css/MediaQueryListListener.h:
  • dom/NodeFilter.h:
  • dom/RequestAnimationFrameCallback.h:
  • dom/StringCallback.h:
  • fileapi/BlobCallback.h:
  • html/VoidCallback.h:
  • page/IntersectionObserverCallback.h:
  • page/PerformanceObserverCallback.h:

Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor.

  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::filterDeviceList):
(WebCore::MediaDevicesRequest::start):

  • Modules/mediastream/MediaDevicesRequest.h:

Change filterDeviceList to take a Vector of Refs.

  • bindings/IDLTypes.h:

Add InnerParameterType and NullableInnerParameterType type hooks
and specialize wrappers to use Ref for InnerParameterType, and RefPtr
for NullableInnerParameterType.

  • bindings/js/JSCallbackData.cpp:
  • bindings/js/JSCallbackData.h:

Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction
to allow marking the underlying function.

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::JSMutationObserver::visitAdditionalChildren):
(WebCore::constructJSMutationObserver): Deleted.
Remove the custom constructor and replace it with a custom visitAdditionalChildren
that calls the new ActiveDOMObject's visitJSFunction.

  • bindings/scripts/CodeGenerator.pm:

(ParseType):
Add helper to parse a type and cache the result.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
(GetJSCallbackDataType): Deleted.

  • Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined() as the this object as specified by WebIDL.
  • Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves.
  • Add a visitJSFunction override for weak callback functions which calls into the callback data.
  • bindings/scripts/IDLAttributes.json:

Add [CallbackThisObject].

  • bindings/scripts/IDLParser.pm:

(ParseType):
Add entry point to parse a single type.

  • css/FontFaceSet.h:

Use Ref rather than RefPtr for the faces sequence.

  • dom/ActiveDOMCallback.h:

(WebCore::ActiveDOMCallback::visitJSFunction):
Add an optional visitJSFunction virtual function so that derived classes
have a way of marking underlying function objects.

  • dom/MutationCallback.h:

Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject).

  • dom/MutationCallback.idl: Added.

Added to generate the callback. Uses the new [CallbackThisObject].

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::deliver):
Switch to call idiomatic handleEvent, and pass *this as the first parameter
which will be translated into the this object.

  • dom/MutationObserver.h:

(WebCore::MutationObserver::callback):
Expose the callback so it can marked during GC.

  • dom/MutationObserver.idl:

Remove CustomConstructor and replace it with a custom mark function.

  • dom/NativeNodeFilter.cpp:
  • dom/NativeNodeFilter.h:
  • inspector/InspectorDatabaseAgent.cpp:

Pass now needed ScriptExecutionContext to non-js based callbacks.

  • bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.h:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
  • bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added.
  • bindings/scripts/test/TestCallbackInterface.idl:

Add/update tests.

Source/WebKit:
[WebIDL] Convert MutationCallback to be a normal generated callback
https://bugs.webkit.org/show_bug.cgi?id=174140

Reviewed by Darin Adler.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilterPrivate.h:

Pass, now necessary, Document to NativeNodeFilter constructor.

Source/WebKitLegacy/mac:
[WebIDL] Convert MutationCallback to be a normal generated callback
https://bugs.webkit.org/show_bug.cgi?id=174140

Reviewed by Darin Adler.

  • DOM/DOMDocument.mm:

(-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
(-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
Pass, now necessary, Document to NativeNodeFilter constructor.

LayoutTests:
[WebIDL] Convert MutationCallback to be a normal generate callback
https://bugs.webkit.org/show_bug.cgi?id=174140

Reviewed by Darin Adler.

  • fast/dom/MutationObserver/mutation-observer-constructor-expected.txt:

Update results for standard error messages.

10:37 AM Changeset in webkit [220209] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Use MPAVRoutingController instead of deprecated versions.
https://bugs.webkit.org/show_bug.cgi?id=175063
Source/WebCore:

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-03
Reviewed by Tim Horton.

No new tests because no behavior change. This uses a different platform class to present
an interface.

Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
Add MPMediaControlsViewController.

  • platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

rdar://problem/33301230

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-03
Reviewed by Tim Horton.

Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.

  • UIProcess/ios/forms/WKAirPlayRoutePicker.h:
  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker show:fromRect:]):
(-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
(-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
(-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
(-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.

10:19 AM Changeset in webkit [220208] by Chris Dumez
  • 29 edits
    31 adds in trunk

Improve our support for referrer policies
https://bugs.webkit.org/show_bug.cgi?id=175069
<rdar://problem/33677313>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several WPT tests now that more checks are passing.

  • web-platform-tests/beacon/headers/header-referrer-origin-when-cross-origin-expected.txt:
  • web-platform-tests/beacon/headers/header-referrer-same-origin-expected.txt:
  • web-platform-tests/beacon/headers/header-referrer-strict-origin-when-cross-origin.https-expected.txt:
  • web-platform-tests/beacon/headers/header-referrer-strict-origin.https-expected.txt:
  • web-platform-tests/beacon/headers/header-referrer-unsafe-url.https-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-referrer-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-referrer-worker-expected.txt:
  • web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:

Source/WebCore:

Improve our support for referrer policies. In particular, we now support the
additional following ones: "same-origin", "origin-when-cross-origin" and
"strict-origin-when-cross-origin".

This is as per the following specification:

Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the
FetchOptions::ReferrerPolicy one.

Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html

http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html
http/tests/referrer-policy/origin-when-cross-origin/same-origin.html
http/tests/referrer-policy/same-origin/cross-origin-http-http.html
http/tests/referrer-policy/same-origin/cross-origin-http.https.html
http/tests/referrer-policy/same-origin/same-origin.html
http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html
http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html
http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html
http/tests/referrer-policy/strict-origin/cross-origin-http-http.html
http/tests/referrer-policy/strict-origin/cross-origin-http.https.html
http/tests/referrer-policy/strict-origin/same-origin.html

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):

  • Modules/fetch/FetchReferrerPolicy.h:
  • Modules/fetch/FetchReferrerPolicy.idl:
  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequestInit.h:
  • dom/Document.cpp:

(WebCore::Document::processReferrerPolicy):
(WebCore::Document::applyQuickLookSandbox):
(WebCore::Document::applyContentDispositionAttachmentSandbox):

  • dom/Document.h:
  • loader/FetchOptions.h:
  • loader/FrameNetworkingContext.h:
  • loader/PingLoader.cpp:

(WebCore::PingLoader::sendBeacon):
Drop explicit call to SecurityPolicy::shouldHideReferrer(). This is already called inside
SecurityPolicy::generateReferrerHeader() and used only when needed, depending on the
actual referrer policy.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::updateHTTPRequestHeaders):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):

  • page/SecurityPolicy.cpp:

(WebCore::referrerToOriginString):
(WebCore::SecurityPolicy::generateReferrerHeader):

  • page/SecurityPolicy.h:
  • platform/ReferrerPolicy.h:

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::schedulePluginStreamLoad):

LayoutTests:

  • http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http-expected.txt: Added.
  • http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html: Added.
  • http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https-expected.txt: Added.
  • http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html: Added.
  • http/tests/referrer-policy/origin-when-cross-origin/same-origin-expected.txt: Added.
  • http/tests/referrer-policy/origin-when-cross-origin/same-origin.html: Added.
  • http/tests/referrer-policy/resources/document.html: Added.
  • http/tests/referrer-policy/same-origin/cross-origin-http-http-expected.txt: Added.
  • http/tests/referrer-policy/same-origin/cross-origin-http-http.html: Added.
  • http/tests/referrer-policy/same-origin/cross-origin-http.https-expected.txt: Added.
  • http/tests/referrer-policy/same-origin/cross-origin-http.https.html: Added.
  • http/tests/referrer-policy/same-origin/same-origin-expected.txt: Added.
  • http/tests/referrer-policy/same-origin/same-origin.html: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html: Added.
  • http/tests/referrer-policy/strict-origin/cross-origin-http-http-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin/cross-origin-http-http.html: Added.
  • http/tests/referrer-policy/strict-origin/cross-origin-http.https-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin/cross-origin-http.https.html: Added.
  • http/tests/referrer-policy/strict-origin/same-origin-expected.txt: Added.
  • http/tests/referrer-policy/strict-origin/same-origin.html: Added.

Add layout test coverage.

  • http/tests/security/referrer-policy-invalid-expected.txt:

Rebaseline test now that console message has changed.

9:16 AM Changeset in webkit [220207] by dbates@webkit.org
  • 11 edits
    12 adds in trunk

Support ::marker pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=141477

Reviewed by David Hyatt.

Source/WebCore:

Implements the ::marker pseudo element as per the CSS Pseudo-Element Module Level 4
spec., <https://drafts.csswg.org/css-pseudo-4> (Editor's Draft, 24 July 2017).

The ::marker pseudo element is a convenience pseudo element that allows a person to
style the appearance of a list item marker. For example, to render all list item
markers in bolded, blue text you would define a stylesheet with the following content:

li::marker {

color: blue;
font-weight: bold;

}

and this could be applied to a page that contains markup of the form:

<ol>

<li>Item 1</li>
<li>Item 2</li>
...
<li>Item N-1</li>
<li>Item N</li>

</ol>

Formerly to the achieve the same effect you would need to use a stylesheet of the form:

li {

color: blue;
font-weight: bold;

}

.list-item-content {

all: initial;

}

and then write your markup to have the form:

<ol>

<li><span class="list-item-content">Item 1</span></li>
<li><span class="list-item-content">Item 2</span></li>
...
<li><span class="list-item-content">Item N-1</span></li>
<li><span class="list-item-content">Item N</span></li>

</ol>

The ::marker pseudo element only supports stylizing all font properties and the color property
of a list item marker.

Tests: fast/lists/list-marker-with-display.html

http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html
http/wpt/css/css-pseudo-4/marker-color.html
http/wpt/css/css-pseudo-4/marker-font-properties.html
http/wpt/css/css-pseudo-4/marker-inherit-values.html

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::pseudoId): Return the pseudo id for the ::marker pseudo element.

  • css/CSSSelector.h: Add enumerator PseudoElementMarker to the pseudo element enum.
  • css/RuleSet.cpp:

(WebCore::determinePropertyWhitelistType): Return whitelist type PropertyWhitelistMarker for ::marker
so that we match rules against the acceptable rules for ::marker.

  • css/RuleSet.h: Add enumerator PropertyWhitelistMarker to the property whitelist type enum.
  • css/SelectorPseudoElementTypeMap.in: Add "marker" to the list of pseudo element types.
  • css/StyleResolver.cpp:

(WebCore::isValidMarkerStyleProperty): Determines if the specified CSS property is valid inside ::marker.
(WebCore::StyleResolver::CascadedProperties::addMatch): Only recognize CSS properties in the content block
of ::marker that match the ::marker whitelist policy.

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::computeMarkerStyle): Computes the style object for the list item marker. We
apply the user-agent style to the marker here as opposed to defining ::marker in the UA sheet as per
the spec. as an optimization to avoid having the style resolver apply the pseudo element to all elements.
For now, we always inherit style from the originating element (list item). Added FIXME to selectively
inherit styles.
(WebCore::RenderListItem::styleDidChange): Always apply the list marker style to the list marker renderer.

  • rendering/RenderListItem.h:
  • rendering/style/RenderStyleConstants.h: Add pseudo ID for the ::marker pseudo element.

LayoutTests:

Add tests that check we respect ::marker when rendering the list item marker. I will
submit all the tests in http/wpt/css/css-pseudo-4 to the Web Platform Tests repository
shortly and then import them into the WebKit repository in a subsequent commit.

  • fast/lists/list-marker-with-display-expected.html: Added.
  • fast/lists/list-marker-with-display.html: Added.
  • http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements-expected.html: Added.
  • http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html: Added.
  • http/wpt/css/css-pseudo-4/marker-color-expected.html: Added.
  • http/wpt/css/css-pseudo-4/marker-color.html: Added.
  • http/wpt/css/css-pseudo-4/marker-font-properties-expected.html: Added.
  • http/wpt/css/css-pseudo-4/marker-font-properties.html: Added.
  • http/wpt/css/css-pseudo-4/marker-inherit-values-expected.html: Added.
  • http/wpt/css/css-pseudo-4/marker-inherit-values.html: Added.
9:01 AM Changeset in webkit [220206] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] The test http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade.https.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=159510

Reviewed by Daniel Bates.

Allow any https certificate when running tests.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(runTest):

7:47 AM Changeset in webkit [220205] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

[Win] WebKit COM header file is not placed in the correct location.
https://bugs.webkit.org/show_bug.cgi?id=175101

Reviewed by Brent Fulgham.

After the transition to WebKitLegacy, the generated WebKit header files should still
be placed in the WebKit folder, so WebKit clients will find the header files in the
same place.

  • WebKitLegacy.vcxproj/WebKitLegacy.proj:
7:45 AM Changeset in webkit [220204] by Antti Koivisto
  • 5 edits
    1 add in trunk/Source/WebCore

Factor common code in Style::*ChangeInvalidation into helper functions
https://bugs.webkit.org/show_bug.cgi?id=174312

Reviewed by Andreas Kling.

There is a lot of copy code here.

  • Style/StyleInvalidationFunctions.h: Added.

(WebCore::Style::traverseRuleFeaturesInShadowTree):
(WebCore::Style::traverseRuleFeaturesForSlotted):
(WebCore::Style::traverseRuleFeatures):

Add functions for traversing rule features that may affect style of an element.
Use lambdas to implement client-specific behavior.

  • WebCore.xcodeproj/project.pbxproj:
  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByAttributeChange):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostRules): Deleted.
(WebCore::Style::mayBeAffectedBySlottedRules): Deleted.

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostRules): Deleted.
(WebCore::Style::mayBeAffectedBySlottedRules): Deleted.

  • style/IdChangeInvalidation.cpp:

(WebCore::Style::IdChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostRules): Deleted.
(WebCore::Style::mayBeAffectedBySlottedRules): Deleted.

7:40 AM Changeset in webkit [220203] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[EME] CDM constructor assigns CDMPrivate member multiple times
https://bugs.webkit.org/show_bug.cgi?id=175128

Reviewed by Xabier Rodriguez-Calvar.

In the CDM class constructor, iterate over the registered CDM
factories, finding one that supports the specified key system.
A CDMPrivate object is created through that factory, and the
iteration is now stopped at that point, while previously it
contined to potentially create CDMPrivate objects through
other factories.

Helper createCDMPrivateForKeySystem() function is removed.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::CDM):
(WebCore::createCDMPrivateForKeySystem): Deleted.

6:20 AM Changeset in webkit [220202] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Don't always recalc the style of display: contents elements.
https://bugs.webkit.org/show_bug.cgi?id=172753

Patch by Emilio Cobos Álvarez <ecobos@igalia.com> on 2017-08-03
Reviewed by Antti Koivisto.

No new tests (no functionality change). This only removes an
inefficiency.

  • dom/Element.cpp:

(WebCore::Element::existingComputedStyle):

  • dom/Element.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::updateElementRenderer):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::renderOrDisplayContentsStyle):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::shouldResolveElement):
(WebCore::Style::TreeResolver::resolveComposedTree):

4:17 AM Changeset in webkit [220201] by Yusuke Suzuki
  • 4 edits in trunk/Source/WTF

[Linux][WTF] Use one global semaphore to notify thread suspend and resume completion
https://bugs.webkit.org/show_bug.cgi?id=175124

Reviewed by Carlos Garcia Campos.

POSIX sem_t is used to notify thread suspend and resume completion in Linux ports
since sem_post is async-signal-safe function. Since we guard suspend() and resume()
with one global lock, this semaphore is also guarded by this lock. So we do not need
to have semaphore per WTF::Thread.

This patch introduces one global Semaphore. And drop per thread semaphore.

  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::~Thread):
(WTF::Semaphore::Semaphore):
(WTF::Semaphore::~Semaphore):
(WTF::Semaphore::wait):
(WTF::Semaphore::post):
(WTF::Thread::signalHandlerSuspendResume):
(WTF::Thread::initializePlatformThreading):
(WTF::Thread::suspend):
(WTF::Thread::resume):
(WTF::Thread::Thread): Deleted.

  • wtf/ThreadingWin.cpp:

(WTF::Thread::Thread): Deleted.

3:03 AM Changeset in webkit [220200] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Remove obsolete failure expectation for narrow-non-breaking-space.html.
https://bugs.webkit.org/show_bug.cgi?id=139493

Unreviewed test gardening.

It likely started passing in r205826 due to its change in Font.cpp.

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

  • platform/gtk/TestExpectations:
2:33 AM Changeset in webkit [220199] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Skip timezone-dependent Sputnik tests.
https://bugs.webkit.org/show_bug.cgi?id=175120

Unreviewed test gardening.

These tests are skipped in the platform-neutral TestExpectations file because
they only pass in Pacific Time (see bug 42625). There doesn't seem to be a
reason for gtk to run them, and they do pass on the buildbot.

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

  • platform/gtk/TestExpectations:
1:53 AM Changeset in webkit [220198] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[Linux][WTF] Reduce sizeof(WTF::Thread) by using a pointer to PlatformRegisters
https://bugs.webkit.org/show_bug.cgi?id=175119

Reviewed by Carlos Garcia Campos.

sizeof(PlatformRegisters) is so large. In my Linux box, it is 256. It enlarges the sizeof(WTF::Thread).
However, it is not necessary to hold it in WTF::Thread member. Thread's ucontext data and its stack is
effective while suspending the thread. So, we can just use the pointer to the PlatformRegister instead
of copying it to the member of the WTF::Thread.

  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::signalHandlerSuspendResume):
(WTF::Thread::getRegisters):

12:03 AM Changeset in webkit [220197] by jmarcell@apple.com
  • 7 edits in branches/safari-604.1.36-branch/Source

Versioning.

12:01 AM Changeset in webkit [220196] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.36/Source

Revert "Versioning."

This reverts commit 47a02c7900432c88ffc054f87447bf2ced2bc7bc.

Aug 2, 2017:

11:44 PM Changeset in webkit [220195] by jmarcell@apple.com
  • 3 edits in branches/safari-604.1.36-branch/Source/JavaScriptCore

Cherry-pick r220144. rdar://problem/33692161

11:44 PM Changeset in webkit [220194] by jmarcell@apple.com
  • 5 edits in branches/safari-604.1.36-branch/Source/WebKit

Cherry-pick r220138. rdar://problem/33692550

11:44 PM Changeset in webkit [220193] by jmarcell@apple.com
  • 5 edits
    3 adds in branches/safari-604.1.36-branch

Cherry-pick r220112. rdar://problem/33692164

11:44 PM Changeset in webkit [220192] by jmarcell@apple.com
  • 6 edits in branches/safari-604.1.36-branch/Source/WebCore

Cherry-pick r220085. rdar://problem/33692157

11:43 PM Changeset in webkit [220191] by jmarcell@apple.com
  • 2 edits in branches/safari-604.1.36-branch/Source/WebCore

Cherry-pick r220084. rdar://problem/33692167

11:43 PM Changeset in webkit [220190] by jmarcell@apple.com
  • 3 edits in branches/safari-604.1.36-branch/Source/WebCore

Cherry-pick r220077. rdar://problem/33692157

11:43 PM Changeset in webkit [220189] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604.1.36-branch

Cherry-pick r220035. rdar://problem/33692157

11:18 PM Changeset in webkit [220188] by Devin Rousso
  • 20 edits
    1 copy
    1 add in trunk

Web Inspector: add stack trace information for each RecordingAction
https://bugs.webkit.org/show_bug.cgi?id=174663

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/ScriptCallFrame.h:

Add operator== so that when a ScriptCallFrame object is held in a Vector, calling find
with an existing value doesn't need require a functor and can use existing code.

  • interpreter/StackVisitor.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::isWasmFrame const): Inlined in header.

Source/WebCore:

Tests: inspector/canvas/recording-2d.html

inspector/model/recording.html

  • inspector/InspectorCanvas.h:
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::indexForData):
(WebCore::InspectorCanvas::buildAction):

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:
  • UserInterface/Models/Recording.js:

(WI.Recording.prototype.swizzle):
Add Array type for swizzling array values.

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction):
(WI.RecordingAction.fromPayload):
(WI.RecordingAction.prototype.get trace):
(WI.RecordingAction.prototype.swizzle):
(WI.RecordingAction.prototype.toJSON):

  • UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added.

(WI.RecordingTraceDetailsSidebarPanel):
(WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass):
(WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
(WI.RecordingTraceDetailsSidebarPanel.prototype.set recording):
(WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex):

  • UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added.

(.sidebar > .panel.details.recording-trace > .content > .call-frame):
(.sidebar > .details.recording-trace > .content > .no-trace-data):
(.sidebar > .details.recording-trace > .content > .no-trace-data > .message):

  • UserInterface/Views/RecordingTabContentView.js:

(WI.RecordingTabContentView):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement.prototype.populateContextMenu):

  • UserInterface/Views/CallFrameView.css:

(.call-frame):
(body[dir=ltr] .call-frame .icon):
(body[dir=rtl] .call-frame .icon):
Apply the same trailing margin for CallFrameView icons as TreeElement.

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-2d.html:
  • inspector/model/recording-expected.txt:
  • inspector/model/recording.html:
11:16 PM Changeset in webkit [220187] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

Unreviewed, build fix for Windows port
https://bugs.webkit.org/show_bug.cgi?id=174716

This ugliness will be fixed in https://bugs.webkit.org/show_bug.cgi?id=175013.

  • wtf/ThreadHolder.h:
  • wtf/Threading.h:
11:03 PM Changeset in webkit [220186] by Yusuke Suzuki
  • 40 edits
    2 deletes in trunk/Source

Merge WTFThreadData to Thread::current
https://bugs.webkit.org/show_bug.cgi?id=174716

Reviewed by Mark Lam.

Source/JavaScriptCore:

Use Thread::current() instead.

  • API/JSContext.mm:

(+[JSContext currentContext]):
(+[JSContext currentThis]):
(+[JSContext currentCallee]):
(+[JSContext currentArguments]):
(-[JSContext beginCallbackWithData:calleeValue:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):

  • heap/Heap.cpp:

(JSC::Heap::requestCollection):

  • runtime/Completion.cpp:

(JSC::checkSyntax):
(JSC::checkModuleSyntax):
(JSC::evaluate):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):

  • runtime/Identifier.cpp:

(JSC::Identifier::checkCurrentAtomicStringTable):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):
(JSC::JSLock::willReleaseLock):
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::grabAllLocks):

  • runtime/JSLock.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::updateStackLimits):
(JSC::VM::committedStackByteCount):

  • runtime/VM.h:

(JSC::VM::isSafeToRecurse const):

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):

  • runtime/VMInlines.h:

(JSC::VM::ensureStackCapacityFor):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPatternConstructor::isSafeToRecurse const):

Source/WebCore:

Use Thread::current() instead.

  • fileapi/AsyncFileStream.cpp:
  • platform/ThreadGlobalData.cpp:

(WebCore::ThreadGlobalData::ThreadGlobalData):

  • platform/graphics/cocoa/WebCoreDecompressionSession.h:
  • platform/ios/wak/WebCoreThread.mm:

(StartWebThread):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::workerThread):

Source/WTF:

We placed thread specific data in WTFThreadData previously. But now, we have a new good place
to put thread specific data: WTF::Thread. Before this patch, WTFThreadData and WTF::Thread
sometimes have the completely same fields (m_stack etc.) due to initialization order limitations.
This patch merges WTFThreadData to WTF::Thread. We apply WTFThreadData's initialization style
to WTF::Thread. So, WTF::Thread's holder now uses fast TLS for darwin environment. Thus,
Thread::current() access is now accelerated. And WTF::Thread::current() can be accessed even
before calling WTF::initializeThreading.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/LockAlgorithm.h:
  • wtf/LockAlgorithmInlines.h:
  • wtf/MainThread.h:
  • wtf/ParkingLot.cpp:
  • wtf/StackStats.cpp:

(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):

  • wtf/ThreadHolder.cpp:

(WTF::ThreadHolder::initializeCurrent):

  • wtf/ThreadHolder.h:

(WTF::ThreadHolder::ThreadHolder):
(WTF::ThreadHolder::currentMayBeNull):
(WTF::ThreadHolder::current):

  • wtf/ThreadHolderPthreads.cpp:

(WTF::ThreadHolder::initializeKey):
(WTF::ThreadHolder::initialize):
(WTF::ThreadHolder::destruct):
(WTF::ThreadHolder::initializeOnce): Deleted.
(WTF::ThreadHolder::current): Deleted.

  • wtf/ThreadHolderWin.cpp:

(WTF::ThreadHolder::initializeKey):
(WTF::ThreadHolder::currentDying):
(WTF::ThreadHolder::initialize):
(WTF::ThreadHolder::initializeOnce): Deleted.
(WTF::ThreadHolder::current): Deleted.

  • wtf/Threading.cpp:

(WTF::Thread::initializeInThread):
(WTF::Thread::entryPoint):
(WTF::Thread::create):
(WTF::Thread::didExit):
(WTF::initializeThreading):
(WTF::Thread::currentMayBeNull): Deleted.

  • wtf/Threading.h:

(WTF::Thread::current):
(WTF::Thread::atomicStringTable):
(WTF::Thread::setCurrentAtomicStringTable):
(WTF::Thread::stackStats):
(WTF::Thread::savedStackPointerAtVMEntry):
(WTF::Thread::setSavedStackPointerAtVMEntry):
(WTF::Thread::savedLastStackTop):
(WTF::Thread::setSavedLastStackTop):

  • wtf/ThreadingPrimitives.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::createCurrentThread):
(WTF::Thread::current): Deleted.

  • wtf/ThreadingWin.cpp:

(WTF::Thread::createCurrentThread):
(WTF::Thread::current): Deleted.

  • wtf/WTFThreadData.cpp: Removed.
  • wtf/WTFThreadData.h: Removed.
  • wtf/text/AtomicString.cpp:
  • wtf/text/AtomicStringImpl.cpp:

(WTF::stringTable):

  • wtf/text/AtomicStringTable.cpp:

(WTF::AtomicStringTable::create):

  • wtf/text/AtomicStringTable.h:
10:57 PM Changeset in webkit [220185] by Chris Dumez
  • 6 edits in trunk

NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
https://bugs.webkit.org/show_bug.cgi?id=175109
<rdar://problem/33363169>

Reviewed by Brady Eidson.

Source/WebKit:

If NetworkResourceLoader::setDefersLoading(false) is called by the client while m_networkLoad is null
then we call NetworkResourceLoader::start() to start the load. This is needed in the case where
a NetworkResourceLoader is constructed in deferred mode so that the load can later be started via
setDefersLoading(). However, it is possible for setDefersLoading(false) to be called when start()
has already been called, which causes start() to be called multiple times and leads to an assertion
hit in debug.

Normally, setDefersLoading(false) returns without calling start() if m_networkLoad is not null. It
relies on m_networkLoad being non-null to determine if start() should be called. This is bad because
start() checks the disk cache asynchronously *before* calling startNetworkLoad() and initializing
m_networkLoad. Therefore, if setDefersLoading(false) is called *while* we are checking the cache,
then we will call incorrectly call start() again.

In the case of the radar, this happens when we:

  1. Call start() and check the disk cache
  2. Retrieve a cached redirect from the cache, which causes a WillSendRequest IPC to be sent to the WebProcess
  3. The WebProcess calls setDefersLoading(true), sends the ContinueWillSendRequest IPC back and then calls setDefersLoading(false)

The call to continueWillSendRequest() causes us to retrieve the redirected entry from the cache,
asynchronously, which will return no entry and start a load.
The later call to setDefersLoading(false) causes us to call start() again and we end up back to step 1.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::setDefersLoading):

  • NetworkProcess/NetworkResourceLoader.h:

LayoutTests:

Extend test coverage to cover cacheable redirects to a resource that needs
revalidation, similarly to the case in the radar.

  • http/tests/cache/disk-cache/disk-cache-redirect-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-redirect.html:
10:48 PM Changeset in webkit [220184] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

LLInt should do pointer caging
https://bugs.webkit.org/show_bug.cgi?id=175036

Reviewed by Keith Miller.

Implementing this in the LLInt was challenging because offlineasm did not previously know
how to load from globals. This teaches it how to do that on Darwin/x86_64, which happens
to be where the Gigacage is enabled right now.

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/ast.rb:
  • offlineasm/x86.rb:
9:46 PM Changeset in webkit [220183] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

NeverDestroyed related leaks seen on bots
https://bugs.webkit.org/show_bug.cgi?id=175113

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-08-02
Reviewed by Yusuke Suzuki.

  • wtf/NeverDestroyed.h:

(WTF::NeverDestroyed::NeverDestroyed):
Previously the result of makeNeverDestroyed was not always moving into
the static NeverDestroyed static local variable. In some cases it would
re-invoke the constructor, creating a new NeverDestroyed object. In the
case of a Vector it was causing leaks.

Adding a move constructor convinces the compiler to move the result
of makeNeverDestroyed into the NeverDestroyed static. It doesn't actually
invoke the move constructor here, which I believe means it is deciding
to perform optional copy elision optimization.
'http://en.cppreference.com/w/cpp/language/copy_elision

9:40 PM Changeset in webkit [220182] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.36/Source

Versioning.

9:25 PM Changeset in webkit [220181] by jmarcell@apple.com
  • 1 copy in branches/safari-604.1.36-branch

New branch.

9:21 PM Changeset in webkit [220180] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: add TreeElement virtualization for the Recording tab
https://bugs.webkit.org/show_bug.cgi?id=174968

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/RecordingNavigationSidebarPanel.js:

(WI.RecordingNavigationSidebarPanel):

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline):
(WI.TreeOutline.prototype.get virtualized):
(WI.TreeOutline.prototype.registerScrollVirtualizer):
(WI.TreeOutline.prototype.updateVirtualizedElements.walk):
(WI.TreeOutline.prototype.updateVirtualizedElements):
Add spacer elements before and after the TreeOutline element that will size to ensure that
the TreeOutline node still takes up the same amount of space after some of the TreeElements
are removed. Whenever the scroll of the container view changes, recalculate the visible area
and add/remove TreeElements based on whether they would be in that. This is only possible if
every TreeElement has the same vertical height, which is given when setting up the scroll
listener on the container view.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype.set hidden):
(WI.TreeElement.prototype._attach):
(WI.TreeElement.prototype.collapse):
(WI.TreeElement.prototype.expand):
(WI.TreeElement.prototype.reveal):
If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They
will be added at the end of the frame (via setTimeout) if they are within the visible + padding
area of the TreeOutline.

9:19 PM Changeset in webkit [220179] by commit-queue@webkit.org
  • 5 edits
    2 deletes in trunk

HTTP tests with 'https' suffix are only run over HTTPS for WK2, not WK1
https://bugs.webkit.org/show_bug.cgi?id=175089

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

Tools:

  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions): Using absolutePath if available.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(computeTestURL): Removing http/tests/ specific URL computation.

  • Scripts/webkitpy/port/driver.py:

(Driver._command_from_driver_input): Making webkitpy passing HTTP urls for HTTP served tests to all test runners, including WK1.

LayoutTests:

Removing no longer needed expectations.

  • platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.
  • platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.
8:53 PM Changeset in webkit [220178] by akling@apple.com
  • 2 edits in trunk/Source/WebKit

NetworkRTCProvider::createResolver() leaks CFHost objects
https://bugs.webkit.org/show_bug.cgi?id=175103
<rdar://problem/33690347>

Reviewed by Youenn Fablet.

Add a missing adoptCF() so we don't leak the CFHost.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createResolver):

8:49 PM Changeset in webkit [220177] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Fix crashes in GC creating a document fragment on a background thread
https://bugs.webkit.org/show_bug.cgi?id=175111

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

r220095 (https://webkit.org/b/175006) change JSHTMLTemplateElement from using a
private name + property to manager the lifetime of the reference DocumentFragment
to using the idiomatic visitAdditionalChildren. Unfortunately, the function to access
the DocumentFragment lazily creates it. If this lazy creation happens on a GC thread,
badness ensues. This introduces an accessor that returns the DocumentFragment if it
has been created or null if it has not.

  • bindings/js/JSHTMLTemplateElementCustom.cpp:

(WebCore::JSHTMLTemplateElement::visitAdditionalChildren):

  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::contentIfAvailable):

  • html/HTMLTemplateElement.h:
8:25 PM Changeset in webkit [220176] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[WebIDL] Simplify [EnabledBySettings] extended attribute code to not require passing a global object to finishCreation
https://bugs.webkit.org/show_bug.cgi?id=175087

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

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GeneratePrototypeDeclaration):
Remove unnecessary passing of the global object to finishCreation for [EnabledBySettings].

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:

Update tests.

6:57 PM Changeset in webkit [220175] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Sweeping should only scribble when sweeping to free list
https://bugs.webkit.org/show_bug.cgi?id=175105

Reviewed by Saam Barati.

I just saw a crash on the bots where a destructor call attempt dereferenced scribbled memory. This
can happen because the bump path of specializedSweep will scribble in SweepOnly, which replaces the
zap word (i.e. 0) with the scribble word (i.e. 0xbadbeef0). This is a recent regression, since we
didn't used to do destruction on the bump path. No destruction, no zapping. Looking at the pop
path, we only scribble when we SweepToFreeList. This ensures that we only overwrite the zap word
when it doesn't matter anyway because we're building a free list.

This is a fix for those crashes on the bots because it means that we'll no longer scribble over the
zap.

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::specializedSweep):

6:55 PM Changeset in webkit [220174] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/appcache/deferred-events-delete-while-raising-timer.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=175107

Unreviewed test gardening.

6:42 PM Changeset in webkit [220173] by clopez@igalia.com
  • 2 edits in trunk/JSTests

[Linux] JSTests/wasm/stress/oom.js should not run on Linux
https://bugs.webkit.org/show_bug.cgi?id=175100

Reviewed by Mark Lam.

The JSC test JSTests/wasm/stress/oom.js tries to use all the
available memory until an out of memory exception happens.

The Linux kernel is more tuned for server workloads than for GUI
responsiveness. When a process tries to use a lot of memory, Linux
will do its best to serve the request. This usually translates to
free physical RAM by writing to disk dirty pages and/or moving out
less recently used pages to swap (disk storage).
Meanwhile it does this, the system will become unresponsive and this
leads to freezes that can last even some minutes on the worst cases.

Therefore, let's skip this test on Linux as it will cause more harm
than good on the Linux bots or on the machines of Linux developers.

  • wasm/stress/oom.js:
6:33 PM Changeset in webkit [220172] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r220144. rdar://problem/33687404

6:33 PM Changeset in webkit [220171] by jmarcell@apple.com
  • 5 edits
    3 adds in branches/safari-604-branch

Cherry-pick r220112. rdar://problem/33687415

6:33 PM Changeset in webkit [220170] by jmarcell@apple.com
  • 6 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r220085. rdar://problem/33687398

6:33 PM Changeset in webkit [220169] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r220084. rdar://problem/33687425

6:33 PM Changeset in webkit [220168] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r220077. rdar://problem/33687398

6:32 PM Changeset in webkit [220167] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r220035. rdar://problem/33687398

6:32 PM Changeset in webkit [220166] by Lucas Forschler
  • 2 edits in trunk/Tools
6:32 PM Changeset in webkit [220165] by fpizlo@apple.com
  • 8 edits
    1 add in trunk/Source

All C++ accesses to JSObject::m_butterfly should do caging
https://bugs.webkit.org/show_bug.cgi?id=175039

Reviewed by Keith Miller.

Source/JavaScriptCore:

Makes JSObject::m_butterfly a AuxiliaryBarrier<CagedPtr<Butterfly>> and adopts the CagedPtr<> API.
This ensures that you can't cause C++ code to access a butterfly that has been rewired to point
outside the gigacage.

  • runtime/JSArray.cpp:

(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::unshiftCountWithAnyIndexingType):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):

  • runtime/JSObject.cpp:

(JSC::JSObject::heapSnapshot):
(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToInt32):
(JSC::JSObject::convertUndecidedToDouble):
(JSC::JSObject::convertUndecidedToContiguous):
(JSC::JSObject::convertInt32ToDouble):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToContiguous):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
(JSC::JSObject::ensureLengthSlow):
(JSC::JSObject::allocateMoreOutOfLineStorage):

  • runtime/JSObject.h:

(JSC::JSObject::canGetIndexQuickly):
(JSC::JSObject::getIndexQuickly):
(JSC::JSObject::tryGetIndexQuickly const):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::setIndexQuickly):
(JSC::JSObject::initializeIndex):
(JSC::JSObject::initializeIndexWithoutBarrier):
(JSC::JSObject::butterfly const):
(JSC::JSObject::butterfly):

Source/WTF:

Adds a smart pointer class that does various kinds of caging for you.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CagedPtr.h: Added.

(WTF::CagedPtr::CagedPtr):
(WTF::CagedPtr::get const):
(WTF::CagedPtr::getMayBeNull const):
(WTF::CagedPtr::operator== const):
(WTF::CagedPtr::operator!= const):
(WTF::CagedPtr::operator bool const):
(WTF::CagedPtr::operator* const):
(WTF::CagedPtr::operator-> const):

5:54 PM Changeset in webkit [220164] by Matt Lewis
  • 2 edits
    8 deletes in trunk/LayoutTests

Removed bad expectations and marked test as flaky.
https://bugs.webkit.org/show_bug.cgi?id=175061

Unreviewed test gardening.

  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Removed.
  • platform/mac/TestExpectations:
5:46 PM Changeset in webkit [220163] by aestes@apple.com
  • 4 edits
    3 adds in trunk

REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets
https://bugs.webkit.org/show_bug.cgi?id=175098
<rdar://problem/31416763>

Reviewed by Daniel Bates.

Source/WebCore:

r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted
frames within the sandbox from navigating their sandboxed siblings or ancestors, which
breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews
contain a frameset with a table of contents frame and a content frame, and the table of
contents frame needs to be able to navigate the content frame when the sheet selection
changes.

Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the
sandbox will be able to navigate each other, but will not be able to navigate the top frame
(due to SandboxTopNavigation still being enabled), nor will they be able to navigate any
other ancestor frame outside the sandbox (due to QuickLook previews being in a different
origin than the hosting frame). These two cases are covered by existing tests.

Test: quicklook/multi-sheet-numbers-09.html

  • dom/Document.cpp:

(WebCore::Document::applyQuickLookSandbox): Added a call to
disableSandboxFlags(SandboxNavigation) after applying the content security policy.

  • dom/SecurityContext.h:

(WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags().

LayoutTests:

  • quicklook/multi-sheet-numbers-09-expected.txt: Added.
  • quicklook/multi-sheet-numbers-09.html: Added.
  • quicklook/resources/multi-sheet-numbers-09.numbers: Added.
5:44 PM Changeset in webkit [220162] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.36

Tag Safari-604.1.36.

5:44 PM Changeset in webkit [220161] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.36

Delete Tag.

4:56 PM Changeset in webkit [220160] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip newly imported WPT that is slow in Debug builds.

3:46 PM Changeset in webkit [220159] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

inspector/runtime/CommandLineAPI-inspect.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=175092

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-08-02
Reviewed by Brian Burg.

  • inspector/runtime/CommandLineAPI-inspect-expected.txt:
  • inspector/runtime/CommandLineAPI-inspect.html:
3:35 PM Changeset in webkit [220158] by Jonathan Bedard
  • 3 edits in trunk/Tools

check-webkit-style: deleting lines in a file runs the linter on the whole file
https://bugs.webkit.org/show_bug.cgi?id=175078

Reviewed by David Kilzer.

Deleting lines in a file should not cause linter errors to be blamed on the patch.
<https://bugs.webkit.org/show_bug.cgi?id=86142> is an example of this happening.

  • Scripts/webkitpy/style/checkers/test_expectations.py:

(TestExpectationsChecker._should_log_linter_warning): Do not log a linter error if the file it is associated with only has deleted lines

  • Scripts/webkitpy/style/main_unittest.py:

(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line): Added files should have every line number in the file when processing.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line_only_deletes): Test case where the file with the linter errors only contained deletes.
(ExpectationLinterInStyleCheckerTest.test_linter_added_file_with_error): Added files should have every line number in the file when processing.

3:31 PM Changeset in webkit [220157] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

3:29 PM Changeset in webkit [220156] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.36

Tag Safari-604.1.36.

3:23 PM Changeset in webkit [220155] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

2:50 PM Changeset in webkit [220154] by fpizlo@apple.com
  • 4 edits in trunk/Source/bmalloc

If Gigacage is disabled, bmalloc should service large aligned memory allocation requests through vmAllocate
https://bugs.webkit.org/show_bug.cgi?id=175085

Reviewed by Saam Barati.

This fixes a problem where if we used gmalloc, WebAssembly memory allocations would still use
bmalloc's large allocator.

We want to use the page allocator for those "large" allocations when the Gigacage is disabled.

  • bmalloc/DebugHeap.cpp:

(bmalloc::DebugHeap::DebugHeap):
(bmalloc::DebugHeap::memalignLarge):
(bmalloc::DebugHeap::freeLarge):

  • bmalloc/DebugHeap.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::deallocateLarge):

2:50 PM Changeset in webkit [220153] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[MSE] Removing samples when presentation order does not match decode order can cause bad behavior.
https://bugs.webkit.org/show_bug.cgi?id=175091

Reviewed by Eric Carlson.

Address follow-up comments to r219519.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):

1:51 PM Changeset in webkit [220152] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.2

Tag Safari-605.1.2.

1:45 PM Changeset in webkit [220151] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
https://bugs.webkit.org/show_bug.cgi?id=175080

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-02
Reviewed by Jon Lee.

Source/WebCore:

No new tests because this only removes unused code.

This is obsolete because of the alternate solution in
https://bugs.webkit.org/show_bug.cgi?id=174850

  • page/Settings.in:

Source/WebKit:

This is obsolete because of the alternate solution in
https://bugs.webkit.org/show_bug.cgi?id=174850

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setMediaDocumentEntersFullscreenAutomatically:]): Deleted.
(-[WKPreferences _mediaDocumentEntersFullscreenAutomatically]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

1:01 PM Changeset in webkit [220150] by Jonathan Bedard
  • 4 edits in trunk/Tools

webkitpy: Allow caller to specify response to unicode encode/decode error in filesystem
https://bugs.webkit.org/show_bug.cgi?id=175075

Reviewed by David Kilzer.

We have no way of handling text files with illegal unicode characters. Allow the callers of
filesystem.read_text_file to specify one of Python 2.7's supported responses ('strict', 'ignore', or
'replace'). See https://docs.python.org/2/howto/unicode.html for details on these responses.

  • Scripts/webkitpy/common/system/filesystem.py:

(FileSystem.read_text_file): Allow caller to specify unicode error handling.
(FileSystem.write_text_file): Ditto.

  • Scripts/webkitpy/common/system/filesystem_mock.py:

(MockFileSystem.read_text_file): Allow caller to specify unicode error handling.
(MockFileSystem.write_text_file): Ditto.

  • Scripts/webkitpy/common/system/filesystem_unittest.py:

(RealFileSystemTest.test_read_text_file_unicode_decode_error): Test reading a file with illegal unicode content.
(RealFileSystemTest.test_write_text_file_unicode_encode_error): Test writing illegal unicode content to a file.

12:59 PM Changeset in webkit [220149] by Chris Dumez
  • 3 edits in trunk/LayoutTests

Unreviewed, skip newly imported WPT HTTPS tests on WK2 only.

The tests seem to work fine on WK1.

12:57 PM Changeset in webkit [220148] by fpizlo@apple.com
  • 13 edits in trunk/Source

We should be OK with the gigacage being disabled on gmalloc
https://bugs.webkit.org/show_bug.cgi?id=175082

Reviewed by Michael Saboff.
Source/bmalloc:


This adds Gigacage::shouldBeEnabled(), which returns false when we're using gmalloc or other things
that enable DebugHeap.

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):

  • bmalloc/Environment.h:
  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::shouldBeEnabled):

  • bmalloc/Gigacage.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Heap.h:

Source/JavaScriptCore:

  • jsc.cpp:

(jscmain):

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::m_webSQLiteDatabaseTracker):

Source/WTF:

  • wtf/Gigacage.h:

(Gigacage::shouldBeEnabled):

11:35 AM Changeset in webkit [220147] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Automation: files selected for upload should be checked against values of the 'accept' attribute
https://bugs.webkit.org/show_bug.cgi?id=174803
<rdar://problem/33514190>

Reviewed by Carlos Garcia Campos.

Use the parsed values of the file input element's "accept" attribute to reject
files that don't match the specified values. This is normally done by Safari
using NSOpenPanel, but since a real open panel isn't shown during automation,
it needs to be done here.

Support for limiting accepted files by file extensions will be added when the
same is implemented in the normal code path for the C and Objective-C APIs.

This change is covered by internal WebDriver tests that will be rewritten for the
public Webdriver W3C test suite someday, when safaridriver runs those tests itself.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::handleRunOpenPanel):
Since we already have the proposed files, there's no need to compute a list of
supported extensions based on wildcard MIME types. First check the extension,
then the inferred MIME type for the extension, and then the wildcard MIME type
if the inferred type is not an exact match.

11:25 AM Changeset in webkit [220146] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Unmarked imported/w3c/IndexedDB-private-browsing/idbfactory_open.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=174949

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:24 AM Changeset in webkit [220145] by fpizlo@apple.com
  • 2 edits in trunk/Source/WebCore

GPUBuffer::length() should return the size of the array buffer backing the GPU buffer, not the rounded-up GPU buffer length
https://bugs.webkit.org/show_bug.cgi?id=175079

Reviewed by Simon Fraser.

This fixes a failure in the GPU.BufferCreate unit test.

The problem is that in order to have a Metal buffer wrap memory we allocated, we have to tell Metal
that the memory is page-aligned. This means that the Metal buffer reports back a page-aligned size,
which is different than what the test expected.

It seems that it's most convenient for our GPUBuffer class to return the unaligned length, rather
than the aligned length. This is just a simple matter of returning the length from the ArrayBuffer
rather than the Metal buffer.

This fixes the unit test and is probably more sensible for actual users of this class, since the page
alignment of the length is a goofy implementation detail.

  • platform/graphics/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::length const):

11:15 AM Changeset in webkit [220144] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

On memory-constrained iOS devices, reduce the rate at which the JS heap grows before a GC to try to keep more memory available for the system
https://bugs.webkit.org/show_bug.cgi?id=175041
<rdar://problem/33659370>

Reviewed by Filip Pizlo.

The testing I have done shows that this new function is a ~10%
progression running JetStream on 1GB iOS devices. I've also tried
this on a few > 1GB iOS devices, and the testing shows this is either neutral
or a regression. Right now, we'll just enable this for <= 1GB devices
since it's a win. In the future, we might want to either look into
tweaking these parameters or coming up with a new function for > 1GB
devices.

  • heap/Heap.cpp:
  • runtime/Options.h:
11:10 AM Changeset in webkit [220143] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.35.1/Source/WebKitLegacy

Cherry-pick r220128. rdar://problem/33537767

11:10 AM Changeset in webkit [220142] by matthew_hanson@apple.com
  • 13 edits in tags/Safari-604.1.35.1

Cherry-pick r219602. rdar://problem/33537767

11:10 AM Changeset in webkit [220141] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.35.1/Source

Versioning.

10:57 AM Changeset in webkit [220140] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.35.1

New Tag.

10:54 AM Changeset in webkit [220139] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Intermittent exception in buildPageURLForIteration for Buildbot 0.9 dashboard
https://bugs.webkit.org/show_bug.cgi?id=175072

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:

(Buildbot): Make sure this._builderNameToIDMap is always defined for Buildbot 0.9.

10:51 AM Changeset in webkit [220138] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

WKPDFView doesn't respect safe area insets
https://bugs.webkit.org/show_bug.cgi?id=175046
<rdar://problem/33558386>

Reviewed by Wenson Hsieh.

  • Platform/spi/ios/UIKitSPI.h:

Add some SPI.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
Drive-by fix two small custom content view issues:

  • Reset _scrollViewBackgroundColor; it is used to early-return from

updating the background color if it hasn't changed, but if you go from a
site with (for example) a white background, to a PDF, to another site
with a white background, we will early-return and not reset the background
color from the grey WKPDFView background.

  • When installing a custom content view, scroll to the origin. We miss

the usual mechanism for scrolling to the origin when custom content views
are installed, so do it here.

(-[WKWebView _effectiveObscuredInsetEdgesAffectedBySafeArea]):
Ignore _obscuredInsetEdgesAffectedBySafeArea for custom content views.
This is fairly arbitrary, and we should find a different way to
express different edge sets for different kinds of content (perhaps
bake this into default viewports?), but for now this works.

(-[WKWebView _computedContentInset]):
Use _effectiveObscuredInsetEdgesAffectedBySafeArea instead of the ivar directly.

(-[WKWebView _safeAreaShouldAffectObscuredInsets]):
Force safe areas to not affect obscured insets for custom content views,
so that it's up to every custom content view to take safe areas into
account themselves.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:

Expose _computedUnobscuredSafeAreaInset for WKPDFView's use.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_setMinimumSize:]):
Avoid rebuilding the WKPDFView if the minimum size didn't change.

(-[WKPDFView _offsetForPageNumberIndicator]):
Take unobscured safe area insets into account when insetting
the page number indicator.

(-[WKPDFView web_computedContentInsetDidChange]):
Watch for unobscured safe area inset changes, and apply them to the
layout of the WKPDFView.

(-[WKPDFView _computePageAndDocumentFrames]):
Make it possible to only update the WKPDFView's size and position, without
rebuilding its subviews, if the width did not change. This prevents lots
of flashing of the child UIPDFPageViews when the unobscured safe area
insets change dynamically.

Take the safe area insets into account when determining what width
to lay out to.

(-[WKPDFView _updateDocumentFrame]):
Take the safe area insets into account when positioning the WKPDFView
inside the WKScrollView.

10:46 AM Changeset in webkit [220137] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, temporarily skip some HTTPS tests that time out on the bots.

10:45 AM Changeset in webkit [220136] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath()
https://bugs.webkit.org/show_bug.cgi?id=175055
<rdar://problem/32671352>

Reviewed by David Kilzer.

  • Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:

(WebKit::ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel):

Now uses dispatch_once() instead of NeverDestroyed and checks the
return value of storagePath() before using it to load the model.

10:38 AM Changeset in webkit [220135] by BJ Burg
  • 9 edits in trunk/Source

HTML file input elements do not support file extensions in the "accept" attribute
https://bugs.webkit.org/show_bug.cgi?id=95698
<rdar://problem/12231850>

Reviewed by Darin Adler.

Source/WebCore:

Serialize the accepted file extensions so they can be accessed in the UI process.

  • platform/FileChooser.h:
  • platform/FileChooser.cpp:

(WebCore::FileChooser::invalidate): Modernize.
(WebCore::FileChooserSettings::acceptTypes const): Deleted.
This is dead code, it was only used by Chromium.

Source/WebKit:

Plumb accepted file extensions out to the C API.
The Cocoa API will be improved in a later patch.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FileChooserSettings>::encode):
(IPC::ArgumentCoder<FileChooserSettings>::decode):

  • UIProcess/API/APIOpenPanelParameters.cpp:

(API::OpenPanelParameters::acceptFileExtensions const):

  • UIProcess/API/APIOpenPanelParameters.h:
  • UIProcess/API/C/WKOpenPanelParametersRef.cpp:

(WKOpenPanelParametersCopyAcceptedFileExtensions):

  • UIProcess/API/C/WKOpenPanelParametersRef.h:
10:37 AM Changeset in webkit [220134] by Matt Lewis
  • 1 edit
    8 moves
    8 adds in trunk/LayoutTests

Added new expectations folders and moved expectations to correct folders.
https://bugs.webkit.org/show_bug.cgi?id=175061

Unreviewed gardening.

  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Renamed from LayoutTests/platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt.
10:28 AM Changeset in webkit [220133] by matthew_hanson@apple.com
  • 13 edits in branches/safari-604-branch

Cherry-pick r219602. rdar://problem/33537767

10:03 AM Changeset in webkit [220132] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

Remove obsolete expectations for syntax-021.xml.
https://bugs.webkit.org/show_bug.cgi?id=86142

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-02
Reviewed by Sam Weinig.

It may have started passing in r209396.

  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
9:46 AM Changeset in webkit [220131] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
https://bugs.webkit.org/show_bug.cgi?id=175010
<rdar://problem/33647818>

Patch by Fujii Hironori <Fujii Hironori> on 2017-08-02
Reviewed by Alex Christensen.

Source/WebCore:

No new tests because no behavior change.

Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::isValidCSSSelector):
Call QualifiedName::init().

  • dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
  • dom/QualifiedName.cpp:

(WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
instead of placement new.

  • dom/QualifiedName.h: Use LazyNeverDestroyed.

Source/WebKit:

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::ContentRuleListStore::compileContentRuleList):
Call QualifiedName::init().

8:36 AM Changeset in webkit [220130] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Remove overridden lines from win's TestExpectations.
https://bugs.webkit.org/show_bug.cgi?id=175068

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-02
Reviewed by Darin Adler.

These lines cause lint errors and block any patch that touches the file from
landing.

  • platform/win/TestExpectations:
7:07 AM Changeset in webkit [220129] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKitLegacy

Cherry-pick r220128. rdar://problem/33537767

6:53 AM Changeset in webkit [220128] by matthew_hanson@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

Build-fix for Windows in Visual Studio after directory rename.

Reviewed by Per Arne Vollan.

  • WebKitLegacy.vcxproj/WebKitLegacy.proj:

We still build WebKit.dll, not WebKitLegacy.dll.

6:25 AM Changeset in webkit [220127] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Layout test editing/pasteboard/copy-standalone-image.html failing
https://bugs.webkit.org/show_bug.cgi?id=163184

Unreviewed test gardening.

Remove obsolete failure expectation for copy-standalone-image.html.

The bug was fixed in r212428. (The test was also broken by both landings for
bug 170956, until r216174 fixed it again.)

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

  • platform/gtk/TestExpectations:
1:45 AM Changeset in webkit [220126] by Michael Catanzaro
  • 2 edits in trunk/Tools

[CMake] Remove obsolete code in TestWebKitAPI/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=175019

Reviewed by Darin Adler.

  • TestWebKitAPI/CMakeLists.txt:
Note: See TracTimeline for information about the timeline view.